	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function d3d12_gfx_free
_d3d12_gfx_free:                        ## @d3d12_gfx_free
	.cfi_startproc
## %bb.0:
	testq	%rdi, %rdi
	je	LBB0_10
## %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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	callq	_d3d12_gfx_sync
	movq	%r15, %rdi
	callq	_d3d12_free_shader_preset
	xorl	%eax, %eax
	callq	_font_driver_free_osd
	movq	104(%r15), %rdi
	callq	_Release
	movq	256(%r15), %rdi
	callq	_Release
	movq	248(%r15), %rdi
	callq	_Release
	movq	240(%r15), %rdi
	callq	_Release
	movq	232(%r15), %rax
	movq	8(%rax), %rdi
	callq	_Release
	movq	232(%r15), %rax
	movq	(%rax), %rdi
	callq	_Release
	movq	224(%r15), %rdi
	callq	_Release
	movq	216(%r15), %rdi
	callq	_Release
	movq	208(%r15), %rdi
	callq	_Release
	movq	200(%r15), %rdi
	callq	_free
	movq	184(%r15), %rdi
	callq	_free
	movq	168(%r15), %rdi
	callq	_free
	movq	192(%r15), %rdi
	callq	_Release
	movq	176(%r15), %rdi
	callq	_Release
	movq	160(%r15), %rdi
	callq	_Release
	movq	152(%r15), %rdi
	callq	_Release
	movq	144(%r15), %rdi
	callq	_Release
	movq	136(%r15), %rdi
	callq	_Release
	movq	128(%r15), %rdi
	callq	_Release
	movq	_GFX_MAX_SHADERS@GOTPCREL(%rip), %r14
	cmpl	$0, (%r14)
	je	LBB0_4
## %bb.2:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	120(%r15), %rax
	movq	(%rax,%rbx,8), %rdi
	callq	_Release
	incq	%rbx
	movl	(%r14), %eax
	cmpq	%rax, %rbx
	jb	LBB0_3
LBB0_4:
	movq	112(%r15), %rdi
	callq	_Release
	movq	96(%r15), %rdi
	callq	_Release
	movq	88(%r15), %rdi
	callq	_Release
	movq	80(%r15), %rdi
	callq	_Release
	movq	56(%r15), %rdi
	callq	_Release
	movq	72(%r15), %rax
	movq	(%rax), %rdi
	callq	_Release
	movq	72(%r15), %rax
	movq	8(%rax), %rdi
	callq	_Release
	movq	64(%r15), %rdi
	callq	_Release
	movq	48(%r15), %rdi
	callq	_Release
	movq	40(%r15), %rdi
	callq	_Release
	movq	32(%r15), %rdi
	callq	_Release
	movq	24(%r15), %rdi
	callq	_Release
	movq	16(%r15), %rdi
	callq	_Release
	movq	8(%r15), %rdi
	callq	_Release
	movq	_D3D12_MAX_GPU_COUNT@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	testl	%eax, %eax
	je	LBB0_9
## %bb.5:
	xorl	%ebx, %ebx
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=1
	incq	%rbx
	movl	%eax, %ecx
	cmpq	%rcx, %rbx
	jae	LBB0_9
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rcx
	movq	(%rcx,%rbx,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	callq	_Release
	movq	(%r15), %rax
	movq	$0, (%rax,%rbx,8)
	movl	(%r14), %eax
	jmp	LBB0_8
LBB0_9:
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_free                           ## TAILCALL
LBB0_10:
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFX_MAX_SHADERS,4,2            ## @GFX_MAX_SHADERS
	.comm	_D3D12_MAX_GPU_COUNT,4,2        ## @D3D12_MAX_GPU_COUNT
	.no_dead_strip	_d3d12_gfx_free
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function d3d12_gfx_free
_d3d12_gfx_free:                        ; @d3d12_gfx_free
	.cfi_startproc
; %bb.0:
	cbz	x0, LBB0_10
; %bb.1:
	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	x19, x0
	bl	_d3d12_gfx_sync
	mov	x0, x19
	bl	_d3d12_free_shader_preset
	bl	_font_driver_free_osd
	ldr	x0, [x19, #104]
	bl	_Release
	ldr	x0, [x19, #256]
	bl	_Release
	ldr	x0, [x19, #248]
	bl	_Release
	ldr	x0, [x19, #240]
	bl	_Release
	ldr	x8, [x19, #232]
	ldr	x0, [x8, #8]
	bl	_Release
	ldr	x8, [x19, #232]
	ldr	x0, [x8]
	bl	_Release
	ldr	x0, [x19, #224]
	bl	_Release
	ldr	x0, [x19, #216]
	bl	_Release
	ldr	x0, [x19, #208]
	bl	_Release
	ldr	x0, [x19, #200]
	bl	_free
	ldr	x0, [x19, #184]
	bl	_free
	ldr	x0, [x19, #168]
	bl	_free
	ldr	x0, [x19, #192]
	bl	_Release
	ldr	x0, [x19, #176]
	bl	_Release
	ldr	x0, [x19, #160]
	bl	_Release
	ldr	x0, [x19, #152]
	bl	_Release
	ldr	x0, [x19, #144]
	bl	_Release
	ldr	x0, [x19, #136]
	bl	_Release
	ldr	x0, [x19, #128]
	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
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #120]
	ldr	x0, [x8, x21, lsl #3]
	bl	_Release
	add	x21, x21, #1
	ldr	w8, [x20]
	cmp	x21, x8
	b.lo	LBB0_3
LBB0_4:
	ldr	x0, [x19, #112]
	bl	_Release
	ldr	x0, [x19, #96]
	bl	_Release
	ldr	x0, [x19, #88]
	bl	_Release
	ldr	x0, [x19, #80]
	bl	_Release
	ldr	x0, [x19, #56]
	bl	_Release
	ldr	x8, [x19, #72]
	ldr	x0, [x8]
	bl	_Release
	ldr	x8, [x19, #72]
	ldr	x0, [x8, #8]
	bl	_Release
	ldr	x0, [x19, #64]
	bl	_Release
	ldr	x0, [x19, #48]
	bl	_Release
	ldr	x0, [x19, #40]
	bl	_Release
	ldr	x0, [x19, #32]
	bl	_Release
	ldr	x0, [x19, #24]
	bl	_Release
	ldr	x0, [x19, #16]
	bl	_Release
	ldr	x0, [x19, #8]
	bl	_Release
Lloh2:
	adrp	x20, _D3D12_MAX_GPU_COUNT@GOTPAGE
Lloh3:
	ldr	x20, [x20, _D3D12_MAX_GPU_COUNT@GOTPAGEOFF]
	ldr	w8, [x20]
	cbz	w8, LBB0_9
; %bb.5:
	mov	x21, #0
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	x21, x21, #1
	cmp	x21, w8, uxtw
	b.hs	LBB0_9
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x19]
	ldr	x0, [x9, x21, lsl #3]
	cbz	x0, LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	bl	_Release
	ldr	x8, [x19]
	str	xzr, [x8, x21, lsl #3]
	ldr	w8, [x20]
	b	LBB0_6
LBB0_9:
	mov	x0, 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
	b	_free
LBB0_10:
	.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
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_GFX_MAX_SHADERS,4,2            ; @GFX_MAX_SHADERS
	.comm	_D3D12_MAX_GPU_COUNT,4,2        ; @D3D12_MAX_GPU_COUNT
	.no_dead_strip	_d3d12_gfx_free
.subsections_via_symbols
