	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i915_gem_pin_ioctl             ## -- Begin function i915_gem_pin_ioctl
	.p2align	4, 0x90
_i915_gem_pin_ioctl:                    ## @i915_gem_pin_ioctl
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r12
	movq	%rsi, %r15
	movq	%rdi, %r13
	callq	_i915_mutex_lock_interruptible
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_12
## %bb.1:
	movl	8(%r15), %edx
	movq	%r13, %rdi
	movq	%r12, %rsi
	callq	_drm_gem_object_lookup
	movl	%eax, %edi
	callq	_to_intel_bo
	movq	%rax, %rbx
	leaq	16(%rax), %rdx
	movq	(%rax), %rax
	movq	_I915_MADV_WILLNEED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	jne	LBB0_2
## %bb.4:
	movq	24(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:
	cmpq	%r12, %rax
	je	LBB0_7
## %bb.6:
	movl	8(%r15), %esi
	leaq	L_.str.1(%rip), %rdi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_DRM_ERROR
	jmp	LBB0_3
LBB0_2:
	leaq	L_.str(%rip), %rdi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_DRM_ERROR
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	jmp	LBB0_11
LBB0_7:
	movq	8(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_8
LBB0_10:
	incq	%rax
	movq	%rax, 8(%rbx)
	movq	%r12, 24(%rbx)
	movq	%rbx, %rdi
	callq	_i915_gem_object_flush_cpu_write_domain
	movl	20(%rbx), %eax
	movl	%eax, (%r15)
	xorl	%r14d, %r14d
	jmp	LBB0_11
LBB0_8:
	movl	4(%r15), %esi
	movq	%rbx, %rdi
	movl	$1, %edx
	xorl	%ecx, %ecx
	callq	_i915_gem_object_pin
	movl	%eax, %r14d
	testl	%eax, %eax
	je	LBB0_9
LBB0_11:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_drm_gem_object_unreference
	movq	%r13, %rdi
	callq	_mutex_unlock
LBB0_12:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	8(%rbx), %rax
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_I915_MADV_WILLNEED,8,3         ## @I915_MADV_WILLNEED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Attempting to pin a purgeable buffer\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"Already pinned in i915_gem_pin_ioctl(): %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i915_gem_pin_ioctl             ; -- Begin function i915_gem_pin_ioctl
	.p2align	2
_i915_gem_pin_ioctl:                    ; @i915_gem_pin_ioctl
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x22, x2
	mov	x21, x1
	mov	x19, x0
	bl	_i915_mutex_lock_interruptible
	mov	x24, x0
	cbnz	w0, LBB0_9
; %bb.1:
	ldr	w2, [x21, #8]
	mov	x0, x19
	mov	x1, x22
	bl	_drm_gem_object_lookup
	bl	_to_intel_bo
	mov	x20, x0
	ldr	x8, [x20], #16
Lloh0:
	adrp	x9, _I915_MADV_WILLNEED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _I915_MADV_WILLNEED@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.2:
	mov	x23, x0
	ldr	x8, [x0, #24]
	cmp	x8, #0
	ccmp	x8, x22, #4, ne
	b.ne	LBB0_6
; %bb.3:
	ldr	x8, [x23, #8]
	cbz	x8, LBB0_10
LBB0_4:
	add	x8, x8, #1
	str	x8, [x23, #8]
	str	x22, [x23, #24]
	mov	x0, x23
	bl	_i915_gem_object_flush_cpu_write_domain
	mov	w24, #0
	ldr	w8, [x23, #20]
	str	w8, [x21]
	b	LBB0_8
LBB0_5:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_7
LBB0_6:
	ldr	w8, [x21, #8]
	str	x8, [sp]
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_7:
	bl	_DRM_ERROR
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w24, w8
LBB0_8:
	mov	x0, x20
	bl	_drm_gem_object_unreference
	mov	x0, x19
	bl	_mutex_unlock
LBB0_9:
	mov	x0, x24
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_10:
	ldr	w1, [x21, #4]
	mov	x0, x23
	mov	w2, #1
	mov	w3, #0
	bl	_i915_gem_object_pin
	mov	x24, x0
	cbnz	w0, LBB0_8
; %bb.11:
	ldr	x8, [x23, #8]
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_I915_MADV_WILLNEED,8,3         ; @I915_MADV_WILLNEED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Attempting to pin a purgeable buffer\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"Already pinned in i915_gem_pin_ioctl(): %d\n"

.subsections_via_symbols
