	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function max8997_muic_chg_handler
_max8997_muic_chg_handler:              ## @max8997_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	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	_MAX8997_CABLE_GROUP_CHG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-20(%rbp), %rdx
	callq	_max8997_muic_get_cable_type
                                        ## kill: def $eax killed $eax def $rax
	leal	-128(%rax), %ecx
	cmpl	$5, %ecx
	ja	LBB0_9
## %bb.1:
	xorl	%r14d, %r14d
	leaq	LJTI0_0(%rip), %rax
	movslq	(%rax,%rcx,4), %rcx
	addq	%rax, %rcx
	jmpq	*%rcx
LBB0_2:
	movq	(%rbx), %rax
	movq	_STATUS1_ADC_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	(%rax), %eax
	andl	%edx, %eax
	movq	_STATUS1_ADC_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarl	%cl, %eax
	andl	%edx, %eax
	movq	_MAX8997_MUIC_ADC_OPEN@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_10
## %bb.3:
	movq	_MAX8997_USB_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-20(%rbp), %edx
	movq	%rbx, %rdi
	callq	_max8997_muic_handle_usb
	jmp	LBB0_10
LBB0_4:
	movl	12(%rbx), %edi
	movq	_EXTCON_CHG_USB_CDP@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_6:
	movl	12(%rbx), %edi
	movq	_EXTCON_CHG_USB_DCP@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_7:
	movl	12(%rbx), %edi
	movq	_EXTCON_CHG_USB_SLOW@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_9:
	movl	8(%rbx), %edi
	cmpl	$0, -20(%rbp)
	leaq	L_.str.2(%rip), %rcx
	leaq	L_.str.1(%rip), %rdx
	cmoveq	%rcx, %rdx
	leaq	L_.str(%rip), %rsi
	movl	%eax, %ecx
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_10
LBB0_8:
	movl	12(%rbx), %edi
	movq	_EXTCON_CHG_USB_FAST@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %esi
	movl	-20(%rbp), %edx
	callq	_extcon_set_state_sync
LBB0_10:
	movl	%r14d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
LJTI0_0:
	.long	L0_0_set_2
	.long	L0_0_set_10
	.long	L0_0_set_4
	.long	L0_0_set_6
	.long	L0_0_set_7
	.long	L0_0_set_8
	.end_data_region
                                        ## -- End function
	.comm	_MAX8997_CABLE_GROUP_CHG,4,2    ## @MAX8997_CABLE_GROUP_CHG
	.comm	_STATUS1_ADC_MASK,4,2           ## @STATUS1_ADC_MASK
	.comm	_STATUS1_ADC_SHIFT,4,2          ## @STATUS1_ADC_SHIFT
	.comm	_MAX8997_MUIC_ADC_OPEN,4,2      ## @MAX8997_MUIC_ADC_OPEN
	.comm	_MAX8997_USB_DEVICE,4,2         ## @MAX8997_USB_DEVICE
	.comm	_EXTCON_CHG_USB_CDP,4,2         ## @EXTCON_CHG_USB_CDP
	.comm	_EXTCON_CHG_USB_DCP,4,2         ## @EXTCON_CHG_USB_DCP
	.comm	_EXTCON_CHG_USB_SLOW,4,2        ## @EXTCON_CHG_USB_SLOW
	.comm	_EXTCON_CHG_USB_FAST,4,2        ## @EXTCON_CHG_USB_FAST
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to detect %s unknown chg cable (type:0x%x)\n"

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

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

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_max8997_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 max8997_muic_chg_handler
_max8997_muic_chg_handler:              ; @max8997_muic_chg_handler
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x8, _MAX8997_CABLE_GROUP_CHG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX8997_CABLE_GROUP_CHG@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_max8997_muic_get_cable_type
	sub	w8, w0, #128
	cmp	w8, #5
	b.hi	LBB0_7
; %bb.1:
	mov	w0, #0
Lloh3:
	adrp	x9, lJTI0_0@PAGE
Lloh4:
	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	x8, [x19]
Lloh5:
	adrp	x9, _STATUS1_ADC_MASK@GOTPAGE
Lloh6:
	ldr	x9, [x9, _STATUS1_ADC_MASK@GOTPAGEOFF]
	ldr	w8, [x8]
Lloh7:
	ldr	w9, [x9]
	and	w8, w9, w8
Lloh8:
	adrp	x10, _STATUS1_ADC_SHIFT@GOTPAGE
Lloh9:
	ldr	x10, [x10, _STATUS1_ADC_SHIFT@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
	asr	w8, w8, w10
	and	w8, w8, w9
Lloh11:
	adrp	x9, _MAX8997_MUIC_ADC_OPEN@GOTPAGE
Lloh12:
	ldr	x9, [x9, _MAX8997_MUIC_ADC_OPEN@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_10
; %bb.3:
Lloh14:
	adrp	x8, _MAX8997_USB_DEVICE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MAX8997_USB_DEVICE@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	ldr	w2, [sp, #12]
	mov	x0, x19
	bl	_max8997_muic_handle_usb
	b	LBB0_10
LBB0_4:
	ldr	w0, [x19, #12]
Lloh17:
	adrp	x8, _EXTCON_CHG_USB_CDP@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EXTCON_CHG_USB_CDP@GOTPAGEOFF]
	b	LBB0_9
LBB0_5:
	ldr	w0, [x19, #12]
Lloh19:
	adrp	x8, _EXTCON_CHG_USB_DCP@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EXTCON_CHG_USB_DCP@GOTPAGEOFF]
	b	LBB0_9
LBB0_6:
	ldr	w0, [x19, #12]
Lloh21:
	adrp	x8, _EXTCON_CHG_USB_SLOW@GOTPAGE
Lloh22:
	ldr	x8, [x8, _EXTCON_CHG_USB_SLOW@GOTPAGEOFF]
	b	LBB0_9
LBB0_7:
	mov	x3, x0
	ldr	w0, [x19, #8]
	ldr	w8, [sp, #12]
Lloh23:
	adrp	x9, l_.str.1@PAGE
Lloh24:
	add	x9, x9, l_.str.1@PAGEOFF
Lloh25:
	adrp	x10, l_.str.2@PAGE
Lloh26:
	add	x10, x10, l_.str.2@PAGEOFF
	cmp	w8, #0
	csel	x2, x10, x9, eq
Lloh27:
	adrp	x1, l_.str@PAGE
Lloh28:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh29:
	adrp	x8, _EINVAL@GOTPAGE
Lloh30:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_11
LBB0_8:
	ldr	w0, [x19, #12]
Lloh32:
	adrp	x8, _EXTCON_CHG_USB_FAST@GOTPAGE
Lloh33:
	ldr	x8, [x8, _EXTCON_CHG_USB_FAST@GOTPAGEOFF]
LBB0_9:
	ldr	w1, [x8]
	ldr	w2, [sp, #12]
	bl	_extcon_set_state_sync
LBB0_10:
	mov	w0, #0
LBB0_11:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh32, Lloh33
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_11-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_5-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_8-LBB0_2)>>2
                                        ; -- End function
	.comm	_MAX8997_CABLE_GROUP_CHG,4,2    ; @MAX8997_CABLE_GROUP_CHG
	.comm	_STATUS1_ADC_MASK,4,2           ; @STATUS1_ADC_MASK
	.comm	_STATUS1_ADC_SHIFT,4,2          ; @STATUS1_ADC_SHIFT
	.comm	_MAX8997_MUIC_ADC_OPEN,4,2      ; @MAX8997_MUIC_ADC_OPEN
	.comm	_MAX8997_USB_DEVICE,4,2         ; @MAX8997_USB_DEVICE
	.comm	_EXTCON_CHG_USB_CDP,4,2         ; @EXTCON_CHG_USB_CDP
	.comm	_EXTCON_CHG_USB_DCP,4,2         ; @EXTCON_CHG_USB_DCP
	.comm	_EXTCON_CHG_USB_SLOW,4,2        ; @EXTCON_CHG_USB_SLOW
	.comm	_EXTCON_CHG_USB_FAST,4,2        ; @EXTCON_CHG_USB_FAST
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to detect %s unknown chg cable (type:0x%x)\n"

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

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

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