	.file	"extr_ste_dma40_ll.c_d40_seg_size.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	d40_seg_size, @function
d40_seg_size:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12d, edx
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	ebp, esi
	mov	esi, edx
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	ebx, edi
	mov	edi, ebp
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	max@PLT
	mov	esi, r12d
	mov	edi, ebp
	mov	r13d, eax
	call	min@PLT
	imul	eax, DWORD PTR STEDMA40_MAX_SEG_SIZE[rip]
	mov	esi, r13d
	mov	edi, eax
	call	ALIGN@PLT
	cmp	DWORD PTR STEDMA40_MAX_SEG_SIZE[rip], eax
	jge	.L2
	sub	eax, r13d
.L2:
	cmp	eax, ebx
	jge	.L4
	lea	edx, [rax+rax]
	cmp	edx, ebx
	jge	.L7
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, ebx
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	mov	edi, ebx
	add	rsp, 8
	.cfi_def_cfa_offset 40
	mov	esi, r13d
	shr	edi, 31
	add	edi, ebx
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	sar	edi
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	jmp	ALIGN@PLT
	.cfi_endproc
.LFE0:
	.size	d40_seg_size, .-d40_seg_size
	.comm	STEDMA40_MAX_SEG_SIZE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_ste_dma40_ll.c_d40_seg_size.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	d40_seg_size, %function
d40_seg_size:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r5, r1
	mov	r4, r0
	mov	r1, r2
	mov	r0, r5
	mov	r6, r2
	bl	max
	mov	r3, r0
	mov	r1, r6
	mov	r0, r5
	mov	r5, r3
	bl	min
	ldr	r6, .L7
	mov	r1, r5
	ldr	r3, [r6]
	mul	r0, r3, r0
	bl	ALIGN
	ldr	r3, [r6]
	cmp	r3, r0
	sublt	r0, r0, r5
	cmp	r0, r4
	bge	.L4
	cmp	r4, r0, lsl #1
	popgt	{r4, r5, r6, pc}
	add	r4, r4, r4, lsr #31
	mov	r1, r5
	asr	r0, r4, #1
	pop	{r4, r5, r6, lr}
	b	ALIGN
.L4:
	mov	r0, r4
	pop	{r4, r5, r6, pc}
.L8:
	.align	2
.L7:
	.word	STEDMA40_MAX_SEG_SIZE
	.size	d40_seg_size, .-d40_seg_size
	.comm	STEDMA40_MAX_SEG_SIZE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
