	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function venus_iface_cmdq_write_nolock
_venus_iface_cmdq_write_nolock:         ## @venus_iface_cmdq_write_nolock
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	16(%rdi), %rax
	movq	(%rax), %r14
	callq	_venus_is_valid_state
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	(%r15), %eax
	movl	%eax, 8(%rbx)
	movq	_IFACEQ_CMD_IDX@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	shlq	$2, %rsi
	addq	(%rbx), %rsi
	leaq	-32(%rbp), %rcx
	movq	%rbx, %rdi
	movq	%r15, %rdx
	callq	_venus_write_queue
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %r15d
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_dev_err
	jmp	LBB0_6
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_6
LBB0_4:
	xorl	%r15d, %r15d
	cmpq	$0, -32(%rbp)
	je	LBB0_6
## %bb.5:
	movq	%rbx, %rdi
	callq	_venus_soft_int
LBB0_6:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IFACEQ_CMD_IDX,8,3             ## @IFACEQ_CMD_IDX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"write to iface cmd queue failed (%d)\n"

	.no_dead_strip	_venus_iface_cmdq_write_nolock
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function venus_iface_cmdq_write_nolock
_venus_iface_cmdq_write_nolock:         ; @venus_iface_cmdq_write_nolock
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x21, x1
	mov	x19, x0
	ldr	x8, [x0, #16]
	ldr	x20, [x8]
	bl	_venus_is_valid_state
	cbz	w0, LBB0_3
; %bb.1:
	ldr	w8, [x21]
	str	w8, [x19, #8]
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _IFACEQ_CMD_IDX@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IFACEQ_CMD_IDX@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x1, x8, x9, lsl #2
	add	x3, sp, #8
	mov	x0, x19
	mov	x2, x21
	bl	_venus_write_queue
	cbz	w0, LBB0_4
; %bb.2:
	mov	x21, x0
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x21
	bl	_dev_err
	b	LBB0_7
LBB0_3:
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_7
LBB0_4:
	ldr	x8, [sp, #8]
	cbz	x8, LBB0_6
; %bb.5:
	mov	x0, x19
	bl	_venus_soft_int
LBB0_6:
	mov	w21, #0
LBB0_7:
	mov	x0, x21
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_IFACEQ_CMD_IDX,8,3             ; @IFACEQ_CMD_IDX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"write to iface cmd queue failed (%d)\n"

	.no_dead_strip	_venus_iface_cmdq_write_nolock
.subsections_via_symbols
