	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_fb_helper_fbdev_setup      ## -- Begin function drm_fb_helper_fbdev_setup
	.p2align	4, 0x90
_drm_fb_helper_fbdev_setup:             ## @drm_fb_helper_fbdev_setup
	.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	%rsi, %r14
	movq	%rdi, %r15
	testl	%ecx, %ecx
	jne	LBB0_2
## %bb.1:
	movl	4(%r15), %ecx
LBB0_2:
	testl	%ecx, %ecx
	movl	$32, %r12d
	cmovnel	%ecx, %r12d
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_drm_fb_helper_prepare
	movq	%r15, %rdi
	movq	%r14, %rsi
	xorl	%edx, %edx
	callq	_drm_fb_helper_init
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	movq	%r15, %rdi
	callq	_drm_drv_uses_atomic_modeset
	testl	%eax, %eax
	jne	LBB0_6
## %bb.5:
	movq	%r15, %rdi
	callq	_drm_helper_disable_unused_functions
LBB0_6:
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	_drm_fb_helper_initial_config
	xorl	%ebx, %ebx
	testl	%eax, %eax
	jns	LBB0_8
## %bb.7:
	movl	%eax, %r14d
	movl	(%r15), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edx
	callq	_DRM_DEV_ERROR
	movq	%r15, %rdi
	callq	_drm_fb_helper_fbdev_teardown
	movl	%r14d, %ebx
	jmp	LBB0_8
LBB0_3:
	movl	%eax, %ebx
	movl	(%r15), %edi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_DRM_DEV_ERROR
LBB0_8:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"fbdev: Failed to initialize (ret=%d)\n"

L_.str.1:                               ## @.str.1
	.asciz	"fbdev: Failed to set configuration (ret=%d)\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_fb_helper_fbdev_setup      ; -- Begin function drm_fb_helper_fbdev_setup
	.p2align	2
_drm_fb_helper_fbdev_setup:             ; @drm_fb_helper_fbdev_setup
	.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	x20, x1
	mov	x19, x0
	cbnz	w3, LBB0_2
; %bb.1:
	ldr	w3, [x19, #4]
LBB0_2:
	mov	w8, #32
	cmp	w3, #0
	csel	w22, w8, w3, eq
	mov	x0, x19
	mov	x1, x20
	bl	_drm_fb_helper_prepare
	mov	x0, x19
	mov	x1, x20
	mov	w2, #0
	bl	_drm_fb_helper_init
	tbnz	w0, #31, LBB0_7
; %bb.3:
	mov	x0, x19
	bl	_drm_drv_uses_atomic_modeset
	cbnz	w0, LBB0_5
; %bb.4:
	mov	x0, x19
	bl	_drm_helper_disable_unused_functions
LBB0_5:
	mov	x0, x20
	mov	x1, x22
	bl	_drm_fb_helper_initial_config
	tbnz	w0, #31, LBB0_8
; %bb.6:
	mov	w21, #0
	b	LBB0_9
LBB0_7:
	mov	x21, x0
	ldr	w0, [x19]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	bl	_DRM_DEV_ERROR
	b	LBB0_9
LBB0_8:
	mov	x21, x0
	ldr	w0, [x19]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x21
	bl	_DRM_DEV_ERROR
	mov	x0, x19
	bl	_drm_fb_helper_fbdev_teardown
LBB0_9:
	mov	x0, x21
	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
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"fbdev: Failed to initialize (ret=%d)\n"

l_.str.1:                               ; @.str.1
	.asciz	"fbdev: Failed to set configuration (ret=%d)\n"

.subsections_via_symbols
