	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function d3d11_gfx_free
_d3d11_gfx_free:                        ## @d3d11_gfx_free
	.cfi_startproc
## %bb.0:
	testq	%rdi, %rdi
	je	LBB0_16
## %bb.1:
	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, %r15
	callq	_d3d11_free_shader_preset
	movq	152(%r15), %rdi
	callq	_d3d11_release_texture
	movq	144(%r15), %rdi
	callq	_Release
	movq	136(%r15), %rdi
	callq	_Release
	leaq	128(%r15), %rdi
	callq	_d3d11_release_texture
	movq	120(%r15), %rdi
	callq	_Release
	leaq	116(%r15), %rdi
	callq	_d3d11_release_shader
	leaq	112(%r15), %rdi
	callq	_d3d11_release_shader
	movq	104(%r15), %rdi
	callq	_Release
	movq	_GFX_MAX_SHADERS@GOTPCREL(%rip), %r14
	cmpl	$0, (%r14)
	je	LBB0_4
## %bb.2:
	xorl	%r12d, %r12d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	96(%r15), %rdi
	addq	%r12, %rdi
	callq	_d3d11_release_shader
	incq	%rbx
	movl	(%r14), %eax
	addq	$4, %r12
	cmpq	%rax, %rbx
	jb	LBB0_3
LBB0_4:
	movq	88(%r15), %rdi
	callq	_Release
	movq	80(%r15), %rdi
	callq	_Release
	movq	72(%r15), %rdi
	callq	_Release
	movq	64(%r15), %rdi
	callq	_Release
	movq	56(%r15), %rdi
	callq	_Release
	movq	_RARCH_WRAP_MAX@GOTPCREL(%rip), %r14
	cmpl	$0, (%r14)
	je	LBB0_7
## %bb.5:
	xorl	%ebx, %ebx
	movq	_RARCH_FILTER_LINEAR@GOTPCREL(%rip), %r12
	movq	_RARCH_FILTER_NEAREST@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	48(%r15), %rax
	movq	(%r12), %rcx
	movq	(%rax,%rcx,8), %rax
	movq	(%rax,%rbx,8), %rdi
	callq	_Release
	movq	48(%r15), %rax
	movq	(%r13), %rcx
	movq	(%rax,%rcx,8), %rax
	movq	(%rax,%rbx,8), %rdi
	callq	_Release
	incq	%rbx
	movl	(%r14), %eax
	cmpq	%rax, %rbx
	jb	LBB0_6
LBB0_7:
	movq	40(%r15), %rdi
	callq	_Release
	movq	32(%r15), %rdi
	callq	_Release
	movq	24(%r15), %rdi
	callq	_Release
	xorl	%eax, %eax
	callq	_font_driver_free_osd
	xorl	%eax, %eax
	callq	_video_driver_is_video_cache_context
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	(%r15), %rax
	movq	_cached_device_d3d11@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	movq	8(%r15), %rax
	movq	_cached_context@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	movl	16(%r15), %eax
	movq	_cached_supportedFeatureLevel@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	jmp	LBB0_10
LBB0_16:
	retq
LBB0_9:
	movq	8(%r15), %rdi
	callq	_Release
	movq	(%r15), %rdi
	callq	_Release
LBB0_10:
	movq	_D3D11_MAX_GPU_COUNT@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	testl	%eax, %eax
	je	LBB0_15
## %bb.11:
	xorl	%ebx, %ebx
	movq	_d3d11_adapters@GOTPCREL(%rip), %r12
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_12 Depth=1
	incq	%rbx
	movl	%eax, %ecx
	cmpq	%rcx, %rbx
	jae	LBB0_15
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rcx
	movq	(%rcx,%rbx,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	callq	_Release
	movq	(%r12), %rax
	movq	$0, (%rax,%rbx,8)
	movl	(%r14), %eax
	jmp	LBB0_14
LBB0_15:
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_free                           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_GFX_MAX_SHADERS,4,2            ## @GFX_MAX_SHADERS
	.comm	_RARCH_WRAP_MAX,4,2             ## @RARCH_WRAP_MAX
	.comm	_RARCH_FILTER_LINEAR,8,3        ## @RARCH_FILTER_LINEAR
	.comm	_RARCH_FILTER_NEAREST,8,3       ## @RARCH_FILTER_NEAREST
	.comm	_cached_device_d3d11,8,3        ## @cached_device_d3d11
	.comm	_cached_context,8,3             ## @cached_context
	.comm	_cached_supportedFeatureLevel,4,2 ## @cached_supportedFeatureLevel
	.comm	_D3D11_MAX_GPU_COUNT,4,2        ## @D3D11_MAX_GPU_COUNT
	.comm	_d3d11_adapters,8,3             ## @d3d11_adapters
	.no_dead_strip	_d3d11_gfx_free
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function d3d11_gfx_free
_d3d11_gfx_free:                        ; @d3d11_gfx_free
	.cfi_startproc
; %bb.0:
	cbz	x0, LBB0_9
; %bb.1:
	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
	.cfi_remember_state
	mov	x19, x0
	bl	_d3d11_free_shader_preset
	ldr	x0, [x19, #152]
	bl	_d3d11_release_texture
	ldr	x0, [x19, #144]
	bl	_Release
	ldr	x0, [x19, #136]
	bl	_Release
	add	x0, x19, #128
	bl	_d3d11_release_texture
	ldr	x0, [x19, #120]
	bl	_Release
	add	x0, x19, #116
	bl	_d3d11_release_shader
	add	x0, x19, #112
	bl	_d3d11_release_shader
	ldr	x0, [x19, #104]
	bl	_Release
Lloh0:
	adrp	x20, _GFX_MAX_SHADERS@GOTPAGE
Lloh1:
	ldr	x20, [x20, _GFX_MAX_SHADERS@GOTPAGEOFF]
	ldr	w8, [x20]
	cbz	w8, LBB0_4
; %bb.2:
	mov	x21, #0
	mov	x22, #0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #96]
	add	x0, x8, x21
	bl	_d3d11_release_shader
	add	x22, x22, #1
	ldr	w8, [x20]
	add	x21, x21, #4
	cmp	x22, x8
	b.lo	LBB0_3
LBB0_4:
	ldr	x0, [x19, #88]
	bl	_Release
	ldr	x0, [x19, #80]
	bl	_Release
	ldr	x0, [x19, #72]
	bl	_Release
	ldr	x0, [x19, #64]
	bl	_Release
	ldr	x0, [x19, #56]
	bl	_Release
Lloh2:
	adrp	x20, _RARCH_WRAP_MAX@GOTPAGE
Lloh3:
	ldr	x20, [x20, _RARCH_WRAP_MAX@GOTPAGEOFF]
	ldr	w8, [x20]
	cbz	w8, LBB0_7
; %bb.5:
	mov	x21, #0
Lloh4:
	adrp	x22, _RARCH_FILTER_LINEAR@GOTPAGE
Lloh5:
	ldr	x22, [x22, _RARCH_FILTER_LINEAR@GOTPAGEOFF]
Lloh6:
	adrp	x23, _RARCH_FILTER_NEAREST@GOTPAGE
Lloh7:
	ldr	x23, [x23, _RARCH_FILTER_NEAREST@GOTPAGEOFF]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #48]
	ldr	x9, [x22]
	ldr	x8, [x8, x9, lsl #3]
	lsl	x24, x21, #3
	ldr	x0, [x8, x24]
	bl	_Release
	ldr	x8, [x19, #48]
	ldr	x9, [x23]
	ldr	x8, [x8, x9, lsl #3]
	ldr	x0, [x8, x24]
	bl	_Release
	add	x21, x21, #1
	ldr	w8, [x20]
	cmp	x21, x8
	b.lo	LBB0_6
LBB0_7:
	ldr	x0, [x19, #40]
	bl	_Release
	ldr	x0, [x19, #32]
	bl	_Release
	ldr	x0, [x19, #24]
	bl	_Release
	bl	_font_driver_free_osd
	bl	_video_driver_is_video_cache_context
	cbz	x0, LBB0_10
; %bb.8:
Lloh8:
	adrp	x8, _cached_device_d3d11@GOTPAGE
Lloh9:
	ldr	x8, [x8, _cached_device_d3d11@GOTPAGEOFF]
	ldp	x9, x10, [x19]
Lloh10:
	adrp	x11, _cached_context@GOTPAGE
Lloh11:
	ldr	x11, [x11, _cached_context@GOTPAGEOFF]
Lloh12:
	str	x9, [x8]
Lloh13:
	str	x10, [x11]
	ldr	w8, [x19, #16]
Lloh14:
	adrp	x9, _cached_supportedFeatureLevel@GOTPAGE
Lloh15:
	ldr	x9, [x9, _cached_supportedFeatureLevel@GOTPAGEOFF]
Lloh16:
	str	w8, [x9]
	b	LBB0_11
LBB0_9:
	.cfi_def_cfa wsp, 0
	.cfi_same_value w30
	.cfi_same_value w29
	.cfi_same_value w19
	.cfi_same_value w20
	.cfi_same_value w21
	.cfi_same_value w22
	.cfi_same_value w23
	.cfi_same_value w24
	ret
LBB0_10:
	.cfi_restore_state
	ldr	x0, [x19, #8]
	bl	_Release
	ldr	x0, [x19]
	bl	_Release
LBB0_11:
Lloh17:
	adrp	x20, _D3D11_MAX_GPU_COUNT@GOTPAGE
Lloh18:
	ldr	x20, [x20, _D3D11_MAX_GPU_COUNT@GOTPAGEOFF]
	ldr	w8, [x20]
	cbz	w8, LBB0_16
; %bb.12:
	mov	x21, #0
Lloh19:
	adrp	x22, _d3d11_adapters@GOTPAGE
Lloh20:
	ldr	x22, [x22, _d3d11_adapters@GOTPAGEOFF]
	b	LBB0_14
LBB0_13:                                ;   in Loop: Header=BB0_14 Depth=1
	add	x21, x21, #1
	cmp	x21, w8, uxtw
	b.hs	LBB0_16
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x22]
	ldr	x0, [x9, x21, lsl #3]
	cbz	x0, LBB0_13
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	bl	_Release
	ldr	x8, [x22]
	str	xzr, [x8, x21, lsl #3]
	ldr	w8, [x20]
	b	LBB0_13
LBB0_16:
	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	_free
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotStr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotStr	Lloh10, Lloh11, Lloh13
	.loh AdrpLdrGotStr	Lloh8, Lloh9, Lloh12
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_GFX_MAX_SHADERS,4,2            ; @GFX_MAX_SHADERS
	.comm	_RARCH_WRAP_MAX,4,2             ; @RARCH_WRAP_MAX
	.comm	_RARCH_FILTER_LINEAR,8,3        ; @RARCH_FILTER_LINEAR
	.comm	_RARCH_FILTER_NEAREST,8,3       ; @RARCH_FILTER_NEAREST
	.comm	_cached_device_d3d11,8,3        ; @cached_device_d3d11
	.comm	_cached_context,8,3             ; @cached_context
	.comm	_cached_supportedFeatureLevel,4,2 ; @cached_supportedFeatureLevel
	.comm	_D3D11_MAX_GPU_COUNT,4,2        ; @D3D11_MAX_GPU_COUNT
	.comm	_d3d11_adapters,8,3             ; @d3d11_adapters
	.no_dead_strip	_d3d11_gfx_free
.subsections_via_symbols
