	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nvkm_msgqueue_post             ## -- Begin function nvkm_msgqueue_post
	.p2align	4, 0x90
_nvkm_msgqueue_post:                    ## @nvkm_msgqueue_post
	.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	%r8, %r13
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	%rdx, %r14
	movl	%esi, %r15d
	movq	%rdi, %r12
	testl	%r9d, %r9d
	je	LBB0_3
## %bb.1:
	leaq	8(%r12), %rbx
	movl	$1000, %edi                     ## imm = 0x3E8
	callq	_msecs_to_jiffies
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_wait_for_completion_timeout
	testl	%eax, %eax
	je	LBB0_2
LBB0_3:
	movq	%r13, %rbx
	movq	(%r12), %rax
	movq	%r12, %rdi
	movl	%r15d, %esi
	callq	*(%rax)
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	movq	%r13, %rdi
	jmp	LBB0_5
LBB0_6:
	movq	%r12, %rdi
	callq	_msgqueue_seq_acquire
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movq	%r15, %rdi
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_2:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_11
LBB0_8:
	movl	20(%r15), %eax
	movl	%eax, 4(%r14)
	movq	_CMD_FLAGS_STATUS@GOTPCREL(%rip), %rax
	movq	_CMD_FLAGS_INTR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	%ecx, (%r14)
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 16(%r15)
	movq	_SEQ_STATE_USED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r15)
	movq	%rbx, 8(%r15)
	movq	%r12, %rdi
	movq	%r14, %rsi
	movq	%r13, %rdx
	callq	_cmd_write
	testl	%eax, %eax
	je	LBB0_9
## %bb.10:
	movl	%eax, %ebx
	movq	_SEQ_STATE_PENDING@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r15)
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_msgqueue_seq_release
	jmp	LBB0_11
LBB0_9:
	xorl	%ebx, %ebx
LBB0_11:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.comm	_CMD_FLAGS_STATUS,4,2           ## @CMD_FLAGS_STATUS
	.comm	_CMD_FLAGS_INTR,4,2             ## @CMD_FLAGS_INTR
	.comm	_SEQ_STATE_USED,4,2             ## @SEQ_STATE_USED
	.comm	_SEQ_STATE_PENDING,4,2          ## @SEQ_STATE_PENDING
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nvkm_msgqueue_post             ; -- Begin function nvkm_msgqueue_post
	.p2align	2
_nvkm_msgqueue_post:                    ; @nvkm_msgqueue_post
	.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	x21, x4
	mov	x22, x3
	mov	x20, x2
	mov	x23, x1
	mov	x19, x0
	cbz	w5, LBB0_2
; %bb.1:
	add	x24, x19, #8
	mov	w0, #1000
	bl	_msecs_to_jiffies
	mov	x1, x0
	mov	x0, x24
	bl	_wait_for_completion_timeout
	cbz	w0, LBB0_7
LBB0_2:
	ldr	x8, [x19]
	ldr	x8, [x8]
	mov	x0, x19
	mov	x1, x23
	blr	x8
	mov	x23, x0
	bl	_IS_ERR
	cbz	x0, LBB0_4
; %bb.3:
	mov	x0, x23
	b	LBB0_6
LBB0_4:
	mov	x0, x19
	bl	_msgqueue_seq_acquire
	mov	x24, x0
	bl	_IS_ERR
	cbz	x0, LBB0_8
; %bb.5:
	mov	x0, x24
LBB0_6:
	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
	b	_PTR_ERR
LBB0_7:
Lloh0:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_10
LBB0_8:
	ldr	w8, [x24, #20]
Lloh3:
	adrp	x9, _CMD_FLAGS_STATUS@GOTPAGE
Lloh4:
	ldr	x9, [x9, _CMD_FLAGS_STATUS@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
Lloh6:
	adrp	x10, _CMD_FLAGS_INTR@GOTPAGE
Lloh7:
	ldr	x10, [x10, _CMD_FLAGS_INTR@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	orr	w9, w10, w9
	stp	w9, w8, [x20]
	str	w22, [x24, #16]
Lloh9:
	adrp	x8, _SEQ_STATE_USED@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SEQ_STATE_USED@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	str	w8, [x24]
	str	x21, [x24, #8]
	mov	x0, x19
	mov	x1, x20
	mov	x2, x23
	bl	_cmd_write
	mov	x20, x0
	cbz	w0, LBB0_10
; %bb.9:
Lloh12:
	adrp	x8, _SEQ_STATE_PENDING@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SEQ_STATE_PENDING@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	str	w8, [x24]
	mov	x0, x19
	mov	x1, x24
	bl	_msgqueue_seq_release
LBB0_10:
	mov	x0, x20
	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	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.comm	_CMD_FLAGS_STATUS,4,2           ; @CMD_FLAGS_STATUS
	.comm	_CMD_FLAGS_INTR,4,2             ; @CMD_FLAGS_INTR
	.comm	_SEQ_STATE_USED,4,2             ; @SEQ_STATE_USED
	.comm	_SEQ_STATE_PENDING,4,2          ; @SEQ_STATE_PENDING
.subsections_via_symbols
