xunge/DecIR huggingface dataset:
/* Type definitions */
struct pbst_table {
  int dummy;
};

/* Variables and functions */
void **pbst_probe(struct pbst_table *, void *);
void *pbst_insert(struct pbst_table *table, void *item) {
  void **p = pbst_probe(table, item);
  return p == NULL || *p == item ? NULL : *p;
}


x86 assembly (clang, -O0):
<pbst_insert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <pbst_probe@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     114d <pbst_insert+0x3d>
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
cmp    -0x10(%rbp),%rax
jne    1158 <pbst_insert+0x48>
xor    %eax,%eax
mov    %rax,-0x20(%rbp)
jmp    1163 <pbst_insert+0x53>
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pbst_insert>:
push   %rbx
mov    %rsi,%rbx
call   1030 <pbst_probe@plt>
test   %rax,%rax
je     112c <pbst_insert+0x1c>
mov    (%rax),%rcx
xor    %eax,%eax
cmp    %rbx,%rcx
cmovne %rcx,%rax
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.pbst_table = type { i32 }
define i8* @pbst_insert(%struct.pbst_table* %0, i8* %1) {
%3 = alloca %struct.pbst_table*
%4 = alloca i8*
%5 = alloca i8**
store %struct.pbst_table* %0, %struct.pbst_table** %3
store i8* %1, i8** %4
%6 = load %struct.pbst_table*, %struct.pbst_table** %3
%7 = load i8*, i8** %4
%8 = call i8** @pbst_probe(%struct.pbst_table* %6, i8* %7)
store i8** %8, i8*** %5
%9 = load i8**, i8*** %5
%10 = icmp eq i8** %9, null
br i1 %10, label %16, label %11
11: ; preds = %2
%12 = load i8**, i8*** %5
%13 = load i8*, i8** %12
%14 = load i8*, i8** %4
%15 = icmp eq i8* %13, %14
br i1 %15, label %16, label %17
16: ; preds = %11, %2
br label %20
17: ; preds = %11
%18 = load i8**, i8*** %5
%19 = load i8*, i8** %18
br label %20
20: ; preds = %17, %16
%21 = phi i8* [ null, %16 ], [ %19, %17 ]
ret i8* %21
}

LLVM IR (-O2):
%struct.pbst_table = type { i32 }
define i8* @pbst_insert(%struct.pbst_table* %0, i8* %1) {
%3 = tail call i8** @pbst_probe(%struct.pbst_table* %0, i8* %1)
%4 = icmp eq i8** %3, null
br i1 %4, label %9, label %5
5: ; preds = %2
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, %1
%8 = select i1 %7, i8* null, i8* %6
br label %9
9: ; preds = %5, %2
%10 = phi i8* [ null, %2 ], [ %8, %5 ]
ret i8* %10
}
void yy_1_TableInlineCell(char *yytext, int yyleng) {
  ;
  ;
}


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

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

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

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

/* Variables and functions */
scalar_t__ __memcmp(unsigned long *, unsigned long *, int);
int _CMP_EQ(unsigned long a, unsigned long b) {
  return (__memcmp(&a, &b, sizeof(a)) == 0);
}


x86 assembly (clang, -O0):
<_CMP_EQ>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x8,%edx
call   1030 <__memcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_CMP_EQ>:
sub    $0x18,%rsp
mov    %rdi,0x10(%rsp)
mov    %rsi,0x8(%rsp)
lea    0x10(%rsp),%rdi
lea    0x8(%rsp),%rsi
mov    $0x8,%edx
call   1030 <__memcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @_CMP_EQ(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = call i64 @__memcmp(i64* %3, i64* %4, i32 8)
%6 = icmp eq i64 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @_CMP_EQ(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = call i64 @__memcmp(i64* %3, i64* %4, i32 8)
%6 = icmp eq i64 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, long);
int main() { printf("%li\n", 10L); }


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

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"%li\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 10)
ret i32 0
}
int leap_days(int y1, int y2) {
  --y1;
  --y2;
  return (y2 / 4 - y1 / 4) - (y2 / 100 - y1 / 100) + (y2 / 400 - y1 / 400);
}


x86 assembly (clang, -O0):
<leap_days>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x4(%rbp),%eax
mov    $0x64,%esi
cltd
idiv   %esi
mov    %eax,%edx
mov    -0x10(%rbp),%eax
sub    %edx,%ecx
sub    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x190,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x4(%rbp),%eax
mov    $0x190,%esi
cltd
idiv   %esi
mov    %eax,%edx
mov    -0xc(%rbp),%eax
sub    %edx,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<leap_days>:
lea    -0x1(%rdi),%eax
lea    -0x1(%rsi),%edx
lea    0x2(%rsi),%r10d
test   %edx,%edx
cmovns %edx,%r10d
sar    $0x2,%r10d
add    $0x2,%edi
test   %eax,%eax
cmovns %eax,%edi
sar    $0x2,%edi
movslq %edx,%r8
imul   $0xffffffffae147ae1,%r8,%r11
mov    %r11,%rdx
shr    $0x3f,%rdx
sar    $0x25,%r11
add    %edx,%r11d
movslq %eax,%r9
imul   $0x51eb851f,%r9,%rdx
mov    %rdx,%rax
shr    $0x3f,%rax
sar    $0x25,%rdx
add    %eax,%edx
imul   $0x51eb851f,%r8,%rcx
mov    %rcx,%rax
shr    $0x3f,%rax
sar    $0x27,%rcx
add    %eax,%ecx
imul   $0xffffffffae147ae1,%r9,%rax
mov    %rax,%rsi
shr    $0x3f,%rsi
sar    $0x27,%rax
add    %esi,%eax
add    %edx,%eax
sub    %edi,%eax
add    %ecx,%eax
add    %r11d,%eax
add    %r10d,%eax
ret

LLVM IR (-O0):
define i32 @leap_days(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 = add nsw i32 %5, -1
store i32 %6, i32* %3
%7 = load i32, i32* %4
%8 = add nsw i32 %7, -1
store i32 %8, i32* %4
%9 = load i32, i32* %4
%10 = sdiv i32 %9, 4
%11 = load i32, i32* %3
%12 = sdiv i32 %11, 4
%13 = sub nsw i32 %10, %12
%14 = load i32, i32* %4
%15 = sdiv i32 %14, 100
%16 = load i32, i32* %3
%17 = sdiv i32 %16, 100
%18 = sub nsw i32 %15, %17
%19 = sub nsw i32 %13, %18
%20 = load i32, i32* %4
%21 = sdiv i32 %20, 400
%22 = load i32, i32* %3
%23 = sdiv i32 %22, 400
%24 = sub nsw i32 %21, %23
%25 = add nsw i32 %19, %24
ret i32 %25
}

LLVM IR (-O2):
define i32 @leap_days(i32 %0, i32 %1) {
%3 = add nsw i32 %0, -1
%4 = add nsw i32 %1, -1
%5 = sdiv i32 %4, 4
%6 = sdiv i32 %3, -4
%7 = sdiv i32 %4, -100
%8 = sdiv i32 %3, 100
%9 = sdiv i32 %4, 400
%10 = sdiv i32 %3, -400
%11 = add nsw i32 %8, %10
%12 = add nsw i32 %11, %6
%13 = add nsw i32 %12, %9
%14 = add nsw i32 %13, %7
%15 = add nsw i32 %14, %5
ret i32 %15
}
/* Type definitions */
struct pcibx_device {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ pcibx_write(struct pcibx_device *, int, int);
int /*<<< orphan*/ prsendinfo(char *);
void pcibx_cmd_aux33(struct pcibx_device *dev, int on) {
  if (on) {
    prsendinfo("Aux 3.3V ON");
    pcibx_write(dev, 0x66, 0);
  } else {
    prsendinfo("Aux 3.3V OFF");
    pcibx_write(dev, 0x66, 1);
  }
}


x86 assembly (clang, -O0):
<pcibx_cmd_aux33>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     115a <pcibx_cmd_aux33+0x3a>
lea    0xec0(%rip),%rdi
call   1040 <prsendinfo@plt>
mov    -0x8(%rbp),%rdi
mov    $0x66,%esi
xor    %edx,%edx
call   1030 <pcibx_write@plt>
jmp    1179 <pcibx_cmd_aux33+0x59>
lea    0xeab(%rip),%rdi
call   1040 <prsendinfo@plt>
mov    -0x8(%rbp),%rdi
mov    $0x66,%esi
mov    $0x1,%edx
call   1030 <pcibx_write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pcibx_cmd_aux33>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
xor    %ebp,%ebp
test   %esi,%esi
sete   %bpl
lea    0xed7(%rip),%rax
lea    0xec4(%rip),%rdi
cmove  %rax,%rdi
call   1040 <prsendinfo@plt>
mov    %rbx,%rdi
mov    $0x66,%esi
mov    %ebp,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <pcibx_write@plt>

LLVM IR (-O0):
%struct.pcibx_device = type { i32 }
@.str = [12 x i8] c"Aux 3.3V ON\00"
@.str.1 = [13 x i8] c"Aux 3.3V OFF\00"
define void @pcibx_cmd_aux33(%struct.pcibx_device* %0, i32 %1) {
%3 = alloca %struct.pcibx_device*
%4 = alloca i32
store %struct.pcibx_device* %0, %struct.pcibx_device** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %2
%8 = call i32 @prsendinfo(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%9 = load %struct.pcibx_device*, %struct.pcibx_device** %3
%10 = call i32 @pcibx_write(%struct.pcibx_device* %9, i32 102, i32 0)
br label %15
11: ; preds = %2
%12 = call i32 @prsendinfo(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%13 = load %struct.pcibx_device*, %struct.pcibx_device** %3
%14 = call i32 @pcibx_write(%struct.pcibx_device* %13, i32 102, i32 1)
br label %15
15: ; preds = %11, %7
ret void
}

LLVM IR (-O2):
%struct.pcibx_device = type { i32 }
@.str = [12 x i8] c"Aux 3.3V ON\00"
@.str.1 = [13 x i8] c"Aux 3.3V OFF\00"
define void @pcibx_cmd_aux33(%struct.pcibx_device* %0, i32 %1) {
%3 = icmp eq i32 %1, 0
%4 = select i1 %3, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0)
%5 = zext i1 %3 to i32
%6 = tail call i32 @prsendinfo(i8* %4)
%7 = tail call i32 @pcibx_write(%struct.pcibx_device* %0, i32 102, i32 %5)
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
void write24(uint8_t *base, uint32_t value) {
  base[0] = value & 0xff;
  base[1] = (value >> 8) & 0xff;
  base[2] = (value >> 16) & 0xff;
}


x86 assembly (clang, -O0):
<write24>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
and    $0xff,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0xc(%rbp),%ecx
sar    $0x8,%ecx
and    $0xff,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0xc(%rbp),%ecx
sar    $0x10,%ecx
and    $0xff,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<write24>:
mov    %esi,%eax
movzbl %al,%ecx
mov    %ecx,(%rdi)
movzbl %ah,%ecx
mov    %ecx,0x4(%rdi)
shr    $0x10,%eax
movzbl %al,%eax
mov    %eax,0x8(%rdi)
ret

LLVM IR (-O0):
define void @write24(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = and i32 %5, 255
%7 = load i32*, i32** %3
%8 = getelementptr inbounds i32, i32* %7, i64 0
store i32 %6, i32* %8
%9 = load i32, i32* %4
%10 = ashr i32 %9, 8
%11 = and i32 %10, 255
%12 = load i32*, i32** %3
%13 = getelementptr inbounds i32, i32* %12, i64 1
store i32 %11, i32* %13
%14 = load i32, i32* %4
%15 = ashr i32 %14, 16
%16 = and i32 %15, 255
%17 = load i32*, i32** %3
%18 = getelementptr inbounds i32, i32* %17, i64 2
store i32 %16, i32* %18
ret void
}

LLVM IR (-O2):
define void @write24(i32* nocapture writeonly %0, i32 %1) {
%3 = and i32 %1, 255
store i32 %3, i32* %0
%4 = lshr i32 %1, 8
%5 = and i32 %4, 255
%6 = getelementptr inbounds i32, i32* %0, i64 1
store i32 %5, i32* %6
%7 = lshr i32 %1, 16
%8 = and i32 %7, 255
%9 = getelementptr inbounds i32, i32* %0, i64 2
store i32 %8, i32* %9
ret void
}
void foo(int *p) {
  if (*p > 0) {
    *p = 1;
  } else {
    *p = 2;
  }
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpl   $0x0,(%rax)
jle    1124 <foo+0x24>
mov    -0x8(%rbp),%rax
movl   $0x1,(%rax)
jmp    112e <foo+0x2e>
mov    -0x8(%rbp),%rax
movl   $0x2,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
xor    %eax,%eax
cmpl   $0x0,(%rdi)
setle  %al
add    $0x1,%eax
mov    %eax,(%rdi)
ret

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

LLVM IR (-O2):
define void @foo(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = icmp slt i32 %2, 1
%4 = select i1 %3, i32 2, i32 1
store i32 %4, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ init_rnd_coder(int, char *);
unsigned char rndb();
void coder(unsigned char *ptr, int len, char *clave) {
  int n;
  init_rnd_coder(len, clave);
  for (n = 0; n < len; n++) {
    ptr[n] ^= rndb();
  }
}


x86 assembly (clang, -O0):
<coder>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x18(%rbp),%rsi
call   1030 <init_rnd_coder@plt>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    117b <coder+0x5b>
mov    $0x0,%al
call   1040 <rndb@plt>
movzbl %al,%esi
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movzbl (%rax,%rcx,1),%edx
xor    %esi,%edx
mov    %dl,(%rax,%rcx,1)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1146 <coder+0x26>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<coder>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebp
mov    %rdi,%r14
mov    %esi,%edi
mov    %rdx,%rsi
call   1030 <init_rnd_coder@plt>
test   %ebp,%ebp
jle    1154 <coder+0x34>
mov    %ebp,%ebp
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <rndb@plt>
xor    %al,(%r14,%rbx,1)
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1140 <coder+0x20>
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @coder(i8* %0, i32 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%8 = load i32, i32* %5
%9 = load i8*, i8** %6
%10 = call i32 @init_rnd_coder(i32 %8, i8* %9)
store i32 0, i32* %7
br label %11
11: ; preds = %26, %3
%12 = load i32, i32* %7
%13 = load i32, i32* %5
%14 = icmp slt i32 %12, %13
br i1 %14, label %15, label %29
15: ; preds = %11
%16 = call zeroext i8 (...) @rndb()
%17 = zext i8 %16 to i32
%18 = load i8*, i8** %4
%19 = load i32, i32* %7
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i8, i8* %18, i64 %20
%22 = load i8, i8* %21
%23 = zext i8 %22 to i32
%24 = xor i32 %23, %17
%25 = trunc i32 %24 to i8
store i8 %25, i8* %21
br label %26
26: ; preds = %15
%27 = load i32, i32* %7
%28 = add nsw i32 %27, 1
store i32 %28, i32* %7
br label %11
29: ; preds = %11
ret void
}

LLVM IR (-O2):
define void @coder(i8* nocapture %0, i32 %1, i8* %2) {
%4 = tail call i32 @init_rnd_coder(i32 %1, i8* %2)
%5 = icmp sgt i32 %1, 0
br i1 %5, label %6, label %16
6: ; preds = %3
%7 = zext i32 %1 to i64
br label %8
8: ; preds = %6, %8
%9 = phi i64 [ 0, %6 ], [ %14, %8 ]
%10 = tail call zeroext i8 (...) @rndb()
%11 = getelementptr inbounds i8, i8* %0, i64 %9
%12 = load i8, i8* %11
%13 = xor i8 %12, %10
store i8 %13, i8* %11
%14 = add nuw nsw i64 %9, 1
%15 = icmp eq i64 %14, %7
br i1 %15, label %16, label %8
16: ; preds = %8, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
void consumer(int x) { assert(x == 2); }


x86 assembly (clang, -O0):
<consumer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x2,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<consumer>:
xor    %eax,%eax
cmp    $0x2,%edi
sete   %al
mov    %eax,%edi
jmp    1030 <assert@plt>

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

LLVM IR (-O2):
define void @consumer(i32 %0) {
%2 = icmp eq i32 %0, 2
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
ret void
}
void atmel_atmega328_Mcu_shutdown__E() {}


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

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

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

LLVM IR (-O2):
define void @atmel_atmega328_Mcu_shutdown__E() {
ret void
}
void dbg_save_space_info(struct ubifs_info *c) { return; }


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

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

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

LLVM IR (-O2):
%struct.ubifs_info = type opaque
define void @dbg_save_space_info(%struct.ubifs_info* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printArray(int, int, int **);
int /*<<< orphan*/ setZero(int, int, int *);
int main(void) {
  int a[2][3] = {1, 2, 3, 4, 5, 6};
  setZero(2, 3, &a[0][0]);
  printArray(2, 3, a);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xec7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xec4(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    -0x20(%rbp),%rdx
mov    $0x2,%edi
mov    $0x3,%esi
call   1030 <setZero@plt>
lea    -0x20(%rbp),%rdx
mov    $0x2,%edi
mov    $0x3,%esi
call   1040 <printArray@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
mov    0xee4(%rip),%rax
mov    %rax,0x10(%rsp)
movaps 0xec8(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rbx
mov    $0x2,%edi
mov    $0x3,%esi
mov    %rbx,%rdx
call   1030 <setZero@plt>
mov    $0x2,%edi
mov    $0x3,%esi
mov    %rbx,%rdx
call   1040 <printArray@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.a = [2 x [3 x i32]] [[3 x i32] [i32 1, i32 2, i32 3], [3 x i32] [i32 4, i32 5, i32 6]]
define i32 @main() {
%1 = alloca i32
%2 = alloca [2 x [3 x i32]]
store i32 0, i32* %1
%3 = bitcast [2 x [3 x i32]]* %2 to i8*
%4 = getelementptr inbounds [2 x [3 x i32]], [2 x [3 x i32]]* %2, i64 0, i64 0
%5 = getelementptr inbounds [3 x i32], [3 x i32]* %4, i64 0, i64 0
%6 = call i32 @setZero(i32 2, i32 3, i32* %5)
%7 = getelementptr inbounds [2 x [3 x i32]], [2 x [3 x i32]]* %2, i64 0, i64 0
%8 = bitcast [3 x i32]* %7 to i32**
%9 = call i32 @printArray(i32 2, i32 3, i32** %8)
ret i32 0
}

LLVM IR (-O2):
@__const.main.a = [2 x [3 x i32]] [[3 x i32] [i32 1, i32 2, i32 3], [3 x i32] [i32 4, i32 5, i32 6]]
define i32 @main() {
%1 = alloca [2 x [3 x i32]]
%2 = bitcast [2 x [3 x i32]]* %1 to i8*
%3 = getelementptr inbounds [2 x [3 x i32]], [2 x [3 x i32]]* %1, i64 0, i64 0, i64 0
%4 = call i32 @setZero(i32 2, i32 3, i32* %3)
%5 = bitcast [2 x [3 x i32]]* %1 to i32**
%6 = call i32 @printArray(i32 2, i32 3, i32** %5)
ret i32 0
}
/* Variables and functions */
char getch();
int /*<<< orphan*/ printw(char *);
char get_movement() {
  printw("Enter movement: ");
  return getch();
}


x86 assembly (clang, -O0):
<get_movement>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printw@plt>
mov    $0x0,%al
call   1040 <getch@plt>
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_movement>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <printw@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <getch@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"Enter movement: \00"
define signext i8 @get_movement() {
%1 = call i32 @printw(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%2 = call signext i8 (...) @getch()
ret i8 %2
}

LLVM IR (-O2):
@.str = [17 x i8] c"Enter movement: \00"
define signext i8 @get_movement() {
%1 = tail call i32 @printw(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%2 = tail call signext i8 (...) @getch()
ret i8 %2
}
/* Variables and functions */
double tune_mpres_mul(size_t, int);
double tune_mpres_mul_redc(size_t n) { return tune_mpres_mul(n, 4); }


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

x86 assembly (clang, -O2):
<tune_mpres_mul_redc>:
mov    $0x4,%esi
jmp    1030 <tune_mpres_mul@plt>

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

LLVM IR (-O2):
define double @tune_mpres_mul_redc(i64 %0) {
%2 = tail call double @tune_mpres_mul(i64 %0, i32 4)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void func_string(char *p) { printf("%s\n", p); }


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

x86 assembly (clang, -O2):
<func_string>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
define void @func_string(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @func_string(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Type definitions */
struct timespec {
  int tv_sec;
};
struct mbox_int {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ mbox_put(struct mbox_int *, int);
int /*<<< orphan*/ thrd_sleep(struct timespec *, int /*<<< orphan*/ *);
int produce_thrd(void *arg) {
  struct mbox_int *x = arg;
  int i = 0;
  for (;;) {
    struct timespec ts = {
        .tv_sec = 1,
    };
    thrd_sleep(&ts, NULL);
    mbox_put(x, i);
    i++;
  }
}


x86 assembly (clang, -O0):
<produce_thrd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    0xebf(%rip),%eax
mov    %eax,-0x18(%rbp)
lea    -0x18(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <thrd_sleep@plt>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <mbox_put@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
mov    %eax,-0x14(%rbp)
jmp    113b <produce_thrd+0x1b>

x86 assembly (clang, -O2):
<produce_thrd>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%r14
xor    %ebx,%ebx
lea    0x8(%rsp),%r15
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movl   $0x1,0x8(%rsp)
mov    %r15,%rdi
xor    %esi,%esi
call   1040 <thrd_sleep@plt>
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <mbox_put@plt>
add    $0x1,%ebx
jmp    1140 <produce_thrd+0x20>

LLVM IR (-O0):
%struct.timespec = type { i32 }
%struct.mbox_int = type { i32 }
@__const.produce_thrd.ts = %struct.timespec { i32 1 }
define i32 @produce_thrd(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.mbox_int*
%4 = alloca i32
%5 = alloca %struct.timespec
store i8* %0, i8** %2
%6 = load i8*, i8** %2
%7 = bitcast i8* %6 to %struct.mbox_int*
store %struct.mbox_int* %7, %struct.mbox_int** %3
store i32 0, i32* %4
br label %8
8: ; preds = %8, %1
%9 = bitcast %struct.timespec* %5 to i8*
%10 = call i32 @thrd_sleep(%struct.timespec* %5, i32* null)
%11 = load %struct.mbox_int*, %struct.mbox_int** %3
%12 = load i32, i32* %4
%13 = call i32 @mbox_put(%struct.mbox_int* %11, i32 %12)
%14 = load i32, i32* %4
%15 = add nsw i32 %14, 1
store i32 %15, i32* %4
br label %8
}

LLVM IR (-O2):
%struct.timespec = type { i32 }
%struct.mbox_int = type { i32 }
define i32 @produce_thrd(i8* %0) {
%2 = alloca %struct.timespec
%3 = bitcast i8* %0 to %struct.mbox_int*
%4 = bitcast %struct.timespec* %2 to i8*
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i64 0, i32 0
br label %6
6: ; preds = %6, %1
%7 = phi i32 [ 0, %1 ], [ %10, %6 ]
store i32 1, i32* %5
%8 = call i32 @thrd_sleep(%struct.timespec* %2, i32* null)
%9 = call i32 @mbox_put(%struct.mbox_int* %3, i32 %7)
%10 = add nuw nsw i32 %7, 1
br label %6
}
void set_smram(void) {}


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

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

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

LLVM IR (-O2):
define void @set_smram() {
ret void
}
int hexdig(int c) {
  if (c <= '9')
    return c - '0';
  else if (c <= 'F')
    return c - 'A' + 10;
  else
    return c - 'a' + 10;
}


x86 assembly (clang, -O0):
<hexdig>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x39,-0x8(%rbp)
jg     111f <hexdig+0x1f>
mov    -0x8(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x4(%rbp)
jmp    1146 <hexdig+0x46>
cmpl   $0x46,-0x8(%rbp)
jg     113a <hexdig+0x3a>
mov    -0x8(%rbp),%eax
sub    $0x41,%eax
add    $0xa,%eax
mov    %eax,-0x4(%rbp)
jmp    1146 <hexdig+0x46>
mov    -0x8(%rbp),%eax
sub    $0x61,%eax
add    $0xa,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hexdig>:
xor    %ecx,%ecx
cmp    $0x47,%edi
setb   %cl
shl    $0x5,%ecx
add    $0xffffffa9,%ecx
cmp    $0x3a,%edi
mov    $0xffffffd0,%eax
cmovge %ecx,%eax
add    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @hexdig(i32 %0) {
%2 = icmp slt i32 %0, 58
%3 = icmp ult i32 %0, 71
%4 = select i1 %3, i32 -55, i32 -87
%5 = select i1 %2, i32 -48, i32 %4
%6 = add nsw i32 %5, %0
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ MSG_NOSIGNAL;
int recv(int, char *, int, int /*<<< orphan*/);
int comms_recv(int socketfd, char *data, int data_len) {
  return recv(socketfd, data, data_len, MSG_NOSIGNAL);
}


x86 assembly (clang, -O0):
<comms_recv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    0x2ead(%rip),%rax
mov    (%rax),%ecx
call   1030 <recv@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<comms_recv>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%ecx
jmp    1030 <recv@plt>

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

LLVM IR (-O2):
@MSG_NOSIGNAL = global i32 0
define i32 @comms_recv(i32 %0, i8* %1, i32 %2) {
%4 = load i32, i32* @MSG_NOSIGNAL
%5 = tail call i32 @recv(i32 %0, i8* %1, i32 %2, i32 %4)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ my_is_good_fftw_size(int);
int my_next_good_fftw2_size(int size) {
  while (!my_is_good_fftw_size(size)) {
    size++;
  }
  return size;
}


x86 assembly (clang, -O0):
<my_next_good_fftw2_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <my_is_good_fftw_size@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1138 <my_next_good_fftw2_size+0x28>
jmp    1146 <my_next_good_fftw2_size+0x36>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111b <my_next_good_fftw2_size+0xb>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_next_good_fftw2_size>:
push   %rbx
mov    %edi,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %ebx,%edi
call   1030 <my_is_good_fftw_size@plt>
add    $0x1,%ebx
test   %eax,%eax
je     1120 <my_next_good_fftw2_size+0x10>
add    $0xffffffff,%ebx
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @my_next_good_fftw2_size(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ %0, %1 ], [ %6, %2 ]
%4 = tail call i32 @my_is_good_fftw_size(i32 %3)
%5 = icmp eq i32 %4, 0
%6 = add nsw i32 %3, 1
br i1 %5, label %2, label %7
7: ; preds = %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *argv0) {
  fprintf(stderr,
          "Usage: %s -h hostname [-b second_hostname]\n"
          "\t\t   [-i min_interval -m max_interval "
          "(0<=min_interval<=max_interval)]\n"
          "\t\t   [-c count] [-p local_port] [-d] [-s]\n",
          argv0);
}


x86 assembly (clang, -O0):
<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):
<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 = [157 x i8] c"Usage: %s -h hostname [-b second_hostname]\0A\09\09 [-i min_interval -m max_interval (0<=min_interval<=max_interval)]\0A\09\09 [-c count] [-p local_port] [-d] [-s]\0A\00"
define void @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 ([157 x i8], [157 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [157 x i8] c"Usage: %s -h hostname [-b second_hostname]\0A\09\09 [-i min_interval -m max_interval (0<=min_interval<=max_interval)]\0A\09\09 [-c count] [-p local_port] [-d] [-s]\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([157 x i8], [157 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Cvar_InfoString(int, void *);
int /*<<< orphan*/ Q_strncpyz(char *, int /*<<< orphan*/, int);
void Cvar_InfoStringBuffer(int bit, char *buff, int buffsize) {
  Q_strncpyz(buff, Cvar_InfoString(bit, ((void *)0)), buffsize);
}


x86 assembly (clang, -O0):
<Cvar_InfoStringBuffer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x4(%rbp),%edi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <Cvar_InfoString@plt>
mov    -0x20(%rbp),%rdi
mov    %eax,%esi
mov    -0x14(%rbp),%edx
call   1040 <Q_strncpyz@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cvar_InfoStringBuffer>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebp
mov    %rsi,%rbx
xor    %esi,%esi
call   1030 <Cvar_InfoString@plt>
mov    %rbx,%rdi
mov    %eax,%esi
mov    %ebp,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <Q_strncpyz@plt>

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

LLVM IR (-O2):
define void @Cvar_InfoStringBuffer(i32 %0, i8* %1, i32 %2) {
%4 = tail call i32 @Cvar_InfoString(i32 %0, i8* null)
%5 = tail call i32 @Q_strncpyz(i8* %1, i32 %4, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) { fprintf(stderr, "usage: eth_over_serial <tap> <serial>\n"); }


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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [39 x i8] c"usage: eth_over_serial <tap> <serial>\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [39 x i8] c"usage: eth_over_serial <tap> <serial>\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void __y_s_destructor(void *obj) { printf("y_s destructor\n"); }


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

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

LLVM IR (-O0):
@.str = [16 x i8] c"y_s destructor\0A\00"
define void @__y_s_destructor(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [15 x i8] c"y_s destructor\00"
define void @__y_s_destructor(i8* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
ret void
}
void ecm_sfe_multicast_ipv4_init(void) { return; }


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

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

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

LLVM IR (-O2):
define void @ecm_sfe_multicast_ipv4_init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *, size_t, int);
void imprimir(const char *nomeDoVetor, int *vetor, size_t size) {
  size_t i;
  for (i = 0; i < size; i++) {
    printf("%s[%d] = %d\n", nomeDoVetor, i, vetor[i]);
  }
}


x86 assembly (clang, -O0):
<imprimir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x18(%rbp),%rax
jae    116a <imprimir+0x5a>
mov    -0x8(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    (%rax,%rcx,4),%ecx
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    112c <imprimir+0x1c>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<imprimir>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
test   %rdx,%rdx
je     114b <imprimir+0x3b>
mov    %rdx,%r12
mov    %rsi,%r14
mov    %rdi,%r15
xor    %ebx,%ebx
lea    0xed0(%rip),%r13
mov    (%r14,%rbx,4),%ecx
mov    %r13,%rdi
mov    %r15,%rsi
mov    %rbx,%rdx
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <imprimir+0x20>
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [13 x i8] c"%s[%d] = %d\0A\00"
define void @imprimir(i8* %0, i32* nocapture %1, i64 %2) {
%4 = icmp eq i64 %2, 0
br i1 %4, label %12, label %5
5: ; preds = %3, %5
%6 = phi i64 [ %10, %5 ], [ 0, %3 ]
%7 = getelementptr inbounds i32, i32* %1, i64 %6
%8 = load i32, i32* %7
%9 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %0, i64 %6, i32 %8)
%10 = add nuw i64 %6, 1
%11 = icmp eq i64 %10, %2
br i1 %11, label %12, label %5
12: ; preds = %5, %3
ret void
}
void d_putul(unsigned char *ptr, unsigned long data) {
  *ptr++ = (data & 0xff000000UL) >> 24;
  *ptr++ = (data & 0x00ff0000UL) >> 16;
  *ptr++ = (data & 0x0000ff00UL) >> 8;
  *ptr = (data & 0x000000ffUL) >> 0;
}


x86 assembly (clang, -O0):
<d_putul>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movabs $0xff000000,%rax
and    -0x10(%rbp),%rax
shr    $0x18,%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
and    $0xff0000,%rax
shr    $0x10,%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
and    $0xff00,%rax
shr    $0x8,%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
and    $0xff,%rax
shr    $0x0,%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @d_putul(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = and i64 %5, 4278190080
%7 = lshr i64 %6, 24
%8 = trunc i64 %7 to i8
%9 = load i8*, i8** %3
%10 = getelementptr inbounds i8, i8* %9, i32 1
store i8* %10, i8** %3
store i8 %8, i8* %9
%11 = load i64, i64* %4
%12 = and i64 %11, 16711680
%13 = lshr i64 %12, 16
%14 = trunc i64 %13 to i8
%15 = load i8*, i8** %3
%16 = getelementptr inbounds i8, i8* %15, i32 1
store i8* %16, i8** %3
store i8 %14, i8* %15
%17 = load i64, i64* %4
%18 = and i64 %17, 65280
%19 = lshr i64 %18, 8
%20 = trunc i64 %19 to i8
%21 = load i8*, i8** %3
%22 = getelementptr inbounds i8, i8* %21, i32 1
store i8* %22, i8** %3
store i8 %20, i8* %21
%23 = load i64, i64* %4
%24 = and i64 %23, 255
%25 = lshr i64 %24, 0
%26 = trunc i64 %25 to i8
%27 = load i8*, i8** %3
store i8 %26, i8* %27
ret void
}

LLVM IR (-O2):
define void @d_putul(i8* nocapture writeonly %0, i64 %1) {
%3 = lshr i64 %1, 24
%4 = trunc i64 %3 to i8
%5 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %4, i8* %0
%6 = lshr i64 %1, 16
%7 = trunc i64 %6 to i8
%8 = getelementptr inbounds i8, i8* %0, i64 2
store i8 %7, i8* %5
%9 = lshr i64 %1, 8
%10 = trunc i64 %9 to i8
%11 = getelementptr inbounds i8, i8* %0, i64 3
store i8 %10, i8* %8
%12 = trunc i64 %1 to i8
store i8 %12, i8* %11
ret void
}
/* Variables and functions */
scalar_t__ strcmp(char const *, char const *);
int gagnerMastermind(const char *code, const char *tentative) {
  if (strcmp(code, tentative) == 0)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<gagnerMastermind>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1143 <gagnerMastermind+0x33>
movl   $0x1,-0x4(%rbp)
jmp    114a <gagnerMastermind+0x3a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gagnerMastermind>:
push   %rax
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @gagnerMastermind(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 i8*, i8** %4
%7 = load i8*, i8** %5
%8 = call i64 @strcmp(i8* %6, i8* %7)
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %2
store i32 1, i32* %3
br label %12
11: ; preds = %2
store i32 0, i32* %3
br label %12
12: ; preds = %11, %10
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
define i32 @gagnerMastermind(i8* %0, i8* %1) {
%3 = tail call i64 @strcmp(i8* %0, i8* %1)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void timeout() {
  fprintf(stderr, "No response from modem.\n");
  exit(2);
}


x86 assembly (clang, -O0):
<timeout>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x2,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<timeout>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x2,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [25 x i8] c"No response from modem.\0A\00"
define void @timeout() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 2)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [25 x i8] c"No response from modem.\0A\00"
define void @timeout() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 2)
unreachable
}
void w11(void *x, long long y) { *(long long *)(x + 32757) = y; }


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

x86 assembly (clang, -O2):
<w11>:
mov    %rsi,0x7ff5(%rdi)
ret

LLVM IR (-O0):
define void @w11(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i8*, i8** %3
%7 = getelementptr i8, i8* %6, i64 32757
%8 = bitcast i8* %7 to i64*
store i64 %5, i64* %8
ret void
}

LLVM IR (-O2):
define void @w11(i8* nocapture writeonly %0, i64 %1) {
%3 = getelementptr i8, i8* %0, i64 32757
%4 = bitcast i8* %3 to i64*
store i64 %1, i64* %4
ret void
}
int maior(int x, int y) {
  if (x > y)
    return x;
  return y;
}


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

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

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

LLVM IR (-O2):
define i32 @maior(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ tbit(int, int);
int main() {
  int k, b;
  k = 1;
  b = 0;
  tbit(k, b);
  k = 100;
  b = 0;
  tbit(k, b);
  k = 1;
  b = 1;
  tbit(k, b);
  k = 100;
  b = 1;
  tbit(k, b);
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 1, i32* %1
store i32 0, i32* %2
%3 = load i32, i32* %1
%4 = load i32, i32* %2
%5 = call i32 @tbit(i32 %3, i32 %4)
store i32 100, i32* %1
store i32 0, i32* %2
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = call i32 @tbit(i32 %6, i32 %7)
store i32 1, i32* %1
store i32 1, i32* %2
%9 = load i32, i32* %1
%10 = load i32, i32* %2
%11 = call i32 @tbit(i32 %9, i32 %10)
store i32 100, i32* %1
store i32 1, i32* %2
%12 = load i32, i32* %1
%13 = load i32, i32* %2
%14 = call i32 @tbit(i32 %12, i32 %13)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @tbit(i32 1, i32 0)
%2 = tail call i32 @tbit(i32 100, i32 0)
%3 = tail call i32 @tbit(i32 1, i32 1)
%4 = tail call i32 @tbit(i32 100, i32 1)
ret i32 0
}