	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function carm_get_request
_carm_get_request:                      ## @carm_get_request
	.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	_CARM_MAX_HOST_SG@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_CARM_MAX_REQ_SG@GOTPCREL(%rip), %r14
	subq	(%r14), %rax
	cmpq	%rax, (%rdi)
	jge	LBB0_7
## %bb.1:
	movq	_max_queue@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	testq	%rdx, %rdx
	je	LBB0_6
## %bb.2:
	movq	8(%rdi), %rax
	movl	$8, %ebx
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	$1, %esi
	shlq	%cl, %rsi
	btq	%rcx, %rax
	jae	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%rcx
	addq	$24, %rbx
	cmpq	%rcx, %rdx
	jne	LBB0_3
LBB0_6:
	leaq	L_.str(%rip), %rdi
	callq	_DPRINTK
LBB0_7:
	xorl	%r15d, %r15d
LBB0_8:
	movq	%r15, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	24(%rdi), %r12
	leaq	(%r12,%rbx), %r15
	addq	$-8, %r15
	orq	%rsi, %rax
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%r12,%rbx)
	movq	%rax, 8(%rdi)
	movq	16(%rdi), %rax
	leaq	1(%rax), %rcx
	movq	%rcx, 16(%rdi)
	movq	_CARM_MAX_REQ@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	setl	%dil
	callq	_assert
	movl	-8(%r12,%rbx), %edi
	movq	(%r14), %rsi
	callq	_sg_init_table
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_CARM_MAX_HOST_SG,8,3           ## @CARM_MAX_HOST_SG
	.comm	_CARM_MAX_REQ_SG,8,3            ## @CARM_MAX_REQ_SG
	.comm	_max_queue,4,2                  ## @max_queue
	.comm	_CARM_MAX_REQ,8,3               ## @CARM_MAX_REQ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"no request available, returning NULL\n"

	.no_dead_strip	_carm_get_request
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function carm_get_request
_carm_get_request:                      ; @carm_get_request
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _CARM_MAX_HOST_SG@GOTPAGE
Lloh1:
	ldr	x9, [x9, _CARM_MAX_HOST_SG@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
Lloh3:
	adrp	x20, _CARM_MAX_REQ_SG@GOTPAGE
Lloh4:
	ldr	x20, [x20, _CARM_MAX_REQ_SG@GOTPAGEOFF]
	ldr	x10, [x20]
	sub	x9, x9, x10
	cmp	x8, x9
	b.ge	LBB0_6
; %bb.1:
Lloh5:
	adrp	x8, _max_queue@GOTPAGE
Lloh6:
	ldr	x8, [x8, _max_queue@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cbz	w8, LBB0_5
; %bb.2:
	mov	x10, #0
	ldr	x9, [x0, #8]
	mov	w11, #8
	mov	w12, #1
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	lsl	x13, x12, x10
	tst	x9, x13
	b.eq	LBB0_8
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x10, x10, #1
	add	x11, x11, #24
	cmp	x8, x10
	b.ne	LBB0_3
LBB0_5:
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DPRINTK
LBB0_6:
	mov	x19, #0
LBB0_7:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_8:
	ldr	x8, [x0, #24]
	add	x19, x8, x11
	orr	x8, x9, x13
	stp	xzr, xzr, [x19]
	ldr	x9, [x0, #16]
	add	x10, x9, #1
	stp	x8, x10, [x0, #8]
Lloh10:
	adrp	x8, _CARM_MAX_REQ@GOTPAGE
Lloh11:
	ldr	x8, [x8, _CARM_MAX_REQ@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	cmp	x9, x8
	cset	w0, lt
	bl	_assert
	ldr	w0, [x19, #-8]!
	ldr	x1, [x20]
	bl	_sg_init_table
	b	LBB0_7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_CARM_MAX_HOST_SG,8,3           ; @CARM_MAX_HOST_SG
	.comm	_CARM_MAX_REQ_SG,8,3            ; @CARM_MAX_REQ_SG
	.comm	_max_queue,4,2                  ; @max_queue
	.comm	_CARM_MAX_REQ,8,3               ; @CARM_MAX_REQ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"no request available, returning NULL\n"

	.no_dead_strip	_carm_get_request
.subsections_via_symbols
