	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mmc_davinci_parse_pdata
_mmc_davinci_parse_pdata:               ## @mmc_davinci_parse_pdata
	.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
	movq	%rdi, %r14
	movl	12(%rdi), %edi
	callq	_to_platform_device
	movq	(%rax), %rbx
	testq	%rbx, %rbx
	je	LBB0_1
## %bb.2:
	movq	%r14, %rdi
	callq	_mmc_priv
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	16(%rbx), %rcx
	testq	%rcx, %rcx
	je	LBB0_5
## %bb.4:
	decq	%rcx
	movq	%rcx, (%rax)
LBB0_5:
	movl	(%rbx), %eax
	testl	%eax, %eax
	je	LBB0_8
## %bb.6:
	cmpl	$8, %eax
	je	LBB0_9
## %bb.7:
	cmpl	$4, %eax
	jne	LBB0_11
LBB0_8:
	movl	(%r14), %eax
	movq	_MMC_CAP_4_BIT_DATA@GOTPCREL(%rip), %rcx
	jmp	LBB0_10
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_17
LBB0_9:
	movq	_MMC_CAP_4_BIT_DATA@GOTPCREL(%rip), %rcx
	movq	_MMC_CAP_8_BIT_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	(%rcx), %eax
	movq	%r14, %rcx
LBB0_10:
	orl	(%rcx), %eax
	movl	%eax, (%r14)
LBB0_11:
	movl	$312500, 4(%r14)                ## imm = 0x4C4B4
	movl	4(%rbx), %eax
	testl	%eax, %eax
	movl	$25000000, %ecx                 ## imm = 0x17D7840
	cmovnel	%eax, %ecx
	movl	%ecx, 8(%r14)
	movl	8(%rbx), %eax
	testl	%eax, %eax
	je	LBB0_13
## %bb.12:
	orl	%eax, (%r14)
LBB0_13:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_mmc_gpiod_request_cd
	movl	%eax, %ebx
	movq	_EPROBE_DEFER@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	addl	%ebx, %eax
	je	LBB0_17
## %bb.14:
	testl	%ebx, %ebx
	je	LBB0_16
## %bb.15:
	movq	_MMC_CAP_NEEDS_POLL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r14)
LBB0_16:
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_mmc_gpiod_request_ro
	movl	(%r15), %ecx
	addl	%eax, %ecx
	cmovel	%eax, %ebx
LBB0_17:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_MMC_CAP_4_BIT_DATA,4,2         ## @MMC_CAP_4_BIT_DATA
	.comm	_MMC_CAP_8_BIT_DATA,4,2         ## @MMC_CAP_8_BIT_DATA
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cd"

	.comm	_EPROBE_DEFER,4,2               ## @EPROBE_DEFER
	.comm	_MMC_CAP_NEEDS_POLL,4,2         ## @MMC_CAP_NEEDS_POLL
L_.str.1:                               ## @.str.1
	.asciz	"wp"

	.no_dead_strip	_mmc_davinci_parse_pdata
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mmc_davinci_parse_pdata
_mmc_davinci_parse_pdata:               ; @mmc_davinci_parse_pdata
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	w0, [x0, #12]
	bl	_to_platform_device
	ldr	x20, [x0]
	cbz	x20, LBB0_8
; %bb.1:
	mov	x0, x19
	bl	_mmc_priv
	cbz	x0, LBB0_8
; %bb.2:
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_4
; %bb.3:
	sub	x8, x8, #1
	str	x8, [x0]
LBB0_4:
	ldr	w8, [x20]
	cbz	w8, LBB0_7
; %bb.5:
	cmp	w8, #8
	b.eq	LBB0_9
; %bb.6:
	cmp	w8, #4
	b.ne	LBB0_11
LBB0_7:
	ldr	w8, [x19]
Lloh0:
	adrp	x9, _MMC_CAP_4_BIT_DATA@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MMC_CAP_4_BIT_DATA@GOTPAGEOFF]
	b	LBB0_10
LBB0_8:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_17
LBB0_9:
Lloh5:
	adrp	x8, _MMC_CAP_4_BIT_DATA@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MMC_CAP_4_BIT_DATA@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _MMC_CAP_8_BIT_DATA@GOTPAGE
Lloh9:
	ldr	x9, [x9, _MMC_CAP_8_BIT_DATA@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w8, w9, w8
	mov	x9, x19
LBB0_10:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [x19]
LBB0_11:
	mov	w8, #50356
	movk	w8, #4, lsl #16
	ldr	w9, [x20, #4]
	mov	w10, #30784
	movk	w10, #381, lsl #16
	cmp	w9, #0
	csel	w9, w10, w9, eq
	stp	w8, w9, [x19, #4]
	ldr	w8, [x20, #8]
	cbz	w8, LBB0_13
; %bb.12:
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
LBB0_13:
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	w2, #0
	mov	w3, #0
	mov	w4, #0
	mov	x5, #0
	bl	_mmc_gpiod_request_cd
Lloh13:
	adrp	x20, _EPROBE_DEFER@GOTPAGE
Lloh14:
	ldr	x20, [x20, _EPROBE_DEFER@GOTPAGEOFF]
	ldr	w8, [x20]
	cmn	w0, w8
	b.eq	LBB0_17
; %bb.14:
	cbz	w0, LBB0_16
; %bb.15:
Lloh15:
	adrp	x8, _MMC_CAP_NEEDS_POLL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MMC_CAP_NEEDS_POLL@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
LBB0_16:
Lloh18:
	adrp	x1, l_.str.1@PAGE
Lloh19:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	w2, #0
	mov	w3, #0
	mov	x4, #0
	bl	_mmc_gpiod_request_ro
	ldr	w8, [x20]
	cmn	w0, w8
	csel	w0, w0, wzr, eq
LBB0_17:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_MMC_CAP_4_BIT_DATA,4,2         ; @MMC_CAP_4_BIT_DATA
	.comm	_MMC_CAP_8_BIT_DATA,4,2         ; @MMC_CAP_8_BIT_DATA
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cd"

	.comm	_EPROBE_DEFER,4,2               ; @EPROBE_DEFER
	.comm	_MMC_CAP_NEEDS_POLL,4,2         ; @MMC_CAP_NEEDS_POLL
l_.str.1:                               ; @.str.1
	.asciz	"wp"

	.no_dead_strip	_mmc_davinci_parse_pdata
.subsections_via_symbols
