	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wined3d_texture_unload_gl_texture
_wined3d_texture_unload_gl_texture:     ## @wined3d_texture_unload_gl_texture
	.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, %rbx
	movq	(%rdi), %r14
	cmpq	$0, 32(%rdi)
	jne	LBB0_5
## %bb.1:
	cmpq	$0, 24(%rbx)
	jne	LBB0_5
## %bb.2:
	cmpq	$0, 16(%rbx)
	jne	LBB0_5
## %bb.3:
	cmpq	$0, 8(%rbx)
	je	LBB0_4
LBB0_5:
	leaq	32(%rbx), %r13
	movq	%r14, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_context_acquire
	movq	%rax, %r15
	movq	(%rax), %r12
	cmpq	$0, (%r13)
	je	LBB0_7
## %bb.6:
	movq	%r14, %rdi
	movq	%r12, %rsi
	movq	%r13, %rdx
	callq	_gltexture_delete
LBB0_7:
	cmpq	$0, 24(%rbx)
	je	LBB0_9
LBB0_8:
	leaq	24(%rbx), %rdx
	movq	(%r15), %rsi
	movq	%r14, %rdi
	callq	_gltexture_delete
LBB0_9:
	movq	16(%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_11
## %bb.10:
	leaq	16(%rbx), %r13
	leaq	L_.str(%rip), %rdi
	callq	_TRACE
	movq	(%r13), %rsi
	movq	_TRUE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_context_gl_resource_released
	movl	$1, %edi
	movq	%r13, %rsi
	callq	*(%r12)
	movq	$0, (%r13)
LBB0_11:
	movq	8(%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_13
## %bb.12:
	leaq	8(%rbx), %r13
	leaq	L_.str.1(%rip), %rdi
	callq	_TRACE
	movq	(%r13), %rsi
	movq	_TRUE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_context_gl_resource_released
	movl	$1, %edi
	movq	%r13, %rsi
	callq	*(%r12)
	movq	$0, (%r13)
LBB0_13:
	testq	%r15, %r15
	je	LBB0_15
## %bb.14:
	movq	%r15, %rdi
	callq	_context_release
LBB0_15:
	movq	%rbx, %rdi
	callq	_wined3d_texture_set_dirty
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_resource_unload                ## TAILCALL
LBB0_4:
	xorl	%r15d, %r15d
	xorl	%r12d, %r12d
	cmpq	$0, 24(%rbx)
	jne	LBB0_8
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Deleting multisample renderbuffer %u.\n"

	.comm	_TRUE,4,2                       ## @TRUE
L_.str.1:                               ## @.str.1
	.asciz	"Deleting resolved renderbuffer %u.\n"

	.no_dead_strip	_wined3d_texture_unload_gl_texture
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wined3d_texture_unload_gl_texture
_wined3d_texture_unload_gl_texture:     ; @wined3d_texture_unload_gl_texture
	.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	x20, [x0]
	mov	x23, x0
	ldr	x8, [x23, #32]!
	cbnz	x8, LBB0_4
; %bb.1:
	ldr	x8, [x19, #24]
	cbnz	x8, LBB0_4
; %bb.2:
	ldr	x8, [x19, #16]
	cbnz	x8, LBB0_4
; %bb.3:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_15
LBB0_4:
	mov	x0, x20
	mov	x1, #0
	mov	w2, #0
	bl	_context_acquire
	mov	x21, x0
	ldr	x22, [x0]
	ldr	x8, [x23]
	cbz	x8, LBB0_6
; %bb.5:
	mov	x0, x20
	mov	x1, x22
	mov	x2, x23
	bl	_gltexture_delete
LBB0_6:
	mov	x2, x19
	ldr	x8, [x2, #24]!
	cbz	x8, LBB0_8
; %bb.7:
	ldr	x1, [x21]
	mov	x0, x20
	bl	_gltexture_delete
LBB0_8:
	mov	x23, x19
	ldr	x1, [x23, #16]!
Lloh0:
	adrp	x24, _TRUE@GOTPAGE
Lloh1:
	ldr	x24, [x24, _TRUE@GOTPAGEOFF]
	cbz	x1, LBB0_10
; %bb.9:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_TRACE
	ldr	x1, [x23]
	ldr	w2, [x24]
	mov	x0, x20
	bl	_context_gl_resource_released
	ldr	x8, [x22]
	mov	w0, #1
	mov	x1, x23
	blr	x8
	str	xzr, [x23]
LBB0_10:
	mov	x23, x19
	ldr	x1, [x23, #8]!
	cbz	x1, LBB0_12
; %bb.11:
Lloh4:
	adrp	x0, l_.str.1@PAGE
Lloh5:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_TRACE
	ldr	x1, [x23]
	ldr	w2, [x24]
	mov	x0, x20
	bl	_context_gl_resource_released
	ldr	x8, [x22]
	mov	w0, #1
	mov	x1, x23
	blr	x8
	str	xzr, [x23]
LBB0_12:
	cbz	x21, LBB0_14
; %bb.13:
	mov	x0, x21
	bl	_context_release
LBB0_14:
	mov	x0, x19
	bl	_wined3d_texture_set_dirty
	mov	x0, 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	_resource_unload
LBB0_15:
	mov	x21, #0
	mov	x22, #0
	b	LBB0_6
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Deleting multisample renderbuffer %u.\n"

	.comm	_TRUE,4,2                       ; @TRUE
l_.str.1:                               ; @.str.1
	.asciz	"Deleting resolved renderbuffer %u.\n"

	.no_dead_strip	_wined3d_texture_unload_gl_texture
.subsections_via_symbols
