	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lbs_allocate_cmd_buffer        ## -- Begin function lbs_allocate_cmd_buffer
	.p2align	4, 0x90
_lbs_allocate_cmd_buffer:               ## @lbs_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, %rbx
	movq	_LBS_NUM_CMD_BUFFERS@GOTPCREL(%rip), %r12
	movl	(%r12), %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, (%rbx)
	cmpl	$0, (%r12)
	jle	LBB0_5
## %bb.10:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%r15, %rbx
	addq	$8, %rbx
	xorl	%r14d, %r14d
	movq	_LBS_CMD_BUFFER_SIZE@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kzalloc
	movq	%rax, (%rbx)
	testq	%rax, %rax
	je	LBB0_12
## %bb.6:                               ##   in Loop: Header=BB0_11 Depth=1
	incq	%r14
	movslq	(%r12), %rax
	addq	$16, %rbx
	cmpq	%rax, %r14
	jl	LBB0_11
## %bb.7:
	xorl	%r14d, %r14d
	testl	%eax, %eax
	jle	LBB0_3
## %bb.8:
	xorl	%ebx, %ebx
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	callq	_init_waitqueue_head
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	_lbs_cleanup_and_insert_cmd
	incq	%rbx
	movslq	(%r12), %rax
	addq	$16, %r15
	cmpq	%rax, %rbx
	jl	LBB0_9
	jmp	LBB0_3
LBB0_1:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_2
LBB0_5:
	xorl	%r14d, %r14d
	jmp	LBB0_3
LBB0_12:
	leaq	L_.str.1(%rip), %rdi
LBB0_2:
	callq	_lbs_deb_host
	movl	$-1, %r14d
LBB0_3:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.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"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lbs_allocate_cmd_buffer        ; -- Begin function lbs_allocate_cmd_buffer
	.p2align	2
_lbs_allocate_cmd_buffer:               ; @lbs_allocate_cmd_buffer
	.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	x22, _LBS_NUM_CMD_BUFFERS@GOTPAGE
Lloh1:
	ldr	x22, [x22, _LBS_NUM_CMD_BUFFERS@GOTPAGEOFF]
	ldr	w8, [x22]
	lsl	w0, w8, #4
Lloh2:
	adrp	x23, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x23, [x23, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x23]
	bl	_kzalloc
	cbz	x0, LBB0_9
; %bb.1:
	mov	x20, x0
	str	x0, [x19]
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.2:
	mov	x24, #0
	add	x25, x20, #8
Lloh4:
	adrp	x26, _LBS_CMD_BUFFER_SIZE@GOTPAGE
Lloh5:
	ldr	x26, [x26, _LBS_CMD_BUFFER_SIZE@GOTPAGEOFF]
Lloh6:
	adrp	x21, l_.str.1@PAGE
Lloh7:
	add	x21, x21, l_.str.1@PAGEOFF
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x26]
	ldr	w1, [x23]
	bl	_kzalloc
	str	x0, [x25]
	cbz	x0, LBB0_10
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x24, x24, #1
	ldrsw	x8, [x22]
	add	x25, x25, #16
	cmp	x24, 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	_lbs_cleanup_and_insert_cmd
	add	x21, x21, #1
	ldrsw	x8, [x22]
	add	x20, x20, #16
	cmp	x21, x8
	b.lt	LBB0_7
LBB0_8:
	mov	w0, #0
	b	LBB0_11
LBB0_9:
Lloh8:
	adrp	x21, l_.str@PAGE
Lloh9:
	add	x21, x21, l_.str@PAGEOFF
LBB0_10:
	mov	x0, x21
	bl	_lbs_deb_host
	mov	w0, #-1
LBB0_11:
	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
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.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"

.subsections_via_symbols
