	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function s3cmci_prepare_pio
_s3cmci_prepare_pio:                    ## @s3cmci_prepare_pio
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movl	(%rsi), %eax
	movq	_MMC_DATA_WRITE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	andl	%eax, %ebx
	movq	_BOTH_DIR@GOTPCREL(%rip), %rcx
	notl	%eax
	xorl	%edi, %edi
	andl	(%rcx), %eax
	sete	%dil
	callq	_BUG_ON
	xorps	%xmm0, %xmm0
	movups	%xmm0, 8(%r14)
	movq	$0, 24(%r14)
	testl	%ebx, %ebx
	jne	LBB0_1
## %bb.2:
	movq	_XFER_READ@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_XFER_WRITE@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %eax
	movl	%eax, (%r14)
	je	LBB0_5
## %bb.4:
	movq	%r14, %rdi
	callq	_do_pio_write
	movq	_S3C2410_SDIIMSK_TXFIFOHALF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	jmp	LBB0_6
LBB0_5:
	movq	_S3C2410_SDIIMSK_RXFIFOHALF@GOTPCREL(%rip), %rax
	movq	_S3C2410_SDIIMSK_RXFIFOLAST@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
LBB0_6:
	movq	%r14, %rdi
	callq	_enable_imask
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MMC_DATA_WRITE,4,2             ## @MMC_DATA_WRITE
	.comm	_BOTH_DIR,4,2                   ## @BOTH_DIR
	.comm	_XFER_WRITE,4,2                 ## @XFER_WRITE
	.comm	_XFER_READ,4,2                  ## @XFER_READ
	.comm	_S3C2410_SDIIMSK_TXFIFOHALF,4,2 ## @S3C2410_SDIIMSK_TXFIFOHALF
	.comm	_S3C2410_SDIIMSK_RXFIFOHALF,4,2 ## @S3C2410_SDIIMSK_RXFIFOHALF
	.comm	_S3C2410_SDIIMSK_RXFIFOLAST,4,2 ## @S3C2410_SDIIMSK_RXFIFOLAST
	.no_dead_strip	_s3cmci_prepare_pio
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function s3cmci_prepare_pio
_s3cmci_prepare_pio:                    ; @s3cmci_prepare_pio
	.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	x19, x0
	ldr	w20, [x1]
Lloh0:
	adrp	x8, _MMC_DATA_WRITE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MMC_DATA_WRITE@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
Lloh3:
	adrp	x8, _BOTH_DIR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BOTH_DIR@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	bics	wzr, w8, w20
	cset	w0, eq
	bl	_BUG_ON
	stp	xzr, xzr, [x19, #16]
	str	xzr, [x19, #8]
Lloh6:
	adrp	x8, _XFER_WRITE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _XFER_WRITE@GOTPAGEOFF]
Lloh8:
	adrp	x9, _XFER_READ@GOTPAGE
Lloh9:
	ldr	x9, [x9, _XFER_READ@GOTPAGEOFF]
	ands	w10, w21, w20
	csel	x8, x9, x8, eq
	ldr	w8, [x8]
	str	w8, [x19]
	cbz	w10, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_do_pio_write
Lloh10:
	adrp	x8, _S3C2410_SDIIMSK_TXFIFOHALF@GOTPAGE
Lloh11:
	ldr	x8, [x8, _S3C2410_SDIIMSK_TXFIFOHALF@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	b	LBB0_3
LBB0_2:
Lloh13:
	adrp	x8, _S3C2410_SDIIMSK_RXFIFOHALF@GOTPAGE
Lloh14:
	ldr	x8, [x8, _S3C2410_SDIIMSK_RXFIFOHALF@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
Lloh16:
	adrp	x9, _S3C2410_SDIIMSK_RXFIFOLAST@GOTPAGE
Lloh17:
	ldr	x9, [x9, _S3C2410_SDIIMSK_RXFIFOLAST@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	orr	w1, w9, w8
LBB0_3:
	mov	x0, x19
	bl	_enable_imask
	mov	w0, #0
	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 AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_MMC_DATA_WRITE,4,2             ; @MMC_DATA_WRITE
	.comm	_BOTH_DIR,4,2                   ; @BOTH_DIR
	.comm	_XFER_WRITE,4,2                 ; @XFER_WRITE
	.comm	_XFER_READ,4,2                  ; @XFER_READ
	.comm	_S3C2410_SDIIMSK_TXFIFOHALF,4,2 ; @S3C2410_SDIIMSK_TXFIFOHALF
	.comm	_S3C2410_SDIIMSK_RXFIFOHALF,4,2 ; @S3C2410_SDIIMSK_RXFIFOHALF
	.comm	_S3C2410_SDIIMSK_RXFIFOLAST,4,2 ; @S3C2410_SDIIMSK_RXFIFOLAST
	.no_dead_strip	_s3cmci_prepare_pio
.subsections_via_symbols
