	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function d3d10_gfx_free
_d3d10_gfx_free:                        ## @d3d10_gfx_free
	.cfi_startproc
## %bb.0:
	testq	%rdi, %rdi
	je	LBB0_13
## %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	_d3d10_free_shader_preset
	movq	144(%r15), %rdi
	callq	_d3d10_release_texture
	movq	136(%r15), %rdi
	callq	_Release
	movq	128(%r15), %rdi
	callq	_Release
	leaq	120(%r15), %rdi
	callq	_d3d10_release_texture
	movq	112(%r15), %rdi
	callq	_Release
	leaq	108(%r15), %rdi
	callq	_d3d10_release_shader
	leaq	104(%r15), %rdi
	callq	_d3d10_release_shader
	movq	96(%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	88(%r15), %rdi
	addq	%r12, %rdi
	callq	_d3d10_release_shader
	incq	%rbx
	movl	(%r14), %eax
	addq	$4, %r12
	cmpq	%rax, %rbx
	jb	LBB0_3
LBB0_4:
	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	48(%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	40(%r15), %rax
	movq	(%r12), %rcx
	movq	(%rax,%rcx,8), %rax
	movq	(%rax,%rbx,8), %rdi
	callq	_Release
	movq	40(%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	32(%r15), %rdi
	callq	_Release
	movq	24(%r15), %rdi
	callq	_Release
	movq	16(%r15), %rdi
	callq	_Release
	xorl	%eax, %eax
	callq	_font_driver_free_osd
	movq	(%r15), %rdi
	callq	_Release
	movq	_D3D10_MAX_GPU_COUNT@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	testl	%eax, %eax
	je	LBB0_12
## %bb.8:
	xorl	%ebx, %ebx
	movq	_d3d10_adapters@GOTPCREL(%rip), %r12
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_9 Depth=1
	incq	%rbx
	movl	%eax, %ecx
	cmpq	%rcx, %rbx
	jae	LBB0_12
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rcx
	movq	(%rcx,%rbx,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	callq	_Release
	movq	(%r12), %rax
	movq	$0, (%rax,%rbx,8)
	movl	(%r14), %eax
	jmp	LBB0_11
LBB0_12:
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_free                           ## TAILCALL
LBB0_13:
	retq
	.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	_D3D10_MAX_GPU_COUNT,4,2        ## @D3D10_MAX_GPU_COUNT
	.comm	_d3d10_adapters,8,3             ## @d3d10_adapters
	.comm	_cached_context,4,2             ## @cached_context
	.comm	_cached_device_d3d10,8,3        ## @cached_device_d3d10
	.no_dead_strip	_d3d10_gfx_free
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function d3d10_gfx_free
_d3d10_gfx_free:                        ; @d3d10_gfx_free
	.cfi_startproc
; %bb.0:
	cbz	x0, LBB0_13
; %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
	mov	x19, x0
	bl	_d3d10_free_shader_preset
	ldr	x0, [x19, #144]
	bl	_d3d10_release_texture
	ldr	x0, [x19, #136]
	bl	_Release
	ldr	x0, [x19, #128]
	bl	_Release
	add	x0, x19, #120
	bl	_d3d10_release_texture
	ldr	x0, [x19, #112]
	bl	_Release
	add	x0, x19, #108
	bl	_d3d10_release_shader
	add	x0, x19, #104
	bl	_d3d10_release_shader
	ldr	x0, [x19, #96]
	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, #88]
	add	x0, x8, x21
	bl	_d3d10_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, #80]
	bl	_Release
	ldr	x0, [x19, #72]
	bl	_Release
	ldr	x0, [x19, #64]
	bl	_Release
	ldr	x0, [x19, #56]
	bl	_Release
	ldr	x0, [x19, #48]
	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, #40]
	ldr	x9, [x22]
	ldr	x8, [x8, x9, lsl #3]
	lsl	x24, x21, #3
	ldr	x0, [x8, x24]
	bl	_Release
	ldr	x8, [x19, #40]
	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, #32]
	bl	_Release
	ldr	x0, [x19, #24]
	bl	_Release
	ldr	x0, [x19, #16]
	bl	_Release
	bl	_font_driver_free_osd
	ldr	x0, [x19]
	bl	_Release
Lloh8:
	adrp	x20, _D3D10_MAX_GPU_COUNT@GOTPAGE
Lloh9:
	ldr	x20, [x20, _D3D10_MAX_GPU_COUNT@GOTPAGEOFF]
	ldr	w8, [x20]
	cbz	w8, LBB0_12
; %bb.8:
	mov	x21, #0
Lloh10:
	adrp	x22, _d3d10_adapters@GOTPAGE
Lloh11:
	ldr	x22, [x22, _d3d10_adapters@GOTPAGEOFF]
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	add	x21, x21, #1
	cmp	x21, w8, uxtw
	b.hs	LBB0_12
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x22]
	ldr	x0, [x9, x21, lsl #3]
	cbz	x0, LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	bl	_Release
	ldr	x8, [x22]
	str	xzr, [x8, x21, lsl #3]
	ldr	w8, [x20]
	b	LBB0_9
LBB0_12:
	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
LBB0_13:
	.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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.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	_D3D10_MAX_GPU_COUNT,4,2        ; @D3D10_MAX_GPU_COUNT
	.comm	_d3d10_adapters,8,3             ; @d3d10_adapters
	.comm	_cached_context,4,2             ; @cached_context
	.comm	_cached_device_d3d10,8,3        ; @cached_device_d3d10
	.no_dead_strip	_d3d10_gfx_free
.subsections_via_symbols
