	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function max_set_voltage
_max_set_voltage:                       ## @max_set_voltage
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %r13
	movq	8(%r13), %r14
	movq	16(%r14), %r15
	movq	(%r14), %rax
	movq	8(%r14), %rcx
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	movl	(%r13), %ebx
	andl	$1, %ebx
	movq	(%r15), %rcx
	leaq	(%rax,%rax,2), %rax
	movl	(%rcx,%rax,8), %edx
	movl	%edx, -68(%rbp)                 ## 4-byte Spill
	movl	4(%rcx,%rax,8), %r12d
	leaq	(%rcx,%rax,8), %rdi
	addq	$16, %rdi
	callq	_mutex_lock
	movq	-80(%rbp), %r9                  ## 8-byte Reload
	movq	%r12, %rdi
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	leaq	(%rbx,%rbx,2), %r12
	movl	%r8d, (%r9,%r12,8)
	leal	-1(%rdi), %eax
	cmpl	$2, %eax
	jae	LBB0_1
## %bb.7:
	movb	(%r13), %cl
	movl	$1, %r13d
	shlq	%cl, %r13
	movq	_SEC_VOLTAGE_OFF@GOTPCREL(%rip), %rcx
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	(%r15), %rax
	movq	%rcx, %r15
	movq	(%r14), %rcx
	leaq	(%rcx,%rcx,2), %rcx
	movl	(%rax,%rcx,8), %edx
	movl	%edx, %esi
	orl	%r13d, %esi
	notl	%r13d
	andl	%edx, %r13d
	cmpl	%r8d, (%r15)
	cmovnel	%esi, %r13d
	movl	%r13d, (%rax,%rcx,8)
	movq	_old_quattro@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	movl	16(%r9,%r12,8), %eax
	movq	_SEC_TONE_ON@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	%r14, %rbx
	movq	%rdi, %r12
	je	LBB0_9
## %bb.8:
	xorl	%edx, %edx
	cmpl	%ecx, %eax
	sete	%dl
	movq	_SEC_VOLTAGE_18@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	cmpl	%r8d, (%rax)
	sete	%cl
	leal	(%rcx,%rdx,2), %esi
	jmp	LBB0_10
LBB0_1:
	movq	%r14, %rbx
	cmpl	$3, %edi
	jne	LBB0_3
## %bb.2:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	xorl	%esi, %esi
	movq	%r9, %r14
	callq	_max_set_input_unlocked
	movq	%r14, %r9
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
LBB0_3:
	movb	(%r13), %cl
	movl	$1, %eax
	shlq	%cl, %rax
	movq	_SEC_VOLTAGE_OFF@GOTPCREL(%rip), %rcx
	cmpl	%r8d, (%rcx)
	jne	LBB0_5
## %bb.4:
	notq	%rax
	movq	%r15, %r13
	movq	(%r15), %rcx
	movq	(%rbx), %rsi
	leaq	(%rsi,%rsi,2), %rdx
	movq	8(%rcx,%rdx,8), %rcx
	movq	8(%r9,%r12,8), %rdx
	andq	%rax, (%rcx,%rdx,8)
	jmp	LBB0_6
LBB0_5:
	movq	%r15, %r13
	movq	(%r15), %rcx
	movq	(%rbx), %rsi
	leaq	(%rsi,%rsi,2), %rdx
	movq	8(%rcx,%rdx,8), %rcx
	movq	8(%r9,%r12,8), %rdx
	orq	%rax, (%rcx,%rdx,8)
LBB0_6:
	movq	%r13, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	movl	%r8d, %ecx
	callq	_lnb_set_voltage
	movl	%eax, %r14d
	jmp	LBB0_19
LBB0_9:
	xorl	%edx, %edx
	cmpl	%ecx, %eax
	sete	%dl
	movq	_SEC_VOLTAGE_18@GOTPCREL(%rip), %rax
	leal	2(%rdx), %esi
	cmpl	%r8d, (%rax)
	cmovnel	%edx, %esi
LBB0_10:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_max_set_input_unlocked
	movl	%eax, %r14d
	cmpl	-68(%rbp), %r13d                ## 4-byte Folded Reload
	jne	LBB0_12
## %bb.11:
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	jmp	LBB0_19
LBB0_12:
	movq	(%rbx), %rsi
	testl	%r13d, %r13d
	je	LBB0_16
## %bb.13:
	movq	%rbx, %r15
	movq	_SEC_VOLTAGE_13@GOTPCREL(%rip), %rbx
	movl	(%rbx), %ecx
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rdi
	xorl	%edx, %edx
	callq	_lnb_set_voltage
	cmpl	$1, %r12d
	jne	LBB0_14
## %bb.15:
	movq	%r15, %r12
	movq	(%r15), %rsi
	movl	(%rbx), %ecx
	movq	%r13, %rdi
	xorl	%edx, %edx
	callq	_lnb_set_voltage
	movq	_old_quattro@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	movq	_SEC_VOLTAGE_18@GOTPCREL(%rip), %r15
	movq	%r15, %rax
	cmoveq	%rbx, %rax
	movq	(%r12), %rsi
	movl	(%rax), %ecx
	cmoveq	%r15, %rbx
	movq	%r13, %rdi
	movl	$1, %edx
	callq	_lnb_set_voltage
	movq	(%r12), %rsi
	movl	(%rbx), %ecx
	movq	%r12, %rbx
	movq	%r13, %rdi
	movl	$2, %edx
	callq	_lnb_set_voltage
	movq	(%r12), %rsi
	jmp	LBB0_18
LBB0_16:
	movl	(%r15), %ecx
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rdi
	xorl	%edx, %edx
	callq	_lnb_set_voltage
	cmpl	$1, %r12d
	jne	LBB0_19
## %bb.17:
	movq	(%rbx), %rsi
	movl	(%r15), %ecx
	movq	%r13, %rdi
	movl	$1, %edx
	callq	_lnb_set_voltage
	movq	(%rbx), %rsi
	movl	(%r15), %ecx
	movq	%r13, %rdi
	movl	$2, %edx
	callq	_lnb_set_voltage
	movq	(%rbx), %rsi
LBB0_18:
	movl	(%r15), %ecx
	movq	%r13, %rdi
	movl	$3, %edx
	callq	_lnb_set_voltage
	jmp	LBB0_19
LBB0_14:
	movq	%r15, %rbx
LBB0_19:
	movq	(%r13), %rax
	movq	(%rbx), %rcx
	leaq	(%rcx,%rcx,2), %rcx
	leaq	(%rax,%rcx,8), %rdi
	addq	$16, %rdi
	callq	_mutex_unlock
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SEC_VOLTAGE_OFF,4,2            ## @SEC_VOLTAGE_OFF
	.comm	_old_quattro,4,2                ## @old_quattro
	.comm	_SEC_TONE_ON,4,2                ## @SEC_TONE_ON
	.comm	_SEC_VOLTAGE_18,4,2             ## @SEC_VOLTAGE_18
	.comm	_SEC_VOLTAGE_13,4,2             ## @SEC_VOLTAGE_13
	.no_dead_strip	_max_set_voltage
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function max_set_voltage
_max_set_voltage:                       ; @max_set_voltage
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x1
	mov	x21, x0
	ldr	x24, [x0]
	ldr	x22, [x24, #8]
	ldp	x26, x19, [x22, #8]
	ldr	w8, [x24]
	and	x25, x8, #0x1
	ldr	x8, [x19]
	ldr	x9, [x22]
	mov	w28, #24
	madd	x8, x9, x28, x8
	ldp	w27, w23, [x8]
	add	x0, x8, #16
	bl	_mutex_lock
	mul	x8, x25, x28
	str	w20, [x26, x8]
	sub	w8, w23, #1
	cmp	w8, #2
	b.hs	LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _SEC_VOLTAGE_OFF@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SEC_VOLTAGE_OFF@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	w9, [x24]
	mov	w10, #1
	lsl	x9, x10, x9
	ldr	x10, [x19]
	ldr	x11, [x22]
	mov	w12, #24
	mul	x11, x11, x12
	ldr	w13, [x10, x11]
	orr	w14, w13, w9
	bic	w9, w13, w9
	cmp	w8, w20
	csel	w24, w9, w14, eq
	str	w24, [x10, x11]
Lloh3:
	adrp	x28, _old_quattro@GOTPAGE
Lloh4:
	ldr	x28, [x28, _old_quattro@GOTPAGEOFF]
	ldr	w10, [x28]
	madd	x8, x25, x12, x26
	ldr	w8, [x8, #16]
Lloh5:
	adrp	x9, _SEC_TONE_ON@GOTPAGE
Lloh6:
	ldr	x9, [x9, _SEC_TONE_ON@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	cmp	w8, w9
	cset	w8, eq
Lloh8:
	adrp	x9, _SEC_VOLTAGE_18@GOTPAGE
Lloh9:
	ldr	x9, [x9, _SEC_VOLTAGE_18@GOTPAGEOFF]
	cbz	w10, LBB0_9
; %bb.2:
	ldr	w9, [x9]
	cmp	w9, w20
	cset	w1, eq
	bfi	w1, w8, #1, #1
	b	LBB0_10
LBB0_3:
	cmp	w23, #3
	b.ne	LBB0_5
; %bb.4:
	mov	x0, x21
	mov	w1, #0
	bl	_max_set_input_unlocked
LBB0_5:
Lloh10:
	adrp	x8, _SEC_VOLTAGE_OFF@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SEC_VOLTAGE_OFF@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x8]
	ldr	w8, [x24]
	mov	w10, #1
	lsl	x8, x10, x8
	cmp	w9, w20
	b.ne	LBB0_7
; %bb.6:
	ldr	x9, [x19]
	ldr	x1, [x22]
	mov	w10, #24
	madd	x9, x1, x10, x9
	ldr	x9, [x9, #8]
	madd	x10, x25, x10, x26
	ldr	x2, [x10, #8]
	lsl	x10, x2, #3
	ldr	x11, [x9, x10]
	bic	x8, x11, x8
	b	LBB0_8
LBB0_7:
	ldr	x9, [x19]
	ldr	x1, [x22]
	mov	w10, #24
	madd	x9, x1, x10, x9
	ldr	x9, [x9, #8]
	madd	x10, x25, x10, x26
	ldr	x2, [x10, #8]
	lsl	x10, x2, #3
	ldr	x11, [x9, x10]
	orr	x8, x11, x8
LBB0_8:
	str	x8, [x9, x10]
	mov	x0, x19
                                        ; kill: def $w2 killed $w2 killed $x2
	mov	x3, x20
	bl	_lnb_set_voltage
	mov	x20, x0
	b	LBB0_17
LBB0_9:
	ldr	w9, [x9]
	orr	w10, w8, #0x2
	cmp	w9, w20
	csel	w1, w10, w8, eq
LBB0_10:
	mov	x0, x21
	bl	_max_set_input_unlocked
	mov	x20, x0
	cmp	w24, w27
	b.eq	LBB0_17
; %bb.11:
	ldr	x1, [x22]
	cbz	w24, LBB0_14
; %bb.12:
Lloh13:
	adrp	x21, _SEC_VOLTAGE_13@GOTPAGE
Lloh14:
	ldr	x21, [x21, _SEC_VOLTAGE_13@GOTPAGEOFF]
	ldr	w3, [x21]
	mov	x0, x19
	mov	w2, #0
	bl	_lnb_set_voltage
	cmp	w23, #1
	b.ne	LBB0_17
; %bb.13:
	ldr	x1, [x22]
	ldr	w3, [x21]
	mov	x0, x19
	mov	w2, #0
	bl	_lnb_set_voltage
	ldr	w8, [x28]
	ldr	x1, [x22]
Lloh15:
	adrp	x23, _SEC_VOLTAGE_18@GOTPAGE
Lloh16:
	ldr	x23, [x23, _SEC_VOLTAGE_18@GOTPAGEOFF]
	cmp	w8, #0
	csel	x8, x21, x23, eq
	ldr	w3, [x8]
	csel	x21, x23, x21, eq
	mov	x0, x19
	mov	w2, #1
	bl	_lnb_set_voltage
	ldr	x1, [x22]
	ldr	w3, [x21]
	mov	x0, x19
	mov	w2, #2
	bl	_lnb_set_voltage
	ldr	x1, [x22]
	ldr	w3, [x23]
	b	LBB0_16
LBB0_14:
Lloh17:
	adrp	x21, _SEC_VOLTAGE_OFF@GOTPAGE
Lloh18:
	ldr	x21, [x21, _SEC_VOLTAGE_OFF@GOTPAGEOFF]
	ldr	w3, [x21]
	mov	x0, x19
	mov	w2, #0
	bl	_lnb_set_voltage
	cmp	w23, #1
	b.ne	LBB0_17
; %bb.15:
	ldr	x1, [x22]
	ldr	w3, [x21]
	mov	x0, x19
	mov	w2, #1
	bl	_lnb_set_voltage
	ldr	x1, [x22]
	ldr	w3, [x21]
	mov	x0, x19
	mov	w2, #2
	bl	_lnb_set_voltage
	ldr	x1, [x22]
	ldr	w3, [x21]
LBB0_16:
	mov	x0, x19
	mov	w2, #3
	bl	_lnb_set_voltage
LBB0_17:
	ldr	x8, [x19]
	ldr	x9, [x22]
	mov	w10, #24
	madd	x8, x9, x10, x8
	add	x0, x8, #16
	bl	_mutex_unlock
	mov	x0, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_SEC_VOLTAGE_OFF,4,2            ; @SEC_VOLTAGE_OFF
	.comm	_old_quattro,4,2                ; @old_quattro
	.comm	_SEC_TONE_ON,4,2                ; @SEC_TONE_ON
	.comm	_SEC_VOLTAGE_18,4,2             ; @SEC_VOLTAGE_18
	.comm	_SEC_VOLTAGE_13,4,2             ; @SEC_VOLTAGE_13
	.no_dead_strip	_max_set_voltage
.subsections_via_symbols
