	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function psb_framebuffer_init
_psb_framebuffer_init:                  ## @psb_framebuffer_init
	.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	%rcx, %r15
	movq	%rdx, %rbx
	movq	%rsi, %r14
	movq	%rdi, %r12
	movq	%rdx, %rsi
	callq	_drm_get_format_info
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	cmpl	$0, 8(%rax)
	je	LBB0_3
## %bb.2:
	movq	(%rax), %rax
	cmpl	$5, (%rax)
	jge	LBB0_3
## %bb.4:
	movq	(%rbx), %rax
	testb	$63, (%rax)
	je	LBB0_5
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_8:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	%r12, %rdi
	movq	%r14, %rsi
	movq	%rbx, %rdx
	callq	_drm_helper_mode_fill_fb_struct
	movq	(%r14), %rax
	movq	%r15, (%rax)
	movq	_psb_fb_funcs@GOTPCREL(%rip), %rdx
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_drm_framebuffer_init
	testl	%eax, %eax
	je	LBB0_6
## %bb.7:
	movl	%eax, %ebx
	movl	(%r12), %edi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_err
	jmp	LBB0_8
LBB0_6:
	xorl	%ebx, %ebx
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_psb_fb_funcs,4,2               ## @psb_fb_funcs
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"framebuffer init failed: %d\n"

	.no_dead_strip	_psb_framebuffer_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function psb_framebuffer_init
_psb_framebuffer_init:                  ; @psb_framebuffer_init
	.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	x21, x3
	mov	x22, x2
	mov	x20, x1
	mov	x19, x0
	mov	x1, x2
	bl	_drm_get_format_info
	cbz	x0, LBB0_4
; %bb.1:
	ldr	w8, [x0, #8]
	cbz	w8, LBB0_4
; %bb.2:
	ldr	x8, [x0]
	ldr	w8, [x8]
	cmp	w8, #5
	b.ge	LBB0_4
; %bb.3:
	ldr	x8, [x22]
	ldrb	w8, [x8]
	tst	w8, #0x3f
	b.eq	LBB0_6
LBB0_4:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_5:
	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
	ret
LBB0_6:
	mov	x0, x19
	mov	x1, x20
	mov	x2, x22
	bl	_drm_helper_mode_fill_fb_struct
	ldr	x8, [x20]
	str	x21, [x8]
Lloh3:
	adrp	x2, _psb_fb_funcs@GOTPAGE
Lloh4:
	ldr	x2, [x2, _psb_fb_funcs@GOTPAGEOFF]
	mov	x0, x19
	mov	x1, x20
	bl	_drm_framebuffer_init
	mov	x20, x0
	cbz	w0, LBB0_5
; %bb.7:
	ldr	w0, [x19]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_dev_err
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_psb_fb_funcs,4,2               ; @psb_fb_funcs
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"framebuffer init failed: %d\n"

	.no_dead_strip	_psb_framebuffer_init
.subsections_via_symbols
