	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_r600_cs_parse                  ## -- Begin function r600_cs_parse
	.p2align	4, 0x90
_r600_cs_parse:                         ## @r600_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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	cmpq	$0, (%rdi)
	jne	LBB0_10
## %bb.1:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$12, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_2
## %bb.4:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_r600_cs_track_init
	movq	40(%r15), %rax
	movq	(%rax), %rcx
	movq	_CHIP_RV770@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jge	LBB0_6
## %bb.5:
	leaq	20(%rax), %rcx
	movl	28(%rax), %edx
	movl	%edx, 8(%rbx)
	movl	24(%rax), %eax
	jmp	LBB0_8
LBB0_2:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_6:
	movq	_CHIP_RV740@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jg	LBB0_9
## %bb.7:
	leaq	8(%rax), %rcx
	movl	16(%rax), %edx
	movl	%edx, 8(%rbx)
	movl	12(%rax), %eax
LBB0_8:
	movl	%eax, 4(%rbx)
	movl	(%rcx), %eax
	movl	%eax, (%rbx)
LBB0_9:
	movq	%rbx, (%r15)
LBB0_10:
	movl	24(%r15), %edx
	leaq	-40(%rbp), %r14
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_22:                                ##   in Loop: Header=BB0_11 Depth=1
	movq	32(%r15), %rax
	cmpl	(%rax), %edx
	jge	LBB0_23
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_radeon_cs_packet_parse
	testl	%eax, %eax
	jne	LBB0_12
## %bb.14:                              ##   in Loop: Header=BB0_11 Depth=1
	movl	-32(%rbp), %eax
	movl	24(%r15), %ecx
	leal	(%rax,%rcx), %edx
	addl	$2, %edx
	movl	%edx, 24(%r15)
	movl	-40(%rbp), %esi
	cmpl	$128, %esi
	je	LBB0_19
## %bb.15:                              ##   in Loop: Header=BB0_11 Depth=1
	cmpl	$129, %esi
	je	LBB0_22
## %bb.16:                              ##   in Loop: Header=BB0_11 Depth=1
	cmpl	$130, %esi
	jne	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_r600_cs_parse_packet0
	jmp	LBB0_20
	.p2align	4, 0x90
LBB0_19:                                ##   in Loop: Header=BB0_11 Depth=1
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_r600_packet3_check
LBB0_20:                                ##   in Loop: Header=BB0_11 Depth=1
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_13
## %bb.21:                              ##   in Loop: Header=BB0_11 Depth=1
	movl	24(%r15), %edx
	jmp	LBB0_22
LBB0_12:
	movl	%eax, %ebx
LBB0_13:
	movq	(%r15), %rdi
	callq	_kfree
	movq	$0, (%r15)
	jmp	LBB0_24
LBB0_23:
	movq	(%r15), %rdi
	callq	_kfree
	movq	$0, (%r15)
	xorl	%ebx, %ebx
	jmp	LBB0_24
LBB0_18:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
	movq	(%r15), %rdi
	callq	_kfree
	movq	$0, (%r15)
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_3:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_24:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_CHIP_RV770,8,3                 ## @CHIP_RV770
	.comm	_CHIP_RV740,8,3                 ## @CHIP_RV740
	.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	_r600_cs_parse                  ; -- Begin function r600_cs_parse
	.p2align	2
_r600_cs_parse:                         ; @r600_cs_parse
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	x8, [x0]
	cbnz	x8, LBB0_9
; %bb.1:
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #12
	bl	_kzalloc
	cbz	x0, LBB0_4
; %bb.2:
	mov	x20, x0
	bl	_r600_cs_track_init
	ldr	x8, [x19, #40]
	ldr	x9, [x8]
Lloh3:
	adrp	x10, _CHIP_RV770@GOTPAGE
Lloh4:
	ldr	x10, [x10, _CHIP_RV770@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ge	LBB0_5
; %bb.3:
	add	x9, x8, #20
	ldr	d0, [x8, #24]
	b	LBB0_7
LBB0_4:
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_23
LBB0_5:
Lloh8:
	adrp	x10, _CHIP_RV740@GOTPAGE
Lloh9:
	ldr	x10, [x10, _CHIP_RV740@GOTPAGEOFF]
Lloh10:
	ldr	x10, [x10]
	cmp	x9, x10
	b.gt	LBB0_8
; %bb.6:
	add	x9, x8, #8
	ldur	d0, [x8, #12]
LBB0_7:
	stur	d0, [x20, #4]
	ldr	w8, [x9]
	str	w8, [x20]
LBB0_8:
	str	x20, [x19]
LBB0_9:
	ldr	w2, [x19, #24]
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	ldr	x8, [x19, #32]
	ldr	w8, [x8]
	cmp	w2, w8
	b.ge	LBB0_20
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	mov	x1, sp
	mov	x0, x19
	bl	_radeon_cs_packet_parse
	cbnz	w0, LBB0_18
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	w8, [x19, #24]
	ldr	w9, [sp, #8]
	ldr	w1, [sp]
	add	w8, w9, w8
	add	w2, w8, #2
	str	w2, [x19, #24]
	cmp	w1, #128
	b.eq	LBB0_16
; %bb.13:                               ;   in Loop: Header=BB0_11 Depth=1
	cmp	w1, #129
	b.eq	LBB0_10
; %bb.14:                               ;   in Loop: Header=BB0_11 Depth=1
	cmp	w1, #130
	b.ne	LBB0_22
; %bb.15:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	x1, sp
	mov	x0, x19
	bl	_r600_cs_parse_packet0
	mov	x20, x0
	cbz	w0, LBB0_17
	b	LBB0_19
LBB0_16:                                ;   in Loop: Header=BB0_11 Depth=1
	mov	x1, sp
	mov	x0, x19
	bl	_r600_packet3_check
	mov	x20, x0
	cbnz	w0, LBB0_19
LBB0_17:                                ;   in Loop: Header=BB0_11 Depth=1
	ldr	w2, [x19, #24]
	b	LBB0_10
LBB0_18:
	mov	x20, x0
LBB0_19:
	ldr	x0, [x19]
	bl	_kfree
	b	LBB0_21
LBB0_20:
	ldr	x0, [x19]
	bl	_kfree
	mov	w20, #0
LBB0_21:
	str	xzr, [x19]
	b	LBB0_24
LBB0_22:
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
	ldr	x0, [x19]
	bl	_kfree
	str	xzr, [x19]
Lloh13:
	adrp	x8, _EINVAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_23:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_24:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, 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_RV770,8,3                 ; @CHIP_RV770
	.comm	_CHIP_RV740,8,3                 ; @CHIP_RV740
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unknown packet type %d !\n"

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