	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function max8997_muic_handle_usb
_max8997_muic_handle_usb:               ## @max8997_muic_handle_usb
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movl	%esi, %r12d
	movq	%rdi, %rbx
	movl	8(%rdi), %esi
	callq	_max8997_muic_set_path
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	cmpl	$129, %r12d
	je	LBB0_6
## %bb.3:
	cmpl	$128, %r12d
	jne	LBB0_7
## %bb.4:
	movl	4(%rbx), %edi
	movq	_EXTCON_USB_HOST@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_1:
	movl	%eax, %r15d
	movl	(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_8
LBB0_6:
	movl	4(%rbx), %edi
	movq	_EXTCON_USB@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edx
	callq	_extcon_set_state_sync
	movl	4(%rbx), %edi
	movq	_EXTCON_CHG_USB_SDP@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %esi
	movl	%r14d, %edx
	callq	_extcon_set_state_sync
	xorl	%r15d, %r15d
	jmp	LBB0_8
LBB0_7:
	movl	(%rbx), %edi
	testl	%r14d, %r14d
	leaq	L_.str.3(%rip), %rax
	leaq	L_.str.2(%rip), %rdx
	cmoveq	%rax, %rdx
	leaq	L_.str.1(%rip), %rsi
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
LBB0_8:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to update muic register\n"

	.comm	_EXTCON_USB_HOST,4,2            ## @EXTCON_USB_HOST
	.comm	_EXTCON_USB,4,2                 ## @EXTCON_USB
	.comm	_EXTCON_CHG_USB_SDP,4,2         ## @EXTCON_CHG_USB_SDP
L_.str.1:                               ## @.str.1
	.asciz	"failed to detect %s usb cable\n"

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

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

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

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function max8997_muic_handle_usb
_max8997_muic_handle_usb:               ; @max8997_muic_handle_usb
	.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, x2
	mov	x22, x1
	mov	x20, x0
	ldr	w1, [x0, #8]
	bl	_max8997_muic_set_path
	tbnz	w0, #31, LBB0_4
; %bb.1:
	cmp	w22, #129
	b.eq	LBB0_5
; %bb.2:
	cmp	w22, #128
	b.ne	LBB0_7
; %bb.3:
	ldr	w0, [x20, #4]
Lloh0:
	adrp	x8, _EXTCON_USB_HOST@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EXTCON_USB_HOST@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:
	mov	x21, x0
	ldr	w0, [x20]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	b	LBB0_8
LBB0_5:
	ldr	w0, [x20, #4]
Lloh4:
	adrp	x8, _EXTCON_USB@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EXTCON_USB@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	mov	x2, x19
	bl	_extcon_set_state_sync
	ldr	w0, [x20, #4]
Lloh7:
	adrp	x8, _EXTCON_CHG_USB_SDP@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EXTCON_CHG_USB_SDP@GOTPAGEOFF]
LBB0_6:
	ldr	w1, [x8]
	mov	x2, x19
	bl	_extcon_set_state_sync
	mov	w21, #0
	b	LBB0_8
LBB0_7:
	ldr	w0, [x20]
Lloh9:
	adrp	x8, l_.str.2@PAGE
Lloh10:
	add	x8, x8, l_.str.2@PAGEOFF
Lloh11:
	adrp	x9, l_.str.3@PAGE
Lloh12:
	add	x9, x9, l_.str.3@PAGEOFF
	cmp	w19, #0
	csel	x8, x9, x8, eq
	str	x8, [sp]
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
Lloh15:
	adrp	x8, _EINVAL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_8:
	mov	x0, x21
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to update muic register\n"

	.comm	_EXTCON_USB_HOST,4,2            ; @EXTCON_USB_HOST
	.comm	_EXTCON_USB,4,2                 ; @EXTCON_USB
	.comm	_EXTCON_CHG_USB_SDP,4,2         ; @EXTCON_CHG_USB_SDP
l_.str.1:                               ; @.str.1
	.asciz	"failed to detect %s usb cable\n"

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

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

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