	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rockchip_drm_fbdev_init        ## -- Begin function rockchip_drm_fbdev_init
	.p2align	4, 0x90
_rockchip_drm_fbdev_init:               ## @rockchip_drm_fbdev_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
	cmpl	$0, 8(%rdi)
	je	LBB0_2
## %bb.1:
	movq	%rdi, %r15
	cmpl	$0, 4(%rdi)
	je	LBB0_2
## %bb.3:
	movq	16(%r15), %r14
	movq	_rockchip_drm_fb_helper_funcs@GOTPCREL(%rip), %rdx
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_drm_fb_helper_prepare
	movq	_ROCKCHIP_MAX_CONNECTOR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_drm_fb_helper_init
	testl	%eax, %eax
	js	LBB0_4
## %bb.5:
	movq	%r14, %rdi
	callq	_drm_fb_helper_single_add_all_connectors
	testl	%eax, %eax
	js	LBB0_6
## %bb.7:
	movq	_PREFERRED_BPP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_drm_fb_helper_initial_config
	xorl	%ebx, %ebx
	testl	%eax, %eax
	jns	LBB0_10
## %bb.8:
	movl	%eax, %r12d
	movl	(%r15), %edi
	leaq	L_.str.2(%rip), %rsi
	movl	%eax, %edx
	callq	_DRM_DEV_ERROR
	movl	%r12d, %ebx
	jmp	LBB0_9
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_10:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movl	%eax, %ebx
	movl	(%r15), %edi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_DRM_DEV_ERROR
	jmp	LBB0_10
LBB0_6:
	movl	%eax, %ebx
	movl	(%r15), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edx
	callq	_DRM_DEV_ERROR
LBB0_9:
	movq	%r14, %rdi
	callq	_drm_fb_helper_fini
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_rockchip_drm_fb_helper_funcs,4,2 ## @rockchip_drm_fb_helper_funcs
	.comm	_ROCKCHIP_MAX_CONNECTOR,4,2     ## @ROCKCHIP_MAX_CONNECTOR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to initialize drm fb helper - %d.\n"

L_.str.1:                               ## @.str.1
	.asciz	"Failed to add connectors - %d.\n"

	.comm	_PREFERRED_BPP,4,2              ## @PREFERRED_BPP
L_.str.2:                               ## @.str.2
	.asciz	"Failed to set initial hw config - %d.\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rockchip_drm_fbdev_init        ; -- Begin function rockchip_drm_fbdev_init
	.p2align	2
_rockchip_drm_fbdev_init:               ; @rockchip_drm_fbdev_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
	ldr	w8, [x0, #8]
	cbz	w8, LBB0_6
; %bb.1:
	mov	x21, x0
	ldr	w8, [x0, #4]
	cbz	w8, LBB0_6
; %bb.2:
	ldr	x19, [x21, #16]
Lloh0:
	adrp	x2, _rockchip_drm_fb_helper_funcs@GOTPAGE
Lloh1:
	ldr	x2, [x2, _rockchip_drm_fb_helper_funcs@GOTPAGEOFF]
	mov	x0, x21
	mov	x1, x19
	bl	_drm_fb_helper_prepare
Lloh2:
	adrp	x8, _ROCKCHIP_MAX_CONNECTOR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ROCKCHIP_MAX_CONNECTOR@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	mov	x0, x21
	mov	x1, x19
	bl	_drm_fb_helper_init
	tbnz	w0, #31, LBB0_8
; %bb.3:
	mov	x0, x19
	bl	_drm_fb_helper_single_add_all_connectors
	tbnz	w0, #31, LBB0_9
; %bb.4:
Lloh5:
	adrp	x8, _PREFERRED_BPP@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PREFERRED_BPP@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_drm_fb_helper_initial_config
	tbnz	w0, #31, LBB0_10
; %bb.5:
	mov	w20, #0
	b	LBB0_7
LBB0_6:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_7:
	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_8:
	mov	x20, x0
	ldr	w0, [x21]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_DRM_DEV_ERROR
	b	LBB0_7
LBB0_9:
	mov	x20, x0
	ldr	w0, [x21]
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_11
LBB0_10:
	mov	x20, x0
	ldr	w0, [x21]
Lloh15:
	adrp	x1, l_.str.2@PAGE
Lloh16:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_11:
	mov	x2, x20
	bl	_DRM_DEV_ERROR
	mov	x0, x19
	bl	_drm_fb_helper_fini
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_rockchip_drm_fb_helper_funcs,4,2 ; @rockchip_drm_fb_helper_funcs
	.comm	_ROCKCHIP_MAX_CONNECTOR,4,2     ; @ROCKCHIP_MAX_CONNECTOR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to initialize drm fb helper - %d.\n"

l_.str.1:                               ; @.str.1
	.asciz	"Failed to add connectors - %d.\n"

	.comm	_PREFERRED_BPP,4,2              ; @PREFERRED_BPP
l_.str.2:                               ; @.str.2
	.asciz	"Failed to set initial hw config - %d.\n"

.subsections_via_symbols
