	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_komeda_fb_create               ## -- Begin function komeda_fb_create
	.p2align	4, 0x90
_komeda_fb_create:                      ## @komeda_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	%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	%rdx, %r12
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	(%rdi), %rbx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$40, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %r13
	leaq	8(%rbx), %rdi
	movl	(%r12), %esi
	movq	8(%r12), %rax
	movl	(%rax), %edx
	callq	_komeda_get_format_caps
	movl	%eax, 32(%r13)
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%r13, %rbx
	addq	$8, %rbx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movq	%r12, %rdx
	callq	_drm_helper_mode_fill_fb_struct
	cmpq	$0, 24(%r13)
	je	LBB0_7
## %bb.6:
	movq	%r13, %rdi
	movq	%r14, %rsi
	movq	%r12, %rdx
	callq	_komeda_fb_afbc_size_check
	jmp	LBB0_8
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
	jmp	LBB0_2
LBB0_4:
	movl	(%r12), %esi
	leaq	L_.str(%rip), %rdi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	movq	%r13, %rdi
	callq	_kfree
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	movl	%r14d, %edi
	jmp	LBB0_2
LBB0_7:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rsi
	movq	%r14, %rdx
	movq	%r12, %rcx
	callq	_komeda_fb_none_afbc_size_check
LBB0_8:
	movl	%eax, %r12d
	testl	%eax, %eax
	js	LBB0_11
## %bb.9:
	movq	_komeda_fb_funcs@GOTPCREL(%rip), %rdx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_drm_framebuffer_init
	testl	%eax, %eax
	js	LBB0_10
## %bb.15:
	xorl	%eax, %eax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	cmpq	$0, (%rcx)
	setne	%al
	movl	%eax, (%r13)
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movl	%eax, %r12d
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
LBB0_11:
	movq	16(%r13), %rax
	cmpl	$0, (%rax)
	jle	LBB0_14
## %bb.12:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r13), %rax
	movl	(%rax,%rbx,4), %edi
	callq	_drm_gem_object_put_unlocked
	incq	%rbx
	movq	16(%r13), %rax
	movslq	(%rax), %rax
	cmpq	%rax, %rbx
	jl	LBB0_13
LBB0_14:
	movq	%r13, %rdi
	callq	_kfree
	movl	%r12d, %edi
LBB0_2:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"FMT %x is not supported.\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_komeda_fb_funcs,4,2            ## @komeda_fb_funcs
L_.str.1:                               ## @.str.1
	.asciz	"failed to initialize fb\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_komeda_fb_create               ; -- Begin function komeda_fb_create
	.p2align	2
_komeda_fb_create:                      ; @komeda_fb_create
	.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	x22, x2
	mov	x24, x1
	mov	x21, x0
	ldr	x20, [x0]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #40
	bl	_kzalloc
	cbz	x0, LBB0_4
; %bb.1:
	mov	x19, x0
	add	x0, x20, #8
	ldr	w1, [x22]
	ldr	x8, [x22, #8]
	ldr	w2, [x8]
	bl	_komeda_get_format_caps
	str	w0, [x19, #32]
	cbz	w0, LBB0_5
; %bb.2:
	add	x23, x19, #8
	mov	x0, x21
	mov	x1, x23
	mov	x2, x22
	bl	_drm_helper_mode_fill_fb_struct
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_7
; %bb.3:
	mov	x0, x19
	mov	x1, x24
	mov	x2, x22
	bl	_komeda_fb_afbc_size_check
	mov	x22, x0
	tbz	w0, #31, LBB0_8
	b	LBB0_11
LBB0_4:
Lloh3:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
	ldr	w8, [x22]
	str	x8, [sp]
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG_KMS
	mov	x0, x19
	bl	_kfree
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_15
LBB0_7:
	mov	x0, x20
	mov	x1, x19
	mov	x2, x24
	mov	x3, x22
	bl	_komeda_fb_none_afbc_size_check
	mov	x22, x0
	tbnz	w0, #31, LBB0_11
LBB0_8:
Lloh9:
	adrp	x2, _komeda_fb_funcs@GOTPAGE
Lloh10:
	ldr	x2, [x2, _komeda_fb_funcs@GOTPAGEOFF]
	mov	x0, x21
	mov	x1, x23
	bl	_drm_framebuffer_init
	tbnz	w0, #31, LBB0_10
; %bb.9:
	ldr	x8, [x20]
	cmp	x8, #0
	cset	w8, ne
	str	w8, [x19]
	mov	x0, x23
	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
LBB0_10:
	mov	x22, x0
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_DEBUG_KMS
LBB0_11:
	ldr	x8, [x19, #16]
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_14
; %bb.12:
	mov	x20, #0
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	w0, [x8, x20, lsl #2]
	bl	_drm_gem_object_put_unlocked
	add	x20, x20, #1
	ldr	x8, [x19, #16]
	ldrsw	x8, [x8]
	cmp	x20, x8
	b.lt	LBB0_13
LBB0_14:
	mov	x0, x19
	bl	_kfree
	mov	x0, x22
LBB0_15:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"FMT %x is not supported.\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_komeda_fb_funcs,4,2            ; @komeda_fb_funcs
l_.str.1:                               ; @.str.1
	.asciz	"failed to initialize fb\n"

.subsections_via_symbols
