	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function prune_invalid_states
_prune_invalid_states:                  ## @prune_invalid_states
	.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	%rdx, %r14
	movq	%rdi, %r15
	movq	8(%rdx), %rdi
	xorl	%esi, %esi
	callq	_STATE_TEXTURESTAGE
	movl	%eax, %ebx
	movq	_MAX_TEXTURES@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	decq	%rdi
	movq	_WINED3D_HIGHEST_TEXTURE_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_STATE_TEXTURESTAGE
	cmpl	%eax, %ebx
	ja	LBB0_3
## %bb.1:
	movq	_state_undefined@GOTPCREL(%rip), %rcx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edx
	shlq	$4, %rdx
	movq	$0, 8(%r15,%rdx)
	movq	(%rcx), %rsi
	movq	%rsi, (%r15,%rdx)
	incl	%ebx
	cmpl	%eax, %ebx
	jbe	LBB0_2
LBB0_3:
	movq	_WINED3D_TS_TEXTURE0@GOTPCREL(%rip), %r13
	movq	8(%r14), %rdi
	addq	(%r13), %rdi
	callq	_STATE_TRANSFORM
	movl	%eax, %ebx
	movq	(%r13), %rax
	movq	(%r12), %rcx
	leaq	(%rax,%rcx), %rdi
	decq	%rdi
	callq	_STATE_TRANSFORM
	cmpl	%eax, %ebx
	ja	LBB0_6
## %bb.4:
	movq	_state_undefined@GOTPCREL(%rip), %rcx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edx
	shlq	$4, %rdx
	movq	$0, 8(%r15,%rdx)
	movq	(%rcx), %rsi
	movq	%rsi, (%r15,%rdx)
	incl	%ebx
	cmpl	%eax, %ebx
	jbe	LBB0_5
LBB0_6:
	movl	(%r14), %edi
	callq	_WINED3D_TS_WORLD_MATRIX
	movq	%rax, %rdi
	callq	_STATE_TRANSFORM
	movl	%eax, %ebx
	movl	$255, %edi
	callq	_WINED3D_TS_WORLD_MATRIX
	movq	%rax, %rdi
	callq	_STATE_TRANSFORM
	cmpl	%eax, %ebx
	ja	LBB0_9
## %bb.7:
	movq	_state_undefined@GOTPCREL(%rip), %rcx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edx
	shlq	$4, %rdx
	movq	$0, 8(%r15,%rdx)
	movq	(%rcx), %rsi
	movq	%rsi, (%r15,%rdx)
	incl	%ebx
	cmpl	%eax, %ebx
	jbe	LBB0_8
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_TEXTURES,8,3               ## @MAX_TEXTURES
	.comm	_WINED3D_HIGHEST_TEXTURE_STATE,4,2 ## @WINED3D_HIGHEST_TEXTURE_STATE
	.comm	_state_undefined,8,3            ## @state_undefined
	.comm	_WINED3D_TS_TEXTURE0,8,3        ## @WINED3D_TS_TEXTURE0
	.no_dead_strip	_prune_invalid_states
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function prune_invalid_states
_prune_invalid_states:                  ; @prune_invalid_states
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x2
	mov	x19, x0
	ldr	x0, [x2, #8]
	mov	w1, #0
	bl	_STATE_TEXTURESTAGE
	mov	x21, x0
Lloh0:
	adrp	x22, _MAX_TEXTURES@GOTPAGE
Lloh1:
	ldr	x22, [x22, _MAX_TEXTURES@GOTPAGEOFF]
	ldr	x8, [x22]
	sub	x0, x8, #1
Lloh2:
	adrp	x8, _WINED3D_HIGHEST_TEXTURE_STATE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _WINED3D_HIGHEST_TEXTURE_STATE@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	bl	_STATE_TEXTURESTAGE
	cmp	w21, w0
	b.hi	LBB0_11
; %bb.1:
	add	w10, w21, #1
	add	w11, w0, #1
	cmp	w10, w11
	csinc	w8, w10, w0, hi
	sub	w9, w8, w21
Lloh5:
	adrp	x8, _state_undefined@GOTPAGE
Lloh6:
	ldr	x8, [x8, _state_undefined@GOTPAGEOFF]
	cmp	w9, #8
	b.hs	LBB0_3
; %bb.2:
	mov	x10, x21
	b	LBB0_10
LBB0_3:
	cmp	w10, w11
	csinc	w10, w10, w0, hi
	sub	w10, w10, #1
	cmp	w10, w21
	b.hs	LBB0_5
; %bb.4:
	mov	x10, x21
	b	LBB0_10
LBB0_5:
	mov	w10, w21
	add	x11, x19, w21, uxtw #4
	add	w12, w21, #1
	add	w13, w0, #1
	cmp	w12, w13
	csinc	w12, w12, w0, hi
	mvn	w13, w21
	add	w12, w12, w13
	add	x10, x10, x12
	add	x10, x19, x10, lsl #4
	add	x10, x10, #8
	cmp	x10, x8
	add	x10, x8, #8
	ccmp	x11, x10, #2, hi
	b.lo	LBB0_9
; %bb.6:
	and	w11, w9, #0xfffffff8
	add	w10, w21, w11
	movi.2d	v1, #0000000000000000
	mov	x12, x11
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	add	w13, w21, #2
	ld1r.2d	{ v0 }, [x8]
	add	w14, w21, #4
	add	x15, x19, w21, uxtw #4
	st2.2d	{ v0, v1 }, [x15]
	add	w15, w21, #6
	add	x13, x19, w13, uxtw #4
	st2.2d	{ v0, v1 }, [x13]
	add	x13, x19, w14, uxtw #4
	add	x14, x19, w15, uxtw #4
	st2.2d	{ v0, v1 }, [x13]
	st2.2d	{ v0, v1 }, [x14]
	add	w21, w21, #8
	subs	w12, w12, #8
	b.ne	LBB0_7
; %bb.8:
	cmp	w9, w11
	b.ne	LBB0_10
	b	LBB0_11
LBB0_9:
	mov	x10, x21
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	add	x9, x19, w10, uxtw #4
	ldr	x11, [x8]
	stp	x11, xzr, [x9]
	add	w10, w10, #1
	cmp	w10, w0
	b.ls	LBB0_10
LBB0_11:
Lloh7:
	adrp	x23, _WINED3D_TS_TEXTURE0@GOTPAGE
Lloh8:
	ldr	x23, [x23, _WINED3D_TS_TEXTURE0@GOTPAGEOFF]
	ldr	x8, [x23]
	ldr	x9, [x20, #8]
	add	x0, x9, x8
	bl	_STATE_TRANSFORM
	mov	x21, x0
	ldr	x8, [x23]
	ldr	x9, [x22]
	add	x8, x8, x9
	sub	x0, x8, #1
	bl	_STATE_TRANSFORM
	cmp	w21, w0
	b.hi	LBB0_21
; %bb.12:
	add	w9, w21, #1
	add	w10, w0, #1
	cmp	w9, w10
	csinc	w8, w9, w0, hi
	sub	w8, w8, w21
	cmp	w8, #8
	b.lo	LBB0_18
; %bb.13:
	cmp	w9, w10
	csinc	w9, w9, w0, hi
	sub	w9, w9, #1
	cmp	w9, w21
	b.lo	LBB0_18
; %bb.14:
	mov	w9, w21
	add	x11, x19, w21, uxtw #4
	add	w10, w21, #1
	add	w12, w0, #1
	cmp	w10, w12
	csinc	w10, w10, w0, hi
	mvn	w12, w21
	add	w10, w10, w12
	add	x9, x9, x10
	add	x9, x19, x9, lsl #4
	add	x9, x9, #8
Lloh9:
	adrp	x10, _state_undefined@GOTPAGE
Lloh10:
	ldr	x10, [x10, _state_undefined@GOTPAGEOFF]
	cmp	x9, x10
	add	x9, x10, #8
	ccmp	x11, x9, #2, hi
	b.lo	LBB0_18
; %bb.15:
	and	w11, w8, #0xfffffff8
	add	w9, w21, w11
	movi.2d	v1, #0000000000000000
	mov	x12, x11
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	add	w13, w21, #2
	ld1r.2d	{ v0 }, [x10]
	add	w14, w21, #4
	add	x15, x19, w21, uxtw #4
	st2.2d	{ v0, v1 }, [x15]
	add	w15, w21, #6
	add	x13, x19, w13, uxtw #4
	st2.2d	{ v0, v1 }, [x13]
	add	x13, x19, w14, uxtw #4
	add	x14, x19, w15, uxtw #4
	st2.2d	{ v0, v1 }, [x13]
	st2.2d	{ v0, v1 }, [x14]
	add	w21, w21, #8
	subs	w12, w12, #8
	b.ne	LBB0_16
; %bb.17:
	cmp	w8, w11
	b.ne	LBB0_19
	b	LBB0_21
LBB0_18:
	mov	x9, x21
LBB0_19:
Lloh11:
	adrp	x8, _state_undefined@GOTPAGE
Lloh12:
	ldr	x8, [x8, _state_undefined@GOTPAGEOFF]
LBB0_20:                                ; =>This Inner Loop Header: Depth=1
	add	x10, x19, w9, uxtw #4
	ldr	x11, [x8]
	stp	x11, xzr, [x10]
	add	w9, w9, #1
	cmp	w9, w0
	b.ls	LBB0_20
LBB0_21:
	ldr	w0, [x20]
	bl	_WINED3D_TS_WORLD_MATRIX
	bl	_STATE_TRANSFORM
	mov	x20, x0
	mov	w0, #255
	bl	_WINED3D_TS_WORLD_MATRIX
	bl	_STATE_TRANSFORM
	cmp	w20, w0
	b.hi	LBB0_31
; %bb.22:
	add	w9, w20, #1
	add	w10, w0, #1
	cmp	w9, w10
	csinc	w8, w9, w0, hi
	sub	w8, w8, w20
	cmp	w8, #8
	b.lo	LBB0_28
; %bb.23:
	cmp	w9, w10
	csinc	w9, w9, w0, hi
	sub	w9, w9, #1
	cmp	w9, w20
	b.lo	LBB0_28
; %bb.24:
	mov	w9, w20
	add	x11, x19, w20, uxtw #4
	add	w10, w20, #1
	add	w12, w0, #1
	cmp	w10, w12
	csinc	w10, w10, w0, hi
	mvn	w12, w20
	add	w10, w10, w12
	add	x9, x9, x10
	add	x9, x19, x9, lsl #4
	add	x9, x9, #8
Lloh13:
	adrp	x10, _state_undefined@GOTPAGE
Lloh14:
	ldr	x10, [x10, _state_undefined@GOTPAGEOFF]
	cmp	x9, x10
	add	x9, x10, #8
	ccmp	x11, x9, #2, hi
	b.lo	LBB0_28
; %bb.25:
	and	w11, w8, #0xfffffff8
	add	w9, w20, w11
	movi.2d	v1, #0000000000000000
	mov	x12, x11
LBB0_26:                                ; =>This Inner Loop Header: Depth=1
	add	w13, w20, #2
	ld1r.2d	{ v0 }, [x10]
	add	w14, w20, #4
	add	x15, x19, w20, uxtw #4
	st2.2d	{ v0, v1 }, [x15]
	add	w15, w20, #6
	add	x13, x19, w13, uxtw #4
	st2.2d	{ v0, v1 }, [x13]
	add	x13, x19, w14, uxtw #4
	add	x14, x19, w15, uxtw #4
	st2.2d	{ v0, v1 }, [x13]
	st2.2d	{ v0, v1 }, [x14]
	add	w20, w20, #8
	subs	w12, w12, #8
	b.ne	LBB0_26
; %bb.27:
	cmp	w8, w11
	b.ne	LBB0_29
	b	LBB0_31
LBB0_28:
	mov	x9, x20
LBB0_29:
Lloh15:
	adrp	x8, _state_undefined@GOTPAGE
Lloh16:
	ldr	x8, [x8, _state_undefined@GOTPAGEOFF]
LBB0_30:                                ; =>This Inner Loop Header: Depth=1
	add	x10, x19, w9, uxtw #4
	ldr	x11, [x8]
	stp	x11, xzr, [x10]
	add	w9, w9, #1
	cmp	w9, w0
	b.ls	LBB0_30
LBB0_31:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_TEXTURES,8,3               ; @MAX_TEXTURES
	.comm	_WINED3D_HIGHEST_TEXTURE_STATE,4,2 ; @WINED3D_HIGHEST_TEXTURE_STATE
	.comm	_state_undefined,8,3            ; @state_undefined
	.comm	_WINED3D_TS_TEXTURE0,8,3        ; @WINED3D_TS_TEXTURE0
	.no_dead_strip	_prune_invalid_states
.subsections_via_symbols
