	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wined3d_texture_update_map_binding
_wined3d_texture_update_map_binding:    ## @wined3d_texture_update_map_binding
	.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, %r12
	movl	4(%rdi), %ebx
	imull	(%rdi), %ebx
	movq	24(%rdi), %rdi
	movq	8(%r12), %r14
	cmpq	$0, (%rdi)
	je	LBB0_1
## %bb.2:
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_context_acquire
	movq	%rax, %r15
	testl	%ebx, %ebx
	jne	LBB0_4
	jmp	LBB0_11
LBB0_1:
	xorl	%r15d, %r15d
	testl	%ebx, %ebx
	je	LBB0_11
LBB0_4:
	movl	%ebx, %r13d
	xorl	%ebx, %ebx
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_5 Depth=1
	incq	%rbx
	cmpq	%rbx, %r13
	je	LBB0_11
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	32(%r12), %rax
	movq	(%rax,%rbx,8), %rax
	cmpq	16(%r12), %rax
	jne	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%r12, %rdi
	movl	%ebx, %esi
	movq	%r15, %rdx
	movq	%r14, %rcx
	callq	_wined3d_texture_load_location
	testl	%eax, %eax
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%r14, %rdi
	callq	_wined3d_debug_location
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_ERR
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	16(%r12), %rax
	movq	_WINED3D_LOCATION_BUFFER@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	(%r15), %rdx
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_wined3d_texture_remove_buffer_object
	jmp	LBB0_10
LBB0_11:
	testq	%r15, %r15
	je	LBB0_13
## %bb.12:
	movq	%r15, %rdi
	callq	_context_release
LBB0_13:
	movq	%r14, 16(%r12)
	movq	$0, 8(%r12)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to load location %s.\n"

	.comm	_WINED3D_LOCATION_BUFFER,8,3    ## @WINED3D_LOCATION_BUFFER
	.no_dead_strip	_wined3d_texture_update_map_binding
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wined3d_texture_update_map_binding
_wined3d_texture_update_map_binding:    ; @wined3d_texture_update_map_binding
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	ldp	w8, w9, [x0]
	mul	w24, w9, w8
	ldr	x0, [x0, #24]
	ldr	x20, [x19, #8]
	ldr	x8, [x0]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x1, #0
	mov	w2, #0
	bl	_context_acquire
	mov	x21, x0
	cbnz	w24, LBB0_3
	b	LBB0_10
LBB0_2:
	mov	x21, #0
	cbz	w24, LBB0_10
LBB0_3:
	mov	x22, #0
Lloh0:
	adrp	x23, l_.str@PAGE
Lloh1:
	add	x23, x23, l_.str@PAGEOFF
Lloh2:
	adrp	x25, _WINED3D_LOCATION_BUFFER@GOTPAGE
Lloh3:
	ldr	x25, [x25, _WINED3D_LOCATION_BUFFER@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x22, x22, #1
	cmp	x24, x22
	b.eq	LBB0_10
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #32]
	ldr	x8, [x8, x22, lsl #3]
	ldr	x9, [x19, #16]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	mov	x3, x20
	bl	_wined3d_texture_load_location
	cbnz	w0, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x20
	bl	_wined3d_debug_location
	mov	x1, x0
	mov	x0, x23
	bl	_ERR
LBB0_8:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x19, #16]
	ldr	x9, [x25]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x2, [x21]
	mov	x0, x19
	mov	x1, x22
	bl	_wined3d_texture_remove_buffer_object
	b	LBB0_4
LBB0_10:
	cbz	x21, LBB0_12
; %bb.11:
	mov	x0, x21
	bl	_context_release
LBB0_12:
	stp	xzr, x20, [x19, #8]
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to load location %s.\n"

	.comm	_WINED3D_LOCATION_BUFFER,8,3    ; @WINED3D_LOCATION_BUFFER
	.no_dead_strip	_wined3d_texture_update_map_binding
.subsections_via_symbols
