	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function max8997_muic_handle_dock
_max8997_muic_handle_dock:              ## @max8997_muic_handle_dock
	.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, %r15
	movq	_CONTROL1_SW_AUDIO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_max8997_muic_set_path
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	movl	(%r15), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_5
LBB0_2:
	andl	$-2, %r12d
	cmpl	$128, %r12d
	jne	LBB0_4
## %bb.3:
	movl	4(%r15), %edi
	movq	_EXTCON_DOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edx
	callq	_extcon_set_state_sync
	xorl	%ebx, %ebx
	jmp	LBB0_5
LBB0_4:
	movl	(%r15), %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	%ebx, %ebx
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_5:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CONTROL1_SW_AUDIO,4,2          ## @CONTROL1_SW_AUDIO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to update muic register\n"

	.comm	_EXTCON_DOCK,4,2                ## @EXTCON_DOCK
L_.str.1:                               ## @.str.1
	.asciz	"failed to detect %s dock device\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_dock
.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_dock
_max8997_muic_handle_dock:              ; @max8997_muic_handle_dock
	.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
Lloh0:
	adrp	x8, _CONTROL1_SW_AUDIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CONTROL1_SW_AUDIO@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_max8997_muic_set_path
	cbz	w0, LBB0_2
; %bb.1:
	mov	x21, x0
	ldr	w0, [x20]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	b	LBB0_5
LBB0_2:
	and	w8, w22, #0xfffffffe
	cmp	w8, #128
	b.ne	LBB0_4
; %bb.3:
	ldr	w0, [x20, #4]
Lloh5:
	adrp	x8, _EXTCON_DOCK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EXTCON_DOCK@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x2, x19
	bl	_extcon_set_state_sync
	mov	w21, #0
	b	LBB0_5
LBB0_4:
	ldr	w0, [x20]
Lloh8:
	adrp	x8, l_.str.2@PAGE
Lloh9:
	add	x8, x8, l_.str.2@PAGEOFF
Lloh10:
	adrp	x9, l_.str.3@PAGE
Lloh11:
	add	x9, x9, l_.str.3@PAGEOFF
	cmp	w19, #0
	csel	x8, x9, x8, eq
	str	x8, [sp]
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_5:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_CONTROL1_SW_AUDIO,4,2          ; @CONTROL1_SW_AUDIO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to update muic register\n"

	.comm	_EXTCON_DOCK,4,2                ; @EXTCON_DOCK
l_.str.1:                               ; @.str.1
	.asciz	"failed to detect %s dock device\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_dock
.subsections_via_symbols
