	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vmw_shader_alloc
_vmw_shader_alloc:                      ## @vmw_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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, -44(%rbp)                 ## 4-byte Spill
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r13
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	$1, -64(%rbp)
	movq	_vmw_shader_size@GOTPCREL(%rip), %r12
	xorl	%edi, %edi
	cmpq	$0, (%r12)
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movl	$4, %edi
	callq	_ttm_round_pot
	movq	_VMW_IDA_ACC_SIZE@GOTPCREL(%rip), %rcx
	addq	(%rcx), %rax
	movq	%rax, (%r12)
LBB0_2:
	movq	%rbx, %rdi
	callq	_vmw_mem_glob
	movq	(%r12), %rsi
	leaq	-64(%rbp), %rdx
	movl	%eax, %edi
	callq	_ttm_mem_global_alloc
	movl	%eax, %r15d
	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	%r15d, %eax
	je	LBB0_8
## %bb.7:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
LBB0_8:
                                        ## implicit-def: $r14
	testl	%r15d, %r15d
	je	LBB0_10
LBB0_9:
	movl	%r15d, %edi
	callq	_ERR_PTR
	movq	%rax, %r14
LBB0_10:
	movq	%r14, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	%r14, %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$4, %edi
	callq	_kzalloc
	movq	%rax, %r14
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_11
## %bb.6:
	movq	%rbx, %rdi
	callq	_vmw_mem_glob
	movq	(%r12), %rsi
	movl	%eax, %edi
	callq	_ttm_mem_global_free
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
                                        ## implicit-def: $r14
	testl	%r15d, %r15d
	jne	LBB0_9
	jmp	LBB0_10
LBB0_11:
	movq	_vmw_shader_free@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	subq	$8, %rsp
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movq	%r13, %rdx
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	xorl	%r9d, %r9d
	pushq	%rax
	pushq	%r15
	pushq	$0
	callq	_vmw_gb_shader_init
	addq	$32, %rsp
	movl	%eax, %r15d
	testl	%r15d, %r15d
	jne	LBB0_9
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_vmw_shader_size,8,3            ## @vmw_shader_size
	.comm	_VMW_IDA_ACC_SIZE,8,3           ## @VMW_IDA_ACC_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_shader_free,4,2            ## @vmw_shader_free
	.no_dead_strip	_vmw_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_shader_alloc
_vmw_shader_alloc:                      ; @vmw_shader_alloc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x20, x4
	mov	x21, x3
	mov	x22, x2
	mov	x19, x1
	mov	x23, x0
	mov	w8, #1
	str	x8, [sp, #8]
Lloh0:
	adrp	x26, _vmw_shader_size@GOTPAGE
Lloh1:
	ldr	x26, [x26, _vmw_shader_size@GOTPAGEOFF]
	ldr	x8, [x26]
	cmp	x8, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_2
; %bb.1:
	mov	w0, #4
	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]
	add	x8, x8, x0
	str	x8, [x26]
LBB0_2:
	mov	x0, x23
	bl	_vmw_mem_glob
	ldr	x1, [x26]
	add	x2, sp, #8
	bl	_ttm_mem_global_alloc
	mov	x25, x0
	cmp	w0, #0
	cset	w0, ne
	bl	_unlikely
	cbz	x0, LBB0_5
; %bb.3:
Lloh5:
	adrp	x8, _ERESTARTSYS@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ERESTARTSYS@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmn	w25, w8
	b.ne	LBB0_7
; %bb.4:
                                        ; implicit-def: $x24
	cbnz	w25, LBB0_8
	b	LBB0_9
LBB0_5:
Lloh8:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	w0, #4
	bl	_kzalloc
	mov	x24, x0
	cmp	x0, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_10
; %bb.6:
	mov	x0, x23
	bl	_vmw_mem_glob
	ldr	x1, [x26]
	bl	_ttm_mem_global_free
Lloh11:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w25, w8
                                        ; implicit-def: $x24
	cbnz	w25, LBB0_8
	b	LBB0_9
LBB0_7:
Lloh14:
	adrp	x0, l_.str@PAGE
Lloh15:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
                                        ; implicit-def: $x24
	cbz	w25, LBB0_9
LBB0_8:
	mov	x0, x25
	bl	_ERR_PTR
	mov	x24, x0
LBB0_9:
	mov	x0, x24
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_10:
Lloh16:
	adrp	x8, _vmw_shader_free@GOTPAGE
Lloh17:
	ldr	x8, [x8, _vmw_shader_free@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	str	w8, [sp]
	mov	x0, x23
	mov	x1, x24
	mov	x2, x22
	mov	x3, x21
	mov	x4, x20
	mov	w5, #0
	mov	w6, #0
	mov	x7, x19
	bl	_vmw_gb_shader_init
	mov	x25, x0
	cbnz	w25, LBB0_8
	b	LBB0_9
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_vmw_shader_size,8,3            ; @vmw_shader_size
	.comm	_VMW_IDA_ACC_SIZE,8,3           ; @VMW_IDA_ACC_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_shader_free,4,2            ; @vmw_shader_free
	.no_dead_strip	_vmw_shader_alloc
.subsections_via_symbols
