	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_sa_bo_manager_start     ## -- Begin function radeon_sa_bo_manager_start
	.p2align	4, 0x90
_radeon_sa_bo_manager_start:            ## @radeon_sa_bo_manager_start
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	(%rsi), %rdi
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	movq	%rsi, %r15
	xorl	%esi, %esi
	callq	_radeon_bo_reserve
	testl	%eax, %eax
	je	LBB0_5
## %bb.3:
	movl	%eax, %ebx
	movl	(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_4
LBB0_1:
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_8
LBB0_5:
	movq	(%r15), %rdi
	movl	16(%r15), %esi
	leaq	12(%r15), %rdx
	callq	_radeon_bo_pin
	movq	(%r15), %rdi
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movl	%eax, %ebx
	callq	_radeon_bo_unreserve
	movl	(%r14), %edi
	leaq	L_.str.2(%rip), %rsi
LBB0_4:
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_dev_err
LBB0_8:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	leaq	8(%r15), %rsi
	callq	_radeon_bo_kmap
	movl	%eax, %ebx
	movq	(%r15), %rdi
	callq	_radeon_bo_unreserve
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"no bo for sa manager\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"(%d) failed to reserve manager bo\n"

L_.str.2:                               ## @.str.2
	.asciz	"(%d) failed to pin manager bo\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_sa_bo_manager_start     ; -- Begin function radeon_sa_bo_manager_start
	.p2align	2
_radeon_sa_bo_manager_start:            ; @radeon_sa_bo_manager_start
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	ldr	x0, [x1]
	cbz	x0, LBB0_3
; %bb.1:
	mov	x20, x1
	mov	w1, #0
	bl	_radeon_bo_reserve
	cbz	w0, LBB0_4
; %bb.2:
	mov	x21, x0
	ldr	w0, [x19]
	str	x21, [sp]
Lloh0:
	adrp	x1, l_.str.1@PAGE
Lloh1:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
	b	LBB0_6
LBB0_3:
	ldr	w0, [x19]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_6
LBB0_4:
	ldr	x0, [x20]
	ldr	w1, [x20, #16]
	add	x2, x20, #12
	bl	_radeon_bo_pin
	mov	x21, x0
	ldr	x0, [x20]
	cbz	w21, LBB0_8
; %bb.5:
	bl	_radeon_bo_unreserve
	ldr	w0, [x19]
	str	x21, [sp]
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
                                        ; kill: def $w21 killed $w21 killed $x21 def $x21
LBB0_6:
	mov	x0, x21
LBB0_7:
	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
	add	sp, sp, #64
	ret
LBB0_8:
	add	x1, x20, #8
	bl	_radeon_bo_kmap
	mov	x19, x0
	ldr	x0, [x20]
	bl	_radeon_bo_unreserve
	mov	x0, x19
	b	LBB0_7
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"no bo for sa manager\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"(%d) failed to reserve manager bo\n"

l_.str.2:                               ; @.str.2
	.asciz	"(%d) failed to pin manager bo\n"

.subsections_via_symbols
