	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lbtf_allocate_cmd_buffer       ## -- Begin function lbtf_allocate_cmd_buffer
	.p2align	4, 0x90
_lbtf_allocate_cmd_buffer:              ## @lbtf_allocate_cmd_buffer
	.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, %r14
	movq	_LBTF_DEB_HOST@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_lbtf_deb_enter
	movq	_LBS_NUM_CMD_BUFFERS@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	shll	$4, %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.4:
	movq	%rax, %r15
	movq	%rax, (%r14)
	cmpl	$0, (%r13)
	jle	LBB0_5
## %bb.11:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	%r15, %rbx
	addq	$8, %rbx
	xorl	%r14d, %r14d
	movq	_LBS_CMD_BUFFER_SIZE@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kzalloc
	movq	%rax, (%rbx)
	testq	%rax, %rax
	je	LBB0_13
## %bb.6:                               ##   in Loop: Header=BB0_12 Depth=1
	incq	%r14
	movslq	(%r13), %rax
	addq	$16, %rbx
	cmpq	%rax, %r14
	jl	LBB0_12
## %bb.7:
	xorl	%r14d, %r14d
	testl	%eax, %eax
	jle	LBB0_10
## %bb.8:
	xorl	%ebx, %ebx
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	callq	_init_waitqueue_head
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_lbtf_cleanup_and_insert_cmd
	incq	%rbx
	movslq	(%r13), %rax
	addq	$16, %r15
	cmpq	%rax, %rbx
	jl	LBB0_9
LBB0_10:
	movq	_LBTF_DEB_HOST@GOTPCREL(%rip), %rbx
	jmp	LBB0_3
LBB0_1:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_2
LBB0_5:
	xorl	%r14d, %r14d
	jmp	LBB0_3
LBB0_13:
	movq	_LBTF_DEB_HOST@GOTPCREL(%rip), %rbx
	leaq	L_.str.1(%rip), %rdi
LBB0_2:
	callq	_lbtf_deb_host
	movl	$-1, %r14d
LBB0_3:
	movl	(%rbx), %edi
	leaq	L_.str.2(%rip), %rsi
	movl	%r14d, %edx
	callq	_lbtf_deb_leave_args
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LBTF_DEB_HOST,4,2              ## @LBTF_DEB_HOST
	.comm	_LBS_NUM_CMD_BUFFERS,4,2        ## @LBS_NUM_CMD_BUFFERS
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ALLOC_CMD_BUF: tempcmd_array is NULL\n"

	.comm	_LBS_CMD_BUFFER_SIZE,4,2        ## @LBS_CMD_BUFFER_SIZE
L_.str.1:                               ## @.str.1
	.asciz	"ALLOC_CMD_BUF: ptempvirtualaddr is NULL\n"

L_.str.2:                               ## @.str.2
	.asciz	"ret %d"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lbtf_allocate_cmd_buffer       ; -- Begin function lbtf_allocate_cmd_buffer
	.p2align	2
_lbtf_allocate_cmd_buffer:              ; @lbtf_allocate_cmd_buffer
	.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	x19, x0
Lloh0:
	adrp	x22, _LBTF_DEB_HOST@GOTPAGE
Lloh1:
	ldr	x22, [x22, _LBTF_DEB_HOST@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_lbtf_deb_enter
Lloh2:
	adrp	x23, _LBS_NUM_CMD_BUFFERS@GOTPAGE
Lloh3:
	ldr	x23, [x23, _LBS_NUM_CMD_BUFFERS@GOTPAGEOFF]
	ldr	w8, [x23]
	lsl	w0, w8, #4
Lloh4:
	adrp	x24, _GFP_KERNEL@GOTPAGE
Lloh5:
	ldr	x24, [x24, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x24]
	bl	_kzalloc
	cbz	x0, LBB0_9
; %bb.1:
	mov	x20, x0
	str	x0, [x19]
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.2:
	mov	x25, #0
	add	x26, x20, #8
Lloh6:
	adrp	x27, _LBS_CMD_BUFFER_SIZE@GOTPAGE
Lloh7:
	ldr	x27, [x27, _LBS_CMD_BUFFER_SIZE@GOTPAGEOFF]
Lloh8:
	adrp	x21, l_.str.1@PAGE
Lloh9:
	add	x21, x21, l_.str.1@PAGEOFF
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x27]
	ldr	w1, [x24]
	bl	_kzalloc
	str	x0, [x26]
	cbz	x0, LBB0_10
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x25, x25, #1
	ldrsw	x8, [x23]
	add	x26, x26, #16
	cmp	x25, x8
	b.lt	LBB0_3
; %bb.5:
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.6:
	mov	x21, #0
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_init_waitqueue_head
	mov	x0, x19
	mov	x1, x20
	bl	_lbtf_cleanup_and_insert_cmd
	add	x21, x21, #1
	ldrsw	x8, [x23]
	add	x20, x20, #16
	cmp	x21, x8
	b.lt	LBB0_7
LBB0_8:
	mov	w19, #0
	b	LBB0_11
LBB0_9:
Lloh10:
	adrp	x21, l_.str@PAGE
Lloh11:
	add	x21, x21, l_.str@PAGEOFF
LBB0_10:
	mov	x0, x21
	bl	_lbtf_deb_host
	mov	w19, #-1
LBB0_11:
	ldr	w0, [x22]
Lloh12:
	adrp	x1, l_.str.2@PAGE
Lloh13:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x19
	bl	_lbtf_deb_leave_args
	mov	x0, x19
	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 AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_LBTF_DEB_HOST,4,2              ; @LBTF_DEB_HOST
	.comm	_LBS_NUM_CMD_BUFFERS,4,2        ; @LBS_NUM_CMD_BUFFERS
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ALLOC_CMD_BUF: tempcmd_array is NULL\n"

	.comm	_LBS_CMD_BUFFER_SIZE,4,2        ; @LBS_CMD_BUFFER_SIZE
l_.str.1:                               ; @.str.1
	.asciz	"ALLOC_CMD_BUF: ptempvirtualaddr is NULL\n"

l_.str.2:                               ; @.str.2
	.asciz	"ret %d"

.subsections_via_symbols
