	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_c4iw_rqtpool_alloc             ## -- Begin function c4iw_rqtpool_alloc
	.p2align	4, 0x90
_c4iw_rqtpool_alloc:                    ## @c4iw_rqtpool_alloc
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r15
	movl	40(%rdi), %edi
	shll	$6, %ebx
	movl	%ebx, %esi
	callq	_gen_pool_alloc
	movq	%rax, %r14
	leaq	L_.str(%rip), %rdi
	movl	%r14d, %esi
	movl	%ebx, %edx
	callq	_pr_debug
	testq	%r14, %r14
	je	LBB0_4
## %bb.1:
	movq	%r15, %rdi
	callq	_mutex_lock
	movq	_MIN_RQT_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	$1, %esi
	shll	%cl, %esi
	movl	%ebx, %edi
	callq	_roundup
	addq	8(%r15), %rax
	movq	%rax, 8(%r15)
	cmpq	16(%r15), %rax
	jle	LBB0_3
## %bb.2:
	movq	%rax, 16(%r15)
LBB0_3:
	leaq	32(%r15), %rdi
	callq	_kref_get
	jmp	LBB0_5
LBB0_4:
	movl	36(%r15), %edi
	callq	_pci_name
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	callq	_pr_warn_ratelimited
	movq	%r15, %rdi
	callq	_mutex_lock
	incl	24(%r15)
LBB0_5:
	movq	%r15, %rdi
	callq	_mutex_unlock
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"addr 0x%x size %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"%s: Out of RQT memory\n"

	.comm	_MIN_RQT_SHIFT,4,2              ## @MIN_RQT_SHIFT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_c4iw_rqtpool_alloc             ; -- Begin function c4iw_rqtpool_alloc
	.p2align	2
_c4iw_rqtpool_alloc:                    ; @c4iw_rqtpool_alloc
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	ldr	w0, [x0, #40]
	lsl	w21, w1, #6
	mov	x1, x21
	bl	_gen_pool_alloc
	mov	x20, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	mov	x2, x21
	bl	_pr_debug
	cbz	x20, LBB0_4
; %bb.1:
	mov	x0, x19
	bl	_mutex_lock
Lloh2:
	adrp	x8, _MIN_RQT_SHIFT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MIN_RQT_SHIFT@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	mov	w9, #1
	lsl	w1, w9, w8
	mov	x0, x21
	bl	_roundup
	ldp	x8, x9, [x19, #8]
	add	x8, x8, x0
	cmp	x8, x9
	str	x8, [x19, #8]
	b.le	LBB0_3
; %bb.2:
	str	x8, [x19, #16]
LBB0_3:
	add	x0, x19, #32
	bl	_kref_get
	b	LBB0_5
LBB0_4:
	ldr	w0, [x19, #36]
	bl	_pci_name
	mov	x1, x0
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_warn_ratelimited
	mov	x0, x19
	bl	_mutex_lock
	ldr	w8, [x19, #24]
	add	w8, w8, #1
	str	w8, [x19, #24]
LBB0_5:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"addr 0x%x size %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"%s: Out of RQT memory\n"

	.comm	_MIN_RQT_SHIFT,4,2              ; @MIN_RQT_SHIFT
.subsections_via_symbols
