	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wcn36xx_dxe_allocate_ctl_block
_wcn36xx_dxe_allocate_ctl_block:        ## @wcn36xx_dxe_allocate_ctl_block
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	addq	$24, %rdi
	callq	_spin_lock_init
	cmpl	$0, (%r14)
	jle	LBB0_9
## %bb.1:
	xorl	%ebx, %ebx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r15
	xorl	%eax, %eax
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	%rax, 8(%r14)
	movq	%rax, 16(%r14)
	movl	(%r14), %ecx
LBB0_3:                                 ##   in Loop: Header=BB0_4 Depth=1
	incl	%ebx
	cmpl	%ecx, %ebx
	jge	LBB0_9
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rax, %r12
	movl	(%r15), %esi
	movl	$16, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_10
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	%ebx, (%rax)
	testl	%ebx, %ebx
	je	LBB0_2
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	(%r14), %ecx
	leal	-1(%rcx), %edx
	movq	%rax, 8(%r12)
	cmpl	%edx, %ebx
	jne	LBB0_3
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	8(%r14), %rdx
	movq	%rdx, 8(%rax)
	jmp	LBB0_3
LBB0_9:
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_10:
	movq	%r14, %rdi
	callq	_wcn36xx_dxe_free_ctl_block
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_11:
	popq	%rbx
	popq	%r12
	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	_wcn36xx_dxe_allocate_ctl_block
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wcn36xx_dxe_allocate_ctl_block
_wcn36xx_dxe_allocate_ctl_block:        ; @wcn36xx_dxe_allocate_ctl_block
	.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
	add	x0, x0, #24
	bl	_spin_lock_init
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.1:
	mov	w20, #0
	mov	x0, #0
Lloh0:
	adrp	x21, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x21, [x21, _GFP_KERNEL@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	stp	x0, x0, [x19, #8]
	ldr	w8, [x19]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	w20, w20, #1
	cmp	w20, w8
	b.ge	LBB0_8
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x22, x0
	ldr	w1, [x21]
	mov	w0, #16
	bl	_kzalloc
	cbz	x0, LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	str	w20, [x0]
	cbz	w20, LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x19]
	sub	w9, w8, #1
	str	x0, [x22, #8]
	cmp	w20, w9
	b.ne	LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x9, [x19, #8]
	str	x9, [x0, #8]
	b	LBB0_3
LBB0_8:
	mov	w0, #0
	b	LBB0_10
LBB0_9:
	mov	x0, x19
	bl	_wcn36xx_dxe_free_ctl_block
Lloh2:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_10:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_wcn36xx_dxe_allocate_ctl_block
.subsections_via_symbols
