	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function iser_prepare_write_cmd
_iser_prepare_write_cmd:                ## @iser_prepare_write_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
	subq	$40, %rsp
	.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), %r13
	movq	_ISER_DIR_OUT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	leaq	(,%rax,4), %rbx
	addq	40(%r13), %rbx
	movl	%ecx, %r12d
	movl	%edx, -48(%rbp)                 ## 4-byte Spill
	movl	%esi, -52(%rbp)                 ## 4-byte Spill
	movq	8(%r13), %r15
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movq	%rax, %rdx
	callq	_iser_dma_map_task_data
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_10
## %bb.1:
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	movq	40(%r13), %rcx
	movq	_ISER_DIR_OUT@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movl	(%rcx,%rax,4), %esi
	cmpl	%r12d, %esi
	jae	LBB0_3
## %bb.2:
	movl	(%r14), %ecx
	movl	4(%r14), %r8d
	leaq	L_.str(%rip), %rdi
	xorl	%ebx, %ebx
	movl	%r12d, %edx
	xorl	%eax, %eax
	callq	_iser_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_10
LBB0_3:
	movq	%r13, %rdi
	movq	%rax, %rsi
	callq	_iser_reg_rdma_mem
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_iser_err
	jmp	LBB0_10
LBB0_5:
	movq	32(%r13), %rbx
	movq	(%r15), %rax
	leaq	(%rax,%rax,2), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movl	%r12d, %eax
	movl	-48(%rbp), %r12d                ## 4-byte Reload
	cmpl	%eax, %r12d
	movq	%r14, %r15
	jae	LBB0_7
## %bb.6:
	movq	_ISER_WSV@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 24(%r13)
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movl	16(%rbx,%r14,8), %edi
	callq	_cpu_to_be32
	movl	%eax, 20(%r13)
	movl	%r12d, %edi
	addq	8(%rbx,%r14,8), %rdi
	callq	_cpu_to_be64
	movl	%eax, 16(%r13)
	movl	(%r15), %esi
	movl	16(%rbx,%r14,8), %edx
	movq	8(%rbx,%r14,8), %rcx
	leaq	L_.str.2(%rip), %rdi
	movl	%r12d, %r8d
	xorl	%eax, %eax
	callq	_iser_dbg
LBB0_7:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movl	-52(%rbp), %r12d                ## 4-byte Reload
	testl	%r12d, %r12d
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	je	LBB0_8
## %bb.9:
	movl	(%r15), %esi
	leaq	L_.str.3(%rip), %rdi
	xorl	%ebx, %ebx
	movl	%r12d, %edx
	xorl	%eax, %eax
	callq	_iser_dbg
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movq	8(%rcx,%rdx,8), %rax
	movq	%rax, 24(%r14)
	movl	%r12d, 16(%r14)
	movl	(%rcx,%rdx,8), %eax
	movl	%eax, 20(%r14)
	movl	$2, (%r13)
	jmp	LBB0_10
LBB0_8:
	xorl	%ebx, %ebx
LBB0_10:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ISER_DIR_OUT,8,3               ## @ISER_DIR_OUT
	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Total data length: %ld, less than EDTL: %d, in WRITE cmd BHS itt: %d, conn: 0x%p\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"Failed to register write cmd RDMA mem\n"

	.comm	_ISER_WSV,4,2                   ## @ISER_WSV
L_.str.2:                               ## @.str.2
	.asciz	"Cmd itt:%d, WRITE tags, RKEY:%#.4X VA:%#llX + unsol:%d\n"

L_.str.3:                               ## @.str.3
	.asciz	"Cmd itt:%d, WRITE, adding imm.data sz: %d\n"

	.no_dead_strip	_iser_prepare_write_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_write_cmd
_iser_prepare_write_cmd:                ; @iser_prepare_write_cmd
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x23, x3
	mov	x22, x2
	mov	x20, x1
	mov	x21, x0
	ldr	x19, [x0, #8]
	ldr	x8, [x19, #40]
Lloh0:
	adrp	x27, _ISER_DIR_OUT@GOTPAGE
Lloh1:
	ldr	x27, [x27, _ISER_DIR_OUT@GOTPAGEOFF]
	ldr	x2, [x27]
	add	x1, x8, x2, lsl #2
	ldr	x25, [x19, #8]
Lloh2:
	adrp	x8, _DMA_TO_DEVICE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _DMA_TO_DEVICE@GOTPAGEOFF]
Lloh4:
	ldr	w3, [x8]
	mov	x0, x19
	bl	_iser_dma_map_task_data
	mov	x24, x0
	cbnz	w0, LBB0_10
; %bb.1:
	ldr	x8, [x19, #40]
	ldr	x1, [x27]
	ldr	w8, [x8, x1, lsl #2]
	cmp	w8, w23
	b.hs	LBB0_3
; %bb.2:
	ldp	w9, w10, [x21]
	stp	x9, x10, [sp, #16]
	stp	x8, x23, [sp]
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_iser_err
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w24, w8
	b	LBB0_10
LBB0_3:
	mov	x0, x19
	bl	_iser_reg_rdma_mem
	cbz	w0, LBB0_5
; %bb.4:
	mov	x24, x0
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_iser_err
	b	LBB0_10
LBB0_5:
	ldr	x26, [x19, #32]
	ldr	x27, [x27]
	cmp	w22, w23
	b.hs	LBB0_7
; %bb.6:
Lloh12:
	adrp	x8, _ISER_WSV@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ISER_WSV@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	ldr	w9, [x19, #24]
	orr	w8, w9, w8
	str	w8, [x19, #24]
	mov	w8, #24
	madd	x23, x27, x8, x26
	ldr	w0, [x23, #16]
	bl	_cpu_to_be32
	str	w0, [x19, #20]
	ldr	x8, [x23, #8]
	add	x0, x8, w22, uxtw
	bl	_cpu_to_be64
	str	w0, [x19, #16]
	ldr	w1, [x21]
	ldr	w2, [x23, #16]
	ldr	x8, [x23, #8]
	stp	x8, x22, [sp]
Lloh15:
	adrp	x0, l_.str.2@PAGE
Lloh16:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_iser_dbg
LBB0_7:
	cbz	w20, LBB0_9
; %bb.8:
	ldr	w1, [x21]
Lloh17:
	adrp	x0, l_.str.3@PAGE
Lloh18:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x2, x20
	bl	_iser_dbg
	mov	w24, #0
	mov	w8, #24
	madd	x8, x27, x8, x26
	ldr	x9, [x8, #8]
	str	x9, [x25, #24]
	ldr	w8, [x8]
	stp	w20, w8, [x25, #16]
	mov	w8, #2
	str	w8, [x19]
	b	LBB0_10
LBB0_9:
	mov	w24, #0
LBB0_10:
	mov	x0, x24
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_ISER_DIR_OUT,8,3               ; @ISER_DIR_OUT
	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Total data length: %ld, less than EDTL: %d, in WRITE cmd BHS itt: %d, conn: 0x%p\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"Failed to register write cmd RDMA mem\n"

	.comm	_ISER_WSV,4,2                   ; @ISER_WSV
l_.str.2:                               ; @.str.2
	.asciz	"Cmd itt:%d, WRITE tags, RKEY:%#.4X VA:%#llX + unsol:%d\n"

l_.str.3:                               ; @.str.3
	.asciz	"Cmd itt:%d, WRITE, adding imm.data sz: %d\n"

	.no_dead_strip	_iser_prepare_write_cmd
.subsections_via_symbols
