	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_best_delay
_get_best_delay:                        ## @get_best_delay
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rdi)
	movq	$0, 16(%rdi)
	testq	%rdx, %rdx
	je	LBB0_10
## %bb.1:
	movq	%rdx, %r12
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	xorl	%ebx, %ebx
	movl	$1, %r14d
	xorl	%r15d, %r15d
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	_PAD_DELAY_MAX@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jge	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_get_delay_len
	cmpl	%eax, %r13d
	cmovll	%ebx, %r15d
	cmovlel	%eax, %r13d
	testl	%eax, %eax
	movl	%eax, %ecx
	cmovel	%r14d, %ecx
	addl	%ecx, %ebx
	cmpl	$12, %eax
	jl	LBB0_2
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$3, %r15d
	jg	LBB0_2
LBB0_5:
	testl	%r15d, %r15d
	je	LBB0_6
## %bb.7:
	movl	%r13d, %eax
	shrl	$31, %eax
	addl	%r13d, %eax
	sarl	%eax
	addl	%r15d, %eax
	cltd
	movq	_PAD_DELAY_MAX@GOTPCREL(%rip), %rcx
	idivl	(%rcx)
	movslq	%edx, %r14
	jmp	LBB0_8
LBB0_10:
	movl	(%rsi), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%edx, %edx
	callq	_dev_err
	movl	$255, %r14d
	jmp	LBB0_9
LBB0_6:
	movslq	%r13d, %rax
	imulq	$1431655766, %rax, %rax         ## imm = 0x55555556
	movq	%rax, %rcx
	shrq	$63, %rcx
	shrq	$32, %rax
	addl	%ecx, %eax
                                        ## kill: def $eax killed $eax killed $rax
	cltd
	movq	_PAD_DELAY_MAX@GOTPCREL(%rip), %rcx
	idivl	(%rcx)
	movl	%edx, %r14d
LBB0_8:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdx
	movl	%r13d, %ecx
	movq	%r14, %r8
	callq	_dev_info
	movl	%r13d, (%rbx)
	movl	%r15d, 4(%rbx)
LBB0_9:
	movq	%r14, 8(%rbx)
	movq	%rbx, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"phase error: [map:%x]\n"

	.comm	_PAD_DELAY_MAX,4,2              ## @PAD_DELAY_MAX
L_.str.1:                               ## @.str.1
	.asciz	"phase: [map:%x] [maxlen:%d] [final:%d]\n"

	.no_dead_strip	_get_best_delay
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_best_delay
_get_best_delay:                        ; @get_best_delay
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x21, x0
	mov	x19, x8
	stp	xzr, xzr, [x8]
	str	xzr, [x8, #16]
	cbz	x1, LBB0_7
; %bb.1:
	mov	x20, x1
	mov	w23, #0
	mov	w24, #0
	mov	w22, #0
Lloh0:
	adrp	x25, _PAD_DELAY_MAX@GOTPAGE
Lloh1:
	ldr	x25, [x25, _PAD_DELAY_MAX@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x25]
	cmp	w23, w8
	b.ge	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x20
	mov	x1, x23
	bl	_get_delay_len
	cmp	w22, w0
	csel	w24, w23, w24, lt
	csel	w22, w22, w0, gt
	cmp	w0, #0
	csinc	w8, w0, wzr, ne
	add	w23, w8, w23
	cmp	w0, #12
	b.lt	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	cmp	w24, #3
	b.gt	LBB0_2
LBB0_5:
	cbz	w24, LBB0_8
; %bb.6:
	cmp	w22, #0
	cinc	w8, w22, lt
	add	w8, w24, w8, asr #1
	ldr	w9, [x25]
	sdiv	w10, w8, w9
	msub	w8, w10, w9, w8
	sxtw	x23, w8
	b	LBB0_9
LBB0_7:
	ldr	w0, [x21]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, #0
	bl	_dev_err
	mov	w23, #255
	b	LBB0_10
LBB0_8:
	mov	w8, #21846
	movk	w8, #21845, lsl #16
	smull	x8, w22, w8
	lsr	x9, x8, #63
	lsr	x8, x8, #32
	add	w8, w8, w9
	ldr	w9, [x25]
	sdiv	w10, w8, w9
	msub	w23, w10, w9, w8
LBB0_9:
	ldr	w0, [x21]
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x20
	mov	x3, x22
	mov	x4, x23
	bl	_dev_info
	stp	w22, w24, [x19]
LBB0_10:
	str	x23, [x19, #8]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"phase error: [map:%x]\n"

	.comm	_PAD_DELAY_MAX,4,2              ; @PAD_DELAY_MAX
l_.str.1:                               ; @.str.1
	.asciz	"phase: [map:%x] [maxlen:%d] [final:%d]\n"

	.no_dead_strip	_get_best_delay
.subsections_via_symbols
