	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cmd_queue_has_room
_cmd_queue_has_room:                    ## @cmd_queue_has_room
	.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	%rcx, %r14
	movq	%rsi, %rbx
	movq	(%rdi), %r13
	movq	_QUEUE_ALIGNMENT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rdx, %rdi
	callq	_ALIGN
	movq	%rax, %r15
	movl	20(%rbx), %esi
	movq	%r13, %rdi
	callq	_nvkm_falcon_rd32
	movq	%rax, %r12
	movl	16(%rbx), %esi
	movq	%r13, %rdi
	callq	_nvkm_falcon_rd32
	cmpq	%rax, %r12
	jge	LBB0_2
## %bb.1:
	movq	%r12, %rdx
                                        ## implicit-def: $rcx
	jmp	LBB0_5
LBB0_2:
	movq	(%rbx), %rdx
	movq	_HDR_SIZE@GOTPCREL(%rip), %rsi
	movq	8(%rbx), %rcx
	addq	%rdx, %rcx
	movq	(%rsi), %rsi
	addq	%r12, %rsi
	subq	%rsi, %rcx
	cmpq	%rcx, %r15
	jle	LBB0_3
## %bb.4:
	movl	$1, (%r14)
	jmp	LBB0_5
LBB0_3:
	movq	%r12, %rdx
LBB0_5:
	movq	%rdx, %rsi
	notq	%rsi
	addq	%rax, %rsi
	cmpq	%rdx, %rax
	cmovleq	%rcx, %rsi
	xorl	%eax, %eax
	cmpq	%rsi, %r15
	setle	%al
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_QUEUE_ALIGNMENT,4,2            ## @QUEUE_ALIGNMENT
	.comm	_HDR_SIZE,8,3                   ## @HDR_SIZE
	.no_dead_strip	_cmd_queue_has_room
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cmd_queue_has_room
_cmd_queue_has_room:                    ; @cmd_queue_has_room
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x3
	mov	x22, x1
	ldr	x23, [x0]
Lloh0:
	adrp	x8, _QUEUE_ALIGNMENT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _QUEUE_ALIGNMENT@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x2
	bl	_ALIGN
	mov	x19, x0
	ldr	w1, [x22, #20]
	mov	x0, x23
	bl	_nvkm_falcon_rd32
	mov	x21, x0
	ldr	w1, [x22, #16]
	mov	x0, x23
	bl	_nvkm_falcon_rd32
	cmp	x21, x0
	b.ge	LBB0_2
; %bb.1:
                                        ; implicit-def: $x8
	b	LBB0_4
LBB0_2:
Lloh3:
	adrp	x8, _HDR_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _HDR_SIZE@GOTPAGEOFF]
	ldp	x9, x10, [x22]
Lloh5:
	ldr	x8, [x8]
	add	x10, x9, x10
	add	x8, x21, x8
	sub	x8, x10, x8
	cmp	x19, x8
	b.le	LBB0_4
; %bb.3:
	mov	w10, #1
	str	w10, [x20]
	mov	x21, x9
LBB0_4:
	mvn	x9, x21
	add	x9, x0, x9
	cmp	x0, x21
	csel	x8, x9, x8, gt
	cmp	x19, x8
	cset	w0, le
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_QUEUE_ALIGNMENT,4,2            ; @QUEUE_ALIGNMENT
	.comm	_HDR_SIZE,8,3                   ; @HDR_SIZE
	.no_dead_strip	_cmd_queue_has_room
.subsections_via_symbols
