	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function amdgpu_bo_create_shadow
_amdgpu_bo_create_shadow:               ## @amdgpu_bo_create_shadow
	.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
	subq	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%eax, %eax
	cmpq	$0, (%rdx)
	jne	LBB0_3
## %bb.1:
	movq	%rdx, %rbx
	movq	%rsi, %r15
	movq	%rdi, %r14
	leaq	-56(%rbp), %r12
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	$24, %edx
	callq	_memset
	movq	%r15, -56(%rbp)
	movq	_AMDGPU_GEM_DOMAIN_GTT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -36(%rbp)
	movq	_AMDGPU_GEM_CREATE_CPU_GTT_USWC@GOTPCREL(%rip), %rax
	movq	_AMDGPU_GEM_CREATE_SHADOW@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	%ecx, -48(%rbp)
	movq	_ttm_bo_type_kernel@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -40(%rbp)
	movl	8(%rbx), %eax
	movl	%eax, -44(%rbp)
	movq	%r14, %rdi
	movq	%r12, %rsi
	movq	%rbx, %rdx
	callq	_amdgpu_bo_do_create
	testl	%eax, %eax
	jne	LBB0_3
## %bb.2:
	movq	%rbx, %rdi
	callq	_amdgpu_bo_ref
	movq	(%rbx), %rcx
	movl	%eax, 4(%rcx)
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	(%rbx), %rdi
	leaq	4(%r14), %rsi
	callq	_list_add_tail
	movq	%r14, %rdi
	callq	_mutex_unlock
	xorl	%eax, %eax
LBB0_3:
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AMDGPU_GEM_DOMAIN_GTT,4,2      ## @AMDGPU_GEM_DOMAIN_GTT
	.comm	_AMDGPU_GEM_CREATE_CPU_GTT_USWC,4,2 ## @AMDGPU_GEM_CREATE_CPU_GTT_USWC
	.comm	_AMDGPU_GEM_CREATE_SHADOW,4,2   ## @AMDGPU_GEM_CREATE_SHADOW
	.comm	_ttm_bo_type_kernel,4,2         ## @ttm_bo_type_kernel
	.no_dead_strip	_amdgpu_bo_create_shadow
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function amdgpu_bo_create_shadow
_amdgpu_bo_create_shadow:               ; @amdgpu_bo_create_shadow
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	ldr	x8, [x2]
	cbz	x8, LBB0_2
LBB0_1:
	mov	w0, #0
	b	LBB0_3
LBB0_2:
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #24
	bl	_memset
	str	x21, [sp, #8]
Lloh0:
	adrp	x8, _AMDGPU_GEM_DOMAIN_GTT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AMDGPU_GEM_DOMAIN_GTT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _AMDGPU_GEM_CREATE_CPU_GTT_USWC@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AMDGPU_GEM_CREATE_CPU_GTT_USWC@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
Lloh6:
	adrp	x10, _AMDGPU_GEM_CREATE_SHADOW@GOTPAGE
Lloh7:
	ldr	x10, [x10, _AMDGPU_GEM_CREATE_SHADOW@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	orr	w9, w10, w9
Lloh9:
	adrp	x10, _ttm_bo_type_kernel@GOTPAGE
Lloh10:
	ldr	x10, [x10, _ttm_bo_type_kernel@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	stp	w10, w8, [sp, #24]
	ldr	w8, [x20, #8]
	stp	w9, w8, [sp, #16]
	add	x1, sp, #8
	mov	x0, x19
	mov	x2, x20
	bl	_amdgpu_bo_do_create
	cbz	w0, LBB0_4
LBB0_3:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_4:
	mov	x0, x20
	bl	_amdgpu_bo_ref
	ldr	x8, [x20]
	str	w0, [x8, #4]
	mov	x0, x19
	bl	_mutex_lock
	ldr	x0, [x20]
	add	x1, x19, #4
	bl	_list_add_tail
	mov	x0, x19
	bl	_mutex_unlock
	b	LBB0_1
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_AMDGPU_GEM_DOMAIN_GTT,4,2      ; @AMDGPU_GEM_DOMAIN_GTT
	.comm	_AMDGPU_GEM_CREATE_CPU_GTT_USWC,4,2 ; @AMDGPU_GEM_CREATE_CPU_GTT_USWC
	.comm	_AMDGPU_GEM_CREATE_SHADOW,4,2   ; @AMDGPU_GEM_CREATE_SHADOW
	.comm	_ttm_bo_type_kernel,4,2         ; @ttm_bo_type_kernel
	.no_dead_strip	_amdgpu_bo_create_shadow
.subsections_via_symbols
