xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void forloop() {
  for (int i = 0; i < 5; i++) {
    printf("%d\n", i);
  }
}


x86 assembly (clang, -O0):
<forloop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x5,-0x4(%rbp)
jge    1146 <forloop+0x36>
mov    -0x4(%rbp),%esi
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <forloop+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<forloop>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
pop    %rbx
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @forloop() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 0)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 1)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 2)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 4)
ret void
}
double compound_interest(double amount, double rate, int years) {
  double new_amount = 0.0;
  return new_amount;
}


x86 assembly (clang, -O0):
<compound_interest>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    %edi,-0x14(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<compound_interest>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @compound_interest(double %0, double %1, i32 %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca i32
%7 = alloca double
store double %0, double* %4
store double %1, double* %5
store i32 %2, i32* %6
store double 0.000000e+00, double* %7
%8 = load double, double* %7
ret double %8
}

LLVM IR (-O2):
define double @compound_interest(double %0, double %1, i32 %2) {
ret double 0.000000e+00
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ gira(int *);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int a[4] = {1, 2, 3, 4};
  printf("Antes de entrar %i\n", a[0]);
  gira(a);
  printf("Despues del cambio %i\n", a[0]);
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeba(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xeb7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%esi
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
lea    -0x20(%rbp),%rdi
call   1050 <gira@plt>
mov    -0x20(%rbp),%esi
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movaps 0xec5(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0xeca(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
mov    %rsp,%rdi
call   1050 <gira@plt>
mov    (%rsp),%esi
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@__const.main.a = [4 x i32] [i32 1, i32 2, i32 3, i32 4]
@.str = [20 x i8] c"Antes de entrar %i\0A\00"
@.str.1 = [23 x i8] c"Despues del cambio %i\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [4 x i32]
store i32 0, i32* %1
%3 = bitcast [4 x i32]* %2 to i8*
%4 = getelementptr inbounds [4 x i32], [4 x i32]* %2, i64 0, i64 0
%5 = load i32, i32* %4
%6 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = getelementptr inbounds [4 x i32], [4 x i32]* %2, i64 0, i64 0
%8 = call i32 @gira(i32* %7)
%9 = getelementptr inbounds [4 x i32], [4 x i32]* %2, i64 0, i64 0
%10 = load i32, i32* %9
%11 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i32 %10)
%12 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@__const.main.a = [4 x i32] [i32 1, i32 2, i32 3, i32 4]
@.str = [20 x i8] c"Antes de entrar %i\0A\00"
@.str.1 = [23 x i8] c"Despues del cambio %i\0A\00"
define i32 @main() {
%1 = alloca [4 x i32]
%2 = bitcast [4 x i32]* %1 to i8*
%3 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 0
%4 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 1)
%5 = call i32 @gira(i32* %3)
%6 = load i32, i32* %3
%7 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i32 %6)
%8 = call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ md5(void const *, int, unsigned char *);
int /*<<< orphan*/ write_hex(unsigned char *, char *);
void md5_hex(const void *input, int ilen, char *hexstr) {
  unsigned char out[16];
  md5(input, ilen, out);
  write_hex(out, hexstr);
}


x86 assembly (clang, -O0):
<md5_hex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
lea    -0x30(%rbp),%rdx
call   1040 <md5@plt>
lea    -0x30(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <write_hex@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<md5_hex>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %rdx,%rbx
mov    %rsp,%r14
mov    %r14,%rdx
call   1040 <md5@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <write_hex@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @md5_hex(i8* %0, i32 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
%7 = alloca [16 x i8]
store i8* %0, i8** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%8 = load i8*, i8** %4
%9 = load i32, i32* %5
%10 = getelementptr inbounds [16 x i8], [16 x i8]* %7, i64 0, i64 0
%11 = call i32 @md5(i8* %8, i32 %9, i8* %10)
%12 = getelementptr inbounds [16 x i8], [16 x i8]* %7, i64 0, i64 0
%13 = load i8*, i8** %6
%14 = call i32 @write_hex(i8* %12, i8* %13)
ret void
}

LLVM IR (-O2):
define void @md5_hex(i8* %0, i32 %1, i8* %2) {
%4 = alloca [16 x i8]
%5 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 0
%6 = call i32 @md5(i8* %0, i32 %1, i8* %5)
%7 = call i32 @write_hex(i8* %5, i8* %2)
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ red_mask;
};
typedef TYPE_1__ XImage;

/* Variables and functions */
unsigned long get_XImage_red_mask(void *_p) {
  return (unsigned long)((XImage *)_p)->red_mask;
}


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

x86 assembly (clang, -O2):
<get_XImage_red_mask>:
mov    (%rdi),%rax
ret

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

LLVM IR (-O2):
define i64 @get_XImage_red_mask(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
/* Variables and functions */
unsigned int crc32(unsigned char *, int);
int /*<<< orphan*/ send_frame(unsigned char *, int);
void put_frame(unsigned char *frame, int len) {
  *(unsigned int *)(frame + len) = crc32(frame, len);
  send_frame(frame, len + sizeof(unsigned int));
}


x86 assembly (clang, -O0):
<put_frame>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <crc32@plt>
mov    %eax,%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,1)
mov    -0x8(%rbp),%rdi
movslq -0xc(%rbp),%rax
add    $0x4,%rax
mov    %eax,%esi
call   1040 <send_frame@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<put_frame>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1030 <crc32@plt>
movslq %ebp,%rsi
mov    %eax,(%rbx,%rsi,1)
add    $0x4,%esi
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <send_frame@plt>

LLVM IR (-O0):
define void @put_frame(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 @crc32(i8* %5, i32 %6)
%8 = load i8*, i8** %3
%9 = load i32, i32* %4
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i8, i8* %8, i64 %10
%12 = bitcast i8* %11 to i32*
store i32 %7, i32* %12
%13 = load i8*, i8** %3
%14 = load i32, i32* %4
%15 = sext i32 %14 to i64
%16 = add i64 %15, 4
%17 = trunc i64 %16 to i32
%18 = call i32 @send_frame(i8* %13, i32 %17)
ret void
}

LLVM IR (-O2):
define void @put_frame(i8* %0, i32 %1) {
%3 = tail call i32 @crc32(i8* %0, i32 %1)
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = bitcast i8* %5 to i32*
store i32 %3, i32* %6
%7 = add i32 %1, 4
%8 = tail call i32 @send_frame(i8* %0, i32 %7)
ret void
}
int str_cnt(char *arr) {
  int cnt = 0;
  while (*arr != '\0') {
    arr++;
    ;
    cnt++;
  }
  return cnt;
}


x86 assembly (clang, -O0):
<str_cnt>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1139 <str_cnt+0x39>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <str_cnt+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_cnt>:
cmpb   $0x0,(%rdi)
je     111c <str_cnt+0x1c>
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <str_cnt+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @str_cnt(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %8, %4 ], [ 0, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = add nuw nsw i32 %5, 1
%9 = load i8, i8* %7
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i32 [ 0, %1 ], [ %8, %4 ]
ret i32 %12
}
int ACCEPT(int sockfd, void *peer, int *addrlen) { return 1; }


x86 assembly (clang, -O0):
<ACCEPT>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0x1,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @ACCEPT(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
ret i32 1
}

LLVM IR (-O2):
define i32 @ACCEPT(i32 %0, i8* nocapture readnone %1, i32* nocapture readnone %2) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("Viva Peron!\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [12 x i8] c"Viva Peron!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret i32 0
}
long CANIntNumberGet(unsigned long ulBase) {
  long lIntNumber;
  switch (ulBase) {
  case 0x40040000: {
    lIntNumber = 55;
    break;
  }
  case 0x40041000: {
    lIntNumber = 56;
    break;
  }
  case 0x40042000: {
    lIntNumber = 57;
    break;
  }
  default: {
    lIntNumber = -1;
  }
  }
  return (lIntNumber);
}


x86 assembly (clang, -O0):
<CANIntNumberGet>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
sub    $0x40040000,%rax
je     114b <CANIntNumberGet+0x4b>
jmp    1121 <CANIntNumberGet+0x21>
mov    -0x18(%rbp),%rax
sub    $0x40041000,%rax
je     1158 <CANIntNumberGet+0x58>
jmp    1136 <CANIntNumberGet+0x36>
mov    -0x18(%rbp),%rax
sub    $0x40042000,%rax
je     1165 <CANIntNumberGet+0x65>
jmp    1172 <CANIntNumberGet+0x72>
movq   $0x37,-0x10(%rbp)
jmp    117a <CANIntNumberGet+0x7a>
movq   $0x38,-0x10(%rbp)
jmp    117a <CANIntNumberGet+0x7a>
movq   $0x39,-0x10(%rbp)
jmp    117a <CANIntNumberGet+0x7a>
movq   $0xffffffffffffffff,-0x10(%rbp)
ff
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<CANIntNumberGet>:
cmp    $0x40040000,%rdi
je     1121 <CANIntNumberGet+0x21>
cmp    $0x40042000,%rdi
je     1127 <CANIntNumberGet+0x27>
cmp    $0x40041000,%rdi
jne    112d <CANIntNumberGet+0x2d>
mov    $0x38,%eax
ret
mov    $0x37,%eax
ret
mov    $0x39,%eax
ret
mov    $0xffffffffffffffff,%rax
ret

LLVM IR (-O0):
define i64 @CANIntNumberGet(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
%4 = load i64, i64* %2
switch i64 %4, label %8 [
i64 1074003968, label %5
i64 1074008064, label %6
i64 1074012160, label %7
]
5: ; preds = %1
store i64 55, i64* %3
br label %9
6: ; preds = %1
store i64 56, i64* %3
br label %9
7: ; preds = %1
store i64 57, i64* %3
br label %9
8: ; preds = %1
store i64 -1, i64* %3
br label %9
9: ; preds = %8, %7, %6, %5
%10 = load i64, i64* %3
ret i64 %10
}

LLVM IR (-O2):
define i64 @CANIntNumberGet(i64 %0) {
switch i64 %0, label %4 [
i64 1074003968, label %5
i64 1074008064, label %2
i64 1074012160, label %3
]
2: ; preds = %1
br label %5
3: ; preds = %1
br label %5
4: ; preds = %1
br label %5
5: ; preds = %1, %4, %3, %2
%6 = phi i64 [ -1, %4 ], [ 57, %3 ], [ 56, %2 ], [ 55, %1 ]
ret i64 %6
}
/* Variables and functions */
int /*<<< orphan*/ alloc_die(unsigned int);
char *malloc(unsigned int);
int /*<<< orphan*/ strcpy(char *, char const *);
int strlen(char const *);
char *xstrdup(const char *s) {
  unsigned int siz = strlen(s) + 1;
  char *d = malloc(siz);
  if (!d)
    alloc_die(siz);
  strcpy(d, s);
  return d;
}


x86 assembly (clang, -O0):
<xstrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <strlen@plt>
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1060 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    117a <xstrdup+0x3a>
mov    -0xc(%rbp),%edi
call   1040 <alloc_die@plt>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstrdup>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%r14
call   1050 <strlen@plt>
mov    %eax,%ebp
add    $0x1,%ebp
mov    %ebp,%edi
call   1060 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1167 <xstrdup+0x27>
mov    %ebp,%edi
call   1040 <alloc_die@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i8* @xstrdup(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add nsw i32 %2, 1
%4 = tail call i8* @malloc(i32 %3)
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = tail call i32 @alloc_die(i32 %3)
br label %8
8: ; preds = %6, %1
%9 = tail call i32 @strcpy(i8* %4, i8* %0)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ record_linux_param_description(char *, char *, char *);
void module_param_desc_alpha(void) {
  record_linux_param_description(
      "tcp_vegas.c", "alpha", "lower bound of packets in network (scale by 2)");
}


x86 assembly (clang, -O0):
<module_param_desc_alpha>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xeea(%rip),%rsi
lea    0xee9(%rip),%rdx
call   1030 <record_linux_param_description@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<module_param_desc_alpha>:
lea    0xee9(%rip),%rdi
lea    0xeee(%rip),%rsi
lea    0xeed(%rip),%rdx
jmp    1030 <record_linux_param_description@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"tcp_vegas.c\00"
@.str.1 = [6 x i8] c"alpha\00"
@.str.2 = [47 x i8] c"lower bound of packets in network (scale by 2)\00"
define void @module_param_desc_alpha() {
%1 = call i32 @record_linux_param_description(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"tcp_vegas.c\00"
@.str.1 = [6 x i8] c"alpha\00"
@.str.2 = [47 x i8] c"lower bound of packets in network (scale by 2)\00"
define void @module_param_desc_alpha() {
%1 = tail call i32 @record_linux_param_description(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ *malloc_mbstowcs(char *);
wchar_t *realloc_mbstowcs(char *s) {
  wchar_t *result = malloc_mbstowcs(s);
  free(s);
  return result;
}


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

x86 assembly (clang, -O2):
<realloc_mbstowcs>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1040 <malloc_mbstowcs@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32* @realloc_mbstowcs(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32* @malloc_mbstowcs(i8* %4)
store i32* %5, i32** %3
%6 = load i8*, i8** %2
%7 = call i32 @free(i8* %6)
%8 = load i32*, i32** %3
ret i32* %8
}

LLVM IR (-O2):
define i32* @realloc_mbstowcs(i8* %0) {
%2 = tail call i32* @malloc_mbstowcs(i8* %0)
%3 = tail call i32 @free(i8* %0)
ret i32* %2
}
/* Variables and functions */
int /*<<< orphan*/ ECHILD;
int /*<<< orphan*/ errno;
int _wait(int *status) {
  (void)status;
  errno = ECHILD;
  return -1;
}


x86 assembly (clang, -O0):
<_wait>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    0x2ec9(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec8(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_wait>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%eax
mov    0x2ed0(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@ECHILD = global i32 0
@errno = global i32 0
define i32 @_wait(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* @ECHILD
store i32 %4, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@ECHILD = global i32 0
@errno = global i32 0
define i32 @_wait(i32* nocapture readnone %0) {
%2 = load i32, i32* @ECHILD
store i32 %2, i32* @errno
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ yield();
void adjust_frame() {
  yield();
  return;
}


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

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

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

LLVM IR (-O2):
define void @adjust_frame() {
%1 = tail call i32 (...) @yield()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "Usage: pmap [-x | -d] [-q] [-A low,high] pid...\n"
                  "-x  show details\n"
                  "-d  show offset and device number\n"
                  "-q  quiet; less header/footer info\n"
                  "-V  show the version number\n"
                  "-A  limit results to the given range\n");
  exit(1);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [200 x i8] c"Usage: pmap [-x | -d] [-q] [-A low,high] pid...\0A-x show details\0A-d show offset and device number\0A-q quiet; less header/footer info\0A-V show the version number\0A-A limit results to the given range\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([200 x i8], [200 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [200 x i8] c"Usage: pmap [-x | -d] [-q] [-A low,high] pid...\0A-x show details\0A-d show offset and device number\0A-q quiet; less header/footer info\0A-V show the version number\0A-A limit results to the given range\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([200 x i8], [200 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
int f_blt_mr1(float *a1, float a2) { return (__builtin_isless(*a1, a2)); }


x86 assembly (clang, -O0):
<f_blt_mr1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm1
movss  -0xc(%rbp),%xmm0
ucomiss %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_blt_mr1>:
xor    %eax,%eax
ucomiss (%rdi),%xmm0
seta   %al
ret

LLVM IR (-O0):
define i32 @f_blt_mr1(float* %0, float %1) {
%3 = alloca float*
%4 = alloca float
store float* %0, float** %3
store float %1, float* %4
%5 = load float*, float** %3
%6 = load float, float* %5
%7 = load float, float* %4
%8 = fcmp olt float %6, %7
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @f_blt_mr1(float* nocapture %0, float %1) {
%3 = load float, float* %0
%4 = fcmp olt float %3, %1
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void test_vorr_u32x2(uint32_t *__restrict__ dest, uint32_t *a, uint32_t *b) {
  int i;
  for (i = 0; i < 2; i++) {
    dest[i] = a[i] | b[i];
  }
}


x86 assembly (clang, -O0):
<test_vorr_u32x2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x2,-0x1c(%rbp)
jge    1150 <test_vorr_u32x2+0x50>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
or     (%rax,%rcx,4),%edx
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1117 <test_vorr_u32x2+0x17>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_vorr_u32x2>:
mov    (%rdx),%eax
or     (%rsi),%eax
mov    %eax,(%rdi)
mov    0x4(%rdx),%eax
or     0x4(%rsi),%eax
mov    %eax,0x4(%rdi)
ret

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

LLVM IR (-O2):
define void @test_vorr_u32x2(i32* noalias nocapture writeonly %0, i32* nocapture %1, i32* nocapture %2) {
%4 = load i32, i32* %1
%5 = load i32, i32* %2
%6 = or i32 %5, %4
store i32 %6, i32* %0
%7 = getelementptr inbounds i32, i32* %1, i64 1
%8 = load i32, i32* %7
%9 = getelementptr inbounds i32, i32* %2, i64 1
%10 = load i32, i32* %9
%11 = or i32 %10, %8
%12 = getelementptr inbounds i32, i32* %0, i64 1
store i32 %11, i32* %12
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *,
                           char const *, char const *, char const *,
                           char const *, char const *, char const *);
int /*<<< orphan*/ stderr;
void message7(const char *a, const char *b, const char *c, const char *d,
              const char *e, const char *f, const char *g) {
  fprintf(stderr, "%s%s%s%s%s%s%s\n", a, b, c, d, e, f, g);
}


x86 assembly (clang, -O0):
<message7>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8
mov    -0x20(%rbp),%r9
mov    -0x28(%rbp),%r11
mov    -0x30(%rbp),%r10
mov    0x10(%rbp),%rax
lea    0xea0(%rip),%rsi
mov    %r11,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
call   1030 <fprintf@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<message7>:
push   %rax
mov    %r9,%rax
mov    %r8,%r10
mov    %rcx,%r9
mov    %rdx,%r8
mov    %rsi,%rcx
mov    %rdi,%rdx
mov    0x2eb6(%rip),%rsi
mov    (%rsi),%edi
sub    $0x8,%rsp
lea    0xec9(%rip),%rsi
push   0x18(%rsp)
push   %rax
push   %r10
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rax
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [16 x i8] c"%s%s%s%s%s%s%s\0A\00"
define void @message7(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4, i8* %5, i8* %6) {
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i8*
%14 = alloca i8*
store i8* %0, i8** %8
store i8* %1, i8** %9
store i8* %2, i8** %10
store i8* %3, i8** %11
store i8* %4, i8** %12
store i8* %5, i8** %13
store i8* %6, i8** %14
%15 = load i32, i32* @stderr
%16 = load i8*, i8** %8
%17 = load i8*, i8** %9
%18 = load i8*, i8** %10
%19 = load i8*, i8** %11
%20 = load i8*, i8** %12
%21 = load i8*, i8** %13
%22 = load i8*, i8** %14
%23 = call i32 @fprintf(i32 %15, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %16, i8* %17, i8* %18, i8* %19, i8* %20, i8* %21, i8* %22)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [16 x i8] c"%s%s%s%s%s%s%s\0A\00"
define void @message7(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4, i8* %5, i8* %6) {
%8 = load i32, i32* @stderr
%9 = tail call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1, i8* %2, i8* %3, i8* %4, i8* %5, i8* %6)
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int int16_t;

/* Variables and functions */
int16_t bufToInt16(uint8_t *buf) { return (buf[0] << 8) | (buf[1] << 0); }


x86 assembly (clang, -O0):
<bufToInt16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
mov    0x4(%rcx),%ecx
shl    $0x0,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bufToInt16>:
mov    (%rdi),%eax
shl    $0x8,%eax
or     0x4(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @bufToInt16(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = shl i32 %2, 8
%4 = getelementptr inbounds i32, i32* %0, i64 1
%5 = load i32, i32* %4
%6 = or i32 %3, %5
ret i32 %6
}
int main() {
  int x;
  x = x + x;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint32_t;

/* Variables and functions */
uint32_t mpack_load_u32(const char *p) {
  return (((uint32_t)(uint8_t)p[0]) << 24) | (((uint32_t)(uint8_t)p[1]) << 16) |
         (((uint32_t)(uint8_t)p[2]) << 8) | ((uint32_t)(uint8_t)p[3]);
}


x86 assembly (clang, -O0):
<mpack_load_u32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbq (%rax),%rax
shl    $0x18,%eax
mov    -0x8(%rbp),%rcx
movsbq 0x1(%rcx),%rcx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movsbq 0x2(%rcx),%rcx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movsbq 0x3(%rcx),%rcx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mpack_load_u32>:
movzbl (%rdi),%eax
shl    $0x18,%eax
movsbl 0x1(%rdi),%ecx
shl    $0x10,%ecx
or     %eax,%ecx
movsbl 0x2(%rdi),%edx
shl    $0x8,%edx
movsbl 0x3(%rdi),%eax
or     %edx,%eax
or     %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @mpack_load_u32(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i32
%4 = shl nuw i32 %3, 24
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = shl nsw i32 %7, 16
%9 = or i32 %8, %4
%10 = getelementptr inbounds i8, i8* %0, i64 2
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = shl nsw i32 %12, 8
%14 = or i32 %9, %13
%15 = getelementptr inbounds i8, i8* %0, i64 3
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = or i32 %14, %17
ret i32 %18
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;
typedef int /*<<< orphan*/ buffer;

/* Variables and functions */
int /*<<< orphan*/ knot_random_buffer(int /*<<< orphan*/ *, int);
uint16_t knot_random_uint16_t(void) {
  uint16_t buffer;
  knot_random_buffer(&buffer, sizeof(buffer));
  return buffer;
}


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

x86 assembly (clang, -O2):
<knot_random_uint16_t>:
push   %rax
lea    0x4(%rsp),%rdi
mov    $0x4,%esi
call   1030 <knot_random_buffer@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @knot_random_uint16_t() {
%1 = alloca i32
%2 = call i32 @knot_random_buffer(i32* %1, i32 4)
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @knot_random_uint16_t() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @knot_random_buffer(i32* %1, i32 4)
%4 = load i32, i32* %1
ret i32 %4
}
double glmMax2d(double a, double b) {
  if (a > b)
    return a;
  return b;
}


x86 assembly (clang, -O0):
<glmMax2d>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    112d <glmMax2d+0x2d>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1137 <glmMax2d+0x37>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<glmMax2d>:
maxsd  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define double @glmMax2d(double %0, double %1) {
%3 = fcmp ogt double %0, %1
%4 = select i1 %3, double %0, double %1
ret double %4
}
int my_int_cmp(const void *left, const void *right) {
  return ((int)left - (int)right);
}


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

x86 assembly (clang, -O2):
<my_int_cmp>:
mov    %rdi,%rax
sub    %esi,%eax
ret

LLVM IR (-O0):
define i32 @my_int_cmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = ptrtoint i8* %5 to i32
%7 = load i8*, i8** %4
%8 = ptrtoint i8* %7 to i32
%9 = sub nsw i32 %6, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @my_int_cmp(i8* %0, i8* %1) {
%3 = ptrtoint i8* %0 to i64
%4 = trunc i64 %3 to i32
%5 = ptrtoint i8* %1 to i64
%6 = trunc i64 %5 to i32
%7 = sub nsw i32 %4, %6
ret i32 %7
}
int is_command(char c) {
  return (c == '>') || (c == '<') || (c == '+') || (c == '-') || (c == '.') ||
         (c == ',') || (c == '[') || (c == ']');
}


x86 assembly (clang, -O0):
<is_command>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x3e,%ecx
mov    %al,-0x2(%rbp)
je     1195 <is_command+0x95>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x3c,%ecx
mov    %al,-0x2(%rbp)
je     1195 <is_command+0x95>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x2b,%ecx
mov    %al,-0x2(%rbp)
je     1195 <is_command+0x95>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x2d,%ecx
mov    %al,-0x2(%rbp)
je     1195 <is_command+0x95>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x2e,%ecx
mov    %al,-0x2(%rbp)
je     1195 <is_command+0x95>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x2c,%ecx
mov    %al,-0x2(%rbp)
je     1195 <is_command+0x95>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x5b,%ecx
mov    %al,-0x2(%rbp)
je     1195 <is_command+0x95>
movsbl -0x1(%rbp),%eax
cmp    $0x5d,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_command>:
lea    -0x2b(%rdi),%ecx
cmp    $0x30,%cl
ja     1121 <is_command+0x21>
mov    $0x1,%eax
movzbl %cl,%ecx
movabs $0x10000000a000f,%rdx
bt     %rcx,%rdx
jae    1121 <is_command+0x21>
ret
xor    %eax,%eax
cmp    $0x5d,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @is_command(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 62
br i1 %5, label %34, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 60
br i1 %9, label %34, label %10
10: ; preds = %6
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 43
br i1 %13, label %34, label %14
14: ; preds = %10
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp eq i32 %16, 45
br i1 %17, label %34, label %18
18: ; preds = %14
%19 = load i8, i8* %2
%20 = sext i8 %19 to i32
%21 = icmp eq i32 %20, 46
br i1 %21, label %34, label %22
22: ; preds = %18
%23 = load i8, i8* %2
%24 = sext i8 %23 to i32
%25 = icmp eq i32 %24, 44
br i1 %25, label %34, label %26
26: ; preds = %22
%27 = load i8, i8* %2
%28 = sext i8 %27 to i32
%29 = icmp eq i32 %28, 91
br i1 %29, label %34, label %30
30: ; preds = %26
%31 = load i8, i8* %2
%32 = sext i8 %31 to i32
%33 = icmp eq i32 %32, 93
br label %34
34: ; preds = %30, %26, %22, %18, %14, %10, %6, %1
%35 = phi i1 [ true, %26 ], [ true, %22 ], [ true, %18 ], [ true, %14 ], [ true, %10 ], [ true, %6 ], [ true, %1 ], [ %33, %30 ]
%36 = zext i1 %35 to i32
ret i32 %36
}

LLVM IR (-O2):
define i32 @is_command(i8 signext %0) {
switch i8 %0, label %2 [
i8 91, label %5
i8 62, label %5
i8 60, label %5
i8 46, label %5
i8 45, label %5
i8 44, label %5
i8 43, label %5
]
2: ; preds = %1
%3 = icmp eq i8 %0, 93
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %1, %1, %1, %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %6
}
int test_imm_90int64_highword_reg(long long val) {
  return ((val >> 32) & (0x90 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_90int64_highword_reg>:
movabs $0x9000000000,%rax
test   %rax,%rdi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_90int64_highword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = ashr i64 %3, 32
%5 = and i64 %4, 144
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_90int64_highword_reg(i64 %0) {
%2 = and i64 %0, 618475290624
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void foo151() {}


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

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

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

LLVM IR (-O2):
define void @foo151() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ LoggingSettingsHandle();
int /*<<< orphan*/ UAVObjUpdated(int /*<<< orphan*/);
void LoggingSettingsUpdated() { UAVObjUpdated(LoggingSettingsHandle()); }


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

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

LLVM IR (-O0):
define void @LoggingSettingsUpdated() {
%1 = call i32 (...) @LoggingSettingsHandle()
%2 = call i32 @UAVObjUpdated(i32 %1)
ret void
}

LLVM IR (-O2):
define void @LoggingSettingsUpdated() {
%1 = tail call i32 (...) @LoggingSettingsHandle()
%2 = tail call i32 @UAVObjUpdated(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _exit(int /*<<< orphan*/);
int /*<<< orphan*/ global_init();
int /*<<< orphan*/ global_purge();
int main(void) {
  global_init();
  global_init();
  global_purge();
  global_purge();
  global_init();
  global_init();
  _exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <global_init@plt>
mov    $0x0,%al
call   1040 <global_init@plt>
mov    $0x0,%al
call   1050 <global_purge@plt>
mov    $0x0,%al
call   1050 <global_purge@plt>
mov    $0x0,%al
call   1040 <global_init@plt>
mov    $0x0,%al
call   1040 <global_init@plt>
xor    %edi,%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <global_init@plt>
xor    %eax,%eax
call   1040 <global_init@plt>
xor    %eax,%eax
call   1050 <global_purge@plt>
xor    %eax,%eax
call   1050 <global_purge@plt>
xor    %eax,%eax
call   1040 <global_init@plt>
xor    %eax,%eax
call   1040 <global_init@plt>
xor    %edi,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @global_init()
%3 = call i32 (...) @global_init()
%4 = call i32 (...) @global_purge()
%5 = call i32 (...) @global_purge()
%6 = call i32 (...) @global_init()
%7 = call i32 (...) @global_init()
%8 = call i32 @_exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @global_init()
%2 = tail call i32 (...) @global_init()
%3 = tail call i32 (...) @global_purge()
%4 = tail call i32 (...) @global_purge()
%5 = tail call i32 (...) @global_init()
%6 = tail call i32 (...) @global_init()
%7 = tail call i32 @_exit(i32 0)
unreachable
}
int wordlength(void) {
  int i;
  unsigned v = (unsigned)~0;
  for (i = 1; (v = v >> 1) > 0; i++)
    ;
  return i;
}


x86 assembly (clang, -O0):
<wordlength>:
push   %rbp
mov    %rsp,%rbp
movl   $0xffffffff,-0x8(%rbp)
movl   $0x1,-0x4(%rbp)
mov    -0x8(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jbe    1137 <wordlength+0x37>
jmp    1129 <wordlength+0x29>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1112 <wordlength+0x12>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @wordlength() {
ret i32 32
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
int version_compare(uint16_t a_major, uint16_t a_minor, uint16_t b_major,
                    uint16_t b_minor) {
  int a, b;
  a = a_major << 16 | a_minor;
  b = b_major << 16 | b_minor;
  return (a - b);
}


x86 assembly (clang, -O0):
<version_compare>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x10,%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x10,%eax
or     -0x10(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
sub    -0x18(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<version_compare>:
mov    %edi,%eax
shl    $0x10,%eax
or     %esi,%eax
shl    $0x10,%edx
or     %ecx,%edx
sub    %edx,%eax
ret

LLVM IR (-O0):
define i32 @version_compare(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%11 = load i32, i32* %5
%12 = shl i32 %11, 16
%13 = load i32, i32* %6
%14 = or i32 %12, %13
store i32 %14, i32* %9
%15 = load i32, i32* %7
%16 = shl i32 %15, 16
%17 = load i32, i32* %8
%18 = or i32 %16, %17
store i32 %18, i32* %10
%19 = load i32, i32* %9
%20 = load i32, i32* %10
%21 = sub nsw i32 %19, %20
ret i32 %21
}

LLVM IR (-O2):
define i32 @version_compare(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = shl i32 %0, 16
%6 = or i32 %5, %1
%7 = shl i32 %2, 16
%8 = or i32 %7, %3
%9 = sub nsw i32 %6, %8
ret i32 %9
}
/* Variables and functions */
bool nrf51_errata_25(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @nrf51_errata_25() {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uid_t;

/* Variables and functions */
int /*<<< orphan*/ fsfr_fetch_uid(char *);
uid_t geteuid(void) { return fsfr_fetch_uid("FSFR_EUID"); }


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

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

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

LLVM IR (-O2):
@.str = [10 x i8] c"FSFR_EUID\00"
define i32 @geteuid() {
%1 = tail call i32 @fsfr_fetch_uid(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void output_begin_table(FILE *f) {
  fprintf(f, "static const long TAI_UTC_DELTA[] = {\n");
}


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

x86 assembly (clang, -O2):
<output_begin_table>:
mov    %rdi,%rcx
lea    0xee6(%rip),%rdi
mov    $0x26,%esi
mov    $0x1,%edx
jmp    1030 <fwrite@plt>

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

LLVM IR (-O2):
@.str = [39 x i8] c"static const long TAI_UTC_DELTA[] = {\0A\00"
define void @output_begin_table(i32* nocapture %0) {
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i64 38, i64 1, i32* %0)
ret void
}
int main(void) {
  'a' && 0;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}