	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vmw_user_shader_alloc
_vmw_user_shader_alloc:                 ## @vmw_user_shader_alloc
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, %r13d
	movl	%r8d, -44(%rbp)                 ## 4-byte Spill
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r14
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r15
	movq	$1, -72(%rbp)
	movq	_vmw_user_shader_size@GOTPCREL(%rip), %rbx
	xorl	%edi, %edi
	cmpq	$0, (%rbx)
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movl	$24, %edi
	callq	_ttm_round_pot
	movq	_VMW_IDA_ACC_SIZE@GOTPCREL(%rip), %rcx
	addq	(%rcx), %rax
	movq	_TTM_OBJ_EXTRA_SIZE@GOTPCREL(%rip), %rcx
	addq	(%rcx), %rax
	movq	%rax, (%rbx)
LBB0_2:
	movq	%r15, %rdi
	callq	_vmw_mem_glob
	movq	(%rbx), %rsi
	leaq	-72(%rbp), %rdx
	movl	%eax, %edi
	callq	_ttm_mem_global_alloc
	movl	%eax, %r12d
	xorl	%edi, %edi
	testl	%eax, %eax
	setne	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movq	_ERESTARTSYS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%r12d, %eax
	je	LBB0_13
## %bb.4:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
	jmp	LBB0_13
LBB0_5:
	movl	%r13d, %r12d
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$24, %edi
	callq	_kzalloc
	movq	%rax, %r13
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	%r15, %rdi
	callq	_vmw_mem_glob
	movq	(%rbx), %rsi
	movl	%eax, %edi
	callq	_ttm_mem_global_free
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_13
LBB0_7:
	movl	16(%rbp), %r10d
	movq	%r13, %rbx
	addq	$16, %rbx
	movq	%rbx, -88(%rbp)
	movl	$0, (%r13)
	movq	$0, 8(%r13)
	movq	_vmw_user_shader_free@GOTPCREL(%rip), %rcx
	movl	(%rcx), %eax
	subq	$8, %rsp
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movq	%r14, %rdx
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	movl	%r12d, %r9d
	pushq	%rax
	pushq	-64(%rbp)                       ## 8-byte Folded Reload
	pushq	%r10
	callq	_vmw_gb_shader_init
	addq	$32, %rsp
	movl	%eax, %r12d
	xorl	%edi, %edi
	testl	%eax, %eax
	setne	%dil
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_13
## %bb.8:
	movq	24(%rbp), %r14
	movq	%rbx, %rdi
	callq	_vmw_resource_reference
	movq	%rax, -80(%rbp)
	movq	_VMW_RES_SHADER@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_vmw_user_shader_base_release@GOTPCREL(%rip), %r8
	movq	%r14, %rdi
	movq	%r13, %rsi
	xorl	%edx, %edx
	xorl	%r9d, %r9d
	callq	_ttm_base_object_init
	movl	%eax, %r12d
	xorl	%edi, %edi
	testl	%eax, %eax
	setne	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	leaq	-80(%rbp), %rdi
	callq	_vmw_resource_unreference
	jmp	LBB0_12
LBB0_10:
	movq	32(%rbp), %rax
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	movl	4(%r13), %ecx
	movl	%ecx, (%rax)
LBB0_12:
	leaq	-88(%rbp), %rdi
	callq	_vmw_resource_unreference
LBB0_13:
	movl	%r12d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_vmw_user_shader_size,8,3       ## @vmw_user_shader_size
	.comm	_VMW_IDA_ACC_SIZE,8,3           ## @VMW_IDA_ACC_SIZE
	.comm	_TTM_OBJ_EXTRA_SIZE,8,3         ## @TTM_OBJ_EXTRA_SIZE
	.comm	_ERESTARTSYS,4,2                ## @ERESTARTSYS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Out of graphics memory for shader creation.\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_vmw_user_shader_free,4,2       ## @vmw_user_shader_free
	.comm	_VMW_RES_SHADER,4,2             ## @VMW_RES_SHADER
	.comm	_vmw_user_shader_base_release,4,2 ## @vmw_user_shader_base_release
	.no_dead_strip	_vmw_user_shader_alloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vmw_user_shader_alloc
_vmw_user_shader_alloc:                 ; @vmw_user_shader_alloc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x27, x7
	mov	x20, x6
	mov	x21, x5
	mov	x23, x4
	mov	x24, x3
	mov	x25, x2
	mov	x22, x1
	mov	x26, x0
	mov	w8, #1
	str	x8, [sp, #24]
Lloh0:
	adrp	x19, _vmw_user_shader_size@GOTPAGE
Lloh1:
	ldr	x19, [x19, _vmw_user_shader_size@GOTPAGEOFF]
	ldr	x8, [x19]
	cmp	x8, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_2
; %bb.1:
	mov	w0, #24
	bl	_ttm_round_pot
Lloh2:
	adrp	x8, _VMW_IDA_ACC_SIZE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _VMW_IDA_ACC_SIZE@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
Lloh5:
	adrp	x9, _TTM_OBJ_EXTRA_SIZE@GOTPAGE
Lloh6:
	ldr	x9, [x9, _TTM_OBJ_EXTRA_SIZE@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	add	x8, x8, x0
	add	x8, x8, x9
	str	x8, [x19]
LBB0_2:
	mov	x0, x26
	bl	_vmw_mem_glob
	ldr	x1, [x19]
	add	x2, sp, #24
	bl	_ttm_mem_global_alloc
	mov	x28, x0
	cmp	w0, #0
	cset	w0, ne
	bl	_unlikely
	cbz	x0, LBB0_5
; %bb.3:
Lloh8:
	adrp	x8, _ERESTARTSYS@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ERESTARTSYS@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	cmn	w28, w8
	b.eq	LBB0_13
; %bb.4:
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
	b	LBB0_13
LBB0_5:
	str	x27, [sp, #16]                  ; 8-byte Folded Spill
Lloh13:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	mov	w0, #24
	bl	_kzalloc
	mov	x27, x0
	cmp	x0, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_7
; %bb.6:
	mov	x0, x26
	bl	_vmw_mem_glob
	ldr	x1, [x19]
	bl	_ttm_mem_global_free
Lloh16:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w28, w8
	b	LBB0_13
LBB0_7:
	add	x19, x27, #16
	str	x19, [sp, #40]
	str	wzr, [x27]
	str	xzr, [x27, #8]
Lloh19:
	adrp	x8, _vmw_user_shader_free@GOTPAGE
Lloh20:
	ldr	x8, [x8, _vmw_user_shader_free@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	str	w8, [sp]
	mov	x0, x26
	mov	x1, x19
	mov	x2, x25
	mov	x3, x24
	mov	x4, x23
	mov	x5, x21
	mov	x6, x20
	mov	x7, x22
	bl	_vmw_gb_shader_init
	mov	x28, x0
	cmp	w0, #0
	cset	w0, ne
	bl	_unlikely
	cbnz	x0, LBB0_13
; %bb.8:
	mov	x0, x19
	bl	_vmw_resource_reference
	str	x0, [sp, #32]
Lloh22:
	adrp	x8, _VMW_RES_SHADER@GOTPAGE
Lloh23:
	ldr	x8, [x8, _VMW_RES_SHADER@GOTPAGEOFF]
Lloh24:
	ldr	w3, [x8]
Lloh25:
	adrp	x4, _vmw_user_shader_base_release@GOTPAGE
Lloh26:
	ldr	x4, [x4, _vmw_user_shader_base_release@GOTPAGEOFF]
	ldr	x0, [sp, #16]                   ; 8-byte Folded Reload
	mov	x1, x27
	mov	w2, #0
	mov	x5, #0
	bl	_ttm_base_object_init
	mov	x28, x0
	cmp	w0, #0
	cset	w0, ne
	bl	_unlikely
	cbz	x0, LBB0_10
; %bb.9:
	add	x0, sp, #32
	bl	_vmw_resource_unreference
	b	LBB0_12
LBB0_10:
	ldr	x8, [x29, #16]
	cbz	x8, LBB0_12
; %bb.11:
	ldr	w9, [x27, #4]
	str	w9, [x8]
LBB0_12:
	add	x0, sp, #40
	bl	_vmw_resource_unreference
LBB0_13:
	mov	x0, x28
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_vmw_user_shader_size,8,3       ; @vmw_user_shader_size
	.comm	_VMW_IDA_ACC_SIZE,8,3           ; @VMW_IDA_ACC_SIZE
	.comm	_TTM_OBJ_EXTRA_SIZE,8,3         ; @TTM_OBJ_EXTRA_SIZE
	.comm	_ERESTARTSYS,4,2                ; @ERESTARTSYS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Out of graphics memory for shader creation.\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_vmw_user_shader_free,4,2       ; @vmw_user_shader_free
	.comm	_VMW_RES_SHADER,4,2             ; @VMW_RES_SHADER
	.comm	_vmw_user_shader_base_release,4,2 ; @vmw_user_shader_base_release
	.no_dead_strip	_vmw_user_shader_alloc
.subsections_via_symbols
