#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 of Lamp Holder	\n");
  printf("4 : Switch On Lamp Holder				\n");
  printf("5 : Switch Off Lamp Holder 				\n");
  printf("6 : Get Current Status of Wall Plug		\n");
  printf("7 : Switch On Wall Plug 				\n");
  printf("8 : Switch Off Wall Plug 				\n");
  printf("9 : Get Current Power Consumption		\n");
  printf("10: Get Energy Consumption 				\n");
  printf("11: Get Power Level of Wall Plug		\n");
  printf("12: Get Power Level of Lampholder		\n");
  printf("13: Get Luminance of Environment		\n");
  printf(
      "14: Quit								\n");
}


x86 assembly (clang, -O0):
<user_menu>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
lea    0xefa(%rip),%rdi
call   1030 <printf@plt>
lea    0xf14(%rip),%rdi
call   1030 <printf@plt>
lea    0xf30(%rip),%rdi
call   1030 <printf@plt>
lea    0xf43(%rip),%rdi
call   1030 <printf@plt>
lea    0xf58(%rip),%rdi
call   1030 <printf@plt>
lea    0xf73(%rip),%rdi
call   1030 <printf@plt>
lea    0xf85(%rip),%rdi
call   1030 <printf@plt>
lea    0xf98(%rip),%rdi
call   1030 <printf@plt>
lea    0xfb1(%rip),%rdi
call   1030 <printf@plt>
lea    0xfc6(%rip),%rdi
call   1030 <printf@plt>
lea    0xfde(%rip),%rdi
call   1030 <printf@plt>
lea    0xff7(%rip),%rdi
call   1030 <printf@plt>
lea    0x100f(%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    0xefc(%rip),%rdi
call   1030 <puts@plt>
lea    0xf15(%rip),%rdi
call   1030 <puts@plt>
lea    0xf30(%rip),%rdi
call   1030 <puts@plt>
lea    0xf42(%rip),%rdi
call   1030 <puts@plt>
lea    0xf56(%rip),%rdi
call   1030 <puts@plt>
lea    0xf70(%rip),%rdi
call   1030 <puts@plt>
lea    0xf81(%rip),%rdi
call   1030 <puts@plt>
lea    0xf93(%rip),%rdi
call   1030 <puts@plt>
lea    0xfab(%rip),%rdi
call   1030 <puts@plt>
lea    0xfbf(%rip),%rdi
call   1030 <puts@plt>
lea    0xfd6(%rip),%rdi
call   1030 <puts@plt>
lea    0xfee(%rip),%rdi
call   1030 <puts@plt>
lea    0x1005(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [33 x i8] c"1 : Show Current Temperature\09\09\09\0A\00"
@.str.1 = [38 x i8] c"2 : Show Current Relative Humidity\09\09\0A\00"
@.str.2 = [40 x i8] c"3 : Get Current Status of Lamp Holder\09\0A\00"
@.str.3 = [31 x i8] c"4 : Switch On Lamp Holder\09\09\09\09\0A\00"
@.str.4 = [33 x i8] c"5 : Switch Off Lamp Holder \09\09\09\09\0A\00"
@.str.5 = [39 x i8] c"6 : Get Current Status of Wall Plug\09\09\0A\00"
@.str.6 = [30 x i8] c"7 : Switch On Wall Plug \09\09\09\09\0A\00"
@.str.7 = [31 x i8] c"8 : Switch Off Wall Plug \09\09\09\09\0A\00"
@.str.8 = [37 x i8] c"9 : Get Current Power Consumption\09\09\0A\00"
@.str.9 = [33 x i8] c"10: Get Energy Consumption \09\09\09\09\0A\00"
@.str.10 = [36 x i8] c"11: Get Power Level of Wall Plug\09\09\0A\00"
@.str.11 = [37 x i8] c"12: Get Power Level of Lampholder\09\09\0A\00"
@.str.12 = [36 x i8] c"13: Get Luminance of Environment\09\09\0A\00"
@.str.13 = [18 x i8] c"14: Quit\09\09\09\09\09\09\09\09\0A\00"
define void @user_menu() {
%1 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 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 ([30 x i8], [30 x i8]* @.str.6, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.7, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.8, i64 0, i64 0))
%10 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.9, i64 0, i64 0))
%11 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.10, i64 0, i64 0))
%12 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.11, i64 0, i64 0))
%13 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.12, i64 0, i64 0))
%14 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.13, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [32 x i8] c"1 : Show Current Temperature\09\09\09\00"
@str.14 = [37 x i8] c"2 : Show Current Relative Humidity\09\09\00"
@str.15 = [39 x i8] c"3 : Get Current Status of Lamp Holder\09\00"
@str.16 = [30 x i8] c"4 : Switch On Lamp Holder\09\09\09\09\00"
@str.17 = [32 x i8] c"5 : Switch Off Lamp Holder \09\09\09\09\00"
@str.18 = [38 x i8] c"6 : Get Current Status of Wall Plug\09\09\00"
@str.19 = [29 x i8] c"7 : Switch On Wall Plug \09\09\09\09\00"
@str.20 = [30 x i8] c"8 : Switch Off Wall Plug \09\09\09\09\00"
@str.21 = [36 x i8] c"9 : Get Current Power Consumption\09\09\00"
@str.22 = [32 x i8] c"10: Get Energy Consumption \09\09\09\09\00"
@str.23 = [35 x i8] c"11: Get Power Level of Wall Plug\09\09\00"
@str.24 = [36 x i8] c"12: Get Power Level of Lampholder\09\09\00"
@str.25 = [35 x i8] c"13: Get Luminance of Environment\09\09\00"
@str.26 = [17 x i8] c"14: Quit\09\09\09\09\09\09\09\09\00"
define void @user_menu() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str.14, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str.15, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.16, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.17, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str.18, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.19, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.20, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str.21, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.22, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str.23, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str.24, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str.25, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.26, i64 0, i64 0))
ret void
}