	.file	"extr_..libpicofemenu.c_draw_menu_message.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	draw_menu_message, @function
draw_menu_message:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	rcx, rdi
	mov	r8d, 1
	xor	r10d, r10d
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r9d, 1
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	movzx	edx, BYTE PTR [rdi]
	xor	edi, edi
	test	dl, dl
	je	.L3
	.p2align 4,,10
	.p2align 3
.L2:
	mov	esi, r9d
	mov	rax, rcx
	sub	esi, ecx
	cmp	dl, 10
	je	.L50
	.p2align 4,,10
	.p2align 3
.L4:
	lea	ecx, [rsi+rax]
	movzx	edx, BYTE PTR 1[rax]
	add	rax, 1
	test	dl, dl
	je	.L20
	cmp	dl, 10
	jne	.L4
.L20:
	cmp	edi, ecx
	cmovl	edi, ecx
	test	dl, dl
	je	.L3
.L17:
	movzx	edx, BYTE PTR 1[rax]
	lea	rcx, 1[rax]
	add	r8d, 1
	test	dl, dl
	jne	.L2
.L3:
	imul	edi, DWORD PTR me_mfont_w[rip]
	imul	r8d, DWORD PTR me_mfont_h[rip]
	mov	eax, edi
	shr	eax, 31
	add	edi, eax
	mov	eax, DWORD PTR g_menuscreen_w[rip]
	sar	edi
	mov	r13d, eax
	shr	r13d, 31
	add	r13d, eax
	mov	eax, r8d
	shr	eax, 31
	sar	r13d
	add	r8d, eax
	mov	eax, DWORD PTR g_menuscreen_h[rip]
	sar	r8d
	mov	r12d, eax
	shr	r12d, 31
	add	r12d, eax
	xor	eax, eax
	sar	r12d
	sub	r13d, edi
	mov	edi, 1
	cmovs	r13d, eax
	sub	r12d, r8d
	cmovs	r12d, eax
	xor	esi, esi
	call	menu_draw_begin@PLT
	cmp	BYTE PTR [rbx], 0
	mov	eax, DWORD PTR me_mfont_h[rip]
	je	.L15
	.p2align 4,,10
	.p2align 3
.L10:
	mov	edi, DWORD PTR g_menuscreen_h[rip]
	sub	edi, eax
	cmp	edi, r12d
	jl	.L15
	mov	rdx, rbx
	mov	esi, r12d
	mov	edi, r13d
	call	text_out16@PLT
	movzx	eax, BYTE PTR [rbx]
	cmp	al, 10
	je	.L11
	test	al, al
	je	.L11
	.p2align 4,,10
	.p2align 3
.L12:
	movzx	eax, BYTE PTR 1[rbx]
	add	rbx, 1
	test	al, al
	je	.L11
	cmp	al, 10
	jne	.L12
.L11:
	cmp	al, 1
	mov	eax, DWORD PTR me_mfont_h[rip]
	sbb	rbx, -1
	add	r12d, eax
	cmp	BYTE PTR [rbx], 0
	jne	.L10
.L15:
	xor	eax, eax
	call	menu_separation@PLT
	test	rbp, rbp
	je	.L9
	call	rbp
.L9:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	jmp	menu_draw_end@PLT
	.p2align 4,,10
	.p2align 3
.L50:
	.cfi_restore_state
	test	edi, edi
	cmovs	edi, r10d
	jmp	.L17
	.cfi_endproc
.LFE0:
	.size	draw_menu_message, .-draw_menu_message
	.comm	me_mfont_w,4,4
	.comm	me_mfont_h,4,4
	.comm	g_menuscreen_w,4,4
	.comm	g_menuscreen_h,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_..libpicofemenu.c_draw_menu_message.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	draw_menu_message, %function
draw_menu_message:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldrb	r2, [r0]	@ zero_extendqisi2
	mov	r5, r1
	cmp	r2, #0
	mov	r4, r0
	moveq	r1, r2
	moveq	lr, #1
	beq	.L3
	mov	r3, r0
	mov	r1, #0
	mov	lr, #1
.L2:
	cmp	r2, #10
	rsbne	r0, r3, #1
	beq	.L38
.L4:
	add	r2, r3, r0
	ldrb	ip, [r3, #1]!	@ zero_extendqisi2
	cmp	ip, #0
	cmpne	ip, #10
	bne	.L4
	cmp	r1, r2
	movlt	r1, r2
	cmp	ip, #0
	beq	.L3
.L15:
	ldrb	r2, [r3, #1]	@ zero_extendqisi2
	add	lr, lr, #1
	cmp	r2, #0
	add	r3, r3, #1
	bne	.L2
.L3:
	ldr	r3, .L39
	ldr	r8, .L39+4
	ldr	r0, [r3]
	ldr	r2, [r8]
	ldr	r3, .L39+8
	ldr	r9, .L39+12
	mul	r1, r0, r1
	mul	lr, r2, lr
	ldr	r2, [r3]
	ldr	r3, [r9]
	add	r2, r2, r2, lsr #31
	add	r3, r3, r3, lsr #31
	asr	r6, r3, #1
	asr	r7, r2, #1
	add	r1, r1, r1, lsr #31
	add	lr, lr, lr, lsr #31
	sub	r7, r7, r1, asr #1
	sub	lr, r6, lr, asr #1
	mov	r1, #0
	mov	r0, #1
	bic	r6, lr, lr, asr #31
	bl	menu_draw_begin
	ldrb	r3, [r4]	@ zero_extendqisi2
	bic	r7, r7, r7, asr #31
	cmp	r3, #0
	ldrne	r2, [r8]
	beq	.L13
.L9:
	ldr	r3, [r9]
	sub	r3, r3, r2
	cmp	r3, r6
	blt	.L13
	mov	r2, r4
	mov	r1, r6
	mov	r0, r7
	bl	text_out16
	ldrb	r3, [r4]	@ zero_extendqisi2
	cmp	r3, #10
	cmpne	r3, #0
	beq	.L10
.L11:
	ldrb	r3, [r4, #1]!	@ zero_extendqisi2
	cmp	r3, #0
	cmpne	r3, #10
	bne	.L11
.L10:
	cmp	r3, #0
	addne	r4, r4, #1
	ldrb	r3, [r4]	@ zero_extendqisi2
	ldr	r2, [r8]
	cmp	r3, #0
	add	r6, r6, r2
	bne	.L9
.L13:
	bl	menu_separation
	cmp	r5, #0
	beq	.L8
	blx	r5
.L8:
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	b	menu_draw_end
.L38:
	bic	r1, r1, r1, asr #31
	b	.L15
.L40:
	.align	2
.L39:
	.word	me_mfont_w
	.word	me_mfont_h
	.word	g_menuscreen_w
	.word	g_menuscreen_h
	.size	draw_menu_message, .-draw_menu_message
	.comm	me_mfont_w,4,4
	.comm	me_mfont_h,4,4
	.comm	g_menuscreen_w,4,4
	.comm	g_menuscreen_h,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
