	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_r600_dma_cs_next_reloc         ## -- Begin function r600_dma_cs_next_reloc
	.p2align	4, 0x90
_r600_dma_cs_next_reloc:                ## @r600_dma_cs_next_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	$0, (%rsi)
	cmpq	$0, 16(%rdi)
	je	LBB0_1
## %bb.3:
	movq	%rsi, %rax
	movl	(%rdi), %esi
	movl	4(%rdi), %edx
	cmpl	%edx, %esi
	jae	LBB0_4
## %bb.5:
	movq	%rsi, %rcx
	shlq	$2, %rcx
	addq	8(%rdi), %rcx
	movq	%rcx, (%rax)
	leal	1(%rsi), %eax
	movl	%eax, (%rdi)
	xorl	%ebx, %ebx
	jmp	LBB0_6
LBB0_1:
	leaq	L_.str(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_DRM_ERROR
	jmp	LBB0_2
LBB0_4:
	leaq	L_.str.1(%rip), %rdi
	xorl	%ebx, %ebx
                                        ## kill: def $esi killed $esi killed $rsi
	xorl	%eax, %eax
	callq	_DRM_ERROR
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_6:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"No relocation chunk !\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"Relocs at %d after relocations chunk end %d !\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_r600_dma_cs_next_reloc         ; -- Begin function r600_dma_cs_next_reloc
	.p2align	2
_r600_dma_cs_next_reloc:                ; @r600_dma_cs_next_reloc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #32
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	str	xzr, [x1]
	ldr	x8, [x0, #16]
	cbz	x8, LBB0_3
; %bb.1:
	ldp	w9, w8, [x0]
	cmp	w9, w8
	b.hs	LBB0_4
; %bb.2:
	mov	w8, #0
	ldr	x10, [x0, #8]
	add	x10, x10, x9, lsl #2
	str	x10, [x1]
	add	w9, w9, #1
	str	w9, [x0]
	b	LBB0_6
LBB0_3:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_5
LBB0_4:
	stp	x9, x8, [sp]
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_5:
	bl	_DRM_ERROR
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w8, w8
LBB0_6:
	mov	x0, x8
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #32
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No relocation chunk !\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"Relocs at %d after relocations chunk end %d !\n"

.subsections_via_symbols
