	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_iser_alloc_rx_descriptors      ## -- Begin function iser_alloc_rx_descriptors
	.p2align	4, 0x90
_iser_alloc_rx_descriptors:             ## @iser_alloc_rx_descriptors
	.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
	movq	%rsi, %r15
	movq	%rdi, %rbx
	leaq	40(%rdi), %r14
	movq	40(%rdi), %r12
	movl	(%rsi), %eax
	movl	%eax, (%rdi)
	leal	-1(%rax), %ecx
	movl	%ecx, 4(%rdi)
	sarl	$2, %eax
	movl	%eax, 8(%rdi)
	movq	(%r12), %rax
	movl	4(%rsi), %esi
	movl	32(%rdi), %edx
	movq	%r14, %rdi
	callq	*8(%rax)
	testq	%rax, %rax
	jne	LBB0_15
## %bb.1:
	movq	%rbx, %rdi
	callq	_iser_alloc_login_buf
	testq	%rax, %rax
	jne	LBB0_14
## %bb.2:
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	movl	(%r15), %edi
	movl	%edi, 12(%rbx)
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$20, %esi
	callq	_kmalloc_array
	movq	%rax, 16(%rbx)
	testq	%rax, %rax
	je	LBB0_13
## %bb.3:
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	cmpl	$0, (%rbx)
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	jle	LBB0_7
## %bb.4:
	movq	%rax, %r12
	movq	_ISER_RX_PAYLOAD_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%r14d, %r14d
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rax
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	8(%r15), %edi
	movq	%rax, %r13
	movl	(%rax), %ecx
	movq	%r12, %rsi
	callq	_ib_dma_map_single
	movl	%eax, %ebx
	movl	8(%r15), %edi
	movl	%eax, %esi
	callq	_ib_dma_mapping_error
	testq	%rax, %rax
	jne	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	%ebx, (%r12)
	movq	_iser_task_rsp@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r12)
	movl	%ebx, 12(%r12)
	movq	_ISER_RX_PAYLOAD_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%edx, 8(%r12)
	movq	16(%r15), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r12)
	incl	%r14d
	addq	$20, %r12
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	cmpl	(%rax), %r14d
	movq	%r13, %rax
	jl	LBB0_5
LBB0_7:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	$0, 24(%rax)
	xorl	%eax, %eax
	jmp	LBB0_16
LBB0_8:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	16(%rbx), %r15
	testl	%r14d, %r14d
	je	LBB0_12
## %bb.9:
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movl	8(%r12), %edi
	movl	(%r15), %esi
	movq	_ISER_RX_PAYLOAD_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	(%r13), %ecx
	callq	_ib_dma_unmap_single
	addq	$20, %r15
	decl	%r14d
	jne	LBB0_10
## %bb.11:
	movq	16(%rbx), %r15
LBB0_12:
	movq	%r15, %rdi
	callq	_kfree
	movq	$0, 16(%rbx)
	movq	-64(%rbp), %r14                 ## 8-byte Reload
LBB0_13:
	movq	%rbx, %rdi
	callq	_iser_free_login_buf
	movq	-48(%rbp), %r12                 ## 8-byte Reload
LBB0_14:
	movq	(%r12), %rax
	movq	%r14, %rdi
	callq	*(%rax)
LBB0_15:
	leaq	L_.str(%rip), %rdi
	callq	_iser_err
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_16:
	addq	$24, %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	_ISER_RX_PAYLOAD_SIZE,4,2       ## @ISER_RX_PAYLOAD_SIZE
	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
	.comm	_iser_task_rsp,4,2              ## @iser_task_rsp
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed allocating rx descriptors / data buffers\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_iser_alloc_rx_descriptors      ; -- Begin function iser_alloc_rx_descriptors
	.p2align	2
_iser_alloc_rx_descriptors:             ; @iser_alloc_rx_descriptors
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x21, x1
	mov	x20, x0
	mov	x19, x0
	ldr	x23, [x19, #40]!
	ldp	w8, w1, [x1]
	sub	w9, w8, #1
	stp	w8, w9, [x0]
	asr	w8, w8, #2
	str	w8, [x0, #8]
	ldr	x8, [x23]
	ldr	x8, [x8, #8]
	ldr	w2, [x0, #32]
	mov	x0, x19
	blr	x8
	cbnz	x0, LBB0_14
; %bb.1:
	mov	x0, x20
	bl	_iser_alloc_login_buf
	cbnz	x0, LBB0_13
; %bb.2:
	ldr	w0, [x21]
	str	w0, [x20, #12]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w1, #20
	bl	_kmalloc_array
	str	x0, [x20, #16]
	cbz	x0, LBB0_12
; %bb.3:
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.4:
	mov	x21, x0
	mov	w24, #0
Lloh3:
	adrp	x25, _ISER_RX_PAYLOAD_SIZE@GOTPAGE
Lloh4:
	ldr	x25, [x25, _ISER_RX_PAYLOAD_SIZE@GOTPAGEOFF]
	ldr	w2, [x25]
Lloh5:
	adrp	x26, _DMA_FROM_DEVICE@GOTPAGE
Lloh6:
	ldr	x26, [x26, _DMA_FROM_DEVICE@GOTPAGEOFF]
Lloh7:
	adrp	x27, _iser_task_rsp@GOTPAGE
Lloh8:
	ldr	x27, [x27, _iser_task_rsp@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x23, #8]
	ldr	w3, [x26]
	mov	x1, x21
	bl	_ib_dma_map_single
	mov	x22, x0
	ldr	w0, [x23, #8]
	mov	x1, x22
	bl	_ib_dma_mapping_error
	cbnz	x0, LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	str	w22, [x21]
	ldr	w8, [x27]
	stp	w22, w8, [x21, #12]
	ldr	w2, [x25]
	ldr	x8, [x23, #16]
	ldr	w8, [x8]
	stp	w8, w2, [x21, #4]
	add	w24, w24, #1
	ldr	w8, [x20]
	add	x21, x21, #20
	cmp	w24, w8
	b.lt	LBB0_5
LBB0_7:
	mov	w0, #0
	str	xzr, [x20, #24]
	b	LBB0_15
LBB0_8:
	ldr	x21, [x20, #16]
	cbz	w24, LBB0_11
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x23, #8]
	ldr	w1, [x21], #20
	ldr	w2, [x25]
	ldr	w3, [x26]
	bl	_ib_dma_unmap_single
	subs	w24, w24, #1
	b.ne	LBB0_9
; %bb.10:
	ldr	x21, [x20, #16]
LBB0_11:
	mov	x0, x21
	bl	_kfree
	str	xzr, [x20, #16]
LBB0_12:
	mov	x0, x20
	bl	_iser_free_login_buf
LBB0_13:
	ldr	x8, [x23]
	ldr	x8, [x8]
	mov	x0, x19
	blr	x8
LBB0_14:
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	_iser_err
Lloh11:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_15:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ISER_RX_PAYLOAD_SIZE,4,2       ; @ISER_RX_PAYLOAD_SIZE
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
	.comm	_iser_task_rsp,4,2              ; @iser_task_rsp
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed allocating rx descriptors / data buffers\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
