	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sdio_io_rw_ext_helper
_sdio_io_rw_ext_helper:                 ## @sdio_io_rw_ext_helper
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, -48(%rbp)                 ## 4-byte Spill
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	movq	%rdi, %rsi
	cmpl	$8, (%rdi)
	jl	LBB0_3
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_17
LBB0_3:
	movl	%r9d, %r12d
	movq	%r8, %r15
	movl	%ecx, %r14d
	movl	%edx, %ebx
	movq	8(%rsi), %rax
	cmpq	$0, 8(%rax)
	je	LBB0_4
## %bb.5:
	movq	%rsi, %rdi
	movq	%rsi, %r13
	callq	_sdio_max_byte_size
	cmpl	%r12d, %eax
	jae	LBB0_6
## %bb.7:
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movq	8(%r13), %rax
	movq	(%rax), %rax
	movl	(%rax), %edi
	movl	$511, %esi                      ## imm = 0x1FF
	callq	_min
	movq	%r13, %rsi
	movl	4(%r13), %r13d
	movl	%r12d, %ebx
	cmpl	%r12d, %r13d
	jbe	LBB0_9
## %bb.8:
	movl	%ebx, %r12d
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	jmp	LBB0_13
LBB0_4:
	movl	%r14d, %r8d
	movq	%r15, %r9
	movl	%ebx, %r15d
	jmp	LBB0_12
LBB0_6:
	movl	%r14d, %r8d
	movq	%r15, %r9
	movl	%ebx, %r15d
	movq	%r13, %rsi
LBB0_12:
	movl	%r15d, %ebx
	testl	%r12d, %r12d
	movl	%r8d, %r14d
	movq	%r9, %r15
	je	LBB0_16
LBB0_13:
	movl	%r14d, -52(%rbp)                ## 4-byte Spill
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movq	%rsi, %rdi
	movq	%r15, %rbx
	movq	%rsi, %r15
	callq	_sdio_max_byte_size
	movl	%r12d, %edi
	movl	%eax, %esi
	callq	_min
	movl	%eax, %r13d
	movq	8(%r15), %rdi
	movq	%r15, %r14
	movl	(%r15), %edx
	movq	%rbx, %r15
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	movl	%ebx, %ecx
	movl	-52(%rbp), %r8d                 ## 4-byte Reload
	movq	%r15, %r9
	pushq	%r13
	pushq	$0
	callq	_mmc_io_rw_extended
	addq	$16, %rsp
	testl	%eax, %eax
	jne	LBB0_17
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	testl	%ecx, %ecx
	movl	%r13d, %eax
	cmovel	%ecx, %eax
	addl	%eax, %ebx
	movl	%r13d, %eax
	leaq	(%r15,%rax,4), %r15
	subl	%r13d, %r12d
	movq	%r14, %rsi
	jne	LBB0_14
LBB0_16:
	xorl	%eax, %eax
LBB0_17:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movl	%eax, %edi
	movl	%r14d, %r8d
	movq	%r15, %r9
	movl	%ebx, %r12d
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movl	%r12d, %eax
	xorl	%edx, %edx
	divl	%r13d
	movl	%eax, %r15d
	cmpl	%edi, %eax
	cmovael	%edi, %r15d
	movq	8(%rsi), %rdi
	movl	(%rsi), %edx
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movl	%r8d, %ebx
	movq	%r9, %r14
	pushq	%r13
	pushq	%r15
	callq	_mmc_io_rw_extended
	addq	$16, %rsp
	testl	%eax, %eax
	jne	LBB0_17
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	imull	%r13d, %r15d
	subl	%r15d, %r12d
	movl	%ebx, %r8d
	testl	%ebx, %ebx
	movq	%r14, %r9
	leaq	(%r14,%r15,4), %r9
	cmovel	%ebx, %r15d
	addl	-44(%rbp), %r15d                ## 4-byte Folded Reload
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movl	4(%rsi), %r13d
	movl	%r15d, %ecx
	cmpl	%r13d, %r12d
	movl	-56(%rbp), %edi                 ## 4-byte Reload
	jae	LBB0_10
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_sdio_io_rw_ext_helper
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sdio_io_rw_ext_helper
_sdio_io_rw_ext_helper:                 ; @sdio_io_rw_ext_helper
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	cbz	x0, LBB0_2
; %bb.1:
	mov	x24, x0
	ldr	w8, [x0]
	cmp	w8, #8
	b.lt	LBB0_3
LBB0_2:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_13
LBB0_3:
	mov	x19, x5
	mov	x20, x4
	mov	x21, x3
	mov	x22, x2
	mov	x23, x1
	ldr	x8, [x24, #8]
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_9
; %bb.4:
	mov	x0, x24
	bl	_sdio_max_byte_size
	cmp	w0, w19
	b.hs	LBB0_9
; %bb.5:
	ldr	x8, [x24, #8]
	ldr	x8, [x8]
	ldr	w0, [x8]
	mov	w1, #511
	bl	_min
	ldr	w26, [x24, #4]
	cmp	w26, w19
	b.hi	LBB0_10
; %bb.6:
	mov	x25, x0
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	udiv	w8, w19, w26
	cmp	w8, w25
	csel	w27, w8, w25, lo
	ldr	x0, [x24, #8]
	ldr	w2, [x24]
	mov	x1, x23
	mov	x3, x22
	mov	x4, x21
	mov	x5, x20
	mov	x6, x27
	mov	x7, x26
	bl	_mmc_io_rw_extended
	cbnz	w0, LBB0_13
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	mul	w8, w27, w26
	add	x20, x20, w8, uxtw #2
	cmp	w21, #0
	csel	w9, wzr, w8, eq
	add	w22, w9, w22
	ldr	w26, [x24, #4]
	sub	w19, w19, w8
	cmp	w19, w26
	b.hs	LBB0_7
LBB0_9:
	cbz	w19, LBB0_12
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x24
	bl	_sdio_max_byte_size
	mov	x1, x0
	mov	x0, x19
	bl	_min
	mov	x25, x0
	ldr	x0, [x24, #8]
	ldr	w2, [x24]
	mov	x1, x23
	mov	x3, x22
	mov	x4, x21
	mov	x5, x20
	mov	w6, #0
	mov	x7, x25
	bl	_mmc_io_rw_extended
	cbnz	w0, LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	add	x20, x20, w25, uxtw #2
	cmp	w21, #0
	csel	w8, wzr, w25, eq
	add	w22, w8, w22
	sub	w19, w19, w25
	cbnz	w19, LBB0_10
LBB0_12:
	mov	w0, #0
LBB0_13:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_sdio_io_rw_ext_helper
.subsections_via_symbols
