	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mmc35240_hw_set
_mmc35240_hw_set:                       ## @mmc35240_hw_set
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movl	(%rdi), %edi
	movq	_MMC35240_REG_CTRL0@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	_MMC35240_CTRL0_REFILL_BIT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%ecx, %edx
	callq	_regmap_update_bits
	testl	%eax, %eax
	js	LBB0_5
## %bb.1:
	movq	_MMC35240_WAIT_CHARGE_PUMP@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	leaq	1(%rdi), %rsi
	callq	_usleep_range
	testl	%r14d, %r14d
	jne	LBB0_2
## %bb.3:
	movq	_MMC35240_CTRL0_RESET_BIT@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	_MMC35240_CTRL0_SET_BIT@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %ecx
	movl	(%rbx), %edi
	movl	(%r15), %esi
	movl	%ecx, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_regmap_update_bits             ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MMC35240_REG_CTRL0,4,2         ## @MMC35240_REG_CTRL0
	.comm	_MMC35240_CTRL0_REFILL_BIT,4,2  ## @MMC35240_CTRL0_REFILL_BIT
	.comm	_MMC35240_WAIT_CHARGE_PUMP,8,3  ## @MMC35240_WAIT_CHARGE_PUMP
	.comm	_MMC35240_CTRL0_SET_BIT,4,2     ## @MMC35240_CTRL0_SET_BIT
	.comm	_MMC35240_CTRL0_RESET_BIT,4,2   ## @MMC35240_CTRL0_RESET_BIT
	.no_dead_strip	_mmc35240_hw_set
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mmc35240_hw_set
_mmc35240_hw_set:                       ; @mmc35240_hw_set
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x20, x1
	mov	x19, x0
	ldr	w0, [x0]
Lloh0:
	adrp	x21, _MMC35240_REG_CTRL0@GOTPAGE
Lloh1:
	ldr	x21, [x21, _MMC35240_REG_CTRL0@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh2:
	adrp	x8, _MMC35240_CTRL0_REFILL_BIT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MMC35240_CTRL0_REFILL_BIT@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	mov	x3, x2
	bl	_regmap_update_bits
	tbnz	w0, #31, LBB0_2
; %bb.1:
Lloh5:
	adrp	x8, _MMC35240_WAIT_CHARGE_PUMP@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MMC35240_WAIT_CHARGE_PUMP@GOTPAGEOFF]
Lloh7:
	ldr	x0, [x8]
	add	x1, x0, #1
	bl	_usleep_range
Lloh8:
	adrp	x8, _MMC35240_CTRL0_RESET_BIT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MMC35240_CTRL0_RESET_BIT@GOTPAGEOFF]
Lloh10:
	adrp	x9, _MMC35240_CTRL0_SET_BIT@GOTPAGE
Lloh11:
	ldr	x9, [x9, _MMC35240_CTRL0_SET_BIT@GOTPAGEOFF]
	cmp	w20, #0
	csel	x8, x8, x9, eq
	ldr	w2, [x8]
	ldr	w0, [x19]
	ldr	w1, [x21]
	mov	x3, x2
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_regmap_update_bits
LBB0_2:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_MMC35240_REG_CTRL0,4,2         ; @MMC35240_REG_CTRL0
	.comm	_MMC35240_CTRL0_REFILL_BIT,4,2  ; @MMC35240_CTRL0_REFILL_BIT
	.comm	_MMC35240_WAIT_CHARGE_PUMP,8,3  ; @MMC35240_WAIT_CHARGE_PUMP
	.comm	_MMC35240_CTRL0_SET_BIT,4,2     ; @MMC35240_CTRL0_SET_BIT
	.comm	_MMC35240_CTRL0_RESET_BIT,4,2   ; @MMC35240_CTRL0_RESET_BIT
	.no_dead_strip	_mmc35240_hw_set
.subsections_via_symbols
