	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function max8997_muic_set_path
_max8997_muic_set_path:                 ## @max8997_muic_set_path
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movl	%esi, %r14d
	movq	%rdi, %r12
	testl	%edx, %edx
	jne	LBB0_2
## %bb.1:
	movq	_CONTROL1_SW_OPEN@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_2:
	movl	4(%r12), %edi
	movq	_MAX8997_MUIC_REG_CONTROL1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_COMP_SW_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%r14d, %edx
	callq	_max8997_update_reg
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	testl	%r15d, %r15d
	movq	_CONTROL2_LOWPWR_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_CONTROL2_CPEN_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, %r13d
	cmovel	%eax, %r13d
	movl	4(%r12), %edi
	movq	_MAX8997_MUIC_REG_CONTROL2@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	orl	%eax, %ecx
	movl	%r13d, %edx
	callq	_max8997_update_reg
	movl	(%r12), %edi
	testl	%eax, %eax
	js	LBB0_5
## %bb.7:
	testl	%r15d, %r15d
	leaq	L_.str.3(%rip), %rax
	leaq	L_.str.2(%rip), %r8
	cmoveq	%rax, %r8
	leaq	L_.str.1(%rip), %rsi
	movl	%r14d, %edx
	movl	%r13d, %ecx
	callq	_dev_info
	xorl	%ebx, %ebx
	jmp	LBB0_8
LBB0_3:
	movl	%eax, %ebx
	movl	(%r12), %edi
	jmp	LBB0_6
LBB0_5:
	movl	%eax, %ebx
LBB0_6:
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
LBB0_8:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CONTROL1_SW_OPEN,4,2           ## @CONTROL1_SW_OPEN
	.comm	_MAX8997_MUIC_REG_CONTROL1,4,2  ## @MAX8997_MUIC_REG_CONTROL1
	.comm	_COMP_SW_MASK,4,2               ## @COMP_SW_MASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to update MUIC register\n"

	.comm	_CONTROL2_CPEN_MASK,4,2         ## @CONTROL2_CPEN_MASK
	.comm	_CONTROL2_LOWPWR_MASK,4,2       ## @CONTROL2_LOWPWR_MASK
	.comm	_MAX8997_MUIC_REG_CONTROL2,4,2  ## @MAX8997_MUIC_REG_CONTROL2
L_.str.1:                               ## @.str.1
	.asciz	"CONTROL1 : 0x%02x, CONTROL2 : 0x%02x, state : %s\n"

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

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

	.no_dead_strip	_max8997_muic_set_path
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function max8997_muic_set_path
_max8997_muic_set_path:                 ; @max8997_muic_set_path
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x2
	mov	x21, x0
Lloh0:
	adrp	x8, _CONTROL1_SW_OPEN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CONTROL1_SW_OPEN@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w2, #0
	csel	w20, w8, w1, eq
	ldr	w0, [x0, #4]
Lloh3:
	adrp	x8, _MAX8997_MUIC_REG_CONTROL1@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAX8997_MUIC_REG_CONTROL1@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _COMP_SW_MASK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _COMP_SW_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
	mov	x2, x20
	bl	_max8997_update_reg
	tbnz	w0, #31, LBB0_3
; %bb.1:
Lloh9:
	adrp	x8, _CONTROL2_LOWPWR_MASK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CONTROL2_LOWPWR_MASK@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _CONTROL2_CPEN_MASK@GOTPAGE
Lloh13:
	ldr	x9, [x9, _CONTROL2_CPEN_MASK@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	cmp	w19, #0
	csel	w23, w8, w9, eq
	ldr	w0, [x21, #4]
Lloh15:
	adrp	x10, _MAX8997_MUIC_REG_CONTROL2@GOTPAGE
Lloh16:
	ldr	x10, [x10, _MAX8997_MUIC_REG_CONTROL2@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x10]
	orr	w3, w9, w8
	mov	x2, x23
	bl	_max8997_update_reg
	mov	x22, x0
	ldr	w0, [x21]
	tbnz	w22, #31, LBB0_4
; %bb.2:
Lloh18:
	adrp	x8, l_.str.2@PAGE
Lloh19:
	add	x8, x8, l_.str.2@PAGEOFF
Lloh20:
	adrp	x9, l_.str.3@PAGE
Lloh21:
	add	x9, x9, l_.str.3@PAGEOFF
	cmp	w19, #0
	csel	x4, x9, x8, eq
Lloh22:
	adrp	x1, l_.str.1@PAGE
Lloh23:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x20
	mov	x3, x23
	bl	_dev_info
	mov	w22, #0
	b	LBB0_5
LBB0_3:
	mov	x22, x0
	ldr	w0, [x21]
LBB0_4:
Lloh24:
	adrp	x1, l_.str@PAGE
Lloh25:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
LBB0_5:
	mov	x0, x22
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_CONTROL1_SW_OPEN,4,2           ; @CONTROL1_SW_OPEN
	.comm	_MAX8997_MUIC_REG_CONTROL1,4,2  ; @MAX8997_MUIC_REG_CONTROL1
	.comm	_COMP_SW_MASK,4,2               ; @COMP_SW_MASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to update MUIC register\n"

	.comm	_CONTROL2_CPEN_MASK,4,2         ; @CONTROL2_CPEN_MASK
	.comm	_CONTROL2_LOWPWR_MASK,4,2       ; @CONTROL2_LOWPWR_MASK
	.comm	_MAX8997_MUIC_REG_CONTROL2,4,2  ; @MAX8997_MUIC_REG_CONTROL2
l_.str.1:                               ; @.str.1
	.asciz	"CONTROL1 : 0x%02x, CONTROL2 : 0x%02x, state : %s\n"

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

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

	.no_dead_strip	_max8997_muic_set_path
.subsections_via_symbols
