	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function max14577_muic_chg_handler
_max14577_muic_chg_handler:             ## @max14577_muic_chg_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	_MAX14577_CABLE_GROUP_CHG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-36(%rbp), %rdx
	callq	_max14577_muic_get_cable_type
	movl	%eax, %ebx
	cmpl	$0, -36(%rbp)
	leaq	L_.str.2(%rip), %r12
	leaq	L_.str.1(%rip), %r14
	movq	%r14, %rdx
	cmoveq	%r12, %rdx
	movl	(%r15), %edi
	movl	12(%r15), %r8d
	leaq	L_.str(%rip), %rsi
	movl	%eax, %ecx
	callq	_dev_dbg
	leal	-128(%rbx), %eax
	cmpl	$6, %eax
	ja	LBB0_10
## %bb.1:
	xorl	%r14d, %r14d
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_2:
	movl	8(%r15), %esi
	movl	-36(%rbp), %edx
	movq	%r15, %rdi
	callq	_max14577_muic_set_path
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	movl	4(%r15), %edi
	movq	_EXTCON_USB@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-36(%rbp), %edx
	callq	_extcon_set_state_sync
	movl	4(%r15), %edi
	movq	_EXTCON_CHG_USB_SDP@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_10:
	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
	jmp	LBB0_11
LBB0_8:
	movl	4(%r15), %edi
	movq	_EXTCON_CHG_USB_SLOW@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_9:
	movl	4(%r15), %edi
	movq	_EXTCON_CHG_USB_FAST@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_7:
	movl	4(%r15), %edi
	movq	_EXTCON_CHG_USB_CDP@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_5:
	movl	4(%r15), %edi
	movq	_EXTCON_CHG_USB_DCP@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %esi
	movl	-36(%rbp), %edx
	callq	_extcon_set_state_sync
LBB0_11:
	movl	%r14d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movl	%eax, %r14d
	jmp	LBB0_11
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
LJTI0_0:
	.long	L0_0_set_2
	.long	L0_0_set_8
	.long	L0_0_set_9
	.long	L0_0_set_11
	.long	L0_0_set_7
	.long	L0_0_set_5
	.long	L0_0_set_11
	.end_data_region
                                        ## -- End function
	.comm	_MAX14577_CABLE_GROUP_CHG,4,2   ## @MAX14577_CABLE_GROUP_CHG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"external connector is %s(chg_type:0x%x, prev_chg_type:0x%x)\n"

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

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

	.comm	_EXTCON_USB,4,2                 ## @EXTCON_USB
	.comm	_EXTCON_CHG_USB_SDP,4,2         ## @EXTCON_CHG_USB_SDP
	.comm	_EXTCON_CHG_USB_DCP,4,2         ## @EXTCON_CHG_USB_DCP
	.comm	_EXTCON_CHG_USB_CDP,4,2         ## @EXTCON_CHG_USB_CDP
	.comm	_EXTCON_CHG_USB_SLOW,4,2        ## @EXTCON_CHG_USB_SLOW
	.comm	_EXTCON_CHG_USB_FAST,4,2        ## @EXTCON_CHG_USB_FAST
L_.str.3:                               ## @.str.3
	.asciz	"failed to detect %s accessory (chg_type:0x%x)\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_max14577_muic_chg_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_chg_handler
_max14577_muic_chg_handler:             ; @max14577_muic_chg_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, _MAX14577_CABLE_GROUP_CHG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX14577_CABLE_GROUP_CHG@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_max14577_muic_get_cable_type
	mov	x20, x0
	ldr	w0, [x19]
Lloh3:
	adrp	x21, l_.str.1@PAGE
Lloh4:
	add	x21, x21, l_.str.1@PAGEOFF
	ldr	w8, [sp, #12]
Lloh5:
	adrp	x22, l_.str.2@PAGE
Lloh6:
	add	x22, x22, l_.str.2@PAGEOFF
	cmp	w8, #0
	csel	x2, x22, x21, eq
	ldr	w4, [x19, #12]
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	x3, x20
	bl	_dev_dbg
	sub	w8, w20, #128
	cmp	w8, #6
	b.hi	LBB0_4
; %bb.1:
	mov	w0, #0
Lloh9:
	adrp	x9, lJTI0_0@PAGE
Lloh10:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
	ldr	w1, [x19, #8]
	ldr	w2, [sp, #12]
	mov	x0, x19
	bl	_max14577_muic_set_path
	tbnz	w0, #31, LBB0_10
; %bb.3:
	ldr	w0, [x19, #4]
Lloh11:
	adrp	x8, _EXTCON_USB@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EXTCON_USB@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	ldr	w2, [sp, #12]
	bl	_extcon_set_state_sync
	ldr	w0, [x19, #4]
Lloh14:
	adrp	x8, _EXTCON_CHG_USB_SDP@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EXTCON_CHG_USB_SDP@GOTPAGEOFF]
	b	LBB0_9
LBB0_4:
	ldr	w0, [x19]
	ldr	w8, [sp, #12]
	cmp	w8, #0
	csel	x2, x22, x21, eq
Lloh16:
	adrp	x1, l_.str.3@PAGE
Lloh17:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x3, x20
	bl	_dev_err
Lloh18:
	adrp	x8, _EINVAL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_10
LBB0_5:
	ldr	w0, [x19, #4]
Lloh21:
	adrp	x8, _EXTCON_CHG_USB_SLOW@GOTPAGE
Lloh22:
	ldr	x8, [x8, _EXTCON_CHG_USB_SLOW@GOTPAGEOFF]
	b	LBB0_9
LBB0_6:
	ldr	w0, [x19, #4]
Lloh23:
	adrp	x8, _EXTCON_CHG_USB_FAST@GOTPAGE
Lloh24:
	ldr	x8, [x8, _EXTCON_CHG_USB_FAST@GOTPAGEOFF]
	b	LBB0_9
LBB0_7:
	ldr	w0, [x19, #4]
Lloh25:
	adrp	x8, _EXTCON_CHG_USB_CDP@GOTPAGE
Lloh26:
	ldr	x8, [x8, _EXTCON_CHG_USB_CDP@GOTPAGEOFF]
	b	LBB0_9
LBB0_8:
	ldr	w0, [x19, #4]
Lloh27:
	adrp	x8, _EXTCON_CHG_USB_DCP@GOTPAGE
Lloh28:
	ldr	x8, [x8, _EXTCON_CHG_USB_DCP@GOTPAGEOFF]
LBB0_9:
	ldr	w1, [x8]
	ldr	w2, [sp, #12]
	bl	_extcon_set_state_sync
	mov	w0, #0
LBB0_10:
	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 AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh27, Lloh28
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_5-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_10-LBB0_2)>>2
	.byte	(LBB0_7-LBB0_2)>>2
	.byte	(LBB0_8-LBB0_2)>>2
	.byte	(LBB0_10-LBB0_2)>>2
                                        ; -- End function
	.comm	_MAX14577_CABLE_GROUP_CHG,4,2   ; @MAX14577_CABLE_GROUP_CHG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"external connector is %s(chg_type:0x%x, prev_chg_type:0x%x)\n"

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

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

	.comm	_EXTCON_USB,4,2                 ; @EXTCON_USB
	.comm	_EXTCON_CHG_USB_SDP,4,2         ; @EXTCON_CHG_USB_SDP
	.comm	_EXTCON_CHG_USB_DCP,4,2         ; @EXTCON_CHG_USB_DCP
	.comm	_EXTCON_CHG_USB_CDP,4,2         ; @EXTCON_CHG_USB_CDP
	.comm	_EXTCON_CHG_USB_SLOW,4,2        ; @EXTCON_CHG_USB_SLOW
	.comm	_EXTCON_CHG_USB_FAST,4,2        ; @EXTCON_CHG_USB_FAST
l_.str.3:                               ; @.str.3
	.asciz	"failed to detect %s accessory (chg_type:0x%x)\n"

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