xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ malloc(scalar_t__);
int /*<<< orphan*/ strcpy(char *, char const *);
scalar_t__ strlen(char const *);
char *strdup(const char *_s) {
  char *rv;
  if (_s == 0)
    return 0;
  rv = (char *)malloc(strlen(_s) + 1);
  if (rv == 0)
    return 0;
  strcpy(rv, _s);
  return rv;
}


x86 assembly (clang, -O0):
<strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1154 <strdup+0x24>
movq   $0x0,-0x8(%rbp)
jmp    119a <strdup+0x6a>
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1185 <strdup+0x55>
movq   $0x0,-0x8(%rbp)
jmp    119a <strdup+0x6a>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strdup>:
push   %r14
push   %rbx
push   %rax
test   %rdi,%rdi
je     115f <strdup+0x2f>
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <malloc@plt>
test   %rax,%rax
je     115f <strdup+0x2f>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
jmp    1161 <strdup+0x31>
xor    %ebx,%ebx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @strdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %8
7: ; preds = %1
store i8* null, i8** %2
br label %22
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = call i64 @strlen(i8* %9)
%11 = add nsw i64 %10, 1
%12 = call i64 @malloc(i64 %11)
%13 = inttoptr i64 %12 to i8*
store i8* %13, i8** %4
%14 = load i8*, i8** %4
%15 = icmp eq i8* %14, null
br i1 %15, label %16, label %17
16: ; preds = %8
store i8* null, i8** %2
br label %22
17: ; preds = %8
%18 = load i8*, i8** %4
%19 = load i8*, i8** %3
%20 = call i32 @strcpy(i8* %18, i8* %19)
%21 = load i8*, i8** %4
store i8* %21, i8** %2
br label %22
22: ; preds = %17, %16, %7
%23 = load i8*, i8** %2
ret i8* %23
}

LLVM IR (-O2):
define i8* @strdup(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %11, label %3
3: ; preds = %1
%4 = tail call i64 @strlen(i8* %0)
%5 = add nsw i64 %4, 1
%6 = tail call i64 @malloc(i64 %5)
%7 = inttoptr i64 %6 to i8*
%8 = icmp eq i64 %6, 0
br i1 %8, label %11, label %9
9: ; preds = %3
%10 = tail call i32 @strcpy(i8* %7, i8* %0)
br label %11
11: ; preds = %3, %1, %9
%12 = phi i8* [ %7, %9 ], [ null, %1 ], [ null, %3 ]
ret i8* %12
}
void dump_rtc_regs(void) {
  do {
  } while (0);
  do {
  } while (0);
  do {
  } while (0);
  do {
  } while (0);
  do {
  } while (0);
  do {
  } while (0);
  do {
  } while (0);
  do {
  } while (0);
  do {
  } while (0);
  do {
  } while (0);
  do {
  } while (0);
  do {
  } while (0);
  do {
  } while (0);
  do {
  } while (0);
  do {
  } while (0);
  do {
  } while (0);
  do {
  } while (0);
}


x86 assembly (clang, -O0):
<dump_rtc_regs>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <dump_rtc_regs+0x9>
jmp    110e <dump_rtc_regs+0xe>
jmp    1113 <dump_rtc_regs+0x13>
jmp    1118 <dump_rtc_regs+0x18>
jmp    111d <dump_rtc_regs+0x1d>
jmp    1122 <dump_rtc_regs+0x22>
jmp    1127 <dump_rtc_regs+0x27>
jmp    112c <dump_rtc_regs+0x2c>
jmp    1131 <dump_rtc_regs+0x31>
jmp    1136 <dump_rtc_regs+0x36>
jmp    113b <dump_rtc_regs+0x3b>
jmp    1140 <dump_rtc_regs+0x40>
jmp    1145 <dump_rtc_regs+0x45>
jmp    114a <dump_rtc_regs+0x4a>
jmp    114f <dump_rtc_regs+0x4f>
jmp    1154 <dump_rtc_regs+0x54>
jmp    1159 <dump_rtc_regs+0x59>
jmp    115e <dump_rtc_regs+0x5e>
jmp    1163 <dump_rtc_regs+0x63>
jmp    1168 <dump_rtc_regs+0x68>
jmp    116d <dump_rtc_regs+0x6d>
jmp    1172 <dump_rtc_regs+0x72>
jmp    1177 <dump_rtc_regs+0x77>
jmp    117c <dump_rtc_regs+0x7c>
jmp    1181 <dump_rtc_regs+0x81>
jmp    1186 <dump_rtc_regs+0x86>
jmp    118b <dump_rtc_regs+0x8b>
jmp    1190 <dump_rtc_regs+0x90>
jmp    1195 <dump_rtc_regs+0x95>
jmp    119a <dump_rtc_regs+0x9a>
jmp    119f <dump_rtc_regs+0x9f>
jmp    11a4 <dump_rtc_regs+0xa4>
jmp    11a9 <dump_rtc_regs+0xa9>
jmp    11ae <dump_rtc_regs+0xae>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @dump_rtc_regs() {
br label %1
1: ; preds = %0
br label %2
2: ; preds = %1
br label %3
3: ; preds = %2
br label %4
4: ; preds = %3
br label %5
5: ; preds = %4
br label %6
6: ; preds = %5
br label %7
7: ; preds = %6
br label %8
8: ; preds = %7
br label %9
9: ; preds = %8
br label %10
10: ; preds = %9
br label %11
11: ; preds = %10
br label %12
12: ; preds = %11
br label %13
13: ; preds = %12
br label %14
14: ; preds = %13
br label %15
15: ; preds = %14
br label %16
16: ; preds = %15
br label %17
17: ; preds = %16
br label %18
18: ; preds = %17
br label %19
19: ; preds = %18
br label %20
20: ; preds = %19
br label %21
21: ; preds = %20
br label %22
22: ; preds = %21
br label %23
23: ; preds = %22
br label %24
24: ; preds = %23
br label %25
25: ; preds = %24
br label %26
26: ; preds = %25
br label %27
27: ; preds = %26
br label %28
28: ; preds = %27
br label %29
29: ; preds = %28
br label %30
30: ; preds = %29
br label %31
31: ; preds = %30
br label %32
32: ; preds = %31
br label %33
33: ; preds = %32
br label %34
34: ; preds = %33
ret void
}

LLVM IR (-O2):
define void @dump_rtc_regs() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __CRAB_assert(int);
scalar_t__ nd();
int main() {
  char x, y;
  y = -10;
  if (nd())
    x = 0;
  else
    x = 100;
  while (x >= y) {
    x = x - y;
  }
  __CRAB_assert(x >= -128 && x <= -119);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0xf6,-0x6(%rbp)
mov    $0x0,%al
call   1030 <nd@plt>
cmp    $0x0,%rax
je     114d <main+0x2d>
movb   $0x0,-0x5(%rbp)
jmp    1151 <main+0x31>
movb   $0x64,-0x5(%rbp)
jmp    1156 <main+0x36>
movsbl -0x5(%rbp),%eax
movsbl -0x6(%rbp),%ecx
cmp    %ecx,%eax
jl     1178 <main+0x58>
movsbl -0x5(%rbp),%eax
movsbl -0x6(%rbp),%ecx
sub    %ecx,%eax
mov    %al,-0x5(%rbp)
jmp    1156 <main+0x36>
movsbl -0x5(%rbp),%ecx
xor    %eax,%eax
cmp    $0xffffff80,%ecx
mov    %al,-0x7(%rbp)
jl     1197 <main+0x77>
movsbl -0x5(%rbp),%eax
cmp    $0xffffff89,%eax
setle  %al
mov    %al,-0x7(%rbp)
mov    -0x7(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <__CRAB_assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <nd@plt>
mov    $0x1,%edi
call   1040 <__CRAB_assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i8
store i32 0, i32* %1
store i8 -10, i8* %3
%4 = call i64 (...) @nd()
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %0
store i8 0, i8* %2
br label %8
7: ; preds = %0
store i8 100, i8* %2
br label %8
8: ; preds = %7, %6
br label %9
9: ; preds = %15, %8
%10 = load i8, i8* %2
%11 = sext i8 %10 to i32
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = icmp sge i32 %11, %13
br i1 %14, label %15, label %22
15: ; preds = %9
%16 = load i8, i8* %2
%17 = sext i8 %16 to i32
%18 = load i8, i8* %3
%19 = sext i8 %18 to i32
%20 = sub nsw i32 %17, %19
%21 = trunc i32 %20 to i8
store i8 %21, i8* %2
br label %9
22: ; preds = %9
%23 = load i8, i8* %2
%24 = sext i8 %23 to i32
%25 = icmp sge i32 %24, -128
br i1 %25, label %26, label %30
26: ; preds = %22
%27 = load i8, i8* %2
%28 = sext i8 %27 to i32
%29 = icmp sle i32 %28, -119
br label %30
30: ; preds = %26, %22
%31 = phi i1 [ false, %22 ], [ %29, %26 ]
%32 = zext i1 %31 to i32
%33 = call i32 @__CRAB_assert(i32 %32)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 (...) @nd()
%2 = tail call i32 @__CRAB_assert(i32 1)
ret i32 0
}
unsigned int hexval(unsigned int c) {
  int retval = 256;
  switch (c) {
  case '0' ... '9':
    retval = c - '0';
    break;
  case 'a' ... 'f':
    retval = c - 'a' + 10;
    break;
  case 'A' ... 'F':
    retval = c - 'A' + 10;
    break;
  }
  return retval;
}


x86 assembly (clang, -O0):
<hexval>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x100,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
add    $0xffffffd0,%eax
sub    $0xa,%eax
jb     114d <hexval+0x4d>
jmp    1125 <hexval+0x25>
mov    -0xc(%rbp),%eax
add    $0xffffffbf,%eax
sub    $0x6,%eax
jb     116c <hexval+0x6c>
jmp    1139 <hexval+0x39>
mov    -0xc(%rbp),%eax
add    $0xffffff9f,%eax
sub    $0x6,%eax
jb     115b <hexval+0x5b>
jmp    1178 <hexval+0x78>
mov    -0x4(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x8(%rbp)
jmp    1178 <hexval+0x78>
mov    -0x4(%rbp),%eax
sub    $0x61,%eax
add    $0xa,%eax
mov    %eax,-0x8(%rbp)
jmp    1178 <hexval+0x78>
mov    -0x4(%rbp),%eax
sub    $0x41,%eax
add    $0xa,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hexval>:
add    $0xffffffd0,%edi
mov    $0x100,%eax
cmp    $0x36,%edi
ja     111a <hexval+0x1a>
movslq %edi,%rax
lea    0xee9(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @hexval(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 256, i32* %3
%4 = load i32, i32* %2
switch i32 %4, label %16 [
i32 48, label %5
i32 49, label %5
i32 50, label %5
i32 51, label %5
i32 52, label %5
i32 53, label %5
i32 54, label %5
i32 55, label %5
i32 56, label %5
i32 57, label %5
i32 97, label %8
i32 98, label %8
i32 99, label %8
i32 100, label %8
i32 101, label %8
i32 102, label %8
i32 65, label %12
i32 66, label %12
i32 67, label %12
i32 68, label %12
i32 69, label %12
i32 70, label %12
]
5: ; preds = %1, %1, %1, %1, %1, %1, %1, %1, %1, %1
%6 = load i32, i32* %2
%7 = sub i32 %6, 48
store i32 %7, i32* %3
br label %16
8: ; preds = %1, %1, %1, %1, %1, %1
%9 = load i32, i32* %2
%10 = sub i32 %9, 97
%11 = add i32 %10, 10
store i32 %11, i32* %3
br label %16
12: ; preds = %1, %1, %1, %1, %1, %1
%13 = load i32, i32* %2
%14 = sub i32 %13, 65
%15 = add i32 %14, 10
store i32 %15, i32* %3
br label %16
16: ; preds = %1, %12, %8, %5
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
@switch.table.hexval = [55 x i32] [i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 256, i32 256, i32 256, i32 256, i32 256, i32 256, i32 256, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 256, i32 256, i32 256, i32 256, i32 256, i32 256, i32 256, i32 256, i32 256, i32 256, i32 256, i32 256, i32 256, i32 256, i32 256, i32 256, i32 256, i32 256, i32 256, i32 256, i32 256, i32 256, i32 256, i32 256, i32 256, i32 256, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15]
define i32 @hexval(i32 %0) {
%2 = add i32 %0, -48
%3 = icmp ult i32 %2, 55
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = sext i32 %2 to i64
%6 = getelementptr inbounds [55 x i32], [55 x i32]* @switch.table.hexval, i64 0, i64 %5
%7 = load i32, i32* %6
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 256, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Variables and functions */
int sqrt(int);
int checkforsqrt(int num) {
  int a = sqrt(num);
  if (a * a == num)
    return 5;
  else
    return 0;
}


x86 assembly (clang, -O0):
<checkforsqrt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <sqrt@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
imul   -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    1142 <checkforsqrt+0x32>
movl   $0x5,-0x4(%rbp)
jmp    1149 <checkforsqrt+0x39>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checkforsqrt>:
push   %rbx
mov    %edi,%ebx
call   1030 <sqrt@plt>
imul   %eax,%eax
xor    %ecx,%ecx
cmp    %ebx,%eax
sete   %cl
lea    (%rcx,%rcx,4),%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @checkforsqrt(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = call i32 @sqrt(i32 %5)
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = load i32, i32* %4
%9 = mul nsw i32 %7, %8
%10 = load i32, i32* %3
%11 = icmp eq i32 %9, %10
br i1 %11, label %12, label %13
12: ; preds = %1
store i32 5, i32* %2
br label %14
13: ; preds = %1
store i32 0, i32* %2
br label %14
14: ; preds = %13, %12
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @checkforsqrt(i32 %0) {
%2 = tail call i32 @sqrt(i32 %0)
%3 = mul nsw i32 %2, %2
%4 = icmp eq i32 %3, %0
%5 = select i1 %4, i32 5, i32 0
ret i32 %5
}
/* Variables and functions */
uintptr_t round_up(uintptr_t value, uintptr_t size) {
  return (value + size - 1) & -size;
}


x86 assembly (clang, -O0):
<round_up>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    -0x10(%rbp),%rax
sub    $0x1,%rax
xor    %ecx,%ecx
sub    -0x10(%rbp),%rcx
and    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<round_up>:
lea    (%rdi,%rsi,1),%rax
add    $0xffffffffffffffff,%rax
neg    %rsi
and    %rsi,%rax
ret

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

LLVM IR (-O2):
define i64 @round_up(i64 %0, i64 %1) {
%3 = add i64 %0, -1
%4 = add i64 %3, %1
%5 = sub i64 0, %1
%6 = and i64 %4, %5
ret i64 %6
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isbdigit(int);
void t_isbdigit_0x2d() {
  Assert_real((isbdigit(45) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isbdigit.c",
              230, ("isbdigit should be 0 for -"));
}


x86 assembly (clang, -O0):
<t_isbdigit_0x2d>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2d,%edi
call   1040 <isbdigit@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0xe6,%edx
lea    0xf5c(%rip),%rcx
call   1030 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isbdigit_0x2d>:
push   %rax
mov    $0x2d,%edi
call   1040 <isbdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0xe6,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isbdigit.c\00"
@.str.1 = [27 x i8] c"isbdigit should be 0 for -\00"
define void @t_isbdigit_0x2d() {
%1 = call i64 @isbdigit(i32 45)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 230, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isbdigit.c\00"
@.str.1 = [27 x i8] c"isbdigit should be 0 for -\00"
define void @t_isbdigit_0x2d() {
%1 = tail call i64 @isbdigit(i32 45)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 230, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
unsigned long rd_word(unsigned long *address) { return (*address); }


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

x86 assembly (clang, -O2):
<rd_word>:
mov    (%rdi),%rax
ret

LLVM IR (-O0):
define i64 @rd_word(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
ret i64 %4
}

LLVM IR (-O2):
define i64 @rd_word(i64* nocapture %0) {
%2 = load i64, i64* %0
ret i64 %2
}
/* Variables and functions */
unsigned int crcblock(char *, int /*<<< orphan*/);
int /*<<< orphan*/ make_search_string(char *);
int /*<<< orphan*/ strcpy(char *, char *);
int /*<<< orphan*/ strlen(char *);
unsigned int hash_name(char *name, unsigned int tablelen) {
  char s[250];
  strcpy(s, name);
  make_search_string(s);
  return crcblock(s, strlen(s)) % tablelen;
}


x86 assembly (clang, -O0):
<hash_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    -0x110(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
lea    -0x110(%rbp),%rdi
call   1060 <make_search_string@plt>
lea    -0x110(%rbp),%rax
mov    %rax,-0x118(%rbp)
lea    -0x110(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x118(%rbp),%rdi
mov    %eax,%esi
call   1050 <crcblock@plt>
xor    %edx,%edx
divl   -0xc(%rbp)
mov    %edx,%eax
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_name>:
push   %rbp
push   %rbx
sub    $0x108,%rsp
mov    %esi,%ebp
mov    %rdi,%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
call   1060 <make_search_string@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1050 <crcblock@plt>
xor    %edx,%edx
div    %ebp
mov    %edx,%eax
add    $0x108,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @hash_name(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca [250 x i8]
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = getelementptr inbounds [250 x i8], [250 x i8]* %5, i64 0, i64 0
%7 = load i8*, i8** %3
%8 = call i32 @strcpy(i8* %6, i8* %7)
%9 = getelementptr inbounds [250 x i8], [250 x i8]* %5, i64 0, i64 0
%10 = call i32 @make_search_string(i8* %9)
%11 = getelementptr inbounds [250 x i8], [250 x i8]* %5, i64 0, i64 0
%12 = getelementptr inbounds [250 x i8], [250 x i8]* %5, i64 0, i64 0
%13 = call i32 @strlen(i8* %12)
%14 = call i32 @crcblock(i8* %11, i32 %13)
%15 = load i32, i32* %4
%16 = urem i32 %14, %15
ret i32 %16
}

LLVM IR (-O2):
define i32 @hash_name(i8* %0, i32 %1) {
%3 = alloca [250 x i8]
%4 = getelementptr inbounds [250 x i8], [250 x i8]* %3, i64 0, i64 0
%5 = call i32 @strcpy(i8* %4, i8* %0)
%6 = call i32 @make_search_string(i8* %4)
%7 = call i32 @strlen(i8* %4)
%8 = call i32 @crcblock(i8* %4, i32 %7)
%9 = urem i32 %8, %1
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_error();
int __VERIFIER_nondet_int();
int id(int);
void main() {
  int input = __VERIFIER_nondet_int();
  int result = id(input);
  if (result == 5) {
    __VERIFIER_error();
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <id@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jne    115e <main+0x2e>
mov    $0x0,%al
call   1040 <__VERIFIER_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,%edi
call   1050 <id@plt>
cmp    $0x5,%eax
jne    114c <main+0x1c>
xor    %eax,%eax
pop    %rcx
jmp    1040 <__VERIFIER_error@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %3, i32* %1
%4 = load i32, i32* %1
%5 = call i32 @id(i32 %4)
store i32 %5, i32* %2
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 5
br i1 %7, label %8, label %10
8: ; preds = %0
%9 = call i32 (...) @__VERIFIER_error()
br label %10
10: ; preds = %8, %0
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 @id(i32 %1)
%3 = icmp eq i32 %2, 5
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = tail call i32 (...) @__VERIFIER_error()
br label %6
6: ; preds = %4, %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ show();
int main() {
  printf("Hello SoftUni!\n");
  show();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <show@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1040 <show@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"Hello SoftUni!\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @show()
ret i32 0
}

LLVM IR (-O2):
@str = [15 x i8] c"Hello SoftUni!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @show()
ret i32 0
}
void foo286(int p) {}


x86 assembly (clang, -O0):
<foo286>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @foo286(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret void
}

LLVM IR (-O2):
define void @foo286(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void swabort(void) { abort(); }


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

x86 assembly (clang, -O2):
<swabort>:
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @swabort() {
%1 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
define void @swabort() {
%1 = tail call i32 (...) @abort()
unreachable
}
void SensorSetMode_GC306(unsigned char val) {
  switch (val) {
  case 1:
    break;
  case 2:
    break;
  case 4:
    break;
  case 3:
    break;
  default:
    break;
  }
}


x86 assembly (clang, -O0):
<SensorSetMode_GC306>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x3,%eax
ja     1148 <SensorSetMode_GC306+0x48>
mov    -0x10(%rbp),%rax
lea    0xed5(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
jmp    114d <SensorSetMode_GC306+0x4d>
jmp    114d <SensorSetMode_GC306+0x4d>
jmp    114d <SensorSetMode_GC306+0x4d>
jmp    114d <SensorSetMode_GC306+0x4d>
jmp    114d <SensorSetMode_GC306+0x4d>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @SensorSetMode_GC306(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
switch i32 %4, label %9 [
i32 1, label %5
i32 2, label %6
i32 4, label %7
i32 3, label %8
]
5: ; preds = %1
br label %10
6: ; preds = %1
br label %10
7: ; preds = %1
br label %10
8: ; preds = %1
br label %10
9: ; preds = %1
br label %10
10: ; preds = %9, %8, %7, %6, %5
ret void
}

LLVM IR (-O2):
define void @SensorSetMode_GC306(i8 zeroext %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SendChar(int);
void TestTouchPane(void) {
  SendChar((0XEE) & 0xFF);
  SendChar((0x73) & 0xFF);
  SendChar((((0XFFFCFFFF) >> 16) >> 8) & 0xFF);
  SendChar(((0XFFFCFFFF) >> 16) & 0xFF);
  SendChar((((0XFFFCFFFF) & 0xFFFF) >> 8) & 0xFF);
  SendChar(((0XFFFCFFFF) & 0xFFFF) & 0xFF);
}


x86 assembly (clang, -O0):
<TestTouchPane>:
push   %rbp
mov    %rsp,%rbp
mov    $0xee,%edi
call   1030 <SendChar@plt>
mov    $0x73,%edi
call   1030 <SendChar@plt>
mov    $0xff,%edi
call   1030 <SendChar@plt>
mov    $0xfc,%edi
call   1030 <SendChar@plt>
mov    $0xff,%edi
call   1030 <SendChar@plt>
mov    $0xff,%edi
call   1030 <SendChar@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<TestTouchPane>:
push   %rax
mov    $0xee,%edi
call   1030 <SendChar@plt>
mov    $0x73,%edi
call   1030 <SendChar@plt>
mov    $0xff,%edi
call   1030 <SendChar@plt>
mov    $0xfc,%edi
call   1030 <SendChar@plt>
mov    $0xff,%edi
call   1030 <SendChar@plt>
mov    $0xff,%edi
pop    %rax
jmp    1030 <SendChar@plt>

LLVM IR (-O0):
define void @TestTouchPane() {
%1 = call i32 @SendChar(i32 238)
%2 = call i32 @SendChar(i32 115)
%3 = call i32 @SendChar(i32 255)
%4 = call i32 @SendChar(i32 252)
%5 = call i32 @SendChar(i32 255)
%6 = call i32 @SendChar(i32 255)
ret void
}

LLVM IR (-O2):
define void @TestTouchPane() {
%1 = tail call i32 @SendChar(i32 238)
%2 = tail call i32 @SendChar(i32 115)
%3 = tail call i32 @SendChar(i32 255)
%4 = tail call i32 @SendChar(i32 252)
%5 = tail call i32 @SendChar(i32 255)
%6 = tail call i32 @SendChar(i32 255)
ret void
}
void ofi_osd_fini(void) {}


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

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

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

LLVM IR (-O2):
define void @ofi_osd_fini() {
ret void
}
void X509V3_add_value(void) {}


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

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

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

LLVM IR (-O2):
define void @X509V3_add_value() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ SHA_CTX;

/* Variables and functions */
int /*<<< orphan*/ sha1_block_data_order(int /*<<< orphan*/ *,
                                         unsigned char const *, int);
void SHA1_Transform(SHA_CTX *c, const unsigned char *data) {
  sha1_block_data_order(c, data, 1);
}


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

x86 assembly (clang, -O2):
<SHA1_Transform>:
mov    $0x1,%edx
jmp    1030 <sha1_block_data_order@plt>

LLVM IR (-O0):
define void @SHA1_Transform(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 = load i8*, i8** %4
%7 = call i32 @sha1_block_data_order(i32* %5, i8* %6, i32 1)
ret void
}

LLVM IR (-O2):
define void @SHA1_Transform(i32* %0, i8* %1) {
%3 = tail call i32 @sha1_block_data_order(i32* %0, i8* %1, i32 1)
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ cbankGridConfig();
int /*<<< orphan*/ coresConfig();
int /*<<< orphan*/ flush_all();
int /*<<< orphan*/ init_hashtable();
int /*<<< orphan*/ inputfiles_create();
int /*<<< orphan*/ ioConfig();
int /*<<< orphan*/ ofileConfig();
int main(int argc, char **argv) {
  ioConfig();
  cbankGridConfig();
  init_hashtable();
  inputfiles_create();
  coresConfig();
  ofileConfig();
  flush_all();
  return (EXIT_SUCCESS);
}


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   1050 <ioConfig@plt>
mov    $0x0,%al
call   1040 <cbankGridConfig@plt>
mov    $0x0,%al
call   1090 <init_hashtable@plt>
mov    $0x0,%al
call   1080 <inputfiles_create@plt>
mov    $0x0,%al
call   1070 <coresConfig@plt>
mov    $0x0,%al
call   1060 <ofileConfig@plt>
mov    $0x0,%al
call   1030 <flush_all@plt>
mov    0x2e22(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <ioConfig@plt>
xor    %eax,%eax
call   1040 <cbankGridConfig@plt>
xor    %eax,%eax
call   1090 <init_hashtable@plt>
xor    %eax,%eax
call   1080 <inputfiles_create@plt>
xor    %eax,%eax
call   1070 <coresConfig@plt>
xor    %eax,%eax
call   1060 <ofileConfig@plt>
xor    %eax,%eax
call   1030 <flush_all@plt>
mov    0x2e37(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
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 (...) @ioConfig()
%7 = call i32 (...) @cbankGridConfig()
%8 = call i32 (...) @init_hashtable()
%9 = call i32 (...) @inputfiles_create()
%10 = call i32 (...) @coresConfig()
%11 = call i32 (...) @ofileConfig()
%12 = call i32 (...) @flush_all()
%13 = load i32, i32* @EXIT_SUCCESS
ret i32 %13
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @ioConfig()
%4 = tail call i32 (...) @cbankGridConfig()
%5 = tail call i32 (...) @init_hashtable()
%6 = tail call i32 (...) @inputfiles_create()
%7 = tail call i32 (...) @coresConfig()
%8 = tail call i32 (...) @ofileConfig()
%9 = tail call i32 (...) @flush_all()
%10 = load i32, i32* @EXIT_SUCCESS
ret i32 %10
}
void Nmi(void) {
  while (1)
    ;
}


x86 assembly (clang, -O0):
<Nmi>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <Nmi+0x9>
jmp    1109 <Nmi+0x9>

x86 assembly (clang, -O2):
<Nmi>:
jmp    1100 <Nmi>

LLVM IR (-O0):
define void @Nmi() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @Nmi() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Variables and functions */
char *getProgramReleaseVersionString();
char *getProgramVersionString() { return getProgramReleaseVersionString(); }


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

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

LLVM IR (-O0):
define i8* @getProgramVersionString() {
%1 = call i8* (...) @getProgramReleaseVersionString()
ret i8* %1
}

LLVM IR (-O2):
define i8* @getProgramVersionString() {
%1 = tail call i8* (...) @getProgramReleaseVersionString()
ret i8* %1
}
/* Variables and functions */
int rand();
int rand_int(int min, int max) {
  if (max < min) {
    int s = min;
    min = max;
    max = s;
  }
  int r = (rand() % (max - min + 1)) + min;
  return r;
}


x86 assembly (clang, -O0):
<rand_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    113c <rand_int+0x2c>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
mov    -0x8(%rbp),%ecx
sub    -0x4(%rbp),%ecx
add    $0x1,%ecx
cltd
idiv   %ecx
add    -0x4(%rbp),%edx
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rand_int>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
cmp    %edi,%esi
mov    %esi,%ebp
cmovl  %edi,%ebp
cmovl  %esi,%ebx
xor    %eax,%eax
call   1030 <rand@plt>
sub    %ebx,%ebp
add    $0x1,%ebp
cltd
idiv   %ebp
add    %edx,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @rand_int(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %4
%8 = load i32, i32* %3
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %14
10: ; preds = %2
%11 = load i32, i32* %3
store i32 %11, i32* %5
%12 = load i32, i32* %4
store i32 %12, i32* %3
%13 = load i32, i32* %5
store i32 %13, i32* %4
br label %14
14: ; preds = %10, %2
%15 = call i32 (...) @rand()
%16 = load i32, i32* %4
%17 = load i32, i32* %3
%18 = sub nsw i32 %16, %17
%19 = add nsw i32 %18, 1
%20 = srem i32 %15, %19
%21 = load i32, i32* %3
%22 = add nsw i32 %20, %21
store i32 %22, i32* %6
%23 = load i32, i32* %6
ret i32 %23
}

LLVM IR (-O2):
define i32 @rand_int(i32 %0, i32 %1) {
%3 = icmp slt i32 %1, %0
%4 = select i1 %3, i32 %0, i32 %1
%5 = select i1 %3, i32 %1, i32 %0
%6 = tail call i32 (...) @rand()
%7 = sub i32 1, %5
%8 = add i32 %7, %4
%9 = srem i32 %6, %8
%10 = add nsw i32 %9, %5
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ chopGribFile(char *, char *, char *, char *, int);
void chopGribFile_R(char **inFileName, char **outFileName, char **tempFileName,
                    char **tempFileName2, int *type) {
  chopGribFile(*inFileName, *outFileName, *tempFileName, *tempFileName2, *type);
}


x86 assembly (clang, -O0):
<chopGribFile_R>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
mov    -0x18(%rbp),%rax
mov    (%rax),%rdx
mov    -0x20(%rbp),%rax
mov    (%rax),%rcx
mov    -0x28(%rbp),%rax
mov    (%rax),%r8d
call   1030 <chopGribFile@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chopGribFile_R>:
mov    (%rdi),%rdi
mov    (%rsi),%rsi
mov    (%rdx),%rdx
mov    (%rcx),%rcx
mov    (%r8),%r8d
jmp    1030 <chopGribFile@plt>

LLVM IR (-O0):
define void @chopGribFile_R(i8** %0, i8** %1, i8** %2, i8** %3, i32* %4) {
%6 = alloca i8**
%7 = alloca i8**
%8 = alloca i8**
%9 = alloca i8**
%10 = alloca i32*
store i8** %0, i8*** %6
store i8** %1, i8*** %7
store i8** %2, i8*** %8
store i8** %3, i8*** %9
store i32* %4, i32** %10
%11 = load i8**, i8*** %6
%12 = load i8*, i8** %11
%13 = load i8**, i8*** %7
%14 = load i8*, i8** %13
%15 = load i8**, i8*** %8
%16 = load i8*, i8** %15
%17 = load i8**, i8*** %9
%18 = load i8*, i8** %17
%19 = load i32*, i32** %10
%20 = load i32, i32* %19
%21 = call i32 @chopGribFile(i8* %12, i8* %14, i8* %16, i8* %18, i32 %20)
ret void
}

LLVM IR (-O2):
define void @chopGribFile_R(i8** nocapture %0, i8** nocapture %1, i8** nocapture %2, i8** nocapture %3, i32* nocapture %4) {
%6 = load i8*, i8** %0
%7 = load i8*, i8** %1
%8 = load i8*, i8** %2
%9 = load i8*, i8** %3
%10 = load i32, i32* %4
%11 = tail call i32 @chopGribFile(i8* %6, i8* %7, i8* %8, i8* %9, i32 %10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ UART2_DriverIRQHandler();
__attribute__((weak, section(".after_vectors"))) void UART2_IRQHandler(void) {
  UART2_DriverIRQHandler();
}


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

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

LLVM IR (-O0):
define weak void @UART2_IRQHandler() section ".after_vectors" {
%1 = call i32 (...) @UART2_DriverIRQHandler()
ret void
}

LLVM IR (-O2):
define weak void @UART2_IRQHandler() section ".after_vectors" {
%1 = tail call i32 (...) @UART2_DriverIRQHandler()
ret void
}
/* Variables and functions */
int exact_square(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int a;
  scanf("%d", &a);
  if (exact_square(a) == 1) {
    printf("1");
  }
  if (exact_square(a) == 0) {
    printf("0");
  }
  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>
mov    -0x8(%rbp),%edi
call   1040 <exact_square@plt>
cmp    $0x1,%eax
jne    116c <main+0x3c>
lea    0xe9c(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%edi
call   1040 <exact_square@plt>
cmp    $0x0,%eax
jne    1189 <main+0x59>
lea    0xe81(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
call   1040 <exact_square@plt>
cmp    $0x1,%eax
jne    115a <main+0x2a>
mov    $0x31,%edi
call   1030 <putchar@plt>
mov    0x4(%rsp),%edi
call   1040 <exact_square@plt>
test   %eax,%eax
jne    1171 <main+0x41>
mov    $0x30,%edi
call   1030 <putchar@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"
@.str.2 = [2 x i8] c"0\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%4 = load i32, i32* %2
%5 = call i32 @exact_square(i32 %4)
%6 = icmp eq i32 %5, 1
br i1 %6, label %7, label %9
7: ; preds = %0
%8 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %9
9: ; preds = %7, %0
%10 = load i32, i32* %2
%11 = call i32 @exact_square(i32 %10)
%12 = icmp eq i32 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %9
%14 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %15
15: ; preds = %13, %9
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 = call i32 @exact_square(i32 %4)
%6 = icmp eq i32 %5, 1
br i1 %6, label %7, label %9
7: ; preds = %0
%8 = call i32 @putchar(i32 49)
br label %9
9: ; preds = %7, %0
%10 = load i32, i32* %1
%11 = call i32 @exact_square(i32 %10)
%12 = icmp eq i32 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %9
%14 = call i32 @putchar(i32 48)
br label %15
15: ; preds = %13, %9
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
char *malloc(int);
int /*<<< orphan*/ puts(char *);
scalar_t__ test_lt(void *, void *);
int le_after_free() {
  volatile char *x = malloc(32);
  volatile char *y = x + 5;
  free((void *)x);
  if (test_lt((void *)x, (void *)y)) {
    puts("LT!");
  }
  return 1;
}


x86 assembly (clang, -O0):
<le_after_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x20,%edi
call   1060 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x5,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <test_lt@plt>
cmp    $0x0,%rax
je     118e <le_after_free+0x4e>
lea    0xe77(%rip),%rdi
call   1040 <puts@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<le_after_free>:
push   %r14
push   %rbx
push   %rax
mov    $0x20,%edi
call   1060 <malloc@plt>
mov    %rax,%rbx
lea    0x5(%rax),%r14
mov    %rax,%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1050 <test_lt@plt>
test   %rax,%rax
je     1179 <le_after_free+0x39>
lea    0xe8c(%rip),%rdi
call   1040 <puts@plt>
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [4 x i8] c"LT!\00"
define i32 @le_after_free() {
%1 = alloca i8*
%2 = alloca i8*
%3 = call i8* @malloc(i32 32)
store i8* %3, i8** %1
%4 = load i8*, i8** %1
%5 = getelementptr inbounds i8, i8* %4, i64 5
store i8* %5, i8** %2
%6 = load i8*, i8** %1
%7 = call i32 @free(i8* %6)
%8 = load i8*, i8** %1
%9 = load i8*, i8** %2
%10 = call i64 @test_lt(i8* %8, i8* %9)
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %0
%13 = call i32 @puts(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
br label %14
14: ; preds = %12, %0
ret i32 1
}

LLVM IR (-O2):
@.str = [4 x i8] c"LT!\00"
define i32 @le_after_free() {
%1 = tail call dereferenceable_or_null(32) i8* @malloc(i32 32)
%2 = getelementptr inbounds i8, i8* %1, i64 5
%3 = tail call i32 @free(i8* %1)
%4 = tail call i64 @test_lt(i8* %1, i8* %2)
%5 = icmp eq i64 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %0
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %0
ret i32 1
}
/* Variables and functions */
double ceil(double);
double floor(double);
__attribute__((always_)) double round(double x) {
  return (x > 0) ? floor(x + 0.5) : ceil(x - 0.5);
}


x86 assembly (clang, -O0):
<round>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    115b <round+0x3b>
movsd  0xeb9(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
call   1040 <floor@plt>
movsd  %xmm0,-0x10(%rbp)
jmp    1176 <round+0x56>
movsd  -0x8(%rbp),%xmm0
movsd  0xe98(%rip),%xmm1
subsd  %xmm1,%xmm0
call   1030 <ceil@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<round>:
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1137 <round+0x17>
addsd  0xed6(%rip),%xmm0
jmp    1040 <floor@plt>
addsd  0xec1(%rip),%xmm0
jmp    1030 <ceil@plt>

LLVM IR (-O0):
define double @round(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp ogt double %3, 0.000000e+00
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load double, double* %2
%7 = fadd double %6, 5.000000e-01
%8 = call double @llvm.floor.f64(double %7)
br label %13
9: ; preds = %1
%10 = load double, double* %2
%11 = fsub double %10, 5.000000e-01
%12 = call double @llvm.ceil.f64(double %11)
br label %13
13: ; preds = %9, %5
%14 = phi double [ %8, %5 ], [ %12, %9 ]
ret double %14
}

LLVM IR (-O2):
define double @round(double %0) {
%2 = fcmp ogt double %0, 0.000000e+00
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = fadd double %0, 5.000000e-01
%5 = tail call double @llvm.floor.f64(double %4)
br label %9
6: ; preds = %1
%7 = fadd double %0, -5.000000e-01
%8 = tail call double @llvm.ceil.f64(double %7)
br label %9
9: ; preds = %6, %3
%10 = phi double [ %5, %3 ], [ %8, %6 ]
ret double %10
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void main(void) {
  puts("test1");
  puts("test2");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <puts@plt>
lea    0xedf(%rip),%rdi
call   1030 <puts@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xee2(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"test1\00"
@.str.1 = [6 x i8] c"test2\00"
define void @main() {
%1 = call i32 @puts(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @puts(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"test1\00"
@.str.1 = [6 x i8] c"test2\00"
define void @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret void
}
unsigned long long __atomic_fetch_and_8(volatile void *atom,
                                        unsigned long long value,
                                        int memorder) {
  unsigned long long xchg;
  unsigned long long cmp;
  __atomic_load((unsigned long long *)atom, (unsigned long long *)&cmp, 0);
  do {
    xchg = ((cmp & value));
  } while (!__atomic_compare_exchange((unsigned long long *)atom, &cmp, &xchg,
                                      1, 5, 5));
  return cmp;
}


x86 assembly (clang, -O0):
<__atomic_fetch_and_8>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
and    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rcx
mov    -0x28(%rbp),%rax
mov    -0x20(%rbp),%rdx
lock cmpxchg %rdx,(%rcx)
mov    %rax,%rcx
sete   %al
mov    %al,-0x39(%rbp)
mov    %rcx,-0x38(%rbp)
test   $0x1,%al
jne    1154 <__atomic_fetch_and_8+0x54>
mov    -0x38(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x39(%rbp),%al
and    $0x1,%al
mov    %al,-0x29(%rbp)
mov    -0x29(%rbp),%al
xor    $0xff,%al
test   $0x1,%al
jne    111a <__atomic_fetch_and_8+0x1a>
mov    -0x28(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__atomic_fetch_and_8>:
mov    (%rdi),%rax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %rax,%rcx
mov    %rax,%rdx
and    %rsi,%rdx
lock cmpxchg %rdx,(%rdi)
jne    1110 <__atomic_fetch_and_8+0x10>
mov    %rcx,%rax
ret

LLVM IR (-O0):
define i64 @__atomic_fetch_and_8(i8* %0, i64 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i32
%7 = alloca i64
%8 = alloca i64
%9 = alloca i8
store i8* %0, i8** %4
store i64 %1, i64* %5
store i32 %2, i32* %6
%10 = load i8*, i8** %4
%11 = bitcast i8* %10 to i64*
%12 = load atomic i64, i64* %11 monotonic
store i64 %12, i64* %8
br label %13
13: ; preds = %26, %3
%14 = load i64, i64* %8
%15 = load i64, i64* %5
%16 = and i64 %14, %15
store i64 %16, i64* %7
br label %17
17: ; preds = %13
%18 = load i8*, i8** %4
%19 = bitcast i8* %18 to i64*
%20 = load i64, i64* %8
%21 = load i64, i64* %7
%22 = cmpxchg weak i64* %19, i64 %20, i64 %21 seq_cst seq_cst
%23 = extractvalue { i64, i1 } %22, 0
%24 = extractvalue { i64, i1 } %22, 1
br i1 %24, label %26, label %25
25: ; preds = %17
store i64 %23, i64* %8
br label %26
26: ; preds = %25, %17
%27 = zext i1 %24 to i8
store i8 %27, i8* %9
%28 = load i8, i8* %9
%29 = trunc i8 %28 to i1
%30 = xor i1 %29, true
br i1 %30, label %13, label %31
31: ; preds = %26
%32 = load i64, i64* %8
ret i64 %32
}

LLVM IR (-O2):
define i64 @__atomic_fetch_and_8(i8* nocapture %0, i64 %1, i32 %2) {
%4 = bitcast i8* %0 to i64*
%5 = load atomic i64, i64* %4 monotonic
br label %6
6: ; preds = %6, %3
%7 = phi i64 [ %5, %3 ], [ %11, %6 ]
%8 = and i64 %7, %1
%9 = cmpxchg weak i64* %4, i64 %7, i64 %8 seq_cst seq_cst
%10 = extractvalue { i64, i1 } %9, 1
%11 = extractvalue { i64, i1 } %9, 0
br i1 %10, label %12, label %6
12: ; preds = %6
ret i64 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int printworld(int y) {
  printf("World\n");
  return y;
}


x86 assembly (clang, -O0):
<printworld>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xede(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printworld>:
push   %rbx
mov    %edi,%ebx
lea    0xee6(%rip),%rdi
call   1030 <puts@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@str = [6 x i8] c"World\00"
define i32 @printworld(i32 returned %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
ret i32 %0
}
/* Variables and functions */
void SIG_IGN(int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ signal(int, void (*)(int));
void SIGINT_handler(int sig) {
  signal(sig, SIG_IGN);
  printf("From SIGINT: just got a %d (SIGINT ^C) signal\n", sig);
  signal(sig, SIGINT_handler);
}


x86 assembly (clang, -O0):
<SIGINT_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eb3(%rip),%rsi
call   1040 <signal@plt>
mov    -0x4(%rbp),%esi
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
mov    0x2e85(%rip),%rsi
call   1040 <signal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SIGINT_handler>:
push   %rbx
mov    %edi,%ebx
mov    0x2ebe(%rip),%rsi
call   1040 <signal@plt>
lea    0xeca(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
mov    0x2e94(%rip),%rsi
mov    %ebx,%edi
pop    %rbx
jmp    1040 <signal@plt>

LLVM IR (-O0):
@.str = [47 x i8] c"From SIGINT: just got a %d (SIGINT ^C) signal\0A\00"
define void @SIGINT_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @signal(i32 %3, void (i32)* @SIG_IGN)
%5 = load i32, i32* %2
%6 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = load i32, i32* %2
%8 = call i32 @signal(i32 %7, void (i32)* @SIGINT_handler)
ret void
}

LLVM IR (-O2):
@.str = [47 x i8] c"From SIGINT: just got a %d (SIGINT ^C) signal\0A\00"
define void @SIGINT_handler(i32 %0) {
%2 = tail call i32 @signal(i32 %0, void (i32)* @SIG_IGN)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i32 %0)
%4 = tail call i32 @signal(i32 %0, void (i32)* @SIGINT_handler)
ret void
}