	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_virtio_gpu_ttm_init            ## -- Begin function virtio_gpu_ttm_init
	.p2align	4, 0x90
_virtio_gpu_ttm_init:                   ## @virtio_gpu_ttm_init
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	8(%rdi), %rax
	movq	(%rax), %rax
	movl	(%rax), %edx
	movq	_virtio_gpu_bo_driver@GOTPCREL(%rip), %rsi
	xorl	%r14d, %r14d
	xorl	%ecx, %ecx
	callq	_ttm_bo_device_init
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_DRM_ERROR
	movl	%ebx, %r14d
	jmp	LBB0_4
LBB0_2:
	movq	_TTM_PL_TT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	xorl	%edx, %edx
	callq	_ttm_bo_init_mm
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %r15d
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_ERROR
	movq	%r12, %rdi
	callq	_ttm_bo_device_release
	movl	%r15d, %r14d
LBB0_4:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_virtio_gpu_bo_driver,4,2       ## @virtio_gpu_bo_driver
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed initializing buffer object driver(%d).\n"

	.comm	_TTM_PL_TT,4,2                  ## @TTM_PL_TT
L_.str.1:                               ## @.str.1
	.asciz	"Failed initializing GTT heap.\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_virtio_gpu_ttm_init            ; -- Begin function virtio_gpu_ttm_init
	.p2align	2
_virtio_gpu_ttm_init:                   ; @virtio_gpu_ttm_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	x8, [x0, #8]
	ldr	x8, [x8]
	ldr	w2, [x8]
Lloh0:
	adrp	x1, _virtio_gpu_bo_driver@GOTPAGE
Lloh1:
	ldr	x1, [x1, _virtio_gpu_bo_driver@GOTPAGEOFF]
	mov	w3, #0
	bl	_ttm_bo_device_init
	cbz	w0, LBB0_2
; %bb.1:
	mov	x20, x0
	str	x20, [sp]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
	b	LBB0_4
LBB0_2:
Lloh4:
	adrp	x8, _TTM_PL_TT@GOTPAGE
Lloh5:
	ldr	x8, [x8, _TTM_PL_TT@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_ttm_bo_init_mm
	mov	x20, x0
	cbz	w0, LBB0_4
; %bb.3:
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_ERROR
	mov	x0, x19
	bl	_ttm_bo_device_release
LBB0_4:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_virtio_gpu_bo_driver,4,2       ; @virtio_gpu_bo_driver
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed initializing buffer object driver(%d).\n"

	.comm	_TTM_PL_TT,4,2                  ; @TTM_PL_TT
l_.str.1:                               ; @.str.1
	.asciz	"Failed initializing GTT heap.\n"

.subsections_via_symbols
