	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_fbdev_init              ## -- Begin function amdgpu_fbdev_init
	.p2align	4, 0x90
_amdgpu_fbdev_init:                     ## @amdgpu_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	%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
	xorl	%r14d, %r14d
	cmpl	$0, 16(%rdi)
	je	LBB0_9
## %bb.1:
	movq	%rdi, %rbx
	movq	(%rdi), %rdi
	callq	_list_empty
	testq	%rax, %rax
	je	LBB0_2
LBB0_9:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	cmpl	$33554433, 24(%rbx)             ## imm = 0x2000001
	movl	$8, %eax
	movl	$32, %r15d
	cmovll	%eax, %r15d
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$16, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %r12
	movq	%rbx, 8(%rax)
	movq	%rax, 8(%rbx)
	movq	(%rbx), %rdi
	movq	_amdgpu_fb_helper_funcs@GOTPCREL(%rip), %rdx
	movq	%rax, %rsi
	callq	_drm_fb_helper_prepare
	movq	(%rbx), %rdi
	movq	_AMDGPUFB_CONN_LIMIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rsi
	callq	_drm_fb_helper_init
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %r13d
	movq	%r12, %rdi
	callq	_kfree
	movl	%r13d, %r14d
	jmp	LBB0_9
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_9
LBB0_6:
	movq	%r12, %rdi
	callq	_drm_fb_helper_single_add_all_connectors
	movq	%rbx, %rdi
	callq	_amdgpu_device_has_dc_support
	testl	%eax, %eax
	jne	LBB0_8
## %bb.7:
	movq	(%rbx), %rdi
	callq	_drm_helper_disable_unused_functions
LBB0_8:
	movq	%r12, %rdi
	movl	%r15d, %esi
	callq	_drm_fb_helper_initial_config
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_amdgpu_fb_helper_funcs,4,2     ## @amdgpu_fb_helper_funcs
	.comm	_AMDGPUFB_CONN_LIMIT,4,2        ## @AMDGPUFB_CONN_LIMIT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_fbdev_init              ; -- Begin function amdgpu_fbdev_init
	.p2align	2
_amdgpu_fbdev_init:                     ; @amdgpu_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, #16]
	cbz	w8, LBB0_2
; %bb.1:
	mov	x19, x0
	ldr	x0, [x0]
	bl	_list_empty
	cbz	x0, LBB0_4
LBB0_2:
	mov	w22, #0
LBB0_3:
	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_4:
	ldr	w8, [x19, #24]
	mov	w9, #1
	movk	w9, #512, lsl #16
	mov	w10, #32
	mov	w11, #8
	cmp	w8, w9
	csel	w20, w11, w10, lt
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #16
	bl	_kzalloc
	cbz	x0, LBB0_7
; %bb.5:
	mov	x21, x0
	str	x19, [x0, #8]
	str	x0, [x19, #8]
	ldr	x0, [x19]
Lloh3:
	adrp	x2, _amdgpu_fb_helper_funcs@GOTPAGE
Lloh4:
	ldr	x2, [x2, _amdgpu_fb_helper_funcs@GOTPAGEOFF]
	mov	x1, x21
	bl	_drm_fb_helper_prepare
	ldr	x0, [x19]
Lloh5:
	adrp	x8, _AMDGPUFB_CONN_LIMIT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AMDGPUFB_CONN_LIMIT@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	x1, x21
	bl	_drm_fb_helper_init
	cbz	w0, LBB0_8
; %bb.6:
	mov	x22, x0
	mov	x0, x21
	bl	_kfree
	b	LBB0_3
LBB0_7:
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_3
LBB0_8:
	mov	x0, x21
	bl	_drm_fb_helper_single_add_all_connectors
	mov	x0, x19
	bl	_amdgpu_device_has_dc_support
	cbnz	w0, LBB0_10
; %bb.9:
	ldr	x0, [x19]
	bl	_drm_helper_disable_unused_functions
LBB0_10:
	mov	x0, x21
	mov	x1, x20
	bl	_drm_fb_helper_initial_config
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_amdgpu_fb_helper_funcs,4,2     ; @amdgpu_fb_helper_funcs
	.comm	_AMDGPUFB_CONN_LIMIT,4,2        ; @AMDGPUFB_CONN_LIMIT
.subsections_via_symbols
