	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wined3d_texture_bind_and_dirtify ## -- Begin function wined3d_texture_bind_and_dirtify
	.p2align	4, 0x90
_wined3d_texture_bind_and_dirtify:      ## @wined3d_texture_bind_and_dirtify
	.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
	movl	%edx, %r14d
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	(%rsi), %r12
	movq	8(%rsi), %rdi
	callq	_ARRAY_SIZE
	cmpq	%rax, %r12
	jae	LBB0_3
## %bb.1:
	movq	(%rbx), %rax
	movq	8(%rbx), %rcx
	movq	(%rcx,%rax,8), %rdi
	movq	_WINED3D_UNMAPPED_STAGE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdi
	je	LBB0_3
## %bb.2:
	callq	_STATE_SAMPLER
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_context_invalidate_state
LBB0_3:
	movq	_STATE_COMPUTE_SHADER_RESOURCE_BINDING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_context_invalidate_compute_state
	movq	_STATE_GRAPHICS_SHADER_RESOURCE_BINDING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_context_invalidate_state
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	%r14d, %edx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_wined3d_texture_bind           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_WINED3D_UNMAPPED_STAGE,8,3     ## @WINED3D_UNMAPPED_STAGE
	.comm	_STATE_COMPUTE_SHADER_RESOURCE_BINDING,4,2 ## @STATE_COMPUTE_SHADER_RESOURCE_BINDING
	.comm	_STATE_GRAPHICS_SHADER_RESOURCE_BINDING,4,2 ## @STATE_GRAPHICS_SHADER_RESOURCE_BINDING
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wined3d_texture_bind_and_dirtify ; -- Begin function wined3d_texture_bind_and_dirtify
	.p2align	2
_wined3d_texture_bind_and_dirtify:      ; @wined3d_texture_bind_and_dirtify
	.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	x19, x2
	mov	x20, x1
	mov	x21, x0
	ldp	x22, x0, [x1]
	bl	_ARRAY_SIZE
	cmp	x22, x0
	b.hs	LBB0_3
; %bb.1:
	ldp	x9, x8, [x20]
	ldr	x0, [x8, x9, lsl #3]
Lloh0:
	adrp	x8, _WINED3D_UNMAPPED_STAGE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WINED3D_UNMAPPED_STAGE@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_3
; %bb.2:
	bl	_STATE_SAMPLER
	mov	x1, x0
	mov	x0, x20
	bl	_context_invalidate_state
LBB0_3:
Lloh3:
	adrp	x8, _STATE_COMPUTE_SHADER_RESOURCE_BINDING@GOTPAGE
Lloh4:
	ldr	x8, [x8, _STATE_COMPUTE_SHADER_RESOURCE_BINDING@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_context_invalidate_compute_state
Lloh6:
	adrp	x8, _STATE_GRAPHICS_SHADER_RESOURCE_BINDING@GOTPAGE
Lloh7:
	ldr	x8, [x8, _STATE_GRAPHICS_SHADER_RESOURCE_BINDING@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_context_invalidate_state
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	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
	b	_wined3d_texture_bind
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_WINED3D_UNMAPPED_STAGE,8,3     ; @WINED3D_UNMAPPED_STAGE
	.comm	_STATE_COMPUTE_SHADER_RESOURCE_BINDING,4,2 ; @STATE_COMPUTE_SHADER_RESOURCE_BINDING
	.comm	_STATE_GRAPHICS_SHADER_RESOURCE_BINDING,4,2 ; @STATE_GRAPHICS_SHADER_RESOURCE_BINDING
.subsections_via_symbols
