	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vmw_user_bo_alloc              ## -- Begin function vmw_user_bo_alloc
	.p2align	4, 0x90
_vmw_user_bo_alloc:                     ## @vmw_user_bo_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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -64(%rbp)                  ## 8-byte Spill
	movq	%r8, -72(%rbp)                  ## 8-byte Spill
	movl	%ecx, %r14d
	movl	%edx, %r12d
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$12, %edi
	callq	_kzalloc
	movq	%rax, %r13
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	jmp	LBB0_11
LBB0_2:
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	movq	%r13, %r15
	leaq	8(%r13), %r14
	cmpq	$0, (%rbx)
	jne	LBB0_3
## %bb.4:
	movq	_vmw_vram_sys_placement@GOTPCREL(%rip), %rcx
	jmp	LBB0_5
LBB0_3:
	movq	_vmw_sys_placement@GOTPCREL(%rip), %rcx
LBB0_5:
	movq	_vmw_user_bo_destroy@GOTPCREL(%rip), %r9
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movl	%r12d, %edx
	movl	$1, %r8d
	callq	_vmw_bo_init
	movl	%eax, %r13d
	xorl	%edi, %edi
	testl	%eax, %eax
	setne	%dil
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_11
## %bb.6:
	movq	%r14, %rdi
	callq	_ttm_bo_get
	movq	_ttm_buffer_type@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_vmw_user_bo_ref_obj_release@GOTPCREL(%rip), %rax
	movq	%rax, (%rsp)
	movq	_vmw_user_bo_release@GOTPCREL(%rip), %r9
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r12d, %esi
	movq	%r15, %rdx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	callq	_ttm_prime_object_init
	movl	%eax, %r13d
	xorl	%edi, %edi
	testl	%eax, %eax
	setne	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movq	%r14, %rdi
	callq	_ttm_bo_put
	jmp	LBB0_11
LBB0_8:
	movq	16(%rbp), %rax
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	%r14, (%rcx)
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	%r15, (%rax)
	movq	%r15, %rdi
	addq	$4, %rdi
	callq	_kref_get
LBB0_10:
	movl	(%r15), %eax
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
LBB0_11:
	movl	%r13d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to allocate a buffer.\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_vmw_sys_placement,4,2          ## @vmw_sys_placement
	.comm	_vmw_vram_sys_placement,4,2     ## @vmw_vram_sys_placement
	.comm	_vmw_user_bo_destroy,4,2        ## @vmw_user_bo_destroy
	.comm	_ttm_buffer_type,4,2            ## @ttm_buffer_type
	.comm	_vmw_user_bo_release,4,2        ## @vmw_user_bo_release
	.comm	_vmw_user_bo_ref_obj_release,4,2 ## @vmw_user_bo_ref_obj_release
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vmw_user_bo_alloc              ; -- Begin function vmw_user_bo_alloc
	.p2align	2
_vmw_user_bo_alloc:                     ; @vmw_user_bo_alloc
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x6
	mov	x21, x5
	mov	x19, x4
	mov	x23, x3
	mov	x25, x2
	mov	x26, x1
	mov	x27, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #12
	bl	_kzalloc
	mov	x22, x0
	cmp	x0, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_2
; %bb.1:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w27, w8
	b	LBB0_8
LBB0_2:
	add	x24, x22, #8
	ldr	x8, [x27]
Lloh8:
	adrp	x9, _vmw_sys_placement@GOTPAGE
Lloh9:
	ldr	x9, [x9, _vmw_sys_placement@GOTPAGEOFF]
Lloh10:
	adrp	x10, _vmw_vram_sys_placement@GOTPAGE
Lloh11:
	ldr	x10, [x10, _vmw_vram_sys_placement@GOTPAGEOFF]
	cmp	x8, #0
	csel	x3, x10, x9, eq
Lloh12:
	adrp	x5, _vmw_user_bo_destroy@GOTPAGE
Lloh13:
	ldr	x5, [x5, _vmw_user_bo_destroy@GOTPAGEOFF]
	mov	x0, x27
	mov	x1, x24
	mov	x2, x25
	mov	w4, #1
	bl	_vmw_bo_init
	mov	x27, x0
	cmp	w0, #0
	cset	w0, ne
	bl	_unlikely
	cbnz	x0, LBB0_8
; %bb.3:
	mov	x0, x24
	bl	_ttm_bo_get
Lloh14:
	adrp	x8, _ttm_buffer_type@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ttm_buffer_type@GOTPAGEOFF]
Lloh16:
	ldr	w4, [x8]
Lloh17:
	adrp	x5, _vmw_user_bo_release@GOTPAGE
Lloh18:
	ldr	x5, [x5, _vmw_user_bo_release@GOTPAGEOFF]
Lloh19:
	adrp	x6, _vmw_user_bo_ref_obj_release@GOTPAGE
Lloh20:
	ldr	x6, [x6, _vmw_user_bo_ref_obj_release@GOTPAGEOFF]
	mov	x0, x26
	mov	x1, x25
	mov	x2, x22
	mov	x3, x23
	bl	_ttm_prime_object_init
	mov	x27, x0
	cmp	w0, #0
	cset	w0, ne
	bl	_unlikely
	cbz	x0, LBB0_5
; %bb.4:
	mov	x0, x24
	bl	_ttm_bo_put
	b	LBB0_8
LBB0_5:
	str	x24, [x21]
	cbz	x20, LBB0_7
; %bb.6:
	str	x22, [x20]
	add	x0, x22, #4
	bl	_kref_get
LBB0_7:
	ldr	w8, [x22]
	str	w8, [x19]
LBB0_8:
	mov	x0, x27
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to allocate a buffer.\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_vmw_sys_placement,4,2          ; @vmw_sys_placement
	.comm	_vmw_vram_sys_placement,4,2     ; @vmw_vram_sys_placement
	.comm	_vmw_user_bo_destroy,4,2        ; @vmw_user_bo_destroy
	.comm	_ttm_buffer_type,4,2            ; @ttm_buffer_type
	.comm	_vmw_user_bo_release,4,2        ; @vmw_user_bo_release
	.comm	_vmw_user_bo_ref_obj_release,4,2 ; @vmw_user_bo_ref_obj_release
.subsections_via_symbols
