#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void menu(void) {
  printf("\n============ Real Time Clock (RTC) Application ============\n");
  printf("1. Auto Alarm Test with Time\n");
  printf("2. Auto Poweroff Alarm Test with Time\n");
  printf("3. Auto Alarm Test with Time and Date\n");
  printf("4. Auto Poweroff Alarm Test with Time and Date\n");
  printf("5. Auto Alarm Test with Time manually\n");
  printf("\n");
  printf("6. RTC_SET_TIME\n");
  printf("7. RTC_RD_TIME\n");
  printf("8. RTC_ALM_SET\n");
  printf("9. RTC_ALM_READ\n");
  printf("a. RTC_WKALM_SET\n");
  printf("b. RTC_WKALM_RD\n");
  printf("c. RTC_IRQP_SET\n");
  printf("d. RTC_IRQP_READ\n");
  printf("e. Enter RTC Power Off Mode\n");
  printf("\n");
  printf("?. Display Menu\n");
  printf("X. Exit\n");
  printf("=========== (C) 2003-2006 Socle Technology Corp. ==========\n");
}


x86 assembly (clang, -O0):
<menu>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
lea    0xf17(%rip),%rdi
call   1030 <printf@plt>
lea    0xf29(%rip),%rdi
call   1030 <printf@plt>
lea    0xf44(%rip),%rdi
call   1030 <printf@plt>
lea    0xf5f(%rip),%rdi
call   1030 <printf@plt>
lea    0xf83(%rip),%rdi
call   1030 <printf@plt>
lea    0x1098(%rip),%rdi
call   1030 <printf@plt>
lea    0xf92(%rip),%rdi
call   1030 <printf@plt>
lea    0xf97(%rip),%rdi
call   1030 <printf@plt>
lea    0xf9b(%rip),%rdi
call   1030 <printf@plt>
lea    0xf9f(%rip),%rdi
call   1030 <printf@plt>
lea    0xfa4(%rip),%rdi
call   1030 <printf@plt>
lea    0xfaa(%rip),%rdi
call   1030 <printf@plt>
lea    0xfaf(%rip),%rdi
call   1030 <printf@plt>
lea    0xfb4(%rip),%rdi
call   1030 <printf@plt>
lea    0xfba(%rip),%rdi
call   1030 <printf@plt>
lea    0x1020(%rip),%rdi
call   1030 <printf@plt>
lea    0xfbf(%rip),%rdi
call   1030 <printf@plt>
lea    0xfc4(%rip),%rdi
call   1030 <printf@plt>
lea    0xfc1(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<menu>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <puts@plt>
lea    0xf09(%rip),%rdi
call   1040 <puts@plt>
lea    0xf1a(%rip),%rdi
call   1040 <puts@plt>
lea    0xf34(%rip),%rdi
call   1040 <puts@plt>
lea    0xf4e(%rip),%rdi
call   1040 <puts@plt>
lea    0xf71(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xf81(%rip),%rdi
call   1040 <puts@plt>
lea    0xf85(%rip),%rdi
call   1040 <puts@plt>
lea    0xf88(%rip),%rdi
call   1040 <puts@plt>
lea    0xf8b(%rip),%rdi
call   1040 <puts@plt>
lea    0xf8f(%rip),%rdi
call   1040 <puts@plt>
lea    0xf94(%rip),%rdi
call   1040 <puts@plt>
lea    0xf98(%rip),%rdi
call   1040 <puts@plt>
lea    0xf9c(%rip),%rdi
call   1040 <puts@plt>
lea    0xfa1(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xfa7(%rip),%rdi
call   1040 <puts@plt>
lea    0xfab(%rip),%rdi
call   1040 <puts@plt>
lea    0xfa7(%rip),%rdi
pop    %rax
jmp    1040 <puts@plt>

LLVM IR (-O0):
@.str = [62 x i8] c"\0A============ Real Time Clock (RTC) Application ============\0A\00"
@.str.1 = [30 x i8] c"1. Auto Alarm Test with Time\0A\00"
@.str.2 = [39 x i8] c"2. Auto Poweroff Alarm Test with Time\0A\00"
@.str.3 = [39 x i8] c"3. Auto Alarm Test with Time and Date\0A\00"
@.str.4 = [48 x i8] c"4. Auto Poweroff Alarm Test with Time and Date\0A\00"
@.str.5 = [39 x i8] c"5. Auto Alarm Test with Time manually\0A\00"
@.str.6 = [2 x i8] c"\0A\00"
@.str.7 = [17 x i8] c"6. RTC_SET_TIME\0A\00"
@.str.8 = [16 x i8] c"7. RTC_RD_TIME\0A\00"
@.str.9 = [16 x i8] c"8. RTC_ALM_SET\0A\00"
@.str.10 = [17 x i8] c"9. RTC_ALM_READ\0A\00"
@.str.11 = [18 x i8] c"a. RTC_WKALM_SET\0A\00"
@.str.12 = [17 x i8] c"b. RTC_WKALM_RD\0A\00"
@.str.13 = [17 x i8] c"c. RTC_IRQP_SET\0A\00"
@.str.14 = [18 x i8] c"d. RTC_IRQP_READ\0A\00"
@.str.15 = [29 x i8] c"e. Enter RTC Power Off Mode\0A\00"
@.str.16 = [17 x i8] c"?. Display Menu\0A\00"
@.str.17 = [9 x i8] c"X. Exit\0A\00"
@.str.18 = [61 x i8] c"=========== (C) 2003-2006 Socle Technology Corp. ==========\0A\00"
define void @menu() {
%1 = call i32 @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.4, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.5, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0))
%10 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.9, i64 0, i64 0))
%11 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.10, i64 0, i64 0))
%12 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.11, i64 0, i64 0))
%13 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0))
%14 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.13, i64 0, i64 0))
%15 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.14, i64 0, i64 0))
%16 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.15, i64 0, i64 0))
%17 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
%18 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.16, i64 0, i64 0))
%19 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.17, i64 0, i64 0))
%20 = call i32 @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.18, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [61 x i8] c"\0A============ Real Time Clock (RTC) Application ============\00"
@str.19 = [29 x i8] c"1. Auto Alarm Test with Time\00"
@str.20 = [38 x i8] c"2. Auto Poweroff Alarm Test with Time\00"
@str.21 = [38 x i8] c"3. Auto Alarm Test with Time and Date\00"
@str.22 = [47 x i8] c"4. Auto Poweroff Alarm Test with Time and Date\00"
@str.23 = [38 x i8] c"5. Auto Alarm Test with Time manually\00"
@str.24 = [16 x i8] c"6. RTC_SET_TIME\00"
@str.25 = [15 x i8] c"7. RTC_RD_TIME\00"
@str.26 = [15 x i8] c"8. RTC_ALM_SET\00"
@str.27 = [16 x i8] c"9. RTC_ALM_READ\00"
@str.28 = [17 x i8] c"a. RTC_WKALM_SET\00"
@str.29 = [16 x i8] c"b. RTC_WKALM_RD\00"
@str.30 = [16 x i8] c"c. RTC_IRQP_SET\00"
@str.31 = [17 x i8] c"d. RTC_IRQP_READ\00"
@str.32 = [28 x i8] c"e. Enter RTC Power Off Mode\00"
@str.33 = [16 x i8] c"?. Display Menu\00"
@str.34 = [8 x i8] c"X. Exit\00"
@str.35 = [60 x i8] c"=========== (C) 2003-2006 Socle Technology Corp. ==========\00"
define void @menu() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.19, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str.20, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str.21, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str.22, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str.23, i64 0, i64 0))
%7 = tail call i32 @putchar(i32 10)
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.24, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.25, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.26, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.27, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.28, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.29, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.30, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.31, i64 0, i64 0))
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.32, i64 0, i64 0))
%17 = tail call i32 @putchar(i32 10)
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.33, i64 0, i64 0))
%19 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str.34, i64 0, i64 0))
%20 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @str.35, i64 0, i64 0))
ret void
}