xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ va_list;
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
int vsnprintf(char *, int, char const *, int /*<<< orphan*/);
int writen_ni(int, char *, int);
int fd_vprintf(int fd, const char *format, va_list ap) {
  char buf[256];
  int len;
  len = vsnprintf(buf, sizeof(buf), format, ap);
  buf[sizeof(buf) - 1] = '\0';
  return writen_ni(fd, buf, len);
}


x86 assembly (clang, -O0):
<fd_vprintf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x130,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
lea    -0x120(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    $0x100,%esi
call   1030 <vsnprintf@plt>
mov    %eax,-0x124(%rbp)
movb   $0x0,-0x21(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x120(%rbp),%rsi
mov    -0x124(%rbp),%edx
call   1040 <writen_ni@plt>
add    $0x130,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fd_vprintf>:
push   %r14
push   %rbx
sub    $0x108,%rsp
mov    %edx,%ecx
mov    %rsi,%rdx
mov    %edi,%ebx
mov    %rsp,%r14
mov    %r14,%rdi
mov    $0x100,%esi
call   1030 <vsnprintf@plt>
movb   $0x0,0xff(%rsp)
mov    %ebx,%edi
mov    %r14,%rsi
mov    %eax,%edx
call   1040 <writen_ni@plt>
add    $0x108,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @fd_vprintf(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
%7 = alloca [256 x i8]
%8 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%9 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
%10 = load i8*, i8** %5
%11 = load i32, i32* %6
%12 = call i32 @vsnprintf(i8* %9, i32 256, i8* %10, i32 %11)
store i32 %12, i32* %8
%13 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 255
store i8 0, i8* %13
%14 = load i32, i32* %4
%15 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
%16 = load i32, i32* %8
%17 = call i32 @writen_ni(i32 %14, i8* %15, i32 %16)
ret i32 %17
}

LLVM IR (-O2):
define i32 @fd_vprintf(i32 %0, i8* nocapture %1, i32 %2) {
%4 = alloca [256 x i8]
%5 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 0
%6 = call i32 @vsnprintf(i8* %5, i32 256, i8* %1, i32 %2)
%7 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 255
store i8 0, i8* %7
%8 = call i32 @writen_ni(i32 %0, i8* %5, i32 %6)
ret i32 %8
}
/* Variables and functions */
scalar_t__ f();
void random() {
  int x = 1, y = 2, z = 3;
  x &&f();
  x && (x = 2);
  x &&f() && (x = 2);
}


x86 assembly (clang, -O0):
<random>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
movl   $0x3,-0xc(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0xd(%rbp)
je     114d <random+0x3d>
mov    $0x0,%al
call   1030 <f@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
xor    %eax,%eax
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0xe(%rbp)
je     116b <random+0x5b>
movl   $0x2,-0x4(%rbp)
mov    $0x1,%al
mov    %al,-0xe(%rbp)
mov    -0xe(%rbp),%al
xor    %eax,%eax
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0xf(%rbp)
je     11a2 <random+0x92>
mov    $0x0,%al
call   1030 <f@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0xf(%rbp)
je     11a2 <random+0x92>
movl   $0x2,-0x4(%rbp)
mov    $0x1,%al
mov    %al,-0xf(%rbp)
mov    -0xf(%rbp),%al
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<random>:
push   %rax
xor    %eax,%eax
call   1030 <f@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <f@plt>

LLVM IR (-O0):
define void @random() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 1, i32* %1
store i32 2, i32* %2
store i32 3, i32* %3
%4 = load i32, i32* %1
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = call i64 (...) @f()
%8 = icmp ne i64 %7, 0
br label %9
9: ; preds = %6, %0
%10 = phi i1 [ false, %0 ], [ %8, %6 ]
%11 = zext i1 %10 to i32
%12 = load i32, i32* %1
%13 = icmp ne i32 %12, 0
br i1 %13, label %14, label %15
14: ; preds = %9
store i32 2, i32* %1
br label %15
15: ; preds = %14, %9
%16 = phi i1 [ false, %9 ], [ true, %14 ]
%17 = zext i1 %16 to i32
%18 = load i32, i32* %1
%19 = icmp ne i32 %18, 0
br i1 %19, label %20, label %24
20: ; preds = %15
%21 = call i64 (...) @f()
%22 = icmp ne i64 %21, 0
br i1 %22, label %23, label %24
23: ; preds = %20
store i32 2, i32* %1
br label %24
24: ; preds = %23, %20, %15
%25 = phi i1 [ false, %20 ], [ false, %15 ], [ true, %23 ]
%26 = zext i1 %25 to i32
ret void
}

LLVM IR (-O2):
define void @random() {
%1 = tail call i64 (...) @f()
%2 = tail call i64 (...) @f()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ job_destructor();
void ___j_exitfunc(int ___ar, void *___ar2) { job_destructor(); }


x86 assembly (clang, -O0):
<___j_exitfunc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <job_destructor@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @___j_exitfunc(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = call i32 (...) @job_destructor()
ret void
}

LLVM IR (-O2):
define void @___j_exitfunc(i32 %0, i8* nocapture readnone %1) {
%3 = tail call i32 (...) @job_destructor()
ret void
}
void nseel_asm_stack_peek_int_end(void) {}


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

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

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

LLVM IR (-O2):
define void @nseel_asm_stack_peek_int_end() {
ret void
}
unsigned char bitswap(unsigned char c) {
  unsigned char r = 0;
  int i;
  for (i = 0; i < 8; i++) {
    r <<= 1;
    if (c & 1)
      r |= 1;
    c >>= 1;
  }
  return r;
}


x86 assembly (clang, -O0):
<bitswap>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movb   $0x0,-0x2(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x8,-0x8(%rbp)
jge    115b <bitswap+0x5b>
movzbl -0x2(%rbp),%eax
shl    $0x1,%eax
mov    %al,-0x2(%rbp)
movzbl -0x1(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1143 <bitswap+0x43>
movzbl -0x2(%rbp),%eax
or     $0x1,%eax
mov    %al,-0x2(%rbp)
movzbl -0x1(%rbp),%eax
sar    $0x1,%eax
mov    %al,-0x1(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1115 <bitswap+0x15>
movzbl -0x2(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitswap>:
rol    $0x4,%dil
mov    %edi,%eax
and    $0x33,%al
shl    $0x2,%al
shr    $0x2,%dil
and    $0x33,%dil
or     %dil,%al
mov    %eax,%ecx
and    $0x55,%cl
add    %cl,%cl
shr    %al
and    $0x55,%al
or     %cl,%al
ret

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

LLVM IR (-O2):
define zeroext i8 @bitswap(i8 zeroext %0) {
%2 = call i8 @llvm.bitreverse.i8(i8 %0)
ret i8 %2
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int main() {
  int a = 10;
  int *p = &a;
  *p = 42;
  assert(a == 42);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xa,-0x4(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x2a,(%rax)
cmpl   $0x2a,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
store i32 10, i32* %1
store i32* %1, i32** %2
%3 = load i32*, i32** %2
store i32 42, i32* %3
%4 = load i32, i32* %1
%5 = icmp eq i32 %4, 42
%6 = zext i1 %5 to i32
%7 = call i32 @assert(i32 %6)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assert(i32 1)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ GLdouble;

/* Variables and functions */
int /*<<< orphan*/ glTexCoord1d(int /*<<< orphan*/);
void TexCoord1d(GLdouble s) { glTexCoord1d(s); }


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

x86 assembly (clang, -O2):
<TexCoord1d>:
jmp    1030 <glTexCoord1d@plt>

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

LLVM IR (-O2):
define void @TexCoord1d(i32 %0) {
%2 = tail call i32 @glTexCoord1d(i32 %0)
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int width;
};
typedef TYPE_1__ XWindowChanges;

/* Variables and functions */
void set_XWindowChanges_width(void *_p, int _v) {
  ((XWindowChanges *)_p)->width = (int)_v;
}


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

x86 assembly (clang, -O2):
<set_XWindowChanges_width>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32 }
define void @set_XWindowChanges_width(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i32 %5, i32* %8
ret void
}

LLVM IR (-O2):
define void @set_XWindowChanges_width(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Type definitions */
struct ac_buffer {
  int dummy;
};

/* Variables and functions */
int _buffer_read(struct ac_buffer *, double *, int);
int buffer_read_double(struct ac_buffer *buffer, double *value) {
  return _buffer_read(buffer, value, sizeof(double));
}


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

x86 assembly (clang, -O2):
<buffer_read_double>:
mov    $0x8,%edx
jmp    1030 <_buffer_read@plt>

LLVM IR (-O0):
%struct.ac_buffer = type { i32 }
define i32 @buffer_read_double(%struct.ac_buffer* %0, double* %1) {
%3 = alloca %struct.ac_buffer*
%4 = alloca double*
store %struct.ac_buffer* %0, %struct.ac_buffer** %3
store double* %1, double** %4
%5 = load %struct.ac_buffer*, %struct.ac_buffer** %3
%6 = load double*, double** %4
%7 = call i32 @_buffer_read(%struct.ac_buffer* %5, double* %6, i32 8)
ret i32 %7
}

LLVM IR (-O2):
%struct.ac_buffer = type { i32 }
define i32 @buffer_read_double(%struct.ac_buffer* %0, double* %1) {
%3 = tail call i32 @_buffer_read(%struct.ac_buffer* %0, double* %1, i32 8)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int);
int /*<<< orphan*/ system(char *);
int x35_teardown() {
  char cmd[256];
  sprintf(cmd,
          "iptables -D INPUT -p tcp -m multiport --sport 53,80 --tcp-flags "
          "SYN,ACK SYN,ACK -j NFQUEUE --queue-num %d",
          1);
  system(cmd);
  return 0;
}


x86 assembly (clang, -O0):
<x35_teardown>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
lea    -0x100(%rbp),%rdi
lea    0xec7(%rip),%rsi
mov    $0x1,%edx
call   1040 <sprintf@plt>
lea    -0x100(%rbp),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<x35_teardown>:
push   %rbx
sub    $0x100,%rsp
lea    0xed1(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x1,%edx
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x100,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [106 x i8] c"iptables -D INPUT -p tcp -m multiport --sport 53,80 --tcp-flags SYN,ACK SYN,ACK -j NFQUEUE --queue-num %d\00"
define i32 @x35_teardown() {
%1 = alloca [256 x i8]
%2 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%3 = call i32 @sprintf(i8* %2, i8* getelementptr inbounds ([106 x i8], [106 x i8]* @.str, i64 0, i64 0), i32 1)
%4 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%5 = call i32 @system(i8* %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [106 x i8] c"iptables -D INPUT -p tcp -m multiport --sport 53,80 --tcp-flags SYN,ACK SYN,ACK -j NFQUEUE --queue-num %d\00"
define i32 @x35_teardown() {
%1 = alloca [256 x i8]
%2 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%3 = call i32 @sprintf(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([106 x i8], [106 x i8]* @.str, i64 0, i64 0), i32 1)
%4 = call i32 @system(i8* %2)
ret i32 0
}
void br_multicast_add_port(struct net_bridge_port *port) {}


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

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

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

LLVM IR (-O2):
%struct.net_bridge_port = type opaque
define void @br_multicast_add_port(%struct.net_bridge_port* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0x22() {
  Assert_real((isspace(34) == 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_isspace.c",
              175, ("isspace should be 0 for 0x22"));
}


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

x86 assembly (clang, -O2):
<t_isspace_0x22>:
push   %rax
mov    $0x22,%edi
call   1030 <isspace@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0xaf,%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_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0x22\00"
define void @t_isspace_0x22() {
%1 = call i64 @isspace(i32 34)
%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 175, 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_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0x22\00"
define void @t_isspace_0x22() {
%1 = tail call i64 @isspace(i32 34)
%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 175, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int omap_rev();
int is_omap2422(void) {
  return (((omap_rev() >> 16) & 0xffff) == (0x2422)) ? 1 : 0;
}


x86 assembly (clang, -O0):
<is_omap2422>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <omap_rev@plt>
mov    %eax,%edx
sar    $0x10,%edx
and    $0xffff,%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x2422,%edx
cmove  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_omap2422>:
push   %rax
xor    %eax,%eax
call   1030 <omap_rev@plt>
and    $0xffff0000,%eax
xor    %ecx,%ecx
cmp    $0x24220000,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @is_omap2422() {
%1 = call i32 (...) @omap_rev()
%2 = ashr i32 %1, 16
%3 = and i32 %2, 65535
%4 = icmp eq i32 %3, 9250
%5 = zext i1 %4 to i64
%6 = select i1 %4, i32 1, i32 0
ret i32 %6
}

LLVM IR (-O2):
define i32 @is_omap2422() {
%1 = tail call i32 (...) @omap_rev()
%2 = and i32 %1, -65536
%3 = icmp eq i32 %2, 606208000
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t __pad(int len) {
  uint32_t pad = 0;
  pad = (uint32_t)len | ((uint32_t)len << 8);
  pad |= pad << 16;
  return pad;
}


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

x86 assembly (clang, -O2):
<__pad>:
mov    %edi,%ecx
shl    $0x8,%ecx
or     %edi,%ecx
mov    %ecx,%eax
shl    $0x10,%eax
or     %ecx,%eax
ret

LLVM IR (-O0):
define i32 @__pad(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
%4 = load i32, i32* %2
%5 = load i32, i32* %2
%6 = shl i32 %5, 8
%7 = or i32 %4, %6
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = shl i32 %8, 16
%10 = load i32, i32* %3
%11 = or i32 %10, %9
store i32 %11, i32* %3
%12 = load i32, i32* %3
ret i32 %12
}

LLVM IR (-O2):
define i32 @__pad(i32 %0) {
%2 = shl i32 %0, 8
%3 = or i32 %2, %0
%4 = shl i32 %3, 16
%5 = or i32 %4, %3
ret i32 %5
}
int fun1038() { return 1038; }


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

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

LLVM IR (-O0):
define i32 @fun1038() {
ret i32 1038
}

LLVM IR (-O2):
define i32 @fun1038() {
ret i32 1038
}
void gdev_vsched_fifo_replenish_memory(struct gdev_device *gdev) {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @h0() {
ret void
}
void cmp_drv_linear_deinit(struct CmpDrvLinear *drv) { (void)drv; }


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

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

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

LLVM IR (-O2):
%struct.CmpDrvLinear = type opaque
define void @cmp_drv_linear_deinit(%struct.CmpDrvLinear* nocapture %0) {
ret void
}
/* Variables and functions */
unsigned short SPI_get(unsigned short);
unsigned short MRF24_Read_Short(unsigned short data) {
  unsigned short temp;
  (*((volatile unsigned long *)0xE002800C)) = 1 << 29;
  temp = SPI_get(data);
  (*((volatile unsigned long *)0xE0028004)) = 1 << 29;
  return temp;
}


x86 assembly (clang, -O0):
<MRF24_Read_Short>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    $0xe002800c,%eax
movq   $0x20000000,(%rax)
movzwl -0x2(%rbp),%edi
call   1030 <SPI_get@plt>
mov    %ax,-0x4(%rbp)
mov    $0xe0028004,%eax
movq   $0x20000000,(%rax)
movzwl -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MRF24_Read_Short>:
push   %rbx
mov    $0xe0028004,%ebx
movq   $0x20000000,0x8(%rbx)
20
call   1030 <SPI_get@plt>
movq   $0x20000000,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define zeroext i16 @MRF24_Read_Short(i16 zeroext %0) {
%2 = alloca i16
%3 = alloca i16
store i16 %0, i16* %2
store volatile i64 536870912, i64* inttoptr (i64 3758260236 to i64*)
%4 = load i16, i16* %2
%5 = call zeroext i16 @SPI_get(i16 zeroext %4)
store i16 %5, i16* %3
store volatile i64 536870912, i64* inttoptr (i64 3758260228 to i64*)
%6 = load i16, i16* %3
ret i16 %6
}

LLVM IR (-O2):
define zeroext i16 @MRF24_Read_Short(i16 zeroext %0) {
store volatile i64 536870912, i64* inttoptr (i64 3758260236 to i64*)
%2 = tail call zeroext i16 @SPI_get(i16 zeroext %0)
store volatile i64 536870912, i64* inttoptr (i64 3758260228 to i64*)
ret i16 %2
}
int _my_min(int a, int b) { return a > b ? b : a; }


x86 assembly (clang, -O0):
<_my_min>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1121 <_my_min+0x21>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <_my_min+0x27>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_my_min>:
mov    %edi,%eax
cmp    %esi,%edi
cmovg  %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @_my_min(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %1, i32 %0
ret i32 %4
}
void _exit(int code) {
  (void)code;
  while (1) {
    continue;
  }
}


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

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

LLVM IR (-O0):
define void @_exit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
br label %4
4: ; preds = %1, %4
br label %4
}

LLVM IR (-O2):
define void @_exit(i32 %0) {
br label %2
2: ; preds = %1, %2
br label %2
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ print_banner();
int /*<<< orphan*/ stderr;
void print_version(FILE *stream, int exit_code) {
  print_banner();
  fprintf(stderr, "Violin Version v0.01\n");
  exit(0);
}


x86 assembly (clang, -O0):
<print_version>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1040 <print_banner@plt>
mov    0x2e93(%rip),%rax
mov    (%rax),%edi
lea    0xeaa(%rip),%rsi
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<print_version>:
push   %rax
xor    %eax,%eax
call   1040 <print_banner@plt>
mov    0x2ea1(%rip),%rax
mov    (%rax),%edi
lea    0xeb8(%rip),%rsi
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [22 x i8] c"Violin Version v0.01\0A\00"
define void @print_version(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = call i32 (...) @print_banner()
%6 = load i32, i32* @stderr
%7 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [22 x i8] c"Violin Version v0.01\0A\00"
define void @print_version(i32* nocapture readnone %0, i32 %1) {
%3 = tail call i32 (...) @print_banner()
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @exit(i32 0)
unreachable
}
foo2(char *filename, const char *modes) {}


x86 assembly (clang, -O0):
<foo2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @foo2(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void print_usage(const char *name) {
  fprintf(stderr, "Usage: %s scroll\n", name);
}


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_usage>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [18 x i8] c"Usage: %s scroll\0A\00"
define void @print_usage(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 ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [18 x i8] c"Usage: %s scroll\0A\00"
define void @print_usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void foo272(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo272(i32 %0) {
ret void
}
/* Variables and functions */
int pigpio_command(int, int, unsigned int, unsigned int, int);
int i2c_write_byte(int pi, unsigned handle, unsigned val) {
  return pigpio_command(pi, 60, handle, val, 1);
}


x86 assembly (clang, -O0):
<i2c_write_byte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    $0x3c,%esi
mov    $0x1,%r8d
call   1030 <pigpio_command@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i2c_write_byte>:
mov    %edx,%ecx
mov    %esi,%edx
mov    $0x3c,%esi
mov    $0x1,%r8d
jmp    1030 <pigpio_command@plt>

LLVM IR (-O0):
define i32 @i2c_write_byte(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call i32 @pigpio_command(i32 %7, i32 60, i32 %8, i32 %9, i32 1)
ret i32 %10
}

LLVM IR (-O2):
define i32 @i2c_write_byte(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @pigpio_command(i32 %0, i32 60, i32 %1, i32 %2, i32 1)
ret i32 %4
}
const char *ls_costN_nm3_name_in(int i) {
  switch (i) {
  case 0:
    return "i0";
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<ls_costN_nm3_name_in>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
test   %eax,%eax
jne    1127 <ls_costN_nm3_name_in+0x27>
jmp    1117 <ls_costN_nm3_name_in+0x17>
lea    0xee2(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    112f <ls_costN_nm3_name_in+0x2f>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ls_costN_nm3_name_in>:
xor    %eax,%eax
test   %edi,%edi
lea    0xef5(%rip),%rcx
cmove  %rcx,%rax
ret

LLVM IR (-O0):
@.str = [3 x i8] c"i0\00"
define i8* @ls_costN_nm3_name_in(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %6 [
i32 0, label %5
]
5: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %2
br label %7
6: ; preds = %1
store i8* null, i8** %2
br label %7
7: ; preds = %6, %5
%8 = load i8*, i8** %2
ret i8* %8
}

LLVM IR (-O2):
@.str = [3 x i8] c"i0\00"
define i8* @ls_costN_nm3_name_in(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = select i1 %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* null
ret i8* %3
}
int IsEven(unsigned int N) {
  if (N % 2 == 0) {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<IsEven>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
jne    1122 <IsEven+0x22>
movl   $0x1,-0x4(%rbp)
jmp    1129 <IsEven+0x29>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<IsEven>:
mov    %edi,%eax
not    %eax
and    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @IsEven(i32 %0) {
%2 = and i32 %0, 1
%3 = xor i32 %2, 1
ret i32 %3
}
char *getlogin(void) { return "user"; }


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

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"user\00"
define i8* @getlogin() {
ret i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0)
}
float sqrt2(const float x) {
  const float xhalf = 0.5f * x;
  union {
    float x;
    int i;
  } u;
  u.x = x;
  u.i = 0x5f3759df - (u.i >> 1);
  return x * u.x * (1.5f - xhalf * u.x * u.x);
}


x86 assembly (clang, -O0):
<sqrt2>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xef3(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
sar    $0x1,%ecx
mov    $0x5f3759df,%eax
sub    %ecx,%eax
mov    %eax,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
mulss  -0x10(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
mulss  -0x10(%rbp),%xmm1
movss  -0x10(%rbp),%xmm2
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm1
movss  0xe99(%rip),%xmm2
addss  %xmm2,%xmm1
mulss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<sqrt2>:
movd   %xmm0,%eax
sar    %eax
mov    $0x5f3759df,%ecx
sub    %eax,%ecx
movd   %ecx,%xmm1
movdqa %xmm1,%xmm2
mulss  %xmm0,%xmm2
mulss  0xedf(%rip),%xmm0
mulss  %xmm1,%xmm0
mulss  %xmm1,%xmm0
addss  0xed3(%rip),%xmm0
mulss  %xmm2,%xmm0
ret

LLVM IR (-O0):
%union.anon = type { float }
define float @sqrt2(float %0) {
%2 = alloca float
%3 = alloca float
%4 = alloca %union.anon
store float %0, float* %2
%5 = load float, float* %2
%6 = fmul float 5.000000e-01, %5
store float %6, float* %3
%7 = load float, float* %2
%8 = bitcast %union.anon* %4 to float*
store float %7, float* %8
%9 = bitcast %union.anon* %4 to i32*
%10 = load i32, i32* %9
%11 = ashr i32 %10, 1
%12 = sub nsw i32 1597463007, %11
%13 = bitcast %union.anon* %4 to i32*
store i32 %12, i32* %13
%14 = load float, float* %2
%15 = bitcast %union.anon* %4 to float*
%16 = load float, float* %15
%17 = fmul float %14, %16
%18 = load float, float* %3
%19 = bitcast %union.anon* %4 to float*
%20 = load float, float* %19
%21 = fmul float %18, %20
%22 = bitcast %union.anon* %4 to float*
%23 = load float, float* %22
%24 = fneg float %21
%25 = call float @llvm.fmuladd.f32(float %24, float %23, float 1.500000e+00)
%26 = fmul float %17, %25
ret float %26
}

LLVM IR (-O2):
define float @sqrt2(float %0) {
%2 = bitcast float %0 to i32
%3 = ashr i32 %2, 1
%4 = sub nsw i32 1597463007, %3
%5 = bitcast i32 %4 to float
%6 = fmul float %5, %0
%7 = fmul float %0, -5.000000e-01
%8 = fmul float %7, %5
%9 = tail call float @llvm.fmuladd.f32(float %8, float %5, float 1.500000e+00)
%10 = fmul float %6, %9
ret float %10
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/ *);
void WriteOutputFile(char *bestlcs, FILE *fout) {
  fputs(bestlcs, fout);
  fputs("\n", fout);
}


x86 assembly (clang, -O0):
<WriteOutputFile>:
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 <fputs@plt>
mov    -0x10(%rbp),%rsi
lea    0xec8(%rip),%rdi
call   1030 <fputs@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<WriteOutputFile>:
push   %rbx
mov    %rsi,%rbx
call   1030 <fputs@plt>
mov    $0xa,%edi
mov    %rbx,%rsi
pop    %rbx
jmp    1040 <fputc@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
define void @WriteOutputFile(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
store i8* %0, i8** %3
store i32* %1, i32** %4
%5 = load i8*, i8** %3
%6 = load i32*, i32** %4
%7 = call i32 @fputs(i8* %5, i32* %6)
%8 = load i32*, i32** %4
%9 = call i32 @fputs(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32* %8)
ret void
}

LLVM IR (-O2):
define void @WriteOutputFile(i8* nocapture %0, i32* nocapture %1) {
%3 = tail call i32 @fputs(i8* %0, i32* %1)
%4 = tail call i32 @fputc(i32 10, i32* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ s2pt(int, float *, float *, float *, int);
void s2pt_(int *np, float *xpts, float *ypts, float *zpts, int *symbol) {
  s2pt(*np, xpts, ypts, zpts, *symbol);
}


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

x86 assembly (clang, -O2):
<s2pt_>:
mov    (%rdi),%edi
mov    (%r8),%r8d
jmp    1030 <s2pt@plt>

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

LLVM IR (-O2):
define void @s2pt_(i32* nocapture %0, float* %1, float* %2, float* %3, i32* nocapture %4) {
%6 = load i32, i32* %0
%7 = load i32, i32* %4
%8 = tail call i32 @s2pt(i32 %6, float* %1, float* %2, float* %3, i32 %7)
ret void
}
/* Variables and functions */
int f205(int *);
int f206(int *p) { return f205(p); }


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

x86 assembly (clang, -O2):
<f206>:
jmp    1030 <f205@plt>

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

LLVM IR (-O2):
define i32 @f206(i32* %0) {
%2 = tail call i32 @f205(i32* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ errno;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
scalar_t__ pipe(int *);
int /*<<< orphan*/ stderr;
char *strerror(int /*<<< orphan*/);
void my_pipe(int *fds) {
  if (pipe(fds) < 0) {
    fprintf(stderr, "Cannot create pipe %s\n", strerror(errno));
    exit(1);
  }
}


x86 assembly (clang, -O0):
<my_pipe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <pipe@plt>
cmp    $0x0,%rax
jge    1195 <my_pipe+0x55>
mov    0x2e7a(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    0x2e66(%rip),%rax
mov    (%rax),%edi
call   1060 <strerror@plt>
mov    -0xc(%rbp),%edi
mov    %rax,%rdx
lea    0xe7a(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_pipe>:
push   %rbx
call   1030 <pipe@plt>
test   %rax,%rax
js     114d <my_pipe+0xd>
pop    %rbx
ret
mov    0x2e8c(%rip),%rax
mov    (%rax),%ebx
mov    0x2e7b(%rip),%rax
mov    (%rax),%edi
call   1060 <strerror@plt>
lea    0xe95(%rip),%rsi
mov    %ebx,%edi
mov    %rax,%rdx
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [23 x i8] c"Cannot create pipe %s\0A\00"
@errno = global i32 0
define void @my_pipe(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i64 @pipe(i32* %3)
%5 = icmp slt i64 %4, 0
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = load i32, i32* @stderr
%8 = load i32, i32* @errno
%9 = call i8* @strerror(i32 %8)
%10 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %9)
%11 = call i32 @exit(i32 1)
unreachable
12: ; preds = %1
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [23 x i8] c"Cannot create pipe %s\0A\00"
@errno = global i32 0
define void @my_pipe(i32* %0) {
%2 = tail call i64 @pipe(i32* %0)
%3 = icmp slt i64 %2, 0
br i1 %3, label %4, label %10
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = load i32, i32* @errno
%7 = tail call i8* @strerror(i32 %6)
%8 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %7)
%9 = tail call i32 @exit(i32 1)
unreachable
10: ; preds = %1
ret void
}
int main(void) {
  int a[3] = {0};
  int b;
  int *p = &a[0] + 3;
  int *q = &b;
  if (&p <= &q) {
    return 0;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x10(%rbp),%rdi
xor    %esi,%esi
mov    $0xc,%edx
call   1030 <memset@plt>
lea    -0x10(%rbp),%rax
add    $0xc,%rax
mov    %rax,-0x20(%rbp)
lea    -0x14(%rbp),%rax
mov    %rax,-0x28(%rbp)
lea    -0x20(%rbp),%rax
lea    -0x28(%rbp),%rcx
cmp    %rcx,%rax
ja     115b <main+0x4b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [3 x i32]
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32*
store i32 0, i32* %1
%6 = bitcast [3 x i32]* %2 to i8*
%7 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 0
%8 = getelementptr inbounds i32, i32* %7, i64 3
store i32* %8, i32** %4
store i32* %3, i32** %5
%9 = icmp ule i32** %4, %5
br i1 %9, label %10, label %11
10: ; preds = %0
store i32 0, i32* %1
br label %11
11: ; preds = %10, %0
%12 = load i32, i32* %1
ret i32 %12
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int tetranacci(int);
int main() {
  printf("O decimo segundo termo da serie de tetranacci eh: %d",
         tetranacci(12));
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xc,%edi
call   1030 <tetranacci@plt>
lea    0xece(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [53 x i8] c"O decimo segundo termo da serie de tetranacci eh: %d\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @tetranacci(i32 12)
%3 = call i32 @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 0
}

LLVM IR (-O2):
@.str = [53 x i8] c"O decimo segundo termo da serie de tetranacci eh: %d\00"
define i32 @main() {
%1 = tail call i32 @tetranacci(i32 12)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Type definitions */
struct xhda_node {
  int dummy;
};
struct xhda_codec {
  int dummy;
};

/* Variables and functions */
int set_verb_val(struct xhda_codec *, unsigned int, unsigned int, int);
int set_cached_verb2(struct xhda_codec *codec, struct xhda_node *node,
                     unsigned int cmd) {
  return set_verb_val(codec, ((cmd >> 8) & 0x7ff) - 1, cmd, 1);
}


x86 assembly (clang, -O0):
<set_cached_verb2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
shr    $0x8,%esi
and    $0x7ff,%esi
sub    $0x1,%esi
mov    -0x14(%rbp),%edx
mov    $0x1,%ecx
call   1030 <set_verb_val@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_cached_verb2>:
mov    %edx,%esi
shr    $0x8,%esi
and    $0x7ff,%esi
add    $0xffffffff,%esi
mov    $0x1,%ecx
jmp    1030 <set_verb_val@plt>

LLVM IR (-O0):
%struct.xhda_codec = type { i32 }
%struct.xhda_node = type { i32 }
define i32 @set_cached_verb2(%struct.xhda_codec* %0, %struct.xhda_node* %1, i32 %2) {
%4 = alloca %struct.xhda_codec*
%5 = alloca %struct.xhda_node*
%6 = alloca i32
store %struct.xhda_codec* %0, %struct.xhda_codec** %4
store %struct.xhda_node* %1, %struct.xhda_node** %5
store i32 %2, i32* %6
%7 = load %struct.xhda_codec*, %struct.xhda_codec** %4
%8 = load i32, i32* %6
%9 = lshr i32 %8, 8
%10 = and i32 %9, 2047
%11 = sub i32 %10, 1
%12 = load i32, i32* %6
%13 = call i32 @set_verb_val(%struct.xhda_codec* %7, i32 %11, i32 %12, i32 1)
ret i32 %13
}

LLVM IR (-O2):
%struct.xhda_codec = type { i32 }
%struct.xhda_node = type { i32 }
define i32 @set_cached_verb2(%struct.xhda_codec* %0, %struct.xhda_node* nocapture readnone %1, i32 %2) {
%4 = lshr i32 %2, 8
%5 = and i32 %4, 2047
%6 = add nsw i32 %5, -1
%7 = tail call i32 @set_verb_val(%struct.xhda_codec* %0, i32 %6, i32 %2, i32 1)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void mailimf_angle_addr_free(char *angle_addr) { free(angle_addr); }


x86 assembly (clang, -O0):
<mailimf_angle_addr_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):
<mailimf_angle_addr_free>:
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @mailimf_angle_addr_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 @mailimf_angle_addr_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Type definitions */
struct event_signal_map {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ evmap_signal_clear(struct event_signal_map *);
void evmap_io_clear(struct event_signal_map *ctx) { evmap_signal_clear(ctx); }


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

x86 assembly (clang, -O2):
<evmap_io_clear>:
jmp    1030 <evmap_signal_clear@plt>

LLVM IR (-O0):
%struct.event_signal_map = type { i32 }
define void @evmap_io_clear(%struct.event_signal_map* %0) {
%2 = alloca %struct.event_signal_map*
store %struct.event_signal_map* %0, %struct.event_signal_map** %2
%3 = load %struct.event_signal_map*, %struct.event_signal_map** %2
%4 = call i32 @evmap_signal_clear(%struct.event_signal_map* %3)
ret void
}

LLVM IR (-O2):
%struct.event_signal_map = type { i32 }
define void @evmap_io_clear(%struct.event_signal_map* %0) {
%2 = tail call i32 @evmap_signal_clear(%struct.event_signal_map* %0)
ret void
}
/* Type definitions */
typedef int __u8;

/* Variables and functions */
int INET_ECN_is_not_ce(__u8 dsfield) { return (dsfield & 3) == 2; }


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

x86 assembly (clang, -O2):
<INET_ECN_is_not_ce>:
and    $0x3,%edi
xor    %eax,%eax
cmp    $0x2,%edi
sete   %al
ret

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

LLVM IR (-O2):
define i32 @INET_ECN_is_not_ce(i32 %0) {
%2 = and i32 %0, 3
%3 = icmp eq i32 %2, 2
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ td_thragent_t;
typedef int /*<<< orphan*/ td_thr_events_t;
typedef int /*<<< orphan*/ td_err_e;

/* Variables and functions */
int /*<<< orphan*/ TD_OK;
td_err_e td_ta_set_event(td_thragent_t const *agent, td_thr_events_t *events) {
  return TD_OK;
}


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

x86 assembly (clang, -O2):
<td_ta_set_event>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%eax
ret

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

LLVM IR (-O2):
@TD_OK = global i32 0
define i32 @td_ta_set_event(i32* nocapture readnone %0, i32* nocapture readnone %1) {
%3 = load i32, i32* @TD_OK
ret i32 %3
}
/* Variables and functions */
int memcmp(void *, void *, unsigned int);
int Osal_MemCmp(void *s1, void *s2, unsigned int size) {
  return (memcmp(s1, s2, size));
}


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

x86 assembly (clang, -O2):
<Osal_MemCmp>:
jmp    1030 <memcmp@plt>

LLVM IR (-O0):
define i32 @Osal_MemCmp(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i32 @memcmp(i8* %7, i8* %8, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @Osal_MemCmp(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @memcmp(i8* %0, i8* %1, i32 %2)
ret i32 %4
}
int prefix_Func(int something) {
#pragma critTer : 3 :../../ test / resources / functionNaming.c:
  int i;
#pragma critTer : 4 :../../ test / resources / functionNaming.c:
#pragma critTer : 5 :../../ test / resources / functionNaming.c:
  i = 2;
#pragma critTer : 6 :../../ test / resources / functionNaming.c:
}


x86 assembly (clang, -O0):
<prefix_Func>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @prefix_Func(i32 %0) {
ret i32 undef
}