xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ assign_centroids_multi(double *, double *, int *, int, int,
                                          int, int);
void assign_centroids(double *data, double *centroids, int *assignments, int k,
                      int N, int D) {
  assign_centroids_multi(data, centroids, assignments, 1, k, N, D);
}


x86 assembly (clang, -O0):
<assign_centroids>:
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    %r8d,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%r8d
mov    -0x20(%rbp),%r9d
mov    -0x24(%rbp),%eax
mov    $0x1,%ecx
mov    %eax,(%rsp)
call   1030 <assign_centroids_multi@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<assign_centroids>:
push   %rax
mov    %r8d,%eax
mov    %ecx,%r8d
mov    %r9d,(%rsp)
mov    $0x1,%ecx
mov    %eax,%r9d
call   1030 <assign_centroids_multi@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @assign_centroids(double* %0, double* %1, i32* %2, i32 %3, i32 %4, i32 %5) {
%7 = tail call i32 @assign_centroids_multi(double* %0, double* %1, i32* %2, i32 1, i32 %3, i32 %4, i32 %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ endwin();
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ getmaxyx(int /*<<< orphan*/, int, int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdscr;
void checkTerminalSize() {
  int maxy, maxx;
  getmaxyx(stdscr, maxy, maxx);
  if (maxy < 25 || maxx < 58) {
    endwin();
    printf("\nTerminal window too small! Please enlarge.\n\n");
    exit(1);
  }
}


x86 assembly (clang, -O0):
<checkTerminalSize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
call   1040 <getmaxyx@plt>
cmpl   $0x19,-0x4(%rbp)
jl     1170 <checkTerminalSize+0x30>
cmpl   $0x3a,-0x8(%rbp)
jge    118d <checkTerminalSize+0x4d>
mov    $0x0,%al
call   1050 <endwin@plt>
lea    0xe82(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1060 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checkTerminalSize>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
jmp    1030 <getmaxyx@plt>

LLVM IR (-O0):
@stdscr = global i32 0
@.str = [46 x i8] c"\0ATerminal window too small! Please enlarge.\0A\0A\00"
define void @checkTerminalSize() {
%1 = alloca i32
%2 = alloca i32
%3 = load i32, i32* @stdscr
%4 = load i32, i32* %1
%5 = load i32, i32* %2
%6 = call i32 @getmaxyx(i32 %3, i32 %4, i32 %5)
%7 = load i32, i32* %1
%8 = icmp slt i32 %7, 25
br i1 %8, label %12, label %9
9: ; preds = %0
%10 = load i32, i32* %2
%11 = icmp slt i32 %10, 58
br i1 %11, label %12, label %16
12: ; preds = %9, %0
%13 = call i32 (...) @endwin()
%14 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%15 = call i32 @exit(i32 1)
unreachable
16: ; preds = %9
ret void
}

LLVM IR (-O2):
@stdscr = global i32 0
define void @checkTerminalSize() {
%1 = load i32, i32* @stdscr
%2 = tail call i32 @getmaxyx(i32 %1, i32 undef, i32 undef)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
int /*<<< orphan*/ _Time(int /*<<< orphan*/ *);
time_t _time(time_t *tod) {
  time_t t = _Time(NULL);
  if (tod)
    *tod = t;
  return (t);
}


x86 assembly (clang, -O0):
<_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1030 <_Time@plt>
mov    %eax,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     113c <_time+0x2c>
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_time>:
push   %rbx
mov    %rdi,%rbx
xor    %edi,%edi
call   1030 <_Time@plt>
test   %rbx,%rbx
je     1122 <_time+0x12>
mov    %eax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define i32 @_time(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = call i32 @_Time(i32* null)
store i32 %4, i32* %3
%5 = load i32*, i32** %2
%6 = icmp ne i32* %5, null
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i32, i32* %3
%9 = load i32*, i32** %2
store i32 %8, i32* %9
br label %10
10: ; preds = %7, %1
%11 = load i32, i32* %3
ret i32 %11
}

LLVM IR (-O2):
define i32 @_time(i32* writeonly %0) {
%2 = tail call i32 @_Time(i32* null)
%3 = icmp eq i32* %0, null
br i1 %3, label %5, label %4
4: ; preds = %1
store i32 %2, i32* %0
br label %5
5: ; preds = %4, %1
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0x18() {
  Assert_real((islower(24) == 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",
              125, ("islower should be 0 for 0x18"));
}


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

x86 assembly (clang, -O2):
<t_islower_0x18>:
push   %rax
mov    $0x18,%edi
call   1030 <islower@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x7d,%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 = [29 x i8] c"islower should be 0 for 0x18\00"
define void @t_islower_0x18() {
%1 = call i64 @islower(i32 24)
%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 125, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0x18\00"
define void @t_islower_0x18() {
%1 = tail call i64 @islower(i32 24)
%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 125, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *, float const, float const,
                          float const, float const);
void v4print(const char *msg, const float *v) {
  printf("v4: %s = [ %f, %f, %f, %f ]\n", msg, v[0], v[1], v[2], v[3]);
}


x86 assembly (clang, -O0):
<v4print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm1
mov    -0x10(%rbp),%rax
movss  0x8(%rax),%xmm2
mov    -0x10(%rbp),%rax
movss  0xc(%rax),%xmm3
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<v4print>:
mov    %rdi,%rax
movss  (%rsi),%xmm0
movss  0x4(%rsi),%xmm1
movss  0x8(%rsi),%xmm2
movss  0xc(%rsi),%xmm3
lea    0xed3(%rip),%rdi
mov    %rax,%rsi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [29 x i8] c"v4: %s = [ %f, %f, %f, %f ]\0A\00"
define void @v4print(i8* %0, float* %1) {
%3 = alloca i8*
%4 = alloca float*
store i8* %0, i8** %3
store float* %1, float** %4
%5 = load i8*, i8** %3
%6 = load float*, float** %4
%7 = getelementptr inbounds float, float* %6, i64 0
%8 = load float, float* %7
%9 = load float*, float** %4
%10 = getelementptr inbounds float, float* %9, i64 1
%11 = load float, float* %10
%12 = load float*, float** %4
%13 = getelementptr inbounds float, float* %12, i64 2
%14 = load float, float* %13
%15 = load float*, float** %4
%16 = getelementptr inbounds float, float* %15, i64 3
%17 = load float, float* %16
%18 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %5, float %8, float %11, float %14, float %17)
ret void
}

LLVM IR (-O2):
@.str = [29 x i8] c"v4: %s = [ %f, %f, %f, %f ]\0A\00"
define void @v4print(i8* %0, float* nocapture %1) {
%3 = load float, float* %1
%4 = getelementptr inbounds float, float* %1, i64 1
%5 = load float, float* %4
%6 = getelementptr inbounds float, float* %1, i64 2
%7 = load float, float* %6
%8 = getelementptr inbounds float, float* %1, i64 3
%9 = load float, float* %8
%10 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %0, float %3, float %5, float %7, float %9)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
unsigned int fetch_int();
int /*<<< orphan*/ fetch_skip(int);
int /*<<< orphan*/ logprintf(char *, unsigned int);
void fetch_skip_message_action_encrypted(void) {
  unsigned x = fetch_int();
  switch (x) {
  case 0xa1733aec:
    fetch_skip(1);
    break;
  default:
    logprintf("x = 0x%08x\n", x);
    assert(0);
  }
}


x86 assembly (clang, -O0):
<fetch_skip_message_action_encrypted>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %eax,%eax
call   1040 <fetch_int@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0xa1733aec,%eax
jne    1174 <fetch_skip_message_action_encrypted+0x34>
jmp    1165 <fetch_skip_message_action_encrypted+0x25>
mov    $0x1,%edi
call   1030 <fetch_skip@plt>
jmp    118a <fetch_skip_message_action_encrypted+0x4a>
mov    -0x4(%rbp),%esi
lea    0xe82(%rip),%rdi
call   1060 <logprintf@plt>
xor    %edi,%edi
call   1050 <assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fetch_skip_message_action_encrypted>:
push   %rax
xor    %eax,%eax
call   1040 <fetch_int@plt>
cmp    $0xa1733aec,%eax
jne    115a <fetch_skip_message_action_encrypted+0x1a>
mov    $0x1,%edi
pop    %rax
jmp    1030 <fetch_skip@plt>
lea    0xe9f(%rip),%rdi
mov    %eax,%esi
call   1060 <logprintf@plt>
xor    %edi,%edi
pop    %rax
jmp    1050 <assert@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"x = 0x%08x\0A\00"
define void @fetch_skip_message_action_encrypted() {
%1 = alloca i32
%2 = call i32 (...) @fetch_int()
store i32 %2, i32* %1
%3 = load i32, i32* %1
switch i32 %3, label %6 [
i32 -1586283796, label %4
]
4: ; preds = %0
%5 = call i32 @fetch_skip(i32 1)
br label %10
6: ; preds = %0
%7 = load i32, i32* %1
%8 = call i32 @logprintf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = call i32 @assert(i32 0)
br label %10
10: ; preds = %6, %4
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"x = 0x%08x\0A\00"
define void @fetch_skip_message_action_encrypted() {
%1 = tail call i32 (...) @fetch_int()
%2 = icmp eq i32 %1, -1586283796
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @fetch_skip(i32 1)
br label %8
5: ; preds = %0
%6 = tail call i32 @logprintf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %1)
%7 = tail call i32 @assert(i32 0)
br label %8
8: ; preds = %5, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __console_tx_string(char *);
void print_alert(char *str) { __console_tx_string(str); }


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

x86 assembly (clang, -O2):
<print_alert>:
jmp    1030 <__console_tx_string@plt>

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

LLVM IR (-O2):
define void @print_alert(i8* %0) {
%2 = tail call i32 @__console_tx_string(i8* %0)
ret void
}
void foo4() {}


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

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

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

LLVM IR (-O2):
define void @foo4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int usage() {
  printf("ppm2png ppm_file_name\n\n");
  printf("  reads ppm input file and\n");
  printf("  writes simple png output to out.png file\n\n");
  return 1;
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xef3(%rip),%rdi
call   1030 <puts@plt>
lea    0xf02(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"ppm2png ppm_file_name\0A\0A\00"
@.str.1 = [28 x i8] c" reads ppm input file and\0A\00"
@.str.2 = [45 x i8] c" writes simple png output to out.png file\0A\0A\00"
define i32 @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.2, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@str = [23 x i8] c"ppm2png ppm_file_name\0A\00"
@str.3 = [27 x i8] c" reads ppm input file and\00"
@str.4 = [44 x i8] c" writes simple png output to out.png file\0A\00"
define i32 @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str.4, i64 0, i64 0))
ret i32 1
}
char *get_corename(void) { return "sparc"; }


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"sparc\00"
define i8* @get_corename() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
struct group {
  int dummy;
};

/* Variables and functions */
struct group *getgrnam(const char *name) {
  return (struct group *)NULL;
}


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

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

LLVM IR (-O0):
%struct.group = type { i32 }
define %struct.group* @getgrnam(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret %struct.group* null
}

LLVM IR (-O2):
%struct.group = type { i32 }
define noalias %struct.group* @getgrnam(i8* nocapture readnone %0) {
ret %struct.group* null
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void print_usage(void) {
  fprintf(stderr, "Usage: lsgpio [options]...\n"
                  "List GPIO chips, lines and states\n"
                  "  -n <name>  List GPIOs on a named device\n"
                  "  -?         This helptext\n");
}


x86 assembly (clang, -O0):
<print_usage>:
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):
<print_usage>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [131 x i8] c"Usage: lsgpio [options]...\0AList GPIO chips, lines and states\0A -n <name> List GPIOs on a named device\0A -? This helptext\0A\00"
define void @print_usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([131 x i8], [131 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [131 x i8] c"Usage: lsgpio [options]...\0AList GPIO chips, lines and states\0A -n <name> List GPIOs on a named device\0A -? This helptext\0A\00"
define void @print_usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([131 x i8], [131 x i8]* @.str, i64 0, i64 0))
ret void
}
void sesc_end_versioning(void) {}


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

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

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

LLVM IR (-O2):
define void @sesc_end_versioning() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ CrcUpdateByte(unsigned int *, unsigned char);
void CrcUpdateUInt32(unsigned int *crc, unsigned int v) {
  int i;
  for (i = 0; i < 4; i++)
    CrcUpdateByte(crc, (unsigned char)(v >> (8 * i)));
}


x86 assembly (clang, -O0):
<CrcUpdateUInt32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x4,-0x10(%rbp)
jge    1155 <CrcUpdateUInt32+0x45>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%eax
mov    -0x10(%rbp),%ecx
shl    $0x3,%ecx
shr    %cl,%eax
movzbl %al,%esi
call   1030 <CrcUpdateByte@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <CrcUpdateUInt32+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CrcUpdateUInt32>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
movzbl %bl,%esi
call   1030 <CrcUpdateByte@plt>
movzbl %bh,%esi
mov    %r14,%rdi
call   1030 <CrcUpdateByte@plt>
mov    %ebx,%eax
shr    $0x10,%eax
movzbl %al,%esi
mov    %r14,%rdi
call   1030 <CrcUpdateByte@plt>
shr    $0x18,%ebx
mov    %r14,%rdi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <CrcUpdateByte@plt>

LLVM IR (-O0):
define void @CrcUpdateUInt32(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 = icmp slt i32 %7, 4
br i1 %8, label %9, label %20
9: ; preds = %6
%10 = load i32*, i32** %3
%11 = load i32, i32* %4
%12 = load i32, i32* %5
%13 = mul nsw i32 8, %12
%14 = lshr i32 %11, %13
%15 = trunc i32 %14 to i8
%16 = call i32 @CrcUpdateByte(i32* %10, i8 zeroext %15)
br label %17
17: ; preds = %9
%18 = load i32, i32* %5
%19 = add nsw i32 %18, 1
store i32 %19, i32* %5
br label %6
20: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @CrcUpdateUInt32(i32* %0, i32 %1) {
%3 = trunc i32 %1 to i8
%4 = tail call i32 @CrcUpdateByte(i32* %0, i8 zeroext %3)
%5 = lshr i32 %1, 8
%6 = trunc i32 %5 to i8
%7 = tail call i32 @CrcUpdateByte(i32* %0, i8 zeroext %6)
%8 = lshr i32 %1, 16
%9 = trunc i32 %8 to i8
%10 = tail call i32 @CrcUpdateByte(i32* %0, i8 zeroext %9)
%11 = lshr i32 %1, 24
%12 = trunc i32 %11 to i8
%13 = tail call i32 @CrcUpdateByte(i32* %0, i8 zeroext %12)
ret void
}
void foo282(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo282(i32 %0) {
ret void
}
void unify_Free(void) {}


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

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

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

LLVM IR (-O2):
define void @unify_Free() {
ret void
}
/* Variables and functions */
int isalnum(unsigned char);
int isalnum_c(char c) { return isalnum((unsigned char)c); }


x86 assembly (clang, -O0):
<isalnum_c>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edi
call   1030 <isalnum@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isalnum_c>:
movzbl %dil,%edi
jmp    1030 <isalnum@plt>

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

LLVM IR (-O2):
define i32 @isalnum_c(i8 signext %0) {
%2 = tail call i32 @isalnum(i8 zeroext %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int /*<<< orphan*/ putchar(char);
void print_array(int *arr, int len) {
  while (len-- > 0)
    printf("%d ", *arr++);
  putchar('\n');
}


x86 assembly (clang, -O0):
<print_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0xc(%rbp)
cmp    $0x0,%eax
jle    1165 <print_array+0x45>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%esi
lea    0xea5(%rip),%rdi
call   1040 <printf@plt>
jmp    112f <print_array+0xf>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_array>:
push   %rbp
push   %r14
push   %rbx
test   %esi,%esi
jle    1156 <print_array+0x36>
mov    %esi,%ebp
mov    %rdi,%rbx
add    $0x1,%ebp
lea    0xec9(%rip),%r14
nopw   0x0(%rax,%rax,1)
mov    (%rbx),%esi
add    $0x4,%rbx
mov    %r14,%rdi
call   1040 <printf@plt>
add    $0xffffffff,%ebp
cmp    $0x1,%ebp
ja     1140 <print_array+0x20>
mov    $0xa,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define void @print_array(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %12
4: ; preds = %2, %4
%5 = phi i32 [ %7, %4 ], [ %1, %2 ]
%6 = phi i32* [ %8, %4 ], [ %0, %2 ]
%7 = add nsw i32 %5, -1
%8 = getelementptr inbounds i32, i32* %6, i64 1
%9 = load i32, i32* %6
%10 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = icmp ugt i32 %5, 1
br i1 %11, label %4, label %12
12: ; preds = %4, %2
%13 = tail call i32 @putchar(i8 signext 10)
ret void
}
int urt_sys_init(void) { return 0; }


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

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

LLVM IR (-O0):
define i32 @urt_sys_init() {
ret i32 0
}

LLVM IR (-O2):
define i32 @urt_sys_init() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ _rdch();
int tolower(int /*<<< orphan*/);
int rdch(void) { return tolower(_rdch()); }


x86 assembly (clang, -O0):
<rdch>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <_rdch@plt>
mov    %eax,%edi
call   1030 <tolower@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<rdch>:
push   %rax
xor    %eax,%eax
call   1040 <_rdch@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <tolower@plt>

LLVM IR (-O0):
define i32 @rdch() {
%1 = call i32 (...) @_rdch()
%2 = call i32 @tolower(i32 %1)
ret i32 %2
}

LLVM IR (-O2):
define i32 @rdch() {
%1 = tail call i32 (...) @_rdch()
%2 = tail call i32 @tolower(i32 %1)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;
typedef int /*<<< orphan*/ Elf64_Word;
typedef int /*<<< orphan*/ Elf64_Sword;

/* Variables and functions */
int elfrw_write_Word(int /*<<< orphan*/ *, int /*<<< orphan*/ const *);
int elfrw_write_Sword(FILE *fp, Elf64_Sword const *out) {
  return elfrw_write_Word(fp, (Elf64_Word const *)out);
}


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

x86 assembly (clang, -O2):
<elfrw_write_Sword>:
jmp    1030 <elfrw_write_Word@plt>

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

LLVM IR (-O2):
define i32 @elfrw_write_Sword(i32* %0, i32* %1) {
%3 = tail call i32 @elfrw_write_Word(i32* %0, i32* %1)
ret i32 %3
}
void Atm128AlarmAsyncP$0$TimerAsync$setTimer0Asynchronous(void) {
  HplAtm128Timer0AsyncP$TimerAsync$setTimer0Asynchronous();
}


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

x86 assembly (clang, -O2):
<Atm128AlarmAsyncP$0$TimerAsync$setTimer0Asynchronous>:
xor    %eax,%eax
jmp    1030 <HplAtm128Timer0AsyncP$TimerAsync$setTimer0Asynchronous@plt>

LLVM IR (-O0):
define void @"Atm128AlarmAsyncP$0$TimerAsync$setTimer0Asynchronous"() {
%1 = call i32 (...) @"HplAtm128Timer0AsyncP$TimerAsync$setTimer0Asynchronous"()
ret void
}

LLVM IR (-O2):
define void @"Atm128AlarmAsyncP$0$TimerAsync$setTimer0Asynchronous"() {
%1 = tail call i32 (...) @"HplAtm128Timer0AsyncP$TimerAsync$setTimer0Asynchronous"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ perror(char *);
int truncate(char *, int);
int main() {
  int ret;
  ret = truncate("test.log", 100);
  if (ret == -1) {
    perror("truncate");
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x64,%esi
call   1030 <truncate@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0xffffffff,-0x8(%rbp)
jne    1165 <main+0x45>
lea    0xeb5(%rip),%rdi
call   1040 <perror@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    116c <main+0x4c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
mov    $0x64,%esi
call   1030 <truncate@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0xffffffff,%ecx
je     113d <main+0x1d>
pop    %rcx
ret
lea    0xec5(%rip),%rdi
call   1040 <perror@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"test.log\00"
@.str.1 = [9 x i8] c"truncate\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @truncate(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 100)
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 @perror(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
store i32 -1, i32* %1
br label %9
8: ; preds = %0
store i32 0, i32* %1
br label %9
9: ; preds = %8, %6
%10 = load i32, i32* %1
ret i32 %10
}

LLVM IR (-O2):
@.str = [9 x i8] c"test.log\00"
@.str.1 = [9 x i8] c"truncate\00"
define i32 @main() {
%1 = tail call i32 @truncate(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 100)
%2 = icmp eq i32 %1, -1
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @perror(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
br label %5
5: ; preds = %0, %3
%6 = phi i32 [ -1, %3 ], [ 0, %0 ]
ret i32 %6
}
void INT_Excep_TPU2_TGI2B(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_TPU2_TGI2B() {
ret void
}
/* Type definitions */
typedef int uint64_t;
typedef int uint32_t;

/* Variables and functions */
uint64_t make_message_tag(uint32_t msg_counter, uint32_t time) {
  uint64_t id = 0;
  id |= time;
  id = id << 32;
  id |= msg_counter;
  return id;
}


x86 assembly (clang, -O0):
<make_message_tag>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%eax
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x20,%ecx
shl    %cl,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @make_message_tag(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
%6 = load i32, i32* %4
%7 = load i32, i32* %5
%8 = or i32 %7, %6
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = shl i32 %9, 32
store i32 %10, i32* %5
%11 = load i32, i32* %3
%12 = load i32, i32* %5
%13 = or i32 %12, %11
store i32 %13, i32* %5
%14 = load i32, i32* %5
ret i32 %14
}

LLVM IR (-O2):
define i32 @make_message_tag(i32 %0, i32 %1) {
ret i32 poison
}
int pRec2p(int argc) { return (argc >= 2); }


x86 assembly (clang, -O0):
<pRec2p>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x2,-0x4(%rbp)
setge  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pRec2p>:
xor    %eax,%eax
cmp    $0x2,%edi
setge  %al
ret

LLVM IR (-O0):
define i32 @pRec2p(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 2
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @pRec2p(i32 %0) {
%2 = icmp sgt i32 %0, 1
%3 = zext i1 %2 to i32
ret i32 %3
}
b(x) {
  int y[999];
  return 2 * (x + 3);
}


x86 assembly (clang, -O0):
<b>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x3,%eax
shl    $0x1,%eax
add    $0xf20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<b>:
lea    (%rdi,%rdi,1),%eax
add    $0x6,%eax
ret

LLVM IR (-O0):
define i32 @b(i32 %0) {
%2 = alloca i32
%3 = alloca [999 x i32]
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = add nsw i32 %4, 3
%6 = mul nsw i32 2, %5
ret i32 %6
}

LLVM IR (-O2):
define i32 @b(i32 %0) {
%2 = shl i32 %0, 1
%3 = add i32 %2, 6
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void main() { printf("PASS\n"); }


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

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

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

LLVM IR (-O2):
@str = [5 x i8] c"PASS\00"
define void @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage() {
  printf("usage:\n");
  printf("caesarcipher [-d|-e] [-p] [-s shiftvalue] [-i inputfile] [-o "
         "outputfile] [message ...]\n");
}


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"usage:\0A\00"
@.str.1 = [88 x i8] c"caesarcipher [-d|-e] [-p] [-s shiftvalue] [-i inputfile] [-o outputfile] [message ...]\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([88 x i8], [88 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [7 x i8] c"usage:\00"
@str.2 = [87 x i8] c"caesarcipher [-d|-e] [-p] [-s shiftvalue] [-i inputfile] [-o outputfile] [message ...]\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([87 x i8], [87 x i8]* @str.2, i64 0, i64 0))
ret void
}
/* Type definitions */
struct wl_proxy {
  int dummy;
};
struct wl_data_device {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ wl_proxy_set_user_data(struct wl_proxy *, void *);
void wl_data_device_set_user_data(struct wl_data_device *wl_data_device,
                                  void *user_data) {
  wl_proxy_set_user_data((struct wl_proxy *)wl_data_device, user_data);
}


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

x86 assembly (clang, -O2):
<wl_data_device_set_user_data>:
jmp    1030 <wl_proxy_set_user_data@plt>

LLVM IR (-O0):
%struct.wl_data_device = type { i32 }
%struct.wl_proxy = type { i32 }
define void @wl_data_device_set_user_data(%struct.wl_data_device* %0, i8* %1) {
%3 = alloca %struct.wl_data_device*
%4 = alloca i8*
store %struct.wl_data_device* %0, %struct.wl_data_device** %3
store i8* %1, i8** %4
%5 = load %struct.wl_data_device*, %struct.wl_data_device** %3
%6 = bitcast %struct.wl_data_device* %5 to %struct.wl_proxy*
%7 = load i8*, i8** %4
%8 = call i32 @wl_proxy_set_user_data(%struct.wl_proxy* %6, i8* %7)
ret void
}

LLVM IR (-O2):
%struct.wl_data_device = type { i32 }
%struct.wl_proxy = type { i32 }
define void @wl_data_device_set_user_data(%struct.wl_data_device* %0, i8* %1) {
%3 = bitcast %struct.wl_data_device* %0 to %struct.wl_proxy*
%4 = tail call i32 @wl_proxy_set_user_data(%struct.wl_proxy* %3, i8* %1)
ret void
}
void lcd_disp_at_pos(char *str, unsigned char pos) {}


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

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

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

LLVM IR (-O2):
define void @lcd_disp_at_pos(i8* nocapture %0, i8 zeroext %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void sys_free(void *ptr) { free(ptr); }


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

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

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

LLVM IR (-O2):
define void @sys_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
void none(void) {}


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

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

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

LLVM IR (-O2):
define void @none() {
ret void
}
/* Variables and functions */
int atoc(char);
unsigned char ascii_to_char(char b1, char b2) {
  unsigned char ucRes;
  ucRes = (atoc(b1)) << 4 | (atoc(b2));
  return ucRes;
}


x86 assembly (clang, -O0):
<ascii_to_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <atoc@plt>
shl    $0x4,%eax
mov    %eax,-0x8(%rbp)
movsbl -0x2(%rbp),%edi
call   1030 <atoc@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
or     %ecx,%eax
mov    %al,-0x3(%rbp)
movzbl -0x3(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ascii_to_char>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
call   1030 <atoc@plt>
mov    %eax,%ebp
shl    $0x4,%ebp
mov    %ebx,%edi
call   1030 <atoc@plt>
or     %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define zeroext i8 @ascii_to_char(i8 signext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%6 = load i8, i8* %3
%7 = call i32 @atoc(i8 signext %6)
%8 = shl i32 %7, 4
%9 = load i8, i8* %4
%10 = call i32 @atoc(i8 signext %9)
%11 = or i32 %8, %10
%12 = trunc i32 %11 to i8
store i8 %12, i8* %5
%13 = load i8, i8* %5
ret i8 %13
}

LLVM IR (-O2):
define zeroext i8 @ascii_to_char(i8 signext %0, i8 signext %1) {
%3 = tail call i32 @atoc(i8 signext %0)
%4 = shl i32 %3, 4
%5 = tail call i32 @atoc(i8 signext %1)
%6 = or i32 %4, %5
%7 = trunc i32 %6 to i8
ret i8 %7
}
void smenvg_destroy(struct smenvg *envg __attribute__((unused))) {}


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

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

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

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


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

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

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

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

/* Variables and functions */
uint8_t a2h(char c) {
  if (c >= 'A')
    c -= 7;
  c = c & 0x0f;
  return (uint8_t)c;
}


x86 assembly (clang, -O0):
<a2h>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x41,%eax
jl     1121 <a2h+0x21>
movsbl -0x1(%rbp),%eax
sub    $0x7,%eax
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
and    $0xf,%eax
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<a2h>:
lea    0x9(%rdi),%eax
cmp    $0x41,%dil
movzbl %al,%eax
cmovl  %edi,%eax
and    $0xf,%eax
ret

LLVM IR (-O0):
define i32 @a2h(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sge i32 %4, 65
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = sub nsw i32 %8, 7
%10 = trunc i32 %9 to i8
store i8 %10, i8* %2
br label %11
11: ; preds = %6, %1
%12 = load i8, i8* %2
%13 = sext i8 %12 to i32
%14 = and i32 %13, 15
%15 = trunc i32 %14 to i8
store i8 %15, i8* %2
%16 = load i8, i8* %2
%17 = sext i8 %16 to i32
ret i32 %17
}

LLVM IR (-O2):
define i32 @a2h(i8 signext %0) {
%2 = icmp sgt i8 %0, 64
%3 = add i8 %0, 9
%4 = select i1 %2, i8 %3, i8 %0
%5 = and i8 %4, 15
%6 = zext i8 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ default_handler();
__attribute__((weak)) void DCMI_IRQHandler() { default_handler(); }


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

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

LLVM IR (-O0):
define weak void @DCMI_IRQHandler() {
%1 = call i32 (...) @default_handler()
ret void
}

LLVM IR (-O2):
define weak void @DCMI_IRQHandler() {
%1 = tail call i32 (...) @default_handler()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ output_line(char *);
void trailer() { output_line(";\t.end"); }


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

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

LLVM IR (-O0):
@.str = [7 x i8] c";\09.end\00"
define void @trailer() {
%1 = call i32 @output_line(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c";\09.end\00"
define void @trailer() {
%1 = tail call i32 @output_line(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}
void ide_log(const char *fmt, ...) {}


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

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

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

LLVM IR (-O2):
define void @ide_log(i8* nocapture %0, ...) {
ret void
}
/* Variables and functions */
char *cut_string(char const *, int);
int find_first_non_blank_char(char const *, int /*<<< orphan*/);
char *ft_strnew(int);
char *ft_strtrim(char const *s) {
  int pos_beg;
  if (!s)
    return (NULL);
  else if ((pos_beg = find_first_non_blank_char(s, 0)) == -1)
    return (ft_strnew(1));
  else
    return (cut_string(s, pos_beg));
}


x86 assembly (clang, -O0):
<ft_strtrim>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1154 <ft_strtrim+0x24>
movq   $0x0,-0x8(%rbp)
jmp    118e <ft_strtrim+0x5e>
mov    -0x10(%rbp),%rdi
xor    %esi,%esi
call   1030 <find_first_non_blank_char@plt>
mov    %eax,-0x14(%rbp)
cmp    $0xffffffff,%eax
jne    117e <ft_strtrim+0x4e>
mov    $0x1,%edi
call   1040 <ft_strnew@plt>
mov    %rax,-0x8(%rbp)
jmp    118e <ft_strtrim+0x5e>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1050 <cut_string@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_strtrim>:
push   %rbx
test   %rdi,%rdi
je     1150 <ft_strtrim+0x20>
mov    %rdi,%rbx
xor    %esi,%esi
call   1030 <find_first_non_blank_char@plt>
cmp    $0xffffffff,%eax
je     1154 <ft_strtrim+0x24>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1050 <cut_string@plt>
xor    %eax,%eax
pop    %rbx
ret
mov    $0x1,%edi
pop    %rbx
jmp    1040 <ft_strnew@plt>

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

LLVM IR (-O2):
define i8* @ft_strtrim(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %10, label %3
3: ; preds = %1
%4 = tail call i32 @find_first_non_blank_char(i8* %0, i32 0)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i8* @ft_strnew(i32 1)
br label %10
8: ; preds = %3
%9 = tail call i8* @cut_string(i8* %0, i32 %4)
br label %10
10: ; preds = %1, %8, %6
%11 = phi i8* [ %7, %6 ], [ %9, %8 ], [ null, %1 ]
ret i8* %11
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int, long long);
void f3(int x, int y, int z, long long w) {
  printf("f3: %d %d %d %lld\n", x, y, z, w);
}


x86 assembly (clang, -O0):
<f3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    -0x18(%rbp),%r8
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f3>:
mov    %rcx,%r8
mov    %edx,%ecx
mov    %esi,%edx
mov    %edi,%esi
lea    0xee0(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"f3: %d %d %d %lld\0A\00"
define void @f3(i32 %0, i32 %1, i32 %2, i64 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i64
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i64 %3, i64* %8
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = load i32, i32* %7
%12 = load i64, i64* %8
%13 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %9, i32 %10, i32 %11, i64 %12)
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"f3: %d %d %d %lld\0A\00"
define void @f3(i32 %0, i32 %1, i32 %2, i64 %3) {
%5 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1, i32 %2, i64 %3)
ret void
}
int i(int x) { return x; }


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

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

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

LLVM IR (-O2):
define i32 @i(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
unsigned long readl(unsigned long);
int /*<<< orphan*/ writel(unsigned long, unsigned long);
void mdp4_read_or_write(unsigned long reg, unsigned long mask) {
  unsigned long bits;
  bits = readl(reg);
  bits |= mask;
  writel(mask, reg);
}


x86 assembly (clang, -O0):
<mdp4_read_or_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <readl@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
or     -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1040 <writel@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mdp4_read_or_write>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <readl@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <writel@plt>

LLVM IR (-O0):
define void @mdp4_read_or_write(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %3
%7 = call i64 @readl(i64 %6)
store i64 %7, i64* %5
%8 = load i64, i64* %4
%9 = load i64, i64* %5
%10 = or i64 %9, %8
store i64 %10, i64* %5
%11 = load i64, i64* %4
%12 = load i64, i64* %3
%13 = call i32 @writel(i64 %11, i64 %12)
ret void
}

LLVM IR (-O2):
define void @mdp4_read_or_write(i64 %0, i64 %1) {
%3 = tail call i64 @readl(i64 %0)
%4 = tail call i32 @writel(i64 %1, i64 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void childtimeout(int nr) { exit(0); }


x86 assembly (clang, -O0):
<childtimeout>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %edi,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<childtimeout>:
push   %rax
xor    %edi,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @childtimeout(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @childtimeout(i32 %0) {
%2 = tail call i32 @exit(i32 0)
unreachable
}