	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fb_create
_fb_create:                             ## @fb_create
	.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	%rdx, %rbx
	movq	%rsi, %r14
	movq	(%rdi), %r12
	movq	_fb_funcs@GOTPCREL(%rip), %rcx
	callq	_drm_gem_fb_create_with_funcs
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_IS_ERR_OR_NULL
	testq	%rax, %rax
	je	LBB0_1
LBB0_6:
	movq	%r15, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	(%rbx), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_drm_gem_object_lookup
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_drm_gem_object_put_unlocked
	movl	(%r12), %r14d
	movq	%rbx, %rdi
	callq	_xen_drm_front_dbuf_to_cookie
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_xen_drm_front_fb_to_cookie
	movl	12(%r15), %ecx
	movl	8(%r15), %r8d
	movq	(%r15), %rdx
	movl	(%rdx), %r9d
	movl	%r14d, %edi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_xen_drm_front_fb_attach
	testl	%eax, %eax
	jns	LBB0_6
## %bb.4:
	movl	%eax, %r14d
	leaq	L_.str.1(%rip), %rdi
	movq	%r15, %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_DRM_ERROR
	jmp	LBB0_5
LBB0_2:
	leaq	L_.str(%rip), %rdi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_DRM_ERROR
	movq	_ENOENT@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
LBB0_5:
	movq	%r15, %rdi
	callq	_drm_gem_fb_destroy
	movl	%r14d, %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_fb_funcs,4,2                   ## @fb_funcs
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to lookup GEM object\n"

	.comm	_ENOENT,4,2                     ## @ENOENT
L_.str.1:                               ## @.str.1
	.asciz	"Back failed to attach FB %p: %d\n"

	.no_dead_strip	_fb_create
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fb_create
_fb_create:                             ; @fb_create
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x21, x2
	mov	x20, x1
	ldr	x22, [x0]
Lloh0:
	adrp	x3, _fb_funcs@GOTPAGE
Lloh1:
	ldr	x3, [x3, _fb_funcs@GOTPAGEOFF]
	bl	_drm_gem_fb_create_with_funcs
	mov	x19, x0
	bl	_IS_ERR_OR_NULL
	cbz	x0, LBB0_2
LBB0_1:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_2:
	ldr	x8, [x21]
	ldr	w1, [x8]
	mov	x0, x20
	bl	_drm_gem_object_lookup
	cbz	x0, LBB0_5
; %bb.3:
	mov	x20, x0
	bl	_drm_gem_object_put_unlocked
	ldr	w21, [x22]
	mov	x0, x20
	bl	_xen_drm_front_dbuf_to_cookie
	mov	x20, x0
	mov	x0, x19
	bl	_xen_drm_front_fb_to_cookie
	mov	x2, x0
	ldp	w4, w3, [x19, #8]
	ldr	x8, [x19]
	ldr	w5, [x8]
	mov	x0, x21
	mov	x1, x20
	bl	_xen_drm_front_fb_attach
	tbz	w0, #31, LBB0_1
; %bb.4:
	mov	x20, x0
	stp	x19, x20, [sp]
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_ERROR
	b	LBB0_6
LBB0_5:
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
Lloh6:
	adrp	x8, _ENOENT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_6:
	mov	x0, x19
	bl	_drm_gem_fb_destroy
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	b	_ERR_PTR
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_fb_funcs,4,2                   ; @fb_funcs
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to lookup GEM object\n"

	.comm	_ENOENT,4,2                     ; @ENOENT
l_.str.1:                               ; @.str.1
	.asciz	"Back failed to attach FB %p: %d\n"

	.no_dead_strip	_fb_create
.subsections_via_symbols
