	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_map_static_csa          ## -- Begin function amdgpu_map_static_csa
	.p2align	4, 0x90
_amdgpu_map_static_csa:                 ## @amdgpu_map_static_csa
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, -64(%rbp)                 ## 4-byte Spill
	movl	%r8d, -60(%rbp)                 ## 4-byte Spill
	movq	%rcx, %r13
	movq	%rdx, %r15
	movq	%rsi, %r12
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	leaq	-48(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_INIT_LIST_HEAD
	leaq	-92(%rbp), %r14
	movq	%r14, %rdi
	callq	_INIT_LIST_HEAD
	movq	%r15, -88(%rbp)
	movl	$1, -96(%rbp)
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_list_add
	leaq	-80(%rbp), %rdx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_amdgpu_vm_get_pd_bo
	leaq	-56(%rbp), %rdi
	movq	%rbx, %rsi
	movl	$1, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_ttm_eu_reserve_buffers
	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
LBB0_7:
	movl	%ebx, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	movq	%r12, %rsi
	movq	%r15, %rdx
	callq	_amdgpu_vm_bo_add
	movq	%rax, (%r13)
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	_AMDGPU_PTE_READABLE@GOTPCREL(%rip), %rcx
	movq	_AMDGPU_PTE_WRITEABLE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r9d
	orl	(%rcx), %r9d
	movq	_AMDGPU_PTE_EXECUTABLE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %r9d
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	movq	%rax, %rsi
	movl	-60(%rbp), %edx                 ## 4-byte Reload
	xorl	%ecx, %ecx
	movl	-64(%rbp), %r8d                 ## 4-byte Reload
	callq	_amdgpu_vm_bo_map
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %r15d
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_DRM_ERROR
	movq	(%r13), %rsi
	movq	%r14, %rdi
	callq	_amdgpu_vm_bo_rmv
	leaq	-56(%rbp), %rdi
	leaq	-48(%rbp), %rsi
	callq	_ttm_eu_backoff_reservation
	movl	%r15d, %ebx
	jmp	LBB0_7
LBB0_3:
	leaq	-56(%rbp), %rdi
	leaq	-48(%rbp), %rsi
	callq	_ttm_eu_backoff_reservation
	leaq	L_.str.1(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_DRM_ERROR
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_7
LBB0_6:
	leaq	-56(%rbp), %rdi
	leaq	-48(%rbp), %rsi
	callq	_ttm_eu_backoff_reservation
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to reserve CSA,PD BOs: err=%d\n"

L_.str.1:                               ## @.str.1
	.asciz	"failed to create bo_va for static CSA\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_AMDGPU_PTE_READABLE,4,2        ## @AMDGPU_PTE_READABLE
	.comm	_AMDGPU_PTE_WRITEABLE,4,2       ## @AMDGPU_PTE_WRITEABLE
	.comm	_AMDGPU_PTE_EXECUTABLE,4,2      ## @AMDGPU_PTE_EXECUTABLE
L_.str.2:                               ## @.str.2
	.asciz	"failed to do bo_map on static CSA, err=%d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_map_static_csa          ; -- Begin function amdgpu_map_static_csa
	.p2align	2
_amdgpu_map_static_csa:                 ; @amdgpu_map_static_csa
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	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
	mov	x21, x5
	mov	x22, x4
	mov	x19, x3
	mov	x23, x2
	mov	x24, x1
	mov	x20, x0
	add	x0, sp, #32
	bl	_INIT_LIST_HEAD
	add	x8, sp, #8
	orr	x25, x8, #0x4
	mov	x0, x25
	bl	_INIT_LIST_HEAD
	str	x23, [sp, #16]
	mov	w8, #1
	str	w8, [sp, #8]
	add	x1, sp, #32
	mov	x0, x25
	bl	_list_add
	add	x1, sp, #32
	add	x2, sp, #24
	mov	x0, x24
	bl	_amdgpu_vm_get_pd_bo
	add	x0, sp, #40
	add	x1, sp, #32
	mov	w2, #1
	mov	x3, #0
	mov	w4, #0
	bl	_ttm_eu_reserve_buffers
	cbz	w0, LBB0_3
; %bb.1:
	mov	x25, x0
	str	x25, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
LBB0_2:
	mov	x0, x25
	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
	add	sp, sp, #128
	ret
LBB0_3:
	mov	x0, x20
	mov	x1, x24
	mov	x2, x23
	bl	_amdgpu_vm_bo_add
	str	x0, [x19]
	cbz	x0, LBB0_6
; %bb.4:
	mov	x1, x0
Lloh2:
	adrp	x8, _AMDGPU_PTE_READABLE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AMDGPU_PTE_READABLE@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _AMDGPU_PTE_WRITEABLE@GOTPAGE
Lloh6:
	ldr	x9, [x9, _AMDGPU_PTE_WRITEABLE@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh8:
	adrp	x9, _AMDGPU_PTE_EXECUTABLE@GOTPAGE
Lloh9:
	ldr	x9, [x9, _AMDGPU_PTE_EXECUTABLE@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w5, w8, w9
	mov	x0, x20
	mov	x2, x22
	mov	w3, #0
	mov	x4, x21
	bl	_amdgpu_vm_bo_map
	cbz	w0, LBB0_7
; %bb.5:
	mov	x21, x0
	str	x21, [sp]
Lloh11:
	adrp	x0, l_.str.2@PAGE
Lloh12:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DRM_ERROR
	ldr	x1, [x19]
	mov	x0, x20
	bl	_amdgpu_vm_bo_rmv
	add	x0, sp, #40
	add	x1, sp, #32
	bl	_ttm_eu_backoff_reservation
	mov	x25, x21
	b	LBB0_2
LBB0_6:
	add	x0, sp, #40
	add	x1, sp, #32
	bl	_ttm_eu_backoff_reservation
Lloh13:
	adrp	x0, l_.str.1@PAGE
Lloh14:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_ERROR
Lloh15:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w25, w8
	b	LBB0_2
LBB0_7:
	add	x0, sp, #40
	add	x1, sp, #32
	bl	_ttm_eu_backoff_reservation
	mov	w25, #0
	b	LBB0_2
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to reserve CSA,PD BOs: err=%d\n"

l_.str.1:                               ; @.str.1
	.asciz	"failed to create bo_va for static CSA\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_AMDGPU_PTE_READABLE,4,2        ; @AMDGPU_PTE_READABLE
	.comm	_AMDGPU_PTE_WRITEABLE,4,2       ; @AMDGPU_PTE_WRITEABLE
	.comm	_AMDGPU_PTE_EXECUTABLE,4,2      ; @AMDGPU_PTE_EXECUTABLE
l_.str.2:                               ; @.str.2
	.asciz	"failed to do bo_map on static CSA, err=%d\n"

.subsections_via_symbols
