	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function radeon_benchmark_move
_radeon_benchmark_move:                 ## @radeon_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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, -52(%rbp)                 ## 4-byte Spill
	movl	%edx, %r13d
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movq	$0, -48(%rbp)
	movq	$0, -64(%rbp)
	movq	_RADEON_BENCHMARK_ITERATIONS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -76(%rbp)                 ## 4-byte Spill
	movq	_PAGE_SIZE@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	leaq	-64(%rbp), %rax
	movq	%rax, 16(%rsp)
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rsp)
	movl	$1, %ecx
	movl	%r13d, %r8d
	xorl	%r9d, %r9d
	callq	_radeon_bo_create
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_14
## %bb.1:
	movq	-64(%rbp), %rdi
	xorl	%esi, %esi
	callq	_radeon_bo_reserve
	movl	%eax, %r12d
	xorl	%edi, %edi
	testl	%eax, %eax
	setne	%dil
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_14
## %bb.2:
	movq	-64(%rbp), %rdi
	leaq	-72(%rbp), %rdx
	movl	%r13d, %esi
	callq	_radeon_bo_pin
	movl	%eax, %r12d
	movq	-64(%rbp), %rdi
	callq	_radeon_bo_unreserve
	testl	%r12d, %r12d
	jne	LBB0_14
## %bb.3:
	movl	(%r14), %edx
	leaq	-48(%rbp), %rax
	movq	%rax, 16(%rsp)
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rsp)
	movq	%rbx, %rdi
	movl	%r15d, %esi
	movl	$1, %ecx
	movl	-52(%rbp), %r8d                 ## 4-byte Reload
	xorl	%r9d, %r9d
	callq	_radeon_bo_create
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_14
## %bb.4:
	movq	-48(%rbp), %rdi
	xorl	%esi, %esi
	callq	_radeon_bo_reserve
	movl	%eax, %r12d
	xorl	%edi, %edi
	testl	%eax, %eax
	setne	%dil
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_14
## %bb.5:
	movq	-48(%rbp), %rdi
	leaq	-68(%rbp), %rdx
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	callq	_radeon_bo_pin
	movl	%eax, %r12d
	movq	-48(%rbp), %rdi
	callq	_radeon_bo_unreserve
	testl	%r12d, %r12d
	je	LBB0_6
LBB0_14:
	movq	-64(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_18
## %bb.15:
	xorl	%esi, %esi
	callq	_radeon_bo_reserve
	movl	%eax, %r12d
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_likely
	testq	%rax, %rax
	je	LBB0_17
## %bb.16:
	movq	-64(%rbp), %rdi
	callq	_radeon_bo_unpin
	movq	-64(%rbp), %rdi
	callq	_radeon_bo_unreserve
LBB0_17:
	leaq	-64(%rbp), %rdi
	callq	_radeon_bo_unref
LBB0_18:
	movq	-48(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_22
## %bb.19:
	xorl	%esi, %esi
	callq	_radeon_bo_reserve
	movl	%eax, %r12d
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_likely
	testq	%rax, %rax
	je	LBB0_21
## %bb.20:
	movq	-48(%rbp), %rdi
	callq	_radeon_bo_unpin
	movq	-48(%rbp), %rdi
	callq	_radeon_bo_unreserve
LBB0_21:
	leaq	-48(%rbp), %rdi
	callq	_radeon_bo_unref
LBB0_22:
	testl	%r12d, %r12d
	je	LBB0_24
## %bb.23:
	leaq	L_.str.2(%rip), %rdi
	callq	_DRM_ERROR
LBB0_24:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	(%rbx), %rax
	cmpq	$0, 8(%rax)
	movl	-76(%rbp), %r14d                ## 4-byte Reload
	je	LBB0_11
## %bb.7:
	movl	-72(%rbp), %edx
	movl	-68(%rbp), %ecx
	movq	_RADEON_BENCHMARK_COPY_DMA@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	-48(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, (%rsp)
	movq	%rbx, %rdi
	movl	%r15d, %esi
	movl	%r14d, %r9d
	callq	_radeon_benchmark_do_move
	testl	%eax, %eax
	js	LBB0_8
## %bb.9:
	je	LBB0_11
## %bb.10:
	leaq	L_.str(%rip), %r9
	movl	%r14d, %edi
	movl	%r15d, %esi
	movl	%eax, %edx
	movl	%r13d, %ecx
	movl	-52(%rbp), %r8d                 ## 4-byte Reload
	callq	_radeon_benchmark_log_results
LBB0_11:
	movq	(%rbx), %rax
	xorl	%r12d, %r12d
	cmpq	$0, (%rax)
	je	LBB0_14
## %bb.12:
	movl	-72(%rbp), %edx
	movl	-68(%rbp), %ecx
	movq	_RADEON_BENCHMARK_COPY_BLIT@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	-48(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, (%rsp)
	movq	%rbx, %rdi
	movl	%r15d, %esi
	movl	%r14d, %r9d
	callq	_radeon_benchmark_do_move
	testl	%eax, %eax
	jle	LBB0_14
## %bb.13:
	leaq	L_.str.1(%rip), %r9
	movl	%r14d, %edi
	movl	%r15d, %esi
	movl	%eax, %edx
	movl	%r13d, %ecx
	movl	-52(%rbp), %r8d                 ## 4-byte Reload
	callq	_radeon_benchmark_log_results
	jmp	LBB0_14
LBB0_8:
	xorl	%r12d, %r12d
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_RADEON_BENCHMARK_ITERATIONS,4,2 ## @RADEON_BENCHMARK_ITERATIONS
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_RADEON_BENCHMARK_COPY_DMA,4,2  ## @RADEON_BENCHMARK_COPY_DMA
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"dma"

	.comm	_RADEON_BENCHMARK_COPY_BLIT,4,2 ## @RADEON_BENCHMARK_COPY_BLIT
L_.str.1:                               ## @.str.1
	.asciz	"blit"

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

	.no_dead_strip	_radeon_benchmark_move
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function radeon_benchmark_move
_radeon_benchmark_move:                 ; @radeon_benchmark_move
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x23, x0
	stp	xzr, xzr, [sp, #16]
Lloh0:
	adrp	x8, _RADEON_BENCHMARK_ITERATIONS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RADEON_BENCHMARK_ITERATIONS@GOTPAGEOFF]
Lloh2:
	ldr	w22, [x8]
Lloh3:
	adrp	x25, _PAGE_SIZE@GOTPAGE
Lloh4:
	ldr	x25, [x25, _PAGE_SIZE@GOTPAGEOFF]
	ldr	w2, [x25]
	add	x8, sp, #16
	str	x8, [sp]
	mov	w3, #1
	mov	x4, x20
	mov	w5, #0
	mov	x6, #0
	mov	x7, #0
	bl	_radeon_bo_create
	mov	x24, x0
	cbnz	w0, LBB0_14
; %bb.1:
	ldr	x0, [sp, #16]
	mov	w1, #0
	bl	_radeon_bo_reserve
	mov	x24, x0
	cmp	w0, #0
	cset	w0, ne
	bl	_unlikely
	cbnz	x0, LBB0_14
; %bb.2:
	ldr	x0, [sp, #16]
	add	x2, sp, #12
	mov	x1, x20
	bl	_radeon_bo_pin
	mov	x24, x0
	ldr	x0, [sp, #16]
	bl	_radeon_bo_unreserve
	cbnz	w24, LBB0_14
; %bb.3:
	ldr	w2, [x25]
	add	x8, sp, #24
	str	x8, [sp]
	mov	x0, x23
	mov	x1, x21
	mov	w3, #1
	mov	x4, x19
	mov	w5, #0
	mov	x6, #0
	mov	x7, #0
	bl	_radeon_bo_create
	mov	x24, x0
	cbnz	w0, LBB0_14
; %bb.4:
	ldr	x0, [sp, #24]
	mov	w1, #0
	bl	_radeon_bo_reserve
	mov	x24, x0
	cmp	w0, #0
	cset	w0, ne
	bl	_unlikely
	cbnz	x0, LBB0_14
; %bb.5:
	ldr	x0, [sp, #24]
	add	x2, sp, #8
	mov	x1, x19
	bl	_radeon_bo_pin
	mov	x24, x0
	ldr	x0, [sp, #24]
	bl	_radeon_bo_unreserve
	cbnz	w24, LBB0_14
; %bb.6:
	ldr	x8, [x23]
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_10
; %bb.7:
	ldp	w3, w2, [sp, #8]
Lloh5:
	adrp	x8, _RADEON_BENCHMARK_COPY_DMA@GOTPAGE
Lloh6:
	ldr	x8, [x8, _RADEON_BENCHMARK_COPY_DMA@GOTPAGEOFF]
Lloh7:
	ldr	w4, [x8]
	ldr	x8, [sp, #24]
	ldr	w6, [x8]
	mov	x0, x23
	mov	x1, x21
	mov	x5, x22
	bl	_radeon_benchmark_do_move
	tbnz	w0, #31, LBB0_13
; %bb.8:
	mov	x2, x0
	cbz	w0, LBB0_10
; %bb.9:
Lloh8:
	adrp	x5, l_.str@PAGE
Lloh9:
	add	x5, x5, l_.str@PAGEOFF
	mov	x0, x22
	mov	x1, x21
	mov	x3, x20
	mov	x4, x19
	bl	_radeon_benchmark_log_results
LBB0_10:
	ldr	x8, [x23]
	ldr	x8, [x8]
	cbz	x8, LBB0_13
; %bb.11:
	ldp	w3, w2, [sp, #8]
Lloh10:
	adrp	x8, _RADEON_BENCHMARK_COPY_BLIT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _RADEON_BENCHMARK_COPY_BLIT@GOTPAGEOFF]
Lloh12:
	ldr	w4, [x8]
	ldr	x8, [sp, #24]
	ldr	w6, [x8]
	mov	x0, x23
	mov	x1, x21
	mov	x5, x22
	bl	_radeon_benchmark_do_move
	cmp	w0, #1
	b.lt	LBB0_13
; %bb.12:
	mov	x2, x0
Lloh13:
	adrp	x5, l_.str.1@PAGE
Lloh14:
	add	x5, x5, l_.str.1@PAGEOFF
	mov	x0, x22
	mov	x1, x21
	mov	x3, x20
	mov	x4, x19
	bl	_radeon_benchmark_log_results
LBB0_13:
	mov	w24, #0
LBB0_14:
	ldr	x0, [sp, #16]
	cbz	x0, LBB0_18
; %bb.15:
	mov	w1, #0
	bl	_radeon_bo_reserve
	mov	x24, x0
	cmp	w0, #0
	cset	w0, eq
	bl	_likely
	cbz	x0, LBB0_17
; %bb.16:
	ldr	x0, [sp, #16]
	bl	_radeon_bo_unpin
	ldr	x0, [sp, #16]
	bl	_radeon_bo_unreserve
LBB0_17:
	add	x0, sp, #16
	bl	_radeon_bo_unref
LBB0_18:
	ldr	x0, [sp, #24]
	cbz	x0, LBB0_22
; %bb.19:
	mov	w1, #0
	bl	_radeon_bo_reserve
	mov	x24, x0
	cmp	w0, #0
	cset	w0, eq
	bl	_likely
	cbz	x0, LBB0_21
; %bb.20:
	ldr	x0, [sp, #24]
	bl	_radeon_bo_unpin
	ldr	x0, [sp, #24]
	bl	_radeon_bo_unreserve
LBB0_21:
	add	x0, sp, #24
	bl	_radeon_bo_unref
LBB0_22:
	cbz	w24, LBB0_24
; %bb.23:
Lloh15:
	adrp	x0, l_.str.2@PAGE
Lloh16:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DRM_ERROR
LBB0_24:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_RADEON_BENCHMARK_ITERATIONS,4,2 ; @RADEON_BENCHMARK_ITERATIONS
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_RADEON_BENCHMARK_COPY_DMA,4,2  ; @RADEON_BENCHMARK_COPY_DMA
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"dma"

	.comm	_RADEON_BENCHMARK_COPY_BLIT,4,2 ; @RADEON_BENCHMARK_COPY_BLIT
l_.str.1:                               ; @.str.1
	.asciz	"blit"

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

	.no_dead_strip	_radeon_benchmark_move
.subsections_via_symbols
