	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function srpt_alloc_rw_ctxs
_srpt_alloc_rw_ctxs:                    ## @srpt_alloc_rw_ctxs
	.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	$104, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, -136(%rbp)                 ## 8-byte Spill
	movq	%rcx, -120(%rbp)                ## 8-byte Spill
	movl	%edx, %r13d
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rbx
	addq	$48, %rdi
	callq	_target_reverse_dma_direction
	movl	%eax, %r14d
	movq	40(%rbx), %r12
	cmpl	$1, %r13d
	jne	LBB0_11
## %bb.1:
	leaq	16(%rbx), %rax
	movq	%rax, %rdx
	movq	%rax, 8(%rbx)
	jmp	LBB0_2
LBB0_11:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r13d, %edi
	movl	$24, %esi
	callq	_kmalloc_array
	movq	%rax, 8(%rbx)
	movq	%rax, %rdx
	testq	%rax, %rax
	je	LBB0_12
LBB0_2:
	movslq	(%rbx), %rax
	xorl	%r15d, %r15d
	cmpl	%r13d, %eax
	jge	LBB0_13
## %bb.3:
	movq	%r12, -80(%rbp)                 ## 8-byte Spill
	movq	%r14, -88(%rbp)                 ## 8-byte Spill
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	decl	%r13d
	movl	%r13d, -52(%rbp)                ## 4-byte Spill
	movslq	%r13d, %rcx
	movq	%rcx, -128(%rbp)                ## 8-byte Spill
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	leaq	(,%rax,8), %rax
	leaq	(%rax,%rax,2), %r14
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	addq	$8, %rbx
	xorl	%eax, %eax
	movq	%rax, -112(%rbp)                ## 8-byte Spill
                                        ## implicit-def: $eax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r12
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %edi
	callq	_be64_to_cpu
                                        ## kill: def $eax killed $eax def $rax
	movq	%rax, -144(%rbp)                ## 8-byte Spill
	movl	-4(%rbx), %edi
	callq	_be32_to_cpu
	movl	%eax, %r15d
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movl	-8(%rbx), %edi
	callq	_be32_to_cpu
	movl	%eax, %r13d
	movq	%r12, %rbx
	addq	%r14, %r12
	leaq	(%rbx,%r14), %rdi
	addq	$8, %rdi
	xorl	%r8d, %r8d
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	cmpq	-128(%rbp), %rax                ## 8-byte Folded Reload
	setl	%r8b
	movq	%rdi, -104(%rbp)                ## 8-byte Spill
	movq	%r12, %rsi
	movl	%r15d, %edx
	xorl	%ecx, %ecx
	callq	_target_alloc_sgl
	testl	%eax, %eax
	jne	LBB0_5
## %bb.14:                              ##   in Loop: Header=BB0_4 Depth=1
	leaq	(%rbx,%r14), %rdi
	addq	$16, %rdi
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movl	8(%rax), %esi
	movq	(%rax), %rax
	movl	(%rax), %edx
	movq	8(%rbx,%r14), %rcx
	movl	(%rbx,%r14), %r8d
	subq	$8, %rsp
	xorl	%r9d, %r9d
	pushq	-88(%rbp)                       ## 8-byte Folded Reload
	pushq	%r13
	pushq	-144(%rbp)                      ## 8-byte Folded Reload
	callq	_rdma_rw_ctx_init
	addq	$32, %rsp
	movl	%eax, %r15d
	testl	%eax, %eax
	js	LBB0_15
## %bb.16:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	addl	%r15d, 4(%r13)
	incl	(%r13)
	movq	-112(%rbp), %r15                ## 8-byte Reload
	testq	%r15, %r15
	je	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	-96(%rbp), %rbx                 ## 8-byte Reload
	leal	-1(%rbx), %eax
	leaq	(%r15,%rax,4), %rdi
	callq	_sg_unmark_end
	incl	%ebx
	movq	-104(%rbp), %rax                ## 8-byte Reload
	movq	(%rax), %rdx
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_sg_chain
	jmp	LBB0_19
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	-104(%rbp), %rax                ## 8-byte Reload
	movq	(%rax), %rax
	movq	-120(%rbp), %rcx                ## 8-byte Reload
	movq	%rax, (%rcx)
LBB0_19:                                ##   in Loop: Header=BB0_4 Depth=1
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	movq	8(%r12), %rdx
	movl	(%r12), %esi
	movq	-136(%rbp), %rax                ## 8-byte Reload
	addl	%esi, (%rax)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	cmpl	%eax, %ecx
	je	LBB0_20
## %bb.21:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	%rsi, -96(%rbp)                 ## 8-byte Spill
	movq	%rdx, -112(%rbp)                ## 8-byte Spill
	movq	8(%r13), %r12
	incq	%rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	addq	$24, %r14
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	addq	$12, %rbx
	jmp	LBB0_4
LBB0_12:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_13
LBB0_5:
	movl	%eax, %r15d
	jmp	LBB0_6
LBB0_15:
	movq	8(%rbx,%r14), %rdi
	movl	(%rbx,%r14), %esi
	callq	_target_free_sgl
LBB0_6:
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	testl	%eax, %eax
	movq	-88(%rbp), %r13                 ## 8-byte Reload
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	jle	LBB0_9
## %bb.7:
	movl	%eax, %r14d
	incq	%r14
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	leal	-2(%r14), %eax
	movq	8(%rcx), %r12
	leaq	(%rax,%rax,2), %rbx
	leaq	(%r12,%rbx,8), %rdi
	addq	$16, %rdi
	movl	8(%rdx), %esi
	movq	(%rdx), %rax
	movl	(%rax), %edx
	movq	8(%r12,%rbx,8), %rcx
	movl	(%r12,%rbx,8), %r8d
	movl	%r13d, %r9d
	callq	_rdma_rw_ctx_destroy
	movq	8(%r12,%rbx,8), %rdi
	movl	(%r12,%rbx,8), %esi
	callq	_target_free_sgl
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	decq	%r14
	cmpq	$1, %r14
	ja	LBB0_8
LBB0_9:
	movq	8(%rcx), %rdi
	addq	$16, %rcx
	cmpq	%rcx, %rdi
	je	LBB0_13
## %bb.10:
	callq	_kfree
	jmp	LBB0_13
LBB0_20:
	xorl	%r15d, %r15d
LBB0_13:
	movl	%r15d, %eax
	addq	$104, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_srpt_alloc_rw_ctxs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function srpt_alloc_rw_ctxs
_srpt_alloc_rw_ctxs:                    ; @srpt_alloc_rw_ctxs
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #176
	.cfi_def_cfa_offset 176
	stp	x28, x27, [sp, #80]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #96]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #112]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #128]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #144]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #160]            ; 16-byte Folded Spill
	add	x29, sp, #160
	.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
	str	x4, [sp, #48]                   ; 8-byte Folded Spill
	str	x3, [sp, #16]                   ; 8-byte Folded Spill
	mov	x23, x2
	mov	x25, x1
	mov	x21, x0
	add	x0, x0, #48
	bl	_target_reverse_dma_direction
	mov	x22, x0
	ldr	x24, [x21, #40]
	subs	w20, w23, #1
	b.ne	LBB0_2
; %bb.1:
	add	x26, x21, #16
	str	x26, [x21, #8]
	b	LBB0_3
LBB0_2:
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x23
	mov	w1, #24
	bl	_kmalloc_array
	mov	x26, x0
	str	x0, [x21, #8]
	cbz	x0, LBB0_13
LBB0_3:
	ldrsw	x19, [x21]
	cmp	w19, w23
	b.ge	LBB0_12
; %bb.4:
	stp	x21, x24, [sp, #24]             ; 16-byte Folded Spill
	str	w22, [sp, #44]                  ; 4-byte Folded Spill
	sxtw	x8, w20
	stp	xzr, x8, [sp, #64]              ; 16-byte Folded Spill
	mov	w8, #24
	orr	x9, xzr, #0x8
	madd	x22, x19, x8, x9
	add	x21, x25, #4
                                        ; implicit-def: $w24
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x21, #4]
	bl	_be64_to_cpu
	mov	x27, x0
	ldr	w0, [x21]
	bl	_be32_to_cpu
	mov	x25, x0
	str	x21, [sp, #56]                  ; 8-byte Folded Spill
	ldur	w0, [x21, #-4]
	bl	_be32_to_cpu
	mov	x28, x0
	mov	x21, x22
	mov	x23, x26
	add	x26, x26, x22
	sub	x22, x26, #8
	ldr	x8, [sp, #72]                   ; 8-byte Folded Reload
	mov	x20, x19
	cmp	x19, x8
	cset	w4, lt
	mov	x0, x26
	mov	x1, x22
	mov	x2, x25
	mov	w3, #0
	bl	_target_alloc_sgl
	cbnz	w0, LBB0_14
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [sp, #32]                   ; 8-byte Folded Reload
	ldr	w1, [x8, #8]
	ldr	x8, [x8]
	ldr	w2, [x8]
	mov	x0, x26
	ldr	x3, [x0], #8
	ldr	w4, [x22]
	ldr	w8, [sp, #44]                   ; 4-byte Folded Reload
	str	w8, [sp]
	mov	w5, #0
	mov	x6, x27
	mov	x7, x28
	bl	_rdma_rw_ctx_init
	mov	x25, x0
	tbnz	w0, #31, LBB0_15
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x19, [sp, #24]                  ; 8-byte Folded Reload
	ldp	w9, w8, [x19]
	add	w8, w8, w25
	add	w9, w9, #1
	stp	w9, w8, [x19]
	ldr	x22, [sp, #64]                  ; 8-byte Folded Reload
	cbz	x22, LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	sub	w8, w24, #1
	add	x0, x22, w8, uxtw #2
	bl	_sg_unmark_end
	add	w1, w24, #1
	ldr	x2, [x26]
	mov	x0, x22
	bl	_sg_chain
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x26]
	ldr	x9, [sp, #16]                   ; 8-byte Folded Reload
	str	x8, [x9]
LBB0_10:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x10, [x26]
	ldur	w24, [x26, #-8]
	ldr	x9, [sp, #48]                   ; 8-byte Folded Reload
	ldr	w8, [x9]
	add	w8, w8, w24
	str	w8, [x9]
	ldr	x8, [sp, #72]                   ; 8-byte Folded Reload
	cmp	w8, w20
	b.eq	LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_5 Depth=1
	str	x10, [sp, #64]                  ; 8-byte Folded Spill
	ldr	x26, [x19, #8]
	add	x19, x20, #1
	mov	x22, x21
	add	x22, x21, #24
	ldr	x21, [sp, #56]                  ; 8-byte Folded Reload
	add	x21, x21, #12
	b	LBB0_5
LBB0_12:
	mov	w25, #0
	b	LBB0_21
LBB0_13:
Lloh3:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w25, w8
	b	LBB0_21
LBB0_14:
	mov	x25, x0
	b	LBB0_16
LBB0_15:
	add	x8, x23, x21
	ldr	x0, [x8]
	ldur	w1, [x8, #-8]
	bl	_target_free_sgl
LBB0_16:
	ldr	w23, [sp, #44]                  ; 4-byte Folded Reload
	ldp	x19, x24, [sp, #24]             ; 16-byte Folded Reload
	cmp	w20, #1
	b.lt	LBB0_19
; %bb.17:
	mov	w8, w20
	add	x20, x8, #1
	mov	w21, #24
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	sub	w8, w20, #2
	ldr	x9, [x19, #8]
	umaddl	x22, w8, w21, x9
	add	x0, x22, #16
	ldr	w1, [x24, #8]
	ldr	x8, [x24]
	ldr	w2, [x8]
	ldr	x3, [x22, #8]
	ldr	w4, [x22]
	mov	x5, x23
	bl	_rdma_rw_ctx_destroy
	ldr	x0, [x22, #8]
	ldr	w1, [x22]
	bl	_target_free_sgl
	sub	x20, x20, #1
	cmp	x20, #1
	b.hi	LBB0_18
LBB0_19:
	ldr	x0, [x19, #8]
	add	x8, x19, #16
	cmp	x0, x8
	b.eq	LBB0_21
; %bb.20:
	bl	_kfree
LBB0_21:
	mov	x0, x25
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #112]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #96]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #176
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_srpt_alloc_rw_ctxs
.subsections_via_symbols
