	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_vm_get_bos              ## -- Begin function radeon_vm_get_bos
	.p2align	4, 0x90
_radeon_vm_get_bos:                     ## @radeon_vm_get_bos
	.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	%rdx, -48(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r15
	movl	(%rsi), %edi
	addl	$2, %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$48, %esi
	callq	_kvmalloc_array
	movq	%rax, %r13
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	movq	16(%r15), %rax
	movq	%rax, 24(%r13)
	movq	_RADEON_GEM_DOMAIN_VRAM@GOTPCREL(%rip), %r12
	movq	(%r12), %rcx
	movq	%rcx, 40(%r13)
	movq	%rcx, 32(%r13)
	movq	%rax, 8(%r13)
	movl	$1, (%r13)
	movq	$0, 16(%r13)
	leaq	4(%r13), %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_list_add
	xorl	%ebx, %ebx
	movl	$1, %r14d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	incl	%ebx
	cmpl	(%r15), %ebx
	ja	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %rax
	movl	%ebx, %ecx
	movq	(%rax,%rcx,8), %rax
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%r14d, %ecx
	leaq	(%rcx,%rcx,2), %rcx
	shlq	$4, %rcx
	movq	%rax, 24(%r13,%rcx)
	movq	(%r12), %rdx
	movq	%rdx, 40(%r13,%rcx)
	movq	(%r12), %rdx
	movq	%rdx, 32(%r13,%rcx)
	movq	%rax, 8(%r13,%rcx)
	movl	$1, (%r13,%rcx)
	movq	$0, 16(%r13,%rcx)
	incl	%r14d
	leaq	(%rcx,%r13), %rdi
	addq	$4, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_list_add
	jmp	LBB0_4
LBB0_5:
	movq	%r13, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_RADEON_GEM_DOMAIN_VRAM,8,3     ## @RADEON_GEM_DOMAIN_VRAM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_vm_get_bos              ; -- Begin function radeon_vm_get_bos
	.p2align	2
_radeon_vm_get_bos:                     ; @radeon_vm_get_bos
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x2
	mov	x20, x1
	ldr	w8, [x1]
	add	w0, w8, #2
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w22, #48
	mov	w1, #48
	bl	_kvmalloc_array
	mov	x21, x0
	cbz	x0, LBB0_5
; %bb.1:
	ldr	x8, [x20, #16]
Lloh3:
	adrp	x23, _RADEON_GEM_DOMAIN_VRAM@GOTPAGE
Lloh4:
	ldr	x23, [x23, _RADEON_GEM_DOMAIN_VRAM@GOTPAGEOFF]
	ldr	x9, [x23]
	stp	x9, x9, [x21, #32]
	stp	xzr, x8, [x21, #16]
	mov	w24, #1
	str	w24, [x21]
	str	x8, [x21, #8]
	add	x0, x21, #4
	mov	x1, x19
	bl	_list_add
	mov	w25, #0
	mov	w26, #1
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	w25, w25, #1
	ldr	w8, [x20]
	cmp	w25, w8
	b.hi	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #8]
	ldr	x8, [x8, w25, uxtw #3]
	cbz	x8, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	umaddl	x9, w26, w22, x21
	str	x8, [x9, #24]
	ldr	x10, [x23]
	str	x10, [x9, #40]
	ldr	x10, [x23]
	str	x10, [x9, #32]
	str	w24, [x9]
	stp	x8, xzr, [x9, #8]
	add	w26, w26, #1
	add	x0, x9, #4
	mov	x1, x19
	bl	_list_add
	b	LBB0_2
LBB0_5:
	mov	x0, x21
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_RADEON_GEM_DOMAIN_VRAM,8,3     ; @RADEON_GEM_DOMAIN_VRAM
.subsections_via_symbols
