	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_twl6030_mmc_card_detect_config ## -- Begin function twl6030_mmc_card_detect_config
	.p2align	4, 0x90
_twl6030_mmc_card_detect_config:        ## @twl6030_mmc_card_detect_config
	.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	$0, -28(%rbp)
	movq	_TWL6030_MMCDETECT_INT_MASK@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movq	_REG_INT_MSK_LINE_B@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_twl6030_interrupt_unmask
	movl	(%rbx), %edi
	movq	_REG_INT_MSK_STS_B@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_twl6030_interrupt_unmask
	movq	_TWL6030_MODULE_ID0@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	movq	_TWL6030_MMCCTRL@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	leaq	-28(%rbp), %rsi
	callq	_twl_i2c_read_u8
	testl	%eax, %eax
	js	LBB0_1
## %bb.3:
	movq	_VMMC_AUTO_OFF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	notl	%esi
	andl	-28(%rbp), %esi
	movq	_SW_FC@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movl	%esi, -28(%rbp)
	movl	(%r14), %edi
	movl	(%r15), %edx
	callq	_twl_i2c_write_u8
	testl	%eax, %eax
	js	LBB0_4
## %bb.5:
	movl	(%r14), %edi
	movq	_TWL6030_CFG_INPUT_PUPD3@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	leaq	-28(%rbp), %rsi
	callq	_twl_i2c_read_u8
	testl	%eax, %eax
	js	LBB0_6
## %bb.7:
	movq	_MMC_PU@GOTPCREL(%rip), %rax
	movq	_MMC_PD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	notl	%esi
	andl	-28(%rbp), %esi
	movl	%esi, -28(%rbp)
	movl	(%r14), %edi
	movl	(%r15), %edx
	callq	_twl_i2c_write_u8
	testl	%eax, %eax
	js	LBB0_8
## %bb.9:
	movq	_twl6030_irq@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax), %edi
	movq	_MMCDETECT_INTR_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_irq_find_mapping
	movl	%eax, %ebx
	jmp	LBB0_10
LBB0_1:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_2
LBB0_4:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_2
LBB0_6:
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_2
LBB0_8:
	movl	%eax, %ebx
	leaq	L_.str.3(%rip), %rdi
LBB0_2:
	movl	%ebx, %esi
	callq	_pr_err
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TWL6030_MMCDETECT_INT_MASK,4,2 ## @TWL6030_MMCDETECT_INT_MASK
	.comm	_REG_INT_MSK_LINE_B,4,2         ## @REG_INT_MSK_LINE_B
	.comm	_REG_INT_MSK_STS_B,4,2          ## @REG_INT_MSK_STS_B
	.comm	_TWL6030_MODULE_ID0,4,2         ## @TWL6030_MODULE_ID0
	.comm	_TWL6030_MMCCTRL,4,2            ## @TWL6030_MMCCTRL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"twl6030: Failed to read MMCCTRL, error %d\n"

	.comm	_VMMC_AUTO_OFF,4,2              ## @VMMC_AUTO_OFF
	.comm	_SW_FC,4,2                      ## @SW_FC
L_.str.1:                               ## @.str.1
	.asciz	"twl6030: Failed to write MMCCTRL, error %d\n"

	.comm	_TWL6030_CFG_INPUT_PUPD3,4,2    ## @TWL6030_CFG_INPUT_PUPD3
L_.str.2:                               ## @.str.2
	.asciz	"twl6030: Failed to read CFG_INPUT_PUPD3, error %d\n"

	.comm	_MMC_PU,4,2                     ## @MMC_PU
	.comm	_MMC_PD,4,2                     ## @MMC_PD
L_.str.3:                               ## @.str.3
	.asciz	"twl6030: Failed to write CFG_INPUT_PUPD3, error %d\n"

	.comm	_twl6030_irq,8,3                ## @twl6030_irq
	.comm	_MMCDETECT_INTR_OFFSET,4,2      ## @MMCDETECT_INTR_OFFSET
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_twl6030_mmc_card_detect_config ; -- Begin function twl6030_mmc_card_detect_config
	.p2align	2
_twl6030_mmc_card_detect_config:        ; @twl6030_mmc_card_detect_config
	.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
	str	wzr, [sp, #12]
Lloh0:
	adrp	x19, _TWL6030_MMCDETECT_INT_MASK@GOTPAGE
Lloh1:
	ldr	x19, [x19, _TWL6030_MMCDETECT_INT_MASK@GOTPAGEOFF]
	ldr	w0, [x19]
Lloh2:
	adrp	x8, _REG_INT_MSK_LINE_B@GOTPAGE
Lloh3:
	ldr	x8, [x8, _REG_INT_MSK_LINE_B@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	bl	_twl6030_interrupt_unmask
	ldr	w0, [x19]
Lloh5:
	adrp	x8, _REG_INT_MSK_STS_B@GOTPAGE
Lloh6:
	ldr	x8, [x8, _REG_INT_MSK_STS_B@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	bl	_twl6030_interrupt_unmask
Lloh8:
	adrp	x20, _TWL6030_MODULE_ID0@GOTPAGE
Lloh9:
	ldr	x20, [x20, _TWL6030_MODULE_ID0@GOTPAGEOFF]
	ldr	w0, [x20]
Lloh10:
	adrp	x21, _TWL6030_MMCCTRL@GOTPAGE
Lloh11:
	ldr	x21, [x21, _TWL6030_MMCCTRL@GOTPAGEOFF]
	ldr	w2, [x21]
	add	x1, sp, #12
	bl	_twl_i2c_read_u8
	tbnz	w0, #31, LBB0_5
; %bb.1:
Lloh12:
	adrp	x8, _VMMC_AUTO_OFF@GOTPAGE
Lloh13:
	ldr	x8, [x8, _VMMC_AUTO_OFF@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	ldr	w9, [sp, #12]
Lloh15:
	adrp	x10, _SW_FC@GOTPAGE
Lloh16:
	ldr	x10, [x10, _SW_FC@GOTPAGEOFF]
	bic	w8, w9, w8
Lloh17:
	ldr	w9, [x10]
	orr	w1, w9, w8
	str	w1, [sp, #12]
	ldr	w0, [x20]
	ldr	w2, [x21]
	bl	_twl_i2c_write_u8
	tbnz	w0, #31, LBB0_6
; %bb.2:
	ldr	w0, [x20]
Lloh18:
	adrp	x21, _TWL6030_CFG_INPUT_PUPD3@GOTPAGE
Lloh19:
	ldr	x21, [x21, _TWL6030_CFG_INPUT_PUPD3@GOTPAGEOFF]
	ldr	w2, [x21]
	add	x1, sp, #12
	bl	_twl_i2c_read_u8
	tbnz	w0, #31, LBB0_7
; %bb.3:
Lloh20:
	adrp	x8, _MMC_PU@GOTPAGE
Lloh21:
	ldr	x8, [x8, _MMC_PU@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
Lloh23:
	adrp	x9, _MMC_PD@GOTPAGE
Lloh24:
	ldr	x9, [x9, _MMC_PD@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldr	w9, [sp, #12]
	bic	w1, w9, w8
	str	w1, [sp, #12]
	ldr	w0, [x20]
	ldr	w2, [x21]
	bl	_twl_i2c_write_u8
	tbnz	w0, #31, LBB0_8
; %bb.4:
Lloh26:
	adrp	x8, _twl6030_irq@GOTPAGE
Lloh27:
	ldr	x8, [x8, _twl6030_irq@GOTPAGEOFF]
Lloh28:
	ldr	x8, [x8]
	ldr	w0, [x8]
Lloh29:
	adrp	x8, _MMCDETECT_INTR_OFFSET@GOTPAGE
Lloh30:
	ldr	x8, [x8, _MMCDETECT_INTR_OFFSET@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
	bl	_irq_find_mapping
	mov	x19, x0
	b	LBB0_10
LBB0_5:
	mov	x19, x0
Lloh32:
	adrp	x0, l_.str@PAGE
Lloh33:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_9
LBB0_6:
	mov	x19, x0
Lloh34:
	adrp	x0, l_.str.1@PAGE
Lloh35:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_9
LBB0_7:
	mov	x19, x0
Lloh36:
	adrp	x0, l_.str.2@PAGE
Lloh37:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_9
LBB0_8:
	mov	x19, x0
Lloh38:
	adrp	x0, l_.str.3@PAGE
Lloh39:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_9:
	mov	x1, x19
	bl	_pr_err
LBB0_10:
	mov	x0, x19
	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	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpAdd	Lloh38, Lloh39
	.cfi_endproc
                                        ; -- End function
	.comm	_TWL6030_MMCDETECT_INT_MASK,4,2 ; @TWL6030_MMCDETECT_INT_MASK
	.comm	_REG_INT_MSK_LINE_B,4,2         ; @REG_INT_MSK_LINE_B
	.comm	_REG_INT_MSK_STS_B,4,2          ; @REG_INT_MSK_STS_B
	.comm	_TWL6030_MODULE_ID0,4,2         ; @TWL6030_MODULE_ID0
	.comm	_TWL6030_MMCCTRL,4,2            ; @TWL6030_MMCCTRL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"twl6030: Failed to read MMCCTRL, error %d\n"

	.comm	_VMMC_AUTO_OFF,4,2              ; @VMMC_AUTO_OFF
	.comm	_SW_FC,4,2                      ; @SW_FC
l_.str.1:                               ; @.str.1
	.asciz	"twl6030: Failed to write MMCCTRL, error %d\n"

	.comm	_TWL6030_CFG_INPUT_PUPD3,4,2    ; @TWL6030_CFG_INPUT_PUPD3
l_.str.2:                               ; @.str.2
	.asciz	"twl6030: Failed to read CFG_INPUT_PUPD3, error %d\n"

	.comm	_MMC_PU,4,2                     ; @MMC_PU
	.comm	_MMC_PD,4,2                     ; @MMC_PD
l_.str.3:                               ; @.str.3
	.asciz	"twl6030: Failed to write CFG_INPUT_PUPD3, error %d\n"

	.comm	_twl6030_irq,8,3                ; @twl6030_irq
	.comm	_MMCDETECT_INTR_OFFSET,4,2      ; @MMCDETECT_INTR_OFFSET
.subsections_via_symbols
