	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vmw_rebind_all_dx_query
_vmw_rebind_all_dx_query:               ## @vmw_rebind_all_dx_query
	.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	%rdi, %r12
	movq	8(%rdi), %r15
	movq	_cmd@GOTPCREL(%rip), %r13
	movq	(%r13), %rax
	movq	_SVGA3dCmdDXBindAllQuery@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	(%rax), %rdi
	movq	8(%rax), %rsi
	callq	_VMW_DECLARE_CMD_VAR
	movq	%r12, %rdi
	callq	_vmw_context_get_dx_query_mob
	xorl	%r14d, %r14d
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	movq	%rax, %rbx
	cmpq	$0, 8(%rax)
	jne	LBB0_5
## %bb.2:
	movl	(%r12), %edx
	movq	%r15, %rdi
	movl	$16, %esi
	callq	_VMW_FIFO_RESERVE_DX
	movq	%rax, (%r13)
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	_SVGA_3D_CMD_DX_BIND_ALL_QUERY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 12(%rax)
	movl	$8, 8(%rax)
	movl	(%r12), %ecx
	movl	%ecx, 4(%rax)
	movl	(%rbx), %ecx
	movl	%ecx, (%rax)
	movq	%r15, %rdi
	movl	$16, %esi
	callq	_vmw_fifo_commit
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_vmw_context_bind_dx_query
	jmp	LBB0_5
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_5:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_cmd,8,3                        ## @cmd
	.comm	_SVGA3dCmdDXBindAllQuery,4,2    ## @SVGA3dCmdDXBindAllQuery
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_SVGA_3D_CMD_DX_BIND_ALL_QUERY,4,2 ## @SVGA_3D_CMD_DX_BIND_ALL_QUERY
	.no_dead_strip	_vmw_rebind_all_dx_query
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vmw_rebind_all_dx_query
_vmw_rebind_all_dx_query:               ; @vmw_rebind_all_dx_query
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x0
	ldr	x20, [x0, #8]
Lloh0:
	adrp	x22, _cmd@GOTPAGE
Lloh1:
	ldr	x22, [x22, _cmd@GOTPAGEOFF]
	ldr	x8, [x22]
Lloh2:
	adrp	x9, _SVGA3dCmdDXBindAllQuery@GOTPAGE
Lloh3:
	ldr	x9, [x9, _SVGA3dCmdDXBindAllQuery@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x9]
	ldp	x0, x1, [x8]
	bl	_VMW_DECLARE_CMD_VAR
	mov	x0, x19
	bl	_vmw_context_get_dx_query_mob
	cbz	x0, LBB0_5
; %bb.1:
	mov	x21, x0
	ldr	x8, [x0, #8]
	cbnz	x8, LBB0_4
; %bb.2:
	ldr	w2, [x19]
	mov	x0, x20
	mov	w1, #16
	bl	_VMW_FIFO_RESERVE_DX
	str	x0, [x22]
	cbz	x0, LBB0_6
; %bb.3:
Lloh5:
	adrp	x8, _SVGA_3D_CMD_DX_BIND_ALL_QUERY@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SVGA_3D_CMD_DX_BIND_ALL_QUERY@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	mov	w9, #8
	stp	w9, w8, [x0, #8]
	ldr	w8, [x19]
	ldr	w9, [x21]
	stp	w9, w8, [x0]
	mov	x0, x20
	mov	w1, #16
	bl	_vmw_fifo_commit
	mov	x0, x19
	mov	x1, x21
	bl	_vmw_context_bind_dx_query
LBB0_4:
	mov	w0, #0
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_6:
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_cmd,8,3                        ; @cmd
	.comm	_SVGA3dCmdDXBindAllQuery,4,2    ; @SVGA3dCmdDXBindAllQuery
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_SVGA_3D_CMD_DX_BIND_ALL_QUERY,4,2 ; @SVGA_3D_CMD_DX_BIND_ALL_QUERY
	.no_dead_strip	_vmw_rebind_all_dx_query
.subsections_via_symbols
