	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vmw_cmdbuf_reserve             ## -- Begin function vmw_cmdbuf_reserve
	.p2align	4, 0x90
_vmw_cmdbuf_reserve:                    ## @vmw_cmdbuf_reserve
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	testq	%r8, %r8
	je	LBB0_5
## %bb.1:
	cmpq	%rsi, (%r8)
	jae	LBB0_2
## %bb.6:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_5:
	popq	%rbp
	jmp	_vmw_cmdbuf_reserve_cur         ## TAILCALL
LBB0_2:
	movq	_SVGA3D_INVALID_ID@GOTPCREL(%rip), %rax
	cmpl	%edx, (%rax)
	je	LBB0_4
## %bb.3:
	movq	_SVGA_CB_FLAG_DX_CONTEXT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	24(%r8), %rcx
	orl	%eax, 4(%rcx)
	movl	%edx, (%rcx)
LBB0_4:
	movq	%rsi, 8(%r8)
	movq	16(%r8), %rax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SVGA3D_INVALID_ID,4,2          ## @SVGA3D_INVALID_ID
	.comm	_SVGA_CB_FLAG_DX_CONTEXT,4,2    ## @SVGA_CB_FLAG_DX_CONTEXT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vmw_cmdbuf_reserve             ; -- Begin function vmw_cmdbuf_reserve
	.p2align	2
_vmw_cmdbuf_reserve:                    ; @vmw_cmdbuf_reserve
	.cfi_startproc
; %bb.0:
	cbz	x4, LBB0_3
; %bb.1:
	ldr	x8, [x4]
	cmp	x8, x1
	b.hs	LBB0_4
; %bb.2:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	_ERR_PTR
LBB0_3:
	b	_vmw_cmdbuf_reserve_cur
LBB0_4:
Lloh3:
	adrp	x8, _SVGA3D_INVALID_ID@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SVGA3D_INVALID_ID@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w8, w2
	b.eq	LBB0_6
; %bb.5:
Lloh6:
	adrp	x8, _SVGA_CB_FLAG_DX_CONTEXT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SVGA_CB_FLAG_DX_CONTEXT@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	ldr	x9, [x4, #24]
	ldr	w10, [x9, #4]
	orr	w8, w10, w8
	stp	w2, w8, [x9]
LBB0_6:
	str	x1, [x4, #8]
	ldr	x0, [x4, #16]
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SVGA3D_INVALID_ID,4,2          ; @SVGA3D_INVALID_ID
	.comm	_SVGA_CB_FLAG_DX_CONTEXT,4,2    ; @SVGA_CB_FLAG_DX_CONTEXT
.subsections_via_symbols
