	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function r300_packet3_check
_r300_packet3_check:                    ## @r300_packet3_check
	.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
	movq	%rsi, %r12
	movl	4(%rsi), %esi
	leal	-128(%rsi), %eax
	cmpl	$11, %eax
	ja	LBB0_9
## %bb.1:
	movq	%rdi, %r14
	movq	16(%rdi), %r15
	movl	(%r12), %ebx
	leal	1(%rbx), %r13d
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_2:
	movq	%r14, %rdi
	movl	%r13d, %esi
	jmp	LBB0_4
LBB0_3:
	addl	$2, %ebx
	movq	%r14, %rdi
	movl	%ebx, %esi
LBB0_4:
	callq	_radeon_get_ib_value
	movl	%eax, (%r15)
LBB0_5:
	movq	8(%r14), %rdi
	movq	%r15, %rsi
	callq	_r100_cs_track_check
LBB0_6:
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_23
	jmp	LBB0_8
LBB0_7:
	movq	8(%r14), %rax
	movl	4(%rax), %eax
	cmpl	(%r14), %eax
	jne	LBB0_19
LBB0_8:
	xorl	%r15d, %r15d
	jmp	LBB0_23
LBB0_9:
	leaq	L_.str.2(%rip), %rdi
	xorl	%r15d, %r15d
                                        ## kill: def $esi killed $esi killed $rsi
	xorl	%eax, %eax
	callq	_DRM_ERROR
	jmp	LBB0_21
LBB0_10:
	movq	24(%r14), %r13
	leaq	-48(%rbp), %rsi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_radeon_cs_packet_next_reloc
	testl	%eax, %eax
	je	LBB0_24
## %bb.11:
	movl	%eax, %r15d
	movl	4(%r12), %esi
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_ERROR
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_radeon_cs_dump_packet
	jmp	LBB0_23
LBB0_12:
	movq	%r14, %rdi
	movq	%r12, %rsi
	movl	%r13d, %edx
	callq	_r100_packet3_load_vbpntr
	jmp	LBB0_6
LBB0_13:
	movq	%r14, %rdi
	movl	%r13d, %esi
	callq	_radeon_get_ib_value
	notl	%eax
	testb	$48, %al
	jne	LBB0_20
## %bb.14:
	movq	%r14, %rdi
	movl	%r13d, %esi
	callq	_radeon_get_ib_value
	movl	%eax, (%r15)
	movl	8(%r12), %eax
	jmp	LBB0_17
LBB0_15:
	addl	$2, %ebx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_radeon_get_ib_value
	notl	%eax
	testb	$48, %al
	jne	LBB0_20
## %bb.16:
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_radeon_get_ib_value
	movl	%eax, (%r15)
	movl	8(%r12), %eax
	decl	%eax
LBB0_17:
	movl	%eax, 4(%r15)
	jmp	LBB0_5
LBB0_18:
	movq	8(%r14), %rax
	movl	(%rax), %eax
	cmpl	(%r14), %eax
	je	LBB0_8
LBB0_19:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	jmp	LBB0_22
LBB0_20:
	leaq	L_.str.1(%rip), %rdi
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_DRM_ERROR
LBB0_21:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_22:
	subl	(%rax), %r15d
LBB0_23:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_24:
	addl	$2, %ebx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_radeon_get_ib_value
	movq	-48(%rbp), %rcx
	addl	4(%rcx), %eax
	movl	%eax, (%r13,%rbx,4)
	movl	(%rcx), %edx
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_r100_cs_track_check_pkt3_indx_buffer
	jmp	LBB0_6
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_13, LBB0_13-LJTI0_0
.set L0_0_set_15, LBB0_15-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_18, LBB0_18-LJTI0_0
LJTI0_0:
	.long	L0_0_set_8
	.long	L0_0_set_10
	.long	L0_0_set_12
	.long	L0_0_set_2
	.long	L0_0_set_3
	.long	L0_0_set_2
	.long	L0_0_set_3
	.long	L0_0_set_13
	.long	L0_0_set_15
	.long	L0_0_set_7
	.long	L0_0_set_7
	.long	L0_0_set_18
	.end_data_region
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"No reloc for packet3 %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"PRIM_WALK must be 3 for IMMD draw\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.2:                               ## @.str.2
	.asciz	"Packet3 opcode %x not supported\n"

	.no_dead_strip	_r300_packet3_check
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function r300_packet3_check
_r300_packet3_check:                    ; @r300_packet3_check
	.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
	ldr	w9, [x1, #4]
	sub	w8, w9, #128
	cmp	w8, #11
	b.hi	LBB0_8
; %bb.1:
	mov	x21, x1
	mov	x19, x0
	ldr	w23, [x1]
	add	w22, w23, #1
	ldr	x20, [x0, #16]
Lloh0:
	adrp	x9, lJTI0_0@PAGE
Lloh1:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
	mov	x0, x19
	mov	x1, x22
	b	LBB0_4
LBB0_3:
	add	w1, w23, #2
	mov	x0, x19
LBB0_4:
	bl	_radeon_get_ib_value
	str	w0, [x20]
LBB0_5:
	ldr	x0, [x19, #8]
	mov	x1, x20
	bl	_r100_cs_track_check
LBB0_6:
	mov	x20, x0
	cbnz	w0, LBB0_23
	b	LBB0_19
LBB0_7:
	ldr	x8, [x19, #8]
	ldr	w8, [x8, #4]
	b	LBB0_18
LBB0_8:
	str	x9, [sp]
Lloh2:
	adrp	x0, l_.str.2@PAGE
Lloh3:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_21
LBB0_9:
	ldr	x22, [x19, #24]
	add	x1, sp, #8
	mov	x0, x19
	mov	w2, #0
	bl	_radeon_cs_packet_next_reloc
	cbz	w0, LBB0_24
; %bb.10:
	mov	x20, x0
	ldr	w8, [x21, #4]
	str	x8, [sp]
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
	mov	x0, x19
	mov	x1, x21
	bl	_radeon_cs_dump_packet
	b	LBB0_23
LBB0_11:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x22
	bl	_r100_packet3_load_vbpntr
	b	LBB0_6
LBB0_12:
	mov	x0, x19
	mov	x1, x22
	bl	_radeon_get_ib_value
	mvn	w8, w0
	tst	w8, #0x30
	b.ne	LBB0_20
; %bb.13:
	mov	x0, x19
	mov	x1, x22
	bl	_radeon_get_ib_value
	ldr	w8, [x21, #8]
	b	LBB0_16
LBB0_14:
	add	w22, w23, #2
	mov	x0, x19
	mov	x1, x22
	bl	_radeon_get_ib_value
	mvn	w8, w0
	tst	w8, #0x30
	b.ne	LBB0_20
; %bb.15:
	mov	x0, x19
	mov	x1, x22
	bl	_radeon_get_ib_value
	ldr	w8, [x21, #8]
	sub	w8, w8, #1
LBB0_16:
	stp	w0, w8, [x20]
	b	LBB0_5
LBB0_17:
	ldr	x8, [x19, #8]
	ldr	w8, [x8]
LBB0_18:
	ldr	w9, [x19]
	cmp	w8, w9
	b.ne	LBB0_22
LBB0_19:
	mov	w20, #0
	b	LBB0_23
LBB0_20:
Lloh6:
	adrp	x0, l_.str.1@PAGE
Lloh7:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_21:
	bl	_DRM_ERROR
LBB0_22:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_23:
	mov	x0, x20
	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_24:
	add	w20, w23, #2
	mov	x0, x19
	mov	x1, x20
	bl	_radeon_get_ib_value
	ldr	x8, [sp, #8]
	ldr	w9, [x8, #4]
	add	w9, w9, w0
	str	w9, [x22, w20, uxtw #2]
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x21
	bl	_r100_cs_track_check_pkt3_indx_buffer
	b	LBB0_6
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_19-LBB0_2)>>2
	.byte	(LBB0_9-LBB0_2)>>2
	.byte	(LBB0_11-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_12-LBB0_2)>>2
	.byte	(LBB0_14-LBB0_2)>>2
	.byte	(LBB0_7-LBB0_2)>>2
	.byte	(LBB0_7-LBB0_2)>>2
	.byte	(LBB0_17-LBB0_2)>>2
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No reloc for packet3 %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"PRIM_WALK must be 3 for IMMD draw\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.2:                               ; @.str.2
	.asciz	"Packet3 opcode %x not supported\n"

	.no_dead_strip	_r300_packet3_check
.subsections_via_symbols
