	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cmd_queue_rewind
_cmd_queue_rewind:                      ## @cmd_queue_rewind
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %rbx
	movq	(%rdi), %rax
	movq	(%rax), %r14
	movq	_MSGQUEUE_UNIT_REWIND@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -20(%rbp)
	movl	$8, -24(%rbp)
	leaq	-24(%rbp), %rdx
	movl	$8, %ecx
	callq	_cmd_queue_push
	testl	%eax, %eax
	movl	8(%rbx), %edx
	leaq	L_.str.1(%rip), %rax
	leaq	L_.str(%rip), %rsi
	cmoveq	%rax, %rsi
	movq	%r14, %rdi
	callq	_nvkm_error
	movl	(%rbx), %eax
	movl	%eax, 4(%rbx)
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MSGQUEUE_UNIT_REWIND,4,2       ## @MSGQUEUE_UNIT_REWIND
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"queue %d rewind failed\n"

L_.str.1:                               ## @.str.1
	.asciz	"queue %d rewinded\n"

	.no_dead_strip	_cmd_queue_rewind
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cmd_queue_rewind
_cmd_queue_rewind:                      ; @cmd_queue_rewind
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x1
	ldr	x8, [x0]
	ldr	x20, [x8]
Lloh0:
	adrp	x8, _MSGQUEUE_UNIT_REWIND@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MSGQUEUE_UNIT_REWIND@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	mov	w9, #8
	stp	w9, w8, [sp, #8]
	add	x2, sp, #8
	mov	w3, #8
	bl	_cmd_queue_push
	ldr	w2, [x19, #8]
Lloh3:
	adrp	x8, l_.str@PAGE
Lloh4:
	add	x8, x8, l_.str@PAGEOFF
Lloh5:
	adrp	x9, l_.str.1@PAGE
Lloh6:
	add	x9, x9, l_.str.1@PAGEOFF
	cmp	w0, #0
	csel	x1, x9, x8, eq
	mov	x0, x20
	bl	_nvkm_error
	ldr	w8, [x19]
	str	w8, [x19, #4]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MSGQUEUE_UNIT_REWIND,4,2       ; @MSGQUEUE_UNIT_REWIND
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"queue %d rewind failed\n"

l_.str.1:                               ; @.str.1
	.asciz	"queue %d rewinded\n"

	.no_dead_strip	_cmd_queue_rewind
.subsections_via_symbols
