xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ system(char *);
void poll_online(void) {
  system("iwpriv ra0 show stainfo");
  system("iwpriv apcli0 show connStatus");
}


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

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

LLVM IR (-O0):
@.str = [24 x i8] c"iwpriv ra0 show stainfo\00"
@.str.1 = [30 x i8] c"iwpriv apcli0 show connStatus\00"
define void @poll_online() {
%1 = call i32 @system(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @system(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"iwpriv ra0 show stainfo\00"
@.str.1 = [30 x i8] c"iwpriv apcli0 show connStatus\00"
define void @poll_online() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @system(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
__attribute__((constructor(200))) void init_func200(void) {
  printf("init_func with priority 200\n");
}


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

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

LLVM IR (-O0):
@.str = [29 x i8] c"init_func with priority 200\0A\00"
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 200, void ()* @init_func200, i8* null }]
define void @init_func200() {
%1 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 200, void ()* @init_func200, i8* null }]
@str = [28 x i8] c"init_func with priority 200\00"
define void @init_func200() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str, i64 0, i64 0))
ret void
}
void fd272(int n) {
a : {
  typedef int(*b)[n];
P01A:
  goto P01A;
  {
    typedef int(*c)[n];
  P012A:
    goto P012A;
    0;
  }
P01B:
  goto P01B;
  {
    typedef int(*d)[n];
  P013A:
    goto P013A;
    0;
  }
P01C:
  goto P01C;
  ;
  typedef int(*e)[n];
P014A:
  goto P014A;
  0;
};
P0B:
  goto P0B;
  {
    typedef int(*f)[n];
  P02A:
    goto P02A;
    {
      typedef int(*g)[n];
    P024A:
      goto P024A;
      0;
    };
  P02B:
    goto P02B;
    {
      typedef int(*h)[n];
    P025A:
      goto P025A;
      0;
    };
  P02C:
    goto P02C;
    ;
    typedef int(*i)[n];
  P026A:
    goto P026A;
    0;
  };
P0C:
  goto P0C;
  ;
  typedef int(*j)[n];
P03A:
  goto P03A;
  0;
p03B:
  goto p03B;
  goto a;
P03B:
  goto P03B;
}


x86 assembly (clang, -O0):
<fd272>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
jmp    1107 <fd272+0x7>

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

LLVM IR (-O0):
define void @fd272(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %1
%4 = load i32, i32* %2
%5 = zext i32 %4 to i64
br label %6
6: ; preds = %6, %3
br label %6
7: ; No predecessors!
%8 = load i32, i32* %2
%9 = zext i32 %8 to i64
br label %10
10: ; preds = %10, %7
br label %10
11: ; preds = %11
br label %11
12: ; No predecessors!
%13 = load i32, i32* %2
%14 = zext i32 %13 to i64
br label %15
15: ; preds = %15, %12
br label %15
16: ; preds = %16
br label %16
17: ; No predecessors!
%18 = load i32, i32* %2
%19 = zext i32 %18 to i64
br label %20
20: ; preds = %20, %17
br label %20
21: ; preds = %21
br label %21
22: ; No predecessors!
%23 = load i32, i32* %2
%24 = zext i32 %23 to i64
br label %25
25: ; preds = %25, %22
br label %25
26: ; No predecessors!
%27 = load i32, i32* %2
%28 = zext i32 %27 to i64
br label %29
29: ; preds = %29, %26
br label %29
30: ; preds = %30
br label %30
31: ; No predecessors!
%32 = load i32, i32* %2
%33 = zext i32 %32 to i64
br label %34
34: ; preds = %34, %31
br label %34
35: ; preds = %35
br label %35
36: ; No predecessors!
%37 = load i32, i32* %2
%38 = zext i32 %37 to i64
br label %39
39: ; preds = %39, %36
br label %39
40: ; preds = %40
br label %40
41: ; No predecessors!
%42 = load i32, i32* %2
%43 = zext i32 %42 to i64
br label %44
44: ; preds = %44, %41
br label %44
45: ; preds = %45
br label %45
46: ; preds = %46
br label %46
}

LLVM IR (-O2):
define void @fd272(i32 %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
unsigned int BigLong(unsigned int val) {
  union {
    unsigned int i;
    unsigned char c[4];
  } v;
  v.i = val;
  return (v.c[0] << 24) | (v.c[1] << 16) | (v.c[2] << 8) | (v.c[3] << 0);
}


x86 assembly (clang, -O0):
<BigLong>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
movzbl -0x8(%rbp),%eax
shl    $0x18,%eax
movzbl -0x7(%rbp),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
movzbl -0x6(%rbp),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
movzbl -0x5(%rbp),%ecx
shl    $0x0,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<BigLong>:
mov    %edi,%eax
bswap  %eax
ret

LLVM IR (-O0):
%union.anon = type { i32 }
define i32 @BigLong(i32 %0) {
%2 = alloca i32
%3 = alloca %union.anon
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = bitcast %union.anon* %3 to i32*
store i32 %4, i32* %5
%6 = bitcast %union.anon* %3 to [4 x i8]*
%7 = getelementptr inbounds [4 x i8], [4 x i8]* %6, i64 0, i64 0
%8 = load i8, i8* %7
%9 = zext i8 %8 to i32
%10 = shl i32 %9, 24
%11 = bitcast %union.anon* %3 to [4 x i8]*
%12 = getelementptr inbounds [4 x i8], [4 x i8]* %11, i64 0, i64 1
%13 = load i8, i8* %12
%14 = zext i8 %13 to i32
%15 = shl i32 %14, 16
%16 = or i32 %10, %15
%17 = bitcast %union.anon* %3 to [4 x i8]*
%18 = getelementptr inbounds [4 x i8], [4 x i8]* %17, i64 0, i64 2
%19 = load i8, i8* %18
%20 = zext i8 %19 to i32
%21 = shl i32 %20, 8
%22 = or i32 %16, %21
%23 = bitcast %union.anon* %3 to [4 x i8]*
%24 = getelementptr inbounds [4 x i8], [4 x i8]* %23, i64 0, i64 3
%25 = load i8, i8* %24
%26 = zext i8 %25 to i32
%27 = shl i32 %26, 0
%28 = or i32 %22, %27
ret i32 %28
}

LLVM IR (-O2):
define i32 @BigLong(i32 %0) {
%2 = tail call i32 @llvm.bswap.i32(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *,
                           char const *);
char *gettext(char *);
int /*<<< orphan*/ print_usage(int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void print_error(void) {
  const char *program = "yppoll";
  print_usage(stderr);
  fprintf(stderr,
          gettext("Try `%s --help' or `%s --usage' for more information.\n"),
          program, program);
}


x86 assembly (clang, -O0):
<print_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    0x2e96(%rip),%rax
mov    (%rax),%edi
call   1050 <print_usage@plt>
mov    0x2e88(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
lea    0xea3(%rip),%rdi
call   1030 <gettext@plt>
mov    -0xc(%rbp),%edi
mov    %rax,%rsi
mov    -0x8(%rbp),%rdx
mov    -0x8(%rbp),%rcx
call   1040 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_error>:
push   %rbx
mov    0x2ea8(%rip),%rbx
mov    (%rbx),%edi
call   1050 <print_usage@plt>
mov    (%rbx),%ebx
lea    0xebf(%rip),%rdi
call   1030 <gettext@plt>
lea    0xeac(%rip),%rcx
mov    %ebx,%edi
mov    %rax,%rsi
mov    %rcx,%rdx
pop    %rbx
jmp    1040 <fprintf@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"yppoll\00"
@stderr = global i32 0
@.str.1 = [55 x i8] c"Try `%s --help' or `%s --usage' for more information.\0A\00"
define void @print_error() {
%1 = alloca i8*
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8** %1
%2 = load i32, i32* @stderr
%3 = call i32 @print_usage(i32 %2)
%4 = load i32, i32* @stderr
%5 = call i8* @gettext(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.1, i64 0, i64 0))
%6 = load i8*, i8** %1
%7 = load i8*, i8** %1
%8 = call i32 @fprintf(i32 %4, i8* %5, i8* %6, i8* %7)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"yppoll\00"
@stderr = global i32 0
@.str.1 = [55 x i8] c"Try `%s --help' or `%s --usage' for more information.\0A\00"
define void @print_error() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @print_usage(i32 %1)
%3 = load i32, i32* @stderr
%4 = tail call i8* @gettext(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @fprintf(i32 %3, i8* %4, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}
char *basename(name) const char *name;
{
  const char *base;
  for (base = name; *name; name++) {
    if (((*name) == '/')) {
      base = name + 1;
    }
  }
  return (char *)base;
}


x86 assembly (clang, -O0):
<basename>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     114f <basename+0x4f>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2f,%eax
jne    1139 <basename+0x39>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    113e <basename+0x3e>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1110 <basename+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<basename>:
mov    %rdi,%rax
lea    0x1(%rdi),%rcx
jmp    1117 <basename+0x17>
nopl   0x0(%rax)
mov    %rcx,%rax
add    $0x1,%rcx
movzbl -0x1(%rcx),%edx
cmp    $0x2f,%dl
je     1110 <basename+0x10>
test   %dl,%dl
jne    1113 <basename+0x13>
ret

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

LLVM IR (-O2):
define i8* @basename(i8* %0) {
br label %2
2: ; preds = %8, %1
%3 = phi i8* [ %0, %1 ], [ %10, %8 ]
%4 = phi i8* [ %0, %1 ], [ %9, %8 ]
%5 = load i8, i8* %3
switch i8 %5, label %8 [
i8 0, label %11
i8 47, label %6
]
6: ; preds = %2
%7 = getelementptr inbounds i8, i8* %3, i64 1
br label %8
8: ; preds = %2, %6
%9 = phi i8* [ %7, %6 ], [ %4, %2 ]
%10 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
11: ; preds = %2
ret i8* %4
}
/* Variables and functions */
__attribute__((always_)) size_t brotli_min_size_t(size_t a, size_t b) {
  return a < b ? a : b;
}


x86 assembly (clang, -O0):
<brotli_min_size_t>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1127 <brotli_min_size_t+0x27>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    112f <brotli_min_size_t+0x2f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<brotli_min_size_t>:
mov    %rsi,%rax
cmp    %rsi,%rdi
cmovb  %rdi,%rax
ret

LLVM IR (-O0):
define i64 @brotli_min_size_t(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 = icmp ult i64 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i64, i64* %3
br label %12
10: ; preds = %2
%11 = load i64, i64* %4
br label %12
12: ; preds = %10, %8
%13 = phi i64 [ %9, %8 ], [ %11, %10 ]
ret i64 %13
}

LLVM IR (-O2):
define i64 @brotli_min_size_t(i64 %0, i64 %1) {
%3 = icmp ult i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
void mm_nofree(void *p) {}


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

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

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

LLVM IR (-O2):
define void @mm_nofree(i8* nocapture %0) {
ret void
}
/* Type definitions */
struct passwd_test_data {
  int dummy;
};

/* Variables and functions */
int __passwd_test_data_foreach(struct passwd_test_data *,
                               int (*)(struct passwd *, void *), void *);
int __passwd_1pass_test(struct passwd_test_data *td,
                        int (*tf)(struct passwd *, void *), void *mdata) {
  int rv;
  rv = __passwd_test_data_foreach(td, tf, mdata);
  return (rv);
}


x86 assembly (clang, -O0):
<__passwd_1pass_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <__passwd_test_data_foreach@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__passwd_1pass_test>:
jmp    1030 <__passwd_test_data_foreach@plt>

LLVM IR (-O0):
%struct.passwd_test_data = type { i32 }
%struct.passwd = type opaque
%struct.passwd.0 = type opaque
define i32 @__passwd_1pass_test(%struct.passwd_test_data* %0, i32 (%struct.passwd*, i8*)* %1, i8* %2) {
%4 = alloca %struct.passwd_test_data*
%5 = alloca i32 (%struct.passwd*, i8*)*
%6 = alloca i8*
%7 = alloca i32
store %struct.passwd_test_data* %0, %struct.passwd_test_data** %4
store i32 (%struct.passwd*, i8*)* %1, i32 (%struct.passwd*, i8*)** %5
store i8* %2, i8** %6
%8 = load %struct.passwd_test_data*, %struct.passwd_test_data** %4
%9 = load i32 (%struct.passwd*, i8*)*, i32 (%struct.passwd*, i8*)** %5
%10 = bitcast i32 (%struct.passwd*, i8*)* %9 to i32 (%struct.passwd.0*, i8*)*
%11 = load i8*, i8** %6
%12 = call i32 @__passwd_test_data_foreach(%struct.passwd_test_data* %8, i32 (%struct.passwd.0*, i8*)* %10, i8* %11)
store i32 %12, i32* %7
%13 = load i32, i32* %7
ret i32 %13
}

LLVM IR (-O2):
%struct.passwd_test_data = type { i32 }
%struct.passwd = type opaque
%struct.passwd.0 = type opaque
define i32 @__passwd_1pass_test(%struct.passwd_test_data* %0, i32 (%struct.passwd*, i8*)* %1, i8* %2) {
%4 = bitcast i32 (%struct.passwd*, i8*)* %1 to i32 (%struct.passwd.0*, i8*)*
%5 = tail call i32 @__passwd_test_data_foreach(%struct.passwd_test_data* %0, i32 (%struct.passwd.0*, i8*)* %4, i8* %2)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("hello fish!\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [12 x i8] c"hello fish!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void initialization(char *d) {
  char *e = d;
  {
    char g = e[22];
    char *f = e;
    e[2] = 'd';
    f[2] = 'l';
  }
}


x86 assembly (clang, -O0):
<initialization>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x16(%rax),%al
mov    %al,-0x11(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
movb   $0x64,0x2(%rax)
mov    -0x20(%rbp),%rax
movb   $0x6c,0x2(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<initialization>:
movb   $0x6c,0x2(%rdi)
ret

LLVM IR (-O0):
define void @initialization(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8
%5 = alloca i8*
store i8* %0, i8** %2
%6 = load i8*, i8** %2
store i8* %6, i8** %3
%7 = load i8*, i8** %3
%8 = getelementptr inbounds i8, i8* %7, i64 22
%9 = load i8, i8* %8
store i8 %9, i8* %4
%10 = load i8*, i8** %3
store i8* %10, i8** %5
%11 = load i8*, i8** %3
%12 = getelementptr inbounds i8, i8* %11, i64 2
store i8 100, i8* %12
%13 = load i8*, i8** %5
%14 = getelementptr inbounds i8, i8* %13, i64 2
store i8 108, i8* %14
ret void
}

LLVM IR (-O2):
define void @initialization(i8* nocapture writeonly %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 2
store i8 108, i8* %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0x4d() {
  Assert_real((islower(77) == 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_islower.c",
              390, ("islower should be 0 for M"));
}


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

x86 assembly (clang, -O2):
<t_islower_0x4d>:
push   %rax
mov    $0x4d,%edi
call   1030 <islower@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x186,%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_islower.c\00"
@.str.1 = [26 x i8] c"islower should be 0 for M\00"
define void @t_islower_0x4d() {
%1 = call i64 @islower(i32 77)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 390, i8* getelementptr inbounds ([26 x i8], [26 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_islower.c\00"
@.str.1 = [26 x i8] c"islower should be 0 for M\00"
define void @t_islower_0x4d() {
%1 = tail call i64 @islower(i32 77)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 390, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
size_t strlcpy(char *, char const *, size_t);
size_t strlen(char const *);
size_t strxfrm(char *dst, const char *src, size_t n) {
  if (n == 0)
    return (strlen(src));
  return (strlcpy(dst, src, n));
}


x86 assembly (clang, -O0):
<strxfrm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1151 <strxfrm+0x31>
mov    -0x18(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x8(%rbp)
jmp    1166 <strxfrm+0x46>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1040 <strlcpy@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strxfrm>:
test   %rdx,%rdx
je     112a <strxfrm+0xa>
jmp    1040 <strlcpy@plt>
mov    %rsi,%rdi
jmp    1030 <strlen@plt>

LLVM IR (-O0):
define i64 @strxfrm(i8* %0, i8* %1, i64 %2) {
%4 = alloca i64
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i64
store i8* %0, i8** %5
store i8* %1, i8** %6
store i64 %2, i64* %7
%8 = load i64, i64* %7
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %3
%11 = load i8*, i8** %6
%12 = call i64 @strlen(i8* %11)
store i64 %12, i64* %4
br label %18
13: ; preds = %3
%14 = load i8*, i8** %5
%15 = load i8*, i8** %6
%16 = load i64, i64* %7
%17 = call i64 @strlcpy(i8* %14, i8* %15, i64 %16)
store i64 %17, i64* %4
br label %18
18: ; preds = %13, %10
%19 = load i64, i64* %4
ret i64 %19
}

LLVM IR (-O2):
define i64 @strxfrm(i8* %0, i8* %1, i64 %2) {
%4 = icmp eq i64 %2, 0
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = tail call i64 @strlen(i8* dereferenceable(1) %1)
br label %9
7: ; preds = %3
%8 = tail call i64 @strlcpy(i8* %0, i8* %1, i64 %2)
br label %9
9: ; preds = %7, %5
%10 = phi i64 [ %6, %5 ], [ %8, %7 ]
ret i64 %10
}
/* Variables and functions */
int /*<<< orphan*/ japi_sync();
void j_sync() { japi_sync(); }


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

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

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

LLVM IR (-O2):
define void @j_sync() {
%1 = tail call i32 (...) @japi_sync()
ret void
}
/* Type definitions */
typedef scalar_t__ time_t;

/* Variables and functions */
scalar_t__ time(int /*<<< orphan*/ *);
time_t ctime_plus_delta_get_time(void *clock) {
  time_t user_delta = (clock == NULL) ? 0 : *(time_t *)clock;
  return user_delta + time(NULL);
}


x86 assembly (clang, -O0):
<ctime_plus_delta_get_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1132 <ctime_plus_delta_get_time+0x22>
xor    %eax,%eax
mov    %rax,-0x18(%rbp)
jmp    113d <ctime_plus_delta_get_time+0x2d>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1030 <time@plt>
mov    %rax,%rcx
mov    -0x20(%rbp),%rax
add    %rcx,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ctime_plus_delta_get_time>:
push   %rbx
test   %rdi,%rdi
je     111b <ctime_plus_delta_get_time+0xb>
mov    (%rdi),%rbx
jmp    111d <ctime_plus_delta_get_time+0xd>
xor    %ebx,%ebx
xor    %edi,%edi
call   1030 <time@plt>
add    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @ctime_plus_delta_get_time(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %7
6: ; preds = %1
br label %11
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = bitcast i8* %8 to i64*
%10 = load i64, i64* %9
br label %11
11: ; preds = %7, %6
%12 = phi i64 [ 0, %6 ], [ %10, %7 ]
store i64 %12, i64* %3
%13 = load i64, i64* %3
%14 = call i64 @time(i32* null)
%15 = add nsw i64 %13, %14
ret i64 %15
}

LLVM IR (-O2):
define i64 @ctime_plus_delta_get_time(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = bitcast i8* %0 to i64*
%5 = load i64, i64* %4
br label %6
6: ; preds = %1, %3
%7 = phi i64 [ %5, %3 ], [ 0, %1 ]
%8 = tail call i64 @time(i32* null)
%9 = add nsw i64 %8, %7
ret i64 %9
}
int udev_queue_export_udev_seqnum(struct udev_queue *udev_queue,
                                  unsigned long long int seqnum) {
  return -1;
}


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

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

LLVM IR (-O0):
%struct.udev_queue = type opaque
define i32 @udev_queue_export_udev_seqnum(%struct.udev_queue* %0, i64 %1) {
%3 = alloca %struct.udev_queue*
%4 = alloca i64
store %struct.udev_queue* %0, %struct.udev_queue** %3
store i64 %1, i64* %4
ret i32 -1
}

LLVM IR (-O2):
%struct.udev_queue = type opaque
define i32 @udev_queue_export_udev_seqnum(%struct.udev_queue* nocapture readnone %0, i64 %1) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ output_char(char);
int /*<<< orphan*/ output_q(long);
long fun_call(long l, long m) {
  output_char('c');
  output_q(l);
  output_q(m);
  return 0x999888;
}


x86 assembly (clang, -O0):
<fun_call>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x63,%edi
call   1040 <output_char@plt>
mov    -0x8(%rbp),%rdi
call   1030 <output_q@plt>
mov    -0x10(%rbp),%rdi
call   1030 <output_q@plt>
mov    $0x999888,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun_call>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    $0x63,%edi
call   1040 <output_char@plt>
mov    %rbx,%rdi
call   1030 <output_q@plt>
mov    %r14,%rdi
call   1030 <output_q@plt>
mov    $0x999888,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i64 @fun_call(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = call i32 @output_char(i8 signext 99)
%6 = load i64, i64* %3
%7 = call i32 @output_q(i64 %6)
%8 = load i64, i64* %4
%9 = call i32 @output_q(i64 %8)
ret i64 10066056
}

LLVM IR (-O2):
define i64 @fun_call(i64 %0, i64 %1) {
%3 = tail call i32 @output_char(i8 signext 99)
%4 = tail call i32 @output_q(i64 %0)
%5 = tail call i32 @output_q(i64 %1)
ret i64 10066056
}
int fun243() { return 243; }


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

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

LLVM IR (-O0):
define i32 @fun243() {
ret i32 243
}

LLVM IR (-O2):
define i32 @fun243() {
ret i32 243
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
void write_vector(int64_t *vec) {}


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

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

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

LLVM IR (-O2):
define void @write_vector(i32* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ O_RDWR;
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ exit(int);
int open(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
int i2c_setup(const char *bus) {
  assert(NULL != bus);
  int fd;
  if ((fd = open(bus, O_RDWR)) < 0) {
    perror("Failed to open I2C bus\n");
    exit(1);
  }
  return fd;
}


x86 assembly (clang, -O0):
<i2c_setup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
cmp    -0x8(%rbp),%rax
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%rdi
mov    0x2e7e(%rip),%rax
mov    (%rax),%esi
call   1040 <open@plt>
mov    %eax,-0xc(%rbp)
cmp    $0x0,%eax
jge    1193 <i2c_setup+0x53>
lea    0xe7c(%rip),%rdi
call   1050 <perror@plt>
mov    $0x1,%edi
call   1060 <exit@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i2c_setup>:
push   %rbx
mov    %rdi,%rbx
xor    %edi,%edi
test   %rbx,%rbx
setne  %dil
call   1030 <assert@plt>
mov    0x2e8f(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
call   1040 <open@plt>
test   %eax,%eax
js     1169 <i2c_setup+0x29>
pop    %rbx
ret
lea    0xe90(%rip),%rdi
call   1050 <perror@plt>
mov    $0x1,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@O_RDWR = global i32 0
@.str = [24 x i8] c"Failed to open I2C bus\0A\00"
define i32 @i2c_setup(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = icmp ne i8* null, %4
%6 = zext i1 %5 to i32
%7 = call i32 @assert(i32 %6)
%8 = load i8*, i8** %2
%9 = load i32, i32* @O_RDWR
%10 = call i32 @open(i8* %8, i32 %9)
store i32 %10, i32* %3
%11 = icmp slt i32 %10, 0
br i1 %11, label %12, label %15
12: ; preds = %1
%13 = call i32 @perror(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%14 = call i32 @exit(i32 1)
unreachable
15: ; preds = %1
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
@O_RDWR = global i32 0
@.str = [24 x i8] c"Failed to open I2C bus\0A\00"
define i32 @i2c_setup(i8* %0) {
%2 = icmp ne i8* %0, null
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = load i32, i32* @O_RDWR
%6 = tail call i32 @open(i8* %0, i32 %5)
%7 = icmp slt i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = tail call i32 @perror(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%10 = tail call i32 @exit(i32 1)
unreachable
11: ; preds = %1
ret i32 %6
}
int main(void) {
  int x;
  int i;
  {
    i = 0;
    while (i < 5) {
      if (i == 5) {
        goto __Cont;
      }
      if (i == 4) {
        break;
      }
      i += 2;
    __Cont:
      i++;
    }
    while (x < 5) {
      if (x == 3) {
        continue;
      }
      x++;
    }
    return (0);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x5,-0xc(%rbp)
jge    1151 <main+0x51>
cmpl   $0x5,-0xc(%rbp)
jne    112b <main+0x2b>
jmp    1143 <main+0x43>
cmpl   $0x4,-0xc(%rbp)
jne    113a <main+0x3a>
jmp    1151 <main+0x51>
mov    -0xc(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1112 <main+0x12>
jmp    1156 <main+0x56>
cmpl   $0x5,-0x8(%rbp)
jge    117d <main+0x7d>
cmpl   $0x3,-0x8(%rbp)
jne    116f <main+0x6f>
jmp    1156 <main+0x56>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1156 <main+0x56>
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void printhex(char *str, size_t sz) {
  while (sz--) {
    unsigned char c = *str++;
    printf("%02x", c);
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<printhex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x10(%rbp)
cmp    $0x0,%rax
je     1164 <printhex+0x54>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%al
mov    %al,-0x11(%rbp)
movzbl -0x11(%rbp),%esi
lea    0xea8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1120 <printhex+0x10>
lea    0xe9a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printhex>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %rsi,%rsi
je     1158 <printhex+0x38>
mov    %rsi,%r12
mov    %rdi,%r14
lea    0xec6(%rip),%r15
xor    %ebx,%ebx
nopl   0x0(%rax)
movzbl (%r14,%rbx,1),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <printhex+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c"%02x\00"
define void @printhex(i8* nocapture %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %13, label %4
4: ; preds = %2, %4
%5 = phi i8* [ %8, %4 ], [ %0, %2 ]
%6 = phi i64 [ %7, %4 ], [ %1, %2 ]
%7 = add i64 %6, -1
%8 = getelementptr inbounds i8, i8* %5, i64 1
%9 = load i8, i8* %5
%10 = zext i8 %9 to i32
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = icmp eq i64 %7, 0
br i1 %12, label %13, label %4
13: ; preds = %4, %2
%14 = tail call i32 @putchar(i32 10)
ret void
}
double sum4(double a, double b, double c, double d) { return a + b + c + d; }


x86 assembly (clang, -O0):
<sum4>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
addsd  -0x20(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<sum4>:
addsd  %xmm1,%xmm0
addsd  %xmm2,%xmm0
addsd  %xmm3,%xmm0
ret

LLVM IR (-O0):
define double @sum4(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%9 = load double, double* %5
%10 = load double, double* %6
%11 = fadd double %9, %10
%12 = load double, double* %7
%13 = fadd double %11, %12
%14 = load double, double* %8
%15 = fadd double %13, %14
ret double %15
}

LLVM IR (-O2):
define double @sum4(double %0, double %1, double %2, double %3) {
%5 = fadd double %0, %1
%6 = fadd double %5, %2
%7 = fadd double %6, %3
ret double %7
}
__attribute__((vector_size(16))) int f1(__attribute__((vector_size(16))) int t,
                                        int a) {
  ((int *)&t)[1] = a;
  return t;
}


x86 assembly (clang, -O0):
<f1>:
push   %rbp
mov    %rsp,%rbp
movdqa %xmm0,-0x10(%rbp)
mov    %edi,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0xc(%rbp)
movdqa -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<f1>:
movd   %edi,%xmm1
punpcklqdq %xmm0,%xmm1
shufps $0xe2,%xmm0,%xmm1
movaps %xmm1,%xmm0
ret

LLVM IR (-O0):
define <4 x i32> @f1(<4 x i32> %0, i32 %1) {
%3 = alloca <4 x i32>
%4 = alloca i32
store <4 x i32> %0, <4 x i32>* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = bitcast <4 x i32>* %3 to i32*
%7 = getelementptr inbounds i32, i32* %6, i64 1
store i32 %5, i32* %7
%8 = load <4 x i32>, <4 x i32>* %3
ret <4 x i32> %8
}

LLVM IR (-O2):
define <4 x i32> @f1(<4 x i32> %0, i32 %1) {
%3 = insertelement <4 x i32> %0, i32 %1, i64 1
ret <4 x i32> %3
}
/* Variables and functions */
int /*<<< orphan*/ write_vtkFile(char const *, unsigned int, int *, double *,
                                 int *);
void writeVtkOutput(double *collideField, int *flagField, const char *filename,
                    unsigned int t, int *length) {
  write_vtkFile(filename, t, length, collideField, flagField);
}


x86 assembly (clang, -O0):
<writeVtkOutput>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    -0x28(%rbp),%rdx
mov    -0x8(%rbp),%rcx
mov    -0x10(%rbp),%r8
call   1030 <write_vtkFile@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writeVtkOutput>:
mov    %rsi,%r9
mov    %rdi,%rax
mov    %rdx,%rdi
mov    %ecx,%esi
mov    %r8,%rdx
mov    %rax,%rcx
mov    %r9,%r8
jmp    1030 <write_vtkFile@plt>

LLVM IR (-O0):
define void @writeVtkOutput(double* %0, i32* %1, i8* %2, i32 %3, i32* %4) {
%6 = alloca double*
%7 = alloca i32*
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i32*
store double* %0, double** %6
store i32* %1, i32** %7
store i8* %2, i8** %8
store i32 %3, i32* %9
store i32* %4, i32** %10
%11 = load i8*, i8** %8
%12 = load i32, i32* %9
%13 = load i32*, i32** %10
%14 = load double*, double** %6
%15 = load i32*, i32** %7
%16 = call i32 @write_vtkFile(i8* %11, i32 %12, i32* %13, double* %14, i32* %15)
ret void
}

LLVM IR (-O2):
define void @writeVtkOutput(double* %0, i32* %1, i8* %2, i32 %3, i32* %4) {
%6 = tail call i32 @write_vtkFile(i8* %2, i32 %3, i32* %4, double* %0, i32* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print(int *list, int len) {
  for (int i = 0; i < len; i++)
    printf("%d,", list[i]);
  printf("\n");
}


x86 assembly (clang, -O0):
<print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1159 <print+0x49>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <print+0x16>
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1157 <print+0x37>
mov    %rdi,%r15
mov    %esi,%r12d
lea    0xec7(%rip),%r14
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <print+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d,\00"
define void @print(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %8
6: ; preds = %8, %2
%7 = tail call i32 @putchar(i32 10)
ret void
8: ; preds = %4, %8
%9 = phi i64 [ 0, %4 ], [ %13, %8 ]
%10 = getelementptr inbounds i32, i32* %0, i64 %9
%11 = load i32, i32* %10
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = add nuw nsw i64 %9, 1
%14 = icmp eq i64 %13, %5
br i1 %14, label %6, label %8
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void ui_display_help(void) {
  fprintf(stderr,
          "\n"
          "This is a simple text-based math calculator.\n"
          "\n"
          "The commands are:\n"
          " h - Display this help message.\n"
          " q - Quit the program.\n"
          " m - Toggle Decimal and Hexadecimal mode.\n"
          "\n"
          "The supported operators are:\n"
          " + - Addition\n"
          " - - Subtraction\n"
          " * - Multiplication\n"
          " / - Division\n"
          " ^ - Exponentiation.  Right to left associative.  2^3^3 = 2^(3^3).\n"
          "\n"
          "Operators that are only supported for Hexadecimal are:\n"
          " & - Bitwise AND\n"
          " | - Bitwise OR\n"
          " x - Bitwise XOR\n"
          " ~ - Bitwise NOT (1's complement).  This is a UNARY operator.\n"
          "\n");
}


x86 assembly (clang, -O0):
<ui_display_help>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ui_display_help>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [494 x i8] c"\0AThis is a simple text-based math calculator.\0A\0AThe commands are:\0A h - Display this help message.\0A q - Quit the program.\0A m - Toggle Decimal and Hexadecimal mode.\0A\0AThe supported operators are:\0A + - Addition\0A - - Subtraction\0A * - Multiplication\0A / - Division\0A ^ - Exponentiation. Right to left associative. 2^3^3 = 2^(3^3).\0A\0AOperators that are only supported for Hexadecimal are:\0A & - Bitwise AND\0A | - Bitwise OR\0A x - Bitwise XOR\0A ~ - Bitwise NOT (1's complement). This is a UNARY operator.\0A\0A\00"
define void @ui_display_help() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([494 x i8], [494 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [494 x i8] c"\0AThis is a simple text-based math calculator.\0A\0AThe commands are:\0A h - Display this help message.\0A q - Quit the program.\0A m - Toggle Decimal and Hexadecimal mode.\0A\0AThe supported operators are:\0A + - Addition\0A - - Subtraction\0A * - Multiplication\0A / - Division\0A ^ - Exponentiation. Right to left associative. 2^3^3 = 2^(3^3).\0A\0AOperators that are only supported for Hexadecimal are:\0A & - Bitwise AND\0A | - Bitwise OR\0A x - Bitwise XOR\0A ~ - Bitwise NOT (1's complement). This is a UNARY operator.\0A\0A\00"
define void @ui_display_help() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([494 x i8], [494 x i8]* @.str, i64 0, i64 0))
ret void
}
int GetDistTime(unsigned int t1, unsigned int t2) {
  unsigned int l1 = t1 - t2;
  unsigned int l2 = t2 - t1;
  if (l2 > l1)
    return l1;
  else
    return l2;
}


x86 assembly (clang, -O0):
<GetDistTime>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
jbe    1133 <GetDistTime+0x33>
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1139 <GetDistTime+0x39>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetDistTime>:
mov    %edi,%eax
sub    %esi,%eax
sub    %edi,%esi
cmp    %eax,%esi
cmovbe %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @GetDistTime(i32 %0, i32 %1) {
%3 = sub i32 %0, %1
%4 = sub i32 %1, %0
%5 = icmp ugt i32 %4, %3
%6 = select i1 %5, i32 %3, i32 %4
ret i32 %6
}
/* Type definitions */
struct sockaddr_in {
  int dummy;
};
struct sockaddr {
  int dummy;
};
typedef int /*<<< orphan*/ socklen_t;
typedef int /*<<< orphan*/ cliente;

/* Variables and functions */
int accept(int, struct sockaddr *, int /*<<< orphan*/ *);
int aceptaConexion(int sockEscucha) {
  int ns;
  struct sockaddr_in cliente;
  int namelen;
  namelen = sizeof(cliente);
  ns = accept(sockEscucha, (struct sockaddr *)&cliente, (socklen_t *)&namelen);
  return ns;
}


x86 assembly (clang, -O0):
<aceptaConexion>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x4,-0x14(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x10(%rbp),%rsi
lea    -0x14(%rbp),%rdx
call   1030 <accept@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aceptaConexion>:
sub    $0x18,%rsp
movl   $0x4,0xc(%rsp)
lea    0x10(%rsp),%rsi
lea    0xc(%rsp),%rdx
call   1030 <accept@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.sockaddr_in = type { i32 }
%struct.sockaddr = type { i32 }
define i32 @aceptaConexion(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca %struct.sockaddr_in
%5 = alloca i32
store i32 %0, i32* %2
store i32 4, i32* %5
%6 = load i32, i32* %2
%7 = bitcast %struct.sockaddr_in* %4 to %struct.sockaddr*
%8 = call i32 @accept(i32 %6, %struct.sockaddr* %7, i32* %5)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
%struct.sockaddr_in = type { i32 }
%struct.sockaddr = type { i32 }
define i32 @aceptaConexion(i32 %0) {
%2 = alloca %struct.sockaddr_in
%3 = alloca i32
%4 = bitcast %struct.sockaddr_in* %2 to i8*
%5 = bitcast i32* %3 to i8*
store i32 4, i32* %3
%6 = bitcast %struct.sockaddr_in* %2 to %struct.sockaddr*
%7 = call i32 @accept(i32 %0, %struct.sockaddr* %6, i32* %3)
ret i32 %7
}
void YUY2ToI420() {}


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

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

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

LLVM IR (-O2):
define void @YUY2ToI420() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ clearScr();
int /*<<< orphan*/ mathFunc(double, double, double);
void runMath(double a, double b, double c) {
  clearScr();
  mathFunc(a, b, c);
}


x86 assembly (clang, -O0):
<runMath>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
mov    $0x0,%al
call   1040 <clearScr@plt>
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
call   1030 <mathFunc@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<runMath>:
sub    $0x18,%rsp
movsd  %xmm2,0x10(%rsp)
movsd  %xmm1,0x8(%rsp)
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   1040 <clearScr@plt>
movsd  (%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
movsd  0x10(%rsp),%xmm2
add    $0x18,%rsp
jmp    1030 <mathFunc@plt>

LLVM IR (-O0):
define void @runMath(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = call i32 (...) @clearScr()
%8 = load double, double* %4
%9 = load double, double* %5
%10 = load double, double* %6
%11 = call i32 @mathFunc(double %8, double %9, double %10)
ret void
}

LLVM IR (-O2):
define void @runMath(double %0, double %1, double %2) {
%4 = tail call i32 (...) @clearScr()
%5 = tail call i32 @mathFunc(double %0, double %1, double %2)
ret void
}
void x509_certificate_free(struct x509_certificate *cert) {}


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

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

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

LLVM IR (-O2):
%struct.x509_certificate = type opaque
define void @x509_certificate_free(%struct.x509_certificate* nocapture %0) {
ret void
}