	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function s3cmci_send_request
_s3cmci_send_request:                   ## @s3cmci_send_request
	.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
	movq	%rdi, %r14
	callq	_mmc_priv
	movq	%rax, %rbx
	movq	16(%rax), %rdx
	movq	32(%rax), %r15
	xorl	%eax, %eax
	testq	%rdx, %rdx
	setne	%al
	movq	(%r15,%rax,8), %r12
	incl	24(%rbx)
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_prepare_dbgmsg
	movq	_S3C2410_SDICMDSTAT@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%rbx), %rsi
	movl	$-1, %edi
	callq	_writel
	movq	_S3C2410_SDIDSTA@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%rbx), %rsi
	movl	$-1, %edi
	callq	_writel
	movq	_S3C2410_SDIFSTA@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%rbx), %rsi
	movl	$-1, %edi
	callq	_writel
	movq	8(%r12), %rsi
	testq	%rsi, %rsi
	je	LBB0_9
## %bb.1:
	movq	%rbx, %rdi
	callq	_s3cmci_setup_data
	incl	(%rbx)
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	movl	%eax, %r13d
	movq	_dbg_err@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	jmp	LBB0_8
LBB0_3:
	movq	%rbx, %rdi
	callq	_s3cmci_host_usedma
	movq	8(%r12), %rsi
	movq	%rbx, %rdi
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	callq	_s3cmci_prepare_dma
	jmp	LBB0_6
LBB0_5:
	callq	_s3cmci_prepare_pio
LBB0_6:
	movl	%eax, %r13d
	testl	%eax, %eax
	je	LBB0_9
## %bb.7:
	movq	_dbg_err@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
LBB0_8:
	movq	%rbx, %rdi
	movl	%r13d, %ecx
	callq	_dbg
	movl	%r13d, (%r12)
	movq	8(%r12), %rax
	movl	%r13d, (%rax)
	movq	%r14, %rdi
	movq	%r15, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mmc_request_done               ## TAILCALL
LBB0_9:
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_s3cmci_send_command
	movq	%rbx, %rdi
	movl	$1, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_s3cmci_enable_irq              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_S3C2410_SDICMDSTAT,8,3         ## @S3C2410_SDICMDSTAT
	.comm	_S3C2410_SDIDSTA,8,3            ## @S3C2410_SDIDSTA
	.comm	_S3C2410_SDIFSTA,8,3            ## @S3C2410_SDIFSTA
	.comm	_dbg_err,4,2                    ## @dbg_err
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"setup data error %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"data prepare error %d\n"

	.no_dead_strip	_s3cmci_send_request
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function s3cmci_send_request
_s3cmci_send_request:                   ; @s3cmci_send_request
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	bl	_mmc_priv
	mov	x22, x0
	ldr	x20, [x0, #32]
	ldr	x2, [x0, #16]
	cmp	x2, #0
	cset	w8, ne
	ldr	x21, [x20, w8, uxtw #3]
	ldr	w8, [x0, #24]
	add	w8, w8, #1
	str	w8, [x0, #24]
	mov	x1, x21
	bl	_prepare_dbgmsg
	ldr	x8, [x22, #8]
Lloh0:
	adrp	x9, _S3C2410_SDICMDSTAT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _S3C2410_SDICMDSTAT@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #-1
	bl	_writel
	ldr	x8, [x22, #8]
Lloh3:
	adrp	x9, _S3C2410_SDIDSTA@GOTPAGE
Lloh4:
	ldr	x9, [x9, _S3C2410_SDIDSTA@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #-1
	bl	_writel
	ldr	x8, [x22, #8]
Lloh6:
	adrp	x9, _S3C2410_SDIFSTA@GOTPAGE
Lloh7:
	ldr	x9, [x9, _S3C2410_SDIFSTA@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #-1
	bl	_writel
	ldr	x1, [x21, #8]
	cbz	x1, LBB0_8
; %bb.1:
	mov	x0, x22
	bl	_s3cmci_setup_data
	ldr	w8, [x22]
	add	w8, w8, #1
	str	w8, [x22]
	cbz	w0, LBB0_3
; %bb.2:
	mov	x23, x0
Lloh9:
	adrp	x8, _dbg_err@GOTPAGE
Lloh10:
	ldr	x8, [x8, _dbg_err@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
Lloh12:
	adrp	x2, l_.str@PAGE
Lloh13:
	add	x2, x2, l_.str@PAGEOFF
	b	LBB0_6
LBB0_3:
	mov	x0, x22
	bl	_s3cmci_host_usedma
	ldr	x1, [x21, #8]
	cbz	x0, LBB0_7
; %bb.4:
	mov	x0, x22
	bl	_s3cmci_prepare_dma
	mov	x23, x0
	cbz	w0, LBB0_8
LBB0_5:
Lloh14:
	adrp	x8, _dbg_err@GOTPAGE
Lloh15:
	ldr	x8, [x8, _dbg_err@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
Lloh17:
	adrp	x2, l_.str.1@PAGE
Lloh18:
	add	x2, x2, l_.str.1@PAGEOFF
LBB0_6:
	mov	x0, x22
	mov	x3, x23
	bl	_dbg
	str	w23, [x21]
	ldr	x8, [x21, #8]
	str	w23, [x8]
	mov	x0, x19
	mov	x1, x20
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_mmc_request_done
LBB0_7:
	mov	x0, x22
	bl	_s3cmci_prepare_pio
	mov	x23, x0
	cbnz	w0, LBB0_5
LBB0_8:
	mov	x0, x22
	mov	x1, x21
	bl	_s3cmci_send_command
	mov	x0, x22
	mov	w1, #1
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_s3cmci_enable_irq
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_S3C2410_SDICMDSTAT,8,3         ; @S3C2410_SDICMDSTAT
	.comm	_S3C2410_SDIDSTA,8,3            ; @S3C2410_SDIDSTA
	.comm	_S3C2410_SDIFSTA,8,3            ; @S3C2410_SDIFSTA
	.comm	_dbg_err,4,2                    ; @dbg_err
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"setup data error %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"data prepare error %d\n"

	.no_dead_strip	_s3cmci_send_request
.subsections_via_symbols
