xunge/DecIR huggingface dataset:
int rand_1() {
  static unsigned int c_for_rand = 0x65109BC4;
  c_for_rand = 214013 * c_for_rand + 2531011;
  return (c_for_rand >> 16) & 0x7FFF;
}


x86 assembly (clang, -O0):
<rand_1>:
push   %rbp
mov    %rsp,%rbp
imul   $0x343fd,0x2f12(%rip),%eax
add    $0x269ec3,%eax
mov    %eax,0x2f07(%rip)
mov    0x2f01(%rip),%eax
shr    $0x10,%eax
and    $0x7fff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rand_1>:
imul   $0x343fd,0x2f16(%rip),%eax
add    $0x269ec3,%eax
mov    %eax,0x2f0b(%rip)
shr    $0x10,%eax
and    $0x7fff,%eax
ret

LLVM IR (-O0):
@rand_1.c_for_rand = internal global i32 1695587268
define i32 @rand_1() {
%1 = load i32, i32* @rand_1.c_for_rand
%2 = mul i32 214013, %1
%3 = add i32 %2, 2531011
store i32 %3, i32* @rand_1.c_for_rand
%4 = load i32, i32* @rand_1.c_for_rand
%5 = lshr i32 %4, 16
%6 = and i32 %5, 32767
ret i32 %6
}

LLVM IR (-O2):
@rand_1.c_for_rand = internal unnamed_addr global i32 1695587268
define i32 @rand_1() {
%1 = load i32, i32* @rand_1.c_for_rand
%2 = mul i32 %1, 214013
%3 = add i32 %2, 2531011
store i32 %3, i32* @rand_1.c_for_rand
%4 = lshr i32 %3, 16
%5 = and i32 %4, 32767
ret i32 %5
}
int cmd_save_env(char *arg_list[], int n) {
  sw_printf("\nstart run %s...\n\n\r", __func__);
  return 0;
}


x86 assembly (clang, -O0):
<cmd_save_env>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    0xeda(%rip),%rdi
lea    0xee7(%rip),%rsi
mov    $0x0,%al
call   1030 <sw_printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [20 x i8] c"\0Astart run %s...\0A\0A\0D\00"
@__func__.cmd_save_env = [13 x i8] c"cmd_save_env\00"
define i32 @cmd_save_env(i8** %0, i32 %1) {
%3 = alloca i8**
%4 = alloca i32
store i8** %0, i8*** %3
store i32 %1, i32* %4
%5 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @sw_printf to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @__func__.cmd_save_env, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"\0Astart run %s...\0A\0A\0D\00"
@__func__.cmd_save_env = [13 x i8] c"cmd_save_env\00"
define i32 @cmd_save_env(i8** nocapture readnone %0, i32 %1) {
%3 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @sw_printf to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @__func__.cmd_save_env, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ close(int /*<<< orphan*/);
int u;
void closeall() {
  register u;
  for (u = 10; u < 20;)
    close(u++);
}


x86 assembly (clang, -O0):
<closeall>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xa,-0x4(%rbp)
cmpl   $0x14,-0x4(%rbp)
jge    113e <closeall+0x2e>
mov    -0x4(%rbp),%edi
mov    %edi,%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
call   1030 <close@plt>
jmp    111f <closeall+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<closeall>:
push   %rax
mov    $0xa,%edi
call   1030 <close@plt>
mov    $0xb,%edi
call   1030 <close@plt>
mov    $0xc,%edi
call   1030 <close@plt>
mov    $0xd,%edi
call   1030 <close@plt>
mov    $0xe,%edi
call   1030 <close@plt>
mov    $0xf,%edi
call   1030 <close@plt>
mov    $0x10,%edi
call   1030 <close@plt>
mov    $0x11,%edi
call   1030 <close@plt>
mov    $0x12,%edi
call   1030 <close@plt>
mov    $0x13,%edi
pop    %rax
jmp    1030 <close@plt>

LLVM IR (-O0):
@u = global i32 0
define void @closeall() {
%1 = alloca i32
store i32 10, i32* %1
br label %2
2: ; preds = %5, %0
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 20
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = load i32, i32* %1
%7 = add nsw i32 %6, 1
store i32 %7, i32* %1
%8 = call i32 @close(i32 %6)
br label %2
9: ; preds = %2
ret void
}

LLVM IR (-O2):
@u = global i32 0
define void @closeall() {
%1 = tail call i32 @close(i32 10)
%2 = tail call i32 @close(i32 11)
%3 = tail call i32 @close(i32 12)
%4 = tail call i32 @close(i32 13)
%5 = tail call i32 @close(i32 14)
%6 = tail call i32 @close(i32 15)
%7 = tail call i32 @close(i32 16)
%8 = tail call i32 @close(i32 17)
%9 = tail call i32 @close(i32 18)
%10 = tail call i32 @close(i32 19)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ chdir(char *);
int /*<<< orphan*/ system(char *);
int main() {
  chdir("/mnt/user/code/HelloWorld/bin");
  system("/mnt/user/jvm/java Main");
}


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

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

LLVM IR (-O0):
@.str = [30 x i8] c"/mnt/user/code/HelloWorld/bin\00"
@.str.1 = [24 x i8] c"/mnt/user/jvm/java Main\00"
define i32 @main() {
%1 = call i32 @chdir(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @system(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [30 x i8] c"/mnt/user/code/HelloWorld/bin\00"
@.str.1 = [24 x i8] c"/mnt/user/jvm/java Main\00"
define i32 @main() {
%1 = tail call i32 @chdir(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @system(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Forward declarations */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int trust;
};
typedef TYPE_1__ X509_TRUST;

/* Variables and functions */
int X509_TRUST_get_trust(const X509_TRUST *xp) { return xp->trust; }


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

x86 assembly (clang, -O2):
<X509_TRUST_get_trust>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
%struct.TYPE_3__ = type { i32 }
define i32 @X509_TRUST_get_trust(%struct.TYPE_3__* %0) {
%2 = alloca %struct.TYPE_3__*
store %struct.TYPE_3__* %0, %struct.TYPE_3__** %2
%3 = load %struct.TYPE_3__*, %struct.TYPE_3__** %2
%4 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %3, i32 0, i32 0
%5 = load i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
%struct.TYPE_3__ = type { i32 }
define i32 @X509_TRUST_get_trust(%struct.TYPE_3__* nocapture %0) {
%2 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %0, i64 0, i32 0
%3 = load i32, i32* %2
ret i32 %3
}
unsigned int rshift_u_s(unsigned int left, int right) {
  if ((right < 0) || (right >= sizeof(unsigned int) * 8)) {
    return left;
  }
  return left >> right;
}


x86 assembly (clang, -O0):
<rshift_u_s>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jl     1122 <rshift_u_s+0x22>
movslq -0xc(%rbp),%rax
cmp    $0x20,%rax
jb     112d <rshift_u_s+0x2d>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1138 <rshift_u_s+0x38>
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
shr    %cl,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rshift_u_s>:
xor    %ecx,%ecx
cmp    $0x20,%esi
cmovb  %esi,%ecx
mov    %edi,%eax
shr    %cl,%eax
ret

LLVM IR (-O0):
define i32 @rshift_u_s(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* %5
%7 = icmp slt i32 %6, 0
br i1 %7, label %12, label %8
8: ; preds = %2
%9 = load i32, i32* %5
%10 = sext i32 %9 to i64
%11 = icmp uge i64 %10, 32
br i1 %11, label %12, label %14
12: ; preds = %8, %2
%13 = load i32, i32* %4
store i32 %13, i32* %3
br label %18
14: ; preds = %8
%15 = load i32, i32* %4
%16 = load i32, i32* %5
%17 = lshr i32 %15, %16
store i32 %17, i32* %3
br label %18
18: ; preds = %14, %12
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
define i32 @rshift_u_s(i32 %0, i32 %1) {
%3 = icmp ugt i32 %1, 31
%4 = select i1 %3, i32 0, i32 %1
%5 = lshr i32 %0, %4
ret i32 %5
}
int Bematech_FI_GrandeTotal(Var, Retorno) {
  return Formata("\x1b|35|03|\x1b", Var, Retorno);
}


x86 assembly (clang, -O0):
<Bematech_FI_GrandeTotal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xed5(%rip),%rdi
mov    $0x0,%al
call   1030 <Formata@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Bematech_FI_GrandeTotal>:
mov    %esi,%edx
mov    %edi,%esi
lea    0xee5(%rip),%rdi
xor    %eax,%eax
jmp    1030 <Formata@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"\1B|35|03|\1B\00"
define i32 @Bematech_FI_GrandeTotal(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @Formata to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
@.str = [10 x i8] c"\1B|35|03|\1B\00"
define i32 @Bematech_FI_GrandeTotal(i32 %0, i32 %1) {
%3 = tail call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @Formata to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ ispunct(int);
void t_ispunct_0x36() {
  Assert_real((ispunct(54) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_ispunct.c",
              275, ("ispunct should be 0 for 6"));
}


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

x86 assembly (clang, -O2):
<t_ispunct_0x36>:
push   %rax
mov    $0x36,%edi
call   1030 <ispunct@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x113,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_ispunct.c\00"
@.str.1 = [26 x i8] c"ispunct should be 0 for 6\00"
define void @t_ispunct_0x36() {
%1 = call i64 @ispunct(i32 54)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 275, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_ispunct.c\00"
@.str.1 = [26 x i8] c"ispunct should be 0 for 6\00"
define void @t_ispunct_0x36() {
%1 = tail call i64 @ispunct(i32 54)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 275, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int M_PI;
int /*<<< orphan*/ pos_rotate_rad(int);
void pos_rotate_grad(double grad) { pos_rotate_rad(2 * M_PI * grad / 360.0); }


x86 assembly (clang, -O0):
<pos_rotate_grad>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    0x2ec4(%rip),%rax
mov    (%rax),%eax
shl    $0x1,%eax
cvtsi2sd %eax,%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  0xec6(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1030 <pos_rotate_rad@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pos_rotate_grad>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%eax
add    %eax,%eax
cvtsi2sd %eax,%xmm1
mulsd  %xmm0,%xmm1
divsd  0xed5(%rip),%xmm1
cvttsd2si %xmm1,%edi
jmp    1030 <pos_rotate_rad@plt>

LLVM IR (-O0):
@M_PI = global i32 0
define void @pos_rotate_grad(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load i32, i32* @M_PI
%4 = mul nsw i32 2, %3
%5 = sitofp i32 %4 to double
%6 = load double, double* %2
%7 = fmul double %5, %6
%8 = fdiv double %7, 3.600000e+02
%9 = fptosi double %8 to i32
%10 = call i32 @pos_rotate_rad(i32 %9)
ret void
}

LLVM IR (-O2):
@M_PI = global i32 0
define void @pos_rotate_grad(double %0) {
%2 = load i32, i32* @M_PI
%3 = shl nsw i32 %2, 1
%4 = sitofp i32 %3 to double
%5 = fmul double %4, %0
%6 = fdiv double %5, 3.600000e+02
%7 = fptosi double %6 to i32
%8 = tail call i32 @pos_rotate_rad(i32 %7)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void printUsage(void) {
  printf("SWATd - Run scripts when you are being raided by the police.\n");
  printf("  -c CONFIG\t\tUse config file CONFIG.\n");
  printf("  -s\t\t\tDon't fork.\n");
  printf("  -p\t\t\tPID file.\n");
  printf("  -h\t\t\tHelp menu.\n");
}


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

x86 assembly (clang, -O2):
<printUsage>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf19(%rip),%rdi
call   1030 <puts@plt>
lea    0xf32(%rip),%rdi
call   1030 <puts@plt>
lea    0xf39(%rip),%rdi
call   1030 <puts@plt>
lea    0xf3e(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [62 x i8] c"SWATd - Run scripts when you are being raided by the police.\0A\00"
@.str.1 = [38 x i8] c" -c CONFIG\09\09Use config file CONFIG.\0A\00"
@.str.2 = [20 x i8] c" -s\09\09\09Don't fork.\0A\00"
@.str.3 = [18 x i8] c" -p\09\09\09PID file.\0A\00"
@.str.4 = [19 x i8] c" -h\09\09\09Help menu.\0A\00"
define void @printUsage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [61 x i8] c"SWATd - Run scripts when you are being raided by the police.\00"
@str.5 = [37 x i8] c" -c CONFIG\09\09Use config file CONFIG.\00"
@str.6 = [19 x i8] c" -s\09\09\09Don't fork.\00"
@str.7 = [17 x i8] c" -p\09\09\09PID file.\00"
@str.8 = [18 x i8] c" -h\09\09\09Help menu.\00"
define void @printUsage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str.5, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.6, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.7, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.8, i64 0, i64 0))
ret void
}
/* Variables and functions */
int delay_output(int);
int wrap_delay_output(int ms) { return delay_output(ms); }


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

x86 assembly (clang, -O2):
<wrap_delay_output>:
jmp    1030 <delay_output@plt>

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

LLVM IR (-O2):
define i32 @wrap_delay_output(i32 %0) {
%2 = tail call i32 @delay_output(i32 %0)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *);
void usage(FILE *fd) {
  fprintf(fd, "Usage: %s [-f] [-i informat] [-o outformat]\n", "format");
}


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

x86 assembly (clang, -O2):
<usage>:
lea    0xee9(%rip),%rsi
lea    0xf0f(%rip),%rdx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [45 x i8] c"Usage: %s [-f] [-i informat] [-o outformat]\0A\00"
@.str.1 = [7 x i8] c"format\00"
define void @usage(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [45 x i8] c"Usage: %s [-f] [-i informat] [-o outformat]\0A\00"
@.str.1 = [7 x i8] c"format\00"
define void @usage(i32* nocapture %0) {
%2 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Ffalse();
int /*<<< orphan*/ ignoreon();
void Ifalse(void) {
  Ffalse();
  ignoreon();
}


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

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

LLVM IR (-O0):
define void @Ifalse() {
%1 = call i32 (...) @Ffalse()
%2 = call i32 (...) @ignoreon()
ret void
}

LLVM IR (-O2):
define void @Ifalse() {
%1 = tail call i32 (...) @Ffalse()
%2 = tail call i32 (...) @ignoreon()
ret void
}
/* Variables and functions */
int maxProfit(int *, int);
int /*<<< orphan*/ printf(char *, int);
void test(int *p, int c) { printf("max = %d\n", maxProfit(p, c)); }


x86 assembly (clang, -O0):
<test>:
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   1040 <maxProfit@plt>
mov    %eax,%esi
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rax
call   1040 <maxProfit@plt>
lea    0xed3(%rip),%rdi
mov    %eax,%esi
pop    %rax
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [10 x i8] c"max = %d\0A\00"
define void @test(i32* %0, i32 %1) {
%3 = tail call i32 @maxProfit(i32* %0, i32 %1)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ scanner();
int main() {
  scanner();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <scanner@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @scanner()
ret i32 0
}
const char *Current_Description(void) {
  return "The `Current` class can be implemented by types which have implicit "
         "instances associated with them. For example it can be used to "
         "retrieve "
         "the _current_ `Thread`, or it could be used to get the _current_ "
         "Garbage "
         "Collector."
         "\n\n"
         "This class may be implemented by types which express the [Singleton "
         "Design Pattern](http://en.wikipedia.org/wiki/Singleton_pattern)";
}


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

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

LLVM IR (-O0):
@.str = [356 x i8] c"The `Current` class can be implemented by types which have implicit instances associated with them. For example it can be used to retrieve the _current_ `Thread`, or it could be used to get the _current_ Garbage Collector.\0A\0AThis class may be implemented by types which express the [Singleton Design Pattern](http://en.wikipedia.org/wiki/Singleton_pattern)\00"
define i8* @Current_Description() {
ret i8* getelementptr inbounds ([356 x i8], [356 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [356 x i8] c"The `Current` class can be implemented by types which have implicit instances associated with them. For example it can be used to retrieve the _current_ `Thread`, or it could be used to get the _current_ Garbage Collector.\0A\0AThis class may be implemented by types which express the [Singleton Design Pattern](http://en.wikipedia.org/wiki/Singleton_pattern)\00"
define i8* @Current_Description() {
ret i8* getelementptr inbounds ([356 x i8], [356 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
struct timeval {
  int tv_sec;
  scalar_t__ tv_usec;
};
struct event {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ evtimer_add(struct event *, struct timeval *);
int /*<<< orphan*/ printf(char *);
void vTimerA(int fd, short event, void *arg) {
  printf("Timer A triggered\n");
  struct event *ev = arg;
  struct timeval tvTimerA;
  tvTimerA.tv_sec = 2;
  tvTimerA.tv_usec = 0;
  evtimer_add(ev, &tvTimerA);
}


x86 assembly (clang, -O0):
<vTimerA>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %si,%ax
mov    %edi,-0x4(%rbp)
mov    %ax,-0x6(%rbp)
mov    %rdx,-0x10(%rbp)
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
movl   $0x2,-0x28(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
lea    -0x28(%rbp),%rsi
call   1040 <evtimer_add@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vTimerA>:
push   %rbx
sub    $0x10,%rsp
mov    %rdx,%rbx
lea    0xed1(%rip),%rdi
call   1030 <puts@plt>
movl   $0x2,(%rsp)
movq   $0x0,0x8(%rsp)
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1040 <evtimer_add@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.event = type { i32 }
%struct.timeval = type { i32, i64 }
@.str = [19 x i8] c"Timer A triggered\0A\00"
define void @vTimerA(i32 %0, i16 signext %1, i8* %2) {
%4 = alloca i32
%5 = alloca i16
%6 = alloca i8*
%7 = alloca %struct.event*
%8 = alloca %struct.timeval
store i32 %0, i32* %4
store i16 %1, i16* %5
store i8* %2, i8** %6
%9 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%10 = load i8*, i8** %6
%11 = bitcast i8* %10 to %struct.event*
store %struct.event* %11, %struct.event** %7
%12 = getelementptr inbounds %struct.timeval, %struct.timeval* %8, i32 0, i32 0
store i32 2, i32* %12
%13 = getelementptr inbounds %struct.timeval, %struct.timeval* %8, i32 0, i32 1
store i64 0, i64* %13
%14 = load %struct.event*, %struct.event** %7
%15 = call i32 @evtimer_add(%struct.event* %14, %struct.timeval* %8)
ret void
}

LLVM IR (-O2):
%struct.timeval = type { i32, i64 }
%struct.event = type { i32 }
@str = [18 x i8] c"Timer A triggered\00"
define void @vTimerA(i32 %0, i16 signext %1, i8* %2) {
%4 = alloca %struct.timeval
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
%6 = bitcast i8* %2 to %struct.event*
%7 = bitcast %struct.timeval* %4 to i8*
%8 = getelementptr inbounds %struct.timeval, %struct.timeval* %4, i64 0, i32 0
store i32 2, i32* %8
%9 = getelementptr inbounds %struct.timeval, %struct.timeval* %4, i64 0, i32 1
store i64 0, i64* %9
%10 = call i32 @evtimer_add(%struct.event* %6, %struct.timeval* %4)
ret void
}
int division(int a, int b) { return a / b; }


x86 assembly (clang, -O0):
<division>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<division>:
mov    %edi,%eax
cltd
idiv   %esi
ret

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

LLVM IR (-O2):
define i32 @division(i32 %0, i32 %1) {
%3 = sdiv i32 %0, %1
ret i32 %3
}
unsigned int __gnu_dev_major(unsigned long long int __dev) {
  return ((__dev >> 8) & 0xfff) | ((unsigned int)(__dev >> 32) & ~0xfff);
}


x86 assembly (clang, -O0):
<__gnu_dev_major>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x8,%rax
and    $0xfff,%rax
mov    -0x8(%rbp),%rcx
shr    $0x20,%rcx
and    $0xfffff000,%ecx
mov    %ecx,%ecx
or     %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__gnu_dev_major>:
mov    %edi,%eax
shr    $0x8,%eax
and    $0xfff,%eax
shr    $0x20,%rdi
and    $0xfffff000,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @__gnu_dev_major(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = lshr i64 %3, 8
%5 = and i64 %4, 4095
%6 = load i64, i64* %2
%7 = lshr i64 %6, 32
%8 = trunc i64 %7 to i32
%9 = and i32 %8, -4096
%10 = zext i32 %9 to i64
%11 = or i64 %5, %10
%12 = trunc i64 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @__gnu_dev_major(i64 %0) {
%2 = lshr i64 %0, 8
%3 = and i64 %2, 4095
%4 = lshr i64 %0, 32
%5 = and i64 %4, 4294963200
%6 = or i64 %3, %5
%7 = trunc i64 %6 to i32
ret i32 %7
}
long create_random_no_seed() { return *(long *)0x100000120; }


x86 assembly (clang, -O0):
<create_random_no_seed>:
push   %rbp
mov    %rsp,%rbp
movabs $0x100000120,%rax
mov    (%rax),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<create_random_no_seed>:
movabs $0x100000120,%rax
mov    (%rax),%rax
ret

LLVM IR (-O0):
define i64 @create_random_no_seed() {
%1 = load i64, i64* inttoptr (i64 4294967584 to i64*)
ret i64 %1
}

LLVM IR (-O2):
define i64 @create_random_no_seed() {
%1 = load i64, i64* inttoptr (i64 4294967584 to i64*)
ret i64 %1
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
void RGMatchUpdateMask(char *mask, int32_t pos) {
  int32_t curByte, curByteIndex;
  curByte = ((int)(pos / 8));
  curByteIndex = pos % (8 * sizeof(char));
  mask[curByte] |= (0x01 << curByteIndex);
}


x86 assembly (clang, -O0):
<RGMatchUpdateMask>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    %eax,-0x10(%rbp)
movslq -0xc(%rbp),%rax
and    $0x7,%rax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%ecx
mov    $0x1,%esi
shl    %cl,%esi
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%edx
or     %esi,%edx
mov    %dl,(%rax,%rcx,1)
pop    %rbp
ret

x86 assembly (clang, -O2):
<RGMatchUpdateMask>:
mov    %esi,%ecx
lea    0x7(%rcx),%eax
test   %esi,%esi
cmovns %esi,%eax
sar    $0x3,%eax
and    $0x7,%cl
mov    $0x1,%edx
shl    %cl,%edx
cltq
or     %dl,(%rdi,%rax,1)
ret

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

LLVM IR (-O2):
define void @RGMatchUpdateMask(i8* nocapture %0, i32 %1) {
%3 = sdiv i32 %1, 8
%4 = and i32 %1, 7
%5 = shl nuw nsw i32 1, %4
%6 = sext i32 %3 to i64
%7 = getelementptr inbounds i8, i8* %0, i64 %6
%8 = load i8, i8* %7
%9 = trunc i32 %5 to i8
%10 = or i8 %8, %9
store i8 %10, i8* %7
ret void
}
/* Variables and functions */
int a_entry();
int b_entry();
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int a = a_entry();
  printf("a = %d\n", a);
  int b = b_entry();
  printf("b = %d\n", b);
  return a + b;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <a_entry@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <b_entry@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xe9c(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1050 <a_entry@plt>
mov    %eax,%ebx
lea    0xebd(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <b_entry@plt>
mov    %eax,%ebp
lea    0xeae(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
add    %ebx,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [8 x i8] c"a = %d\0A\00"
@.str.1 = [8 x i8] c"b = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (...) @a_entry()
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = call i32 (...) @b_entry()
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 %8)
%10 = load i32, i32* %2
%11 = load i32, i32* %3
%12 = add nsw i32 %10, %11
ret i32 %12
}

LLVM IR (-O2):
@.str = [8 x i8] c"a = %d\0A\00"
@.str.1 = [8 x i8] c"b = %d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @a_entry()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 (...) @b_entry()
%4 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%5 = add nsw i32 %3, %1
ret i32 %5
}
char *unexportPath() { return "/sys/class/gpio/unexport"; }


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

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

LLVM IR (-O0):
@.str = [25 x i8] c"/sys/class/gpio/unexport\00"
define i8* @unexportPath() {
ret i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [25 x i8] c"/sys/class/gpio/unexport\00"
define i8* @unexportPath() {
ret i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
typedef unsigned long uint64_t;

/* Variables and functions */
unsigned int linerp_int(unsigned int a, unsigned int b, unsigned int x) {
  uint64_t i = ((uint64_t)a * ((128ul) - x)) + ((uint64_t)b * x);
  i /= (128ul);
  return i;
}


x86 assembly (clang, -O0):
<linerp_int>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    -0xc(%rbp),%ecx
mov    %ecx,%edx
mov    $0x80,%ecx
sub    %rdx,%rcx
imul   %rcx,%rax
mov    -0x8(%rbp),%ecx
mov    -0xc(%rbp),%edx
imul   %rdx,%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
shr    $0x7,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<linerp_int>:
mov    %edi,%eax
mov    %edx,%ecx
mov    $0x80,%edx
sub    %rcx,%rdx
imul   %rax,%rdx
mov    %esi,%eax
imul   %rcx,%rax
add    %rdx,%rax
shr    $0x7,%rax
ret

LLVM IR (-O0):
define i32 @linerp_int(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i64
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %4
%9 = zext i32 %8 to i64
%10 = load i32, i32* %6
%11 = zext i32 %10 to i64
%12 = sub i64 128, %11
%13 = mul i64 %9, %12
%14 = load i32, i32* %5
%15 = zext i32 %14 to i64
%16 = load i32, i32* %6
%17 = zext i32 %16 to i64
%18 = mul i64 %15, %17
%19 = add i64 %13, %18
store i64 %19, i64* %7
%20 = load i64, i64* %7
%21 = udiv i64 %20, 128
store i64 %21, i64* %7
%22 = load i64, i64* %7
%23 = trunc i64 %22 to i32
ret i32 %23
}

LLVM IR (-O2):
define i32 @linerp_int(i32 %0, i32 %1, i32 %2) {
%4 = zext i32 %0 to i64
%5 = zext i32 %2 to i64
%6 = sub nsw i64 128, %5
%7 = mul i64 %6, %4
%8 = zext i32 %1 to i64
%9 = mul nuw i64 %5, %8
%10 = add i64 %7, %9
%11 = lshr i64 %10, 7
%12 = trunc i64 %11 to i32
ret i32 %12
}
void lgtd_proto_power_toggle(struct lgtd_client *client,
                             const struct lgtd_proto_target_list *targets) {
  (void)client;
  (void)targets;
}


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

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

LLVM IR (-O0):
%struct.lgtd_client = type opaque
%struct.lgtd_proto_target_list = type opaque
define void @lgtd_proto_power_toggle(%struct.lgtd_client* %0, %struct.lgtd_proto_target_list* %1) {
%3 = alloca %struct.lgtd_client*
%4 = alloca %struct.lgtd_proto_target_list*
store %struct.lgtd_client* %0, %struct.lgtd_client** %3
store %struct.lgtd_proto_target_list* %1, %struct.lgtd_proto_target_list** %4
%5 = load %struct.lgtd_client*, %struct.lgtd_client** %3
%6 = load %struct.lgtd_proto_target_list*, %struct.lgtd_proto_target_list** %4
ret void
}

LLVM IR (-O2):
%struct.lgtd_client = type opaque
%struct.lgtd_proto_target_list = type opaque
define void @lgtd_proto_power_toggle(%struct.lgtd_client* nocapture %0, %struct.lgtd_proto_target_list* nocapture %1) {
ret void
}
void vtime_init_idle(struct task_struct *tsk) {}


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

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

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

LLVM IR (-O2):
%struct.task_struct = type opaque
define void @vtime_init_idle(%struct.task_struct* nocapture %0) {
ret void
}
void test_PTHREAD_PRIO_INHERIT(void) { int dummy = "PTHREAD_PRIO_INHERIT"; }


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

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

LLVM IR (-O0):
@.str = [21 x i8] c"PTHREAD_PRIO_INHERIT\00"
define void @test_PTHREAD_PRIO_INHERIT() {
%1 = alloca i32
store i32 ptrtoint ([21 x i8]* @.str to i32), i32* %1
ret void
}

LLVM IR (-O2):
define void @test_PTHREAD_PRIO_INHERIT() {
ret void
}
/* Variables and functions */
int LZ4_compress_fast(char const *, char *, int, int, int);
int LZ4IO_LZ4_compress(const char *src, char *dst, int srcSize, int dstSize,
                       int cLevel) {
  (void)cLevel;
  return LZ4_compress_fast(src, dst, srcSize, dstSize, 1);
}


x86 assembly (clang, -O0):
<LZ4IO_LZ4_compress>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    $0x1,%r8d
call   1030 <LZ4_compress_fast@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LZ4IO_LZ4_compress>:
mov    $0x1,%r8d
jmp    1030 <LZ4_compress_fast@plt>

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

LLVM IR (-O2):
define i32 @LZ4IO_LZ4_compress(i8* %0, i8* %1, i32 %2, i32 %3, i32 %4) {
%6 = tail call i32 @LZ4_compress_fast(i8* %0, i8* %1, i32 %2, i32 %3, i32 1)
ret i32 %6
}
int f(struct s **pp) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.s = type opaque
define i32 @f(%struct.s** nocapture readnone %0) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ ullint_put(unsigned long long const, int /*<<< orphan*/ *);
void std_ullint_str(const void *restrict self, const char *restrict format,
                    FILE *restrict stream) {
  (void)format;
  if (self)
    ullint_put(*(const unsigned long long int *)self, stream);
}


x86 assembly (clang, -O0):
<std_ullint_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     113f <std_ullint_str+0x2f>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <ullint_put@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<std_ullint_str>:
test   %rdi,%rdi
je     1120 <std_ullint_str+0x10>
mov    (%rdi),%rdi
mov    %rdx,%rsi
jmp    1030 <ullint_put@plt>
ret

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

LLVM IR (-O2):
define void @std_ullint_str(i8* noalias %0, i8* noalias nocapture readnone %1, i32* noalias %2) {
%4 = icmp eq i8* %0, null
br i1 %4, label %9, label %5
5: ; preds = %3
%6 = bitcast i8* %0 to i64*
%7 = load i64, i64* %6
%8 = tail call i32 @ullint_put(i64 %7, i32* %2)
br label %9
9: ; preds = %5, %3
ret void
}
int second_child_run() { return 3; }


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

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

LLVM IR (-O0):
define i32 @second_child_run() {
ret i32 3
}

LLVM IR (-O2):
define i32 @second_child_run() {
ret i32 3
}
int test_imm_1Buint64_lowword_reg(unsigned long long val) {
  return ((val) & (0x1B << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_1Buint64_lowword_reg>:
test   $0x1b,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_1Buint64_lowword_reg(i64 %0) {
%2 = and i64 %0, 27
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ delay(int);
void Led_Blink() {
  (*(volatile unsigned long *)0xE0200280) = 0x00001111;
  while (1) {
    (*(volatile unsigned long *)0xE0200284) = 0;
    delay(0x1000000);
    (*(volatile unsigned long *)0xE0200284) = 0xf;
    delay(0x1000000);
  }
}


x86 assembly (clang, -O0):
<Led_Blink>:
push   %rbp
mov    %rsp,%rbp
mov    $0xe0200280,%eax
movq   $0x1111,(%rax)
mov    $0xe0200284,%eax
movq   $0x0,(%rax)
mov    $0x1000000,%edi
call   1030 <delay@plt>
mov    $0xe0200284,%eax
movq   $0xf,(%rax)
mov    $0x1000000,%edi
call   1030 <delay@plt>
jmp    1120 <Led_Blink+0x10>

x86 assembly (clang, -O2):
<Led_Blink>:
push   %rbx
mov    $0xe0200284,%ebx
movq   $0x1111,-0x4(%rbx)
xchg   %ax,%ax
movq   $0x0,(%rbx)
mov    $0x1000000,%edi
call   1030 <delay@plt>
movq   $0xf,(%rbx)
mov    $0x1000000,%edi
call   1030 <delay@plt>
jmp    1120 <Led_Blink+0x10>

LLVM IR (-O0):
define void @Led_Blink() {
store volatile i64 4369, i64* inttoptr (i64 3760194176 to i64*)
br label %1
1: ; preds = %0, %1
store volatile i64 0, i64* inttoptr (i64 3760194180 to i64*)
%2 = call i32 @delay(i32 16777216)
store volatile i64 15, i64* inttoptr (i64 3760194180 to i64*)
%3 = call i32 @delay(i32 16777216)
br label %1
}

LLVM IR (-O2):
define void @Led_Blink() {
store volatile i64 4369, i64* inttoptr (i64 3760194176 to i64*)
br label %1
1: ; preds = %0, %1
store volatile i64 0, i64* inttoptr (i64 3760194180 to i64*)
%2 = tail call i32 @delay(i32 16777216)
store volatile i64 15, i64* inttoptr (i64 3760194180 to i64*)
%3 = tail call i32 @delay(i32 16777216)
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ tcp_vegas_unregister();
void module_unregister_fake(void) {
  if (0)
    tcp_vegas_unregister();
}


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

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

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

LLVM IR (-O2):
define void @module_unregister_fake() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
void uputs(char *ptr) {
  while (*ptr) {
    if (*ptr > 2)
      putchar(*ptr);
    ptr++;
  }
  putchar('\n');
}


x86 assembly (clang, -O0):
<uputs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1156 <uputs+0x46>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2,%eax
jle    1145 <uputs+0x35>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <putchar@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <uputs+0xc>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uputs>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1139 <uputs+0x29>
mov    %rdi,%rbx
add    $0x1,%rbx
jmp    112b <uputs+0x1b>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
je     1139 <uputs+0x29>
cmp    $0x3,%al
jl     1120 <uputs+0x10>
movsbl %al,%edi
call   1030 <putchar@plt>
jmp    1120 <uputs+0x10>
mov    $0xa,%edi
pop    %rbx
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
define void @uputs(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %10
%5 = phi i8 [ %12, %10 ], [ %2, %1 ]
%6 = phi i8* [ %11, %10 ], [ %0, %1 ]
%7 = icmp sgt i8 %5, 2
br i1 %7, label %8, label %10
8: ; preds = %4
%9 = tail call i32 @putchar(i8 signext %5)
br label %10
10: ; preds = %8, %4
%11 = getelementptr inbounds i8, i8* %6, i64 1
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %10, %1
%15 = tail call i32 @putchar(i8 signext 10)
ret void
}
/* Variables and functions */
scalar_t__ asinhl(long double);
int /*<<< orphan*/ link_failure_asinhl();
void test_asinhl(long double ld) {
  if (asinhl(ld) != asinhl(ld))
    link_failure_asinhl();
}


x86 assembly (clang, -O0):
<test_asinhl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1040 <asinhl@plt>
mov    %rax,-0x18(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1040 <asinhl@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
cmp    %rcx,%rax
je     1163 <test_asinhl+0x43>
mov    $0x0,%al
call   1030 <link_failure_asinhl@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_asinhl>:
push   %rbx
sub    $0x20,%rsp
fldt   0x30(%rsp)
fld    %st(0)
fstpt  0x14(%rsp)
fstpt  (%rsp)
call   1040 <asinhl@plt>
mov    %rax,%rbx
fldt   0x14(%rsp)
fstpt  (%rsp)
call   1040 <asinhl@plt>
cmp    %rax,%rbx
jne    1151 <test_asinhl+0x31>
add    $0x20,%rsp
pop    %rbx
ret
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
jmp    1030 <link_failure_asinhl@plt>

LLVM IR (-O0):
define void @test_asinhl(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = call i64 @asinhl(x86_fp80 %3)
%5 = load x86_fp80, x86_fp80* %2
%6 = call i64 @asinhl(x86_fp80 %5)
%7 = icmp ne i64 %4, %6
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 (...) @link_failure_asinhl()
br label %10
10: ; preds = %8, %1
ret void
}

LLVM IR (-O2):
define void @test_asinhl(x86_fp80 %0) {
%2 = tail call i64 @asinhl(x86_fp80 %0)
%3 = tail call i64 @asinhl(x86_fp80 %0)
%4 = icmp eq i64 %2, %3
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 (...) @link_failure_asinhl()
br label %7
7: ; preds = %5, %1
ret void
}
/* Variables and functions */
int M_CheckParmWithArgs(char *, int /*<<< orphan*/, int);
int M_CheckParm(char *check) { return M_CheckParmWithArgs(check, 0, 1); }


x86 assembly (clang, -O0):
<M_CheckParm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x1,%edx
call   1030 <M_CheckParmWithArgs@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<M_CheckParm>:
xor    %esi,%esi
mov    $0x1,%edx
jmp    1030 <M_CheckParmWithArgs@plt>

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

LLVM IR (-O2):
define i32 @M_CheckParm(i8* %0) {
%2 = tail call i32 @M_CheckParmWithArgs(i8* %0, i32 0, i32 1)
ret i32 %2
}
void gtk_init() {}


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

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

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

LLVM IR (-O2):
define void @gtk_init() {
ret void
}
void smemstat_noop(void) {}


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

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

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

LLVM IR (-O2):
define void @smemstat_noop() {
ret void
}