	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function max14577_muic_set_path
_max14577_muic_set_path:                ## @max14577_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, %r13d
	movl	%esi, %r14d
	movq	%rdi, %r12
	movq	8(%rdi), %rax
	movl	(%rax), %edi
	movq	_MAX14577_MUIC_REG_CONTROL1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_CLEAR_IDBEN_MICEN_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_CTRL1_SW_OPEN@GOTPCREL(%rip), %r15
	movl	(%r15), %ecx
	callq	_max14577_update_reg
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	%r13d, -44(%rbp)                ## 4-byte Spill
	testl	%r13d, %r13d
	jne	LBB0_4
## %bb.3:
	movl	(%r15), %r14d
LBB0_4:
	movq	8(%r12), %rax
	movl	(%rax), %edi
	movq	_MAX14577_MUIC_REG_CONTROL1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_CLEAR_IDBEN_MICEN_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r14d, %ecx
	callq	_max14577_update_reg
	testl	%eax, %eax
	js	LBB0_1
## %bb.5:
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	testl	%r15d, %r15d
	movq	_CTRL2_LOWPWR_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_CTRL2_CPEN_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%edx, %r13d
	cmovel	%eax, %r13d
	movq	8(%r12), %rcx
	movl	(%rcx), %edi
	movq	_MAX14577_REG_CONTROL2@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	%eax, %edx
	movl	%r13d, %ecx
	callq	_max14577_update_reg
	movl	(%r12), %edi
	testl	%eax, %eax
	js	LBB0_6
## %bb.8:
	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_dbg
	xorl	%ebx, %ebx
	jmp	LBB0_9
LBB0_1:
	movl	%eax, %ebx
	movl	(%r12), %edi
	jmp	LBB0_7
LBB0_6:
	movl	%eax, %ebx
LBB0_7:
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX14577_MUIC_REG_CONTROL1,4,2 ## @MAX14577_MUIC_REG_CONTROL1
	.comm	_CLEAR_IDBEN_MICEN_MASK,4,2     ## @CLEAR_IDBEN_MICEN_MASK
	.comm	_CTRL1_SW_OPEN,4,2              ## @CTRL1_SW_OPEN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to update MUIC register\n"

	.comm	_CTRL2_CPEN_MASK,4,2            ## @CTRL2_CPEN_MASK
	.comm	_CTRL2_LOWPWR_MASK,4,2          ## @CTRL2_LOWPWR_MASK
	.comm	_MAX14577_REG_CONTROL2,4,2      ## @MAX14577_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	_max14577_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 max14577_muic_set_path
_max14577_muic_set_path:                ; @max14577_muic_set_path
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
	ldr	x8, [x0, #8]
	ldr	w0, [x8]
Lloh0:
	adrp	x23, _MAX14577_MUIC_REG_CONTROL1@GOTPAGE
Lloh1:
	ldr	x23, [x23, _MAX14577_MUIC_REG_CONTROL1@GOTPAGEOFF]
	ldr	w1, [x23]
Lloh2:
	adrp	x24, _CLEAR_IDBEN_MICEN_MASK@GOTPAGE
Lloh3:
	ldr	x24, [x24, _CLEAR_IDBEN_MICEN_MASK@GOTPAGEOFF]
	ldr	w2, [x24]
Lloh4:
	adrp	x25, _CTRL1_SW_OPEN@GOTPAGE
Lloh5:
	ldr	x25, [x25, _CTRL1_SW_OPEN@GOTPAGEOFF]
	ldr	w3, [x25]
	bl	_max14577_update_reg
	tbnz	w0, #31, LBB0_4
; %bb.1:
	ldr	w8, [x25]
	cmp	w19, #0
	csel	w21, w8, w21, eq
	ldr	x8, [x20, #8]
	ldr	w0, [x8]
	ldr	w1, [x23]
	ldr	w2, [x24]
	mov	x3, x21
	bl	_max14577_update_reg
	tbnz	w0, #31, LBB0_4
; %bb.2:
Lloh6:
	adrp	x8, _CTRL2_LOWPWR_MASK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CTRL2_LOWPWR_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _CTRL2_CPEN_MASK@GOTPAGE
Lloh10:
	ldr	x9, [x9, _CTRL2_CPEN_MASK@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	cmp	w19, #0
	csel	w23, w8, w9, eq
	ldr	x10, [x20, #8]
	ldr	w0, [x10]
Lloh12:
	adrp	x10, _MAX14577_REG_CONTROL2@GOTPAGE
Lloh13:
	ldr	x10, [x10, _MAX14577_REG_CONTROL2@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x10]
	orr	w2, w9, w8
	mov	x3, x23
	bl	_max14577_update_reg
	mov	x22, x0
	ldr	w0, [x20]
	tbnz	w22, #31, LBB0_5
; %bb.3:
Lloh15:
	adrp	x8, l_.str.2@PAGE
Lloh16:
	add	x8, x8, l_.str.2@PAGEOFF
Lloh17:
	adrp	x9, l_.str.3@PAGE
Lloh18:
	add	x9, x9, l_.str.3@PAGEOFF
	cmp	w19, #0
	csel	x4, x9, x8, eq
Lloh19:
	adrp	x1, l_.str.1@PAGE
Lloh20:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x21
	mov	x3, x23
	bl	_dev_dbg
	mov	w22, #0
	b	LBB0_6
LBB0_4:
	mov	x22, x0
	ldr	w0, [x20]
LBB0_5:
Lloh21:
	adrp	x1, l_.str@PAGE
Lloh22:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
LBB0_6:
	mov	x0, x22
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX14577_MUIC_REG_CONTROL1,4,2 ; @MAX14577_MUIC_REG_CONTROL1
	.comm	_CLEAR_IDBEN_MICEN_MASK,4,2     ; @CLEAR_IDBEN_MICEN_MASK
	.comm	_CTRL1_SW_OPEN,4,2              ; @CTRL1_SW_OPEN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to update MUIC register\n"

	.comm	_CTRL2_CPEN_MASK,4,2            ; @CTRL2_CPEN_MASK
	.comm	_CTRL2_LOWPWR_MASK,4,2          ; @CTRL2_LOWPWR_MASK
	.comm	_MAX14577_REG_CONTROL2,4,2      ; @MAX14577_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	_max14577_muic_set_path
.subsections_via_symbols
