	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function max77843_muic_adc_gnd_handler
_max77843_muic_adc_gnd_handler:         ## @max77843_muic_adc_gnd_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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	_MAX77843_CABLE_GROUP_ADC_GND@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-36(%rbp), %rdx
	callq	_max77843_muic_get_cable_type
	movl	%eax, %ebx
	movl	(%r15), %edi
	cmpl	$0, -36(%rbp)
	leaq	L_.str.2(%rip), %r12
	leaq	L_.str.1(%rip), %r14
	movq	%r14, %rdx
	cmoveq	%r12, %rdx
	leaq	L_.str(%rip), %rsi
	movl	%eax, %ecx
	callq	_dev_dbg
	leal	-130(%rbx), %eax
	cmpl	$2, %eax
	jb	LBB0_4
## %bb.1:
	leal	-128(%rbx), %eax
	cmpl	$1, %eax
	ja	LBB0_6
## %bb.2:
	movq	_MAX77843_MUIC_CONTROL1_SW_USB@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-36(%rbp), %edx
	xorl	%r14d, %r14d
	movq	%r15, %rdi
	xorl	%ecx, %ecx
	callq	_max77843_muic_set_path
	testl	%eax, %eax
	js	LBB0_8
## %bb.3:
	movl	4(%r15), %edi
	movq	_EXTCON_USB_HOST@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-36(%rbp), %edx
	callq	_extcon_set_state_sync
	movl	-36(%rbp), %esi
	movq	%r15, %rdi
	callq	_max77843_charger_set_otg_vbus
	jmp	LBB0_9
LBB0_4:
	movq	_MAX77843_MUIC_CONTROL1_SW_OPEN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-36(%rbp), %edx
	xorl	%r14d, %r14d
	movq	%r15, %rdi
	xorl	%ecx, %ecx
	callq	_max77843_muic_set_path
	testl	%eax, %eax
	js	LBB0_8
## %bb.5:
	movl	4(%r15), %edi
	movq	_EXTCON_DISP_MHL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-36(%rbp), %edx
	callq	_extcon_set_state_sync
	jmp	LBB0_9
LBB0_8:
	movl	%eax, %r14d
	jmp	LBB0_9
LBB0_6:
	movl	(%r15), %edi
	cmpl	$0, -36(%rbp)
	cmoveq	%r12, %r14
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdx
	movl	%ebx, %ecx
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_9:
	movl	%r14d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX77843_CABLE_GROUP_ADC_GND,4,2 ## @MAX77843_CABLE_GROUP_ADC_GND
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"external connector is %s (gnd:0x%02x)\n"

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

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

	.comm	_MAX77843_MUIC_CONTROL1_SW_USB,4,2 ## @MAX77843_MUIC_CONTROL1_SW_USB
	.comm	_EXTCON_USB_HOST,4,2            ## @EXTCON_USB_HOST
	.comm	_MAX77843_MUIC_CONTROL1_SW_OPEN,4,2 ## @MAX77843_MUIC_CONTROL1_SW_OPEN
	.comm	_EXTCON_DISP_MHL,4,2            ## @EXTCON_DISP_MHL
L_.str.3:                               ## @.str.3
	.asciz	"failed to detect %s accessory(gnd:0x%x)\n"

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

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function max77843_muic_adc_gnd_handler
_max77843_muic_adc_gnd_handler:         ; @max77843_muic_adc_gnd_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	x19, x0
Lloh0:
	adrp	x8, _MAX77843_CABLE_GROUP_ADC_GND@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX77843_CABLE_GROUP_ADC_GND@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_max77843_muic_get_cable_type
	mov	x20, x0
	ldr	w0, [x19]
	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
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	x3, x20
	bl	_dev_dbg
	sub	w8, w20, #130
	cmp	w8, #2
	b.lo	LBB0_4
; %bb.1:
	sub	w8, w20, #128
	cmp	w8, #1
	b.hi	LBB0_6
; %bb.2:
Lloh9:
	adrp	x8, _MAX77843_MUIC_CONTROL1_SW_USB@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MAX77843_MUIC_CONTROL1_SW_USB@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	ldr	w2, [sp, #12]
	mov	x0, x19
	mov	w3, #0
	bl	_max77843_muic_set_path
	tbnz	w0, #31, LBB0_7
; %bb.3:
	ldr	w0, [x19, #4]
Lloh12:
	adrp	x8, _EXTCON_USB_HOST@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EXTCON_USB_HOST@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	ldr	w2, [sp, #12]
	bl	_extcon_set_state_sync
	ldr	w1, [sp, #12]
	mov	x0, x19
	bl	_max77843_charger_set_otg_vbus
	mov	w0, #0
	b	LBB0_7
LBB0_4:
Lloh15:
	adrp	x8, _MAX77843_MUIC_CONTROL1_SW_OPEN@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MAX77843_MUIC_CONTROL1_SW_OPEN@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	ldr	w2, [sp, #12]
	mov	x0, x19
	mov	w3, #0
	bl	_max77843_muic_set_path
	tbnz	w0, #31, LBB0_7
; %bb.5:
	ldr	w0, [x19, #4]
Lloh18:
	adrp	x8, _EXTCON_DISP_MHL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EXTCON_DISP_MHL@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	ldr	w2, [sp, #12]
	bl	_extcon_set_state_sync
	mov	w0, #0
	b	LBB0_7
LBB0_6:
	ldr	w0, [x19]
	ldr	w8, [sp, #12]
	cmp	w8, #0
	csel	x2, x22, x21, eq
Lloh21:
	adrp	x1, l_.str.3@PAGE
Lloh22:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x3, x20
	bl	_dev_err
Lloh23:
	adrp	x8, _EINVAL@GOTPAGE
Lloh24:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	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
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX77843_CABLE_GROUP_ADC_GND,4,2 ; @MAX77843_CABLE_GROUP_ADC_GND
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"external connector is %s (gnd:0x%02x)\n"

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

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

	.comm	_MAX77843_MUIC_CONTROL1_SW_USB,4,2 ; @MAX77843_MUIC_CONTROL1_SW_USB
	.comm	_EXTCON_USB_HOST,4,2            ; @EXTCON_USB_HOST
	.comm	_MAX77843_MUIC_CONTROL1_SW_OPEN,4,2 ; @MAX77843_MUIC_CONTROL1_SW_OPEN
	.comm	_EXTCON_DISP_MHL,4,2            ; @EXTCON_DISP_MHL
l_.str.3:                               ; @.str.3
	.asciz	"failed to detect %s accessory(gnd:0x%x)\n"

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