	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function find_max_drive_settings
_find_max_drive_settings:               ## @find_max_drive_settings
	.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
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	(%rdi), %r9
	movq	8(%rdi), %rsi
	movq	(%r9), %rcx
	movq	8(%r9), %rax
	cmpq	$2, %rsi
	jb	LBB0_7
## %bb.1:
	leaq	-1(%rsi), %r8
	cmpq	$2, %rsi
	jne	LBB0_3
## %bb.2:
	movl	$1, %esi
	jmp	LBB0_5
LBB0_3:
	leaq	40(%r9), %rbx
	movq	%r8, %rdi
	andq	$-2, %rdi
	negq	%rdi
	movl	$1, %esi
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	-24(%rbx), %rdx
	cmpq	%rcx, %rdx
	cmovgq	%rdx, %rcx
	movq	-16(%rbx), %rdx
	cmpq	%rax, %rdx
	cmovgq	%rdx, %rax
	movq	-8(%rbx), %rdx
	cmpq	%rcx, %rdx
	cmovgq	%rdx, %rcx
	movq	(%rbx), %rdx
	cmpq	%rax, %rdx
	cmovgq	%rdx, %rax
	addq	$32, %rbx
	leaq	(%rdi,%rsi), %rdx
	addq	$2, %rdx
	addq	$2, %rsi
	cmpq	$1, %rdx
	jne	LBB0_4
LBB0_5:
	testb	$1, %r8b
	je	LBB0_7
## %bb.6:
	shlq	$4, %rsi
	movq	(%r9,%rsi), %rdx
	cmpq	%rcx, %rdx
	cmovgq	%rdx, %rcx
	movq	8(%r9,%rsi), %rdx
	cmpq	%rax, %rdx
	cmovgq	%rdx, %rax
LBB0_7:
	movq	_VOLTAGE_SWING_MAX_LEVEL@GOTPCREL(%rip), %rdx
	movq	(%rdx), %r12
	cmpq	%r12, %rcx
	cmovlq	%rcx, %r12
	movq	_PRE_EMPHASIS_MAX_LEVEL@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rbx
	cmpq	%rbx, %rax
	cmovlq	%rax, %rbx
	movq	%r12, %rdi
	callq	_get_max_pre_emphasis_for_voltage_swing
	cmpq	%rax, %rbx
	jle	LBB0_9
## %bb.8:
	movq	%r12, %rdi
	callq	_get_max_pre_emphasis_for_voltage_swing
	movq	%rax, %rbx
LBB0_9:
	movl	20(%r15), %eax
	movl	%eax, 20(%r14)
	movq	8(%r15), %rax
	movq	%rax, 8(%r14)
	movl	16(%r15), %eax
	movl	%eax, 16(%r14)
	movq	8(%r15), %rcx
	testq	%rcx, %rcx
	je	LBB0_16
## %bb.10:
	movq	(%r14), %rax
	cmpq	$1, %rcx
	jne	LBB0_12
## %bb.11:
	xorl	%edx, %edx
	jmp	LBB0_14
LBB0_12:
	movq	%rcx, %rsi
	andq	$-2, %rsi
	leaq	24(%rax), %rdi
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movq	%r12, -24(%rdi)
	movq	%rbx, -16(%rdi)
	movq	%r12, -8(%rdi)
	movq	%rbx, (%rdi)
	addq	$2, %rdx
	addq	$32, %rdi
	cmpq	%rdx, %rsi
	jne	LBB0_13
LBB0_14:
	testb	$1, %cl
	je	LBB0_16
## %bb.15:
	shlq	$4, %rdx
	movq	%r12, (%rax,%rdx)
	movq	%rbx, 8(%rax,%rdx)
LBB0_16:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VOLTAGE_SWING_MAX_LEVEL,8,3    ## @VOLTAGE_SWING_MAX_LEVEL
	.comm	_PRE_EMPHASIS_MAX_LEVEL,8,3     ## @PRE_EMPHASIS_MAX_LEVEL
	.no_dead_strip	_find_max_drive_settings
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function find_max_drive_settings
_find_max_drive_settings:               ; @find_max_drive_settings
	.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	x19, x1
	mov	x20, x0
	ldp	x8, x9, [x0]
	ldp	x14, x13, [x8]
	cmp	x9, #2
	b.lo	LBB0_8
; %bb.1:
	sub	x11, x9, #1
	cmp	x11, #8
	b.hs	LBB0_3
; %bb.2:
	mov	w10, #1
	b	LBB0_6
LBB0_3:
	and	x12, x11, #0xfffffffffffffff8
	orr	x10, x12, #0x1
	dup.2d	v0, x14
	add	x14, x8, #80
	mov	x15, x12
	mov.16b	v3, v0
	mov.16b	v2, v0
	dup.2d	v4, x13
	mov.16b	v1, v0
	mov.16b	v7, v4
	mov.16b	v6, v4
	mov.16b	v5, v4
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	sub	x13, x14, #64
	ld2.2d	{ v16, v17 }, [x13]
	sub	x13, x14, #32
	ld2.2d	{ v18, v19 }, [x13]
	mov	x13, x14
	ld2.2d	{ v20, v21 }, [x13], #32
	ld2.2d	{ v22, v23 }, [x13]
	cmgt.2d	v24, v16, v0
	bit.16b	v0, v16, v24
	cmgt.2d	v24, v18, v3
	bit.16b	v3, v18, v24
	cmgt.2d	v24, v20, v2
	bit.16b	v2, v20, v24
	cmgt.2d	v24, v22, v1
	bit.16b	v1, v22, v24
	cmgt.2d	v24, v17, v4
	bit.16b	v4, v17, v24
	cmgt.2d	v16, v19, v7
	bit.16b	v7, v19, v16
	cmgt.2d	v16, v21, v6
	bit.16b	v6, v21, v16
	cmgt.2d	v16, v23, v5
	bit.16b	v5, v23, v16
	add	x14, x14, #128
	subs	x15, x15, #8
	b.ne	LBB0_4
; %bb.5:
	cmgt.2d	v16, v4, v7
	bif.16b	v4, v7, v16
	cmgt.2d	v7, v4, v6
	bif.16b	v4, v6, v7
	cmgt.2d	v6, v4, v5
	bif.16b	v4, v5, v6
	ext.16b	v5, v4, v4, #8
	cmgt	d6, d4, d5
	bif.8b	v4, v5, v6
	fmov	x13, d4
	cmgt.2d	v4, v0, v3
	bif.16b	v0, v3, v4
	cmgt.2d	v3, v0, v2
	bif.16b	v0, v2, v3
	cmgt.2d	v2, v0, v1
	bif.16b	v0, v1, v2
	ext.16b	v1, v0, v0, #8
	cmgt	d2, d0, d1
	bif.8b	v0, v1, v2
	fmov	x14, d0
	cmp	x11, x12
	b.eq	LBB0_8
LBB0_6:
	sub	x9, x9, x10
	add	x8, x8, x10, lsl #4
	add	x8, x8, #8
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldur	x10, [x8, #-8]
	cmp	x10, x14
	csel	x14, x10, x14, gt
	ldr	x10, [x8], #16
	cmp	x10, x13
	csel	x13, x10, x13, gt
	subs	x9, x9, #1
	b.ne	LBB0_7
LBB0_8:
Lloh0:
	adrp	x8, _VOLTAGE_SWING_MAX_LEVEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VOLTAGE_SWING_MAX_LEVEL@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x14, x8
	csel	x21, x14, x8, lt
Lloh3:
	adrp	x8, _PRE_EMPHASIS_MAX_LEVEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PRE_EMPHASIS_MAX_LEVEL@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x13, x8
	csel	x22, x13, x8, lt
	mov	x0, x21
	bl	_get_max_pre_emphasis_for_voltage_swing
	cmp	x22, x0
	b.le	LBB0_10
; %bb.9:
	mov	x0, x21
	bl	_get_max_pre_emphasis_for_voltage_swing
	mov	x22, x0
LBB0_10:
	ldr	x8, [x20, #8]
	str	x8, [x19, #8]
	ldr	d0, [x20, #16]
	str	d0, [x19, #16]
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_18
; %bb.11:
	ldr	x9, [x19]
	cmp	x8, #8
	b.hs	LBB0_13
; %bb.12:
	mov	x10, #0
	b	LBB0_16
LBB0_13:
	and	x10, x8, #0xfffffffffffffff8
	dup.2d	v0, x21
	dup.2d	v1, x22
	add	x12, x9, #64
	mov	x11, x10
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	sub	x13, x12, #64
	st2.2d	{ v0, v1 }, [x13]
	sub	x13, x12, #32
	st2.2d	{ v0, v1 }, [x13]
	add	x13, x12, #128
	st2.2d	{ v0, v1 }, [x12], #32
	st2.2d	{ v0, v1 }, [x12]
	mov	x12, x13
	subs	x11, x11, #8
	b.ne	LBB0_14
; %bb.15:
	cmp	x8, x10
	b.eq	LBB0_18
LBB0_16:
	sub	x8, x8, x10
	add	x9, x9, x10, lsl #4
	add	x9, x9, #8
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	stp	x21, x22, [x9, #-8]
	add	x9, x9, #16
	subs	x8, x8, #1
	b.ne	LBB0_17
LBB0_18:
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_VOLTAGE_SWING_MAX_LEVEL,8,3    ; @VOLTAGE_SWING_MAX_LEVEL
	.comm	_PRE_EMPHASIS_MAX_LEVEL,8,3     ; @PRE_EMPHASIS_MAX_LEVEL
	.no_dead_strip	_find_max_drive_settings
.subsections_via_symbols
