	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function amdgpu_gtt_mgr_init
_amdgpu_gtt_mgr_init:                   ## @amdgpu_gtt_mgr_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	%rsi, %r15
	movq	%rdi, %r12
	movl	8(%rdi), %edi
	callq	_amdgpu_ttm_adev
	movq	%rax, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$12, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	_AMDGPU_GTT_MAX_TRANSFER_SIZE@GOTPCREL(%rip), %rax
	movq	_AMDGPU_GTT_NUM_TRANSFER_WINDOWS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	4(%r14), %edx
	sarl	%cl, %edx
	imull	(%rax), %esi
	subl	%esi, %edx
	leaq	8(%rbx), %rdi
	callq	_drm_mm_init
	movq	%rbx, %rdi
	addq	$4, %rdi
	callq	_spin_lock_init
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_atomic64_set
	movq	%rbx, (%r12)
	movl	(%r14), %edi
	movq	_dev_attr_mem_info_gtt_total@GOTPCREL(%rip), %rsi
	callq	_device_create_file
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_7
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_8
LBB0_4:
	movl	(%r14), %edi
	movq	_dev_attr_mem_info_gtt_used@GOTPCREL(%rip), %rsi
	callq	_device_create_file
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rdi
LBB0_7:
	callq	_DRM_ERROR
LBB0_8:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	xorl	%ebx, %ebx
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_AMDGPU_GTT_MAX_TRANSFER_SIZE,4,2 ## @AMDGPU_GTT_MAX_TRANSFER_SIZE
	.comm	_AMDGPU_GTT_NUM_TRANSFER_WINDOWS,4,2 ## @AMDGPU_GTT_NUM_TRANSFER_WINDOWS
	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
	.comm	_dev_attr_mem_info_gtt_total,4,2 ## @dev_attr_mem_info_gtt_total
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to create device file mem_info_gtt_total\n"

	.comm	_dev_attr_mem_info_gtt_used,4,2 ## @dev_attr_mem_info_gtt_used
L_.str.1:                               ## @.str.1
	.asciz	"Failed to create device file mem_info_gtt_used\n"

	.no_dead_strip	_amdgpu_gtt_mgr_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function amdgpu_gtt_mgr_init
_amdgpu_gtt_mgr_init:                   ; @amdgpu_gtt_mgr_init
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x21, x1
	mov	x20, x0
	ldr	w0, [x0, #8]
	bl	_amdgpu_ttm_adev
	mov	x19, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #12
	bl	_kzalloc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x22, x0
Lloh3:
	adrp	x8, _AMDGPU_GTT_MAX_TRANSFER_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AMDGPU_GTT_MAX_TRANSFER_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _AMDGPU_GTT_NUM_TRANSFER_WINDOWS@GOTPAGE
Lloh7:
	ldr	x9, [x9, _AMDGPU_GTT_NUM_TRANSFER_WINDOWS@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	mul	w1, w9, w8
	ldr	w8, [x19, #4]
Lloh9:
	adrp	x9, _PAGE_SHIFT@GOTPAGE
Lloh10:
	ldr	x9, [x9, _PAGE_SHIFT@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	asr	w8, w8, w9
	sub	w2, w8, w1
	add	x0, x0, #8
	bl	_drm_mm_init
	add	x0, x22, #4
	bl	_spin_lock_init
	mov	x0, x22
	mov	x1, x21
	bl	_atomic64_set
	str	x22, [x20]
	ldr	w0, [x19]
Lloh12:
	adrp	x1, _dev_attr_mem_info_gtt_total@GOTPAGE
Lloh13:
	ldr	x1, [x1, _dev_attr_mem_info_gtt_total@GOTPAGEOFF]
	bl	_device_create_file
	cbz	w0, LBB0_4
; %bb.2:
	mov	x20, x0
Lloh14:
	adrp	x0, l_.str@PAGE
Lloh15:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_6
LBB0_3:
Lloh16:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_7
LBB0_4:
	ldr	w0, [x19]
Lloh19:
	adrp	x1, _dev_attr_mem_info_gtt_used@GOTPAGE
Lloh20:
	ldr	x1, [x1, _dev_attr_mem_info_gtt_used@GOTPAGEOFF]
	bl	_device_create_file
	mov	x20, x0
	cbz	w0, LBB0_7
; %bb.5:
Lloh21:
	adrp	x0, l_.str.1@PAGE
Lloh22:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_6:
	bl	_DRM_ERROR
LBB0_7:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_AMDGPU_GTT_MAX_TRANSFER_SIZE,4,2 ; @AMDGPU_GTT_MAX_TRANSFER_SIZE
	.comm	_AMDGPU_GTT_NUM_TRANSFER_WINDOWS,4,2 ; @AMDGPU_GTT_NUM_TRANSFER_WINDOWS
	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
	.comm	_dev_attr_mem_info_gtt_total,4,2 ; @dev_attr_mem_info_gtt_total
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to create device file mem_info_gtt_total\n"

	.comm	_dev_attr_mem_info_gtt_used,4,2 ; @dev_attr_mem_info_gtt_used
l_.str.1:                               ; @.str.1
	.asciz	"Failed to create device file mem_info_gtt_used\n"

	.no_dead_strip	_amdgpu_gtt_mgr_init
.subsections_via_symbols
