#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*/ getchar();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, char *);
char print2() {
  char c = 0;
  printf("\n\t1.Insert Node.");
  printf("\n\t2.Append Node.");
  printf("\n\t3.Delete Node.");
  printf("\n\t4.Print Node.");
  printf("\n\t5.Exit.\n->");
  scanf("%c", &c);
  getchar();
  return c;
}


x86 assembly (clang, -O0):
<print2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0x0,-0x1(%rbp)
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
lea    0xed0(%rip),%rdi
call   1030 <printf@plt>
lea    0xed1(%rip),%rdi
lea    -0x1(%rbp),%rsi
call   1050 <scanf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print2>:
push   %rax
movb   $0x0,0x7(%rsp)
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
lea    0xec8(%rip),%rdi
call   1030 <printf@plt>
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
lea    0xed2(%rip),%rdi
call   1030 <printf@plt>
lea    0xed6(%rip),%rdi
call   1030 <printf@plt>
lea    0xed7(%rip),%rdi
lea    0x7(%rsp),%rsi
call   1050 <scanf@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x7(%rsp),%al
pop    %rcx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"\0A\091.Insert Node.\00"
@.str.1 = [17 x i8] c"\0A\092.Append Node.\00"
@.str.2 = [17 x i8] c"\0A\093.Delete Node.\00"
@.str.3 = [16 x i8] c"\0A\094.Print Node.\00"
@.str.4 = [13 x i8] c"\0A\095.Exit.\0A->\00"
@.str.5 = [3 x i8] c"%c\00"
define signext i8 @print2() {
%1 = alloca i8
store i8 0, i8* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0))
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* %1)
%8 = call i32 (...) @getchar()
%9 = load i8, i8* %1
ret i8 %9
}

LLVM IR (-O2):
@.str = [17 x i8] c"\0A\091.Insert Node.\00"
@.str.1 = [17 x i8] c"\0A\092.Append Node.\00"
@.str.2 = [17 x i8] c"\0A\093.Delete Node.\00"
@.str.3 = [16 x i8] c"\0A\094.Print Node.\00"
@.str.4 = [13 x i8] c"\0A\095.Exit.\0A->\00"
@.str.5 = [3 x i8] c"%c\00"
define signext i8 @print2() {
%1 = alloca i8
store i8 0, i8* %1
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0))
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0))
%6 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0))
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* %1)
%8 = call i32 (...) @getchar()
%9 = load i8, i8* %1
ret i8 %9
}