	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function action_right_mainmenu
_action_right_mainmenu:                 ## @action_right_mainmenu
	.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
	subq	$72, %rsp
	.cfi_offset %rbx, -24
	leaq	-32(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_menu_driver_list_get_selection
	movq	_MENU_LIST_PLAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -16(%rbp)
	movq	%rbx, %rdi
	callq	_menu_driver_list_get_size
	cmpl	$1, -32(%rbp)
	jne	LBB0_5
## %bb.1:
	xorl	%eax, %eax
	callq	_config_get_ptr
	movq	%rax, %rbx
	movq	_MENU_LIST_HORIZONTAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -64(%rbp)
	movq	_MENU_LIST_TABS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -40(%rbp)
	leaq	-80(%rbp), %rdi
	callq	_menu_driver_list_get_size
	leaq	-56(%rbp), %rdi
	callq	_menu_driver_list_get_size
	movslq	-80(%rbp), %rax
	movslq	-56(%rbp), %rcx
	addq	%rax, %rcx
	cmpq	%rcx, -24(%rbp)
	jne	LBB0_4
## %bb.2:
	cmpq	$0, (%rbx)
	je	LBB0_3
LBB0_4:
	xorl	%eax, %eax
	callq	_action_right_goto_tab
	movl	%eax, %ebx
	jmp	LBB0_6
LBB0_5:
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%edi, %edi
	xorl	%edx, %edx
	callq	_action_right_scroll
LBB0_6:
	movl	%ebx, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_3:
	xorl	%ebx, %ebx
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_MENU_LIST_PLAIN,4,2            ## @MENU_LIST_PLAIN
	.comm	_MENU_LIST_HORIZONTAL,4,2       ## @MENU_LIST_HORIZONTAL
	.comm	_MENU_LIST_TABS,4,2             ## @MENU_LIST_TABS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.space	1

	.no_dead_strip	_action_right_mainmenu
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function action_right_mainmenu
_action_right_mainmenu:                 ; @action_right_mainmenu
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	sub	x0, x29, #40
	bl	_menu_driver_list_get_selection
Lloh0:
	adrp	x8, _MENU_LIST_PLAIN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MENU_LIST_PLAIN@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	stur	w8, [x29, #-24]
	sub	x0, x29, #40
	bl	_menu_driver_list_get_size
	ldur	w8, [x29, #-40]
	cmp	w8, #1
	b.ne	LBB0_4
; %bb.1:
	bl	_config_get_ptr
	mov	x19, x0
Lloh3:
	adrp	x8, _MENU_LIST_HORIZONTAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MENU_LIST_HORIZONTAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [sp, #48]
Lloh6:
	adrp	x8, _MENU_LIST_TABS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MENU_LIST_TABS@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [sp, #24]
	add	x0, sp, #32
	bl	_menu_driver_list_get_size
	add	x0, sp, #8
	bl	_menu_driver_list_get_size
	ldur	x8, [x29, #-32]
	ldrsw	x9, [sp, #32]
	ldrsw	x10, [sp, #8]
	add	x9, x10, x9
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.2:
	ldr	x8, [x19]
	cbz	x8, LBB0_5
LBB0_3:
	bl	_action_right_goto_tab
	b	LBB0_6
LBB0_4:
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #0
	mov	w2, #0
	bl	_action_right_scroll
LBB0_5:
	mov	w0, #0
LBB0_6:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_MENU_LIST_PLAIN,4,2            ; @MENU_LIST_PLAIN
	.comm	_MENU_LIST_HORIZONTAL,4,2       ; @MENU_LIST_HORIZONTAL
	.comm	_MENU_LIST_TABS,4,2             ; @MENU_LIST_TABS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.space	1

	.no_dead_strip	_action_right_mainmenu
.subsections_via_symbols
