xunge/DecIR huggingface dataset:
void RandomFunc(unsigned long input[1], unsigned long output[1]) {
  unsigned long state[1];
  unsigned long local1;
  {
    state[0UL] = input[0UL] + 0xffffffffff660b45UL;
    local1 = 0UL;
    while (local1 < 0UL) {
      state[local1] += state[local1];
      local1 += 2UL;
    }
    output[0UL] = state[0UL] + 809088178UL;
  }
}


x86 assembly (clang, -O0):
<RandomFunc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
add    $0xffffffffff660b45,%rax
mov    %rax,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jae    1158 <RandomFunc+0x58>
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp,%rax,8),%rcx
mov    -0x20(%rbp),%rax
add    -0x18(%rbp,%rax,8),%rcx
mov    %rcx,-0x18(%rbp,%rax,8)
mov    -0x20(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x20(%rbp)
jmp    1125 <RandomFunc+0x25>
mov    -0x18(%rbp),%rcx
add    $0x3039b4b2,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<RandomFunc>:
mov    $0x2f9fbff7,%eax
add    (%rdi),%rax
mov    %rax,(%rsi)
ret

LLVM IR (-O0):
define void @RandomFunc(i64* %0, i64* %1) {
%3 = alloca i64*
%4 = alloca i64*
%5 = alloca [1 x i64]
%6 = alloca i64
store i64* %0, i64** %3
store i64* %1, i64** %4
%7 = load i64*, i64** %3
%8 = getelementptr inbounds i64, i64* %7, i64 0
%9 = load i64, i64* %8
%10 = add i64 %9, -10089659
%11 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 0
store i64 %10, i64* %11
store i64 0, i64* %6
br label %12
12: ; preds = %15, %2
%13 = load i64, i64* %6
%14 = icmp ult i64 %13, 0
br i1 %14, label %15, label %25
15: ; preds = %12
%16 = load i64, i64* %6
%17 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 %16
%18 = load i64, i64* %17
%19 = load i64, i64* %6
%20 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 %19
%21 = load i64, i64* %20
%22 = add i64 %21, %18
store i64 %22, i64* %20
%23 = load i64, i64* %6
%24 = add i64 %23, 2
store i64 %24, i64* %6
br label %12
25: ; preds = %12
%26 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 0
%27 = load i64, i64* %26
%28 = add i64 %27, 809088178
%29 = load i64*, i64** %4
%30 = getelementptr inbounds i64, i64* %29, i64 0
store i64 %28, i64* %30
ret void
}

LLVM IR (-O2):
define void @RandomFunc(i64* nocapture %0, i64* nocapture writeonly %1) {
%3 = load i64, i64* %0
%4 = add i64 %3, 798998519
store i64 %4, i64* %1
ret void
}
/* Variables and functions */
int test_umorse_print();
int main(void) {
  int ret = 1;
  ret = test_umorse_print();
  return ret;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_umorse_print()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void *realloc(void *, size_t);
void *usbi_reallocf(void *ptr, size_t size) {
  void *ret = realloc(ptr, size);
  if (!ret)
    free(ptr);
  return ret;
}


x86 assembly (clang, -O0):
<usbi_reallocf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1155 <usbi_reallocf+0x35>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usbi_reallocf>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <realloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113c <usbi_reallocf+0x1c>
mov    %r14,%rdi
call   1030 <free@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @usbi_reallocf(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = call i8* @realloc(i8* %6, i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp ne i8* %9, null
br i1 %10, label %14, label %11
11: ; preds = %2
%12 = load i8*, i8** %3
%13 = call i32 @free(i8* %12)
br label %14
14: ; preds = %11, %2
%15 = load i8*, i8** %5
ret i8* %15
}

LLVM IR (-O2):
define noalias i8* @usbi_reallocf(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @free(i8* %0)
br label %7
7: ; preds = %5, %2
ret i8* %3
}
void os_setup_post(void) {}


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

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

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

LLVM IR (-O2):
define void @os_setup_post() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, void *);
int /*<<< orphan*/ stderr;
void rtpp_module_if_load_fin(void *pub) {
  fprintf(stderr,
          "Method rtpp_module_if@%p::load (rtpp_module_if_load) is invoked "
          "after destruction\x0a",
          pub);
  abort();
}


x86 assembly (clang, -O0):
<rtpp_module_if_load_fin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<rtpp_module_if_load_fin>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [83 x i8] c"Method rtpp_module_if@%p::load (rtpp_module_if_load) is invoked after destruction\0A\00"
define void @rtpp_module_if_load_fin(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([83 x i8], [83 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [83 x i8] c"Method rtpp_module_if@%p::load (rtpp_module_if_load) is invoked after destruction\0A\00"
define void @rtpp_module_if_load_fin(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([83 x i8], [83 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 (...) @abort()
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *fopen(char *, char *);
FILE *open_file(char *filename) {
  FILE *f;
  f = fopen(filename, "r");
  return f;
}


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

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

LLVM IR (-O0):
@.str = [2 x i8] c"r\00"
define i32* @open_file(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32* @fopen(i8* %4, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %5, i32** %3
%6 = load i32*, i32** %3
ret i32* %6
}

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
define noalias i32* @open_file(i8* nocapture %0) {
%2 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i32* %2
}
/* Variables and functions */
int f187(int *);
int f188(int *p) { return f187(p); }


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

x86 assembly (clang, -O2):
<f188>:
jmp    1030 <f187@plt>

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

LLVM IR (-O2):
define i32 @f188(i32* %0) {
%2 = tail call i32 @f187(i32* %0)
ret i32 %2
}
/* Variables and functions */
scalar_t__ RAND_MAX;
scalar_t__ rand();
float frandNorm(void) { return ((float)rand() / (float)RAND_MAX); }


x86 assembly (clang, -O0):
<frandNorm>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <rand@plt>
cvtsi2ss %rax,%xmm0
mov    0x2ec1(%rip),%rax
cvtsi2ssq (%rax),%xmm1
divss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<frandNorm>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
cvtsi2ss %rax,%xmm0
mov    0x2ec4(%rip),%rax
cvtsi2ssq (%rax),%xmm1
divss  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@RAND_MAX = global i64 0
define float @frandNorm() {
%1 = call i64 (...) @rand()
%2 = sitofp i64 %1 to float
%3 = load i64, i64* @RAND_MAX
%4 = sitofp i64 %3 to float
%5 = fdiv float %2, %4
ret float %5
}

LLVM IR (-O2):
@RAND_MAX = global i64 0
define float @frandNorm() {
%1 = tail call i64 (...) @rand()
%2 = sitofp i64 %1 to float
%3 = load i64, i64* @RAND_MAX
%4 = sitofp i64 %3 to float
%5 = fdiv float %2, %4
ret float %5
}
/* Variables and functions */
scalar_t__ OA_ISBAYER10(int);
scalar_t__ OA_ISBAYER16(int);
scalar_t__ OA_ISBAYER8(int);
int OA_ISBAYER(int x) {
  return OA_ISBAYER8(x) || OA_ISBAYER10(x) || OA_ISBAYER16(x);
}


x86 assembly (clang, -O0):
<OA_ISBAYER>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <OA_ISBAYER8@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
jne    1181 <OA_ISBAYER+0x51>
mov    -0x4(%rbp),%edi
call   1030 <OA_ISBAYER10@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
jne    1181 <OA_ISBAYER+0x51>
mov    -0x4(%rbp),%edi
call   1050 <OA_ISBAYER16@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<OA_ISBAYER>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
call   1040 <OA_ISBAYER8@plt>
mov    $0x1,%ebx
test   %rax,%rax
jne    115f <OA_ISBAYER+0x2f>
mov    %ebp,%edi
call   1030 <OA_ISBAYER10@plt>
test   %rax,%rax
jne    115f <OA_ISBAYER+0x2f>
mov    %ebp,%edi
call   1050 <OA_ISBAYER16@plt>
xor    %ebx,%ebx
test   %rax,%rax
setne  %bl
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @OA_ISBAYER(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @OA_ISBAYER8(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %14, label %6
6: ; preds = %1
%7 = load i32, i32* %2
%8 = call i64 @OA_ISBAYER10(i32 %7)
%9 = icmp ne i64 %8, 0
br i1 %9, label %14, label %10
10: ; preds = %6
%11 = load i32, i32* %2
%12 = call i64 @OA_ISBAYER16(i32 %11)
%13 = icmp ne i64 %12, 0
br label %14
14: ; preds = %10, %6, %1
%15 = phi i1 [ true, %6 ], [ true, %1 ], [ %13, %10 ]
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @OA_ISBAYER(i32 %0) {
%2 = tail call i64 @OA_ISBAYER8(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %11
4: ; preds = %1
%5 = tail call i64 @OA_ISBAYER10(i32 %0)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %4
%8 = tail call i64 @OA_ISBAYER16(i32 %0)
%9 = icmp ne i64 %8, 0
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %7, %4, %1
%12 = phi i32 [ 1, %4 ], [ 1, %1 ], [ %10, %7 ]
ret i32 %12
}
/* Variables and functions */
int g(int, int);
int f(int t, int c) {
  int d = 0;
  int e = 0;
  if (t) {
    d = t;
    if (c)
      e = 1;
  } else
    d = 0, e = 0;
  return g(d, e);
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1152 <f+0x42>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     114d <f+0x3d>
movl   $0x1,-0x10(%rbp)
jmp    1160 <f+0x50>
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
call   1030 <g@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
test   %edi,%edi
setne  %al
test   %esi,%esi
setne  %cl
and    %al,%cl
movzbl %cl,%esi
jmp    1030 <g@plt>

LLVM IR (-O0):
define i32 @f(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
store i32 0, i32* %6
%7 = load i32, i32* %3
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %15
9: ; preds = %2
%10 = load i32, i32* %3
store i32 %10, i32* %5
%11 = load i32, i32* %4
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %14
13: ; preds = %9
store i32 1, i32* %6
br label %14
14: ; preds = %13, %9
br label %16
15: ; preds = %2
store i32 0, i32* %5
store i32 0, i32* %6
br label %16
16: ; preds = %15, %14
%17 = load i32, i32* %5
%18 = load i32, i32* %6
%19 = call i32 @g(i32 %17, i32 %18)
ret i32 %19
}

LLVM IR (-O2):
define i32 @f(i32 %0, i32 %1) {
%3 = icmp ne i32 %0, 0
%4 = icmp ne i32 %1, 0
%5 = and i1 %3, %4
%6 = zext i1 %5 to i32
%7 = tail call i32 @g(i32 %0, i32 %6)
ret i32 %7
}
/* Type definitions */
struct navi_port {
  int dummy;
};

/* Variables and functions */
scalar_t__ navi_port_is_fold_case(struct navi_port *);
int tolower(int);
int handle_case(struct navi_port *port, int c) {
  return navi_port_is_fold_case(port) ? tolower(c) : c;
}


x86 assembly (clang, -O0):
<handle_case>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <navi_port_is_fold_case@plt>
cmp    $0x0,%rax
je     1152 <handle_case+0x32>
mov    -0xc(%rbp),%edi
call   1030 <tolower@plt>
mov    %eax,-0x10(%rbp)
jmp    1158 <handle_case+0x38>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<handle_case>:
push   %rbx
mov    %esi,%ebx
call   1040 <navi_port_is_fold_case@plt>
test   %rax,%rax
je     1135 <handle_case+0x15>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <tolower@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.navi_port = type { i32 }
define i32 @handle_case(%struct.navi_port* %0, i32 %1) {
%3 = alloca %struct.navi_port*
%4 = alloca i32
store %struct.navi_port* %0, %struct.navi_port** %3
store i32 %1, i32* %4
%5 = load %struct.navi_port*, %struct.navi_port** %3
%6 = call i64 @navi_port_is_fold_case(%struct.navi_port* %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load i32, i32* %4
%10 = call i32 @tolower(i32 %9)
br label %13
11: ; preds = %2
%12 = load i32, i32* %4
br label %13
13: ; preds = %11, %8
%14 = phi i32 [ %10, %8 ], [ %12, %11 ]
ret i32 %14
}

LLVM IR (-O2):
%struct.navi_port = type { i32 }
define i32 @handle_case(%struct.navi_port* %0, i32 %1) {
%3 = tail call i64 @navi_port_is_fold_case(%struct.navi_port* %0)
%4 = icmp eq i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @tolower(i32 %1)
br label %7
7: ; preds = %2, %5
%8 = phi i32 [ %6, %5 ], [ %1, %2 ]
ret i32 %8
}
const char *ajTaxinTypeGetFields(void) { return "id acc"; }


x86 assembly (clang, -O0):
<ajTaxinTypeGetFields>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ajTaxinTypeGetFields>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [7 x i8] c"id acc\00"
define i8* @ajTaxinTypeGetFields() {
ret i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [7 x i8] c"id acc\00"
define i8* @ajTaxinTypeGetFields() {
ret i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ Delay_ms(int);
int /*<<< orphan*/ UART1_Init(int);
int /*<<< orphan*/ UART1_Write(int);
int /*<<< orphan*/ UART1_Write_Text(char *);
void UART_Wired_init() {
  UART1_Init(115200);
  Delay_ms(100);
  UART1_Write_Text("Start FTDI Wired");
  UART1_Write(13);
  UART1_Write(10);
}


x86 assembly (clang, -O0):
<UART_Wired_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1c200,%edi
call   1040 <UART1_Init@plt>
mov    $0x64,%edi
call   1060 <Delay_ms@plt>
lea    0xea1(%rip),%rdi
call   1050 <UART1_Write_Text@plt>
mov    $0xd,%edi
call   1030 <UART1_Write@plt>
mov    $0xa,%edi
call   1030 <UART1_Write@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<UART_Wired_init>:
push   %rax
mov    $0x1c200,%edi
call   1040 <UART1_Init@plt>
mov    $0x64,%edi
call   1060 <Delay_ms@plt>
lea    0xea4(%rip),%rdi
call   1050 <UART1_Write_Text@plt>
mov    $0xd,%edi
call   1030 <UART1_Write@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <UART1_Write@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"Start FTDI Wired\00"
define void @UART_Wired_init() {
%1 = call i32 @UART1_Init(i32 115200)
%2 = call i32 @Delay_ms(i32 100)
%3 = call i32 @UART1_Write_Text(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @UART1_Write(i32 13)
%5 = call i32 @UART1_Write(i32 10)
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"Start FTDI Wired\00"
define void @UART_Wired_init() {
%1 = tail call i32 @UART1_Init(i32 115200)
%2 = tail call i32 @Delay_ms(i32 100)
%3 = tail call i32 @UART1_Write_Text(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @UART1_Write(i32 13)
%5 = tail call i32 @UART1_Write(i32 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memcmp(char *, char *, int);
int strlen(char *);
int _normalize_name(char *name) {
  int name_len = strlen(name);
  if (name_len >= 4 && !memcmp(name + name_len - 4, ".idx", 4)) {
    name_len -= 4;
  }
  return name_len;
}


x86 assembly (clang, -O0):
<_normalize_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x4,-0xc(%rbp)
jl     1174 <_normalize_name+0x54>
mov    -0x8(%rbp),%rdi
movslq -0xc(%rbp),%rax
add    %rax,%rdi
add    $0xfffffffffffffffc,%rdi
lea    0xea8(%rip),%rsi
mov    $0x4,%edx
call   1040 <memcmp@plt>
cmp    $0x0,%eax
jne    1174 <_normalize_name+0x54>
mov    -0xc(%rbp),%eax
sub    $0x4,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_normalize_name>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1030 <strlen@plt>
mov    %eax,%ebx
cmp    $0x4,%eax
jl     1158 <_normalize_name+0x38>
mov    %ebx,%eax
lea    (%r14,%rax,1),%rdi
add    $0xfffffffffffffffc,%rdi
lea    0xebc(%rip),%rsi
mov    $0x4,%edx
call   1040 <memcmp@plt>
lea    -0x4(%rbx),%ecx
test   %eax,%eax
cmovne %ebx,%ecx
mov    %ecx,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c".idx\00"
define i32 @_normalize_name(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = icmp sgt i32 %2, 3
br i1 %3, label %4, label %12
4: ; preds = %1
%5 = zext i32 %2 to i64
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = getelementptr inbounds i8, i8* %6, i64 -4
%8 = tail call i32 @memcmp(i8* %7, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 4)
%9 = icmp eq i32 %8, 0
%10 = add nsw i32 %2, -4
%11 = select i1 %9, i32 %10, i32 %2
br label %12
12: ; preds = %4, %1
%13 = phi i32 [ %2, %1 ], [ %11, %4 ]
ret i32 %13
}
void incrementageCoups(int *pointeurCoupsRestants, int *pointeurCompteurCoups) {
  *pointeurCoupsRestants--;
  *pointeurCompteurCoups++;
}


x86 assembly (clang, -O0):
<incrementageCoups>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0xfffffffffffffffc,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x10(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @incrementageCoups(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 = getelementptr inbounds i32, i32* %5, i32 -1
store i32* %6, i32** %3
%7 = load i32, i32* %5
%8 = load i32*, i32** %4
%9 = getelementptr inbounds i32, i32* %8, i32 1
store i32* %9, i32** %4
%10 = load i32, i32* %8
ret void
}

LLVM IR (-O2):
define void @incrementageCoups(i32* nocapture %0, i32* nocapture %1) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ cwd;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ *getcwd(char *, int);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ stdout;
void printOutWorkingDirFromC() {
  char cwd[1024];
  if (getcwd(cwd, sizeof(cwd)) != NULL)
    fprintf(stdout, "Current working directory: %s \n", cwd);
  else
    perror("getcwd() error");
}


x86 assembly (clang, -O0):
<printOutWorkingDirFromC>:
push   %rbp
mov    %rsp,%rbp
sub    $0x400,%rsp
lea    -0x400(%rbp),%rdi
mov    $0x400,%esi
call   1030 <getcwd@plt>
cmp    $0x0,%rax
je     1177 <printOutWorkingDirFromC+0x47>
mov    0x2e83(%rip),%rax
mov    (%rax),%edi
lea    -0x400(%rbp),%rdx
lea    0xe93(%rip),%rsi
call   1040 <fprintf@plt>
jmp    1183 <printOutWorkingDirFromC+0x53>
lea    0xea2(%rip),%rdi
call   1050 <perror@plt>
add    $0x400,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printOutWorkingDirFromC>:
sub    $0x408,%rsp
mov    %rsp,%rdi
mov    $0x400,%esi
call   1030 <getcwd@plt>
test   %rax,%rax
je     1169 <printOutWorkingDirFromC+0x39>
mov    0x2e90(%rip),%rax
mov    (%rax),%edi
lea    0xea7(%rip),%rsi
mov    %rsp,%rdx
call   1040 <fprintf@plt>
add    $0x408,%rsp
ret
lea    0xeb0(%rip),%rdi
call   1050 <perror@plt>
add    $0x408,%rsp
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [32 x i8] c"Current working directory: %s \0A\00"
@.str.1 = [15 x i8] c"getcwd() error\00"
define void @printOutWorkingDirFromC() {
%1 = alloca [1024 x i8]
%2 = getelementptr inbounds [1024 x i8], [1024 x i8]* %1, i64 0, i64 0
%3 = call i32* @getcwd(i8* %2, i32 1024)
%4 = icmp ne i32* %3, null
br i1 %4, label %5, label %9
5: ; preds = %0
%6 = load i32, i32* @stdout
%7 = getelementptr inbounds [1024 x i8], [1024 x i8]* %1, i64 0, i64 0
%8 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %7)
br label %11
9: ; preds = %0
%10 = call i32 @perror(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
br label %11
11: ; preds = %9, %5
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [32 x i8] c"Current working directory: %s \0A\00"
@.str.1 = [15 x i8] c"getcwd() error\00"
define void @printOutWorkingDirFromC() {
%1 = alloca [1024 x i8]
%2 = getelementptr inbounds [1024 x i8], [1024 x i8]* %1, i64 0, i64 0
%3 = call i32* @getcwd(i8* %2, i32 1024)
%4 = icmp eq i32* %3, null
br i1 %4, label %8, label %5
5: ; preds = %0
%6 = load i32, i32* @stdout
%7 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %2)
br label %10
8: ; preds = %0
%9 = call i32 @perror(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
br label %10
10: ; preds = %8, %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int back_list(__attribute__((__unused__)) int argc,
              __attribute__((__unused__)) char **argv) {
  fprintf(stderr, "[BACK] "
                  "error"
                  ": "
                  "subcommand 'list' not yet implemented"
                  "\n");
  return -1;
}


x86 assembly (clang, -O0):
<back_list>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%edi
lea    0xed1(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<back_list>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [53 x i8] c"[BACK] error: subcommand 'list' not yet implemented\0A\00"
define i32 @back_list(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* @stderr
%6 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0))
ret i32 -1
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [53 x i8] c"[BACK] error: subcommand 'list' not yet implemented\0A\00"
define i32 @back_list(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0))
ret i32 -1
}
/* Variables and functions */
double PRand(double *, long *);
int Accept(double BF_old, double BF_new, double *randoms,
           long int *currentRandom) {
  if (PRand(randoms, currentRandom) < (BF_new / BF_old)) {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<Accept>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x28(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   1030 <PRand@plt>
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    115a <Accept+0x4a>
movl   $0x1,-0x4(%rbp)
jmp    1161 <Accept+0x51>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Accept>:
sub    $0x18,%rsp
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
call   1030 <PRand@plt>
movsd  0x10(%rsp),%xmm1
divsd  0x8(%rsp),%xmm1
xor    %eax,%eax
ucomisd %xmm0,%xmm1
seta   %al
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @Accept(double %0, double %1, double* %2, i64* %3) {
%5 = alloca i32
%6 = alloca double
%7 = alloca double
%8 = alloca double*
%9 = alloca i64*
store double %0, double* %6
store double %1, double* %7
store double* %2, double** %8
store i64* %3, i64** %9
%10 = load double*, double** %8
%11 = load i64*, i64** %9
%12 = call double @PRand(double* %10, i64* %11)
%13 = load double, double* %7
%14 = load double, double* %6
%15 = fdiv double %13, %14
%16 = fcmp olt double %12, %15
br i1 %16, label %17, label %18
17: ; preds = %4
store i32 1, i32* %5
br label %19
18: ; preds = %4
store i32 0, i32* %5
br label %19
19: ; preds = %18, %17
%20 = load i32, i32* %5
ret i32 %20
}

LLVM IR (-O2):
define i32 @Accept(double %0, double %1, double* %2, i64* %3) {
%5 = tail call double @PRand(double* %2, i64* %3)
%6 = fdiv double %1, %0
%7 = fcmp olt double %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("See errno.c for information about using perror.\n");
  perror("Error");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
lea    0xefa(%rip),%rdi
call   1040 <perror@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [49 x i8] c"See errno.c for information about using perror.\0A\00"
@.str.1 = [6 x i8] c"Error\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [6 x i8] c"Error\00"
@str = [48 x i8] c"See errno.c for information about using perror.\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
void glMatrixMode(int a) {}


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

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

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

LLVM IR (-O2):
define void @glMatrixMode(i32 %0) {
ret void
}
/* Type definitions */
struct termio {
  int c_lflag;
};

/* Variables and functions */
int ECHO;
int /*<<< orphan*/ TCGETA;
int /*<<< orphan*/ ioctl(int /*<<< orphan*/, int /*<<< orphan*/,
                         struct termio *);
int /*<<< orphan*/ write(int, char *, int);
void hacer_eco(char c) {
  struct termio tm;
  ioctl(0, TCGETA, &tm);
  if (tm.c_lflag & ECHO)
    write(1, &c, 1);
}


x86 assembly (clang, -O0):
<hacer_eco>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    0x2eb3(%rip),%rax
mov    (%rax),%esi
xor    %edi,%edi
lea    -0x8(%rbp),%rdx
call   1040 <ioctl@plt>
mov    -0x8(%rbp),%eax
mov    0x2e94(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
je     1167 <hacer_eco+0x47>
mov    $0x1,%edx
lea    -0x1(%rbp),%rsi
mov    %edx,%edi
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hacer_eco>:
sub    $0x18,%rsp
mov    %dil,0xf(%rsp)
mov    0x2eb8(%rip),%rax
mov    (%rax),%esi
lea    0x10(%rsp),%rdx
xor    %edi,%edi
call   1040 <ioctl@plt>
mov    0x2e9b(%rip),%rax
mov    (%rax),%eax
test   %eax,0x10(%rsp)
je     1161 <hacer_eco+0x41>
lea    0xf(%rsp),%rsi
mov    $0x1,%edi
mov    $0x1,%edx
call   1030 <write@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.termio = type { i32 }
@TCGETA = global i32 0
@ECHO = global i32 0
define void @hacer_eco(i8 signext %0) {
%2 = alloca i8
%3 = alloca %struct.termio
store i8 %0, i8* %2
%4 = load i32, i32* @TCGETA
%5 = call i32 @ioctl(i32 0, i32 %4, %struct.termio* %3)
%6 = getelementptr inbounds %struct.termio, %struct.termio* %3, i32 0, i32 0
%7 = load i32, i32* %6
%8 = load i32, i32* @ECHO
%9 = and i32 %7, %8
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %1
%12 = call i32 @write(i32 1, i8* %2, i32 1)
br label %13
13: ; preds = %11, %1
ret void
}

LLVM IR (-O2):
%struct.termio = type { i32 }
@TCGETA = global i32 0
@ECHO = global i32 0
define void @hacer_eco(i8 signext %0) {
%2 = alloca i8
%3 = alloca %struct.termio
store i8 %0, i8* %2
%4 = bitcast %struct.termio* %3 to i8*
%5 = load i32, i32* @TCGETA
%6 = call i32 @ioctl(i32 0, i32 %5, %struct.termio* %3)
%7 = getelementptr inbounds %struct.termio, %struct.termio* %3, i64 0, i32 0
%8 = load i32, i32* %7
%9 = load i32, i32* @ECHO
%10 = and i32 %9, %8
%11 = icmp eq i32 %10, 0
br i1 %11, label %14, label %12
12: ; preds = %1
%13 = call i32 @write(i32 1, i8* %2, i32 1)
br label %14
14: ; preds = %12, %1
ret void
}
/* Variables and functions */
unsigned int mk_rnd_ipv4(int);
unsigned int mk_rnd_asian_ipv4(void) { return mk_rnd_ipv4(202); }


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

x86 assembly (clang, -O2):
<mk_rnd_asian_ipv4>:
mov    $0xca,%edi
jmp    1030 <mk_rnd_ipv4@plt>

LLVM IR (-O0):
define i32 @mk_rnd_asian_ipv4() {
%1 = call i32 @mk_rnd_ipv4(i32 202)
ret i32 %1
}

LLVM IR (-O2):
define i32 @mk_rnd_asian_ipv4() {
%1 = tail call i32 @mk_rnd_ipv4(i32 202)
ret i32 %1
}
void nop() { __asm volatile("nop\n\t" : :); }


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

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

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

LLVM IR (-O2):
define void @nop() {
tail call void asm sideeffect "nop\0A\09", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strcmp(char *, char *);
int line_equal(unsigned hash1, char *s1, unsigned hash2, char *s2) {
  return hash1 == hash2 && !strcmp(s1, s2);
}


x86 assembly (clang, -O0):
<line_equal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x4(%rbp),%ecx
xor    %eax,%eax
cmp    -0x14(%rbp),%ecx
mov    %al,-0x21(%rbp)
jne    114f <line_equal+0x3f>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x21(%rbp)
mov    -0x21(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<line_equal>:
xor    %eax,%eax
cmp    %edx,%edi
jne    112f <line_equal+0x1f>
push   %rax
mov    %rsi,%rdi
mov    %rcx,%rsi
call   1030 <strcmp@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
sete   %al
add    $0x8,%rsp
ret

LLVM IR (-O0):
define i32 @line_equal(i32 %0, i8* %1, i32 %2, i8* %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
store i32 %0, i32* %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i8* %3, i8** %8
%9 = load i32, i32* %5
%10 = load i32, i32* %7
%11 = icmp eq i32 %9, %10
br i1 %11, label %12, label %18
12: ; preds = %4
%13 = load i8*, i8** %6
%14 = load i8*, i8** %8
%15 = call i32 @strcmp(i8* %13, i8* %14)
%16 = icmp ne i32 %15, 0
%17 = xor i1 %16, true
br label %18
18: ; preds = %12, %4
%19 = phi i1 [ false, %4 ], [ %17, %12 ]
%20 = zext i1 %19 to i32
ret i32 %20
}

LLVM IR (-O2):
define i32 @line_equal(i32 %0, i8* nocapture %1, i32 %2, i8* nocapture %3) {
%5 = icmp eq i32 %0, %2
br i1 %5, label %6, label %10
6: ; preds = %4
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %1, i8* dereferenceable(1) %3)
%8 = icmp eq i32 %7, 0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %6, %4
%11 = phi i32 [ 0, %4 ], [ %9, %6 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ STDOUT_FILENO;
int /*<<< orphan*/ xwrite(int /*<<< orphan*/, char *, int);
void my_putchar(char c) { xwrite(STDOUT_FILENO, &c, 1); }


x86 assembly (clang, -O0):
<my_putchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    0x2ecb(%rip),%rax
mov    (%rax),%edi
lea    -0x1(%rbp),%rsi
mov    $0x1,%edx
call   1030 <xwrite@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_putchar>:
push   %rax
mov    %dil,0x7(%rsp)
mov    0x2ed3(%rip),%rax
mov    (%rax),%edi
lea    0x7(%rsp),%rsi
mov    $0x1,%edx
call   1030 <xwrite@plt>
pop    %rax
ret

LLVM IR (-O0):
@STDOUT_FILENO = global i32 0
define void @my_putchar(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i32, i32* @STDOUT_FILENO
%4 = call i32 @xwrite(i32 %3, i8* %2, i32 1)
ret void
}

LLVM IR (-O2):
@STDOUT_FILENO = global i32 0
define void @my_putchar(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i32, i32* @STDOUT_FILENO
%4 = call i32 @xwrite(i32 %3, i8* %2, i32 1)
ret void
}
OP(fd, b9) {
  illegal_1();
  op_b9();
}


x86 assembly (clang, -O0):
<OP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1030 <illegal_1@plt>
mov    $0x0,%al
call   1040 <op_b9@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<OP>:
push   %rax
xor    %eax,%eax
call   1030 <illegal_1@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <op_b9@plt>

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

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @illegal_1()
%4 = tail call i32 (...) @op_b9()
ret i32 undef
}
int test_imm_C4int64_lowword_mem(long long *val) {
  return ((*val) & (0xC4 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_C4int64_lowword_mem>:
testb  $0xc4,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_C4int64_lowword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = and i64 %4, 196
%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_C4int64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 196
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
float Sleef_tgammaf_u10(float x) { return __builtin_tgammaf(x); }


x86 assembly (clang, -O0):
<Sleef_tgammaf_u10>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <tgammaf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Sleef_tgammaf_u10>:
jmp    1030 <tgammaf@plt>

LLVM IR (-O0):
define float @Sleef_tgammaf_u10(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @tgammaf(float %3)
ret float %4
}

LLVM IR (-O2):
define float @Sleef_tgammaf_u10(float %0) {
%2 = tail call float @tgammaf(float %0)
ret float %2
}
int offset(char row, char col) { return 2 * (col + (80 * row)); }


x86 assembly (clang, -O0):
<offset>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
movsbl -0x1(%rbp),%ecx
imul   $0x50,%ecx,%ecx
add    %ecx,%eax
shl    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<offset>:
lea    (%rdi,%rdi,4),%eax
shl    $0x4,%eax
add    %esi,%eax
add    %eax,%eax
ret

LLVM IR (-O0):
define i32 @offset(i8 signext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = load i8, i8* %3
%8 = sext i8 %7 to i32
%9 = mul nsw i32 80, %8
%10 = add nsw i32 %6, %9
%11 = mul nsw i32 2, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @offset(i8 signext %0, i8 signext %1) {
%3 = sext i8 %1 to i32
%4 = sext i8 %0 to i32
%5 = mul nsw i32 %4, 80
%6 = add nsw i32 %5, %3
%7 = shl nsw i32 %6, 1
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ cpm_free(char *);
void freepath(int n, char **Pathlist) {
  if (n) {
    while (n)
      cpm_free(Pathlist[--n]);
  }
}


x86 assembly (clang, -O0):
<freepath>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     115b <freepath+0x4b>
jmp    112e <freepath+0x1e>
cmpl   $0x0,-0x4(%rbp)
je     1156 <freepath+0x46>
mov    -0x10(%rbp),%rax
mov    -0x4(%rbp),%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x4(%rbp)
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <cpm_free@plt>
jmp    112e <freepath+0x1e>
jmp    115b <freepath+0x4b>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<freepath>:
push   %r15
push   %r14
push   %rbx
test   %edi,%edi
je     1142 <freepath+0x32>
mov    %edi,%r14d
movslq %edi,%rax
neg    %r14d
lea    (%rsi,%rax,8),%r15
add    $0xfffffffffffffff8,%r15
xor    %ebx,%ebx
nopl   0x0(%rax)
mov    (%r15,%rbx,8),%rdi
call   1030 <cpm_free@plt>
add    $0xffffffffffffffff,%rbx
cmp    %ebx,%r14d
jne    1130 <freepath+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @freepath(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %14, label %4
4: ; preds = %2
%5 = sext i32 %0 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ %5, %4 ], [ %8, %6 ]
%8 = add nsw i64 %7, -1
%9 = getelementptr inbounds i8*, i8** %1, i64 %8
%10 = load i8*, i8** %9
%11 = tail call i32 @cpm_free(i8* %10)
%12 = trunc i64 %8 to i32
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %6
14: ; preds = %6, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int, int, int, int);
int test_callfunc5(char *dest, int n_args, int a1, int a2, int a3) {
  sprintf(dest, "%d %d %d %d", n_args, a1, a2, a3);
  return n_args;
}


x86 assembly (clang, -O0):
<test_callfunc5>:
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    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x14(%rbp),%r8d
mov    -0x18(%rbp),%r9d
lea    0xebe(%rip),%rsi
call   1030 <sprintf@plt>
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_callfunc5>:
push   %rbx
mov    %r8d,%r9d
mov    %ecx,%r8d
mov    %edx,%ecx
mov    %esi,%ebx
lea    0xede(%rip),%rsi
mov    %ebx,%edx
call   1030 <sprintf@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"%d %d %d %d\00"
define i32 @test_callfunc5(i8* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i8* %0, i8** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load i8*, i8** %6
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = load i32, i32* %9
%15 = load i32, i32* %10
%16 = call i32 @sprintf(i8* %11, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %12, i32 %13, i32 %14, i32 %15)
%17 = load i32, i32* %7
ret i32 %17
}

LLVM IR (-O2):
@.str = [12 x i8] c"%d %d %d %d\00"
define i32 @test_callfunc5(i8* nocapture writeonly %0, i32 returned %1, i32 %2, i32 %3, i32 %4) {
%6 = tail call i32 @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %2, i32 %3, i32 %4)
ret i32 %1
}
float l_to_gal(float value) { return value * 0.2641720524f; }


x86 assembly (clang, -O0):
<l_to_gal>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xeef(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<l_to_gal>:
mulss  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define float @l_to_gal(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fmul float %3, 0x3FD0E831E0000000
ret float %4
}

LLVM IR (-O2):
define float @l_to_gal(float %0) {
%2 = fmul float %0, 0x3FD0E831E0000000
ret float %2
}
/* Variables and functions */
int hiddenFunction();
int bobMcBob(void) { return hiddenFunction(); }


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

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

LLVM IR (-O0):
define i32 @bobMcBob() {
%1 = call i32 (...) @hiddenFunction()
ret i32 %1
}

LLVM IR (-O2):
define i32 @bobMcBob() {
%1 = tail call i32 (...) @hiddenFunction()
ret i32 %1
}
/* Type definitions */
typedef int int8_t;

/* Variables and functions */
bool SHAREMIND_MAP_KEY_COPY_int8_t(int8_t *const dest, int8_t const src) {
  return (((*dest) = src), true);
}


x86 assembly (clang, -O0):
<SHAREMIND_MAP_KEY_COPY_int8_t>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    $0x1,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @SHAREMIND_MAP_KEY_COPY_int8_t(i32* nocapture writeonly %0, i32 %1) {
store i32 %1, i32* %0
ret i32 1
}
/* Variables and functions */
scalar_t__ strverscmp(char const *, char *);
const char *asn1_check_version(const char *req_version) {
  if (!req_version || strverscmp(req_version, "2.12") <= 0)
    return "2.12";
  return NULL;
}


x86 assembly (clang, -O0):
<asn1_check_version>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1141 <asn1_check_version+0x31>
mov    -0x10(%rbp),%rdi
lea    0xece(%rip),%rsi
call   1030 <strverscmp@plt>
cmp    $0x0,%rax
jg     1151 <asn1_check_version+0x41>
lea    0xeb8(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1159 <asn1_check_version+0x49>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<asn1_check_version>:
test   %rdi,%rdi
je     1133 <asn1_check_version+0x23>
push   %rbx
lea    0xee3(%rip),%rbx
mov    %rbx,%rsi
call   1030 <strverscmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
cmovle %rbx,%rax
pop    %rbx
ret
lea    0xec6(%rip),%rax
ret

LLVM IR (-O0):
@.str = [5 x i8] c"2.12\00"
define i8* @asn1_check_version(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = icmp ne i8* %4, null
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8*, i8** %3
%8 = call i64 @strverscmp(i8* %7, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%9 = icmp sle i64 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %6, %1
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8** %2
br label %12
11: ; preds = %6
store i8* null, i8** %2
br label %12
12: ; preds = %11, %10
%13 = load i8*, i8** %2
ret i8* %13
}

LLVM IR (-O2):
@.str = [5 x i8] c"2.12\00"
define i8* @asn1_check_version(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = tail call i64 @strverscmp(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%5 = icmp slt i64 %4, 1
%6 = select i1 %5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* null
br label %7
7: ; preds = %3, %1
%8 = phi i8* [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), %1 ], [ %6, %3 ]
ret i8* %8
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int /*<<< orphan*/ LOG_DEBUG;
int /*<<< orphan*/ yap_print(int, int /*<<< orphan*/, char const *,
                             int /*<<< orphan*/);
void yap_va(const char *fmt, va_list ap) { yap_print(4, LOG_DEBUG, fmt, ap); }


x86 assembly (clang, -O0):
<yap_va>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%rdx
mov    -0xc(%rbp),%ecx
mov    $0x4,%edi
call   1030 <yap_print@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yap_va>:
mov    %esi,%ecx
mov    %rdi,%rdx
mov    0x2ec4(%rip),%rax
mov    (%rax),%esi
mov    $0x4,%edi
jmp    1030 <yap_print@plt>

LLVM IR (-O0):
@LOG_DEBUG = global i32 0
define void @yap_va(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @LOG_DEBUG
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = call i32 @yap_print(i32 4, i32 %5, i8* %6, i32 %7)
ret void
}

LLVM IR (-O2):
@LOG_DEBUG = global i32 0
define void @yap_va(i8* %0, i32 %1) {
%3 = load i32, i32* @LOG_DEBUG
%4 = tail call i32 @yap_print(i32 4, i32 %3, i8* %0, i32 %1)
ret void
}