	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_ring_unpin               ## -- Begin function intel_ring_unpin
	.p2align	4, 0x90
_intel_ring_unpin:                      ## @intel_ring_unpin
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	16(%rdi), %r14
	addq	$12, %rdi
	callq	_atomic_dec_and_test
	testl	%eax, %eax
	je	LBB0_5
## %bb.1:
	movl	8(%rbx), %esi
	movq	%rbx, %rdi
	callq	_intel_ring_reset
	movq	%r14, %rdi
	callq	_i915_vma_unset_ggtt_write
	movq	%r14, %rdi
	callq	_i915_vma_is_map_and_fenceable
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	%r14, %rdi
	callq	_i915_vma_unpin_iomap
	jmp	LBB0_4
LBB0_5:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_3:
	movl	(%r14), %edi
	callq	_i915_gem_object_unpin_map
LBB0_4:
	xorl	%edi, %edi
	cmpq	$0, (%rbx)
	sete	%dil
	callq	_GEM_BUG_ON
	movq	$0, (%rbx)
	movq	%r14, %rdi
	callq	_i915_vma_unpin
	movq	%r14, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_i915_vma_make_purgeable        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_ring_unpin               ; -- Begin function intel_ring_unpin
	.p2align	2
_intel_ring_unpin:                      ; @intel_ring_unpin
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x0
	ldr	x19, [x0, #16]
	add	x0, x0, #12
	bl	_atomic_dec_and_test
	cbz	w0, LBB0_3
; %bb.1:
	ldr	w1, [x20, #8]
	mov	x0, x20
	bl	_intel_ring_reset
	mov	x0, x19
	bl	_i915_vma_unset_ggtt_write
	mov	x0, x19
	bl	_i915_vma_is_map_and_fenceable
	cbz	x0, LBB0_4
; %bb.2:
	mov	x0, x19
	bl	_i915_vma_unpin_iomap
	b	LBB0_5
LBB0_3:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_4:
	ldr	w0, [x19]
	bl	_i915_gem_object_unpin_map
LBB0_5:
	ldr	x8, [x20]
	cmp	x8, #0
	cset	w0, eq
	bl	_GEM_BUG_ON
	str	xzr, [x20]
	mov	x0, x19
	bl	_i915_vma_unpin
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_i915_vma_make_purgeable
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
