	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_vce_cs_reloc            ## -- Begin function radeon_vce_cs_reloc
	.p2align	4, 0x90
_radeon_vce_cs_reloc:                   ## @radeon_vce_cs_reloc
	.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
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movl	%edx, %r13d
	movl	%esi, %r12d
	movq	%rdi, %rbx
	movq	16(%rdi), %r14
	callq	_radeon_get_ib_value
	movq	%rax, %r15
	movq	%rbx, %rdi
	movl	%r13d, %esi
	callq	_radeon_get_ib_value
	movl	(%r14), %edx
	cmpl	%eax, %edx
	jbe	LBB0_1
## %bb.2:
	movl	-44(%rbp), %r13d                ## 4-byte Reload
	movq	8(%rbx), %rcx
	andl	$-4, %eax
	movl	4(%rcx,%rax,2), %edi
	movl	(%rcx,%rax,2), %r14d
	addl	%r15d, %r14d
	callq	_radeon_bo_size
	movq	(%rbx), %rcx
	movslq	%r12d, %rdx
	movl	%r14d, (%rcx,%rdx,4)
	subl	%r15d, %eax
	jle	LBB0_3
## %bb.4:
	xorl	%ebx, %ebx
	cmpl	%r13d, %eax
	jae	LBB0_8
## %bb.5:
	movl	%r13d, %edx
	leaq	L_.str.2(%rip), %rdi
	xorl	%ebx, %ebx
	movl	%eax, %esi
	jmp	LBB0_6
LBB0_1:
	leaq	L_.str(%rip), %rdi
	xorl	%ebx, %ebx
	movl	%eax, %esi
LBB0_6:
	xorl	%eax, %eax
	callq	_DRM_ERROR
	jmp	LBB0_7
LBB0_3:
	leaq	L_.str.1(%rip), %rdi
	xorl	%ebx, %ebx
	movl	%r15d, %esi
	xorl	%eax, %eax
	callq	_DRM_ERROR
LBB0_7:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_8:
	movl	%ebx, %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	"Relocs at %d after relocations chunk end %d !\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"invalid reloc offset %llX!\n"

L_.str.2:                               ## @.str.2
	.asciz	"buffer to small (%d / %d)!\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_vce_cs_reloc            ; -- Begin function radeon_vce_cs_reloc
	.p2align	2
_radeon_vce_cs_reloc:                   ; @radeon_vce_cs_reloc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x3
	mov	x23, x2
	mov	x20, x1
	mov	x22, x0
	ldr	x24, [x0, #16]
	bl	_radeon_get_ib_value
	mov	x21, x0
	mov	x0, x22
	mov	x1, x23
	bl	_radeon_get_ib_value
	mov	x1, x0
	ldr	w8, [x24]
	cmp	w8, w1
	b.ls	LBB0_4
; %bb.1:
	ldr	x8, [x22, #8]
	ubfx	x9, x1, #2, #30
	add	x8, x8, x9, lsl #3
	ldp	w23, w0, [x8]
	bl	_radeon_bo_size
	add	w8, w23, w21
	ldr	x9, [x22]
	str	w8, [x9, w20, sxtw #2]
	subs	w1, w0, w21
	b.le	LBB0_5
; %bb.2:
	cmp	w1, w19
	b.hs	LBB0_8
; %bb.3:
	str	x19, [sp]
Lloh0:
	adrp	x0, l_.str.2@PAGE
Lloh1:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_6
LBB0_4:
	str	x8, [sp]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
                                        ; kill: def $w1 killed $w1 killed $x1
	b	LBB0_6
LBB0_5:
Lloh4:
	adrp	x0, l_.str.1@PAGE
Lloh5:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x21
LBB0_6:
	bl	_DRM_ERROR
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	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
	add	sp, sp, #80
	ret
LBB0_8:
	mov	w0, #0
	b	LBB0_7
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Relocs at %d after relocations chunk end %d !\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"invalid reloc offset %llX!\n"

l_.str.2:                               ; @.str.2
	.asciz	"buffer to small (%d / %d)!\n"

.subsections_via_symbols
