	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mmc_io_rw_extended             ## -- Begin function mmc_io_rw_extended
	.p2align	4, 0x90
_mmc_io_rw_extended:                    ## @mmc_io_rw_extended
	.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
	subq	$232, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r14
	movl	%r8d, -48(%rbp)                 ## 4-byte Spill
	movl	%ecx, %ebx
	movl	%edx, %r13d
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	%rdi, %rax
	movl	24(%rbp), %r12d
	movl	16(%rbp), %r15d
	xorl	%edi, %edi
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	sete	%dil
	callq	_BUG_ON
	xorl	%edi, %edi
	cmpl	$8, %r13d
	setae	%dil
	callq	_BUG_ON
	cmpl	$1, %r15d
	sete	%al
	cmpl	$513, %r12d                     ## imm = 0x201
	setae	%cl
	andb	%al, %cl
	movzbl	%cl, %edi
	callq	_BUG_ON
	xorl	%edi, %edi
	testl	%r15d, %r15d
	sete	%dil
	callq	_WARN_ON
	xorl	%edi, %edi
	testl	%r12d, %r12d
	sete	%dil
	callq	_WARN_ON
	cmpl	$131072, %ebx                   ## imm = 0x20000
	jae	LBB0_1
## %bb.2:
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	leaq	-264(%rbp), %rdi
	xorl	%r14d, %r14d
	xorl	%esi, %esi
	movl	$64, %edx
	callq	_memset
	leaq	-200(%rbp), %rdi
	xorl	%esi, %esi
	movl	$64, %edx
	callq	_memset
	leaq	-136(%rbp), %rdi
	movq	%rdi, %r15
	xorl	%esi, %esi
	movl	$64, %edx
	callq	_memset
	xorl	%ecx, %ecx
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	setne	%dl
	jne	LBB0_3
## %bb.4:
	movq	_MMC_DATA_READ@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_3:
	movq	_MMC_DATA_WRITE@GOTPCREL(%rip), %rax
LBB0_5:
	movb	%dl, %cl
	shll	$31, %ecx
	shll	$28, %r13d
	xorl	%edx, %edx
	cmpl	$0, -48(%rbp)                   ## 4-byte Folded Reload
	setne	%dl
	shll	$26, %edx
	shll	$9, %ebx
	movl	16(%rbp), %r8d
	movl	%r8d, %esi
	orl	$134217728, %esi                ## imm = 0x8000000
	cmpl	$512, %r12d                     ## imm = 0x200
	cmovnel	%r12d, %r14d
	cmoval	%esi, %r14d
	cmpl	$1, %r8d
	leaq	-200(%rbp), %rdi
	movq	%rdi, -208(%rbp)
	movq	%r15, -216(%rbp)
	movq	_SD_IO_RW_EXTENDED@GOTPCREL(%rip), %rdi
	movl	(%rdi), %edi
	movl	%edi, -160(%rbp)
	cmovnel	%esi, %r14d
	orl	%r13d, %ebx
	orl	%ecx, %ebx
	orl	%edx, %ebx
	orl	%r14d, %ebx
	movl	%ebx, -200(%rbp)
	movq	_MMC_RSP_SPI_R5@GOTPCREL(%rip), %rcx
	movq	_MMC_RSP_R5@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	movq	_MMC_CMD_ADTC@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edx
	movl	%edx, -196(%rbp)
	movl	%r12d, -128(%rbp)
	movl	%r8d, -124(%rbp)
	movl	(%rax), %eax
	movl	%eax, -132(%rbp)
	leaq	-72(%rbp), %rdi
	movq	%rdi, -104(%rbp)
	movl	$1, -120(%rbp)
	imull	%r8d, %r12d
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movl	%r12d, %edx
	callq	_sg_init_one
	movq	%r15, %rdi
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rsi
	callq	_mmc_set_data_timeout
	movl	(%rbx), %edi
	leaq	-264(%rbp), %rsi
	callq	_mmc_wait_for_req
	movl	-180(%rbp), %eax
	testl	%eax, %eax
	jne	LBB0_14
## %bb.6:
	movl	-116(%rbp), %eax
	testl	%eax, %eax
	jne	LBB0_14
## %bb.7:
	movl	(%rbx), %edi
	callq	_mmc_host_is_spi
	movq	%rax, %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	jne	LBB0_14
## %bb.8:
	movq	-176(%rbp), %rcx
	movl	(%rcx), %ecx
	movq	_R5_ERROR@GOTPCREL(%rip), %rdx
	testl	%ecx, (%rdx)
	je	LBB0_10
## %bb.9:
	movq	_EIO@GOTPCREL(%rip), %rcx
	jmp	LBB0_13
LBB0_10:
	movq	_R5_FUNCTION_NUMBER@GOTPCREL(%rip), %rdx
	testl	%ecx, (%rdx)
	je	LBB0_11
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_13:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_14:
	addq	$232, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	_R5_OUT_OF_RANGE@GOTPCREL(%rip), %rdx
	testl	%ecx, (%rdx)
	je	LBB0_14
## %bb.12:
	movq	_ERANGE@GOTPCREL(%rip), %rcx
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SD_IO_RW_EXTENDED,4,2          ## @SD_IO_RW_EXTENDED
	.comm	_MMC_RSP_SPI_R5,4,2             ## @MMC_RSP_SPI_R5
	.comm	_MMC_RSP_R5,4,2                 ## @MMC_RSP_R5
	.comm	_MMC_CMD_ADTC,4,2               ## @MMC_CMD_ADTC
	.comm	_MMC_DATA_WRITE,4,2             ## @MMC_DATA_WRITE
	.comm	_MMC_DATA_READ,4,2              ## @MMC_DATA_READ
	.comm	_R5_ERROR,4,2                   ## @R5_ERROR
	.comm	_EIO,4,2                        ## @EIO
	.comm	_R5_FUNCTION_NUMBER,4,2         ## @R5_FUNCTION_NUMBER
	.comm	_R5_OUT_OF_RANGE,4,2            ## @R5_OUT_OF_RANGE
	.comm	_ERANGE,4,2                     ## @ERANGE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mmc_io_rw_extended             ; -- Begin function mmc_io_rw_extended
	.p2align	2
_mmc_io_rw_extended:                    ; @mmc_io_rw_extended
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #304
	.cfi_def_cfa_offset 304
	stp	x28, x27, [sp, #208]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #224]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #240]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #256]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #272]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #288]            ; 16-byte Folded Spill
	add	x29, sp, #288
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x7
	mov	x22, x6
	mov	x20, x5
	mov	x26, x4
	mov	x23, x3
	mov	x24, x2
	mov	x25, x1
	mov	x19, x0
	cmp	x0, #0
	cset	w0, eq
	bl	_BUG_ON
	cmp	w24, #7
	cset	w0, hi
	bl	_BUG_ON
	cmp	w22, #1
	mov	w8, #512
	ccmp	w21, w8, #0, eq
	cset	w0, hi
	bl	_BUG_ON
	cmp	w22, #0
	cset	w0, eq
	bl	_WARN_ON
	cmp	w21, #0
	cset	w0, eq
	bl	_WARN_ON
	cmp	w23, #32, lsl #12               ; =131072
	b.hs	LBB0_8
; %bb.1:
	add	x0, sp, #136
	mov	w1, #0
	mov	w2, #64
	bl	_memset
	add	x27, sp, #72
	add	x0, sp, #72
	mov	w1, #0
	mov	w2, #64
	bl	_memset
	add	x28, sp, #8
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #64
	bl	_memset
	cmp	w26, #0
	cset	w8, ne
	cmp	w21, #512
	csel	w9, wzr, w21, eq
	cmp	w21, #513
	ccmp	w22, #1, #0, lo
	stp	x28, x27, [sp, #184]
Lloh0:
	adrp	x10, _SD_IO_RW_EXTENDED@GOTPAGE
Lloh1:
	ldr	x10, [x10, _SD_IO_RW_EXTENDED@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
	str	w10, [sp, #112]
	orr	w10, w22, #0x8000000
	csel	w9, w9, w10, eq
	cmp	w25, #0
	cset	w10, ne
	lsl	w10, w10, #31
	orr	w10, w10, w24, lsl #28
	orr	w10, w10, w23, lsl #9
	orr	w8, w10, w8, lsl #26
	orr	w8, w8, w9
Lloh3:
	adrp	x9, _MMC_RSP_SPI_R5@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MMC_RSP_SPI_R5@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
Lloh6:
	adrp	x10, _MMC_RSP_R5@GOTPAGE
Lloh7:
	ldr	x10, [x10, _MMC_RSP_R5@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	orr	w9, w10, w9
Lloh9:
	adrp	x10, _MMC_CMD_ADTC@GOTPAGE
Lloh10:
	ldr	x10, [x10, _MMC_CMD_ADTC@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	orr	w9, w9, w10
	stp	w8, w9, [sp, #72]
	stp	w21, w22, [sp, #16]
Lloh12:
	adrp	x8, _MMC_DATA_WRITE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MMC_DATA_WRITE@GOTPAGEOFF]
Lloh14:
	adrp	x9, _MMC_DATA_READ@GOTPAGE
Lloh15:
	ldr	x9, [x9, _MMC_DATA_READ@GOTPAGEOFF]
	csel	x8, x9, x8, eq
	ldr	w8, [x8]
	mov	x9, sp
	str	x9, [sp, #40]
	mov	w9, #1
	str	w8, [sp, #12]
	str	w9, [sp, #24]
	mul	w2, w21, w22
	mov	x0, sp
	mov	x1, x20
	bl	_sg_init_one
	add	x0, sp, #8
	mov	x1, x19
	bl	_mmc_set_data_timeout
	ldr	w0, [x19]
	add	x1, sp, #136
	bl	_mmc_wait_for_req
	ldr	w0, [sp, #92]
	cbnz	w0, LBB0_10
; %bb.2:
	ldr	w0, [sp, #28]
	cbnz	w0, LBB0_10
; %bb.3:
	ldr	w0, [x19]
	bl	_mmc_host_is_spi
	cbz	x0, LBB0_5
LBB0_4:
	mov	w0, #0
	b	LBB0_10
LBB0_5:
	ldr	x8, [sp, #96]
	ldr	w8, [x8]
Lloh16:
	adrp	x9, _R5_ERROR@GOTPAGE
Lloh17:
	ldr	x9, [x9, _R5_ERROR@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.6:
Lloh19:
	adrp	x8, _EIO@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_9
LBB0_7:
Lloh21:
	adrp	x9, _R5_FUNCTION_NUMBER@GOTPAGE
Lloh22:
	ldr	x9, [x9, _R5_FUNCTION_NUMBER@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_11
LBB0_8:
Lloh24:
	adrp	x8, _EINVAL@GOTPAGE
Lloh25:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_10:
	ldp	x29, x30, [sp, #288]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #272]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #256]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #240]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #224]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #208]            ; 16-byte Folded Reload
	add	sp, sp, #304
	ret
LBB0_11:
Lloh26:
	adrp	x9, _R5_OUT_OF_RANGE@GOTPAGE
Lloh27:
	ldr	x9, [x9, _R5_OUT_OF_RANGE@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.12:
Lloh29:
	adrp	x8, _ERANGE@GOTPAGE
Lloh30:
	ldr	x8, [x8, _ERANGE@GOTPAGEOFF]
	b	LBB0_9
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SD_IO_RW_EXTENDED,4,2          ; @SD_IO_RW_EXTENDED
	.comm	_MMC_RSP_SPI_R5,4,2             ; @MMC_RSP_SPI_R5
	.comm	_MMC_RSP_R5,4,2                 ; @MMC_RSP_R5
	.comm	_MMC_CMD_ADTC,4,2               ; @MMC_CMD_ADTC
	.comm	_MMC_DATA_WRITE,4,2             ; @MMC_DATA_WRITE
	.comm	_MMC_DATA_READ,4,2              ; @MMC_DATA_READ
	.comm	_R5_ERROR,4,2                   ; @R5_ERROR
	.comm	_EIO,4,2                        ; @EIO
	.comm	_R5_FUNCTION_NUMBER,4,2         ; @R5_FUNCTION_NUMBER
	.comm	_R5_OUT_OF_RANGE,4,2            ; @R5_OUT_OF_RANGE
	.comm	_ERANGE,4,2                     ; @ERANGE
.subsections_via_symbols
