	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_gem_prime_import_sg_table ## -- Begin function radeon_gem_prime_import_sg_table
	.p2align	4, 0x90
_radeon_gem_prime_import_sg_table:      ## @radeon_gem_prime_import_sg_table
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -24
	movq	%rdx, %r9
	movq	(%rdi), %rbx
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_RADEON_GEM_DOMAIN_GTT@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	leaq	-16(%rbp), %rax
	movq	%rax, (%rsp)
	movq	%rbx, %rdi
	xorl	%ecx, %ecx
	callq	_radeon_bo_create
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %edi
	callq	_ERR_PTR
	jmp	LBB0_3
LBB0_2:
	movq	-16(%rbp), %rax
	movq	%rax, (%rax)
	movq	%rbx, %rdi
	callq	_mutex_lock
	movq	-16(%rbp), %rdi
	addq	$8, %rdi
	leaq	4(%rbx), %rsi
	callq	_list_add_tail
	movq	%rbx, %rdi
	callq	_mutex_unlock
	movq	-16(%rbp), %rax
LBB0_3:
	addq	$24, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_RADEON_GEM_DOMAIN_GTT,4,2      ## @RADEON_GEM_DOMAIN_GTT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_gem_prime_import_sg_table ; -- Begin function radeon_gem_prime_import_sg_table
	.p2align	2
_radeon_gem_prime_import_sg_table:      ; @radeon_gem_prime_import_sg_table
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x5, x2
	ldr	x19, [x0]
Lloh0:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
Lloh3:
	adrp	x8, _RADEON_GEM_DOMAIN_GTT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _RADEON_GEM_DOMAIN_GTT@GOTPAGEOFF]
Lloh5:
	ldr	w4, [x8]
	add	x6, sp, #8
	mov	x0, x19
	mov	w3, #0
	bl	_radeon_bo_create
	cbz	w0, LBB0_2
; %bb.1:
	bl	_ERR_PTR
	b	LBB0_3
LBB0_2:
	ldr	x8, [sp, #8]
	str	x8, [x8]
	mov	x0, x19
	bl	_mutex_lock
	ldr	x8, [sp, #8]
	add	x0, x8, #8
	add	x1, x19, #4
	bl	_list_add_tail
	mov	x0, x19
	bl	_mutex_unlock
	ldr	x0, [sp, #8]
LBB0_3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_RADEON_GEM_DOMAIN_GTT,4,2      ; @RADEON_GEM_DOMAIN_GTT
.subsections_via_symbols
