	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wined3d_texture_get_memory     ## -- Begin function wined3d_texture_get_memory
	.p2align	4, 0x90
_wined3d_texture_get_memory:            ## @wined3d_texture_get_memory
	.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, %r12d
	movq	%rdx, %r14
	movl	%esi, %ebx
	movq	%rdi, %r15
	movl	%ecx, %edi
	callq	_wined3d_debug_location
	leaq	L_.str(%rip), %rdi
	movq	%r15, %rsi
	movl	%ebx, %edx
	movq	%r14, %rcx
	movl	%eax, %r8d
	callq	_TRACE
	movq	16(%r15), %rax
	movl	%ebx, %ecx
	movq	_WINED3D_LOCATION_BUFFER@GOTPCREL(%rip), %rdx
	testl	%r12d, (%rdx)
	je	LBB0_2
## %bb.1:
	movq	$0, 8(%r14)
	leaq	(%rcx,%rcx,2), %rcx
	movl	16(%rax,%rcx,8), %eax
	jmp	LBB0_9
LBB0_2:
	movq	_WINED3D_LOCATION_USER_MEMORY@GOTPCREL(%rip), %rdx
	testl	%r12d, (%rdx)
	je	LBB0_5
## %bb.3:
	movq	8(%r15), %rax
	movq	%rax, 8(%r14)
	jmp	LBB0_8
LBB0_5:
	movq	_WINED3D_LOCATION_SYSMEM@GOTPCREL(%rip), %rdx
	testl	%r12d, (%rdx)
	je	LBB0_7
## %bb.6:
	leaq	(%rcx,%rcx,2), %rcx
	movslq	(%rax,%rcx,8), %rax
	shlq	$2, %rax
	addq	(%r15), %rax
	movq	%rax, 8(%r14)
	jmp	LBB0_8
LBB0_7:
	movl	%r12d, %edi
	callq	_wined3d_debug_location
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	callq	_ERR
	movq	$0, 8(%r14)
LBB0_8:
	xorl	%eax, %eax
LBB0_9:
	movl	%eax, (%r14)
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"texture %p, sub_resource_idx %u, data %p, locations %s.\n"

	.comm	_WINED3D_LOCATION_BUFFER,4,2    ## @WINED3D_LOCATION_BUFFER
	.comm	_WINED3D_LOCATION_USER_MEMORY,4,2 ## @WINED3D_LOCATION_USER_MEMORY
	.comm	_WINED3D_LOCATION_SYSMEM,4,2    ## @WINED3D_LOCATION_SYSMEM
L_.str.1:                               ## @.str.1
	.asciz	"Unexpected locations %s.\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wined3d_texture_get_memory     ; -- Begin function wined3d_texture_get_memory
	.p2align	2
_wined3d_texture_get_memory:            ; @wined3d_texture_get_memory
	.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	x20, x3
	mov	x19, x2
	mov	x22, x1
	mov	x21, x0
	mov	x0, x3
	bl	_wined3d_debug_location
	mov	x4, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	mov	x2, x22
	mov	x3, x19
	bl	_TRACE
	ldr	x8, [x21, #16]
	mov	w10, w22
Lloh2:
	adrp	x9, _WINED3D_LOCATION_BUFFER@GOTPAGE
Lloh3:
	ldr	x9, [x9, _WINED3D_LOCATION_BUFFER@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w20
	b.eq	LBB0_2
; %bb.1:
	str	xzr, [x19, #8]
	mov	w9, #24
	madd	x8, x10, x9, x8
	ldr	w9, [x8, #16]
	b	LBB0_7
LBB0_2:
Lloh5:
	adrp	x9, _WINED3D_LOCATION_USER_MEMORY@GOTPAGE
Lloh6:
	ldr	x9, [x9, _WINED3D_LOCATION_USER_MEMORY@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	tst	w9, w20
	b.eq	LBB0_4
; %bb.3:
	mov	w9, #0
	ldr	x8, [x21, #8]
	str	x8, [x19, #8]
	b	LBB0_7
LBB0_4:
Lloh8:
	adrp	x9, _WINED3D_LOCATION_SYSMEM@GOTPAGE
Lloh9:
	ldr	x9, [x9, _WINED3D_LOCATION_SYSMEM@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	tst	w9, w20
	b.eq	LBB0_6
; %bb.5:
	mov	w9, #0
	ldr	x11, [x21]
	mov	w12, #24
	mul	x10, x10, x12
	ldrsw	x8, [x8, x10]
	add	x8, x11, x8, lsl #2
	str	x8, [x19, #8]
	b	LBB0_7
LBB0_6:
	mov	x0, x20
	bl	_wined3d_debug_location
	mov	x1, x0
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_ERR
	mov	w9, #0
	str	xzr, [x19, #8]
LBB0_7:
	str	w9, [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
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"texture %p, sub_resource_idx %u, data %p, locations %s.\n"

	.comm	_WINED3D_LOCATION_BUFFER,4,2    ; @WINED3D_LOCATION_BUFFER
	.comm	_WINED3D_LOCATION_USER_MEMORY,4,2 ; @WINED3D_LOCATION_USER_MEMORY
	.comm	_WINED3D_LOCATION_SYSMEM,4,2    ; @WINED3D_LOCATION_SYSMEM
l_.str.1:                               ; @.str.1
	.asciz	"Unexpected locations %s.\n"

.subsections_via_symbols
