	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function radeon_cs_ib_chunk
_radeon_cs_ib_chunk:                    ## @radeon_cs_ib_chunk
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%r14d, %r14d
	cmpq	$0, 32(%rsi)
	je	LBB0_15
## %bb.1:
	movq	%rsi, %rbx
	movq	_RADEON_CS_USE_VM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rsi)
	jne	LBB0_15
## %bb.2:
	movq	%rdi, %r15
	movq	8(%rbx), %rsi
	movq	%rbx, %rdx
	callq	_radeon_cs_parse
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	cmpq	$0, 24(%rbx)
	je	LBB0_5
LBB0_4:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_ERROR
LBB0_15:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	%rbx, %rdi
	callq	_radeon_cs_sync_rings
	testl	%eax, %eax
	je	LBB0_8
## %bb.6:
	movl	%eax, %r14d
	movq	_ERESTARTSYS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%r14d, %eax
	je	LBB0_15
## %bb.7:
	leaq	L_.str.1(%rip), %rdi
	movl	%r14d, %esi
	xorl	%eax, %eax
	callq	_DRM_ERROR
	jmp	LBB0_15
LBB0_8:
	movq	8(%rbx), %rax
	movq	_R600_RING_TYPE_UVD_INDEX@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
## %bb.9:
	movq	%r15, %rdi
	callq	_radeon_uvd_note_usage
	jmp	LBB0_13
LBB0_10:
	movq	_TN_RING_TYPE_VCE1_INDEX@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_12
## %bb.11:
	movq	_TN_RING_TYPE_VCE2_INDEX@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_13
LBB0_12:
	movq	%r15, %rdi
	callq	_radeon_vce_note_usage
LBB0_13:
	addq	$16, %rbx
	xorl	%r14d, %r14d
	movq	%r15, %rdi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	movl	$1, %ecx
	callq	_radeon_ib_schedule
	testl	%eax, %eax
	je	LBB0_15
## %bb.14:
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_ERROR
	movl	%ebx, %r14d
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_RADEON_CS_USE_VM,4,2           ## @RADEON_CS_USE_VM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid command stream !\n"

	.comm	_ERESTARTSYS,4,2                ## @ERESTARTSYS
L_.str.1:                               ## @.str.1
	.asciz	"Failed to sync rings: %i\n"

	.comm	_R600_RING_TYPE_UVD_INDEX,8,3   ## @R600_RING_TYPE_UVD_INDEX
	.comm	_TN_RING_TYPE_VCE1_INDEX,8,3    ## @TN_RING_TYPE_VCE1_INDEX
	.comm	_TN_RING_TYPE_VCE2_INDEX,8,3    ## @TN_RING_TYPE_VCE2_INDEX
L_.str.2:                               ## @.str.2
	.asciz	"Failed to schedule IB !\n"

	.no_dead_strip	_radeon_cs_ib_chunk
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function radeon_cs_ib_chunk
_radeon_cs_ib_chunk:                    ; @radeon_cs_ib_chunk
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	ldr	x8, [x1, #32]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x20, x1
	ldr	w8, [x1]
Lloh0:
	adrp	x9, _RADEON_CS_USE_VM@GOTPAGE
Lloh1:
	ldr	x9, [x9, _RADEON_CS_USE_VM@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
LBB0_2:
	mov	w21, #0
	b	LBB0_7
LBB0_3:
	mov	x19, x0
	ldr	x1, [x20, #8]
	mov	x2, x20
	bl	_radeon_cs_parse
	mov	x21, x0
	cbnz	w0, LBB0_5
; %bb.4:
	ldr	x8, [x20, #24]
	cbz	x8, LBB0_8
LBB0_5:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
LBB0_6:
	bl	_DRM_ERROR
LBB0_7:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_8:
	mov	x0, x20
	bl	_radeon_cs_sync_rings
	cbz	w0, LBB0_11
; %bb.9:
	mov	x21, x0
Lloh5:
	adrp	x8, _ERESTARTSYS@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ERESTARTSYS@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmn	w0, w8
	b.eq	LBB0_7
; %bb.10:
	str	x21, [sp]
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_6
LBB0_11:
	ldr	x8, [x20, #8]
Lloh10:
	adrp	x9, _R600_RING_TYPE_UVD_INDEX@GOTPAGE
Lloh11:
	ldr	x9, [x9, _R600_RING_TYPE_UVD_INDEX@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_13
; %bb.12:
	mov	x0, x19
	bl	_radeon_uvd_note_usage
	b	LBB0_15
LBB0_13:
Lloh13:
	adrp	x9, _TN_RING_TYPE_VCE1_INDEX@GOTPAGE
Lloh14:
	ldr	x9, [x9, _TN_RING_TYPE_VCE1_INDEX@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
Lloh16:
	adrp	x10, _TN_RING_TYPE_VCE2_INDEX@GOTPAGE
Lloh17:
	ldr	x10, [x10, _TN_RING_TYPE_VCE2_INDEX@GOTPAGEOFF]
Lloh18:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_15
; %bb.14:
	mov	x0, x19
	bl	_radeon_vce_note_usage
LBB0_15:
	add	x1, x20, #16
	mov	x0, x19
	mov	x2, #0
	mov	w3, #1
	bl	_radeon_ib_schedule
	mov	x21, x0
	cbz	w0, LBB0_7
; %bb.16:
Lloh19:
	adrp	x0, l_.str.2@PAGE
Lloh20:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_RADEON_CS_USE_VM,4,2           ; @RADEON_CS_USE_VM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid command stream !\n"

	.comm	_ERESTARTSYS,4,2                ; @ERESTARTSYS
l_.str.1:                               ; @.str.1
	.asciz	"Failed to sync rings: %i\n"

	.comm	_R600_RING_TYPE_UVD_INDEX,8,3   ; @R600_RING_TYPE_UVD_INDEX
	.comm	_TN_RING_TYPE_VCE1_INDEX,8,3    ; @TN_RING_TYPE_VCE1_INDEX
	.comm	_TN_RING_TYPE_VCE2_INDEX,8,3    ; @TN_RING_TYPE_VCE2_INDEX
l_.str.2:                               ; @.str.2
	.asciz	"Failed to schedule IB !\n"

	.no_dead_strip	_radeon_cs_ib_chunk
.subsections_via_symbols
