	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vmw_cmdbuf_send_device_command
_vmw_cmdbuf_send_device_command:        ## @vmw_cmdbuf_send_device_command
	.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	%rdx, %r13
	movq	%rsi, %r12
	movq	%rdi, %r15
	xorl	%r14d, %r14d
	leaq	-48(%rbp), %rcx
	movq	%rdx, %rsi
	xorl	%edx, %edx
	callq	_vmw_cmdbuf_alloc
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	movq	%rbx, %rdi
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	callq	_PTR_ERR
	movl	%eax, %r14d
	jmp	LBB0_4
LBB0_2:
	movq	%r12, %rsi
	movq	%r13, %rdx
	callq	_memcpy
	movq	-48(%rbp), %rax
	movq	8(%rax), %rcx
	movq	%r13, (%rcx)
	movq	_SVGA_CB_CONTEXT_DEVICE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, (%rax)
	movq	%r15, %rdi
	callq	_spin_lock
	movq	-48(%rbp), %rdi
	callq	_vmw_cmdbuf_header_submit
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_spin_unlock
	movq	-48(%rbp), %rdi
	callq	_vmw_cmdbuf_header_free
	movq	_SVGA_CB_STATUS_COMPLETED@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	je	LBB0_4
## %bb.3:
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	callq	_DRM_ERROR
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_4:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SVGA_CB_CONTEXT_DEVICE,4,2     ## @SVGA_CB_CONTEXT_DEVICE
	.comm	_SVGA_CB_STATUS_COMPLETED,4,2   ## @SVGA_CB_STATUS_COMPLETED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Device context command failed with status %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_vmw_cmdbuf_send_device_command
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vmw_cmdbuf_send_device_command
_vmw_cmdbuf_send_device_command:        ; @vmw_cmdbuf_send_device_command
	.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	x20, x2
	mov	x21, x1
	mov	x19, x0
	add	x3, sp, #8
	mov	x1, x2
	mov	w2, #0
	bl	_vmw_cmdbuf_alloc
	mov	x22, x0
	bl	_IS_ERR
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x22
	bl	_PTR_ERR
	b	LBB0_5
LBB0_2:
	mov	x0, x22
	mov	x1, x21
	mov	x2, x20
	bl	_memcpy
	ldr	x8, [sp, #8]
	ldr	x9, [x8, #8]
	str	x20, [x9]
Lloh0:
	adrp	x9, _SVGA_CB_CONTEXT_DEVICE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SVGA_CB_CONTEXT_DEVICE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	str	w9, [x8]
	mov	x0, x19
	bl	_spin_lock
	ldr	x0, [sp, #8]
	bl	_vmw_cmdbuf_header_submit
	mov	x20, x0
	mov	x0, x19
	bl	_spin_unlock
	ldr	x0, [sp, #8]
	bl	_vmw_cmdbuf_header_free
Lloh3:
	adrp	x8, _SVGA_CB_STATUS_COMPLETED@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SVGA_CB_STATUS_COMPLETED@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w20, w8
	b.ne	LBB0_4
; %bb.3:
	mov	w0, #0
	b	LBB0_5
LBB0_4:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_DRM_ERROR
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_SVGA_CB_CONTEXT_DEVICE,4,2     ; @SVGA_CB_CONTEXT_DEVICE
	.comm	_SVGA_CB_STATUS_COMPLETED,4,2   ; @SVGA_CB_STATUS_COMPLETED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Device context command failed with status %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_vmw_cmdbuf_send_device_command
.subsections_via_symbols
