	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_menu_widgets_init              ## -- Begin function menu_widgets_init
	.p2align	4, 0x90
_menu_widgets_init:                     ## @menu_widgets_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	callq	_menu_display_init_first_driver
	testl	%eax, %eax
	je	LBB0_4
## %bb.1:
	movq	_menu_widgets_frame_count@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movq	_MSG_QUEUE_PENDING_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	shll	$3, %edi
	callq	_fifo_new
	movq	_msg_queue@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	testl	%eax, %eax
	je	LBB0_4
## %bb.2:
	movl	$1, %ebx
	movl	$1, %edi
	movl	$4, %esi
	callq	_calloc
	movq	_current_msgs@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	_MSG_QUEUE_ONSCREEN_MAX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%rax, %rdi
	callq	_file_list_reserve
	testl	%eax, %eax
	jne	LBB0_6
LBB0_4:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_menu_widgets_ready
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_menu_widgets_free
LBB0_6:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_menu_widgets_frame_count,8,3   ## @menu_widgets_frame_count
	.comm	_MSG_QUEUE_PENDING_MAX,4,2      ## @MSG_QUEUE_PENDING_MAX
	.comm	_msg_queue,4,2                  ## @msg_queue
	.comm	_current_msgs,8,3               ## @current_msgs
	.comm	_MSG_QUEUE_ONSCREEN_MAX,4,2     ## @MSG_QUEUE_ONSCREEN_MAX
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_menu_widgets_init              ; -- Begin function menu_widgets_init
	.p2align	2
_menu_widgets_init:                     ; @menu_widgets_init
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	bl	_menu_display_init_first_driver
	cbz	w0, LBB0_5
; %bb.1:
Lloh0:
	adrp	x8, _menu_widgets_frame_count@GOTPAGE
Lloh1:
	ldr	x8, [x8, _menu_widgets_frame_count@GOTPAGEOFF]
Lloh2:
	str	xzr, [x8]
Lloh3:
	adrp	x8, _MSG_QUEUE_PENDING_MAX@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MSG_QUEUE_PENDING_MAX@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	lsl	w0, w8, #3
	bl	_fifo_new
Lloh6:
	adrp	x8, _msg_queue@GOTPAGE
Lloh7:
	ldr	x8, [x8, _msg_queue@GOTPAGEOFF]
Lloh8:
	str	w0, [x8]
	cbz	w0, LBB0_5
; %bb.2:
	mov	w0, #1
	mov	w1, #4
	bl	_calloc
Lloh9:
	adrp	x8, _current_msgs@GOTPAGE
Lloh10:
	ldr	x8, [x8, _current_msgs@GOTPAGEOFF]
Lloh11:
	str	x0, [x8]
	cbz	x0, LBB0_5
; %bb.3:
Lloh12:
	adrp	x8, _MSG_QUEUE_ONSCREEN_MAX@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MSG_QUEUE_ONSCREEN_MAX@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	bl	_file_list_reserve
	cbz	w0, LBB0_5
; %bb.4:
	mov	w0, #1
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_5:
	bl	_menu_widgets_ready
	cbz	x0, LBB0_7
; %bb.6:
	bl	_menu_widgets_free
	mov	w0, #0
LBB0_7:
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotStr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotStr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotStr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_menu_widgets_frame_count,8,3   ; @menu_widgets_frame_count
	.comm	_MSG_QUEUE_PENDING_MAX,4,2      ; @MSG_QUEUE_PENDING_MAX
	.comm	_msg_queue,4,2                  ; @msg_queue
	.comm	_current_msgs,8,3               ; @current_msgs
	.comm	_MSG_QUEUE_ONSCREEN_MAX,4,2     ; @MSG_QUEUE_ONSCREEN_MAX
.subsections_via_symbols
