	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i915_gem_object_pin_map        ## -- Begin function i915_gem_object_pin_map
	.p2align	4, 0x90
_i915_gem_object_pin_map:               ## @i915_gem_object_pin_map
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r12d
	movq	%rdi, %r15
	callq	_i915_gem_object_has_struct_page
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
	jmp	LBB0_4
LBB0_2:
	leaq	4(%r15), %rbx
	movq	%rbx, %rdi
	callq	_mutex_lock_interruptible
	testl	%eax, %eax
	je	LBB0_5
## %bb.3:
	movl	%eax, %edi
LBB0_4:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_5:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	_I915_MAP_OVERRIDE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	xorl	%r13d, %r13d
	testl	%r12d, %ebx
	sete	%r14b
	movq	%r15, %rdi
	callq	_atomic_inc_not_zero
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movb	%r14b, %r13b
	jmp	LBB0_11
LBB0_7:
	movq	%r15, %rdi
	callq	_i915_gem_object_has_pages
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_10
## %bb.8:
	movq	%r15, %rdi
	callq	_i915_gem_object_has_pinned_pages
	movl	%eax, %edi
	callq	_GEM_BUG_ON
	movq	%r15, %rdi
	callq	_____i915_gem_object_get_pages
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_16
## %bb.9:
	xorl	%eax, %eax
	callq	_smp_mb__before_atomic
LBB0_10:
	movq	%r15, %rdi
	callq	_atomic_inc
	xorl	%r13d, %r13d
LBB0_11:
	notl	%ebx
	andl	%r12d, %ebx
	movq	%r15, %rdi
	callq	_i915_gem_object_has_pages
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_GEM_BUG_ON
	movq	8(%r15), %rdi
	leaq	-52(%rbp), %rsi
	callq	_page_unpack_bits
	testq	%rax, %rax
	je	LBB0_21
## %bb.12:
	movq	%rax, %r12
	cmpl	%ebx, -52(%rbp)
	je	LBB0_24
## %bb.13:
	testl	%r13d, %r13d
	je	LBB0_17
## %bb.14:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_17:
	movq	%r12, %rdi
	callq	_is_vmalloc_addr
	movq	%r12, %rdi
	testq	%rax, %rax
	je	LBB0_19
## %bb.18:
	callq	_vunmap
	jmp	LBB0_20
LBB0_19:
	callq	_kmap_to_page
	movl	%eax, %edi
	callq	_kunmap
LBB0_20:
	movq	$0, 8(%r15)
LBB0_21:
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_i915_gem_object_map
	testq	%rax, %rax
	je	LBB0_22
## %bb.23:
	movq	%rax, %r12
	movq	%rax, %rdi
	movl	%ebx, %esi
	callq	_page_pack_bits
	movq	%rax, 8(%r15)
	jmp	LBB0_24
LBB0_22:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_15:
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	movq	%r15, %rdi
	callq	_atomic_dec
LBB0_16:
	movl	%r13d, %edi
	callq	_ERR_PTR
	movq	%rax, %r12
LBB0_24:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	movq	%r12, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_I915_MAP_OVERRIDE,4,2          ## @I915_MAP_OVERRIDE
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i915_gem_object_pin_map        ; -- Begin function i915_gem_object_pin_map
	.p2align	2
_i915_gem_object_pin_map:               ; @i915_gem_object_pin_map
	.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	x21, x1
	mov	x20, x0
	bl	_i915_gem_object_has_struct_page
	cmp	w0, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _ENXIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_3
LBB0_2:
	add	x19, x20, #4
	mov	x0, x19
	bl	_mutex_lock_interruptible
	cbz	w0, LBB0_4
LBB0_3:
	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
	b	_ERR_PTR
LBB0_4:
Lloh3:
	adrp	x8, _I915_MAP_OVERRIDE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _I915_MAP_OVERRIDE@GOTPAGEOFF]
Lloh5:
	ldr	w23, [x8]
	tst	w23, w21
	cset	w24, eq
	mov	x0, x20
	bl	_atomic_inc_not_zero
	cbnz	w0, LBB0_9
; %bb.5:
	mov	x0, x20
	bl	_i915_gem_object_has_pages
	cmp	w0, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_8
; %bb.6:
	mov	x0, x20
	bl	_i915_gem_object_has_pinned_pages
	bl	_GEM_BUG_ON
	mov	x0, x20
	bl	_____i915_gem_object_get_pages
	mov	x22, x0
	cbnz	w0, LBB0_21
; %bb.7:
	bl	_smp_mb__before_atomic
LBB0_8:
	mov	x0, x20
	bl	_atomic_inc
	mov	w24, #0
LBB0_9:
	bic	w21, w21, w23
	mov	x0, x20
	bl	_i915_gem_object_has_pages
	cmp	w0, #0
	cset	w0, eq
	bl	_GEM_BUG_ON
	ldr	x0, [x20, #8]
	add	x1, sp, #12
	bl	_page_unpack_bits
	cbz	x0, LBB0_17
; %bb.10:
	mov	x22, x0
	ldr	w8, [sp, #12]
	cmp	w8, w21
	b.eq	LBB0_22
; %bb.11:
	cbz	w24, LBB0_13
; %bb.12:
Lloh6:
	adrp	x8, _EBUSY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_20
LBB0_13:
	mov	x0, x22
	bl	_is_vmalloc_addr
	cbz	x0, LBB0_15
; %bb.14:
	mov	x0, x22
	bl	_vunmap
	b	LBB0_16
LBB0_15:
	mov	x0, x22
	bl	_kmap_to_page
	bl	_kunmap
LBB0_16:
	str	xzr, [x20, #8]
LBB0_17:
	mov	x0, x20
	mov	x1, x21
	bl	_i915_gem_object_map
	cbz	x0, LBB0_19
; %bb.18:
	mov	x22, x0
	mov	x1, x21
	bl	_page_pack_bits
	str	x0, [x20, #8]
	b	LBB0_22
LBB0_19:
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_20:
	ldr	w8, [x8]
	neg	w22, w8
	mov	x0, x20
	bl	_atomic_dec
LBB0_21:
	mov	x0, x22
	bl	_ERR_PTR
	mov	x22, x0
LBB0_22:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x22
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_I915_MAP_OVERRIDE,4,2          ; @I915_MAP_OVERRIDE
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
