	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function jmb38x_ms_complete_cmd
_jmb38x_ms_complete_cmd:                ## @jmb38x_ms_complete_cmd
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r12d
	movq	%rdi, %r14
	callq	_memstick_priv
	movq	%rax, %r13
	movq	%rax, %r15
	leaq	32(%rax), %rdi
	callq	_del_timer
	movq	_HOST_CONTROL@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	16(%r13), %rdi
	callq	_readl
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_dev_dbg
	movq	_INT_STATUS@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	16(%r13), %rdi
	callq	_readl
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_dev_dbg
	movq	_STATUS@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	addq	16(%r13), %rdi
	callq	_readl
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_dev_dbg
	movq	(%rbx), %rdi
	addq	16(%r13), %rdi
	callq	_readl
	movzbl	%al, %eax
	movq	8(%r13), %rcx
	movl	%eax, (%rcx)
	movq	_BLOCK@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	16(%r13), %rsi
	xorl	%edi, %edi
	callq	_writel
	movq	_DMA_CONTROL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	16(%r13), %rsi
	xorl	%edi, %edi
	callq	_writel
	movq	_DMA_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r13)
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	je	LBB0_5
## %bb.1:
	movq	8(%r15), %rsi
	movq	24(%r15), %rax
	movq	(%rax), %rdi
	movq	8(%rsi), %rax
	addq	$20, %rsi
	movq	_READ@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.3:
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_5:
	movq	_INT_STATUS_ENABLE@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	16(%r15), %rdi
	callq	_readl
	movl	%eax, %r12d
	movq	8(%r15), %rax
	movq	8(%rax), %rax
	movq	_READ@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.7:
	movq	_INT_STATUS_FIFO_RRDY@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_2:
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %ecx
	movl	$1, %edx
	callq	_dma_unmap_sg
	jmp	LBB0_9
LBB0_6:
	movq	_INT_STATUS_FIFO_WRDY@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, %r12d
	movq	_INT_STATUS_ENABLE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	16(%r15), %rsi
	movl	%r12d, %edi
	callq	_writel
	movq	_INT_SIGNAL_ENABLE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	16(%r15), %rsi
	movl	%r12d, %edi
	callq	_writel
LBB0_9:
	addq	$8, %r13
	movq	_HOST_CONTROL_LED@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	notl	%ebx
	movq	_HOST_CONTROL@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	addq	16(%r15), %rdi
	callq	_readl
	andl	%eax, %ebx
	movq	(%r12), %rsi
	addq	16(%r15), %rsi
	movl	%ebx, %edi
	callq	_writel
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_13
## %bb.10:
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_memstick_next_req
	testl	%eax, %eax
	jne	LBB0_15
## %bb.11:
	movq	_ETIME@GOTPCREL(%rip), %rbx
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	xorl	%eax, %eax
	subl	(%rbx), %eax
	movq	(%r13), %rcx
	movl	%eax, 16(%rcx)
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_memstick_next_req
	testl	%eax, %eax
	je	LBB0_12
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_13 Depth=1
	movq	%r14, %rdi
	callq	_jmb38x_ms_issue_cmd
	testq	%rax, %rax
	je	LBB0_15
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_memstick_next_req
	testl	%eax, %eax
	je	LBB0_14
LBB0_15:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"c control %08x\n"

	.comm	_HOST_CONTROL,8,3               ## @HOST_CONTROL
L_.str.1:                               ## @.str.1
	.asciz	"c status %08x\n"

	.comm	_INT_STATUS,8,3                 ## @INT_STATUS
L_.str.2:                               ## @.str.2
	.asciz	"c hstatus %08x\n"

	.comm	_STATUS,8,3                     ## @STATUS
	.comm	_BLOCK,8,3                      ## @BLOCK
	.comm	_DMA_CONTROL,8,3                ## @DMA_CONTROL
	.comm	_DMA_DATA,4,2                   ## @DMA_DATA
	.comm	_READ,8,3                       ## @READ
	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
	.comm	_INT_STATUS_ENABLE,8,3          ## @INT_STATUS_ENABLE
	.comm	_INT_STATUS_FIFO_RRDY,4,2       ## @INT_STATUS_FIFO_RRDY
	.comm	_INT_STATUS_FIFO_WRDY,4,2       ## @INT_STATUS_FIFO_WRDY
	.comm	_INT_SIGNAL_ENABLE,8,3          ## @INT_SIGNAL_ENABLE
	.comm	_HOST_CONTROL_LED,4,2           ## @HOST_CONTROL_LED
	.comm	_ETIME,4,2                      ## @ETIME
	.no_dead_strip	_jmb38x_ms_complete_cmd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function jmb38x_ms_complete_cmd
_jmb38x_ms_complete_cmd:                ; @jmb38x_ms_complete_cmd
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x20, x1
	mov	x19, x0
	bl	_memstick_priv
	mov	x21, x0
	add	x0, x0, #32
	bl	_del_timer
	ldr	x8, [x21, #16]
Lloh0:
	adrp	x24, _HOST_CONTROL@GOTPAGE
Lloh1:
	ldr	x24, [x24, _HOST_CONTROL@GOTPAGEOFF]
	ldr	x9, [x24]
	add	x0, x9, x8
	bl	_readl
	mov	x2, x0
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
	ldr	x8, [x21, #16]
Lloh4:
	adrp	x9, _INT_STATUS@GOTPAGE
Lloh5:
	ldr	x9, [x9, _INT_STATUS@GOTPAGEOFF]
Lloh6:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl
	mov	x2, x0
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
	ldr	x8, [x21, #16]
Lloh9:
	adrp	x22, _STATUS@GOTPAGE
Lloh10:
	ldr	x22, [x22, _STATUS@GOTPAGEOFF]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_readl
	mov	x2, x0
Lloh11:
	adrp	x1, l_.str.2@PAGE
Lloh12:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
	ldr	x8, [x21, #16]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_readl
	and	w8, w0, #0xff
	mov	x22, x21
	ldr	x9, [x22, #8]!
	str	w8, [x9]
	ldr	x8, [x21, #16]
Lloh13:
	adrp	x9, _BLOCK@GOTPAGE
Lloh14:
	ldr	x9, [x9, _BLOCK@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #0
	bl	_writel
	ldr	x8, [x21, #16]
Lloh16:
	adrp	x9, _DMA_CONTROL@GOTPAGE
Lloh17:
	ldr	x9, [x9, _DMA_CONTROL@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #0
	bl	_writel
	ldr	w8, [x21]
Lloh19:
	adrp	x9, _DMA_DATA@GOTPAGE
Lloh20:
	ldr	x9, [x9, _DMA_DATA@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	ldr	x8, [x21, #24]
	ldr	x0, [x8]
	ldr	x8, [x21, #8]
	add	x1, x8, #20
	ldr	x8, [x8, #8]
Lloh22:
	adrp	x9, _READ@GOTPAGE
Lloh23:
	ldr	x9, [x9, _READ@GOTPAGEOFF]
Lloh24:
	adrp	x10, _DMA_FROM_DEVICE@GOTPAGE
Lloh25:
	ldr	x10, [x10, _DMA_FROM_DEVICE@GOTPAGEOFF]
Lloh26:
	ldr	x9, [x9]
Lloh27:
	adrp	x11, _DMA_TO_DEVICE@GOTPAGE
Lloh28:
	ldr	x11, [x11, _DMA_TO_DEVICE@GOTPAGEOFF]
	cmp	x8, x9
	csel	x8, x10, x11, eq
	ldr	w3, [x8]
	mov	w2, #1
	bl	_dma_unmap_sg
	b	LBB0_3
LBB0_2:
	ldr	x8, [x21, #16]
Lloh29:
	adrp	x25, _INT_STATUS_ENABLE@GOTPAGE
Lloh30:
	ldr	x25, [x25, _INT_STATUS_ENABLE@GOTPAGEOFF]
	ldr	x9, [x25]
	add	x0, x9, x8
	bl	_readl
Lloh31:
	adrp	x8, _READ@GOTPAGE
Lloh32:
	ldr	x8, [x8, _READ@GOTPAGEOFF]
	ldp	x9, x10, [x21, #8]
	ldr	x9, [x9, #8]
Lloh33:
	ldr	x8, [x8]
Lloh34:
	adrp	x11, _INT_STATUS_FIFO_RRDY@GOTPAGE
Lloh35:
	ldr	x11, [x11, _INT_STATUS_FIFO_RRDY@GOTPAGEOFF]
Lloh36:
	adrp	x12, _INT_STATUS_FIFO_WRDY@GOTPAGE
Lloh37:
	ldr	x12, [x12, _INT_STATUS_FIFO_WRDY@GOTPAGEOFF]
	cmp	x9, x8
	csel	x8, x11, x12, eq
	ldr	w8, [x8]
	bic	w23, w0, w8
	ldr	x8, [x25]
	add	x1, x8, x10
	mov	x0, x23
	bl	_writel
	ldr	x8, [x21, #16]
Lloh38:
	adrp	x9, _INT_SIGNAL_ENABLE@GOTPAGE
Lloh39:
	ldr	x9, [x9, _INT_SIGNAL_ENABLE@GOTPAGEOFF]
Lloh40:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	x0, x23
	bl	_writel
LBB0_3:
Lloh41:
	adrp	x8, _HOST_CONTROL_LED@GOTPAGE
Lloh42:
	ldr	x8, [x8, _HOST_CONTROL_LED@GOTPAGEOFF]
Lloh43:
	ldr	w23, [x8]
	ldr	x8, [x21, #16]
	ldr	x9, [x24]
	add	x0, x9, x8
	bl	_readl
	bic	w0, w0, w23
	ldr	x8, [x21, #16]
	ldr	x9, [x24]
	add	x1, x9, x8
	bl	_writel
	cbz	w20, LBB0_7
; %bb.4:
	mov	x0, x19
	mov	x1, x22
	bl	_memstick_next_req
	cbnz	w0, LBB0_9
; %bb.5:
Lloh44:
	adrp	x20, _ETIME@GOTPAGE
Lloh45:
	ldr	x20, [x20, _ETIME@GOTPAGEOFF]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x20]
	neg	w8, w8
	ldr	x9, [x22]
	str	w8, [x9, #16]
	mov	x0, x19
	mov	x1, x22
	bl	_memstick_next_req
	cbz	w0, LBB0_6
	b	LBB0_9
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x22
	bl	_memstick_next_req
	cbnz	w0, LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x19
	bl	_jmb38x_ms_issue_cmd
	cbnz	x0, LBB0_7
LBB0_9:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh26
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGot	Lloh36, Lloh37
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGot	Lloh44, Lloh45
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"c control %08x\n"

	.comm	_HOST_CONTROL,8,3               ; @HOST_CONTROL
l_.str.1:                               ; @.str.1
	.asciz	"c status %08x\n"

	.comm	_INT_STATUS,8,3                 ; @INT_STATUS
l_.str.2:                               ; @.str.2
	.asciz	"c hstatus %08x\n"

	.comm	_STATUS,8,3                     ; @STATUS
	.comm	_BLOCK,8,3                      ; @BLOCK
	.comm	_DMA_CONTROL,8,3                ; @DMA_CONTROL
	.comm	_DMA_DATA,4,2                   ; @DMA_DATA
	.comm	_READ,8,3                       ; @READ
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.comm	_INT_STATUS_ENABLE,8,3          ; @INT_STATUS_ENABLE
	.comm	_INT_STATUS_FIFO_RRDY,4,2       ; @INT_STATUS_FIFO_RRDY
	.comm	_INT_STATUS_FIFO_WRDY,4,2       ; @INT_STATUS_FIFO_WRDY
	.comm	_INT_SIGNAL_ENABLE,8,3          ; @INT_SIGNAL_ENABLE
	.comm	_HOST_CONTROL_LED,4,2           ; @HOST_CONTROL_LED
	.comm	_ETIME,4,2                      ; @ETIME
	.no_dead_strip	_jmb38x_ms_complete_cmd
.subsections_via_symbols
