	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_ib_get                  ## -- Begin function radeon_ib_get
	.p2align	4, 0x90
_radeon_ib_get:                         ## @radeon_ib_get
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r15
	movq	%rdx, %r13
	movl	%esi, %r12d
	movq	%rdi, %rbx
	leaq	4(%rdi), %rsi
	addq	$8, %rdx
	movl	%r8d, %ecx
	movl	$256, %r8d                      ## imm = 0x100
	callq	_radeon_sa_bo_new
	movl	%eax, %r14d
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edx
	callq	_dev_err
	jmp	LBB0_6
LBB0_2:
	leaq	48(%r13), %rdi
	callq	_radeon_sync_create
	movl	%r12d, (%r13)
	movq	$0, 40(%r13)
	movq	8(%r13), %rdi
	callq	_radeon_sa_bo_cpu_addr
	movl	%eax, 32(%r13)
	movq	%r15, 24(%r13)
	movq	8(%r13), %rdi
	testq	%r15, %r15
	je	LBB0_4
## %bb.3:
	movq	_RADEON_VA_IB_OFFSET@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	addq	(%rdi), %rax
	jmp	LBB0_5
LBB0_4:
	callq	_radeon_sa_bo_gpu_addr
LBB0_5:
	movq	%rax, 16(%r13)
	movl	$0, 4(%r13)
LBB0_6:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to get a new IB (%d)\n"

	.comm	_RADEON_VA_IB_OFFSET,8,3        ## @RADEON_VA_IB_OFFSET
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_ib_get                  ; -- Begin function radeon_ib_get
	.p2align	2
_radeon_ib_get:                         ; @radeon_ib_get
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x3
	mov	x19, x2
	mov	x22, x1
	mov	x23, x0
	add	x1, x0, #4
	add	x2, x2, #8
	mov	x3, x4
	mov	w4, #256
	bl	_radeon_sa_bo_new
	mov	x20, x0
	cbz	w0, LBB0_2
; %bb.1:
	ldr	w0, [x23]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_dev_err
	b	LBB0_6
LBB0_2:
	add	x0, x19, #48
	bl	_radeon_sync_create
	str	w22, [x19]
	str	xzr, [x19, #40]
	ldr	x0, [x19, #8]
	bl	_radeon_sa_bo_cpu_addr
	str	w0, [x19, #32]
	str	x21, [x19, #24]
	ldr	x0, [x19, #8]
	cbz	x21, LBB0_4
; %bb.3:
	ldr	x8, [x0]
Lloh2:
	adrp	x9, _RADEON_VA_IB_OFFSET@GOTPAGE
Lloh3:
	ldr	x9, [x9, _RADEON_VA_IB_OFFSET@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	add	x0, x9, x8
	b	LBB0_5
LBB0_4:
	bl	_radeon_sa_bo_gpu_addr
LBB0_5:
	str	x0, [x19, #16]
	str	wzr, [x19, #4]
LBB0_6:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to get a new IB (%d)\n"

	.comm	_RADEON_VA_IB_OFFSET,8,3        ; @RADEON_VA_IB_OFFSET
.subsections_via_symbols
