	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rgui_init
_rgui_init:                             ## @rgui_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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_config_get_ptr
	movq	%rax, %r15
	movl	$1, %edi
	movl	$1, %esi
	callq	_calloc
	testq	%rax, %rax
	je	LBB0_8
## %bb.1:
	movq	%rax, %r14
	movl	$1, %edi
	movl	$144, %esi
	callq	_calloc
	testq	%rax, %rax
	je	LBB0_7
## %bb.2:
	movq	%rax, %rbx
	movq	%rax, (%r12)
	movq	(%rax), %rax
	movb	$0, (%rax)
	movq	8(%rbx), %rax
	movb	$0, (%rax)
	xorl	%eax, %eax
	callq	_rgui_set_pixel_format_function
	leaq	132(%rbx), %rdi
	callq	_rgui_get_video_config
	movl	32(%r15), %eax
	movl	%eax, 128(%rbx)
	movl	$0, 16(%rbx)
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_rgui_set_aspect_ratio
	testl	%eax, %eax
	je	LBB0_7
## %bb.3:
	movq	_FONT_HEIGHT_STRIDE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addl	%edi, %edi
	callq	_menu_display_set_header_height
	movq	24(%rbx), %rax
	movb	$0, (%rax)
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_prepare_rgui_colors
	movq	$0, -48(%rbp)
	movq	_MENU_ENTRIES_CTL_SET_START@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-48(%rbp), %rsi
	callq	_menu_entries_ctl
	movq	$0, 120(%rbx)
	xorl	%eax, %eax
	callq	_rgui_init_font_lut
	movups	4(%r15), %xmm0
	movups	%xmm0, 104(%rbx)
	movq	24(%r15), %rax
	movq	%rax, 32(%rbx)
	movl	(%r15), %eax
	movl	%eax, 100(%rbx)
	movq	_rgui_frame_buf@GOTPCREL(%rip), %rax
	movl	4(%rax), %ecx
	movl	%ecx, 96(%rbx)
	movl	(%rax), %eax
	movl	%eax, 92(%rbx)
	leaq	-40(%rbp), %rdi
	callq	_video_driver_get_viewport_info
	movl	-36(%rbp), %eax
	movl	%eax, 88(%rbx)
	movl	-40(%rbp), %eax
	movl	%eax, 84(%rbx)
	movl	$0, 40(%rbx)
	movq	32(%rbx), %rax
	movq	_RGUI_PARTICLE_EFFECT_NONE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_5
## %bb.4:
	movq	%rbx, %rdi
	callq	_rgui_init_particle_effect
LBB0_5:
	movl	(%r15), %esi
	movl	4(%r15), %edi
	callq	_rgui_set_blit_functions
	xorl	%eax, %eax
	callq	_menu_thumbnail_path_init
	movl	%eax, 80(%rbx)
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movq	$0, 44(%rbx)
	movq	%rbx, %rdi
	addq	$52, %rdi
	xorps	%xmm0, %xmm0
	movups	%xmm0, 56(%rbx)
	movq	$0, 72(%rbx)
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movq	%r14, %rbx
	jmp	LBB0_8
LBB0_7:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_rgui_framebuffer_free
	xorl	%eax, %eax
	callq	_rgui_background_free
	movq	_fs_thumbnail@GOTPCREL(%rip), %rdi
	callq	_rgui_thumbnail_free
	movq	_mini_thumbnail@GOTPCREL(%rip), %rdi
	callq	_rgui_thumbnail_free
	movq	_mini_left_thumbnail@GOTPCREL(%rip), %rdi
	callq	_rgui_thumbnail_free
	movq	%r14, %rdi
	callq	_free
LBB0_8:
	movq	%rbx, %rax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FONT_HEIGHT_STRIDE,4,2         ## @FONT_HEIGHT_STRIDE
	.comm	_MENU_ENTRIES_CTL_SET_START,4,2 ## @MENU_ENTRIES_CTL_SET_START
	.comm	_rgui_frame_buf,8,2             ## @rgui_frame_buf
	.comm	_RGUI_PARTICLE_EFFECT_NONE,8,3  ## @RGUI_PARTICLE_EFFECT_NONE
	.comm	_fs_thumbnail,4,2               ## @fs_thumbnail
	.comm	_mini_thumbnail,4,2             ## @mini_thumbnail
	.comm	_mini_left_thumbnail,4,2        ## @mini_left_thumbnail
	.no_dead_strip	_rgui_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rgui_init
_rgui_init:                             ; @rgui_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x22, x0
	bl	_config_get_ptr
	mov	x21, x0
	mov	w0, #1
	mov	w1, #1
	bl	_calloc
	mov	x19, x0
	cbz	x0, LBB0_8
; %bb.1:
	mov	w0, #1
	mov	w1, #144
	bl	_calloc
	cbz	x0, LBB0_7
; %bb.2:
	mov	x20, x0
	str	x0, [x22]
	ldr	x8, [x0]
	strb	wzr, [x8]
	ldr	x8, [x0, #8]
	strb	wzr, [x8]
	bl	_rgui_set_pixel_format_function
	add	x0, x20, #132
	bl	_rgui_get_video_config
	ldr	w8, [x21, #32]
	str	w8, [x20, #128]
	str	wzr, [x20, #16]
	mov	x0, x20
	mov	w1, #0
	bl	_rgui_set_aspect_ratio
	cbz	w0, LBB0_7
; %bb.3:
Lloh0:
	adrp	x8, _FONT_HEIGHT_STRIDE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FONT_HEIGHT_STRIDE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	lsl	w0, w8, #1
	bl	_menu_display_set_header_height
	ldr	x8, [x20, #24]
	strb	wzr, [x8]
	mov	x0, x20
	mov	x1, x21
	bl	_prepare_rgui_colors
	str	xzr, [sp, #8]
Lloh3:
	adrp	x8, _MENU_ENTRIES_CTL_SET_START@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MENU_ENTRIES_CTL_SET_START@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	add	x1, sp, #8
	bl	_menu_entries_ctl
	str	xzr, [x20, #120]
	bl	_rgui_init_font_lut
	ldur	q0, [x21, #4]
	stur	q0, [x20, #104]
	ldr	x8, [x21, #24]
	str	x8, [x20, #32]
	ldr	w8, [x21]
	str	w8, [x20, #100]
Lloh6:
	adrp	x8, _rgui_frame_buf@GOTPAGE
Lloh7:
	ldr	x8, [x8, _rgui_frame_buf@GOTPAGEOFF]
Lloh8:
	ldr	d0, [x8]
	stur	d0, [x20, #92]
	mov	x0, sp
	bl	_video_driver_get_viewport_info
	ldr	d0, [sp]
	stur	d0, [x20, #84]
	str	wzr, [x20, #40]
	ldr	x8, [x20, #32]
Lloh9:
	adrp	x9, _RGUI_PARTICLE_EFFECT_NONE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _RGUI_PARTICLE_EFFECT_NONE@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_5
; %bb.4:
	mov	x0, x20
	bl	_rgui_init_particle_effect
LBB0_5:
	ldp	w1, w0, [x21]
	bl	_rgui_set_blit_functions
	bl	_menu_thumbnail_path_init
	str	w0, [x20, #80]
	cbz	w0, LBB0_7
; %bb.6:
	stp	wzr, wzr, [x20, #44]
	add	x0, x20, #52
	stp	xzr, xzr, [x20, #64]
	str	xzr, [x20, #56]
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	b	LBB0_8
LBB0_7:
	bl	_rgui_framebuffer_free
	bl	_rgui_background_free
Lloh12:
	adrp	x0, _fs_thumbnail@GOTPAGE
Lloh13:
	ldr	x0, [x0, _fs_thumbnail@GOTPAGEOFF]
	bl	_rgui_thumbnail_free
Lloh14:
	adrp	x0, _mini_thumbnail@GOTPAGE
Lloh15:
	ldr	x0, [x0, _mini_thumbnail@GOTPAGEOFF]
	bl	_rgui_thumbnail_free
Lloh16:
	adrp	x0, _mini_left_thumbnail@GOTPAGE
Lloh17:
	ldr	x0, [x0, _mini_left_thumbnail@GOTPAGEOFF]
	bl	_rgui_thumbnail_free
	mov	x0, x19
	bl	_free
	mov	x19, #0
LBB0_8:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_FONT_HEIGHT_STRIDE,4,2         ; @FONT_HEIGHT_STRIDE
	.comm	_MENU_ENTRIES_CTL_SET_START,4,2 ; @MENU_ENTRIES_CTL_SET_START
	.comm	_rgui_frame_buf,8,2             ; @rgui_frame_buf
	.comm	_RGUI_PARTICLE_EFFECT_NONE,8,3  ; @RGUI_PARTICLE_EFFECT_NONE
	.comm	_fs_thumbnail,4,2               ; @fs_thumbnail
	.comm	_mini_thumbnail,4,2             ; @mini_thumbnail
	.comm	_mini_left_thumbnail,4,2        ; @mini_left_thumbnail
	.no_dead_strip	_rgui_init
.subsections_via_symbols
