	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mga_verify_state
_mga_verify_state:                      ## @mga_verify_state
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	8(%rdi), %r15
	movl	(%r15), %r12d
	movq	_MGA_NR_SAREA_CLIPRECTS@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	%rax, 8(%r15)
	jle	LBB0_2
## %bb.1:
	movq	%rax, 8(%r15)
LBB0_2:
	movq	_MGA_UPLOAD_CONTEXT@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_3
## %bb.4:
	movq	%rbx, %rdi
	callq	_mga_verify_context
	movl	%eax, %r14d
	jmp	LBB0_5
LBB0_3:
	xorl	%r14d, %r14d
LBB0_5:
	movq	_MGA_UPLOAD_TEX0@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_7
## %bb.6:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_mga_verify_tex
	orl	%eax, %r14d
LBB0_7:
	movq	(%rbx), %rax
	movq	_MGA_CARD_TYPE_G400@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_8
## %bb.12:
	movq	_MGA_UPLOAD_PIPE@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_15
## %bb.13:
	movq	_MGA_MAX_G200_PIPES@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_8:
	movq	_MGA_UPLOAD_TEX1@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_10
## %bb.9:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_mga_verify_tex
	orl	%eax, %r14d
LBB0_10:
	movq	_MGA_UPLOAD_PIPE@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_15
## %bb.11:
	movq	_MGA_MAX_G400_PIPES@GOTPCREL(%rip), %rax
LBB0_14:
	movq	16(%r15), %rcx
	xorl	%edx, %edx
	cmpq	(%rax), %rcx
	setg	%dl
	orl	%edx, %r14d
LBB0_15:
	xorl	%eax, %eax
	testl	%r14d, %r14d
	sete	%al
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MGA_NR_SAREA_CLIPRECTS,8,3     ## @MGA_NR_SAREA_CLIPRECTS
	.comm	_MGA_UPLOAD_CONTEXT,4,2         ## @MGA_UPLOAD_CONTEXT
	.comm	_MGA_UPLOAD_TEX0,4,2            ## @MGA_UPLOAD_TEX0
	.comm	_MGA_CARD_TYPE_G400,8,3         ## @MGA_CARD_TYPE_G400
	.comm	_MGA_UPLOAD_TEX1,4,2            ## @MGA_UPLOAD_TEX1
	.comm	_MGA_UPLOAD_PIPE,4,2            ## @MGA_UPLOAD_PIPE
	.comm	_MGA_MAX_G400_PIPES,8,3         ## @MGA_MAX_G400_PIPES
	.comm	_MGA_MAX_G200_PIPES,8,3         ## @MGA_MAX_G200_PIPES
	.no_dead_strip	_mga_verify_state
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mga_verify_state
_mga_verify_state:                      ; @mga_verify_state
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x20, x0
	ldr	x21, [x0, #8]
	ldr	w22, [x21]
	ldr	x9, [x21, #8]
Lloh0:
	adrp	x8, _MGA_NR_SAREA_CLIPRECTS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MGA_NR_SAREA_CLIPRECTS@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x9, x8
	b.le	LBB0_2
; %bb.1:
	str	x8, [x21, #8]
LBB0_2:
Lloh3:
	adrp	x8, _MGA_UPLOAD_CONTEXT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MGA_UPLOAD_CONTEXT@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_4
; %bb.3:
	mov	x0, x20
	bl	_mga_verify_context
	mov	x19, x0
	b	LBB0_5
LBB0_4:
	mov	w19, #0
LBB0_5:
Lloh6:
	adrp	x8, _MGA_UPLOAD_TEX0@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MGA_UPLOAD_TEX0@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_7
; %bb.6:
	mov	x0, x20
	mov	w1, #0
	bl	_mga_verify_tex
	orr	w19, w0, w19
LBB0_7:
	ldr	x8, [x20]
Lloh9:
	adrp	x9, _MGA_CARD_TYPE_G400@GOTPAGE
Lloh10:
	ldr	x9, [x9, _MGA_CARD_TYPE_G400@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_10
; %bb.8:
Lloh12:
	adrp	x8, _MGA_UPLOAD_PIPE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MGA_UPLOAD_PIPE@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_15
; %bb.9:
Lloh15:
	adrp	x8, _MGA_MAX_G200_PIPES@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MGA_MAX_G200_PIPES@GOTPAGEOFF]
	b	LBB0_14
LBB0_10:
Lloh17:
	adrp	x8, _MGA_UPLOAD_TEX1@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MGA_UPLOAD_TEX1@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_12
; %bb.11:
	mov	x0, x20
	mov	w1, #1
	bl	_mga_verify_tex
	orr	w19, w0, w19
LBB0_12:
Lloh20:
	adrp	x8, _MGA_UPLOAD_PIPE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _MGA_UPLOAD_PIPE@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_15
; %bb.13:
Lloh23:
	adrp	x8, _MGA_MAX_G400_PIPES@GOTPAGE
Lloh24:
	ldr	x8, [x8, _MGA_MAX_G400_PIPES@GOTPAGEOFF]
LBB0_14:
	ldr	x9, [x21, #16]
	ldr	x8, [x8]
	cmp	x9, x8
	cset	w8, gt
	orr	w19, w19, w8
LBB0_15:
	cmp	w19, #0
	cset	w0, eq
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_MGA_NR_SAREA_CLIPRECTS,8,3     ; @MGA_NR_SAREA_CLIPRECTS
	.comm	_MGA_UPLOAD_CONTEXT,4,2         ; @MGA_UPLOAD_CONTEXT
	.comm	_MGA_UPLOAD_TEX0,4,2            ; @MGA_UPLOAD_TEX0
	.comm	_MGA_CARD_TYPE_G400,8,3         ; @MGA_CARD_TYPE_G400
	.comm	_MGA_UPLOAD_TEX1,4,2            ; @MGA_UPLOAD_TEX1
	.comm	_MGA_UPLOAD_PIPE,4,2            ; @MGA_UPLOAD_PIPE
	.comm	_MGA_MAX_G400_PIPES,8,3         ; @MGA_MAX_G400_PIPES
	.comm	_MGA_MAX_G200_PIPES,8,3         ; @MGA_MAX_G200_PIPES
	.no_dead_strip	_mga_verify_state
.subsections_via_symbols
