	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function d40_seg_size
_d40_seg_size:                          ## @d40_seg_size
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movl	%esi, %ebx
	movl	%edi, %r15d
	movl	%esi, %edi
	movl	%edx, %esi
	callq	_max
	movl	%eax, %r14d
	movl	%ebx, %edi
	movl	%r12d, %esi
	callq	_min
	movq	_STEDMA40_MAX_SEG_SIZE@GOTPCREL(%rip), %rbx
	imull	(%rbx), %eax
	movl	%eax, %edi
	movl	%r14d, %esi
	callq	_ALIGN
                                        ## kill: def $eax killed $eax def $rax
	xorl	%ecx, %ecx
	cmpl	(%rbx), %eax
	cmovgl	%r14d, %ecx
	subl	%ecx, %eax
	cmpl	%r15d, %eax
	jge	LBB0_1
## %bb.2:
	leal	(%rax,%rax), %ecx
	cmpl	%r15d, %ecx
	jl	LBB0_3
## %bb.4:
	movl	%r15d, %edi
	shrl	$31, %edi
	addl	%r15d, %edi
	sarl	%edi
	movl	%r14d, %esi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ALIGN                          ## TAILCALL
LBB0_1:
	movl	%r15d, %eax
LBB0_3:
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_STEDMA40_MAX_SEG_SIZE,4,2      ## @STEDMA40_MAX_SEG_SIZE
	.no_dead_strip	_d40_seg_size
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function d40_seg_size
_d40_seg_size:                          ; @d40_seg_size
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
	mov	x0, x1
	mov	x1, x2
	bl	_max
	mov	x20, x0
	mov	x0, x22
	mov	x1, x21
	bl	_min
Lloh0:
	adrp	x21, _STEDMA40_MAX_SEG_SIZE@GOTPAGE
Lloh1:
	ldr	x21, [x21, _STEDMA40_MAX_SEG_SIZE@GOTPAGEOFF]
	ldr	w8, [x21]
	mul	w0, w8, w0
	mov	x1, x20
	bl	_ALIGN
	ldr	w8, [x21]
	cmp	w0, w8
	csel	w8, w20, wzr, gt
	sub	w0, w0, w8
	cmp	w0, w19
	b.ge	LBB0_3
; %bb.1:
	cmp	w19, w0, lsl #1
	b.gt	LBB0_4
; %bb.2:
	cmp	w19, #0
	cinc	w8, w19, lt
	asr	w0, w8, #1
	mov	x1, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_ALIGN
LBB0_3:
	mov	x0, x19
LBB0_4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_STEDMA40_MAX_SEG_SIZE,4,2      ; @STEDMA40_MAX_SEG_SIZE
	.no_dead_strip	_d40_seg_size
.subsections_via_symbols
