	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_r100_cs_parse                  ## -- Begin function r100_cs_parse
	.p2align	4, 0x90
_r100_cs_parse:                         ## @r100_cs_parse
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$4, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %r14
	movq	8(%rbx), %rdi
	movq	%rax, %rsi
	callq	_r100_cs_track_clear
	movq	%r14, 32(%rbx)
	movl	16(%rbx), %edx
	leaq	-56(%rbp), %r14
	movq	_CHIP_R200@GOTPCREL(%rip), %r13
	movq	_r100_packet0_check@GOTPCREL(%rip), %r15
	movq	_r200_packet0_check@GOTPCREL(%rip), %r12
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_r100_packet3_check
	testl	%eax, %eax
	je	LBB0_15
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_radeon_cs_packet_parse
	testl	%eax, %eax
	jne	LBB0_18
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	-48(%rbp), %eax
	movl	16(%rbx), %ecx
	leal	(%rax,%rcx), %edx
	addl	$2, %edx
	movl	%edx, 16(%rbx)
	movl	-56(%rbp), %esi
	cmpl	$128, %esi
	je	LBB0_10
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpl	$129, %esi
	je	LBB0_16
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpl	$130, %esi
	jne	LBB0_11
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	8(%rbx), %rax
	movl	8(%rax), %esi
	movl	(%rax), %ecx
	movl	4(%rax), %edx
	cmpl	(%r13), %esi
	jge	LBB0_9
## %bb.12:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movq	%r15, %r8
	jmp	LBB0_13
LBB0_9:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movq	%r12, %r8
LBB0_13:                                ##   in Loop: Header=BB0_4 Depth=1
	callq	_r100_cs_parse_packet0
	testl	%eax, %eax
	jne	LBB0_18
LBB0_15:                                ##   in Loop: Header=BB0_4 Depth=1
	movl	16(%rbx), %edx
LBB0_16:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	(%rbx), %rax
	movq	24(%rbx), %rcx
	cmpl	(%rcx,%rax,4), %edx
	jl	LBB0_4
## %bb.17:
	xorl	%eax, %eax
	jmp	LBB0_18
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_18:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_CHIP_R200,4,2                  ## @CHIP_R200
	.comm	_r200_packet0_check,4,2         ## @r200_packet0_check
	.comm	_r100_packet0_check,4,2         ## @r100_packet0_check
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unknown packet type %d !\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_r100_cs_parse                  ; -- Begin function r100_cs_parse
	.p2align	2
_r100_cs_parse:                         ; @r100_cs_parse
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #4
	bl	_kzalloc
	cbz	x0, LBB0_14
; %bb.1:
	mov	x20, x0
	ldr	x0, [x19, #8]
	mov	x1, x20
	bl	_r100_cs_track_clear
	str	x20, [x19, #32]
	ldr	w2, [x19, #16]
Lloh3:
	adrp	x22, _CHIP_R200@GOTPAGE
Lloh4:
	ldr	x22, [x22, _CHIP_R200@GOTPAGEOFF]
Lloh5:
	adrp	x20, _r100_packet0_check@GOTPAGE
Lloh6:
	ldr	x20, [x20, _r100_packet0_check@GOTPAGEOFF]
Lloh7:
	adrp	x21, _r200_packet0_check@GOTPAGE
Lloh8:
	ldr	x21, [x21, _r200_packet0_check@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x1, sp
	mov	x0, x19
	bl	_r100_packet3_check
	cbz	w0, LBB0_11
	b	LBB0_16
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x1, sp
	mov	x0, x19
	bl	_radeon_cs_packet_parse
	cbnz	w0, LBB0_16
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x19, #16]
	ldr	w9, [sp, #8]
	ldr	w1, [sp]
	add	w8, w9, w8
	add	w2, w8, #2
	str	w2, [x19, #16]
	cmp	w1, #128
	b.eq	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	w1, #129
	b.eq	LBB0_12
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	w1, #130
	b.ne	LBB0_17
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x19, #8]
	ldp	w2, w9, [x8, #4]
	ldr	w10, [x22]
	ldr	w3, [x8]
	mov	x1, sp
	mov	x0, x19
	cmp	w9, w10
	b.ge	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x4, x20
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x4, x21
LBB0_10:                                ;   in Loop: Header=BB0_3 Depth=1
	bl	_r100_cs_parse_packet0
	cbnz	w0, LBB0_16
LBB0_11:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w2, [x19, #16]
LBB0_12:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x19, #24]
	ldr	x9, [x19]
	ldr	w8, [x8, x9, lsl #2]
	cmp	w2, w8
	b.lt	LBB0_3
; %bb.13:
	mov	w0, #0
	b	LBB0_16
LBB0_14:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_15:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_16:
	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_17:
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
Lloh13:
	adrp	x8, _EINVAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_15
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_CHIP_R200,4,2                  ; @CHIP_R200
	.comm	_r200_packet0_check,4,2         ; @r200_packet0_check
	.comm	_r100_packet0_check,4,2         ; @r100_packet0_check
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unknown packet type %d !\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
