xunge/DecIR huggingface dataset:
long int xw(long int *y) {
  long int xx = *y & 65535;
  return xx + y[1];
}


x86 assembly (clang, -O0):
<xw>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
and    $0xffff,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
add    0x8(%rcx),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xw>:
movzwl (%rdi),%eax
add    0x8(%rdi),%rax
ret

LLVM IR (-O0):
define i64 @xw(i64* %0) {
%2 = alloca i64*
%3 = alloca i64
store i64* %0, i64** %2
%4 = load i64*, i64** %2
%5 = load i64, i64* %4
%6 = and i64 %5, 65535
store i64 %6, i64* %3
%7 = load i64, i64* %3
%8 = load i64*, i64** %2
%9 = getelementptr inbounds i64, i64* %8, i64 1
%10 = load i64, i64* %9
%11 = add nsw i64 %7, %10
ret i64 %11
}

LLVM IR (-O2):
define i64 @xw(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 65535
%4 = getelementptr inbounds i64, i64* %0, i64 1
%5 = load i64, i64* %4
%6 = add nsw i64 %3, %5
ret i64 %6
}
void hide_tilde(char *str) {
  for (; *str != '\0'; str++)
    if (*str == '~')
      *str = '*';
  return;
}


x86 assembly (clang, -O0):
<hide_tilde>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1145 <hide_tilde+0x45>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x7e,%eax
jne    112f <hide_tilde+0x2f>
mov    -0x8(%rbp),%rax
movb   $0x2a,(%rax)
jmp    1134 <hide_tilde+0x34>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <hide_tilde+0x8>
pop    %rbp
ret

x86 assembly (clang, -O2):
<hide_tilde>:
jmp    1117 <hide_tilde+0x17>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movb   $0x2a,(%rdi)
add    $0x1,%rdi
movzbl (%rdi),%eax
cmp    $0x7e,%al
je     1110 <hide_tilde+0x10>
test   %al,%al
jne    1113 <hide_tilde+0x13>
ret

LLVM IR (-O0):
define void @hide_tilde(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %16, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %19
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp eq i32 %11, 126
br i1 %12, label %13, label %15
13: ; preds = %8
%14 = load i8*, i8** %2
store i8 42, i8* %14
br label %15
15: ; preds = %13, %8
br label %16
16: ; preds = %15
%17 = load i8*, i8** %2
%18 = getelementptr inbounds i8, i8* %17, i32 1
store i8* %18, i8** %2
br label %3
19: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @hide_tilde(i8* nocapture %0) {
br label %2
2: ; preds = %6, %1
%3 = phi i8* [ %0, %1 ], [ %7, %6 ]
%4 = load i8, i8* %3
switch i8 %4, label %6 [
i8 0, label %8
i8 126, label %5
]
5: ; preds = %2
store i8 42, i8* %3
br label %6
6: ; preds = %2, %5
%7 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
8: ; preds = %2
ret void
}
void Draco9210ClearCS() {}


x86 assembly (clang, -O0):
<Draco9210ClearCS>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Draco9210ClearCS>:
ret

LLVM IR (-O0):
define void @Draco9210ClearCS() {
ret void
}

LLVM IR (-O2):
define void @Draco9210ClearCS() {
ret void
}
int indexOfNameBegin(char *fullName) {
  int i;
  int index = 0;
  for (i = 0; i < 100, fullName[i] != '\0'; i++) {
    if (fullName[i] == '/') {
      index = i + 1;
    }
  }
  return (index);
}


x86 assembly (clang, -O0):
<indexOfNameBegin>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     115c <indexOfNameBegin+0x5c>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x2f,%eax
jne    1149 <indexOfNameBegin+0x49>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    114e <indexOfNameBegin+0x4e>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1116 <indexOfNameBegin+0x16>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<indexOfNameBegin>:
xor    %ecx,%ecx
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x1,%rcx
movzbl -0x1(%rdi,%rcx,1),%edx
test   %dl,%dl
je     1126 <indexOfNameBegin+0x26>
cmp    $0x2f,%dl
jne    1110 <indexOfNameBegin+0x10>
mov    %ecx,%eax
jmp    1110 <indexOfNameBegin+0x10>
ret

LLVM IR (-O0):
define i32 @indexOfNameBegin(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %4
store i32 0, i32* %3
br label %5
5: ; preds = %28, %1
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 100
%8 = zext i1 %7 to i32
%9 = load i8*, i8** %2
%10 = load i32, i32* %3
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i8, i8* %9, i64 %11
%13 = load i8, i8* %12
%14 = sext i8 %13 to i32
%15 = icmp ne i32 %14, 0
br i1 %15, label %16, label %31
16: ; preds = %5
%17 = load i8*, i8** %2
%18 = load i32, i32* %3
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i8, i8* %17, i64 %19
%21 = load i8, i8* %20
%22 = sext i8 %21 to i32
%23 = icmp eq i32 %22, 47
br i1 %23, label %24, label %27
24: ; preds = %16
%25 = load i32, i32* %3
%26 = add nsw i32 %25, 1
store i32 %26, i32* %4
br label %27
27: ; preds = %24, %16
br label %28
28: ; preds = %27
%29 = load i32, i32* %3
%30 = add nsw i32 %29, 1
store i32 %30, i32* %3
br label %5
31: ; preds = %5
%32 = load i32, i32* %4
ret i32 %32
}

LLVM IR (-O2):
define i32 @indexOfNameBegin(i8* nocapture %0) {
br label %2
2: ; preds = %11, %1
%3 = phi i64 [ %12, %11 ], [ 0, %1 ]
%4 = phi i32 [ %13, %11 ], [ 0, %1 ]
br label %5
5: ; preds = %2, %9
%6 = phi i64 [ %10, %9 ], [ %3, %2 ]
%7 = getelementptr inbounds i8, i8* %0, i64 %6
%8 = load i8, i8* %7
switch i8 %8, label %9 [
i8 0, label %14
i8 47, label %11
]
9: ; preds = %5
%10 = add nuw i64 %6, 1
br label %5
11: ; preds = %5
%12 = add nuw i64 %6, 1
%13 = trunc i64 %12 to i32
br label %2
14: ; preds = %5
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
void test_example_case() { assert(1 == 1); }


x86 assembly (clang, -O0):
<test_example_case>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_example_case>:
mov    $0x1,%edi
jmp    1030 <assert@plt>

LLVM IR (-O0):
define void @test_example_case() {
%1 = call i32 @assert(i32 1)
ret void
}

LLVM IR (-O2):
define void @test_example_case() {
%1 = tail call i32 @assert(i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ rec(int /*<<< orphan*/, int *);
int main() {
  int t;
  rec(0, &t);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %edi,%edi
lea    -0x8(%rbp),%rsi
call   1030 <rec@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0x4(%rsp),%rsi
xor    %edi,%edi
call   1030 <rec@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @rec(i32 0, i32* %2)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @rec(i32 0, i32* %1)
ret i32 0
}
/* Variables and functions */
char getchar();
void clean() {
  while (getchar() != '\n')
    ;
}


x86 assembly (clang, -O0):
<clean>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <clean+0x9>
mov    $0x0,%al
call   1030 <getchar@plt>
movsbl %al,%eax
cmp    $0xa,%eax
je     1131 <clean+0x21>
jmp    1119 <clean+0x9>
pop    %rbp
ret

x86 assembly (clang, -O2):
<clean>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <getchar@plt>
cmp    $0xa,%al
jne    1120 <clean+0x10>
pop    %rax
ret

LLVM IR (-O0):
define void @clean() {
br label %1
1: ; preds = %5, %0
%2 = call signext i8 (...) @getchar()
%3 = sext i8 %2 to i32
%4 = icmp ne i32 %3, 10
br i1 %4, label %5, label %6
5: ; preds = %1
br label %1
6: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @clean() {
br label %1
1: ; preds = %1, %0
%2 = tail call signext i8 (...) @getchar()
%3 = icmp eq i8 %2, 10
br i1 %3, label %4, label %1
4: ; preds = %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void OtterPrintTailer(FILE *Stream) {
  fprintf(Stream, "%%----------------------------------------------------------"
                  "--------------------\n");
}


x86 assembly (clang, -O0):
<OtterPrintTailer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<OtterPrintTailer>:
lea    0xee9(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [82 x i8] c"%%------------------------------------------------------------------------------\0A\00"
define void @OtterPrintTailer(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [82 x i8] c"%%------------------------------------------------------------------------------\0A\00"
define void @OtterPrintTailer(i32* nocapture %0) {
%2 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_ECB();
int /*<<< orphan*/ test_decrypt();
int main(int argc, char **argv) {
  test_ECB();
  test_decrypt();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <test_ECB@plt>
mov    $0x0,%al
call   1030 <test_decrypt@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <test_ECB@plt>
xor    %eax,%eax
call   1030 <test_decrypt@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @test_ECB()
%7 = call i32 (...) @test_decrypt()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @test_ECB()
%4 = tail call i32 (...) @test_decrypt()
ret i32 0
}
unsigned short int swaps(unsigned short int n) {
  return ((n & 0xff) << 8) | ((n & 0xff00) >> 8);
}


x86 assembly (clang, -O0):
<swaps>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
and    $0xff,%eax
shl    $0x8,%eax
movzwl -0x2(%rbp),%ecx
and    $0xff00,%ecx
sar    $0x8,%ecx
or     %ecx,%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<swaps>:
mov    %edi,%eax
rol    $0x8,%ax
ret

LLVM IR (-O0):
define zeroext i16 @swaps(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = and i32 %4, 255
%6 = shl i32 %5, 8
%7 = load i16, i16* %2
%8 = zext i16 %7 to i32
%9 = and i32 %8, 65280
%10 = ashr i32 %9, 8
%11 = or i32 %6, %10
%12 = trunc i32 %11 to i16
ret i16 %12
}

LLVM IR (-O2):
define zeroext i16 @swaps(i16 zeroext %0) {
%2 = tail call i16 @llvm.bswap.i16(i16 %0)
ret i16 %2
}
/* Variables and functions */
scalar_t__ luaA_passresults();
char *luaL_opt_lstr(int, int /*<<< orphan*/ *, int /*<<< orphan*/ *);
scalar_t__ lua_dofile(char *);
int /*<<< orphan*/ lua_pushusertag(int /*<<< orphan*/ *, int /*<<< orphan*/);
void luaB_dofile(void) {
  char *fname = (luaL_opt_lstr((1), (NULL), NULL));
  if (lua_dofile(fname) == 0)
    if (luaA_passresults() == 0)
      lua_pushusertag(NULL, 0);
}


x86 assembly (clang, -O0):
<luaB_dofile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x1,%edi
xor    %eax,%eax
mov    %eax,%edx
mov    %rdx,%rsi
call   1040 <luaL_opt_lstr@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <lua_dofile@plt>
cmp    $0x0,%rax
jne    1191 <luaB_dofile+0x51>
mov    $0x0,%al
call   1060 <luaA_passresults@plt>
cmp    $0x0,%rax
jne    118c <luaB_dofile+0x4c>
xor    %eax,%eax
mov    %eax,%edi
xor    %esi,%esi
call   1030 <lua_pushusertag@plt>
jmp    1191 <luaB_dofile+0x51>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<luaB_dofile>:
push   %rax
mov    $0x1,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1040 <luaL_opt_lstr@plt>
mov    %rax,%rdi
call   1050 <lua_dofile@plt>
test   %rax,%rax
jne    1168 <luaB_dofile+0x28>
xor    %eax,%eax
call   1060 <luaA_passresults@plt>
test   %rax,%rax
je     116a <luaB_dofile+0x2a>
pop    %rax
ret
xor    %edi,%edi
xor    %esi,%esi
pop    %rax
jmp    1030 <lua_pushusertag@plt>

LLVM IR (-O0):
define void @luaB_dofile() {
%1 = alloca i8*
%2 = call i8* @luaL_opt_lstr(i32 1, i32* null, i32* null)
store i8* %2, i8** %1
%3 = load i8*, i8** %1
%4 = call i64 @lua_dofile(i8* %3)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %12
6: ; preds = %0
%7 = call i64 (...) @luaA_passresults()
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %6
%10 = call i32 @lua_pushusertag(i32* null, i32 0)
br label %11
11: ; preds = %9, %6
br label %12
12: ; preds = %11, %0
ret void
}

LLVM IR (-O2):
define void @luaB_dofile() {
%1 = tail call i8* @luaL_opt_lstr(i32 1, i32* null, i32* null)
%2 = tail call i64 @lua_dofile(i8* %1)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %9
4: ; preds = %0
%5 = tail call i64 (...) @luaA_passresults()
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %4
%8 = tail call i32 @lua_pushusertag(i32* null, i32 0)
br label %9
9: ; preds = %4, %7, %0
ret void
}
volatile int trng() { return *((volatile int *)0x3FF20E44); }


x86 assembly (clang, -O0):
<trng>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3ff20e44,%eax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<trng>:
mov    0x3ff20e44,%eax
ret

LLVM IR (-O0):
define i32 @trng() {
%1 = load volatile i32, i32* inttoptr (i64 1072827972 to i32*)
ret i32 %1
}

LLVM IR (-O2):
define i32 @trng() {
%1 = load volatile i32, i32* inttoptr (i64 1072827972 to i32*)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, ...);
void checkArgs(int argc, char *argv[]) {
  if (argc != 3) {
    printf("invocation error in program invocation. Correct format:\n ");
    printf("%s <serverIP> <serverPort>\n ", argv[0]);
    exit(-1);
  }
}


x86 assembly (clang, -O0):
<checkArgs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x3,-0x4(%rbp)
je     1166 <checkArgs+0x46>
lea    0xec0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xee5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checkArgs>:
cmp    $0x3,%edi
jne    1126 <checkArgs+0x6>
ret
push   %rbx
mov    %rsi,%rbx
lea    0xecf(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    (%rbx),%rsi
lea    0xef8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [58 x i8] c"invocation error in program invocation. Correct format:\0A \00"
@.str.1 = [29 x i8] c"%s <serverIP> <serverPort>\0A \00"
define void @checkArgs(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* %3
%6 = icmp ne i32 %5, 3
br i1 %6, label %7, label %14
7: ; preds = %2
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0))
%9 = load i8**, i8*** %4
%10 = getelementptr inbounds i8*, i8** %9, i64 0
%11 = load i8*, i8** %10
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8* %11)
%13 = call i32 @exit(i32 -1)
unreachable
14: ; preds = %2
ret void
}

LLVM IR (-O2):
@.str = [58 x i8] c"invocation error in program invocation. Correct format:\0A \00"
@.str.1 = [29 x i8] c"%s <serverIP> <serverPort>\0A \00"
define void @checkArgs(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 3
br i1 %3, label %9, label %4
4: ; preds = %2
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0))
%6 = load i8*, i8** %1
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8* %6)
%8 = tail call i32 @exit(i32 -1)
unreachable
9: ; preds = %2
ret void
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int ntohl(unsigned long);
uint64_t ntoh64p(unsigned char *p) {
  uint64_t ret = (ntohl(*(unsigned long *)(p)));
  ret <<= 32;
  ret += (ntohl(*(unsigned long *)(p + 4)));
  return ret;
}


x86 assembly (clang, -O0):
<ntoh64p>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <ntohl@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x20,%ecx
shl    %cl,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%rdi
call   1030 <ntohl@plt>
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ntoh64p>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1030 <ntohl@plt>
mov    0x4(%rbx),%rdi
pop    %rbx
jmp    1030 <ntohl@plt>

LLVM IR (-O0):
define i32 @ntoh64p(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i64*
%6 = load i64, i64* %5
%7 = call i32 @ntohl(i64 %6)
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = shl i32 %8, 32
store i32 %9, i32* %3
%10 = load i8*, i8** %2
%11 = getelementptr inbounds i8, i8* %10, i64 4
%12 = bitcast i8* %11 to i64*
%13 = load i64, i64* %12
%14 = call i32 @ntohl(i64 %13)
%15 = load i32, i32* %3
%16 = add nsw i32 %15, %14
store i32 %16, i32* %3
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
define i32 @ntoh64p(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = tail call i32 @ntohl(i64 %3)
%5 = getelementptr inbounds i8, i8* %0, i64 4
%6 = bitcast i8* %5 to i64*
%7 = load i64, i64* %6
%8 = tail call i32 @ntohl(i64 %7)
ret i32 poison
}
/* Variables and functions */
int /*<<< orphan*/ animation_walk();
void animation(void) { animation_walk(); }


x86 assembly (clang, -O0):
<animation>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <animation_walk@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<animation>:
xor    %eax,%eax
jmp    1030 <animation_walk@plt>

LLVM IR (-O0):
define void @animation() {
%1 = call i32 (...) @animation_walk()
ret void
}

LLVM IR (-O2):
define void @animation() {
%1 = tail call i32 (...) @animation_walk()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void usage() {
  fputs("Usage: minecurses [options]\n\n"
        "Options:\n"
        "  -h, --help		show this help message\n"
        "  -m, --mine-density	set density of minefield [default: 0.15]\n"
        "  -c, --cursor	turn on character cursor mode (uses # as cursor)\n",
        stderr);
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%esi
lea    0xecc(%rip),%rdi
call   1030 <fputs@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%esi
lea    0xecf(%rip),%rdi
call   1030 <fputs@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [202 x i8] c"Usage: minecurses [options]\0A\0AOptions:\0A -h, --help\09\09show this help message\0A -m, --mine-density\09set density of minefield [default: 0.15]\0A -c, --cursor\09turn on character cursor mode (uses # as cursor)\0A\00"
@stderr = global i32 0
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fputs(i8* getelementptr inbounds ([202 x i8], [202 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [202 x i8] c"Usage: minecurses [options]\0A\0AOptions:\0A -h, --help\09\09show this help message\0A -m, --mine-density\09set density of minefield [default: 0.15]\0A -c, --cursor\09turn on character cursor mode (uses # as cursor)\0A\00"
@stderr = global i32 0
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([202 x i8], [202 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @exit(i32 1)
unreachable
}
int test_imm_EAint64_lowword_reg(long long val) {
  return ((val) & (0xEA << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_EAint64_lowword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
and    $0xea,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_EAint64_lowword_reg>:
test   $0xea,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_EAint64_lowword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = and i64 %3, 234
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i64
%7 = select i1 %5, i32 -20, i32 -40
ret i32 %7
}

LLVM IR (-O2):
define i32 @test_imm_EAint64_lowword_reg(i64 %0) {
%2 = and i64 %0, 234
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_t;

/* Variables and functions */
int /*<<< orphan*/ free(int /*<<< orphan*/ *);
void OSAL_TaskCleanup(void *pTask) { free((pthread_t *)pTask); }


x86 assembly (clang, -O0):
<OSAL_TaskCleanup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<OSAL_TaskCleanup>:
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @OSAL_TaskCleanup(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to i32*
%5 = call i32 @free(i32* %4)
ret void
}

LLVM IR (-O2):
define void @OSAL_TaskCleanup(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = tail call i32 @free(i32* %2)
ret void
}
/* Variables and functions */
char *strrchr(char const *, char);
const char *c4pkg_net_extract_file_from_url(const char *url) {
  if (!url) {
    return NULL;
  }
  const char *f = strrchr(url, '/');
  return f ? f + 1 : NULL;
}


x86 assembly (clang, -O0):
<c4pkg_net_extract_file_from_url>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1134 <c4pkg_net_extract_file_from_url+0x24>
movq   $0x0,-0x8(%rbp)
jmp    1175 <c4pkg_net_extract_file_from_url+0x65>
mov    -0x10(%rbp),%rdi
mov    $0x2f,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1162 <c4pkg_net_extract_file_from_url+0x52>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    116d <c4pkg_net_extract_file_from_url+0x5d>
xor    %eax,%eax
mov    %rax,-0x20(%rbp)
jmp    116d <c4pkg_net_extract_file_from_url+0x5d>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<c4pkg_net_extract_file_from_url>:
test   %rdi,%rdi
je     1133 <c4pkg_net_extract_file_from_url+0x23>
push   %rax
mov    $0x2f,%esi
call   1030 <strrchr@plt>
mov    %rax,%rcx
add    $0x1,%rax
test   %rcx,%rcx
cmove  %rcx,%rax
add    $0x8,%rsp
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i8* @c4pkg_net_extract_file_from_url(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = icmp ne i8* %5, null
br i1 %6, label %8, label %7
7: ; preds = %1
store i8* null, i8** %2
br label %19
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = call i8* @strrchr(i8* %9, i8 signext 47)
store i8* %10, i8** %4
%11 = load i8*, i8** %4
%12 = icmp ne i8* %11, null
br i1 %12, label %13, label %16
13: ; preds = %8
%14 = load i8*, i8** %4
%15 = getelementptr inbounds i8, i8* %14, i64 1
br label %17
16: ; preds = %8
br label %17
17: ; preds = %16, %13
%18 = phi i8* [ %15, %13 ], [ null, %16 ]
store i8* %18, i8** %2
br label %19
19: ; preds = %17, %7
%20 = load i8*, i8** %2
ret i8* %20
}

LLVM IR (-O2):
define i8* @c4pkg_net_extract_file_from_url(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = tail call i8* @strrchr(i8* %0, i8 signext 47)
%5 = icmp eq i8* %4, null
%6 = getelementptr inbounds i8, i8* %4, i64 1
%7 = select i1 %5, i8* null, i8* %6
br label %8
8: ; preds = %1, %3
%9 = phi i8* [ %7, %3 ], [ null, %1 ]
ret i8* %9
}
/* Variables and functions */
int /*<<< orphan*/ write(char *, char *, int /*<<< orphan*/ *);
void function_empty_time() { write("csv-task.csv", ",", NULL); }


x86 assembly (clang, -O0):
<function_empty_time>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xeeb(%rip),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <write@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<function_empty_time>:
lea    0xee9(%rip),%rdi
lea    0xeef(%rip),%rsi
xor    %edx,%edx
jmp    1030 <write@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"csv-task.csv\00"
@.str.1 = [2 x i8] c",\00"
define void @function_empty_time() {
%1 = call i32 @write(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32* null)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"csv-task.csv\00"
@.str.1 = [2 x i8] c",\00"
define void @function_empty_time() {
%1 = tail call i32 @write(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32* null)
ret void
}
void wpas_p2p_notif_disconnected(struct wpa_supplicant *wpa_s) {}


x86 assembly (clang, -O0):
<wpas_p2p_notif_disconnected>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<wpas_p2p_notif_disconnected>:
ret

LLVM IR (-O0):
%struct.wpa_supplicant = type opaque
define void @wpas_p2p_notif_disconnected(%struct.wpa_supplicant* %0) {
%2 = alloca %struct.wpa_supplicant*
store %struct.wpa_supplicant* %0, %struct.wpa_supplicant** %2
ret void
}

LLVM IR (-O2):
%struct.wpa_supplicant = type opaque
define void @wpas_p2p_notif_disconnected(%struct.wpa_supplicant* nocapture %0) {
ret void
}
/* Type definitions */
struct task_struct {
  int dummy;
};
struct pt_regs {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ __unlazy_fpu(struct task_struct *, struct pt_regs *);
int /*<<< orphan*/ preempt_disable();
int /*<<< orphan*/ preempt_enable();
void unlazy_fpu(struct task_struct *tsk, struct pt_regs *regs) {
  preempt_disable();
  __unlazy_fpu(tsk, regs);
  preempt_enable();
}


x86 assembly (clang, -O0):
<unlazy_fpu>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1050 <preempt_disable@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <__unlazy_fpu@plt>
mov    $0x0,%al
call   1040 <preempt_enable@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unlazy_fpu>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %eax,%eax
call   1050 <preempt_disable@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <__unlazy_fpu@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <preempt_enable@plt>

LLVM IR (-O0):
%struct.task_struct = type { i32 }
%struct.pt_regs = type { i32 }
define void @unlazy_fpu(%struct.task_struct* %0, %struct.pt_regs* %1) {
%3 = alloca %struct.task_struct*
%4 = alloca %struct.pt_regs*
store %struct.task_struct* %0, %struct.task_struct** %3
store %struct.pt_regs* %1, %struct.pt_regs** %4
%5 = call i32 (...) @preempt_disable()
%6 = load %struct.task_struct*, %struct.task_struct** %3
%7 = load %struct.pt_regs*, %struct.pt_regs** %4
%8 = call i32 @__unlazy_fpu(%struct.task_struct* %6, %struct.pt_regs* %7)
%9 = call i32 (...) @preempt_enable()
ret void
}

LLVM IR (-O2):
%struct.task_struct = type { i32 }
%struct.pt_regs = type { i32 }
define void @unlazy_fpu(%struct.task_struct* %0, %struct.pt_regs* %1) {
%3 = tail call i32 (...) @preempt_disable()
%4 = tail call i32 @__unlazy_fpu(%struct.task_struct* %0, %struct.pt_regs* %1)
%5 = tail call i32 (...) @preempt_enable()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ HonggfuzzFetchData(int /*<<< orphan*/ const **, size_t *);
int /*<<< orphan*/ HonggfuzzRunOneInput(int /*<<< orphan*/ const *, size_t);
int /*<<< orphan*/ performanceCheck();
void HonggfuzzPersistentLoop(void) {
  for (;;) {
    size_t len;
    const uint8_t *buf;
    performanceCheck();
    HonggfuzzFetchData(&buf, &len);
    HonggfuzzRunOneInput(buf, len);
  }
}


x86 assembly (clang, -O0):
<HonggfuzzPersistentLoop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <performanceCheck@plt>
lea    -0x10(%rbp),%rdi
lea    -0x8(%rbp),%rsi
call   1030 <HonggfuzzFetchData@plt>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1040 <HonggfuzzRunOneInput@plt>
jmp    1138 <HonggfuzzPersistentLoop+0x8>

x86 assembly (clang, -O2):
<HonggfuzzPersistentLoop>:
push   %r14
push   %rbx
sub    $0x18,%rsp
lea    0x8(%rsp),%r14
lea    0x10(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1050 <performanceCheck@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <HonggfuzzFetchData@plt>
mov    0x8(%rsp),%rdi
mov    0x10(%rsp),%rsi
call   1040 <HonggfuzzRunOneInput@plt>
jmp    1150 <HonggfuzzPersistentLoop+0x20>

LLVM IR (-O0):
define void @HonggfuzzPersistentLoop() {
%1 = alloca i64
%2 = alloca i32*
br label %3
3: ; preds = %3, %0
%4 = call i32 (...) @performanceCheck()
%5 = call i32 @HonggfuzzFetchData(i32** %2, i64* %1)
%6 = load i32*, i32** %2
%7 = load i64, i64* %1
%8 = call i32 @HonggfuzzRunOneInput(i32* %6, i64 %7)
br label %3
}

LLVM IR (-O2):
define void @HonggfuzzPersistentLoop() {
%1 = alloca i64
%2 = alloca i32*
%3 = bitcast i64* %1 to i8*
%4 = bitcast i32** %2 to i8*
br label %5
5: ; preds = %5, %0
%6 = call i32 (...) @performanceCheck()
%7 = call i32 @HonggfuzzFetchData(i32** %2, i64* %1)
%8 = load i32*, i32** %2
%9 = load i64, i64* %1
%10 = call i32 @HonggfuzzRunOneInput(i32* %8, i64 %9)
br label %5
}
/* Variables and functions */
double calcMeanObliquityOfEcliptic(double const);
double cos(int /*<<< orphan*/);
int /*<<< orphan*/ degToRad(double);
double calcObliquityCorrection(const double t) {
  double e0;
  double omega;
  double e;
  e0 = calcMeanObliquityOfEcliptic(t);
  omega = 125.04 - 1934.136 * t;
  e = e0 + 0.00256 * cos(degToRad(omega));
  return e;
}


x86 assembly (clang, -O0):
<calcObliquityCorrection>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <calcMeanObliquityOfEcliptic@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xeaf(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xeab(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1050 <degToRad@plt>
mov    %eax,%edi
call   1040 <cos@plt>
movsd  -0x28(%rbp),%xmm1
movsd  0xe6a(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calcObliquityCorrection>:
sub    $0x18,%rsp
movsd  %xmm0,0x8(%rsp)
call   1030 <calcMeanObliquityOfEcliptic@plt>
movsd  %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
mulsd  0xead(%rip),%xmm0
addsd  0xead(%rip),%xmm0
call   1050 <degToRad@plt>
mov    %eax,%edi
call   1040 <cos@plt>
mulsd  0xea1(%rip),%xmm0
addsd  0x10(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @calcObliquityCorrection(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %2
%6 = load double, double* %2
%7 = call double @calcMeanObliquityOfEcliptic(double %6)
store double %7, double* %3
%8 = load double, double* %2
%9 = call double @llvm.fmuladd.f64(double 0xC09E388B43958106, double %8, double 1.250400e+02)
store double %9, double* %4
%10 = load double, double* %3
%11 = load double, double* %4
%12 = call i32 @degToRad(double %11)
%13 = call double @cos(i32 %12)
%14 = call double @llvm.fmuladd.f64(double 2.560000e-03, double %13, double %10)
store double %14, double* %5
%15 = load double, double* %5
ret double %15
}

LLVM IR (-O2):
define double @calcObliquityCorrection(double %0) {
%2 = tail call double @calcMeanObliquityOfEcliptic(double %0)
%3 = tail call double @llvm.fmuladd.f64(double %0, double 0xC09E388B43958106, double 1.250400e+02)
%4 = tail call i32 @degToRad(double %3)
%5 = tail call double @cos(i32 %4)
%6 = tail call double @llvm.fmuladd.f64(double %5, double 2.560000e-03, double %2)
ret double %6
}
/* Variables and functions */
int EINVAL;
__attribute__((visibility("default"))) int
sd_session_get_class(const char *session, char **class) {
  return -EINVAL;
}


x86 assembly (clang, -O0):
<sd_session_get_class>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
mov    0x2ecb(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sd_session_get_class>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@EINVAL = global i32 0
define i32 @sd_session_get_class(i8* %0, i8** %1) {
%3 = alloca i8*
%4 = alloca i8**
store i8* %0, i8** %3
store i8** %1, i8*** %4
%5 = load i32, i32* @EINVAL
%6 = sub nsw i32 0, %5
ret i32 %6
}

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @sd_session_get_class(i8* nocapture readnone %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @EINVAL
%4 = sub nsw i32 0, %3
ret i32 %4
}
/* Variables and functions */
int exact_square(int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int number, breaker;
  scanf("%d", &number);
  if (number == 1 || number == 0)
    printf("1");
  else {
    breaker = exact_square(number);
    printf("%d", breaker);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
cmpl   $0x1,-0x8(%rbp)
je     1163 <main+0x33>
cmpl   $0x0,-0x8(%rbp)
jne    1176 <main+0x46>
lea    0xe99(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1192 <main+0x62>
mov    -0x8(%rbp),%edi
call   1040 <exact_square@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xe75(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeb8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1060 <scanf@plt>
mov    0x4(%rsp),%edi
cmp    $0x1,%edi
ja     1167 <main+0x27>
mov    $0x31,%edi
call   1030 <putchar@plt>
jmp    117c <main+0x3c>
call   1050 <exact_square@plt>
lea    0xe8d(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [2 x i8] c"1\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %2
%6 = icmp eq i32 %5, 1
br i1 %6, label %10, label %7
7: ; preds = %0
%8 = load i32, i32* %2
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %7, %0
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %17
12: ; preds = %7
%13 = load i32, i32* %2
%14 = call i32 @exact_square(i32 %13)
store i32 %14, i32* %3
%15 = load i32, i32* %3
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %15)
br label %17
17: ; preds = %12, %10
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = icmp ult i32 %4, 2
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 @putchar(i32 49)
br label %11
8: ; preds = %0
%9 = call i32 @exact_square(i32 %4)
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %9)
br label %11
11: ; preds = %8, %6
ret i32 0
}
float clampf(float value, float min, float max) {
  return (value < min ? min : (value > max ? max : value));
}


x86 assembly (clang, -O0):
<clampf>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1135 <clampf+0x35>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
jmp    1167 <clampf+0x67>
movss  -0x4(%rbp),%xmm0
ucomiss -0xc(%rbp),%xmm0
jbe    1153 <clampf+0x53>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    115d <clampf+0x5d>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<clampf>:
minss  %xmm0,%xmm2
cmpltss %xmm1,%xmm0
movaps %xmm0,%xmm3
andnps %xmm2,%xmm3
andps  %xmm1,%xmm0
orps   %xmm3,%xmm0
ret

LLVM IR (-O0):
define float @clampf(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%7 = load float, float* %4
%8 = load float, float* %5
%9 = fcmp olt float %7, %8
br i1 %9, label %10, label %12
10: ; preds = %3
%11 = load float, float* %5
br label %22
12: ; preds = %3
%13 = load float, float* %4
%14 = load float, float* %6
%15 = fcmp ogt float %13, %14
br i1 %15, label %16, label %18
16: ; preds = %12
%17 = load float, float* %6
br label %20
18: ; preds = %12
%19 = load float, float* %4
br label %20
20: ; preds = %18, %16
%21 = phi float [ %17, %16 ], [ %19, %18 ]
br label %22
22: ; preds = %20, %10
%23 = phi float [ %11, %10 ], [ %21, %20 ]
ret float %23
}

LLVM IR (-O2):
define float @clampf(float %0, float %1, float %2) {
%4 = fcmp olt float %0, %1
%5 = fcmp ogt float %0, %2
%6 = select i1 %5, float %2, float %0
%7 = select i1 %4, float %1, float %6
ret float %7
}
void __DELETE_nbody_NBodySystem(void *me, void *client_data) {}


x86 assembly (clang, -O0):
<__DELETE_nbody_NBodySystem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<__DELETE_nbody_NBodySystem>:
ret

LLVM IR (-O0):
define void @__DELETE_nbody_NBodySystem(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
ret void
}

LLVM IR (-O2):
define void @__DELETE_nbody_NBodySystem(i8* nocapture %0, i8* nocapture %1) {
ret void
}
/* Type definitions */
typedef int time_t;

/* Variables and functions */
char *asctime(int /*<<< orphan*/);
char *ctime(int *);
int /*<<< orphan*/ gmtime(int *);
int /*<<< orphan*/ printf(char *, ...);
void when_time_t_wrap_around() {
  printf(":: When will time_t wrap around? \n\n");
  time_t biggest = 0x7FFFFFFF;
  printf("biggest = %s", ctime(&biggest));
  printf("biggest = %s", asctime(gmtime(&biggest)));
}


x86 assembly (clang, -O0):
<when_time_t_wrap_around>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xeb1(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x7fffffff,-0x4(%rbp)
lea    -0x4(%rbp),%rdi
call   1030 <ctime@plt>
mov    %rax,%rsi
lea    0xeb4(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x4(%rbp),%rdi
call   1060 <gmtime@plt>
mov    %eax,%edi
call   1040 <asctime@plt>
mov    %rax,%rsi
lea    0xe93(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<when_time_t_wrap_around>:
push   %r14
push   %rbx
push   %rax
lea    0xeb2(%rip),%rdi
call   1030 <puts@plt>
movl   $0x7fffffff,0x4(%rsp)
7f
lea    0x4(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <ctime@plt>
lea    0xe84(%rip),%r14
mov    %r14,%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rdi
call   1070 <gmtime@plt>
mov    %eax,%edi
call   1050 <asctime@plt>
mov    %r14,%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [36 x i8] c":: When will time_t wrap around? \0A\0A\00"
@.str.1 = [13 x i8] c"biggest = %s\00"
define void @when_time_t_wrap_around() {
%1 = alloca i32
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
store i32 2147483647, i32* %1
%3 = call i8* @ctime(i32* %1)
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* %3)
%5 = call i32 @gmtime(i32* %1)
%6 = call i8* @asctime(i32 %5)
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* %6)
ret void
}

LLVM IR (-O2):
@.str.1 = [13 x i8] c"biggest = %s\00"
@str = [35 x i8] c":: When will time_t wrap around? \0A\00"
define void @when_time_t_wrap_around() {
%1 = alloca i32
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str, i64 0, i64 0))
%3 = bitcast i32* %1 to i8*
store i32 2147483647, i32* %1
%4 = call i8* @ctime(i32* %1)
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* %4)
%6 = call i32 @gmtime(i32* %1)
%7 = call i8* @asctime(i32 %6)
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* %7)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ngets(char *, int);
int /*<<< orphan*/ slowprintf(char *);
char tolower(char);
int again() {
  char input[80];
  slowprintf("\nDo you want to play again? (y\\n)");
  ngets(input, sizeof input);
  if (tolower(input[0]) == 'y')
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<again>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
lea    0xec1(%rip),%rdi
call   1050 <slowprintf@plt>
lea    -0x60(%rbp),%rdi
mov    $0x50,%esi
call   1030 <ngets@plt>
movsbl -0x60(%rbp),%edi
call   1040 <tolower@plt>
movsbl %al,%eax
cmp    $0x79,%eax
jne    1173 <again+0x43>
movl   $0x1,-0x4(%rbp)
jmp    117a <again+0x4a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<again>:
sub    $0x58,%rsp
lea    0xec5(%rip),%rdi
call   1050 <slowprintf@plt>
mov    %rsp,%rdi
mov    $0x50,%esi
call   1030 <ngets@plt>
movsbl (%rsp),%edi
call   1040 <tolower@plt>
xor    %ecx,%ecx
cmp    $0x79,%al
sete   %cl
mov    %ecx,%eax
add    $0x58,%rsp
ret

LLVM IR (-O0):
@.str = [34 x i8] c"\0ADo you want to play again? (y\\n)\00"
define i32 @again() {
%1 = alloca i32
%2 = alloca [80 x i8]
%3 = call i32 @slowprintf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%4 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 0
%5 = call i32 @ngets(i8* %4, i32 80)
%6 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 0
%7 = load i8, i8* %6
%8 = call signext i8 @tolower(i8 signext %7)
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 121
br i1 %10, label %11, label %12
11: ; preds = %0
store i32 1, i32* %1
br label %13
12: ; preds = %0
store i32 0, i32* %1
br label %13
13: ; preds = %12, %11
%14 = load i32, i32* %1
ret i32 %14
}

LLVM IR (-O2):
@.str = [34 x i8] c"\0ADo you want to play again? (y\\n)\00"
define i32 @again() {
%1 = alloca [80 x i8]
%2 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 0
%3 = tail call i32 @slowprintf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @ngets(i8* %2, i32 80)
%5 = load i8, i8* %2
%6 = call signext i8 @tolower(i8 signext %5)
%7 = icmp eq i8 %6, 121
%8 = zext i1 %7 to i32
ret i32 %8
}
int sblib_func_count(void) { return 1; }


x86 assembly (clang, -O0):
<sblib_func_count>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sblib_func_count>:
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @sblib_func_count() {
ret i32 1
}

LLVM IR (-O2):
define i32 @sblib_func_count() {
ret i32 1
}
/* Variables and functions */
scalar_t__ __getdelim(char **, size_t *, char, int /*<<< orphan*/);
int /*<<< orphan*/ eval(char **);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
void __attribute__((noreturn)) _start(void) {
  char *buf = NULL;
  size_t bufsz = 0;
  while (__getdelim(&buf, &bufsz, '\n', stdin) > 0) {
    char *p = buf;
    eval(&p);
  }
  exit(0);
}


x86 assembly (clang, -O0):
<_start>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movq   $0x0,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    0x2e99(%rip),%rax
mov    (%rax),%ecx
lea    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
mov    $0xa,%edx
call   1030 <__getdelim@plt>
cmp    $0x0,%rax
jle    1183 <_start+0x53>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
lea    -0x18(%rbp),%rdi
call   1040 <eval@plt>
jmp    1148 <_start+0x18>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<_start>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x18,%rsp
movq   $0x0,(%rsp)
movq   $0x0,0x8(%rsp)
mov    0x2e95(%rip),%r12
mov    (%r12),%ecx
mov    %rsp,%rdi
lea    0x8(%rsp),%rsi
mov    $0xa,%edx
call   1030 <__getdelim@plt>
test   %rax,%rax
jle    11aa <_start+0x7a>
lea    0x10(%rsp),%r14
mov    %rsp,%r15
lea    0x8(%rsp),%rbx
nopl   0x0(%rax,%rax,1)
mov    (%rsp),%rax
mov    %rax,0x10(%rsp)
mov    %r14,%rdi
call   1040 <eval@plt>
mov    (%r12),%ecx
mov    %r15,%rdi
mov    %rbx,%rsi
mov    $0xa,%edx
call   1030 <__getdelim@plt>
test   %rax,%rax
jg     1180 <_start+0x50>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stdin = global i32 0
define void @_start() {
%1 = alloca i8*
%2 = alloca i64
%3 = alloca i8*
store i8* null, i8** %1
store i64 0, i64* %2
br label %4
4: ; preds = %8, %0
%5 = load i32, i32* @stdin
%6 = call i64 @__getdelim(i8** %1, i64* %2, i8 signext 10, i32 %5)
%7 = icmp sgt i64 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %4
%9 = load i8*, i8** %1
store i8* %9, i8** %3
%10 = call i32 @eval(i8** %3)
br label %4
11: ; preds = %4
%12 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@stdin = global i32 0
define void @_start() {
%1 = alloca i8*
%2 = alloca i64
%3 = alloca i8*
%4 = bitcast i8** %1 to i8*
store i8* null, i8** %1
%5 = bitcast i64* %2 to i8*
store i64 0, i64* %2
%6 = load i32, i32* @stdin
%7 = call i64 @__getdelim(i8** %1, i64* %2, i8 signext 10, i32 %6)
%8 = icmp sgt i64 %7, 0
br i1 %8, label %9, label %17
9: ; preds = %0
%10 = bitcast i8** %3 to i8*
br label %11
11: ; preds = %9, %11
%12 = load i8*, i8** %1
store i8* %12, i8** %3
%13 = call i32 @eval(i8** %3)
%14 = load i32, i32* @stdin
%15 = call i64 @__getdelim(i8** %1, i64* %2, i8 signext 10, i32 %14)
%16 = icmp sgt i64 %15, 0
br i1 %16, label %11, label %17
17: ; preds = %11, %0
%18 = call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ free(char const **);
scalar_t__ malloc(int);
void ignore_const() {
  const char **x = (const char **)malloc(1 * sizeof(char *));
  const char ***y = (const char ***)malloc(1 * sizeof(char *));
  free(x);
}


x86 assembly (clang, -O0):
<ignore_const>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x8,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    $0x8,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ignore_const>:
push   %rbx
mov    $0x8,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    $0x8,%edi
call   1040 <malloc@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @ignore_const() {
%1 = alloca i8**
%2 = alloca i8***
%3 = call i64 @malloc(i32 8)
%4 = inttoptr i64 %3 to i8**
store i8** %4, i8*** %1
%5 = call i64 @malloc(i32 8)
%6 = inttoptr i64 %5 to i8***
store i8*** %6, i8**** %2
%7 = load i8**, i8*** %1
%8 = call i32 @free(i8** %7)
ret void
}

LLVM IR (-O2):
define void @ignore_const() {
%1 = tail call i64 @malloc(i32 8)
%2 = inttoptr i64 %1 to i8**
%3 = tail call i64 @malloc(i32 8)
%4 = tail call i32 @free(i8** %2)
ret void
}