	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ttm_mem_global_init            ## -- Begin function ttm_mem_global_init
	.p2align	4, 0x90
_ttm_mem_global_init:                   ## @ttm_mem_global_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	addq	$36, %rdi
	callq	_spin_lock_init
	leaq	L_.str(%rip), %rdi
	callq	_create_singlethread_workqueue
	movl	%eax, 32(%r14)
	leaq	28(%r14), %rdi
	movq	_ttm_shrink_work@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_INIT_WORK
	leaq	24(%r14), %r15
	xorl	%eax, %eax
	callq	_ttm_get_kobj
	movq	_ttm_mem_glob_kobj_type@GOTPCREL(%rip), %rsi
	leaq	L_.str.1(%rip), %rcx
	movq	%r15, %rdi
	movl	%eax, %edx
	callq	_kobject_init_and_add
	movl	%eax, %ebx
	xorl	%edi, %edi
	testl	%eax, %eax
	setne	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%r15, %rdi
	callq	_kobject_put
	jmp	LBB0_9
LBB0_2:
	leaq	-32(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_si_meminfo
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_ttm_mem_init_kernel_zone
	movl	%eax, %ebx
	xorl	%edi, %edi
	testl	%eax, %eax
	setne	%dil
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_8
## %bb.3:
	leaq	-32(%rbp), %rsi
	movq	%r14, %rdi
	callq	_ttm_mem_init_dma32_zone
	movl	%eax, %ebx
	xorl	%edi, %edi
	testl	%eax, %eax
	setne	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_4
LBB0_8:
	movq	%r14, %rdi
	callq	_ttm_mem_global_release
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	cmpl	$0, (%r14)
	jle	LBB0_7
## %bb.5:
	xorl	%ebx, %ebx
	leaq	L_.str.2(%rip), %r15
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r14), %rax
	movq	(%rax,%rbx,8), %rax
	movl	8(%rax), %esi
	movq	(%rax), %rdx
	shrq	$10, %rdx
	movq	%r15, %rdi
	callq	_pr_info
	incq	%rbx
	movslq	(%r14), %rax
	cmpq	%rax, %rbx
	jl	LBB0_6
LBB0_7:
	movq	8(%r14), %rax
	movl	(%rax), %eax
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %ecx
	addl	%ecx, %ecx
	cltd
	idivl	%ecx
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_ttm_page_alloc_init
	movq	8(%r14), %rax
	movl	(%rax), %eax
	movl	(%rbx), %ecx
	addl	%ecx, %ecx
	cltd
	idivl	%ecx
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_ttm_dma_page_alloc_init
	xorl	%ebx, %ebx
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ttm_swap"

	.comm	_ttm_shrink_work,4,2            ## @ttm_shrink_work
	.comm	_ttm_mem_glob_kobj_type,4,2     ## @ttm_mem_glob_kobj_type
L_.str.1:                               ## @.str.1
	.asciz	"memory_accounting"

L_.str.2:                               ## @.str.2
	.asciz	"Zone %7s: Available graphics memory: %llu kiB\n"

	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ttm_mem_global_init            ; -- Begin function ttm_mem_global_init
	.p2align	2
_ttm_mem_global_init:                   ; @ttm_mem_global_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x0
	add	x0, x0, #36
	bl	_spin_lock_init
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_create_singlethread_workqueue
	str	w0, [x19, #32]
	add	x0, x19, #28
Lloh2:
	adrp	x8, _ttm_shrink_work@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ttm_shrink_work@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	bl	_INIT_WORK
	add	x21, x19, #24
	bl	_ttm_get_kobj
	mov	x2, x0
Lloh5:
	adrp	x1, _ttm_mem_glob_kobj_type@GOTPAGE
Lloh6:
	ldr	x1, [x1, _ttm_mem_glob_kobj_type@GOTPAGEOFF]
Lloh7:
	adrp	x3, l_.str.1@PAGE
Lloh8:
	add	x3, x3, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_kobject_init_and_add
	mov	x20, x0
	cmp	w0, #0
	cset	w0, ne
	bl	_unlikely
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x21
	bl	_kobject_put
	b	LBB0_5
LBB0_2:
	add	x0, sp, #8
	bl	_si_meminfo
	add	x1, sp, #8
	mov	x0, x19
	bl	_ttm_mem_init_kernel_zone
	mov	x20, x0
	cmp	w0, #0
	cset	w0, ne
	bl	_unlikely
	cbnz	x0, LBB0_4
; %bb.3:
	add	x1, sp, #8
	mov	x0, x19
	bl	_ttm_mem_init_dma32_zone
	mov	x20, x0
	cmp	w0, #0
	cset	w0, ne
	bl	_unlikely
	cbz	x0, LBB0_6
LBB0_4:
	mov	x0, x19
	bl	_ttm_mem_global_release
LBB0_5:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_6:
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.7:
	mov	x21, #0
Lloh9:
	adrp	x20, l_.str.2@PAGE
Lloh10:
	add	x20, x20, l_.str.2@PAGEOFF
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #16]
	ldr	x8, [x8, x21, lsl #3]
	ldr	w1, [x8, #8]
	ldr	x8, [x8]
	lsr	x2, x8, #10
	mov	x0, x20
	bl	_pr_info
	add	x21, x21, #1
	ldrsw	x8, [x19]
	cmp	x21, x8
	b.lt	LBB0_8
LBB0_9:
	ldr	x8, [x19, #8]
	ldr	w8, [x8]
Lloh11:
	adrp	x20, _PAGE_SIZE@GOTPAGE
Lloh12:
	ldr	x20, [x20, _PAGE_SIZE@GOTPAGEOFF]
	ldr	w9, [x20]
	lsl	w9, w9, #1
	sdiv	w1, w8, w9
	mov	x0, x19
	bl	_ttm_page_alloc_init
	ldr	x8, [x19, #8]
	ldr	w8, [x8]
	ldr	w9, [x20]
	lsl	w9, w9, #1
	sdiv	w1, w8, w9
	mov	x0, x19
	bl	_ttm_dma_page_alloc_init
	mov	w20, #0
	b	LBB0_5
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ttm_swap"

	.comm	_ttm_shrink_work,4,2            ; @ttm_shrink_work
	.comm	_ttm_mem_glob_kobj_type,4,2     ; @ttm_mem_glob_kobj_type
l_.str.1:                               ; @.str.1
	.asciz	"memory_accounting"

l_.str.2:                               ; @.str.2
	.asciz	"Zone %7s: Available graphics memory: %llu kiB\n"

	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
.subsections_via_symbols
