	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wined3d_texture_invalidate_location ## -- Begin function wined3d_texture_invalidate_location
	.p2align	4, 0x90
_wined3d_texture_invalidate_location:   ## @wined3d_texture_invalidate_location
	.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
	movl	%edx, %ebx
	movl	%esi, %r14d
	movq	%rdi, %r15
	movl	%edx, %edi
	callq	_wined3d_debug_location
	leaq	L_.str(%rip), %rdi
	movq	%r15, %rsi
	movl	%r14d, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_TRACE
	movq	_WINED3D_LOCATION_TEXTURE_RGB@GOTPCREL(%rip), %rax
	movq	_WINED3D_LOCATION_TEXTURE_SRGB@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	testl	%ebx, %ecx
	je	LBB0_2
## %bb.1:
	movq	%r15, %rdi
	callq	_wined3d_texture_set_dirty
LBB0_2:
	movq	8(%r15), %r12
	movl	%r14d, %r13d
	movl	(%r12,%r13,4), %ecx
	notl	%ebx
	andl	%ecx, %ebx
	movl	%ebx, (%r12,%r13,4)
	movq	_WINED3D_LOCATION_SYSMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %ecx
	je	LBB0_5
## %bb.3:
	cmpl	%eax, %ebx
	jne	LBB0_5
## %bb.4:
	incl	(%r15)
LBB0_5:
	movl	%ebx, %edi
	callq	_wined3d_debug_location
	movslq	%eax, %rsi
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_TRACE
	cmpl	$0, (%r12,%r13,4)
	je	LBB0_7
## %bb.6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	leaq	L_.str.2(%rip), %rdi
	movl	%r14d, %esi
	movq	%r15, %rdx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR                            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"texture %p, sub_resource_idx %u, location %s.\n"

	.comm	_WINED3D_LOCATION_TEXTURE_RGB,4,2 ## @WINED3D_LOCATION_TEXTURE_RGB
	.comm	_WINED3D_LOCATION_TEXTURE_SRGB,4,2 ## @WINED3D_LOCATION_TEXTURE_SRGB
	.comm	_WINED3D_LOCATION_SYSMEM,4,2    ## @WINED3D_LOCATION_SYSMEM
L_.str.1:                               ## @.str.1
	.asciz	"New locations flags are %s.\n"

L_.str.2:                               ## @.str.2
	.asciz	"Sub-resource %u of texture %p does not have any up to date location.\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wined3d_texture_invalidate_location ; -- Begin function wined3d_texture_invalidate_location
	.p2align	2
_wined3d_texture_invalidate_location:   ; @wined3d_texture_invalidate_location
	.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
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
	mov	x0, x2
	bl	_wined3d_debug_location
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x20, x0, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_TRACE
Lloh2:
	adrp	x8, _WINED3D_LOCATION_TEXTURE_RGB@GOTPAGE
Lloh3:
	ldr	x8, [x8, _WINED3D_LOCATION_TEXTURE_RGB@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _WINED3D_LOCATION_TEXTURE_SRGB@GOTPAGE
Lloh6:
	ldr	x9, [x9, _WINED3D_LOCATION_TEXTURE_SRGB@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	orr	w8, w9, w8
	tst	w8, w21
	b.eq	LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_wined3d_texture_set_dirty
LBB0_2:
	ldr	x22, [x19, #8]
	mov	w23, w20
	lsl	x8, x23, #2
	ldr	w9, [x22, x8]
	bic	w0, w9, w21
	str	w0, [x22, x8]
Lloh8:
	adrp	x8, _WINED3D_LOCATION_SYSMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _WINED3D_LOCATION_SYSMEM@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	cmp	w9, w8
	ccmp	w0, w8, #0, ne
	b.ne	LBB0_4
; %bb.3:
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
LBB0_4:
	bl	_wined3d_debug_location
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x1, w0
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_TRACE
	ldr	w8, [x22, x23, lsl #2]
	cbz	w8, LBB0_6
; %bb.5:
	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_6:
Lloh13:
	adrp	x0, l_.str.2@PAGE
Lloh14:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x20
	mov	x2, x19
	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
	b	_ERR
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"texture %p, sub_resource_idx %u, location %s.\n"

	.comm	_WINED3D_LOCATION_TEXTURE_RGB,4,2 ; @WINED3D_LOCATION_TEXTURE_RGB
	.comm	_WINED3D_LOCATION_TEXTURE_SRGB,4,2 ; @WINED3D_LOCATION_TEXTURE_SRGB
	.comm	_WINED3D_LOCATION_SYSMEM,4,2    ; @WINED3D_LOCATION_SYSMEM
l_.str.1:                               ; @.str.1
	.asciz	"New locations flags are %s.\n"

l_.str.2:                               ; @.str.2
	.asciz	"Sub-resource %u of texture %p does not have any up to date location.\n"

.subsections_via_symbols
