	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ipw2100_rx_allocate
_ipw2100_rx_allocate:                   ## @ipw2100_rx_allocate
	.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, %r12
	leaq	L_.str(%rip), %rdi
	callq	_IPW_DEBUG_INFO
	movq	_RX_QUEUE_LENGTH@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	movq	%r12, %rdi
	movq	%r12, %rsi
	callq	_bd_queue_allocate
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rdi
	callq	_IPW_DEBUG_INFO
	jmp	LBB0_17
LBB0_2:
	movl	(%r13), %esi
	movq	%r12, %rdi
	callq	_status_queue_allocate
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rdi
	callq	_IPW_DEBUG_INFO
	movq	%r12, %rdi
	movq	%r12, %rsi
	callq	_bd_queue_free
LBB0_17:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movl	(%r13), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$8, %esi
	callq	_kmalloc_array
	movq	%rax, 8(%r12)
	testq	%rax, %rax
	je	LBB0_18
## %bb.5:
	movq	%rax, %r15
	movl	(%r13), %eax
	testl	%eax, %eax
	jle	LBB0_19
## %bb.6:
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_ipw2100_alloc_skb
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_unlikely
	xorl	%r14d, %r14d
	testq	%rax, %rax
	jne	LBB0_8
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movl	4(%r15,%r14,8), %eax
	movq	(%r12), %rcx
	movl	%eax, 4(%rcx,%r14,8)
	movq	_IPW_RX_NIC_BUFFER_LENGTH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rcx,%r14,8)
	movq	24(%r12), %rax
	movq	$0, (%rax,%r14,8)
	incq	%r14
	movslq	(%r13), %rax
	cmpq	%rax, %r14
	jge	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_10 Depth=1
	movq	8(%r12), %r15
	leaq	(%r15,%r14,8), %rsi
	movq	%r12, %rdi
	callq	_ipw2100_alloc_skb
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_10
LBB0_8:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
	movl	(%r13), %eax
	movl	%ecx, %r13d
	jmp	LBB0_12
LBB0_18:
	leaq	L_.str.3(%rip), %rdi
	callq	_IPW_DEBUG_INFO
	movq	%r12, %rdi
	movq	%r12, %rsi
	callq	_bd_queue_free
	movq	%r12, %rdi
	callq	_status_queue_free
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_17
LBB0_19:
	xorl	%r13d, %r13d
	movl	$0, %ebx
	testl	%eax, %eax
	jne	LBB0_16
	jmp	LBB0_17
LBB0_11:
	movl	%ebx, %r13d
LBB0_12:
	xorl	%ebx, %ebx
	cmpl	%r14d, %eax
	je	LBB0_17
## %bb.13:
	testl	%r14d, %r14d
	je	LBB0_16
## %bb.14:
	xorl	%ebx, %ebx
	movq	_PCI_DMA_FROMDEVICE@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movl	16(%r12), %edi
	movq	8(%r12), %rax
	movl	4(%rax,%rbx,8), %esi
	movl	(%r15), %ecx
	movl	$8, %edx
	callq	_pci_unmap_single
	movq	8(%r12), %rax
	movl	(%rax,%rbx,8), %edi
	callq	_dev_kfree_skb
	incq	%rbx
	cmpq	%rbx, %r14
	jne	LBB0_15
LBB0_16:
	movq	8(%r12), %rdi
	callq	_kfree
	movq	$0, 8(%r12)
	movq	%r12, %rdi
	movq	%r12, %rsi
	callq	_bd_queue_free
	movq	%r12, %rdi
	callq	_status_queue_free
	movl	%r13d, %ebx
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"enter\n"

	.comm	_RX_QUEUE_LENGTH,4,2            ## @RX_QUEUE_LENGTH
L_.str.1:                               ## @.str.1
	.asciz	"failed bd_queue_allocate\n"

L_.str.2:                               ## @.str.2
	.asciz	"failed status_queue_allocate\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
L_.str.3:                               ## @.str.3
	.asciz	"can't allocate rx packet buffer table\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_IPW_RX_NIC_BUFFER_LENGTH,4,2   ## @IPW_RX_NIC_BUFFER_LENGTH
	.comm	_PCI_DMA_FROMDEVICE,4,2         ## @PCI_DMA_FROMDEVICE
	.no_dead_strip	_ipw2100_rx_allocate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ipw2100_rx_allocate
_ipw2100_rx_allocate:                   ; @ipw2100_rx_allocate
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_IPW_DEBUG_INFO
Lloh2:
	adrp	x22, _RX_QUEUE_LENGTH@GOTPAGE
Lloh3:
	ldr	x22, [x22, _RX_QUEUE_LENGTH@GOTPAGEOFF]
	ldr	w2, [x22]
	mov	x0, x19
	mov	x1, x19
	bl	_bd_queue_allocate
	cbz	w0, LBB0_2
; %bb.1:
	mov	x20, x0
Lloh4:
	adrp	x0, l_.str.1@PAGE
Lloh5:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_IPW_DEBUG_INFO
	b	LBB0_4
LBB0_2:
	ldr	w1, [x22]
	mov	x0, x19
	bl	_status_queue_allocate
	cbz	w0, LBB0_5
; %bb.3:
	mov	x20, x0
Lloh6:
	adrp	x0, l_.str.2@PAGE
Lloh7:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_IPW_DEBUG_INFO
	mov	x0, x19
	mov	x1, x19
	bl	_bd_queue_free
LBB0_4:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_5:
	ldr	w0, [x22]
Lloh8:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	mov	w1, #8
	bl	_kmalloc_array
	str	x0, [x19, #8]
	cbz	x0, LBB0_9
; %bb.6:
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.7:
	mov	x21, x0
	mov	x0, x19
	mov	x1, x21
	bl	_ipw2100_alloc_skb
	mov	x20, x0
	bl	_unlikely
	cbz	x0, LBB0_11
; %bb.8:
	mov	x23, #0
	b	LBB0_15
LBB0_9:
Lloh11:
	adrp	x0, l_.str.3@PAGE
Lloh12:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_IPW_DEBUG_INFO
	mov	x0, x19
	mov	x1, x19
	bl	_bd_queue_free
	mov	x0, x19
	bl	_status_queue_free
Lloh13:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_4
LBB0_10:
	mov	w20, #0
	cbnz	w8, LBB0_21
	b	LBB0_4
LBB0_11:
	mov	x24, #0
	mov	w23, #1
Lloh16:
	adrp	x25, _IPW_RX_NIC_BUFFER_LENGTH@GOTPAGE
Lloh17:
	ldr	x25, [x25, _IPW_RX_NIC_BUFFER_LENGTH@GOTPAGEOFF]
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	add	x8, x21, x24
	ldr	w8, [x8, #4]
	ldr	x9, [x19]
	add	x9, x9, x24
	str	w8, [x9, #4]
	ldr	w8, [x25]
	str	w8, [x9]
	ldr	x8, [x19, #24]
	str	xzr, [x8, x24]
	ldrsw	x8, [x22]
	cmp	x23, x8
	b.ge	LBB0_16
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	x21, [x19, #8]
	add	x8, x21, x24
	add	x1, x8, #8
	mov	x0, x19
	bl	_ipw2100_alloc_skb
	mov	x20, x0
	bl	_unlikely
	add	x23, x23, #1
	add	x24, x24, #8
	cbz	x0, LBB0_12
; %bb.14:
	sub	x23, x23, #1
LBB0_15:
Lloh18:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w20, w8
	ldr	w8, [x22]
LBB0_16:
	cmp	w8, w23
	b.ne	LBB0_18
; %bb.17:
	mov	w20, #0
	b	LBB0_4
LBB0_18:
	cbz	w23, LBB0_21
; %bb.19:
	mov	x21, #0
	lsl	x22, x23, #3
Lloh21:
	adrp	x23, _PCI_DMA_FROMDEVICE@GOTPAGE
Lloh22:
	ldr	x23, [x23, _PCI_DMA_FROMDEVICE@GOTPAGEOFF]
LBB0_20:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19, #16]
	ldr	x8, [x19, #8]
	add	x8, x8, x21
	ldr	w1, [x8, #4]
	ldr	w3, [x23]
	mov	w2, #8
	bl	_pci_unmap_single
	ldr	x8, [x19, #8]
	ldr	w0, [x8, x21]
	bl	_dev_kfree_skb
	add	x21, x21, #8
	cmp	x22, x21
	b.ne	LBB0_20
LBB0_21:
	ldr	x0, [x19, #8]
	bl	_kfree
	str	xzr, [x19, #8]
	mov	x0, x19
	mov	x1, x19
	bl	_bd_queue_free
	mov	x0, x19
	bl	_status_queue_free
	b	LBB0_4
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"enter\n"

	.comm	_RX_QUEUE_LENGTH,4,2            ; @RX_QUEUE_LENGTH
l_.str.1:                               ; @.str.1
	.asciz	"failed bd_queue_allocate\n"

l_.str.2:                               ; @.str.2
	.asciz	"failed status_queue_allocate\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
l_.str.3:                               ; @.str.3
	.asciz	"can't allocate rx packet buffer table\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_IPW_RX_NIC_BUFFER_LENGTH,4,2   ; @IPW_RX_NIC_BUFFER_LENGTH
	.comm	_PCI_DMA_FROMDEVICE,4,2         ; @PCI_DMA_FROMDEVICE
	.no_dead_strip	_ipw2100_rx_allocate
.subsections_via_symbols
