	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i915_gem_prime_import          ## -- Begin function i915_gem_prime_import
	.p2align	4, 0x90
_i915_gem_prime_import:                 ## @i915_gem_prime_import
	.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	%rsi, %rbx
	movq	%rdi, %r14
	movq	8(%rsi), %rax
	cmpq	_i915_dmabuf_ops@GOTPCREL(%rip), %rax
	jne	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_dma_buf_to_obj
	cmpq	%r14, 16(%rax)
	je	LBB0_5
LBB0_2:
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_dma_buf_attach
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_3
## %bb.6:
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_CAST                       ## TAILCALL
LBB0_3:
	movq	%rbx, %rdi
	callq	_get_dma_buf
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	callq	_i915_gem_object_alloc
	testq	%rax, %rax
	je	LBB0_7
## %bb.4:
	movq	%rax, %r12
	movl	4(%rbx), %edx
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_drm_gem_private_object_init
	movq	_i915_gem_object_dmabuf_ops@GOTPCREL(%rip), %rsi
	movq	%r12, %rdi
	callq	_i915_gem_object_init
	movq	%r15, 8(%r12)
	movl	(%rbx), %eax
	movl	%eax, (%r12)
	movq	_I915_GEM_DOMAIN_GTT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%r12)
	movq	$0, 24(%r12)
	movq	%r12, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	%rax, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_i915_gem_object_get            ## TAILCALL
LBB0_7:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r13d
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_dma_buf_detach
	movq	%rbx, %rdi
	callq	_dma_buf_put
	movl	%r13d, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_i915_dmabuf_ops,4,2            ## @i915_dmabuf_ops
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_i915_gem_object_dmabuf_ops,4,2 ## @i915_gem_object_dmabuf_ops
	.comm	_I915_GEM_DOMAIN_GTT,4,2        ## @I915_GEM_DOMAIN_GTT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i915_gem_prime_import          ; -- Begin function i915_gem_prime_import
	.p2align	2
_i915_gem_prime_import:                 ; @i915_gem_prime_import
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x1
	mov	x20, x0
	ldr	x8, [x1, #8]
Lloh0:
	adrp	x9, _i915_dmabuf_ops@GOTPAGE
Lloh1:
	ldr	x9, [x9, _i915_dmabuf_ops@GOTPAGEOFF]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_dma_buf_to_obj
	ldr	x8, [x0, #16]
	cmp	x8, x20
	b.eq	LBB0_6
LBB0_2:
	ldr	w1, [x20]
	mov	x0, x19
	bl	_dma_buf_attach
	mov	x21, x0
	bl	_IS_ERR
	cbz	x0, LBB0_4
; %bb.3:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_ERR_CAST
LBB0_4:
	mov	x0, x19
	bl	_get_dma_buf
	bl	_i915_gem_object_alloc
	cbz	x0, LBB0_7
; %bb.5:
	mov	x22, x0
	ldr	w2, [x19, #4]
	mov	x0, x20
	mov	x1, x22
	bl	_drm_gem_private_object_init
Lloh2:
	adrp	x1, _i915_gem_object_dmabuf_ops@GOTPAGE
Lloh3:
	ldr	x1, [x1, _i915_gem_object_dmabuf_ops@GOTPAGEOFF]
	mov	x0, x22
	bl	_i915_gem_object_init
	str	x21, [x22, #8]
	ldr	w8, [x19]
	str	w8, [x22]
Lloh4:
	adrp	x8, _I915_GEM_DOMAIN_GTT@GOTPAGE
Lloh5:
	ldr	x8, [x8, _I915_GEM_DOMAIN_GTT@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	str	w8, [x22, #32]
	str	xzr, [x22, #24]
	mov	x0, x22
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_i915_gem_object_get
LBB0_7:
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w20, w8
	mov	x0, x19
	mov	x1, x21
	bl	_dma_buf_detach
	mov	x0, x19
	bl	_dma_buf_put
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_ERR_PTR
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_i915_dmabuf_ops,4,2            ; @i915_dmabuf_ops
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_i915_gem_object_dmabuf_ops,4,2 ; @i915_gem_object_dmabuf_ops
	.comm	_I915_GEM_DOMAIN_GTT,4,2        ; @I915_GEM_DOMAIN_GTT
.subsections_via_symbols
