	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function max_set_tone
_max_set_tone:                          ## @max_set_tone
	.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
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %rax
	movq	8(%rax), %r12
	movq	16(%r12), %r13
	movq	(%r12), %rcx
	movq	8(%r12), %rbx
	movl	(%rax), %r14d
	andl	$1, %r14d
	movq	(%r13), %rax
	movl	(%rax,%rcx,8), %r15d
	leaq	(%rax,%rcx,8), %rdi
	addq	$4, %rdi
	callq	_mutex_lock
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	leaq	(%r14,%r14,2), %rax
	movl	%ecx, (%rbx,%rax,4)
	decl	%r15d
	cmpl	$2, %r15d
	jae	LBB0_1
## %bb.2:
	movq	_old_quattro@GOTPCREL(%rip), %rdx
	cmpl	$0, (%rdx)
	movq	_SEC_TONE_ON@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	je	LBB0_4
## %bb.3:
	xorl	%edx, %edx
	cmpl	%ecx, %esi
	sete	%dl
	movl	4(%rbx,%rax,4), %eax
	movq	_SEC_VOLTAGE_18@GOTPCREL(%rip), %rcx
	xorl	%esi, %esi
	cmpl	(%rcx), %eax
	sete	%sil
	leal	(%rsi,%rdx,2), %esi
	jmp	LBB0_5
LBB0_1:
	movq	(%r12), %rsi
	movl	8(%rbx,%rax,4), %edx
	movq	%r13, %rdi
	callq	_lnb_set_tone
	jmp	LBB0_6
LBB0_4:
	xorl	%edx, %edx
	cmpl	%ecx, %esi
	sete	%dl
	movl	4(%rbx,%rax,4), %eax
	movq	_SEC_VOLTAGE_18@GOTPCREL(%rip), %rcx
	leal	2(%rdx), %esi
	cmpl	(%rcx), %eax
	cmovnel	%edx, %esi
LBB0_5:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_max_set_input_unlocked
LBB0_6:
	movl	%eax, %ebx
	movq	(%r13), %rax
	movq	(%r12), %rcx
	leaq	(%rax,%rcx,8), %rdi
	addq	$4, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.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
	.no_dead_strip	_max_set_tone
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function max_set_tone
_max_set_tone:                          ; @max_set_tone
	.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, x1
	mov	x20, x0
	ldr	x8, [x0]
	ldr	x22, [x8, #8]
	ldp	x24, x19, [x22, #8]
	ldr	w8, [x8]
	and	x23, x8, #0x1
	ldr	x8, [x19]
	ldr	x9, [x22]
	add	x0, x8, x9, lsl #3
	ldr	w25, [x0], #4
	bl	_mutex_lock
	mov	w8, #12
	mul	x8, x23, x8
	str	w21, [x24, x8]
	sub	w8, w25, #1
	cmp	w8, #2
	b.hs	LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _old_quattro@GOTPAGE
Lloh1:
	ldr	x8, [x8, _old_quattro@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x8]
Lloh3:
	adrp	x8, _SEC_TONE_ON@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SEC_TONE_ON@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w8, w21
	cset	w8, eq
	cbz	w9, LBB0_4
; %bb.2:
	mov	w9, #12
	madd	x9, x23, x9, x24
	ldr	w9, [x9, #4]
Lloh6:
	adrp	x10, _SEC_VOLTAGE_18@GOTPAGE
Lloh7:
	ldr	x10, [x10, _SEC_VOLTAGE_18@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	cmp	w9, w10
	cset	w1, eq
	bfi	w1, w8, #1, #1
	b	LBB0_5
LBB0_3:
	ldr	x1, [x22]
	mov	w8, #12
	madd	x8, x23, x8, x24
	ldr	w2, [x8, #8]
	mov	x0, x19
	mov	x3, x21
	bl	_lnb_set_tone
	b	LBB0_6
LBB0_4:
	mov	w9, #12
	madd	x9, x23, x9, x24
	ldr	w9, [x9, #4]
Lloh9:
	adrp	x10, _SEC_VOLTAGE_18@GOTPAGE
Lloh10:
	ldr	x10, [x10, _SEC_VOLTAGE_18@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	orr	w11, w8, #0x2
	cmp	w9, w10
	csel	w1, w11, w8, eq
LBB0_5:
	mov	x0, x20
	bl	_max_set_input_unlocked
LBB0_6:
	mov	x20, x0
	ldr	x8, [x19]
	ldr	x9, [x22]
	add	x8, x8, x9, lsl #3
	add	x0, x8, #4
	bl	_mutex_unlock
	mov	x0, x20
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.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
	.no_dead_strip	_max_set_tone
.subsections_via_symbols
