#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 user_menu() {
  printf("1  : Show Current Temperature					"
         "	\n");
  printf("2  : Show Current Relative Humidity				"
         "	\n");
  printf("3  : Get Current Status Node					"
         "	\n");
  printf("4  : Get Current Switch Status on Node			"
         "	\n");
  printf("5  : Get Current Sensor Status on Node			  "
         "	\n");
  printf("6  : Get Current Multilevel Sensor Status on Node 	\n");
  printf("7  : Get Power Level of Node					"
         "	\n");
  printf("8  : Get Device Battery Level					"
         "	\n");
  printf("9  : Get Current Power Consumption				"
         "	\n");
  printf("10 : Get Energy Consumption 					"
         "	\n");
  printf("11 : Switch On-Off Node					"
         "		\n");
  printf("12 : Quit							"
         "				\n");
}


x86 assembly (clang, -O0):
<user_menu>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
lea    0xefe(%rip),%rdi
call   1030 <printf@plt>
lea    0xf1c(%rip),%rdi
call   1030 <printf@plt>
lea    0xf34(%rip),%rdi
call   1030 <printf@plt>
lea    0xf54(%rip),%rdi
call   1030 <printf@plt>
lea    0xf76(%rip),%rdi
call   1030 <printf@plt>
lea    0xf9f(%rip),%rdi
call   1030 <printf@plt>
lea    0xfb7(%rip),%rdi
call   1030 <printf@plt>
lea    0xfd0(%rip),%rdi
call   1030 <printf@plt>
lea    0xfed(%rip),%rdi
call   1030 <printf@plt>
lea    0x1005(%rip),%rdi
call   1030 <printf@plt>
lea    0x1019(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<user_menu>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf00(%rip),%rdi
call   1030 <puts@plt>
lea    0xf1d(%rip),%rdi
call   1030 <puts@plt>
lea    0xf34(%rip),%rdi
call   1030 <puts@plt>
lea    0xf53(%rip),%rdi
call   1030 <puts@plt>
lea    0xf74(%rip),%rdi
call   1030 <puts@plt>
lea    0xf9c(%rip),%rdi
call   1030 <puts@plt>
lea    0xfb3(%rip),%rdi
call   1030 <puts@plt>
lea    0xfcb(%rip),%rdi
call   1030 <puts@plt>
lea    0xfe7(%rip),%rdi
call   1030 <puts@plt>
lea    0xffe(%rip),%rdi
call   1030 <puts@plt>
lea    0x1011(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [37 x i8] c"1 : Show Current Temperature\09\09\09\09\09\09\0A\00"
@.str.1 = [42 x i8] c"2 : Show Current Relative Humidity\09\09\09\09\09\0A\00"
@.str.2 = [36 x i8] c"3 : Get Current Status Node\09\09\09\09\09\09\0A\00"
@.str.3 = [44 x i8] c"4 : Get Current Switch Status on Node\09\09\09\09\0A\00"
@.str.4 = [46 x i8] c"5 : Get Current Sensor Status on Node\09\09\09 \09\0A\00"
@.str.5 = [53 x i8] c"6 : Get Current Multilevel Sensor Status on Node \09\0A\00"
@.str.6 = [36 x i8] c"7 : Get Power Level of Node\09\09\09\09\09\09\0A\00"
@.str.7 = [37 x i8] c"8 : Get Device Battery Level\09\09\09\09\09\09\0A\00"
@.str.8 = [41 x i8] c"9 : Get Current Power Consumption\09\09\09\09\09\0A\00"
@.str.9 = [36 x i8] c"10 : Get Energy Consumption \09\09\09\09\09\09\0A\00"
@.str.10 = [32 x i8] c"11 : Switch On-Off Node\09\09\09\09\09\09\09\0A\00"
@.str.11 = [22 x i8] c"12 : Quit\09\09\09\09\09\09\09\09\09\09\09\0A\00"
define void @user_menu() {
%1 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.4, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.5, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.6, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.7, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.8, i64 0, i64 0))
%10 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.9, i64 0, i64 0))
%11 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.10, i64 0, i64 0))
%12 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.11, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [36 x i8] c"1 : Show Current Temperature\09\09\09\09\09\09\00"
@str.12 = [41 x i8] c"2 : Show Current Relative Humidity\09\09\09\09\09\00"
@str.13 = [35 x i8] c"3 : Get Current Status Node\09\09\09\09\09\09\00"
@str.14 = [43 x i8] c"4 : Get Current Switch Status on Node\09\09\09\09\00"
@str.15 = [45 x i8] c"5 : Get Current Sensor Status on Node\09\09\09 \09\00"
@str.16 = [52 x i8] c"6 : Get Current Multilevel Sensor Status on Node \09\00"
@str.17 = [35 x i8] c"7 : Get Power Level of Node\09\09\09\09\09\09\00"
@str.18 = [36 x i8] c"8 : Get Device Battery Level\09\09\09\09\09\09\00"
@str.19 = [40 x i8] c"9 : Get Current Power Consumption\09\09\09\09\09\00"
@str.20 = [35 x i8] c"10 : Get Energy Consumption \09\09\09\09\09\09\00"
@str.21 = [31 x i8] c"11 : Switch On-Off Node\09\09\09\09\09\09\09\00"
@str.22 = [21 x i8] c"12 : Quit\09\09\09\09\09\09\09\09\09\09\09\00"
define void @user_menu() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str.12, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str.13, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.14, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str.15, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @str.16, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str.17, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str.18, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.19, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str.20, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str.21, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.22, i64 0, i64 0))
ret void
}