	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function mspro_block_issue_req
LCPI0_0:
	.space	16
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_mspro_block_issue_req:                 ## @mspro_block_issue_req
	.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, %r15d
	movq	%rdi, %r14
	callq	_memstick_get_drvdata
	movq	%rax, %rbx
	movq	%rax, %r12
	addq	$48, %r12
	testl	%r15d, %r15d
	je	LBB0_4
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%r12)
	movq	16(%rbx), %rsi
	movl	(%rsi), %edi
	movl	44(%rbx), %edx
	callq	_blk_rq_map_sg
	movl	%eax, 40(%rbx)
	movq	16(%rbx), %rdi
	testl	%eax, %eax
	jne	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%esi, %esi
	subl	(%r15), %esi
	callq	___blk_end_request_cur
	testl	%eax, %eax
	jne	LBB0_2
LBB0_4:
	leaq	L_.str.1(%rip), %rsi
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_dbg
	movl	24(%rbx), %edi
	callq	_blk_fetch_request
	movq	%rax, 16(%rbx)
	testq	%rax, %rax
	je	LBB0_5
## %bb.11:
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_dbg
	jmp	LBB0_1
LBB0_6:
	callq	_blk_rq_pos
	movl	%eax, %r13d
	shll	$9, %r13d
	movl	(%rbx), %esi
	movl	%r13d, %edi
	callq	_sector_div
	movq	16(%rbx), %rdi
	callq	_blk_rq_bytes
	xorl	%edx, %edx
	divl	(%rbx)
	movl	%eax, %r12d
	movl	36(%rbx), %eax
	movl	%eax, -44(%rbp)
	movl	%r12d, %edi
	callq	_cpu_to_be16
	movl	%eax, -48(%rbp)
	movl	%r13d, %edi
	callq	_cpu_to_be32
	movl	%eax, %r13d
	movl	%eax, -64(%rbp)
	movq	$0, -56(%rbp)
	movq	16(%rbx), %rdi
	callq	_rq_data_dir
	movq	%rax, 8(%rbx)
	movq	_READ@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.8:
	movq	_MSPRO_CMD_READ_DATA@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_7:
	movq	_MSPRO_CMD_WRITE_DATA@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %r15d
	movl	%r15d, 32(%rbx)
	movl	%r13d, %edi
	callq	_be32_to_cpu
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%r15d, %edx
	movl	%eax, %ecx
	movl	%r12d, %r8d
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	_h_mspro_block_req_init@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r14)
	movq	_h_mspro_block_transfer_data@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%rbx)
	leaq	8(%r14), %rdi
	movq	_MS_TPC_WRITE_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-64(%rbp), %rdx
	movl	$24, %ecx
	callq	_memstick_init_req
	movl	4(%r14), %edi
	callq	_memstick_new_req
	xorl	%r15d, %r15d
LBB0_10:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_READ,8,3                       ## @READ
	.comm	_MSPRO_CMD_READ_DATA,4,2        ## @MSPRO_CMD_READ_DATA
	.comm	_MSPRO_CMD_WRITE_DATA,4,2       ## @MSPRO_CMD_WRITE_DATA
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"data transfer: cmd %x, lba %x, count %x\n"

	.comm	_h_mspro_block_req_init,4,2     ## @h_mspro_block_req_init
	.comm	_h_mspro_block_transfer_data,4,2 ## @h_mspro_block_transfer_data
	.comm	_MS_TPC_WRITE_REG,4,2           ## @MS_TPC_WRITE_REG
L_.str.1:                               ## @.str.1
	.asciz	"blk_fetch\n"

L_.str.2:                               ## @.str.2
	.asciz	"issue end\n"

	.comm	_EAGAIN,4,2                     ## @EAGAIN
L_.str.3:                               ## @.str.3
	.asciz	"trying again\n"

	.no_dead_strip	_mspro_block_issue_req
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mspro_block_issue_req
_mspro_block_issue_req:                 ; @mspro_block_issue_req
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x21, x1
	mov	x19, x0
	bl	_memstick_get_drvdata
	mov	x20, x0
	add	x22, x0, #48
	cbz	w21, LBB0_4
LBB0_1:
Lloh0:
	adrp	x21, _ENOMEM@GOTPAGE
Lloh1:
	ldr	x21, [x21, _ENOMEM@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	stp	xzr, xzr, [x22]
	ldr	x1, [x20, #16]
	ldr	w0, [x1]
	ldr	w2, [x20, #44]
	bl	_blk_rq_map_sg
	mov	x8, x0
	str	w0, [x20, #40]
	ldr	x0, [x20, #16]
	cbnz	w8, LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x21]
	neg	w1, w8
	bl	___blk_end_request_cur
	cbnz	w0, LBB0_2
LBB0_4:
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
	ldr	w0, [x20, #24]
	bl	_blk_fetch_request
	str	x0, [x20, #16]
	cbz	x0, LBB0_8
; %bb.5:
Lloh4:
	adrp	x1, l_.str.3@PAGE
Lloh5:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
	b	LBB0_1
LBB0_6:
	bl	_blk_rq_pos
	lsl	w21, w0, #9
	ldr	w1, [x20]
	mov	x0, x21
	bl	_sector_div
	ldr	x0, [x20, #16]
	bl	_blk_rq_bytes
	ldr	w8, [x20]
	ldr	w9, [x20, #36]
	str	w9, [sp, #44]
	udiv	w22, w0, w8
	mov	x0, x22
	bl	_cpu_to_be16
	str	w0, [sp, #40]
	mov	x0, x21
	bl	_cpu_to_be32
	mov	x21, x0
	str	w0, [sp, #24]
	str	xzr, [sp, #32]
	ldr	x0, [x20, #16]
	bl	_rq_data_dir
	str	x0, [x20, #8]
Lloh6:
	adrp	x8, _READ@GOTPAGE
Lloh7:
	ldr	x8, [x8, _READ@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
Lloh9:
	adrp	x9, _MSPRO_CMD_READ_DATA@GOTPAGE
Lloh10:
	ldr	x9, [x9, _MSPRO_CMD_READ_DATA@GOTPAGEOFF]
Lloh11:
	adrp	x10, _MSPRO_CMD_WRITE_DATA@GOTPAGE
Lloh12:
	ldr	x10, [x10, _MSPRO_CMD_WRITE_DATA@GOTPAGEOFF]
	cmp	x0, x8
	csel	x8, x9, x10, eq
	ldr	w23, [x8]
	str	w23, [x20, #32]
	mov	x0, x21
	bl	_be32_to_cpu
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x0, x22, [sp, #8]
	str	x23, [sp]
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
Lloh15:
	adrp	x8, _h_mspro_block_req_init@GOTPAGE
Lloh16:
	ldr	x8, [x8, _h_mspro_block_req_init@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	str	w8, [x19, #12]
Lloh18:
	adrp	x8, _h_mspro_block_transfer_data@GOTPAGE
Lloh19:
	ldr	x8, [x8, _h_mspro_block_transfer_data@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	str	w8, [x20, #28]
	add	x0, x19, #8
Lloh21:
	adrp	x8, _MS_TPC_WRITE_REG@GOTPAGE
Lloh22:
	ldr	x8, [x8, _MS_TPC_WRITE_REG@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	add	x2, sp, #24
	mov	w3, #24
	bl	_memstick_init_req
	ldr	w0, [x19, #4]
	bl	_memstick_new_req
	mov	w0, #0
LBB0_7:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_8:
Lloh24:
	adrp	x1, l_.str.2@PAGE
Lloh25:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
Lloh26:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh27:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_7
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_READ,8,3                       ; @READ
	.comm	_MSPRO_CMD_READ_DATA,4,2        ; @MSPRO_CMD_READ_DATA
	.comm	_MSPRO_CMD_WRITE_DATA,4,2       ; @MSPRO_CMD_WRITE_DATA
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"data transfer: cmd %x, lba %x, count %x\n"

	.comm	_h_mspro_block_req_init,4,2     ; @h_mspro_block_req_init
	.comm	_h_mspro_block_transfer_data,4,2 ; @h_mspro_block_transfer_data
	.comm	_MS_TPC_WRITE_REG,4,2           ; @MS_TPC_WRITE_REG
l_.str.1:                               ; @.str.1
	.asciz	"blk_fetch\n"

l_.str.2:                               ; @.str.2
	.asciz	"issue end\n"

	.comm	_EAGAIN,4,2                     ; @EAGAIN
l_.str.3:                               ; @.str.3
	.asciz	"trying again\n"

	.no_dead_strip	_mspro_block_issue_req
.subsections_via_symbols
