	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wined3d_buffer_invalidate_range
_wined3d_buffer_invalidate_range:       ## @wined3d_buffer_invalidate_range
	.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	%ecx, %r15d
	movl	%edx, %r12d
	movl	%esi, %ebx
	movq	%rdi, %r14
	movl	%esi, %edi
	callq	_wined3d_debug_location
	leaq	L_.str(%rip), %rdi
	movq	%r14, %rsi
	movl	%eax, %edx
	movl	%r12d, %ecx
	movl	%r15d, %r8d
	xorl	%eax, %eax
	callq	_TRACE
	movq	_WINED3D_LOCATION_BUFFER@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	movl	%r12d, %esi
	movl	%r15d, %edx
	callq	_buffer_invalidate_bo_range
LBB0_2:
	notl	%ebx
	andl	(%r14), %ebx
	movl	%ebx, (%r14)
	movl	%ebx, %edi
	callq	_wined3d_debug_location
	movslq	%eax, %rsi
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_TRACE
	cmpl	$0, (%r14)
	je	LBB0_4
## %bb.3:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	leaq	L_.str.2(%rip), %rdi
	movq	%r14, %rsi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR                            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"buffer %p, location %s, offset %u, size %u.\n"

	.comm	_WINED3D_LOCATION_BUFFER,4,2    ## @WINED3D_LOCATION_BUFFER
L_.str.1:                               ## @.str.1
	.asciz	"New locations flags are %s.\n"

L_.str.2:                               ## @.str.2
	.asciz	"Buffer %p does not have any up to date location.\n"

	.no_dead_strip	_wined3d_buffer_invalidate_range
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wined3d_buffer_invalidate_range
_wined3d_buffer_invalidate_range:       ; @wined3d_buffer_invalidate_range
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x21, x3
	mov	x22, x2
	mov	x20, x1
	mov	x19, x0
	mov	x0, x1
	bl	_wined3d_debug_location
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x22, x21, [sp, #8]
	str	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_BUFFER@GOTPAGE
Lloh3:
	ldr	x8, [x8, _WINED3D_LOCATION_BUFFER@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_2
; %bb.1:
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	bl	_buffer_invalidate_bo_range
LBB0_2:
	ldr	w8, [x19]
	bic	w0, w8, w20
	str	w0, [x19]
	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
	bl	_TRACE
	ldr	w8, [x19]
	cbz	w8, LBB0_4
; %bb.3:
	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
	add	sp, sp, #80
	ret
LBB0_4:
Lloh7:
	adrp	x0, l_.str.2@PAGE
Lloh8:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, 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
	add	sp, sp, #80
	b	_ERR
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"buffer %p, location %s, offset %u, size %u.\n"

	.comm	_WINED3D_LOCATION_BUFFER,4,2    ; @WINED3D_LOCATION_BUFFER
l_.str.1:                               ; @.str.1
	.asciz	"New locations flags are %s.\n"

l_.str.2:                               ; @.str.2
	.asciz	"Buffer %p does not have any up to date location.\n"

	.no_dead_strip	_wined3d_buffer_invalidate_range
.subsections_via_symbols
