	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_TuiDrawMenuItem                ## -- Begin function TuiDrawMenuItem
	.p2align	4, 0x90
_TuiDrawMenuItem:                       ## @TuiDrawMenuItem
	.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	$104, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r13
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_UiTextColor@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_UiMenuBgColor@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ATTR
	movq	_UiCenterMenu@GOTPCREL(%rip), %rbx
	cmpq	$0, (%rbx)
	movl	%eax, -132(%rbp)                ## 4-byte Spill
	movq	%r13, -144(%rbp)                ## 8-byte Spill
	je	LBB0_5
## %bb.1:
	movl	(%r12), %eax
	subl	4(%r12), %eax
	addl	$-2, %eax
	movslq	%eax, %r15
	movq	8(%r12), %r14
	movq	(%r14,%r13,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.3:
	callq	_strlen
	jmp	LBB0_4
LBB0_5:
	movb	$0, -128(%rbp)
	leaq	L_.str(%rip), %rsi
	leaq	-128(%rbp), %rdi
	callq	_strcat
	movq	8(%r12), %r14
	xorl	%r15d, %r15d
	jmp	LBB0_6
LBB0_2:
	xorl	%eax, %eax
LBB0_4:
	subq	%rax, %r15
	movq	%r15, %r13
	shrq	%r13
	leaq	1(%r13), %rdx
	leaq	-128(%rbp), %rdi
	movl	$32, %esi
	callq	_memset
	subq	%r13, %r15
	movb	$0, -127(%rbp,%r13)
LBB0_6:
	movq	-144(%rbp), %rax                ## 8-byte Reload
	movq	(%r14,%rax,8), %rsi
	movq	%rax, %r14
	testq	%rsi, %rsi
	je	LBB0_8
## %bb.7:
	leaq	-128(%rbp), %rdi
	callq	_strcat
LBB0_8:
	cmpq	$0, (%rbx)
	je	LBB0_12
## %bb.9:
	testq	%r15, %r15
	je	LBB0_12
## %bb.10:
	leaq	L_.str.1(%rip), %r13
	leaq	-128(%rbp), %rbx
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_strcat
	decq	%r15
	jne	LBB0_11
LBB0_12:
	movq	8(%r12), %rax
	cmpq	$0, (%rax,%r14,8)
	je	LBB0_13
## %bb.14:
	cmpq	%r14, 16(%r12)
	movl	-132(%rbp), %ecx                ## 4-byte Reload
	jne	LBB0_17
## %bb.15:
	movq	_UiSelectedTextBgColor@GOTPCREL(%rip), %rcx
	movq	_UiSelectedTextColor@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_13:
	leaq	-128(%rbp), %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$80, %edx
	callq	_memset
	movl	4(%r12), %edx
	notl	%edx
	addl	(%r12), %edx
	movq	%rbx, %rdi
	movl	$196, %esi
	callq	_memset
	movq	_UiMenuFgColor@GOTPCREL(%rip), %rax
	movq	_UiMenuBgColor@GOTPCREL(%rip), %rcx
LBB0_16:
	movl	(%rax), %edi
	movl	(%rcx), %esi
	callq	_ATTR
	movl	%eax, %ecx
LBB0_17:
	movl	4(%r12), %edi
	incl	%edi
	movq	24(%r12), %rax
	leaq	(%r14,%rax), %rsi
	incq	%rsi
	leaq	-128(%rbp), %rdx
	callq	_UiDrawText
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_19
## %bb.18:
	addq	$104, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_UiTextColor,4,2                ## @UiTextColor
	.comm	_UiMenuBgColor,4,2              ## @UiMenuBgColor
	.comm	_UiCenterMenu,8,3               ## @UiCenterMenu
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"    "

L_.str.1:                               ## @.str.1
	.asciz	" "

	.comm	_UiMenuFgColor,4,2              ## @UiMenuFgColor
	.comm	_UiSelectedTextColor,4,2        ## @UiSelectedTextColor
	.comm	_UiSelectedTextBgColor,4,2      ## @UiSelectedTextBgColor
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_TuiDrawMenuItem                ; -- Begin function TuiDrawMenuItem
	.p2align	2
_TuiDrawMenuItem:                       ; @TuiDrawMenuItem
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #192
	.cfi_def_cfa_offset 192
	stp	x28, x27, [sp, #96]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #112]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #128]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #144]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #160]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #176]            ; 16-byte Folded Spill
	add	x29, sp, #176
	.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, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #88]
Lloh3:
	adrp	x8, _UiTextColor@GOTPAGE
Lloh4:
	ldr	x8, [x8, _UiTextColor@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x8, _UiMenuBgColor@GOTPAGE
Lloh7:
	ldr	x8, [x8, _UiMenuBgColor@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	bl	_ATTR
	mov	x21, x0
Lloh9:
	adrp	x23, _UiCenterMenu@GOTPAGE
Lloh10:
	ldr	x23, [x23, _UiCenterMenu@GOTPAGEOFF]
	ldr	x8, [x23]
	cbz	x8, LBB0_11
; %bb.1:
	ldp	w8, w9, [x20]
	sub	w8, w8, w9
	sub	w8, w8, #2
	sxtw	x22, w8
	ldr	x25, [x20, #8]
	ldr	x0, [x25, x19, lsl #3]
	cbz	x0, LBB0_3
; %bb.2:
	bl	_strlen
LBB0_3:
	sub	x24, x22, x0
	lsr	x26, x24, #1
	add	x22, x26, #1
	add	x27, sp, #8
	add	x0, sp, #8
	mov	w1, #32
	mov	x2, x22
	bl	_memset
	sub	x24, x24, x26
	strb	wzr, [x27, x22]
	ldr	x1, [x25, x19, lsl #3]
	cbz	x1, LBB0_5
LBB0_4:
	add	x0, sp, #8
	bl	_strcat
LBB0_5:
	ldr	x8, [x23]
	cmp	x8, #0
	ccmp	x24, #0, #4, ne
	b.eq	LBB0_8
; %bb.6:
Lloh11:
	adrp	x22, l_.str.1@PAGE
Lloh12:
	add	x22, x22, l_.str.1@PAGEOFF
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	add	x0, sp, #8
	mov	x1, x22
	bl	_strcat
	subs	x24, x24, #1
	b.ne	LBB0_7
LBB0_8:
	ldr	x8, [x20, #8]
	ldr	x8, [x8, x19, lsl #3]
	cbz	x8, LBB0_12
; %bb.9:
	ldr	x8, [x20, #16]
	cmp	x8, x19
	b.ne	LBB0_14
; %bb.10:
Lloh13:
	adrp	x8, _UiSelectedTextBgColor@GOTPAGE
Lloh14:
	ldr	x8, [x8, _UiSelectedTextBgColor@GOTPAGEOFF]
Lloh15:
	adrp	x9, _UiSelectedTextColor@GOTPAGE
Lloh16:
	ldr	x9, [x9, _UiSelectedTextColor@GOTPAGEOFF]
	b	LBB0_13
LBB0_11:
	strb	wzr, [sp, #8]
Lloh17:
	adrp	x1, l_.str@PAGE
Lloh18:
	add	x1, x1, l_.str@PAGEOFF
	add	x0, sp, #8
	bl	_strcat
	mov	x24, #0
	ldr	x25, [x20, #8]
	ldr	x1, [x25, x19, lsl #3]
	cbnz	x1, LBB0_4
	b	LBB0_5
LBB0_12:
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #80
	bl	_memset
	ldp	w8, w9, [x20]
	mvn	w9, w9
	add	w2, w8, w9
	add	x0, sp, #8
	mov	w1, #196
	bl	_memset
Lloh19:
	adrp	x8, _UiMenuBgColor@GOTPAGE
Lloh20:
	ldr	x8, [x8, _UiMenuBgColor@GOTPAGEOFF]
Lloh21:
	adrp	x9, _UiMenuFgColor@GOTPAGE
Lloh22:
	ldr	x9, [x9, _UiMenuFgColor@GOTPAGEOFF]
LBB0_13:
	ldr	w0, [x9]
	ldr	w1, [x8]
	bl	_ATTR
	mov	x21, x0
LBB0_14:
	ldr	w8, [x20, #4]
	add	w0, w8, #1
	ldr	x8, [x20, #24]
	add	x8, x19, x8
	add	x1, x8, #1
	add	x2, sp, #8
	mov	x3, x21
	bl	_UiDrawText
	ldr	x8, [sp, #88]
Lloh23:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh24:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_16
; %bb.15:
	ldp	x29, x30, [sp, #176]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #160]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #144]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #128]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #112]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #96]             ; 16-byte Folded Reload
	add	sp, sp, #192
	ret
LBB0_16:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_UiTextColor,4,2                ; @UiTextColor
	.comm	_UiMenuBgColor,4,2              ; @UiMenuBgColor
	.comm	_UiCenterMenu,8,3               ; @UiCenterMenu
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"    "

l_.str.1:                               ; @.str.1
	.asciz	" "

	.comm	_UiMenuFgColor,4,2              ; @UiMenuFgColor
	.comm	_UiSelectedTextColor,4,2        ; @UiSelectedTextColor
	.comm	_UiSelectedTextBgColor,4,2      ; @UiSelectedTextBgColor
.subsections_via_symbols
