	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fb_alloc
_fb_alloc:                              ## @fb_alloc
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, -48(%rbp)                  ## 8-byte Spill
	movl	%ecx, %r13d
	movq	%rdx, %r12
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movq	_DRM_MEM_DRIVER@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	_M_WAITOK@GOTPCREL(%rip), %rax
	movq	_M_ZERO@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	orl	(%rax), %edx
	movl	$24, %edi
	callq	_malloc
	movq	%rax, %rbx
	leal	(,%r13,8), %edi
	movl	(%r15), %esi
	movl	(%r14), %edx
	movq	_M_WAITOK@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	callq	_malloc
	movq	%rax, 8(%rbx)
	movl	%r13d, (%rbx)
	leaq	16(%rbx), %r13
	movq	%r13, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_drm_helper_mode_fill_fb_struct
	movl	(%rbx), %edx
	testl	%edx, %edx
	jle	LBB0_7
## %bb.1:
	leaq	-1(%rdx), %rcx
	movl	%edx, %eax
	andl	$3, %eax
	cmpq	$3, %rcx
	jae	LBB0_3
## %bb.2:
	xorl	%ecx, %ecx
	jmp	LBB0_5
LBB0_3:
	andl	$-4, %edx
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12,%rcx,8), %rsi
	movq	8(%rbx), %rdi
	movq	%rsi, (%rdi,%rcx,8)
	movq	8(%r12,%rcx,8), %rsi
	movq	8(%rbx), %rdi
	movq	%rsi, 8(%rdi,%rcx,8)
	movq	16(%r12,%rcx,8), %rsi
	movq	8(%rbx), %rdi
	movq	%rsi, 16(%rdi,%rcx,8)
	movq	24(%r12,%rcx,8), %rsi
	movq	8(%rbx), %rdi
	movq	%rsi, 24(%rdi,%rcx,8)
	addq	$4, %rcx
	cmpq	%rcx, %rdx
	jne	LBB0_4
LBB0_5:
	testq	%rax, %rax
	je	LBB0_7
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12,%rcx,8), %rdx
	movq	8(%rbx), %rsi
	movq	%rdx, (%rsi,%rcx,8)
	incq	%rcx
	decq	%rax
	jne	LBB0_6
LBB0_7:
	movq	_fb_funcs@GOTPCREL(%rip), %rdx
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_drm_framebuffer_init
	testl	%eax, %eax
	js	LBB0_8
## %bb.9:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rbx, (%rax)
	xorl	%r14d, %r14d
	jmp	LBB0_10
LBB0_8:
	movl	%eax, %r14d
	movl	(%r15), %edi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_device_printf
	movq	8(%rbx), %rdi
	movq	_DRM_MEM_DRIVER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_free
LBB0_10:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DRM_MEM_DRIVER,4,2             ## @DRM_MEM_DRIVER
	.comm	_M_WAITOK,4,2                   ## @M_WAITOK
	.comm	_M_ZERO,4,2                     ## @M_ZERO
	.comm	_fb_funcs,4,2                   ## @fb_funcs
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Cannot initialize frame buffer %d\n"

	.no_dead_strip	_fb_alloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fb_alloc
_fb_alloc:                              ; @fb_alloc
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x4
	mov	x23, x3
	mov	x22, x2
	mov	x24, x1
	mov	x20, x0
Lloh0:
	adrp	x25, _DRM_MEM_DRIVER@GOTPAGE
Lloh1:
	ldr	x25, [x25, _DRM_MEM_DRIVER@GOTPAGEOFF]
Lloh2:
	adrp	x26, _M_WAITOK@GOTPAGE
Lloh3:
	ldr	x26, [x26, _M_WAITOK@GOTPAGEOFF]
	ldr	w1, [x25]
	ldr	w8, [x26]
Lloh4:
	adrp	x27, _M_ZERO@GOTPAGE
Lloh5:
	ldr	x27, [x27, _M_ZERO@GOTPAGEOFF]
	ldr	w9, [x27]
	orr	w2, w9, w8
	mov	w0, #24
	bl	_malloc
	mov	x21, x0
	lsl	w0, w23, #3
	ldr	w1, [x25]
	ldr	w8, [x26]
	ldr	w9, [x27]
	orr	w2, w9, w8
	bl	_malloc
	str	x0, [x21, #8]
	str	w23, [x21]
	add	x23, x21, #16
	mov	x0, x23
	mov	x1, x24
	bl	_drm_helper_mode_fill_fb_struct
	ldr	w9, [x21]
	cmp	w9, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x8, #0
	lsl	x9, x9, #3
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x22, x8]
	ldr	x11, [x21, #8]
	str	x10, [x11, x8]
	add	x8, x8, #8
	cmp	x9, x8
	b.ne	LBB0_2
LBB0_3:
Lloh6:
	adrp	x2, _fb_funcs@GOTPAGE
Lloh7:
	ldr	x2, [x2, _fb_funcs@GOTPAGEOFF]
	mov	x0, x20
	mov	x1, x23
	bl	_drm_framebuffer_init
	tbnz	w0, #31, LBB0_5
; %bb.4:
	mov	w22, #0
	str	x21, [x19]
	b	LBB0_6
LBB0_5:
	mov	x22, x0
	ldr	w0, [x20]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x22
	bl	_device_printf
	ldr	x0, [x21, #8]
	ldr	w1, [x25]
	bl	_free
LBB0_6:
	mov	x0, x22
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_DRM_MEM_DRIVER,4,2             ; @DRM_MEM_DRIVER
	.comm	_M_WAITOK,4,2                   ; @M_WAITOK
	.comm	_M_ZERO,4,2                     ; @M_ZERO
	.comm	_fb_funcs,4,2                   ; @fb_funcs
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Cannot initialize frame buffer %d\n"

	.no_dead_strip	_fb_alloc
.subsections_via_symbols
