	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function virtio_gpu_user_framebuffer_create
_virtio_gpu_user_framebuffer_create:    ## @virtio_gpu_user_framebuffer_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	%rdi, %r14
	movq	(%rdx), %rax
	movq	_DRM_FORMAT_HOST_XRGB8888@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_4
## %bb.1:
	movq	_DRM_FORMAT_HOST_ARGB8888@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_4
## %bb.2:
	movq	_ENOENT@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_4:
	movq	8(%rbx), %rax
	movl	(%rax), %eax
	movq	%rsi, %rdi
	movl	%eax, %esi
	callq	_drm_gem_object_lookup
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%rax, %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$4, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movq	%rax, %r12
	movq	%r14, %rdi
	movq	%rax, %rsi
	movq	%rbx, %rdx
	movq	%r15, %rcx
	callq	_virtio_gpu_framebuffer_init
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:
	movq	%r12, %rdi
	callq	_kfree
	movq	%r15, %rdi
	callq	_drm_gem_object_put_unlocked
	xorl	%r12d, %r12d
LBB0_10:
	movq	%r12, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_7:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_3:
	xorl	%edi, %edi
	subl	(%rax), %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_DRM_FORMAT_HOST_XRGB8888,8,3   ## @DRM_FORMAT_HOST_XRGB8888
	.comm	_DRM_FORMAT_HOST_ARGB8888,8,3   ## @DRM_FORMAT_HOST_ARGB8888
	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_virtio_gpu_user_framebuffer_create
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function virtio_gpu_user_framebuffer_create
_virtio_gpu_user_framebuffer_create:    ; @virtio_gpu_user_framebuffer_create
	.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
	ldr	x8, [x2]
Lloh0:
	adrp	x9, _DRM_FORMAT_HOST_XRGB8888@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DRM_FORMAT_HOST_XRGB8888@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
Lloh3:
	adrp	x10, _DRM_FORMAT_HOST_ARGB8888@GOTPAGE
Lloh4:
	ldr	x10, [x10, _DRM_FORMAT_HOST_ARGB8888@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_6
; %bb.1:
	mov	x19, x2
	mov	x20, x0
	ldr	x8, [x2, #8]
	ldr	w8, [x8]
	mov	x0, x1
	mov	x1, x8
	bl	_drm_gem_object_lookup
	cbz	x0, LBB0_7
; %bb.2:
	mov	x21, x0
Lloh6:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	w0, #4
	bl	_kzalloc
	cbz	x0, LBB0_8
; %bb.3:
	mov	x22, x0
	mov	x0, x20
	mov	x1, x22
	mov	x2, x19
	mov	x3, x21
	bl	_virtio_gpu_framebuffer_init
	cbz	w0, LBB0_5
; %bb.4:
	mov	x0, x22
	bl	_kfree
	mov	x0, x21
	bl	_drm_gem_object_put_unlocked
	mov	x22, #0
LBB0_5:
	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:
Lloh9:
	adrp	x8, _ENOENT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
	b	LBB0_9
LBB0_7:
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_9
LBB0_8:
Lloh13:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w0, w8
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_DRM_FORMAT_HOST_XRGB8888,8,3   ; @DRM_FORMAT_HOST_XRGB8888
	.comm	_DRM_FORMAT_HOST_ARGB8888,8,3   ; @DRM_FORMAT_HOST_ARGB8888
	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_virtio_gpu_user_framebuffer_create
.subsections_via_symbols
