	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function max14577_muic_adc_handler
_max14577_muic_adc_handler:             ## @max14577_muic_adc_handler
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	_MAX14577_CABLE_GROUP_ADC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %rdx
	callq	_max14577_muic_get_cable_type
	movl	%eax, %ebx
	movl	%eax, %r14d
	cmpl	$0, -44(%rbp)
	leaq	L_.str.2(%rip), %r13
	leaq	L_.str.1(%rip), %r15
	movq	%r15, %rdx
	cmoveq	%r13, %rdx
	movl	(%r12), %edi
	movl	4(%r12), %r8d
	leaq	L_.str(%rip), %rsi
	movl	%eax, %ecx
	callq	_dev_dbg
	leal	-128(%rbx), %eax
	cmpl	$22, %eax
	jb	LBB0_4
## %bb.1:
	addl	$-150, %ebx
	cmpl	$8, %ebx
	ja	LBB0_5
## %bb.2:
	movl	$500, %eax                      ## imm = 0x1F4
	btl	%ebx, %eax
	jae	LBB0_3
LBB0_4:
	movl	(%r12), %edi
	cmpl	$0, -44(%rbp)
	cmoveq	%r13, %r15
	leaq	L_.str.3(%rip), %rsi
	movq	%r15, %rdx
	movl	%r14d, %ecx
	callq	_dev_info
	movq	_EAGAIN@GOTPCREL(%rip), %rcx
LBB0_6:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movl	-44(%rbp), %edx
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_max14577_muic_jig_handler
	movl	%eax, %ecx
	sarl	$31, %eax
	andl	%ecx, %eax
	jmp	LBB0_7
LBB0_5:
	movl	(%r12), %edi
	cmpl	$0, -44(%rbp)
	cmoveq	%r13, %r15
	leaq	L_.str.4(%rip), %rsi
	movq	%r15, %rdx
	movl	%r14d, %ecx
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX14577_CABLE_GROUP_ADC,4,2   ## @MAX14577_CABLE_GROUP_ADC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"external connector is %s (adc:0x%02x, prev_adc:0x%x)\n"

L_.str.1:                               ## @.str.1
	.asciz	"attached"

L_.str.2:                               ## @.str.2
	.asciz	"detached"

L_.str.3:                               ## @.str.3
	.asciz	"accessory is %s but it isn't used (adc:0x%x)\n"

	.comm	_EAGAIN,4,2                     ## @EAGAIN
L_.str.4:                               ## @.str.4
	.asciz	"failed to detect %s accessory (adc:0x%x)\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_max14577_muic_adc_handler
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function max14577_muic_adc_handler
_max14577_muic_adc_handler:             ; @max14577_muic_adc_handler
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, x0
Lloh0:
	adrp	x8, _MAX14577_CABLE_GROUP_ADC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX14577_CABLE_GROUP_ADC@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_max14577_muic_get_cable_type
	mov	x19, x0
	ldr	w8, [sp, #12]
Lloh3:
	adrp	x21, l_.str.1@PAGE
Lloh4:
	add	x21, x21, l_.str.1@PAGEOFF
Lloh5:
	adrp	x22, l_.str.2@PAGE
Lloh6:
	add	x22, x22, l_.str.2@PAGEOFF
	cmp	w8, #0
	csel	x2, x22, x21, eq
	ldp	w0, w4, [x20]
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	x3, x19
	bl	_dev_dbg
	sub	w8, w19, #128
	cmp	w8, #22
	b.lo	LBB0_3
; %bb.1:
	sub	w8, w19, #150
	cmp	w8, #8
	b.hi	LBB0_7
; %bb.2:
	mov	w9, #1
	lsl	w8, w9, w8
	mov	w9, #500
	tst	w8, w9
	b.eq	LBB0_6
LBB0_3:
	ldr	w0, [x20]
	ldr	w8, [sp, #12]
	cmp	w8, #0
	csel	x2, x22, x21, eq
Lloh9:
	adrp	x1, l_.str.3@PAGE
Lloh10:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x3, x19
	bl	_dev_info
Lloh11:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_6:
	ldr	w2, [sp, #12]
	mov	x0, x20
	mov	x1, x19
	bl	_max14577_muic_jig_handler
	cmp	w0, #0
	csel	w0, w0, wzr, lt
	b	LBB0_5
LBB0_7:
	ldr	w0, [x20]
	ldr	w8, [sp, #12]
	cmp	w8, #0
	csel	x2, x22, x21, eq
Lloh13:
	adrp	x1, l_.str.4@PAGE
Lloh14:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x3, x19
	bl	_dev_err
Lloh15:
	adrp	x8, _EINVAL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_4
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX14577_CABLE_GROUP_ADC,4,2   ; @MAX14577_CABLE_GROUP_ADC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"external connector is %s (adc:0x%02x, prev_adc:0x%x)\n"

l_.str.1:                               ; @.str.1
	.asciz	"attached"

l_.str.2:                               ; @.str.2
	.asciz	"detached"

l_.str.3:                               ; @.str.3
	.asciz	"accessory is %s but it isn't used (adc:0x%x)\n"

	.comm	_EAGAIN,4,2                     ; @EAGAIN
l_.str.4:                               ; @.str.4
	.asciz	"failed to detect %s accessory (adc:0x%x)\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_max14577_muic_adc_handler
.subsections_via_symbols
