	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wined3d_texture_validate_location ## -- Begin function wined3d_texture_validate_location
	.p2align	4, 0x90
_wined3d_texture_validate_location:     ## @wined3d_texture_validate_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movl	%esi, %ebx
	movq	%rdi, %r14
	movq	%rdx, %rdi
	callq	_wined3d_debug_location
	leaq	L_.str(%rip), %rdi
	movq	%r14, %rsi
	movl	%ebx, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_TRACE
	movq	8(%r14), %r12
	movl	%ebx, %ebx
	movq	(%r12,%rbx,8), %rcx
	movq	%rcx, %rdi
	orq	%r15, %rdi
	movq	%rdi, (%r12,%rbx,8)
	movq	_WINED3D_LOCATION_SYSMEM@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rcx
	jne	LBB0_4
## %bb.1:
	cmpq	%r15, %rax
	je	LBB0_4
## %bb.2:
	decl	(%r14)
	jne	LBB0_4
## %bb.3:
	movq	%r14, %rdi
	callq	_wined3d_texture_evict_sysmem
	movq	(%r12,%rbx,8), %rdi
LBB0_4:
	callq	_wined3d_debug_location
	movslq	%eax, %rsi
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_TRACE                          ## 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_SYSMEM,8,3    ## @WINED3D_LOCATION_SYSMEM
L_.str.1:                               ## @.str.1
	.asciz	"New locations flags are %s.\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wined3d_texture_validate_location ; -- Begin function wined3d_texture_validate_location
	.p2align	2
_wined3d_texture_validate_location:     ; @wined3d_texture_validate_location
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	mov	x0, x2
	bl	_wined3d_debug_location
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x21, x0, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_TRACE
	ldr	x22, [x19, #8]
	mov	w21, w21
	lsl	x8, x21, #3
	ldr	x9, [x22, x8]
	orr	x0, x9, x20
	str	x0, [x22, x8]
Lloh2:
	adrp	x8, _WINED3D_LOCATION_SYSMEM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _WINED3D_LOCATION_SYSMEM@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cmp	x9, x8
	ccmp	x8, x20, #4, eq
	b.eq	LBB0_3
; %bb.1:
	ldr	w8, [x19]
	subs	w8, w8, #1
	str	w8, [x19]
	b.ne	LBB0_3
; %bb.2:
	mov	x0, x19
	bl	_wined3d_texture_evict_sysmem
	ldr	x0, [x22, x21, lsl #3]
LBB0_3:
	bl	_wined3d_debug_location
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x1, w0
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	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
	add	sp, sp, #64
	b	_TRACE
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.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_SYSMEM,8,3    ; @WINED3D_LOCATION_SYSMEM
l_.str.1:                               ; @.str.1
	.asciz	"New locations flags are %s.\n"

.subsections_via_symbols
