	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vmw_context_define
_vmw_context_define:                    ## @vmw_context_define
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r13d
	movq	%rdx, %rbx
	movq	%rsi, %r14
	callq	_vmw_priv
	movq	%rax, %r12
	movq	%rbx, %rdi
	callq	_vmw_fpriv
	movq	(%rax), %r15
	movq	$1, -64(%rbp)
	testl	%r13d, %r13d
	je	LBB0_3
## %bb.1:
	cmpl	$0, 16(%r12)
	jne	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rdi
	callq	_VMW_DEBUG_USER
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_20
LBB0_3:
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	_vmw_user_context_size@GOTPCREL(%rip), %r14
	xorl	%edi, %edi
	cmpq	$0, (%r14)
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_8
## %bb.4:
	movl	$24, %edi
	callq	_ttm_round_pot
	movq	%rax, %rbx
	cmpq	$0, 8(%r12)
	je	LBB0_5
## %bb.6:
	xorl	%eax, %eax
	callq	_vmw_cmdbuf_res_man_size
	cltq
	jmp	LBB0_7
LBB0_5:
	xorl	%eax, %eax
LBB0_7:
	addq	%rbx, %rax
	movq	_VMW_IDA_ACC_SIZE@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	addq	%rax, %rcx
	movq	_TTM_OBJ_EXTRA_SIZE@GOTPCREL(%rip), %rax
	addq	(%rax), %rcx
	movq	%rcx, (%r14)
LBB0_8:
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_ttm_read_lock
	movl	%eax, %ebx
	xorl	%edi, %edi
	testl	%eax, %eax
	setne	%dil
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_20
## %bb.9:
	movq	%r12, %rdi
	callq	_vmw_mem_glob
	movq	(%r14), %rsi
	leaq	-64(%rbp), %rdx
	movl	%eax, %edi
	callq	_ttm_mem_global_alloc
	movl	%eax, %ebx
	xorl	%edi, %edi
	testl	%eax, %eax
	setne	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_12
## %bb.10:
	movq	_ERESTARTSYS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%ebx, %eax
	je	LBB0_19
## %bb.11:
	leaq	L_.str.1(%rip), %rdi
	callq	_DRM_ERROR
	jmp	LBB0_19
LBB0_12:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$24, %edi
	callq	_kzalloc
	movq	%rax, %rbx
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:
	movq	%r12, %rdi
	callq	_vmw_mem_glob
	movq	(%r14), %rsi
	movl	%eax, %edi
	callq	_ttm_mem_global_free
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_19
LBB0_14:
	movq	%rbx, %rsi
	addq	$16, %rsi
	movq	%rsi, -80(%rbp)
	movl	$0, (%rbx)
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	$0, 8(%rbx)
	movq	_vmw_user_context_free@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movq	%rsi, %r14
	movl	%r13d, %ecx
	callq	_vmw_context_init
	movl	%eax, %ebx
	xorl	%edi, %edi
	testl	%eax, %eax
	setne	%dil
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_19
## %bb.15:
	movq	%r14, %rdi
	callq	_vmw_resource_reference
	movq	%rax, -72(%rbp)
	movq	_VMW_RES_CONTEXT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_vmw_user_context_base_release@GOTPCREL(%rip), %r8
	movq	%r15, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	xorl	%edx, %edx
	xorl	%r9d, %r9d
	callq	_ttm_base_object_init
	movl	%eax, %ebx
	xorl	%edi, %edi
	testl	%eax, %eax
	setne	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_17
## %bb.16:
	leaq	-72(%rbp), %rdi
	callq	_vmw_resource_unreference
	jmp	LBB0_18
LBB0_17:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax), %eax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
LBB0_18:
	leaq	-80(%rbp), %rdi
	callq	_vmw_resource_unreference
LBB0_19:
	movq	%r12, %rdi
	callq	_ttm_read_unlock
LBB0_20:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"DX contexts not supported by device.\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_vmw_user_context_size,8,3      ## @vmw_user_context_size
	.comm	_VMW_IDA_ACC_SIZE,4,2           ## @VMW_IDA_ACC_SIZE
	.comm	_TTM_OBJ_EXTRA_SIZE,8,3         ## @TTM_OBJ_EXTRA_SIZE
	.comm	_ERESTARTSYS,4,2                ## @ERESTARTSYS
L_.str.1:                               ## @.str.1
	.asciz	"Out of graphics memory for context creation.\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_vmw_user_context_free,4,2      ## @vmw_user_context_free
	.comm	_VMW_RES_CONTEXT,4,2            ## @VMW_RES_CONTEXT
	.comm	_vmw_user_context_base_release,4,2 ## @vmw_user_context_base_release
	.no_dead_strip	_vmw_context_define
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vmw_context_define
_vmw_context_define:                    ; @vmw_context_define
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x22, x3
	mov	x21, x2
	mov	x20, x1
	bl	_vmw_priv
	mov	x19, x0
	mov	x0, x21
	bl	_vmw_fpriv
	ldr	x21, [x0]
	mov	w8, #1
	str	x8, [sp, #8]
	cbz	w22, LBB0_3
; %bb.1:
	ldr	w8, [x19, #16]
	cbnz	w8, LBB0_3
; %bb.2:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_VMW_DEBUG_USER
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_19
LBB0_3:
Lloh5:
	adrp	x25, _vmw_user_context_size@GOTPAGE
Lloh6:
	ldr	x25, [x25, _vmw_user_context_size@GOTPAGEOFF]
	ldr	x8, [x25]
	cmp	x8, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_7
; %bb.4:
	mov	w0, #24
	bl	_ttm_round_pot
	mov	x23, x0
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_6
; %bb.5:
	bl	_vmw_cmdbuf_res_man_size
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x8, w0
LBB0_6:
Lloh7:
	adrp	x9, _VMW_IDA_ACC_SIZE@GOTPAGE
Lloh8:
	ldr	x9, [x9, _VMW_IDA_ACC_SIZE@GOTPAGEOFF]
Lloh9:
	ldrsw	x9, [x9]
	add	x8, x8, x23
	add	x8, x8, x9
Lloh10:
	adrp	x9, _TTM_OBJ_EXTRA_SIZE@GOTPAGE
Lloh11:
	ldr	x9, [x9, _TTM_OBJ_EXTRA_SIZE@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	add	x8, x8, x9
	str	x8, [x25]
LBB0_7:
	mov	x0, x19
	mov	w1, #1
	bl	_ttm_read_lock
	mov	x23, x0
	cmp	w0, #0
	cset	w0, ne
	bl	_unlikely
	cbnz	x0, LBB0_19
; %bb.8:
	mov	x0, x19
	bl	_vmw_mem_glob
	ldr	x1, [x25]
	add	x2, sp, #8
	bl	_ttm_mem_global_alloc
	mov	x23, x0
	cmp	w0, #0
	cset	w0, ne
	bl	_unlikely
	cbz	x0, LBB0_11
; %bb.9:
Lloh13:
	adrp	x8, _ERESTARTSYS@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ERESTARTSYS@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	cmn	w23, w8
	b.eq	LBB0_18
; %bb.10:
Lloh16:
	adrp	x0, l_.str.1@PAGE
Lloh17:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_ERROR
	b	LBB0_18
LBB0_11:
Lloh18:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	w0, #24
	bl	_kzalloc
	mov	x24, x0
	cmp	x0, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_13
; %bb.12:
	mov	x0, x19
	bl	_vmw_mem_glob
	ldr	x1, [x25]
	bl	_ttm_mem_global_free
Lloh21:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_18
LBB0_13:
	add	x25, x24, #16
	str	x25, [sp, #24]
	str	wzr, [x24]
	str	xzr, [x24, #8]
Lloh24:
	adrp	x8, _vmw_user_context_free@GOTPAGE
Lloh25:
	ldr	x8, [x8, _vmw_user_context_free@GOTPAGEOFF]
Lloh26:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x25
	mov	x3, x22
	bl	_vmw_context_init
	mov	x23, x0
	cmp	w0, #0
	cset	w0, ne
	bl	_unlikely
	cbnz	x0, LBB0_18
; %bb.14:
	mov	x0, x25
	bl	_vmw_resource_reference
	str	x0, [sp, #16]
Lloh27:
	adrp	x8, _VMW_RES_CONTEXT@GOTPAGE
Lloh28:
	ldr	x8, [x8, _VMW_RES_CONTEXT@GOTPAGEOFF]
Lloh29:
	ldr	w3, [x8]
Lloh30:
	adrp	x4, _vmw_user_context_base_release@GOTPAGE
Lloh31:
	ldr	x4, [x4, _vmw_user_context_base_release@GOTPAGEOFF]
	mov	x0, x21
	mov	x1, x24
	mov	w2, #0
	mov	x5, #0
	bl	_ttm_base_object_init
	mov	x23, x0
	cmp	w0, #0
	cset	w0, ne
	bl	_unlikely
	cbz	x0, LBB0_16
; %bb.15:
	add	x0, sp, #16
	bl	_vmw_resource_unreference
	b	LBB0_17
LBB0_16:
	ldr	w8, [x24, #4]
	str	w8, [x20]
LBB0_17:
	add	x0, sp, #24
	bl	_vmw_resource_unreference
LBB0_18:
	mov	x0, x19
	bl	_ttm_read_unlock
LBB0_19:
	mov	x0, x23
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"DX contexts not supported by device.\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_vmw_user_context_size,8,3      ; @vmw_user_context_size
	.comm	_VMW_IDA_ACC_SIZE,4,2           ; @VMW_IDA_ACC_SIZE
	.comm	_TTM_OBJ_EXTRA_SIZE,8,3         ; @TTM_OBJ_EXTRA_SIZE
	.comm	_ERESTARTSYS,4,2                ; @ERESTARTSYS
l_.str.1:                               ; @.str.1
	.asciz	"Out of graphics memory for context creation.\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_vmw_user_context_free,4,2      ; @vmw_user_context_free
	.comm	_VMW_RES_CONTEXT,4,2            ; @VMW_RES_CONTEXT
	.comm	_vmw_user_context_base_release,4,2 ; @vmw_user_context_base_release
	.no_dead_strip	_vmw_context_define
.subsections_via_symbols
