	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atmci_prepare_command
_atmci_prepare_command:                 ## @atmci_prepare_command
	.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	%rsi, %rbx
	movq	%rdi, %r14
	movq	_EINPROGRESS@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
	movl	%ecx, 24(%rsi)
	movq	(%rsi), %rdi
	callq	_ATMCI_CMDR_CMDNB
	movl	8(%rbx), %ecx
	movq	_MMC_RSP_PRESENT@GOTPCREL(%rip), %rdx
	testl	%ecx, (%rdx)
	je	LBB0_5
## %bb.1:
	movq	_MMC_RSP_136@GOTPCREL(%rip), %rdx
	testl	%ecx, (%rdx)
	je	LBB0_3
## %bb.2:
	movq	_ATMCI_CMDR_RSPTYP_136BIT@GOTPCREL(%rip), %rcx
	jmp	LBB0_4
LBB0_3:
	movq	_ATMCI_CMDR_RSPTYP_48BIT@GOTPCREL(%rip), %rcx
LBB0_4:
	orl	(%rcx), %eax
LBB0_5:
	movq	_ATMCI_CMDR_MAXLAT_64CYC@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	(%r14), %rcx
	movq	_MMC_BUSMODE_OPENDRAIN@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_7
## %bb.6:
	movq	_ATMCI_CMDR_OPDCMD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r15d
LBB0_7:
	orl	%r15d, %eax
	movq	16(%rbx), %rcx
	testq	%rcx, %rcx
	je	LBB0_15
## %bb.8:
	movq	_ATMCI_CMDR_START_XFER@GOTPCREL(%rip), %rdx
	orl	(%rdx), %eax
	movq	(%rbx), %rdx
	movq	_SD_IO_RW_EXTENDED@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rdx
	jne	LBB0_10
## %bb.9:
	movq	_ATMCI_CMDR_SDIO_BLOCK@GOTPCREL(%rip), %rdx
	jmp	LBB0_13
LBB0_10:
	cmpl	$2, (%rcx)
	jl	LBB0_11
## %bb.12:
	movq	_ATMCI_CMDR_MULTI_BLOCK@GOTPCREL(%rip), %rdx
	jmp	LBB0_13
LBB0_11:
	movq	_ATMCI_CMDR_BLOCK@GOTPCREL(%rip), %rdx
LBB0_13:
	orl	(%rdx), %eax
	movq	_MMC_DATA_READ@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%edx, 4(%rcx)
	je	LBB0_15
## %bb.14:
	movq	_ATMCI_CMDR_TRDIR_READ@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
LBB0_15:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINPROGRESS,4,2                ## @EINPROGRESS
	.comm	_MMC_RSP_PRESENT,4,2            ## @MMC_RSP_PRESENT
	.comm	_MMC_RSP_136,4,2                ## @MMC_RSP_136
	.comm	_ATMCI_CMDR_RSPTYP_136BIT,4,2   ## @ATMCI_CMDR_RSPTYP_136BIT
	.comm	_ATMCI_CMDR_RSPTYP_48BIT,4,2    ## @ATMCI_CMDR_RSPTYP_48BIT
	.comm	_ATMCI_CMDR_MAXLAT_64CYC,4,2    ## @ATMCI_CMDR_MAXLAT_64CYC
	.comm	_MMC_BUSMODE_OPENDRAIN,8,3      ## @MMC_BUSMODE_OPENDRAIN
	.comm	_ATMCI_CMDR_OPDCMD,4,2          ## @ATMCI_CMDR_OPDCMD
	.comm	_ATMCI_CMDR_START_XFER,4,2      ## @ATMCI_CMDR_START_XFER
	.comm	_SD_IO_RW_EXTENDED,8,3          ## @SD_IO_RW_EXTENDED
	.comm	_ATMCI_CMDR_SDIO_BLOCK,4,2      ## @ATMCI_CMDR_SDIO_BLOCK
	.comm	_ATMCI_CMDR_MULTI_BLOCK,4,2     ## @ATMCI_CMDR_MULTI_BLOCK
	.comm	_ATMCI_CMDR_BLOCK,4,2           ## @ATMCI_CMDR_BLOCK
	.comm	_MMC_DATA_READ,4,2              ## @MMC_DATA_READ
	.comm	_ATMCI_CMDR_TRDIR_READ,4,2      ## @ATMCI_CMDR_TRDIR_READ
	.no_dead_strip	_atmci_prepare_command
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function atmci_prepare_command
_atmci_prepare_command:                 ; @atmci_prepare_command
	.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, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _EINPROGRESS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINPROGRESS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w8, w8
	str	w8, [x1, #24]
	ldr	x0, [x1]
	bl	_ATMCI_CMDR_CMDNB
	ldr	w8, [x19, #8]
Lloh3:
	adrp	x9, _MMC_RSP_PRESENT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MMC_RSP_PRESENT@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.1:
Lloh6:
	adrp	x9, _MMC_RSP_136@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MMC_RSP_136@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.2:
Lloh9:
	adrp	x8, _ATMCI_CMDR_RSPTYP_136BIT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ATMCI_CMDR_RSPTYP_136BIT@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:
Lloh11:
	adrp	x8, _ATMCI_CMDR_RSPTYP_48BIT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ATMCI_CMDR_RSPTYP_48BIT@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	orr	w0, w8, w0
LBB0_5:
Lloh13:
	adrp	x8, _ATMCI_CMDR_MAXLAT_64CYC@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ATMCI_CMDR_MAXLAT_64CYC@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	orr	w8, w8, w0
	ldr	x9, [x20]
Lloh16:
	adrp	x10, _MMC_BUSMODE_OPENDRAIN@GOTPAGE
Lloh17:
	ldr	x10, [x10, _MMC_BUSMODE_OPENDRAIN@GOTPAGEOFF]
Lloh18:
	adrp	x11, _ATMCI_CMDR_OPDCMD@GOTPAGE
Lloh19:
	ldr	x11, [x11, _ATMCI_CMDR_OPDCMD@GOTPAGEOFF]
Lloh20:
	ldr	x10, [x10]
Lloh21:
	ldr	w11, [x11]
	cmp	x9, x10
	csel	w9, w11, wzr, eq
	orr	w0, w8, w9
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_11
; %bb.6:
Lloh22:
	adrp	x9, _ATMCI_CMDR_START_XFER@GOTPAGE
Lloh23:
	ldr	x9, [x9, _ATMCI_CMDR_START_XFER@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	orr	w9, w9, w0
	ldr	x10, [x19]
Lloh25:
	adrp	x11, _SD_IO_RW_EXTENDED@GOTPAGE
Lloh26:
	ldr	x11, [x11, _SD_IO_RW_EXTENDED@GOTPAGEOFF]
Lloh27:
	ldr	x11, [x11]
	cmp	x10, x11
	b.ne	LBB0_8
; %bb.7:
Lloh28:
	adrp	x10, _ATMCI_CMDR_SDIO_BLOCK@GOTPAGE
Lloh29:
	ldr	x10, [x10, _ATMCI_CMDR_SDIO_BLOCK@GOTPAGEOFF]
	b	LBB0_9
LBB0_8:
	ldr	w10, [x8]
Lloh30:
	adrp	x11, _ATMCI_CMDR_BLOCK@GOTPAGE
Lloh31:
	ldr	x11, [x11, _ATMCI_CMDR_BLOCK@GOTPAGEOFF]
Lloh32:
	adrp	x12, _ATMCI_CMDR_MULTI_BLOCK@GOTPAGE
Lloh33:
	ldr	x12, [x12, _ATMCI_CMDR_MULTI_BLOCK@GOTPAGEOFF]
	cmp	w10, #1
	csel	x10, x12, x11, gt
LBB0_9:
	ldr	w10, [x10]
	orr	w0, w9, w10
	ldr	w8, [x8, #4]
Lloh34:
	adrp	x9, _MMC_DATA_READ@GOTPAGE
Lloh35:
	ldr	x9, [x9, _MMC_DATA_READ@GOTPAGEOFF]
Lloh36:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.10:
Lloh37:
	adrp	x8, _ATMCI_CMDR_TRDIR_READ@GOTPAGE
Lloh38:
	ldr	x8, [x8, _ATMCI_CMDR_TRDIR_READ@GOTPAGEOFF]
Lloh39:
	ldr	w8, [x8]
	orr	w0, w8, w0
LBB0_11:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh20
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.cfi_endproc
                                        ; -- End function
	.comm	_EINPROGRESS,4,2                ; @EINPROGRESS
	.comm	_MMC_RSP_PRESENT,4,2            ; @MMC_RSP_PRESENT
	.comm	_MMC_RSP_136,4,2                ; @MMC_RSP_136
	.comm	_ATMCI_CMDR_RSPTYP_136BIT,4,2   ; @ATMCI_CMDR_RSPTYP_136BIT
	.comm	_ATMCI_CMDR_RSPTYP_48BIT,4,2    ; @ATMCI_CMDR_RSPTYP_48BIT
	.comm	_ATMCI_CMDR_MAXLAT_64CYC,4,2    ; @ATMCI_CMDR_MAXLAT_64CYC
	.comm	_MMC_BUSMODE_OPENDRAIN,8,3      ; @MMC_BUSMODE_OPENDRAIN
	.comm	_ATMCI_CMDR_OPDCMD,4,2          ; @ATMCI_CMDR_OPDCMD
	.comm	_ATMCI_CMDR_START_XFER,4,2      ; @ATMCI_CMDR_START_XFER
	.comm	_SD_IO_RW_EXTENDED,8,3          ; @SD_IO_RW_EXTENDED
	.comm	_ATMCI_CMDR_SDIO_BLOCK,4,2      ; @ATMCI_CMDR_SDIO_BLOCK
	.comm	_ATMCI_CMDR_MULTI_BLOCK,4,2     ; @ATMCI_CMDR_MULTI_BLOCK
	.comm	_ATMCI_CMDR_BLOCK,4,2           ; @ATMCI_CMDR_BLOCK
	.comm	_MMC_DATA_READ,4,2              ; @MMC_DATA_READ
	.comm	_ATMCI_CMDR_TRDIR_READ,4,2      ; @ATMCI_CMDR_TRDIR_READ
	.no_dead_strip	_atmci_prepare_command
.subsections_via_symbols
