	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_AT91F_MCI_SDCard_SendAppCommand ## -- Begin function AT91F_MCI_SDCard_SendAppCommand
	.p2align	4, 0x90
_AT91F_MCI_SDCard_SendAppCommand:       ## @AT91F_MCI_SDCard_SendAppCommand
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	(%rdi), %rax
	movl	(%rax), %eax
	shll	$16, %eax
	movq	_AT91C_BASE_MCI@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%eax, (%rcx)
	movq	_AT91C_APP_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rcx)
	movl	4(%rcx), %eax
	movq	_AT91C_MCI_CMDRDY@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_1
## %bb.2:
	movq	_AT91C_MCI_SR_ERROR@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	je	LBB0_3
## %bb.6:
	popq	%rbp
	retq
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	jmp	LBB0_1
LBB0_3:
	testl	%esi, %esi
	je	LBB0_5
## %bb.4:
	movq	_AT91C_SDCARD_APP_ALL_CMD@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_5
## %bb.7:
	popq	%rbp
	jmp	_AT91F_MCI_SendCommand          ## TAILCALL
LBB0_5:
	movq	_AT91C_CMD_SEND_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AT91C_BASE_MCI,8,3             ## @AT91C_BASE_MCI
	.comm	_AT91C_APP_CMD,4,2              ## @AT91C_APP_CMD
	.comm	_AT91C_MCI_CMDRDY,4,2           ## @AT91C_MCI_CMDRDY
	.comm	_AT91C_MCI_SR_ERROR,4,2         ## @AT91C_MCI_SR_ERROR
	.comm	_AT91C_SDCARD_APP_ALL_CMD,8,3   ## @AT91C_SDCARD_APP_ALL_CMD
	.comm	_AT91C_CMD_SEND_ERROR,4,2       ## @AT91C_CMD_SEND_ERROR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_AT91F_MCI_SDCard_SendAppCommand ; -- Begin function AT91F_MCI_SDCard_SendAppCommand
	.p2align	2
_AT91F_MCI_SDCard_SendAppCommand:       ; @AT91F_MCI_SDCard_SendAppCommand
	.cfi_startproc
; %bb.0:
	ldr	x8, [x0]
	ldr	w8, [x8]
Lloh0:
	adrp	x9, _AT91C_BASE_MCI@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AT91C_BASE_MCI@GOTPAGEOFF]
	lsl	w8, w8, #16
Lloh2:
	ldr	x9, [x9]
	str	w8, [x9]
Lloh3:
	adrp	x8, _AT91C_APP_CMD@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AT91C_APP_CMD@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x9, #8]
	ldr	w8, [x9, #4]
Lloh6:
	adrp	x9, _AT91C_MCI_CMDRDY@GOTPAGE
Lloh7:
	ldr	x9, [x9, _AT91C_MCI_CMDRDY@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.1:
Lloh9:
	adrp	x9, _AT91C_MCI_SR_ERROR@GOTPAGE
Lloh10:
	ldr	x9, [x9, _AT91C_MCI_SR_ERROR@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	ands	w8, w9, w8
	b.eq	LBB0_4
; %bb.2:
	mov	x0, x8
	ret
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	b	LBB0_3
LBB0_4:
	cbz	w1, LBB0_7
; %bb.5:
Lloh12:
	adrp	x8, _AT91C_SDCARD_APP_ALL_CMD@GOTPAGE
Lloh13:
	ldr	x8, [x8, _AT91C_SDCARD_APP_ALL_CMD@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	cbz	x8, LBB0_7
; %bb.6:
	b	_AT91F_MCI_SendCommand
LBB0_7:
Lloh15:
	adrp	x8, _AT91C_CMD_SEND_ERROR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _AT91C_CMD_SEND_ERROR@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	mov	x0, x8
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_AT91C_BASE_MCI,8,3             ; @AT91C_BASE_MCI
	.comm	_AT91C_APP_CMD,4,2              ; @AT91C_APP_CMD
	.comm	_AT91C_MCI_CMDRDY,4,2           ; @AT91C_MCI_CMDRDY
	.comm	_AT91C_MCI_SR_ERROR,4,2         ; @AT91C_MCI_SR_ERROR
	.comm	_AT91C_SDCARD_APP_ALL_CMD,8,3   ; @AT91C_SDCARD_APP_ALL_CMD
	.comm	_AT91C_CMD_SEND_ERROR,4,2       ; @AT91C_CMD_SEND_ERROR
.subsections_via_symbols
