	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sd_normal_rw
_sd_normal_rw:                          ## @sd_normal_rw
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	(%rsi), %rbx
	movq	8(%rsi), %r14
	movq	8(%rbx), %rdi
	movq	_GFP_NOIO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_9
## %bb.1:
	movq	%rax, %r12
	movq	_MMC_DATA_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_7
## %bb.2:
	cmpq	$0, (%r15)
	je	LBB0_4
## %bb.3:
	movq	%r15, %rdi
	callq	_sd_disable_initial_mode
LBB0_4:
	movq	8(%rbx), %rdx
	movq	%r15, %rdi
	movq	%r14, %rsi
	movq	%r12, %rcx
	movq	%rdx, %r8
	movl	$200, %r9d
	callq	_sd_read_data
	movl	%eax, (%r14)
	cmpq	$0, (%r15)
	je	LBB0_6
## %bb.5:
	movq	%r15, %rdi
	callq	_sd_enable_initial_mode
LBB0_6:
	movl	20(%rbx), %edi
	movl	16(%rbx), %esi
	movq	8(%rbx), %rcx
	movq	%r12, %rdx
	callq	_sg_copy_from_buffer
	jmp	LBB0_8
LBB0_9:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
	movl	%ecx, (%r14)
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movl	20(%rbx), %edi
	movl	16(%rbx), %esi
	movq	8(%rbx), %rcx
	movq	%r12, %rdx
	callq	_sg_copy_to_buffer
	movq	8(%rbx), %rdx
	movq	%r15, %rdi
	movq	%r14, %rsi
	movq	%r12, %rcx
	movq	%rdx, %r8
	movl	$200, %r9d
	callq	_sd_write_data
	movl	%eax, (%r14)
LBB0_8:
	movq	%r12, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_kfree                          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_NOIO,4,2                   ## @GFP_NOIO
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_MMC_DATA_READ,4,2              ## @MMC_DATA_READ
	.no_dead_strip	_sd_normal_rw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sd_normal_rw
_sd_normal_rw:                          ; @sd_normal_rw
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x21, x0
	ldp	x22, x20, [x1]
	ldr	x0, [x22, #8]
Lloh0:
	adrp	x8, _GFP_NOIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_NOIO@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_kzalloc
	cbz	x0, LBB0_7
; %bb.1:
	mov	x19, x0
	ldr	w8, [x22]
Lloh3:
	adrp	x9, _MMC_DATA_READ@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MMC_DATA_READ@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.2:
	ldr	x8, [x21]
	cbz	x8, LBB0_4
; %bb.3:
	mov	x0, x21
	bl	_sd_disable_initial_mode
LBB0_4:
	ldr	x2, [x22, #8]
	mov	x0, x21
	mov	x1, x20
	mov	x3, x19
	mov	x4, x2
	mov	w5, #200
	bl	_sd_read_data
	str	w0, [x20]
	ldr	x8, [x21]
	cbz	x8, LBB0_6
; %bb.5:
	mov	x0, x21
	bl	_sd_enable_initial_mode
LBB0_6:
	ldp	w1, w0, [x22, #16]
	ldr	x3, [x22, #8]
	mov	x2, x19
	bl	_sg_copy_from_buffer
	b	LBB0_9
LBB0_7:
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w8, w8
	str	w8, [x20]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_8:
	ldp	w1, w0, [x22, #16]
	ldr	x3, [x22, #8]
	mov	x2, x19
	bl	_sg_copy_to_buffer
	ldr	x2, [x22, #8]
	mov	x0, x21
	mov	x1, x20
	mov	x3, x19
	mov	x4, x2
	mov	w5, #200
	bl	_sd_write_data
	str	w0, [x20]
LBB0_9:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_kfree
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_NOIO,4,2                   ; @GFP_NOIO
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_MMC_DATA_READ,4,2              ; @MMC_DATA_READ
	.no_dead_strip	_sd_normal_rw
.subsections_via_symbols
