	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ttm_bo_init                    ## -- Begin function ttm_bo_init
	.p2align	4, 0x90
_ttm_bo_init:                           ## @ttm_bo_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	%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	%r9d, -48(%rbp)                 ## 4-byte Spill
	movq	%r8, %r13
	movl	%ecx, %ebx
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r12
	movq	%rdi, %r14
	movq	32(%rbp), %rsi
	movq	%r12, -64(%rbp)
	movq	(%rdi), %rax
	movq	8(%rax), %r15
	movq	%r15, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_ttm_mem_global_alloc
	testl	%eax, %eax
	je	LBB0_6
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
	movq	48(%rbp), %rax
	movq	%r12, %rdi
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	callq	*%rax
	jmp	LBB0_4
LBB0_6:
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%rax), %rbx
	decq	%rbx
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shrq	%cl, %rbx
	testq	%rbx, %rbx
	je	LBB0_7
## %bb.11:
	movq	48(%rbp), %rcx
	movq	%rcx, (%r12)
	leaq	176(%r12), %rdi
	movq	%rax, %r15
	callq	_kref_init
	leaq	172(%r12), %rdi
	callq	_kref_init
	leaq	168(%r12), %rdi
	xorl	%esi, %esi
	callq	_atomic_set
	leaq	164(%r12), %rdi
	movl	$1, %esi
	callq	_atomic_set
	leaq	160(%r12), %rdi
	callq	_init_waitqueue_head
	leaq	156(%r12), %rdi
	callq	_INIT_LIST_HEAD
	leaq	152(%r12), %rdi
	callq	_INIT_LIST_HEAD
	leaq	148(%r12), %rdi
	callq	_INIT_LIST_HEAD
	leaq	144(%r12), %rdi
	callq	_INIT_LIST_HEAD
	movq	%r14, 136(%r12)
	movq	(%r14), %rdi
	movq	%rdi, 40(%r12)
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 8(%r12)
	movq	%rbx, 16(%r12)
	movb	(%r15), %cl
	movq	%rbx, %rax
	shlq	%cl, %rax
	movq	%rax, 64(%r12)
	movq	_TTM_PL_SYSTEM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 120(%r12)
	movq	%rbx, 72(%r12)
	movq	$0, 112(%r12)
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 104(%r12)
	movl	$0, 88(%r12)
	movq	$0, 96(%r12)
	movq	$0, 128(%r12)
	movq	_TTM_PL_FLAG_SYSTEM@GOTPCREL(%rip), %rax
	movq	_TTM_PL_FLAG_CACHED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	%ecx, 80(%r12)
	movl	$0, 24(%r12)
	movq	24(%rbp), %rax
	movq	%rax, 56(%r12)
	movq	32(%rbp), %rax
	movq	%rax, 32(%r12)
	movq	40(%rbp), %rax
	movq	%rax, 48(%r12)
	callq	_atomic_inc
	movq	%r12, %rdi
	movq	%r13, %rsi
	callq	_ttm_bo_check_placement
	movl	%eax, %r14d
	xorl	%edi, %edi
	testl	%eax, %eax
	setne	%dil
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_17
## %bb.12:
	movslq	8(%r12), %rax
	movq	_ttm_bo_type_device@GOTPCREL(%rip), %rcx
	cmpq	%rax, (%rcx)
	je	LBB0_14
## %bb.13:
	movq	_ttm_bo_type_sg@GOTPCREL(%rip), %rcx
	cmpq	%rax, (%rcx)
	jne	LBB0_15
LBB0_14:
	movq	%r12, %rdi
	callq	_ttm_bo_setup_vm
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_17
LBB0_15:
	movl	16(%rbp), %edx
	xorl	%ebx, %ebx
	movq	%r12, %rdi
	movq	%r13, %rsi
	xorl	%ecx, %ecx
	callq	_ttm_bo_validate
	movl	%eax, %r14d
	testl	%eax, %eax
	je	LBB0_16
LBB0_17:
	movq	%r12, %rdi
	callq	_ttm_bo_unreserve
	leaq	-64(%rbp), %rdi
	callq	_ttm_bo_unref
	movl	%r14d, %ebx
	jmp	LBB0_18
LBB0_3:
	callq	_kfree
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_5:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_18:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	leaq	L_.str.1(%rip), %rdi
	callq	_pr_err
	movq	48(%rbp), %rax
	movq	%r12, %rdi
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	callq	*%rax
	jmp	LBB0_10
LBB0_9:
	callq	_kfree
LBB0_10:
	movq	32(%rbp), %rsi
	movq	%r15, %rdi
	callq	_ttm_mem_global_free
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_16:
	movq	%r12, %rdi
	callq	_ttm_bo_unreserve
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Out of kernel memory\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_PAGE_SIZE,8,3                  ## @PAGE_SIZE
	.comm	_PAGE_SHIFT,8,3                 ## @PAGE_SHIFT
L_.str.1:                               ## @.str.1
	.asciz	"Illegal buffer object size\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_TTM_PL_SYSTEM,4,2              ## @TTM_PL_SYSTEM
	.comm	_TTM_PL_FLAG_SYSTEM,4,2         ## @TTM_PL_FLAG_SYSTEM
	.comm	_TTM_PL_FLAG_CACHED,4,2         ## @TTM_PL_FLAG_CACHED
	.comm	_ttm_bo_type_device,8,3         ## @ttm_bo_type_device
	.comm	_ttm_bo_type_sg,8,3             ## @ttm_bo_type_sg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ttm_bo_init                    ; -- Begin function ttm_bo_init
	.p2align	2
_ttm_bo_init:                           ; @ttm_bo_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	str	x7, [sp, #16]                   ; 8-byte Folded Spill
	mov	x21, x6
	mov	x26, x5
	mov	x23, x4
	mov	x22, x3
	mov	x28, x2
	mov	x19, x1
	mov	x24, x0
	ldr	x20, [x29, #32]
	ldr	x25, [x29, #16]
	str	x1, [sp, #24]
	ldr	x8, [x0]
	ldr	x27, [x8, #8]
	mov	x0, x27
	mov	x1, x25
	mov	w2, #0
	mov	w3, #0
	bl	_ttm_mem_global_alloc
	cbz	w0, LBB0_3
; %bb.1:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
	mov	x0, x19
	cbz	x20, LBB0_10
; %bb.2:
	blr	x20
	b	LBB0_11
LBB0_3:
	str	w21, [sp, #12]                  ; 4-byte Folded Spill
Lloh2:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	add	x8, x28, x8
	sub	x8, x8, #1
Lloh5:
	adrp	x21, _PAGE_SHIFT@GOTPAGE
Lloh6:
	ldr	x21, [x21, _PAGE_SHIFT@GOTPAGEOFF]
	ldr	x9, [x21]
	lsr	x28, x8, x9
	cbz	x28, LBB0_14
; %bb.4:
	ldr	x27, [x29, #24]
	str	x20, [x19]
	add	x0, x19, #176
	bl	_kref_init
	add	x0, x19, #172
	bl	_kref_init
	add	x0, x19, #168
	mov	w1, #0
	bl	_atomic_set
	add	x0, x19, #164
	mov	w1, #1
	bl	_atomic_set
	add	x0, x19, #160
	bl	_init_waitqueue_head
	add	x0, x19, #156
	bl	_INIT_LIST_HEAD
	add	x0, x19, #152
	bl	_INIT_LIST_HEAD
	add	x0, x19, #148
	bl	_INIT_LIST_HEAD
	add	x0, x19, #144
	bl	_INIT_LIST_HEAD
	str	w22, [x19, #8]
Lloh7:
	adrp	x8, _TTM_PL_SYSTEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _TTM_PL_SYSTEM@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	str	w8, [x19, #120]
	ldr	x0, [x24]
	str	x28, [x19, #16]
	ldr	x8, [x21]
	lsl	x8, x28, x8
	stp	x8, x28, [x19, #64]
	str	xzr, [x19, #112]
	str	w26, [x19, #104]
	str	wzr, [x19, #88]
	str	xzr, [x19, #96]
Lloh10:
	adrp	x8, _TTM_PL_FLAG_SYSTEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _TTM_PL_FLAG_SYSTEM@GOTPAGEOFF]
	stp	xzr, x24, [x19, #128]
Lloh12:
	ldr	w8, [x8]
Lloh13:
	adrp	x9, _TTM_PL_FLAG_CACHED@GOTPAGE
Lloh14:
	ldr	x9, [x9, _TTM_PL_FLAG_CACHED@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [x19, #80]
	str	wzr, [x19, #24]
	stp	x25, x0, [x19, #32]
	ldr	x8, [sp, #16]                   ; 8-byte Folded Reload
	stp	x27, x8, [x19, #48]
	bl	_atomic_inc
	mov	x0, x19
	mov	x1, x23
	bl	_ttm_bo_check_placement
	mov	x22, x0
	cmp	w0, #0
	cset	w0, ne
	bl	_unlikely
	cbnz	x0, LBB0_9
; %bb.5:
	ldrsw	x8, [x19, #8]
Lloh16:
	adrp	x9, _ttm_bo_type_device@GOTPAGE
Lloh17:
	ldr	x9, [x9, _ttm_bo_type_device@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	cmp	x9, x8
	b.eq	LBB0_7
; %bb.6:
Lloh19:
	adrp	x9, _ttm_bo_type_sg@GOTPAGE
Lloh20:
	ldr	x9, [x9, _ttm_bo_type_sg@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_8
LBB0_7:
	mov	x0, x19
	bl	_ttm_bo_setup_vm
	mov	x22, x0
	cbnz	w0, LBB0_9
LBB0_8:
	mov	x0, x19
	mov	x1, x23
	ldr	w2, [sp, #12]                   ; 4-byte Folded Reload
	mov	w3, #0
	bl	_ttm_bo_validate
	mov	x22, x0
	cbz	w0, LBB0_18
LBB0_9:
	mov	x0, x19
	bl	_ttm_bo_unreserve
	add	x0, sp, #24
	bl	_ttm_bo_unref
	b	LBB0_13
LBB0_10:
	bl	_kfree
LBB0_11:
Lloh22:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_12:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_13:
	mov	x0, x22
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_14:
Lloh24:
	adrp	x0, l_.str.1@PAGE
Lloh25:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_err
	mov	x0, x19
	cbz	x20, LBB0_16
; %bb.15:
	blr	x20
	b	LBB0_17
LBB0_16:
	bl	_kfree
LBB0_17:
	mov	x0, x27
	mov	x1, x25
	bl	_ttm_mem_global_free
Lloh26:
	adrp	x8, _EINVAL@GOTPAGE
Lloh27:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_12
LBB0_18:
	mov	x0, x19
	bl	_ttm_bo_unreserve
	b	LBB0_13
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Out of kernel memory\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_PAGE_SIZE,8,3                  ; @PAGE_SIZE
	.comm	_PAGE_SHIFT,8,3                 ; @PAGE_SHIFT
l_.str.1:                               ; @.str.1
	.asciz	"Illegal buffer object size\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_TTM_PL_SYSTEM,4,2              ; @TTM_PL_SYSTEM
	.comm	_TTM_PL_FLAG_SYSTEM,4,2         ; @TTM_PL_FLAG_SYSTEM
	.comm	_TTM_PL_FLAG_CACHED,4,2         ; @TTM_PL_FLAG_CACHED
	.comm	_ttm_bo_type_device,8,3         ; @ttm_bo_type_device
	.comm	_ttm_bo_type_sg,8,3             ; @ttm_bo_type_sg
.subsections_via_symbols
