	.file	"extr_cs.c_wined3d_cs_exec_set_texture.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Searching for other stages the texture is bound to.\n"
	.align 8
.LC1:
	.string	"Texture is also bound to stage %u.\n"
	.text
	.p2align 4
	.type	wined3d_cs_exec_set_texture, @function
wined3d_cs_exec_set_texture:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, rsi
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdi
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	rax, QWORD PTR [rdi]
	mov	rdi, QWORD PTR [rsi]
	mov	rbp, QWORD PTR FALSE[rip]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR 8[rsp], rax
	mov	rax, QWORD PTR 8[rbx]
	lea	rsi, [rax+rdi*8]
	mov	rax, QWORD PTR 8[r15]
	mov	r12, QWORD PTR [rsi]
	mov	QWORD PTR [rsi], rax
	test	rax, rax
	je	.L2
	lea	rdi, 28[rax]
	test	r12, r12
	je	.L3
	mov	r14, QWORD PTR 32[rax]
	mov	ecx, DWORD PTR 24[r12]
	mov	eax, DWORD PTR 24[rax]
	mov	r13, QWORD PTR 32[r12]
	mov	DWORD PTR 16[rsp], ecx
	mov	DWORD PTR 20[rsp], eax
	call	InterlockedIncrement@PLT
	cmp	eax, 1
	mov	rax, QWORD PTR 8[r15]
	je	.L4
	mov	rdx, QWORD PTR 8[r12]
	cmp	QWORD PTR 8[rax], rdx
	je	.L44
.L5:
	mov	edi, DWORD PTR WINED3D_SHADER_TYPE_PIXEL[rip]
	call	STATE_SHADER@PLT
	mov	rdi, QWORD PTR [rbx]
	mov	esi, eax
	call	device_invalidate_state@PLT
.L7:
	cmp	QWORD PTR [r15], 0
	jne	.L32
	mov	rax, QWORD PTR 8[r15]
	mov	r13, rbp
	mov	eax, DWORD PTR 16[rax]
	test	DWORD PTR WINED3D_CKEY_SRC_BLT[rip], eax
	cmovne	r13, QWORD PTR TRUE[rip]
.L20:
	lea	rdi, 28[r12]
	call	InterlockedDecrement@PLT
	mov	rdi, QWORD PTR [r15]
	test	rax, rax
	je	.L11
	cmp	QWORD PTR [r12], rdi
	je	.L45
.L11:
	cmp	QWORD PTR 8[r15], 0
	je	.L46
.L16:
	test	rdi, rdi
	jne	.L17
	mov	eax, DWORD PTR 16[r12]
	test	DWORD PTR WINED3D_CKEY_SRC_BLT[rip], eax
	cmovne	rbp, QWORD PTR TRUE[rip]
.L17:
	call	STATE_SAMPLER@PLT
	mov	rdi, QWORD PTR [rbx]
	mov	esi, eax
	call	device_invalidate_state@PLT
	cmp	rbp, r13
	je	.L18
	mov	edi, DWORD PTR WINED3D_RS_COLORKEYENABLE[rip]
	call	STATE_RENDER@PLT
	mov	rdi, QWORD PTR [rbx]
	mov	esi, eax
	call	device_invalidate_state@PLT
.L18:
	test	r13, r13
	jne	.L47
.L1:
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	call	InterlockedIncrement@PLT
	cmp	eax, 1
	je	.L48
.L23:
	mov	edi, DWORD PTR WINED3D_SHADER_TYPE_PIXEL[rip]
	call	STATE_SHADER@PLT
	mov	rdi, QWORD PTR [rbx]
	mov	esi, eax
	call	device_invalidate_state@PLT
	mov	rax, QWORD PTR 8[rsp]
	mov	rdi, QWORD PTR [r15]
	cmp	rdi, QWORD PTR [rax]
	jb	.L49
.L9:
	test	rdi, rdi
	jne	.L26
	mov	rax, QWORD PTR 8[r15]
	mov	eax, DWORD PTR 16[rax]
	test	DWORD PTR WINED3D_CKEY_SRC_BLT[rip], eax
	je	.L26
	mov	r13, QWORD PTR TRUE[rip]
	xor	edi, edi
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L2:
	test	r12, r12
	jne	.L32
.L26:
	call	STATE_SAMPLER@PLT
	mov	rdi, QWORD PTR [rbx]
	mov	r13, rbp
	mov	esi, eax
	call	device_invalidate_state@PLT
	test	r13, r13
	je	.L1
.L47:
	mov	rdi, QWORD PTR [rbx]
	mov	esi, DWORD PTR STATE_COLOR_KEY[rip]
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	jmp	device_invalidate_state@PLT
	.p2align 4,,10
	.p2align 3
.L32:
	.cfi_restore_state
	mov	r13, rbp
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L49:
	mov	esi, DWORD PTR WINED3D_TSS_COLOR_OP[rip]
	call	STATE_TEXTURESTAGE@PLT
	mov	rdi, QWORD PTR [rbx]
	mov	esi, eax
	call	device_invalidate_state@PLT
	mov	esi, DWORD PTR WINED3D_TSS_ALPHA_OP[rip]
	mov	rdi, QWORD PTR [r15]
	call	STATE_TEXTURESTAGE@PLT
	mov	rdi, QWORD PTR [rbx]
	mov	esi, eax
	call	device_invalidate_state@PLT
	mov	rdi, QWORD PTR [r15]
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L46:
	mov	rax, QWORD PTR 8[rsp]
	cmp	QWORD PTR [rax], rdi
	jbe	.L16
	mov	esi, DWORD PTR WINED3D_TSS_COLOR_OP[rip]
	call	STATE_TEXTURESTAGE@PLT
	mov	rdi, QWORD PTR [rbx]
	mov	esi, eax
	call	device_invalidate_state@PLT
	mov	esi, DWORD PTR WINED3D_TSS_ALPHA_OP[rip]
	mov	rdi, QWORD PTR [r15]
	call	STATE_TEXTURESTAGE@PLT
	mov	rdi, QWORD PTR [rbx]
	mov	esi, eax
	call	device_invalidate_state@PLT
	mov	rdi, QWORD PTR [r15]
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L4:
	mov	rsi, QWORD PTR [r15]
	mov	rdx, QWORD PTR 8[r12]
	mov	QWORD PTR [rax], rsi
	cmp	QWORD PTR 8[rax], rdx
	jne	.L5
.L44:
	mov	esi, DWORD PTR 0[r13]
	mov	edi, DWORD PTR [r14]
	call	is_same_fixup@PLT
	test	eax, eax
	je	.L6
.L8:
	mov	r13d, DWORD PTR 16[rsp]
	xor	r13d, DWORD PTR 20[rsp]
	test	DWORD PTR WINED3DFMT_FLAG_SHADOW[rip], r13d
	jne	.L5
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L45:
	lea	rdi, .LC0[rip]
	xor	eax, eax
	call	TRACE@PLT
	mov	eax, DWORD PTR MAX_COMBINED_SAMPLERS[rip]
	test	eax, eax
	je	.L42
	mov	rsi, QWORD PTR 8[rbx]
	lea	edi, -1[rax]
	xor	r14d, r14d
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L13:
	lea	rax, 1[r14]
	cmp	rdi, r14
	je	.L42
	mov	r14, rax
.L14:
	cmp	QWORD PTR [rsi+r14*8], r12
	jne	.L13
	mov	esi, r14d
	lea	rdi, .LC1[rip]
	xor	eax, eax
	call	TRACE@PLT
	mov	QWORD PTR [r12], r14
.L42:
	mov	rdi, QWORD PTR [r15]
	jmp	.L11
.L48:
	mov	rax, QWORD PTR 8[r15]
	mov	rcx, QWORD PTR [r15]
	mov	QWORD PTR [rax], rcx
	jmp	.L23
	.p2align 4,,10
	.p2align 3
.L6:
	mov	rax, QWORD PTR 8[rsp]
	mov	rsi, r14
	lea	rdi, 8[rax]
	mov	QWORD PTR 24[rsp], rdi
	call	can_use_texture_swizzle@PLT
	mov	rdi, QWORD PTR 24[rsp]
	test	rax, rax
	je	.L5
	mov	rsi, r13
	call	can_use_texture_swizzle@PLT
	test	rax, rax
	je	.L5
	jmp	.L8
	.cfi_endproc
.LFE0:
	.size	wined3d_cs_exec_set_texture, .-wined3d_cs_exec_set_texture
	.comm	WINED3D_TSS_COLOR_OP,4,4
	.comm	WINED3D_TSS_ALPHA_OP,4,4
	.comm	WINED3D_SHADER_TYPE_PIXEL,4,4
	.comm	WINED3D_RS_COLORKEYENABLE,4,4
	.comm	WINED3D_CKEY_SRC_BLT,4,4
	.comm	WINED3DFMT_FLAG_SHADOW,4,4
	.comm	TRUE,8,8
	.comm	STATE_COLOR_KEY,4,4
	.comm	MAX_COMBINED_SAMPLERS,4,4
	.comm	FALSE,8,8
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_cs.c_wined3d_cs_exec_set_texture.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Searching for other stages the texture is bound to."
	.ascii	"\012\000"
	.align	2
.LC1:
	.ascii	"Texture is also bound to stage %u.\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	wined3d_cs_exec_set_texture, %function
wined3d_cs_exec_set_texture:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r5, r0
	ldr	r2, [r1, #4]
	ldr	r8, [r0]
	mov	r4, r1
	ldr	r0, [r1]
	ldr	ip, .L52
	ldr	r1, [r5, #4]
	cmp	r2, #0
	ldr	r7, [r8]
	ldr	fp, [r1, r0, lsl #2]
	ldr	r6, [ip]
	sub	sp, sp, #12
	str	r2, [r1, r0, lsl #2]
	beq	.L2
	cmp	fp, #0
	add	r0, r2, #16
	beq	.L3
	ldr	r3, [r2, #12]
	ldr	r9, [r2, #20]
	ldr	r10, [fp, #20]
	ldr	r8, [fp, #12]
	str	r3, [sp]
	bl	InterlockedIncrement
	cmp	r0, #1
	ldr	r2, [r4, #4]
	beq	.L4
	ldr	r1, [r2, #4]
	ldr	r2, [fp, #4]
	cmp	r1, r2
	beq	.L46
.L5:
	ldr	r2, .L52+4
	ldr	r8, [r5]
	ldr	r0, [r2]
	bl	STATE_SHADER
	mov	r1, r0
	mov	r0, r8
	bl	device_invalidate_state
.L7:
	ldr	r2, [r4]
	cmp	r2, #0
	bne	.L31
	ldr	r1, [r4, #4]
	ldr	r2, .L52+8
	ldr	r1, [r1, #8]
	ldr	r2, [r2]
	tst	r1, r2
	bne	.L30
.L31:
	mov	r8, r6
.L20:
	add	r0, fp, #16
	bl	InterlockedDecrement
	cmp	r0, #0
	ldr	r0, [r4]
	beq	.L11
	ldr	r2, [fp]
	cmp	r2, r0
	beq	.L47
.L11:
	ldr	r2, [r4, #4]
	ldr	r9, [r5]
	cmp	r2, #0
	beq	.L48
.L16:
	cmp	r0, #0
	bne	.L17
	ldr	r1, .L52+8
	ldr	r2, [fp, #8]
	ldr	r3, [r1]
	tst	r2, r3
	ldrne	r3, .L52+12
	ldrne	r6, [r3]
.L17:
	bl	STATE_SAMPLER
	mov	r1, r0
	mov	r0, r9
	bl	device_invalidate_state
	cmp	r6, r8
	beq	.L18
	ldr	r3, .L52+16
	ldr	r4, [r5]
	ldr	r0, [r3]
	bl	STATE_RENDER
	mov	r1, r0
	mov	r0, r4
	bl	device_invalidate_state
.L18:
	cmp	r8, #0
	bne	.L49
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L3:
	bl	InterlockedIncrement
	cmp	r0, #1
	beq	.L50
.L23:
	ldr	r3, .L52+4
	ldr	r8, [r5]
	ldr	r0, [r3]
	bl	STATE_SHADER
	mov	r1, r0
	mov	r0, r8
	bl	device_invalidate_state
	ldr	r3, [r7]
	ldr	r0, [r4]
	cmp	r0, r3
	bcc	.L51
.L9:
	cmp	r0, #0
	bne	.L44
	ldr	r2, [r4, #4]
	ldr	r3, .L52+8
	ldr	r2, [r2, #8]
	ldr	r3, [r3]
	tst	r2, r3
	beq	.L44
	ldr	r3, .L52+12
	ldr	r9, [r5]
	ldr	r8, [r3]
	b	.L17
.L49:
	ldr	r3, .L52+20
	ldr	r0, [r5]
	ldr	r1, [r3]
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	device_invalidate_state
.L2:
	cmp	fp, #0
	bne	.L31
.L26:
	bl	STATE_SAMPLER
	mov	r1, r0
	mov	r0, r8
	bl	device_invalidate_state
	mov	r8, r6
	b	.L18
.L30:
	ldr	r2, .L52+12
	ldr	r8, [r2]
	b	.L20
.L44:
	ldr	r8, [r5]
	b	.L26
.L51:
	ldr	r3, .L52+24
	ldr	r7, [r5]
	ldr	r1, [r3]
	bl	STATE_TEXTURESTAGE
	mov	r1, r0
	mov	r0, r7
	bl	device_invalidate_state
	ldr	r3, .L52+28
	ldr	r0, [r4]
	ldr	r1, [r3]
	ldr	r7, [r5]
	bl	STATE_TEXTURESTAGE
	mov	r1, r0
	mov	r0, r7
	bl	device_invalidate_state
	ldr	r0, [r4]
	b	.L9
.L48:
	ldr	r2, [r7]
	cmp	r2, r0
	bls	.L16
	ldr	r2, .L52+24
	ldr	r1, [r2]
	bl	STATE_TEXTURESTAGE
	mov	r1, r0
	mov	r0, r9
	bl	device_invalidate_state
	ldr	r2, .L52+28
	ldr	r0, [r4]
	ldr	r1, [r2]
	ldr	r7, [r5]
	bl	STATE_TEXTURESTAGE
	mov	r1, r0
	mov	r0, r7
	bl	device_invalidate_state
	ldr	r0, [r4]
	ldr	r9, [r5]
	b	.L16
.L4:
	ldr	r1, [r4]
	str	r1, [r2]
	ldr	r1, [r2, #4]
	ldr	r2, [fp, #4]
	cmp	r1, r2
	bne	.L5
.L46:
	ldr	r1, [r10]
	ldr	r0, [r9]
	bl	is_same_fixup
	cmp	r0, #0
	beq	.L6
.L8:
	ldr	r2, .L52+32
	ldr	r3, [sp]
	ldr	r2, [r2]
	eor	r8, r8, r3
	tst	r8, r2
	bne	.L5
	b	.L7
.L47:
	ldr	r0, .L52+36
	bl	TRACE
	ldr	r2, .L52+40
	ldr	r0, [r2]
	cmp	r0, #0
	beq	.L43
	ldr	r2, [r5, #4]
	mov	r9, #0
	sub	r2, r2, #4
	b	.L14
.L13:
	add	r9, r9, #1
	cmp	r9, r0
	beq	.L43
.L14:
	ldr	r1, [r2, #4]!
	cmp	r1, fp
	bne	.L13
	mov	r1, r9
	ldr	r0, .L52+44
	bl	TRACE
	str	r9, [fp]
.L43:
	ldr	r0, [r4]
	b	.L11
.L50:
	ldm	r4, {r2, r3}
	str	r2, [r3]
	b	.L23
.L6:
	add	r2, r7, #4
	mov	r0, r2
	mov	r1, r9
	str	r2, [sp, #4]
	bl	can_use_texture_swizzle
	cmp	r0, #0
	ldr	r2, [sp, #4]
	beq	.L5
	mov	r1, r10
	mov	r0, r2
	bl	can_use_texture_swizzle
	cmp	r0, #0
	beq	.L5
	b	.L8
.L53:
	.align	2
.L52:
	.word	FALSE
	.word	WINED3D_SHADER_TYPE_PIXEL
	.word	WINED3D_CKEY_SRC_BLT
	.word	TRUE
	.word	WINED3D_RS_COLORKEYENABLE
	.word	STATE_COLOR_KEY
	.word	WINED3D_TSS_COLOR_OP
	.word	WINED3D_TSS_ALPHA_OP
	.word	WINED3DFMT_FLAG_SHADOW
	.word	.LC0
	.word	MAX_COMBINED_SAMPLERS
	.word	.LC1
	.size	wined3d_cs_exec_set_texture, .-wined3d_cs_exec_set_texture
	.comm	WINED3D_TSS_COLOR_OP,4,4
	.comm	WINED3D_TSS_ALPHA_OP,4,4
	.comm	WINED3D_SHADER_TYPE_PIXEL,4,4
	.comm	WINED3D_RS_COLORKEYENABLE,4,4
	.comm	WINED3D_CKEY_SRC_BLT,4,4
	.comm	WINED3DFMT_FLAG_SHADOW,4,4
	.comm	TRUE,4,4
	.comm	STATE_COLOR_KEY,4,4
	.comm	MAX_COMBINED_SAMPLERS,4,4
	.comm	FALSE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
