	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function amdgpu_benchmark_move
_amdgpu_benchmark_move:                 ## @amdgpu_benchmark_move
	.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
	subq	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, -72(%rbp)                 ## 4-byte Spill
	movl	%edx, %r13d
	movl	%esi, %r12d
	movq	%rdi, %r14
	movq	$0, -56(%rbp)
	movq	$0, -48(%rbp)
	leaq	-120(%rbp), %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$40, %edx
	callq	_memset
	movl	%r12d, -120(%rbp)
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -88(%rbp)
	movl	%r13d, -116(%rbp)
	movq	$0, -96(%rbp)
	movq	_ttm_bo_type_kernel@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -104(%rbp)
	movq	$0, -112(%rbp)
	movq	_AMDGPU_BENCHMARK_ITERATIONS@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	leaq	-48(%rbp), %rdx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_amdgpu_bo_create
	testl	%eax, %eax
	je	LBB0_1
LBB0_14:
	leaq	L_.str.1(%rip), %rdi
	callq	_DRM_ERROR
LBB0_15:
	movq	-48(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_19
## %bb.16:
	movl	$1, %esi
	callq	_amdgpu_bo_reserve
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_likely
	testq	%rax, %rax
	je	LBB0_18
## %bb.17:
	movq	-48(%rbp), %rdi
	callq	_amdgpu_bo_unpin
	movq	-48(%rbp), %rdi
	callq	_amdgpu_bo_unreserve
LBB0_18:
	leaq	-48(%rbp), %rdi
	callq	_amdgpu_bo_unref
LBB0_19:
	movq	-56(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_23
## %bb.20:
	movl	$1, %esi
	callq	_amdgpu_bo_reserve
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_likely
	testq	%rax, %rax
	je	LBB0_22
## %bb.21:
	movq	-56(%rbp), %rdi
	callq	_amdgpu_bo_unpin
	movq	-56(%rbp), %rdi
	callq	_amdgpu_bo_unreserve
LBB0_22:
	leaq	-56(%rbp), %rdi
	callq	_amdgpu_bo_unref
LBB0_23:
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%r14, -80(%rbp)                 ## 8-byte Spill
	movl	%r15d, -68(%rbp)                ## 4-byte Spill
	movl	-72(%rbp), %ebx                 ## 4-byte Reload
	movq	-48(%rbp), %rdi
	xorl	%esi, %esi
	callq	_amdgpu_bo_reserve
	movl	%eax, %r14d
	xorl	%edi, %edi
	testl	%eax, %eax
	setne	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_2
LBB0_13:
	testl	%r14d, %r14d
	jne	LBB0_14
	jmp	LBB0_15
LBB0_2:
	movq	-48(%rbp), %rdi
	movl	%r13d, %esi
	callq	_amdgpu_bo_pin
	movq	-48(%rbp), %rdi
	testl	%eax, %eax
	je	LBB0_3
LBB0_8:
	callq	_amdgpu_bo_unreserve
	jmp	LBB0_14
LBB0_3:
	callq	_amdgpu_ttm_alloc_gart
	movl	%eax, %r14d
	movq	-48(%rbp), %rdi
	callq	_amdgpu_bo_unreserve
	testl	%r14d, %r14d
	movq	-80(%rbp), %r15                 ## 8-byte Reload
	jne	LBB0_14
## %bb.4:
	movl	%ebx, %r14d
	movq	-48(%rbp), %rdi
	callq	_amdgpu_bo_gpu_offset
	movl	%eax, -64(%rbp)                 ## 4-byte Spill
	movl	%ebx, -116(%rbp)
	leaq	-120(%rbp), %rsi
	leaq	-56(%rbp), %rdx
	movq	%r15, %rdi
	callq	_amdgpu_bo_create
	testl	%eax, %eax
	jne	LBB0_14
## %bb.5:
	movl	-64(%rbp), %r15d                ## 4-byte Reload
	movq	-56(%rbp), %rdi
	xorl	%esi, %esi
	callq	_amdgpu_bo_reserve
	movl	%eax, %r14d
	xorl	%edi, %edi
	testl	%eax, %eax
	setne	%dil
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_13
## %bb.6:
	movq	-56(%rbp), %rdi
	movl	%ebx, %esi
	callq	_amdgpu_bo_pin
	testl	%eax, %eax
	je	LBB0_9
## %bb.7:
	movq	-48(%rbp), %rdi
	jmp	LBB0_8
LBB0_9:
	movq	-56(%rbp), %rdi
	callq	_amdgpu_ttm_alloc_gart
	movl	%eax, %r14d
	movq	-56(%rbp), %rdi
	callq	_amdgpu_bo_unreserve
	testl	%r14d, %r14d
	movl	-68(%rbp), %r14d                ## 4-byte Reload
	movl	%r13d, -60(%rbp)                ## 4-byte Spill
	movq	-80(%rbp), %r13                 ## 8-byte Reload
	jne	LBB0_14
## %bb.10:
	movl	%r12d, %eax
	movl	%r15d, %r12d
	movq	-56(%rbp), %rdi
	movl	%eax, %r15d
	callq	_amdgpu_bo_gpu_offset
	cmpq	$0, (%r13)
	je	LBB0_15
## %bb.11:
	movq	%r13, %rdi
	movl	%r15d, %esi
	movl	%r12d, %edx
	movl	%eax, %ecx
	movl	%r14d, %r8d
	callq	_amdgpu_benchmark_do_move
	testl	%eax, %eax
	jle	LBB0_15
## %bb.12:
	leaq	L_.str(%rip), %r9
	movl	%r14d, %edi
	movl	%r15d, %esi
	movl	%eax, %edx
	movl	-60(%rbp), %ecx                 ## 4-byte Reload
	movl	%ebx, %r8d
	callq	_amdgpu_benchmark_log_results
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_ttm_bo_type_kernel,4,2         ## @ttm_bo_type_kernel
	.comm	_AMDGPU_BENCHMARK_ITERATIONS,4,2 ## @AMDGPU_BENCHMARK_ITERATIONS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"dma"

L_.str.1:                               ## @.str.1
	.asciz	"Error while benchmarking BO move.\n"

	.no_dead_strip	_amdgpu_benchmark_move
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function amdgpu_benchmark_move
_amdgpu_benchmark_move:                 ; @amdgpu_benchmark_move
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	stp	xzr, xzr, [sp, #48]
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #40
	bl	_memset
Lloh0:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #40]
	stp	w21, w20, [sp, #8]
	str	xzr, [sp, #32]
Lloh3:
	adrp	x8, _ttm_bo_type_kernel@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ttm_bo_type_kernel@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [sp, #24]
	str	xzr, [sp, #16]
Lloh6:
	adrp	x8, _AMDGPU_BENCHMARK_ITERATIONS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AMDGPU_BENCHMARK_ITERATIONS@GOTPAGEOFF]
Lloh8:
	ldr	w23, [x8]
	add	x1, sp, #8
	add	x2, sp, #48
	mov	x0, x22
	bl	_amdgpu_bo_create
	cbz	w0, LBB0_11
LBB0_1:
Lloh9:
	adrp	x0, l_.str.1@PAGE
Lloh10:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_ERROR
LBB0_2:
	ldr	x0, [sp, #48]
	cbz	x0, LBB0_6
; %bb.3:
	mov	w1, #1
	bl	_amdgpu_bo_reserve
	cmp	w0, #0
	cset	w0, eq
	bl	_likely
	cbz	x0, LBB0_5
; %bb.4:
	ldr	x0, [sp, #48]
	bl	_amdgpu_bo_unpin
	ldr	x0, [sp, #48]
	bl	_amdgpu_bo_unreserve
LBB0_5:
	add	x0, sp, #48
	bl	_amdgpu_bo_unref
LBB0_6:
	ldr	x0, [sp, #56]
	cbz	x0, LBB0_10
; %bb.7:
	mov	w1, #1
	bl	_amdgpu_bo_reserve
	cmp	w0, #0
	cset	w0, eq
	bl	_likely
	cbz	x0, LBB0_9
; %bb.8:
	ldr	x0, [sp, #56]
	bl	_amdgpu_bo_unpin
	ldr	x0, [sp, #56]
	bl	_amdgpu_bo_unreserve
LBB0_9:
	add	x0, sp, #56
	bl	_amdgpu_bo_unref
LBB0_10:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_11:
	ldr	x0, [sp, #48]
	mov	w1, #0
	bl	_amdgpu_bo_reserve
	mov	x25, x0
	cmp	w0, #0
	cset	w0, ne
	bl	_unlikely
	cbz	x0, LBB0_13
LBB0_12:
	cbnz	w25, LBB0_1
	b	LBB0_2
LBB0_13:
	ldr	x0, [sp, #48]
	mov	x1, x20
	bl	_amdgpu_bo_pin
	mov	x8, x0
	ldr	x0, [sp, #48]
	cbz	w8, LBB0_15
LBB0_14:
	bl	_amdgpu_bo_unreserve
	b	LBB0_1
LBB0_15:
	bl	_amdgpu_ttm_alloc_gart
	mov	x24, x0
	ldr	x0, [sp, #48]
	bl	_amdgpu_bo_unreserve
	cbnz	w24, LBB0_1
; %bb.16:
	ldr	x0, [sp, #48]
	bl	_amdgpu_bo_gpu_offset
	mov	x24, x0
	str	w19, [sp, #12]
	add	x1, sp, #8
	add	x2, sp, #56
	mov	x0, x22
	bl	_amdgpu_bo_create
	cbnz	w0, LBB0_1
; %bb.17:
	ldr	x0, [sp, #56]
	mov	w1, #0
	bl	_amdgpu_bo_reserve
	mov	x25, x0
	cmp	w0, #0
	cset	w0, ne
	bl	_unlikely
	cbnz	x0, LBB0_12
; %bb.18:
	ldr	x0, [sp, #56]
	mov	x1, x19
	bl	_amdgpu_bo_pin
	cbz	w0, LBB0_20
; %bb.19:
	ldr	x0, [sp, #48]
	b	LBB0_14
LBB0_20:
	ldr	x0, [sp, #56]
	bl	_amdgpu_ttm_alloc_gart
	mov	x25, x0
	ldr	x0, [sp, #56]
	bl	_amdgpu_bo_unreserve
	cbnz	w25, LBB0_1
; %bb.21:
	ldr	x0, [sp, #56]
	bl	_amdgpu_bo_gpu_offset
	ldr	x8, [x22]
	cbz	x8, LBB0_2
; %bb.22:
	mov	x3, x0
	mov	x0, x22
	mov	x1, x21
	mov	x2, x24
	mov	x4, x23
	bl	_amdgpu_benchmark_do_move
	cmp	w0, #1
	b.lt	LBB0_2
; %bb.23:
	mov	x2, x0
Lloh11:
	adrp	x5, l_.str@PAGE
Lloh12:
	add	x5, x5, l_.str@PAGEOFF
	mov	x0, x23
	mov	x1, x21
	mov	x3, x20
	mov	x4, x19
	bl	_amdgpu_benchmark_log_results
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_ttm_bo_type_kernel,4,2         ; @ttm_bo_type_kernel
	.comm	_AMDGPU_BENCHMARK_ITERATIONS,4,2 ; @AMDGPU_BENCHMARK_ITERATIONS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"dma"

l_.str.1:                               ; @.str.1
	.asciz	"Error while benchmarking BO move.\n"

	.no_dead_strip	_amdgpu_benchmark_move
.subsections_via_symbols
