	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___i915_gem_object_put_pages    ## -- Begin function __i915_gem_object_put_pages
	.p2align	4, 0x90
___i915_gem_object_put_pages:           ## @__i915_gem_object_put_pages
	.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
	movl	%esi, %ebx
	movq	%rdi, %r15
	callq	_i915_gem_object_has_pinned_pages
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_10
LBB0_2:
	leaq	16(%r15), %rdi
	callq	_atomic_read
	movl	%eax, %edi
	callq	_GEM_BUG_ON
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_mutex_lock_nested
	leaq	4(%r15), %rdi
	callq	_atomic_read
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_9
LBB0_4:
	movq	%r15, %rdi
	callq	___i915_gem_object_unset_pages
	movq	%rax, %r14
	testq	%rax, %rax
	jne	LBB0_7
## %bb.5:
	movq	%r15, %rdi
	callq	_i915_gem_object_needs_async_cancel
	xorl	%r14d, %r14d
	testl	%eax, %eax
	jne	LBB0_7
## %bb.6:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	movl	%r14d, %edi
	callq	_ERR_PTR
	movq	%rax, %r14
LBB0_7:
	movq	%r14, %rdi
	callq	_IS_ERR
	xorl	%ebx, %ebx
	testl	%eax, %eax
	jne	LBB0_9
## %bb.8:
	movq	8(%r15), %rax
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	*(%rax)
LBB0_9:
	movq	%r15, %rdi
	callq	_mutex_unlock
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___i915_gem_object_put_pages    ; -- Begin function __i915_gem_object_put_pages
	.p2align	2
___i915_gem_object_put_pages:           ; @__i915_gem_object_put_pages
	.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, x1
	mov	x19, x0
	bl	_i915_gem_object_has_pinned_pages
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EBUSY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_12
LBB0_2:
	add	x0, x19, #16
	bl	_atomic_read
	bl	_GEM_BUG_ON
	mov	x0, x19
	mov	x1, x20
	bl	_mutex_lock_nested
	add	x0, x19, #4
	bl	_atomic_read
	bl	_unlikely
	cbz	x0, LBB0_4
; %bb.3:
Lloh3:
	adrp	x8, _EBUSY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_11
LBB0_4:
	mov	x0, x19
	bl	___i915_gem_object_unset_pages
	mov	x20, x0
	cbnz	x0, LBB0_8
; %bb.5:
	mov	x0, x19
	bl	_i915_gem_object_needs_async_cancel
	cbz	w0, LBB0_7
; %bb.6:
	mov	x20, #0
	b	LBB0_8
LBB0_7:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
	bl	_ERR_PTR
	mov	x20, x0
LBB0_8:
	mov	x0, x20
	bl	_IS_ERR
	cbnz	w0, LBB0_10
; %bb.9:
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	mov	x0, x19
	mov	x1, x20
	blr	x8
LBB0_10:
	mov	w20, #0
LBB0_11:
	mov	x0, x19
	bl	_mutex_unlock
LBB0_12:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
