	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function iser_prepare_read_cmd
_iser_prepare_read_cmd:                 ## @iser_prepare_read_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
	movq	%rdi, %r14
	movq	8(%rdi), %r15
	movq	_ISER_DIR_IN@GOTPCREL(%rip), %r13
	movq	(%r13), %rdx
	leaq	(,%rdx,4), %rsi
	addq	24(%r15), %rsi
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %r12
	movl	(%r12), %ecx
	movq	%r15, %rdi
	callq	_iser_dma_map_task_data
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_1
LBB0_6:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movl	16(%r15), %edi
	callq	_scsi_prot_sg_count
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	(%r13), %rdx
	leaq	(,%rdx,4), %rsi
	addq	8(%r15), %rsi
	movl	(%r12), %ecx
	movq	%r15, %rdi
	callq	_iser_dma_map_task_data
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_6
LBB0_3:
	movq	(%r13), %rsi
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_iser_reg_rdma_mem
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	%eax, %r12d
	leaq	L_.str(%rip), %rdi
	callq	_iser_err
	movl	%r12d, %ebx
	jmp	LBB0_6
LBB0_5:
	movq	(%r15), %r12
	movq	(%r13), %r13
	movq	_ISER_RSV@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 40(%r15)
	shlq	$4, %r13
	movl	8(%r12,%r13), %edi
	callq	_cpu_to_be32
	movl	%eax, 36(%r15)
	movq	(%r12,%r13), %rdi
	callq	_cpu_to_be64
	movl	%eax, 32(%r15)
	movl	(%r14), %esi
	movl	8(%r12,%r13), %edx
	movq	(%r12,%r13), %rcx
	leaq	L_.str.1(%rip), %rdi
	callq	_iser_dbg
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_ISER_DIR_IN,8,3                ## @ISER_DIR_IN
	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to set up Data-IN RDMA\n"

	.comm	_ISER_RSV,4,2                   ## @ISER_RSV
L_.str.1:                               ## @.str.1
	.asciz	"Cmd itt:%d READ tags RKEY:%#.4X VA:%#llX\n"

	.no_dead_strip	_iser_prepare_read_cmd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function iser_prepare_read_cmd
_iser_prepare_read_cmd:                 ; @iser_prepare_read_cmd
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x19, x0
	ldr	x20, [x0, #8]
Lloh0:
	adrp	x22, _ISER_DIR_IN@GOTPAGE
Lloh1:
	ldr	x22, [x22, _ISER_DIR_IN@GOTPAGEOFF]
	ldr	x8, [x20, #24]
	ldr	x2, [x22]
	add	x1, x8, x2, lsl #2
Lloh2:
	adrp	x23, _DMA_FROM_DEVICE@GOTPAGE
Lloh3:
	ldr	x23, [x23, _DMA_FROM_DEVICE@GOTPAGEOFF]
	ldr	w3, [x23]
	mov	x0, x20
	bl	_iser_dma_map_task_data
	mov	x21, x0
	cbz	w0, LBB0_2
LBB0_1:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_2:
	ldr	w0, [x20, #16]
	bl	_scsi_prot_sg_count
	cbz	x0, LBB0_4
; %bb.3:
	ldr	x8, [x20, #8]
	ldr	x2, [x22]
	add	x1, x8, x2, lsl #2
	ldr	w3, [x23]
	mov	x0, x20
	bl	_iser_dma_map_task_data
	mov	x21, x0
	cbnz	w0, LBB0_1
LBB0_4:
	ldr	x1, [x22]
	mov	x0, x20
	mov	w2, #0
	bl	_iser_reg_rdma_mem
	cbz	w0, LBB0_6
; %bb.5:
	mov	x21, x0
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	bl	_iser_err
	b	LBB0_1
LBB0_6:
	ldr	x8, [x20]
	ldr	x9, [x22]
Lloh6:
	adrp	x10, _ISER_RSV@GOTPAGE
Lloh7:
	ldr	x10, [x10, _ISER_RSV@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	ldr	w11, [x20, #40]
	orr	w10, w11, w10
	str	w10, [x20, #40]
	add	x21, x8, x9, lsl #4
	ldr	w0, [x21, #8]
	bl	_cpu_to_be32
	str	w0, [x20, #36]
	ldr	x0, [x21]
	bl	_cpu_to_be64
	str	w0, [x20, #32]
	ldr	w1, [x19]
	ldr	w2, [x21, #8]
	ldr	x3, [x21]
Lloh9:
	adrp	x0, l_.str.1@PAGE
Lloh10:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_iser_dbg
	mov	w21, #0
	b	LBB0_1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_ISER_DIR_IN,8,3                ; @ISER_DIR_IN
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to set up Data-IN RDMA\n"

	.comm	_ISER_RSV,4,2                   ; @ISER_RSV
l_.str.1:                               ; @.str.1
	.asciz	"Cmd itt:%d READ tags RKEY:%#.4X VA:%#llX\n"

	.no_dead_strip	_iser_prepare_read_cmd
.subsections_via_symbols
