	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function shader_cleanup
_shader_cleanup:                        ## @shader_cleanup
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	leaq	40(%rdi), %r14
	movq	40(%rdi), %rax
	movq	_WINED3D_SHADER_TYPE_HULL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	leaq	76(%rbx), %r15
	movl	84(%rbx), %edi
	callq	_heap_free
	movl	80(%rbx), %edi
	callq	_heap_free
	jmp	LBB0_4
LBB0_2:
	movq	_WINED3D_SHADER_TYPE_GEOMETRY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.3:
	leaq	72(%rbx), %r15
LBB0_4:
	movl	(%r15), %edi
	callq	_heap_free
LBB0_5:
	movl	68(%rbx), %edi
	callq	_heap_free
	movl	64(%rbx), %edi
	callq	_heap_free
	movl	60(%rbx), %edi
	callq	_heap_free
	movl	56(%rbx), %edi
	callq	_heap_free
	movq	48(%rbx), %rax
	movq	(%rax), %rax
	movq	%rbx, %rdi
	callq	*(%rax)
	movq	%r14, %rdi
	callq	_shader_cleanup_reg_maps
	movl	32(%rbx), %edi
	callq	_heap_free
	leaq	28(%rbx), %rdi
	callq	_shader_delete_constant_list
	leaq	24(%rbx), %rdi
	callq	_shader_delete_constant_list
	leaq	20(%rbx), %rdi
	callq	_shader_delete_constant_list
	leaq	16(%rbx), %rdi
	callq	_list_remove
	movq	8(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmpq	*(%rax)                         ## TAILCALL
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WINED3D_SHADER_TYPE_HULL,8,3   ## @WINED3D_SHADER_TYPE_HULL
	.comm	_WINED3D_SHADER_TYPE_GEOMETRY,8,3 ## @WINED3D_SHADER_TYPE_GEOMETRY
	.no_dead_strip	_shader_cleanup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function shader_cleanup
_shader_cleanup:                        ; @shader_cleanup
	.cfi_startproc
; %bb.0:
	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
	mov	x20, x0
	ldr	x8, [x20, #40]!
Lloh0:
	adrp	x9, _WINED3D_SHADER_TYPE_HULL@GOTPAGE
Lloh1:
	ldr	x9, [x9, _WINED3D_SHADER_TYPE_HULL@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	add	x21, x19, #76
	ldr	w0, [x19, #84]
	bl	_heap_free
	ldr	w0, [x19, #80]
	bl	_heap_free
	b	LBB0_4
LBB0_2:
Lloh3:
	adrp	x9, _WINED3D_SHADER_TYPE_GEOMETRY@GOTPAGE
Lloh4:
	ldr	x9, [x9, _WINED3D_SHADER_TYPE_GEOMETRY@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.3:
	add	x21, x19, #72
LBB0_4:
	ldr	w0, [x21]
	bl	_heap_free
LBB0_5:
	ldr	w0, [x19, #68]
	bl	_heap_free
	ldr	w0, [x19, #64]
	bl	_heap_free
	ldr	w0, [x19, #60]
	bl	_heap_free
	ldr	w0, [x19, #56]
	bl	_heap_free
	ldr	x8, [x19, #48]
	ldr	x8, [x8]
	ldr	x8, [x8]
	mov	x0, x19
	blr	x8
	mov	x0, x20
	bl	_shader_cleanup_reg_maps
	ldr	w0, [x19, #32]
	bl	_heap_free
	add	x0, x19, #28
	bl	_shader_delete_constant_list
	add	x0, x19, #24
	bl	_shader_delete_constant_list
	add	x0, x19, #20
	bl	_shader_delete_constant_list
	add	x0, x19, #16
	bl	_list_remove
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_8
; %bb.6:
	ldr	x0, [x19]
	cbz	x0, LBB0_8
; %bb.7:
	ldr	x1, [x8]
	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
	br	x1
LBB0_8:
	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
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_WINED3D_SHADER_TYPE_HULL,8,3   ; @WINED3D_SHADER_TYPE_HULL
	.comm	_WINED3D_SHADER_TYPE_GEOMETRY,8,3 ; @WINED3D_SHADER_TYPE_GEOMETRY
	.no_dead_strip	_shader_cleanup
.subsections_via_symbols
