	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function materialui_preswitch_tabs
_materialui_preswitch_tabs:             ## @materialui_preswitch_tabs
	.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
	movq	%rsi, %r14
	movq	_MENU_LIST_PLAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_materialui_list_get_size
	xorl	%r15d, %r15d
	movl	$0, %r12d
	cmpl	$2, %eax
	jl	LBB0_2
## %bb.1:
	movq	_MENU_ENUM_LABEL_MAIN_MENU@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msg_hash_to_str
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_menu_entries_flush_stack
	xorl	%eax, %eax
	callq	_filebrowser_clear_type
	movl	$1, %r12d
LBB0_2:
	xorl	%edi, %edi
	callq	_menu_entries_get_menu_stack_ptr
	movq	(%rax), %rbx
	testq	%rbx, %rbx
	je	LBB0_11
## %bb.3:
	movq	%rax, %r13
	movq	8(%rax), %rax
	decq	%rbx
	shlq	$4, %rbx
	movq	8(%rax,%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_5
## %bb.4:
	callq	_free
	movq	8(%r13), %rax
LBB0_5:
	movq	$0, 8(%rax,%rbx)
	movl	(%r14), %eax
	cmpl	$129, %eax
	je	LBB0_6
## %bb.7:
	movq	_MENU_SETTINGS@GOTPCREL(%rip), %r14
	cmpl	$128, %eax
	jne	LBB0_9
## %bb.8:
	movq	_MENU_ENUM_LABEL_SETTINGS_TAB@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_6:
	movq	_MENU_PLAYLISTS_TAB@GOTPCREL(%rip), %r14
	movq	_MENU_ENUM_LABEL_PLAYLISTS_TAB@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_9:
	movq	_MENU_ENUM_LABEL_MAIN_MENU@GOTPCREL(%rip), %rax
LBB0_10:
	movl	(%rax), %edi
	callq	_msg_hash_to_str
	movl	%eax, %edi
	callq	_strdup
	movq	8(%r13), %rcx
	movq	%rax, 8(%rcx,%rbx)
	movq	(%r14), %rax
	movq	%rax, (%rcx,%rbx)
	movl	%r12d, %r15d
LBB0_11:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MENU_LIST_PLAIN,4,2            ## @MENU_LIST_PLAIN
	.comm	_MENU_ENUM_LABEL_MAIN_MENU,4,2  ## @MENU_ENUM_LABEL_MAIN_MENU
	.comm	_MENU_ENUM_LABEL_PLAYLISTS_TAB,4,2 ## @MENU_ENUM_LABEL_PLAYLISTS_TAB
	.comm	_MENU_PLAYLISTS_TAB,8,3         ## @MENU_PLAYLISTS_TAB
	.comm	_MENU_ENUM_LABEL_SETTINGS_TAB,4,2 ## @MENU_ENUM_LABEL_SETTINGS_TAB
	.comm	_MENU_SETTINGS,8,3              ## @MENU_SETTINGS
	.no_dead_strip	_materialui_preswitch_tabs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function materialui_preswitch_tabs
_materialui_preswitch_tabs:             ; @materialui_preswitch_tabs
	.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
Lloh0:
	adrp	x8, _MENU_LIST_PLAIN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MENU_LIST_PLAIN@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_materialui_list_get_size
	cmp	w0, #2
	b.lt	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _MENU_ENUM_LABEL_MAIN_MENU@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MENU_ENUM_LABEL_MAIN_MENU@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_msg_hash_to_str
	mov	w1, #0
	bl	_menu_entries_flush_stack
	bl	_filebrowser_clear_type
	mov	w19, #1
	b	LBB0_3
LBB0_2:
	mov	w19, #0
LBB0_3:
	mov	w0, #0
	bl	_menu_entries_get_menu_stack_ptr
	ldr	x9, [x0]
	cbz	x9, LBB0_7
; %bb.4:
	mov	x21, x0
	ldr	x8, [x0, #8]
	sub	x22, x9, #1
	add	x9, x8, x22, lsl #4
	ldr	x0, [x9, #8]
	cbz	x0, LBB0_6
; %bb.5:
	bl	_free
	ldr	x8, [x21, #8]
LBB0_6:
	add	x8, x8, x22, lsl #4
	str	xzr, [x8, #8]
Lloh6:
	adrp	x8, _MENU_PLAYLISTS_TAB@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MENU_PLAYLISTS_TAB@GOTPAGEOFF]
	ldr	w9, [x20]
Lloh8:
	adrp	x10, _MENU_ENUM_LABEL_PLAYLISTS_TAB@GOTPAGE
Lloh9:
	ldr	x10, [x10, _MENU_ENUM_LABEL_PLAYLISTS_TAB@GOTPAGEOFF]
	cmp	w9, #128
Lloh10:
	adrp	x11, _MENU_SETTINGS@GOTPAGE
Lloh11:
	ldr	x11, [x11, _MENU_SETTINGS@GOTPAGEOFF]
Lloh12:
	adrp	x12, _MENU_ENUM_LABEL_MAIN_MENU@GOTPAGE
Lloh13:
	ldr	x12, [x12, _MENU_ENUM_LABEL_MAIN_MENU@GOTPAGEOFF]
Lloh14:
	adrp	x13, _MENU_SETTINGS@GOTPAGE
Lloh15:
	ldr	x13, [x13, _MENU_SETTINGS@GOTPAGEOFF]
Lloh16:
	adrp	x14, _MENU_ENUM_LABEL_SETTINGS_TAB@GOTPAGE
Lloh17:
	ldr	x14, [x14, _MENU_ENUM_LABEL_SETTINGS_TAB@GOTPAGEOFF]
	csel	x12, x12, x14, ne
	csel	x11, x11, x13, ne
	cmp	w9, #129
	csel	x9, x10, x12, eq
	csel	x20, x8, x11, eq
	ldr	w0, [x9]
	bl	_msg_hash_to_str
	bl	_strdup
	ldr	x8, [x21, #8]
	add	x8, x8, x22, lsl #4
	str	x0, [x8, #8]
	ldr	x9, [x20]
	str	x9, [x8]
	b	LBB0_8
LBB0_7:
	mov	w19, #0
LBB0_8:
	mov	x0, x19
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_MENU_LIST_PLAIN,4,2            ; @MENU_LIST_PLAIN
	.comm	_MENU_ENUM_LABEL_MAIN_MENU,4,2  ; @MENU_ENUM_LABEL_MAIN_MENU
	.comm	_MENU_ENUM_LABEL_PLAYLISTS_TAB,4,2 ; @MENU_ENUM_LABEL_PLAYLISTS_TAB
	.comm	_MENU_PLAYLISTS_TAB,8,3         ; @MENU_PLAYLISTS_TAB
	.comm	_MENU_ENUM_LABEL_SETTINGS_TAB,4,2 ; @MENU_ENUM_LABEL_SETTINGS_TAB
	.comm	_MENU_SETTINGS,8,3              ; @MENU_SETTINGS
	.no_dead_strip	_materialui_preswitch_tabs
.subsections_via_symbols
