	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function free_vgpu_fence
_free_vgpu_fence:                       ## @free_vgpu_fence
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	8(%rdi), %rax
	movq	(%rax), %r14
	callq	_vgpu_fence_sz
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_1
## %bb.5:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%r14, %rdi
	callq	_intel_runtime_pm_get
	leaq	4(%r14), %r15
	movq	%r15, %rdi
	callq	_mutex_lock
	movq	%r12, %rdi
	callq	__clear_vgpu_fence
	movq	%r12, %rdi
	callq	_vgpu_fence_sz
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rax
	movq	(%rax,%rbx,8), %rdi
	callq	_i915_unreserve_fence
	movq	(%r12), %rax
	movq	$0, (%rax,%rbx,8)
	incq	%rbx
	movq	%r12, %rdi
	callq	_vgpu_fence_sz
	cmpq	%rax, %rbx
	jb	LBB0_3
LBB0_4:
	movq	%r15, %rdi
	callq	_mutex_unlock
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_intel_runtime_pm_put_unchecked ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_free_vgpu_fence
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function free_vgpu_fence
_free_vgpu_fence:                       ; @free_vgpu_fence
	.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	x20, x0
	ldr	x8, [x0, #8]
	ldr	x19, [x8]
	bl	_vgpu_fence_sz
	cmp	x0, #0
	cset	w0, eq
	bl	_WARN_ON
	cbz	x0, LBB0_2
; %bb.1:
	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
	ret
LBB0_2:
	mov	x0, x19
	bl	_intel_runtime_pm_get
	add	x21, x19, #4
	mov	x0, x21
	bl	_mutex_lock
	mov	x0, x20
	bl	__clear_vgpu_fence
	mov	x0, x20
	bl	_vgpu_fence_sz
	cbz	x0, LBB0_5
; %bb.3:
	mov	x22, #0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20]
	lsl	x23, x22, #3
	ldr	x0, [x8, x23]
	bl	_i915_unreserve_fence
	ldr	x8, [x20]
	str	xzr, [x8, x23]
	add	x22, x22, #1
	mov	x0, x20
	bl	_vgpu_fence_sz
	cmp	x22, x0
	b.lo	LBB0_4
LBB0_5:
	mov	x0, x21
	bl	_mutex_unlock
	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	_intel_runtime_pm_put_unchecked
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_free_vgpu_fence
.subsections_via_symbols
