	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r12
	movq	16(%rsi), %rax
	cmpq	_i915_dmabuf_ops@GOTPCREL(%rip), %rax
	jne	LBB0_3
## %bb.1:
	movq	8(%rbx), %r15
	cmpq	%r12, 8(%r15)
	je	LBB0_2
LBB0_3:
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_dma_buf_attach
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_4
## %bb.11:
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_CAST                       ## TAILCALL
LBB0_4:
	movq	%rbx, %rdi
	callq	_get_dma_buf
	movq	%r12, %rdi
	callq	_i915_gem_object_alloc
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%rax, %r15
	movl	(%rbx), %edx
	movq	%r12, %rdi
	movq	%rax, %rsi
	callq	_drm_gem_private_object_init
	testl	%eax, %eax
	je	LBB0_9
## %bb.7:
	movl	%eax, %r12d
	movq	%r15, %rdi
	callq	_i915_gem_object_free
	jmp	LBB0_8
LBB0_2:
	movq	%r15, %rdi
	callq	_drm_gem_object_reference
	jmp	LBB0_10
LBB0_5:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_8:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_dma_buf_detach
	movq	%rbx, %rdi
	callq	_dma_buf_put
	movl	%r12d, %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_9:
	movq	_i915_gem_object_dmabuf_ops@GOTPCREL(%rip), %rsi
	movq	%r15, %rdi
	callq	_i915_gem_object_init
	movq	%r14, (%r15)
LBB0_10:
	movq	%r15, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.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
.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	x22, x0
	ldr	x8, [x1, #16]
Lloh0:
	adrp	x9, _i915_dmabuf_ops@GOTPAGE
Lloh1:
	ldr	x9, [x9, _i915_dmabuf_ops@GOTPAGEOFF]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	ldr	x21, [x19, #8]
	ldr	x8, [x21, #8]
	cmp	x8, x22
	b.eq	LBB0_7
LBB0_2:
	ldr	w1, [x22]
	mov	x0, x19
	bl	_dma_buf_attach
	mov	x20, x0
	bl	_IS_ERR
	cbz	x0, LBB0_4
; %bb.3:
	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_CAST
LBB0_4:
	mov	x0, x19
	bl	_get_dma_buf
	mov	x0, x22
	bl	_i915_gem_object_alloc
	cbz	x0, LBB0_8
; %bb.5:
	mov	x21, x0
	ldr	w2, [x19]
	mov	x0, x22
	mov	x1, x21
	bl	_drm_gem_private_object_init
	cbz	w0, LBB0_10
; %bb.6:
	mov	x22, x0
	mov	x0, x21
	bl	_i915_gem_object_free
	b	LBB0_9
LBB0_7:
	mov	x0, x21
	bl	_drm_gem_object_reference
	b	LBB0_11
LBB0_8:
Lloh2:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_9:
	mov	x0, x19
	mov	x1, x20
	bl	_dma_buf_detach
	mov	x0, x19
	bl	_dma_buf_put
	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
	b	_ERR_PTR
LBB0_10:
Lloh5:
	adrp	x1, _i915_gem_object_dmabuf_ops@GOTPAGE
Lloh6:
	ldr	x1, [x1, _i915_gem_object_dmabuf_ops@GOTPAGEOFF]
	mov	x0, x21
	bl	_i915_gem_object_init
	str	x20, [x21]
LBB0_11:
	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
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.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
.subsections_via_symbols
