xunge/DecIR huggingface dataset:
void finalize_matrix_l(unsigned long ***matrix, unsigned int y) {
  for (; y > 0; --y) {
    free((*matrix)[y - 1]);
  }
  free(*matrix);
  *matrix = 0;
}


x86 assembly (clang, -O0):
<finalize_matrix_l>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jbe    114f <finalize_matrix_l+0x3f>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
mov    %ecx,%ecx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    111f <finalize_matrix_l+0xf>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<finalize_matrix_l>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
test   %esi,%esi
je     1133 <finalize_matrix_l+0x23>
mov    %esi,%ebx
nopl   (%rax)
mov    (%r14),%rax
mov    -0x8(%rax,%rbx,8),%rdi
call   1030 <free@plt>
add    $0xffffffffffffffff,%rbx
jne    1120 <finalize_matrix_l+0x10>
mov    (%r14),%rdi
call   1030 <free@plt>
movq   $0x0,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @finalize_matrix_l(i64*** %0, i32 %1) {
%3 = alloca i64***
%4 = alloca i32
store i64*** %0, i64**** %3
store i32 %1, i32* %4
br label %5
5: ; preds = %17, %2
%6 = load i32, i32* %4
%7 = icmp ugt i32 %6, 0
br i1 %7, label %8, label %20
8: ; preds = %5
%9 = load i64***, i64**** %3
%10 = load i64**, i64*** %9
%11 = load i32, i32* %4
%12 = sub i32 %11, 1
%13 = zext i32 %12 to i64
%14 = getelementptr inbounds i64*, i64** %10, i64 %13
%15 = load i64*, i64** %14
%16 = bitcast i64* %15 to i8*
br label %17
17: ; preds = %8
%18 = load i32, i32* %4
%19 = add i32 %18, -1
store i32 %19, i32* %4
br label %5
20: ; preds = %5
%21 = load i64***, i64**** %3
%22 = load i64**, i64*** %21
%23 = bitcast i64** %22 to i8*
%24 = load i64***, i64**** %3
store i64** null, i64*** %24
ret void
}

LLVM IR (-O2):
define void @finalize_matrix_l(i64*** nocapture %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %14, label %4
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ %5, %4 ], [ %9, %6 ]
%8 = load i64**, i64*** %0
%9 = add nsw i64 %7, -1
%10 = getelementptr inbounds i64*, i64** %8, i64 %9
%11 = bitcast i64** %10 to i8**
%12 = load i8*, i8** %11
tail call void @free(i8* %12)
%13 = icmp eq i64 %9, 0
br i1 %13, label %14, label %6
14: ; preds = %6, %2
%15 = bitcast i64*** %0 to i8**
%16 = load i8*, i8** %15
tail call void @free(i8* %16)
store i64** null, i64*** %0
ret void
}
/* Type definitions */
struct pattern {
  int dummy;
};

/* Variables and functions */
int countlib(int);
int offset(int /*<<< orphan*/, int, int, int);
int autohelperowl_vital_apat37(struct pattern *patt, int transformation,
                               int move, int color, int action) {
  int A;
  (void)patt;
  (void)color;
  (void)action;
  A = offset(0, -4, move, transformation);
  return countlib(A) > 2;
}


x86 assembly (clang, -O0):
<autohelperowl_vital_apat37>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    -0x10(%rbp),%edx
mov    -0xc(%rbp),%ecx
xor    %edi,%edi
mov    $0xfffffffc,%esi
call   1030 <offset@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%edi
call   1040 <countlib@plt>
cmp    $0x2,%eax
setg   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<autohelperowl_vital_apat37>:
push   %rax
mov    %esi,%ecx
xor    %edi,%edi
mov    $0xfffffffc,%esi
call   1030 <offset@plt>
mov    %eax,%edi
call   1040 <countlib@plt>
xor    %ecx,%ecx
cmp    $0x3,%eax
setge  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.pattern = type { i32 }
define i32 @autohelperowl_vital_apat37(%struct.pattern* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca %struct.pattern*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store %struct.pattern* %0, %struct.pattern** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%12 = load %struct.pattern*, %struct.pattern** %6
%13 = load i32, i32* %9
%14 = load i32, i32* %10
%15 = load i32, i32* %8
%16 = load i32, i32* %7
%17 = call i32 @offset(i32 0, i32 -4, i32 %15, i32 %16)
store i32 %17, i32* %11
%18 = load i32, i32* %11
%19 = call i32 @countlib(i32 %18)
%20 = icmp sgt i32 %19, 2
%21 = zext i1 %20 to i32
ret i32 %21
}

LLVM IR (-O2):
%struct.pattern = type { i32 }
define i32 @autohelperowl_vital_apat37(%struct.pattern* nocapture readnone %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = tail call i32 @offset(i32 0, i32 -4, i32 %2, i32 %1)
%7 = tail call i32 @countlib(i32 %6)
%8 = icmp sgt i32 %7, 2
%9 = zext i1 %8 to i32
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ abort();
scalar_t__ dlclose(void *);
char *dlerror();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
int dlclose_fatal(void *handle) {
  if (dlclose(handle) != 0) {
    fprintf(stderr, "Cannot dlclose library (ELF): %s\n", dlerror());
    abort();
  }
  return 0;
}


x86 assembly (clang, -O0):
<dlclose_fatal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1060 <dlclose@plt>
cmp    $0x0,%rax
je     118b <dlclose_fatal+0x4b>
mov    0x2e7a(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1030 <dlerror@plt>
mov    -0xc(%rbp),%edi
mov    %rax,%rdx
lea    0xe81(%rip),%rsi
call   1050 <fprintf@plt>
mov    $0x0,%al
call   1040 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dlclose_fatal>:
push   %rbx
call   1060 <dlclose@plt>
test   %rax,%rax
jne    114f <dlclose_fatal+0xf>
xor    %eax,%eax
pop    %rbx
ret
mov    0x2e8a(%rip),%rax
mov    (%rax),%ebx
xor    %eax,%eax
call   1030 <dlerror@plt>
lea    0xe9a(%rip),%rsi
mov    %ebx,%edi
mov    %rax,%rdx
call   1050 <fprintf@plt>
xor    %eax,%eax
call   1040 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [34 x i8] c"Cannot dlclose library (ELF): %s\0A\00"
define i32 @dlclose_fatal(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @dlclose(i8* %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load i32, i32* @stderr
%8 = call i8* (...) @dlerror()
%9 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %8)
%10 = call i32 (...) @abort()
unreachable
11: ; preds = %1
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [34 x i8] c"Cannot dlclose library (ELF): %s\0A\00"
define i32 @dlclose_fatal(i8* %0) {
%2 = tail call i64 @dlclose(i8* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %9, label %4
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i8* (...) @dlerror()
%7 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = tail call i32 (...) @abort()
unreachable
9: ; preds = %1
ret i32 0
}
/* Variables and functions */
int intcmp(int, int);
int intcmp_asc(int v1, int v2) { return intcmp(v1, v2); }


x86 assembly (clang, -O0):
<intcmp_asc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <intcmp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<intcmp_asc>:
jmp    1030 <intcmp@plt>

LLVM IR (-O0):
define i32 @intcmp_asc(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 @intcmp(i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @intcmp_asc(i32 %0, i32 %1) {
%3 = tail call i32 @intcmp(i32 %0, i32 %1)
ret i32 %3
}
int test_imm_E2uint64_highword_reg(unsigned long long val) {
  return ((val >> 32) & (0xE2 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_E2uint64_highword_reg>:
movabs $0xe200000000,%rax
test   %rax,%rdi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_E2uint64_highword_reg(i64 %0) {
%2 = and i64 %0, 970662608896
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int cmp(void *a, void *b) { return *(int *)a - *(int *)b; }


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

x86 assembly (clang, -O2):
<cmp>:
mov    (%rdi),%eax
sub    (%rsi),%eax
ret

LLVM IR (-O0):
define i32 @cmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = sub nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @cmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void print_help(void) {
  static const char *help =
      "Usage: dmidecode [OPTIONS]\n"
      "Options are:\n"
      " -d, --dev-mem FILE     Read memory from device FILE (default: "
      "/dev/mem"
      ")\n"
      " -h, --help             Display this help text and exit\n"
      " -q, --quiet            Less verbose output\n"
      " -s, --string KEYWORD   Only display the value of the given DMI string\n"
      " -t, --type TYPE        Only display the entries of given type\n"
      " -u, --dump             Do not decode the entries\n"
      "     --dump-bin FILE    Dump the DMI data to a binary file\n"
      "     --from-dump FILE   Read the DMI data from a binary file\n"
      " -V, --version          Display the version and exit\n";
  printf("%s", help);
}


x86 assembly (clang, -O0):
<print_help>:
push   %rbp
mov    %rsp,%rbp
mov    0x2f0d(%rip),%rsi
lea    0x1119(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_help>:
lea    0x1124(%rip),%rdi
lea    0xee2(%rip),%rsi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@print_help.help = internal global i8* getelementptr inbounds ([571 x i8], [571 x i8]* @.str, i32 0, i32 0)
@.str = [571 x i8] c"Usage: dmidecode [OPTIONS]\0AOptions are:\0A -d, --dev-mem FILE Read memory from device FILE (default: /dev/mem)\0A -h, --help Display this help text and exit\0A -q, --quiet Less verbose output\0A -s, --string KEYWORD Only display the value of the given DMI string\0A -t, --type TYPE Only display the entries of given type\0A -u, --dump Do not decode the entries\0A --dump-bin FILE Dump the DMI data to a binary file\0A --from-dump FILE Read the DMI data from a binary file\0A -V, --version Display the version and exit\0A\00"
@.str.1 = [3 x i8] c"%s\00"
define void @print_help() {
%1 = load i8*, i8** @print_help.help
%2 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %1)
ret void
}

LLVM IR (-O2):
@.str = [571 x i8] c"Usage: dmidecode [OPTIONS]\0AOptions are:\0A -d, --dev-mem FILE Read memory from device FILE (default: /dev/mem)\0A -h, --help Display this help text and exit\0A -q, --quiet Less verbose output\0A -s, --string KEYWORD Only display the value of the given DMI string\0A -t, --type TYPE Only display the entries of given type\0A -u, --dump Do not decode the entries\0A --dump-bin FILE Dump the DMI data to a binary file\0A --from-dump FILE Read the DMI data from a binary file\0A -V, --version Display the version and exit\0A\00"
@.str.1 = [3 x i8] c"%s\00"
define void @print_help() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([571 x i8], [571 x i8]* @.str, i64 0, i64 0))
ret void
}
main(argc, argv) char **argv;
{
  int i;
  for (i = 0; i < argc; i++)
    printf("argv[%d]=%s\n", i, argv[i]);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1164 <main+0x54>
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xeb1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112d <main+0x1d>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %edi,%edi
jle    1149 <main+0x39>
mov    %rsi,%r15
mov    %edi,%r12d
lea    0xed7(%rip),%r14
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,8),%rdx
mov    %r14,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [13 x i8] c"argv[%d]=%s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
br label %7
7: ; preds = %19, %2
%8 = load i32, i32* %6
%9 = load i32, i32* %4
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %22
11: ; preds = %7
%12 = load i32, i32* %6
%13 = load i8**, i8*** %5
%14 = load i32, i32* %6
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8*, i8** %13, i64 %15
%17 = load i8*, i8** %16
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %12, i8* %17)
br label %19
19: ; preds = %11
%20 = load i32, i32* %6
%21 = add nsw i32 %20, 1
store i32 %21, i32* %6
br label %7
22: ; preds = %7
%23 = load i32, i32* %3
ret i32 %23
}

LLVM IR (-O2):
@.str = [13 x i8] c"argv[%d]=%s\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %14
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %12, %6 ]
%8 = getelementptr inbounds i8*, i8** %1, i64 %7
%9 = load i8*, i8** %8
%10 = trunc i64 %7 to i32
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %10, i8* %9)
%12 = add nuw nsw i64 %7, 1
%13 = icmp eq i64 %12, %5
br i1 %13, label %14, label %6
14: ; preds = %6, %2
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ OPENSSL_showfatal(char *, char const *, int, char const *);
int /*<<< orphan*/ abort();
void OPENSSL_die(const char *message, const char *file, int line) {
  OPENSSL_showfatal("%s:%d: OpenSSL internal error: %s\n", file, line, message);
  abort();
}


x86 assembly (clang, -O0):
<OPENSSL_die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rcx
lea    0xebb(%rip),%rdi
call   1040 <OPENSSL_showfatal@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<OPENSSL_die>:
push   %rax
mov    %rdi,%rcx
lea    0xed5(%rip),%rdi
call   1040 <OPENSSL_showfatal@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@.str = [35 x i8] c"%s:%d: OpenSSL internal error: %s\0A\00"
define void @OPENSSL_die(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %5
%8 = load i32, i32* %6
%9 = load i8*, i8** %4
%10 = call i32 @OPENSSL_showfatal(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %7, i32 %8, i8* %9)
%11 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@.str = [35 x i8] c"%s:%d: OpenSSL internal error: %s\0A\00"
define void @OPENSSL_die(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @OPENSSL_showfatal(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %1, i32 %2, i8* %0)
%5 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ put32(unsigned int);
int /*<<< orphan*/ put8(unsigned int);
void mov_m32_reg32(unsigned int *m32, unsigned int reg32) {
  put8(0x89);
  put8((reg32 << 3) | 5);
  put32((unsigned int)(m32));
}


x86 assembly (clang, -O0):
<mov_m32_reg32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x89,%edi
call   1030 <put8@plt>
mov    -0xc(%rbp),%edi
shl    $0x3,%edi
or     $0x5,%edi
call   1030 <put8@plt>
mov    -0x8(%rbp),%rax
mov    %eax,%edi
call   1040 <put32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mov_m32_reg32>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
mov    $0x89,%edi
call   1030 <put8@plt>
lea    0x5(,%rbx,8),%edi
call   1030 <put8@plt>
mov    %r14d,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <put32@plt>

LLVM IR (-O0):
define void @mov_m32_reg32(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = call i32 @put8(i32 137)
%6 = load i32, i32* %4
%7 = shl i32 %6, 3
%8 = or i32 %7, 5
%9 = call i32 @put8(i32 %8)
%10 = load i32*, i32** %3
%11 = ptrtoint i32* %10 to i32
%12 = call i32 @put32(i32 %11)
ret void
}

LLVM IR (-O2):
define void @mov_m32_reg32(i32* %0, i32 %1) {
%3 = tail call i32 @put8(i32 137)
%4 = shl i32 %1, 3
%5 = or i32 %4, 5
%6 = tail call i32 @put8(i32 %5)
%7 = ptrtoint i32* %0 to i64
%8 = trunc i64 %7 to i32
%9 = tail call i32 @put32(i32 %8)
ret void
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int int32_t;

/* Variables and functions */
__attribute__((always_)) void LEPackInt32(uint8_t container[4], int32_t data) {
  container[0] = (uint8_t)data;
  container[1] = (uint8_t)(data >> 8);
  container[2] = (uint8_t)(data >> 16);
  container[3] = (uint8_t)(data >> 24);
}


x86 assembly (clang, -O0):
<LEPackInt32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movslq -0xc(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0xc(%rbp),%eax
sar    $0x8,%eax
movslq %eax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x8(%rax)
mov    -0xc(%rbp),%eax
sar    $0x10,%eax
movslq %eax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x10(%rax)
mov    -0xc(%rbp),%eax
sar    $0x18,%eax
movslq %eax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x18(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<LEPackInt32>:
movslq %esi,%rax
mov    %rax,(%rdi)
mov    %eax,%ecx
sar    $0x8,%ecx
movslq %ecx,%rcx
mov    %rcx,0x8(%rdi)
mov    %eax,%ecx
sar    $0x10,%ecx
movslq %ecx,%rcx
mov    %rcx,0x10(%rdi)
sar    $0x18,%eax
cltq
mov    %rax,0x18(%rdi)
ret

LLVM IR (-O0):
define void @LEPackInt32(i64* %0, i32 %1) {
%3 = alloca i64*
%4 = alloca i32
store i64* %0, i64** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = sext i32 %5 to i64
%7 = load i64*, i64** %3
%8 = getelementptr inbounds i64, i64* %7, i64 0
store i64 %6, i64* %8
%9 = load i32, i32* %4
%10 = ashr i32 %9, 8
%11 = sext i32 %10 to i64
%12 = load i64*, i64** %3
%13 = getelementptr inbounds i64, i64* %12, i64 1
store i64 %11, i64* %13
%14 = load i32, i32* %4
%15 = ashr i32 %14, 16
%16 = sext i32 %15 to i64
%17 = load i64*, i64** %3
%18 = getelementptr inbounds i64, i64* %17, i64 2
store i64 %16, i64* %18
%19 = load i32, i32* %4
%20 = ashr i32 %19, 24
%21 = sext i32 %20 to i64
%22 = load i64*, i64** %3
%23 = getelementptr inbounds i64, i64* %22, i64 3
store i64 %21, i64* %23
ret void
}

LLVM IR (-O2):
define void @LEPackInt32(i64* nocapture writeonly %0, i32 %1) {
%3 = sext i32 %1 to i64
store i64 %3, i64* %0
%4 = ashr i32 %1, 8
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds i64, i64* %0, i64 1
store i64 %5, i64* %6
%7 = ashr i32 %1, 16
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i64, i64* %0, i64 2
store i64 %8, i64* %9
%10 = ashr i32 %1, 24
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i64, i64* %0, i64 3
store i64 %11, i64* %12
ret void
}
int fun(int a) { return (a * a) >> a; }


x86 assembly (clang, -O0):
<fun>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
sar    %cl,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun>:
mov    %edi,%ecx
mov    %edi,%eax
imul   %edi,%eax
shr    %cl,%eax
ret

LLVM IR (-O0):
define i32 @fun(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = mul nsw i32 %3, %4
%6 = load i32, i32* %2
%7 = ashr i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @fun(i32 %0) {
%2 = mul nsw i32 %0, %0
%3 = lshr i32 %2, %0
ret i32 %3
}
void fc37(int n) {
  {
    typedef int(*b)[n];
    {
      typedef int(*c)[n];
      goto a;
      0;
    }
  a : {
    typedef int(*d)[n];
    0;
  };
    typedef int(*e)[n];
    0;
  };
  {
    typedef int(*f)[n];
    {
      typedef int(*g)[n];
      0;
    };
    {
      typedef int(*h)[n];
      0;
    };
    ;
    typedef int(*i)[n];
    0;
  };
  ;
  typedef int(*j)[n];
  0;
}


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

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

LLVM IR (-O0):
define void @fc37(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = zext i32 %3 to i64
%5 = load i32, i32* %2
%6 = zext i32 %5 to i64
br label %7
7: ; preds = %1
%8 = load i32, i32* %2
%9 = zext i32 %8 to i64
%10 = load i32, i32* %2
%11 = zext i32 %10 to i64
%12 = load i32, i32* %2
%13 = zext i32 %12 to i64
%14 = load i32, i32* %2
%15 = zext i32 %14 to i64
%16 = load i32, i32* %2
%17 = zext i32 %16 to i64
%18 = load i32, i32* %2
%19 = zext i32 %18 to i64
%20 = load i32, i32* %2
%21 = zext i32 %20 to i64
ret void
}

LLVM IR (-O2):
define void @fc37(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void this_function_does_nothing(void) { printf("Hello, I'm doing nothing\n"); }


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

x86 assembly (clang, -O2):
<this_function_does_nothing>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"Hello, I'm doing nothing\0A\00"
define void @this_function_does_nothing() {
%1 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [25 x i8] c"Hello, I'm doing nothing\00"
define void @this_function_does_nothing() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
ret void
}
int test_imm_5Dint32_reg(int val) { return ((val) & (0x5D << 0)) ? -20 : -40; }


x86 assembly (clang, -O0):
<test_imm_5Dint32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0x5d,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_5Dint32_reg(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 93
%5 = icmp ne i32 %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_5Dint32_reg(i32 %0) {
%2 = and i32 %0, 93
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void left_case_4(struct rbt *tree, struct node *node, struct node *sibling) {}


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

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

LLVM IR (-O0):
%struct.rbt = type opaque
%struct.node = type opaque
define void @left_case_4(%struct.rbt* %0, %struct.node* %1, %struct.node* %2) {
%4 = alloca %struct.rbt*
%5 = alloca %struct.node*
%6 = alloca %struct.node*
store %struct.rbt* %0, %struct.rbt** %4
store %struct.node* %1, %struct.node** %5
store %struct.node* %2, %struct.node** %6
ret void
}

LLVM IR (-O2):
%struct.rbt = type opaque
%struct.node = type opaque
define void @left_case_4(%struct.rbt* nocapture %0, %struct.node* nocapture %1, %struct.node* nocapture %2) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void help(void) {
  printf("\n"
         "tdbtool: \n"
         "  create    dbname     : create a database\n"
         "  open      dbname     : open an existing database\n"
         "  erase                : erase the database\n"
         "  dump                 : dump the database as strings\n"
         "  insert    key  data  : insert a record\n"
         "  move      key  file  : move a record to a destination tdb\n"
         "  store     key  data  : store a record (replace)\n"
         "  show      key        : show a record by key\n"
         "  delete    key        : delete a record by key\n"
         "  list                 : print the database hash table and freelist\n"
         "  free                 : print the database freelist\n"
         "  1 | first            : print the first record\n"
         "  n | next             : print the next record\n"
         "  q | quit             : terminate\n"
         "  \\n                   : repeat 'next' command\n"
         "\n");
}


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

x86 assembly (clang, -O2):
<help>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [748 x i8] c"\0Atdbtool: \0A create dbname : create a database\0A open dbname : open an existing database\0A erase : erase the database\0A dump : dump the database as strings\0A insert key data : insert a record\0A move key file : move a record to a destination tdb\0A store key data : store a record (replace)\0A show key : show a record by key\0A delete key : delete a record by key\0A list : print the database hash table and freelist\0A free : print the database freelist\0A 1 | first : print the first record\0A n | next : print the next record\0A q | quit : terminate\0A \\n : repeat 'next' command\0A\0A\00"
define void @help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([748 x i8], [748 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [747 x i8] c"\0Atdbtool: \0A create dbname : create a database\0A open dbname : open an existing database\0A erase : erase the database\0A dump : dump the database as strings\0A insert key data : insert a record\0A move key file : move a record to a destination tdb\0A store key data : store a record (replace)\0A show key : show a record by key\0A delete key : delete a record by key\0A list : print the database hash table and freelist\0A free : print the database freelist\0A 1 | first : print the first record\0A n | next : print the next record\0A q | quit : terminate\0A \\n : repeat 'next' command\0A\00"
define void @help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([747 x i8], [747 x i8]* @str, i64 0, i64 0))
ret void
}
unsigned xrop3_65_0_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk2 = T ^ S;
  stk1 = D | stk2;
  stk1 = ~stk1;
  return stk1;
}


x86 assembly (clang, -O0):
<xrop3_65_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
xor    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
or     -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_65_0_0>:
mov    %edi,%eax
xor    %esi,%eax
not    %eax
shl    $0x8,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_65_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%10 = load i8, i8* %3
%11 = zext i8 %10 to i32
%12 = shl i32 %11, 8
%13 = load i8, i8* %3
%14 = zext i8 %13 to i32
%15 = or i32 %12, %14
store i32 %15, i32* %6
%16 = load i8, i8* %4
%17 = zext i8 %16 to i32
%18 = shl i32 %17, 8
%19 = load i8, i8* %4
%20 = zext i8 %19 to i32
%21 = or i32 %18, %20
store i32 %21, i32* %7
%22 = load i32, i32* %7
%23 = load i32, i32* %6
%24 = xor i32 %22, %23
store i32 %24, i32* %9
%25 = load i32, i32* %5
%26 = load i32, i32* %9
%27 = or i32 %25, %26
store i32 %27, i32* %8
%28 = load i32, i32* %8
%29 = xor i32 %28, -1
store i32 %29, i32* %8
%30 = load i32, i32* %8
ret i32 %30
}

LLVM IR (-O2):
define i32 @xrop3_65_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = xor i8 %1, %0
%4 = zext i8 %3 to i32
%5 = xor i32 %4, -1
%6 = shl nsw i32 %5, 8
ret i32 %6
}
void test_four(int x, int y) {
#pragma omp target
#pragma omp teams distribute parallel for collapse(2)
  for (int i = 0; i < x; i++)
    for (int i = 0; i < y; i++)
      ;
}


x86 assembly (clang, -O0):
<test_four>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1156 <test_four+0x56>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1143 <test_four+0x43>
jmp    1135 <test_four+0x35>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1124 <test_four+0x24>
jmp    1148 <test_four+0x48>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1111 <test_four+0x11>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @test_four(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
store i32 0, i32* %5
br label %7
7: ; preds = %21, %2
%8 = load i32, i32* %5
%9 = load i32, i32* %3
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %24
11: ; preds = %7
store i32 0, i32* %6
br label %12
12: ; preds = %17, %11
%13 = load i32, i32* %6
%14 = load i32, i32* %4
%15 = icmp slt i32 %13, %14
br i1 %15, label %16, label %20
16: ; preds = %12
br label %17
17: ; preds = %16
%18 = load i32, i32* %6
%19 = add nsw i32 %18, 1
store i32 %19, i32* %6
br label %12
20: ; preds = %12
br label %21
21: ; preds = %20
%22 = load i32, i32* %5
%23 = add nsw i32 %22, 1
store i32 %23, i32* %5
br label %7
24: ; preds = %7
ret void
}

LLVM IR (-O2):
define void @test_four(i32 %0, i32 %1) {
ret void
}
void __attribute__((weak_import)) g5(void) {}


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

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

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

LLVM IR (-O2):
define void @g5() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ iscntrl(int);
void t_iscntrl_0x07() {
  Assert_real((iscntrl(7)),
              "/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_iscntrl.c",
              40, ("iscntrl should be 1 for 0x07"));
}


x86 assembly (clang, -O0):
<t_iscntrl_0x07>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7,%edi
call   1030 <iscntrl@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x28,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_iscntrl_0x07>:
push   %rax
mov    $0x7,%edi
call   1030 <iscntrl@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x28,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 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_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 1 for 0x07\00"
define void @t_iscntrl_0x07() {
%1 = call i32 @iscntrl(i32 7)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 40, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 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_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 1 for 0x07\00"
define void @t_iscntrl_0x07() {
%1 = tail call i32 @iscntrl(i32 7)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 40, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void flowctrl_cpu_suspend_exit(unsigned int cpuid) {}


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

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

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

LLVM IR (-O2):
define void @flowctrl_cpu_suspend_exit(i32 %0) {
ret void
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int x, y, z, i;
  x = __VERIFIER_nondet_int();
  y = __VERIFIER_nondet_int();
  z = __VERIFIER_nondet_int();
  i = __VERIFIER_nondet_int();
  while (x < y) {
    i = i + 1;
    if (z > x) {
      x = x + 1;
    } else {
      z = z + 1;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x10(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1184 <main+0x74>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1176 <main+0x66>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    117f <main+0x6f>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1147 <main+0x37>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
%3 = tail call i32 (...) @__VERIFIER_nondet_int()
%4 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
/* Variables and functions */
double pow(int, int);
int /*<<< orphan*/ printf(char *, double, ...);
int main() {
  double rezultat;
  rezultat = pow(5, 413);
  printf("   %d la puterea %d = %.9E", 5, 413, rezultat);
  printf("\n\n   Adica %.f\n", rezultat);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x5,%edi
mov    $0x19d,%esi
call   1040 <pow@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm1
lea    0xeb9(%rip),%rdi
movsd  0xea9(%rip),%xmm0
mov    $0x19d,%esi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  -0x10(%rbp),%xmm0
lea    0xeb4(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x5,%edi
mov    $0x19d,%esi
call   1040 <pow@plt>
movaps %xmm0,%xmm1
movsd  %xmm0,(%rsp)
lea    0xec9(%rip),%rdi
movsd  0xeb9(%rip),%xmm0
mov    $0x19d,%esi
mov    $0x2,%al
call   1030 <printf@plt>
lea    0xec9(%rip),%rdi
movsd  (%rsp),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [27 x i8] c" %d la puterea %d = %.9E\00"
@.str.1 = [16 x i8] c"\0A\0A Adica %.f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
store i32 0, i32* %1
%3 = call double @pow(i32 5, i32 413)
store double %3, double* %2
%4 = load double, double* %2
%5 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), double 5.000000e+00, i32 413, double %4)
%6 = load double, double* %2
%7 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), double %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [27 x i8] c" %d la puterea %d = %.9E\00"
@.str.1 = [16 x i8] c"\0A\0A Adica %.f\0A\00"
define i32 @main() {
%1 = tail call double @pow(i32 5, i32 413)
%2 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), double 5.000000e+00, i32 413, double %1)
%3 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), double %1)
ret i32 0
}
/* Type definitions */
struct libalias {
  int dummy;
};
struct ip {
  int dummy;
};
struct alias_data {
  int dummy;
};

/* Variables and functions */
scalar_t__ AliasHandlePptpGreOut(struct libalias *, struct ip *);
int protohandlergreout(struct libalias *la, struct ip *pip,
                       struct alias_data *ah) {
  if (AliasHandlePptpGreOut(la, pip) == 0)
    return (0);
  return (-1);
}


x86 assembly (clang, -O0):
<protohandlergreout>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <AliasHandlePptpGreOut@plt>
cmp    $0x0,%rax
jne    1147 <protohandlergreout+0x37>
movl   $0x0,-0x4(%rbp)
jmp    114e <protohandlergreout+0x3e>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<protohandlergreout>:
push   %rax
call   1030 <AliasHandlePptpGreOut@plt>
neg    %rax
sbb    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.libalias = type { i32 }
%struct.ip = type { i32 }
%struct.alias_data = type { i32 }
define i32 @protohandlergreout(%struct.libalias* %0, %struct.ip* %1, %struct.alias_data* %2) {
%4 = alloca i32
%5 = alloca %struct.libalias*
%6 = alloca %struct.ip*
%7 = alloca %struct.alias_data*
store %struct.libalias* %0, %struct.libalias** %5
store %struct.ip* %1, %struct.ip** %6
store %struct.alias_data* %2, %struct.alias_data** %7
%8 = load %struct.libalias*, %struct.libalias** %5
%9 = load %struct.ip*, %struct.ip** %6
%10 = call i64 @AliasHandlePptpGreOut(%struct.libalias* %8, %struct.ip* %9)
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %3
store i32 0, i32* %4
br label %14
13: ; preds = %3
store i32 -1, i32* %4
br label %14
14: ; preds = %13, %12
%15 = load i32, i32* %4
ret i32 %15
}

LLVM IR (-O2):
%struct.libalias = type { i32 }
%struct.ip = type { i32 }
%struct.alias_data = type { i32 }
define i32 @protohandlergreout(%struct.libalias* %0, %struct.ip* %1, %struct.alias_data* nocapture readnone %2) {
%4 = tail call i64 @AliasHandlePptpGreOut(%struct.libalias* %0, %struct.ip* %1)
%5 = icmp ne i64 %4, 0
%6 = sext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
void *create_hash();
int /*<<< orphan*/ print_hash(void *);
void do_stuff() {
  void *data = create_hash();
  print_hash(data);
  print_hash(data);
}


x86 assembly (clang, -O0):
<do_stuff>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <create_hash@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <print_hash@plt>
mov    -0x8(%rbp),%rdi
call   1030 <print_hash@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_stuff>:
push   %rbx
xor    %eax,%eax
call   1040 <create_hash@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1030 <print_hash@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <print_hash@plt>

LLVM IR (-O0):
define void @do_stuff() {
%1 = alloca i8*
%2 = call i8* (...) @create_hash()
store i8* %2, i8** %1
%3 = load i8*, i8** %1
%4 = call i32 @print_hash(i8* %3)
%5 = load i8*, i8** %1
%6 = call i32 @print_hash(i8* %5)
ret void
}

LLVM IR (-O2):
define void @do_stuff() {
%1 = tail call i8* (...) @create_hash()
%2 = tail call i32 @print_hash(i8* %1)
%3 = tail call i32 @print_hash(i8* %1)
ret void
}
int do_675() { return 675; }


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

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

LLVM IR (-O0):
define i32 @do_675() {
ret i32 675
}

LLVM IR (-O2):
define i32 @do_675() {
ret i32 675
}
/* Type definitions */
typedef int /*<<< orphan*/ DIR;

/* Variables and functions */
int /*<<< orphan*/ *opendir(char *);
DIR *lisp_opendir(char *path) { return opendir(path); }


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

x86 assembly (clang, -O2):
<lisp_opendir>:
jmp    1030 <opendir@plt>

LLVM IR (-O0):
define i32* @lisp_opendir(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32* @opendir(i8* %3)
ret i32* %4
}

LLVM IR (-O2):
define noalias i32* @lisp_opendir(i8* nocapture %0) {
%2 = tail call i32* @opendir(i8* %0)
ret i32* %2
}
/* Variables and functions */
int /*<<< orphan*/ SIGKILL;
int /*<<< orphan*/ getppid();
int /*<<< orphan*/ kill(int /*<<< orphan*/, int /*<<< orphan*/);
int main() {
  kill(getppid(), SIGKILL);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <getppid@plt>
mov    %eax,%edi
mov    0x2ea1(%rip),%rax
mov    (%rax),%esi
call   1030 <kill@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <getppid@plt>
mov    0x2eb1(%rip),%rcx
mov    (%rcx),%esi
mov    %eax,%edi
call   1030 <kill@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@SIGKILL = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @getppid()
%3 = load i32, i32* @SIGKILL
%4 = call i32 @kill(i32 %2, i32 %3)
ret i32 0
}

LLVM IR (-O2):
@SIGKILL = global i32 0
define i32 @main() {
%1 = tail call i32 (...) @getppid()
%2 = load i32, i32* @SIGKILL
%3 = tail call i32 @kill(i32 %1, i32 %2)
ret i32 0
}
int dev_add_bb_dev(const char *filename, const char *name) { return 0; }


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

x86 assembly (clang, -O2):
<dev_add_bb_dev>:
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @dev_add_bb_dev(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 0
}
void rop3_208_0_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk3 = ~*D;
  stk2 = S | stk3;
  stk1 = T & stk2;
  *D = (stk1 & S) | (stk1 & (~T)) | (T & (~S) & *D);
}


x86 assembly (clang, -O0):
<rop3_208_0_1>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
xor    $0xffffffff,%eax
mov    %al,-0xd(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xd(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0xc(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
and    %ecx,%eax
movzbl -0xb(%rbp),%ecx
movzbl -0xa(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
or     %ecx,%eax
movzbl -0xa(%rbp),%ecx
movzbl -0x9(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
mov    -0x8(%rbp),%rdx
movzbl (%rdx),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_208_0_1>:
mov    %edx,%eax
and    %sil,%al
not    %sil
and    %dl,%sil
and    (%rdi),%sil
or     %al,%sil
mov    %sil,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_208_0_1(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%10 = load i8*, i8** %4
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = xor i32 %12, -1
%14 = trunc i32 %13 to i8
store i8 %14, i8* %9
%15 = load i8, i8* %5
%16 = zext i8 %15 to i32
%17 = load i8, i8* %9
%18 = zext i8 %17 to i32
%19 = or i32 %16, %18
%20 = trunc i32 %19 to i8
store i8 %20, i8* %8
%21 = load i8, i8* %6
%22 = zext i8 %21 to i32
%23 = load i8, i8* %8
%24 = zext i8 %23 to i32
%25 = and i32 %22, %24
%26 = trunc i32 %25 to i8
store i8 %26, i8* %7
%27 = load i8, i8* %7
%28 = zext i8 %27 to i32
%29 = load i8, i8* %5
%30 = zext i8 %29 to i32
%31 = and i32 %28, %30
%32 = load i8, i8* %7
%33 = zext i8 %32 to i32
%34 = load i8, i8* %6
%35 = zext i8 %34 to i32
%36 = xor i32 %35, -1
%37 = and i32 %33, %36
%38 = or i32 %31, %37
%39 = load i8, i8* %6
%40 = zext i8 %39 to i32
%41 = load i8, i8* %5
%42 = zext i8 %41 to i32
%43 = xor i32 %42, -1
%44 = and i32 %40, %43
%45 = load i8*, i8** %4
%46 = load i8, i8* %45
%47 = zext i8 %46 to i32
%48 = and i32 %44, %47
%49 = or i32 %38, %48
%50 = trunc i32 %49 to i8
%51 = load i8*, i8** %4
store i8 %50, i8* %51
ret void
}

LLVM IR (-O2):
define void @rop3_208_0_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = and i8 %2, %1
%6 = xor i8 %1, -1
%7 = and i8 %6, %2
%8 = and i8 %7, %4
%9 = or i8 %8, %5
store i8 %9, i8* %0
ret void
}