	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wined3d_texture_evict_sysmem
_wined3d_texture_evict_sysmem:          ## @wined3d_texture_evict_sysmem
	.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	%rdi, %r14
	movq	_WINED3D_TEXTURE_CONVERTED@GOTPCREL(%rip), %rax
	movq	_WINED3D_TEXTURE_PIN_SYSMEM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	testl	%ecx, (%rdi)
	jne	LBB0_8
## %bb.1:
	movq	8(%r14), %rax
	movq	_WINED3D_TEXTURE_DYNAMIC_MAP_THRESHOLD@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jle	LBB0_2
LBB0_8:
	leaq	L_.str(%rip), %rdi
	movq	%r14, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_TRACE                          ## TAILCALL
LBB0_2:
	leaq	L_.str.1(%rip), %rdi
	movq	%r14, %rsi
	callq	_TRACE
	movl	20(%r14), %eax
	imull	16(%r14), %eax
	testl	%eax, %eax
	je	LBB0_7
## %bb.3:
	movl	%eax, %r12d
	xorl	%ebx, %ebx
	movq	_WINED3D_LOCATION_SYSMEM@GOTPCREL(%rip), %r13
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	notl	%eax
	andl	%ecx, %eax
	movl	%eax, (%r15,%rbx,4)
	incq	%rbx
	cmpq	%rbx, %r12
	je	LBB0_7
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	32(%r14), %r15
	movl	(%r15,%rbx,4), %ecx
	movl	(%r13), %eax
	cmpl	%eax, %ecx
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	leaq	L_.str.2(%rip), %rdi
	movl	%ebx, %esi
	movq	%r14, %rdx
	callq	_ERR
	movl	(%r13), %eax
	movl	(%r15,%rbx,4), %ecx
	jmp	LBB0_6
LBB0_7:
	addq	$24, %r14
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_wined3d_resource_free_sysmem   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_WINED3D_TEXTURE_CONVERTED,4,2  ## @WINED3D_TEXTURE_CONVERTED
	.comm	_WINED3D_TEXTURE_PIN_SYSMEM,4,2 ## @WINED3D_TEXTURE_PIN_SYSMEM
	.comm	_WINED3D_TEXTURE_DYNAMIC_MAP_THRESHOLD,8,3 ## @WINED3D_TEXTURE_DYNAMIC_MAP_THRESHOLD
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Not evicting system memory for texture %p.\n"

L_.str.1:                               ## @.str.1
	.asciz	"Evicting system memory for texture %p.\n"

	.comm	_WINED3D_LOCATION_SYSMEM,4,2    ## @WINED3D_LOCATION_SYSMEM
L_.str.2:                               ## @.str.2
	.asciz	"WINED3D_LOCATION_SYSMEM is the only location for sub-resource %u of texture %p.\n"

	.no_dead_strip	_wined3d_texture_evict_sysmem
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wined3d_texture_evict_sysmem
_wined3d_texture_evict_sysmem:          ; @wined3d_texture_evict_sysmem
	.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	x19, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _WINED3D_TEXTURE_CONVERTED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _WINED3D_TEXTURE_CONVERTED@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
Lloh3:
	adrp	x10, _WINED3D_TEXTURE_PIN_SYSMEM@GOTPAGE
Lloh4:
	ldr	x10, [x10, _WINED3D_TEXTURE_PIN_SYSMEM@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	orr	w9, w10, w9
	tst	w9, w8
	b.ne	LBB0_2
; %bb.1:
	ldr	x8, [x19, #8]
Lloh6:
	adrp	x9, _WINED3D_TEXTURE_DYNAMIC_MAP_THRESHOLD@GOTPAGE
Lloh7:
	ldr	x9, [x9, _WINED3D_TEXTURE_DYNAMIC_MAP_THRESHOLD@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.le	LBB0_3
LBB0_2:
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	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
	b	_TRACE
LBB0_3:
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x19
	bl	_TRACE
	ldp	w8, w9, [x19, #16]
	mul	w22, w9, w8
	cbz	w22, LBB0_8
; %bb.4:
	mov	x20, #0
Lloh13:
	adrp	x23, _WINED3D_LOCATION_SYSMEM@GOTPAGE
Lloh14:
	ldr	x23, [x23, _WINED3D_LOCATION_SYSMEM@GOTPAGEOFF]
Lloh15:
	adrp	x21, l_.str.2@PAGE
Lloh16:
	add	x21, x21, l_.str.2@PAGEOFF
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	bic	w8, w9, w8
	str	w8, [x24, x20, lsl #2]
	add	x20, x20, #1
	cmp	x22, x20
	b.eq	LBB0_8
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x24, [x19, #32]
	ldr	w9, [x24, x20, lsl #2]
	ldr	w8, [x23]
	cmp	w9, w8
	b.ne	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	bl	_ERR
	ldr	w8, [x23]
	ldr	w9, [x24, x20, lsl #2]
	b	LBB0_5
LBB0_8:
	add	x0, x19, #24
	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
	b	_wined3d_resource_free_sysmem
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_WINED3D_TEXTURE_CONVERTED,4,2  ; @WINED3D_TEXTURE_CONVERTED
	.comm	_WINED3D_TEXTURE_PIN_SYSMEM,4,2 ; @WINED3D_TEXTURE_PIN_SYSMEM
	.comm	_WINED3D_TEXTURE_DYNAMIC_MAP_THRESHOLD,8,3 ; @WINED3D_TEXTURE_DYNAMIC_MAP_THRESHOLD
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Not evicting system memory for texture %p.\n"

l_.str.1:                               ; @.str.1
	.asciz	"Evicting system memory for texture %p.\n"

	.comm	_WINED3D_LOCATION_SYSMEM,4,2    ; @WINED3D_LOCATION_SYSMEM
l_.str.2:                               ; @.str.2
	.asciz	"WINED3D_LOCATION_SYSMEM is the only location for sub-resource %u of texture %p.\n"

	.no_dead_strip	_wined3d_texture_evict_sysmem
.subsections_via_symbols
