	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wmt_complete_data_request
_wmt_complete_data_request:             ## @wmt_complete_data_request
	.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	%rdi, %r14
	movq	32(%rdi), %r15
	movq	(%r15), %rax
	movl	8(%rax), %ecx
	imull	4(%rax), %ecx
	movl	%ecx, (%rax)
	movq	_MMC_DATA_WRITE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	andl	12(%rax), %ebx
	movl	(%rdi), %edi
	callq	_mmc_dev
	movq	(%r15), %rcx
	movl	32(%rcx), %edx
	movl	36(%rcx), %esi
	testl	%ebx, %ebx
	jne	LBB0_1
## %bb.2:
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rcx
	jmp	LBB0_3
LBB0_1:
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rcx
LBB0_3:
	movl	(%rcx), %ecx
	movl	%eax, %edi
	callq	_dma_unmap_sg
	movq	8(%r15), %rax
	cmpq	$0, (%rax)
	jne	LBB0_7
## %bb.4:
	movq	(%r15), %rax
	cmpq	$0, 24(%rax)
	je	LBB0_5
LBB0_7:
	movl	(%r14), %edi
	movq	%r15, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mmc_request_done               ## TAILCALL
LBB0_5:
	movl	(%r14), %edi
	callq	_wmt_mci_read_response
	movq	(%r15), %rax
	cmpq	$0, 16(%rax)
	je	LBB0_7
## %bb.6:
	leaq	24(%r14), %rdi
	movq	%rdi, 16(%r14)
	callq	_init_completion
	movq	(%r15), %rax
	movq	16(%rax), %rax
	movq	%rax, 8(%r14)
	movl	(%r14), %edi
	movl	(%rax), %ecx
	movl	4(%rax), %esi
	movl	$7, %edx
	movl	$9, %r8d
	callq	_wmt_mci_send_command
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_wmt_mci_start_command          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MMC_DATA_WRITE,4,2             ## @MMC_DATA_WRITE
	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
	.no_dead_strip	_wmt_complete_data_request
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wmt_complete_data_request
_wmt_complete_data_request:             ; @wmt_complete_data_request
	.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	x19, x0
	ldr	x20, [x0, #32]
	ldr	x8, [x20]
	ldp	w9, w10, [x8, #4]
	mul	w9, w10, w9
	str	w9, [x8]
	ldr	w21, [x8, #12]
Lloh0:
	adrp	x8, _MMC_DATA_WRITE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MMC_DATA_WRITE@GOTPAGEOFF]
Lloh2:
	ldr	w22, [x8]
	ldr	w0, [x0]
	bl	_mmc_dev
	ldr	x8, [x20]
Lloh3:
	adrp	x9, _DMA_FROM_DEVICE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DMA_FROM_DEVICE@GOTPAGEOFF]
	ldp	w2, w1, [x8, #32]
Lloh5:
	adrp	x8, _DMA_TO_DEVICE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _DMA_TO_DEVICE@GOTPAGEOFF]
	tst	w22, w21
	csel	x8, x9, x8, eq
	ldr	w3, [x8]
	bl	_dma_unmap_sg
	ldr	x8, [x20, #8]
	ldr	x8, [x8]
	cbnz	x8, LBB0_2
; %bb.1:
	ldr	x8, [x20]
	ldr	x8, [x8, #24]
	cbz	x8, LBB0_3
LBB0_2:
	ldr	w0, [x19]
	mov	x1, 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
	b	_mmc_request_done
LBB0_3:
	ldr	w0, [x19]
	bl	_wmt_mci_read_response
	ldr	x8, [x20]
	ldr	x8, [x8, #16]
	cbz	x8, LBB0_2
; %bb.4:
	add	x0, x19, #24
	str	x0, [x19, #16]
	bl	_init_completion
	ldr	x8, [x20]
	ldr	x8, [x8, #16]
	str	x8, [x19, #8]
	ldr	w0, [x19]
	ldp	w3, w1, [x8]
	mov	w2, #7
	mov	w4, #9
	bl	_wmt_mci_send_command
	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	_wmt_mci_start_command
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MMC_DATA_WRITE,4,2             ; @MMC_DATA_WRITE
	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
	.no_dead_strip	_wmt_complete_data_request
.subsections_via_symbols
