xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ f10();
void f9() { f10(); }


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

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

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

LLVM IR (-O2):
define void @f9() {
%1 = tail call i32 (...) @f10()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ swapch(char *, char *);
void m2(char *m, int l) {
  char *b;
  char *e;
  for (b = m, e = m + l - 1; b < e; b++, e--)
    swapch(b, e);
}


x86 assembly (clang, -O0):
<m2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
add    %rcx,%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x20(%rbp),%rax
jae    1172 <m2+0x62>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1030 <swapch@plt>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x20(%rbp)
jmp    113a <m2+0x2a>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m2>:
push   %r14
push   %rbx
push   %rax
movslq %esi,%rax
lea    (%rdi,%rax,1),%rbx
add    $0xffffffffffffffff,%rbx
cmp    %rdi,%rbx
jbe    1148 <m2+0x38>
mov    %rdi,%r14
nopw   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <swapch@plt>
add    $0x1,%r14
add    $0xffffffffffffffff,%rbx
cmp    %rbx,%r14
jb     1130 <m2+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @m2(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %3
store i32 %1, i32* %4
%7 = load i8*, i8** %3
store i8* %7, i8** %5
%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 = getelementptr inbounds i8, i8* %11, i64 -1
store i8* %12, i8** %6
br label %13
13: ; preds = %21, %2
%14 = load i8*, i8** %5
%15 = load i8*, i8** %6
%16 = icmp ult i8* %14, %15
br i1 %16, label %17, label %26
17: ; preds = %13
%18 = load i8*, i8** %5
%19 = load i8*, i8** %6
%20 = call i32 @swapch(i8* %18, i8* %19)
br label %21
21: ; preds = %17
%22 = load i8*, i8** %5
%23 = getelementptr inbounds i8, i8* %22, i32 1
store i8* %23, i8** %5
%24 = load i8*, i8** %6
%25 = getelementptr inbounds i8, i8* %24, i32 -1
store i8* %25, i8** %6
br label %13
26: ; preds = %13
ret void
}

LLVM IR (-O2):
define void @m2(i8* %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = getelementptr inbounds i8, i8* %4, i64 -1
%6 = icmp ugt i8* %5, %0
br i1 %6, label %7, label %14
7: ; preds = %2, %7
%8 = phi i8* [ %12, %7 ], [ %5, %2 ]
%9 = phi i8* [ %11, %7 ], [ %0, %2 ]
%10 = tail call i32 @swapch(i8* %9, i8* %8)
%11 = getelementptr inbounds i8, i8* %9, i64 1
%12 = getelementptr inbounds i8, i8* %8, i64 -1
%13 = icmp ult i8* %11, %12
br i1 %13, label %7, label %14
14: ; preds = %7, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ stderr;
void usage(void) {
  printf("sleepctl %d.%d\n", 2, 12);
  fprintf(stderr, "Usage: sleepctl [on|off|xon|xoff|status|xdiff [XxY WxH]]\n");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
mov    $0x2,%esi
mov    $0xc,%edx
call   1030 <printf@plt>
mov    0x2e9f(%rip),%rax
mov    (%rax),%edi
lea    0xec6(%rip),%rsi
call   1040 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xed8(%rip),%rdi
mov    $0x2,%esi
mov    $0xc,%edx
call   1030 <printf@plt>
mov    0x2ea2(%rip),%rax
mov    (%rax),%edi
lea    0xec9(%rip),%rsi
pop    %rax
jmp    1040 <fprintf@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"sleepctl %d.%d\0A\00"
@stderr = global i32 0
@.str.1 = [58 x i8] c"Usage: sleepctl [on|off|xon|xoff|status|xdiff [XxY WxH]]\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 2, i32 12)
%2 = load i32, i32* @stderr
%3 = call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"sleepctl %d.%d\0A\00"
@stderr = global i32 0
@.str.1 = [58 x i8] c"Usage: sleepctl [on|off|xon|xoff|status|xdiff [XxY WxH]]\0A\00"
define void @usage() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 2, i32 12)
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ hello(char *);
int main(int argc, char **argv) {
  hello("gerry");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"gerry\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @hello(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"gerry\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @hello(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
f1(i, j) int i, j;
{ return (i != j); }


x86 assembly (clang, -O0):
<f1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f1>:
xor    %eax,%eax
cmp    %esi,%edi
setne  %al
ret

LLVM IR (-O0):
define i32 @f1(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = icmp ne i32 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @f1(i32 %0, i32 %1) {
%3 = icmp ne i32 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ print(char *, int);
int main(int argc, char **argv) {
  int x = 2;
  print("%d", x);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x2,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xec9(%rip),%rdi
call   1030 <print@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @print(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void a() {
  printf("a"
         "\n");
}


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

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

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

LLVM IR (-O2):
@str = [2 x i8] c"a\00"
define void @a() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf("Usage: libreforge [-hV] [--help] [--verbose]\n");
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [46 x i8] c"Usage: libreforge [-hV] [--help] [--verbose]\0A\00"
@EXIT_FAILURE = global i32 0
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @EXIT_FAILURE
%3 = call i32 @exit(i32 %2)
unreachable
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
@str = [45 x i8] c"Usage: libreforge [-hV] [--help] [--verbose]\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str, i64 0, i64 0))
%2 = load i32, i32* @EXIT_FAILURE
%3 = tail call i32 @exit(i32 %2)
unreachable
}
void DCSMReadZone1EXEONLY(void) {
  volatile unsigned long temp;
  temp = (*((volatile unsigned long *)(0x00200000 + 0x00000020)));
}


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

x86 assembly (clang, -O2):
<DCSMReadZone1EXEONLY>:
mov    0x200020,%rax
mov    %rax,-0x8(%rsp)
ret

LLVM IR (-O0):
define void @DCSMReadZone1EXEONLY() {
%1 = alloca i64
%2 = load volatile i64, i64* inttoptr (i64 2097184 to i64*)
store volatile i64 %2, i64* %1
ret void
}

LLVM IR (-O2):
define void @DCSMReadZone1EXEONLY() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
%3 = load volatile i64, i64* inttoptr (i64 2097184 to i64*)
store volatile i64 %3, i64* %1
ret void
}
int callee4(void) {
  int A = 1;
  int B = 2;
  int C;
  int D[3] = {0, 1, 2};
  C = A + B;
  return 0;
}


x86 assembly (clang, -O0):
<callee4>:
push   %rbp
mov    %rsp,%rbp
movl   $0x1,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
mov    0xee7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xee5(%rip),%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@__const.callee4.D = [3 x i32] [i32 0, i32 1, i32 2]
define i32 @callee4() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca [3 x i32]
store i32 1, i32* %1
store i32 2, i32* %2
%5 = bitcast [3 x i32]* %4 to i8*
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = add nsw i32 %6, %7
store i32 %8, i32* %3
ret i32 0
}

LLVM IR (-O2):
define i32 @callee4() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void arg_cp(void) { printf("cp\n"); }


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

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

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

LLVM IR (-O2):
@str = [3 x i8] c"cp\00"
define void @arg_cp() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0))
ret void
}
void INT_Excep_MTU1_TGIB1(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_MTU1_TGIB1() {
ret void
}
unsigned long long bam_swap_endian_8(unsigned long long v) {
  v = ((v & 0x00000000FFFFFFFFULL) << 32) | (v >> 32);
  v = ((v & 0x0000FFFF0000FFFFULL) << 16) | ((v & 0xFFFF0000FFFF0000ULL) >> 16);
  return ((v & 0x00FF00FF00FF00FFULL) << 8) |
         ((v & 0xFF00FF00FF00FF00ULL) >> 8);
}


x86 assembly (clang, -O0):
<bam_swap_endian_8>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movabs $0xffffffff,%rax
and    -0x8(%rbp),%rax
shl    $0x20,%rax
mov    -0x8(%rbp),%rcx
shr    $0x20,%rcx
or     %rcx,%rax
mov    %rax,-0x8(%rbp)
movabs $0xffff0000ffff,%rax
and    -0x8(%rbp),%rax
shl    $0x10,%rax
movabs $0xffff0000ffff0000,%rcx
and    -0x8(%rbp),%rcx
shr    $0x10,%rcx
or     %rcx,%rax
mov    %rax,-0x8(%rbp)
movabs $0xff00ff00ff00ff,%rax
and    -0x8(%rbp),%rax
shl    $0x8,%rax
movabs $0xff00ff00ff00ff00,%rcx
and    -0x8(%rbp),%rcx
shr    $0x8,%rcx
or     %rcx,%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i64 @bam_swap_endian_8(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = and i64 %3, 4294967295
%5 = shl i64 %4, 32
%6 = load i64, i64* %2
%7 = lshr i64 %6, 32
%8 = or i64 %5, %7
store i64 %8, i64* %2
%9 = load i64, i64* %2
%10 = and i64 %9, 281470681808895
%11 = shl i64 %10, 16
%12 = load i64, i64* %2
%13 = and i64 %12, -281470681808896
%14 = lshr i64 %13, 16
%15 = or i64 %11, %14
store i64 %15, i64* %2
%16 = load i64, i64* %2
%17 = and i64 %16, 71777214294589695
%18 = shl i64 %17, 8
%19 = load i64, i64* %2
%20 = and i64 %19, -71777214294589696
%21 = lshr i64 %20, 8
%22 = or i64 %18, %21
ret i64 %22
}

LLVM IR (-O2):
define i64 @bam_swap_endian_8(i64 %0) {
%2 = tail call i64 @llvm.bswap.i64(i64 %0)
ret i64 %2
}
void foo_1_1_1_2_2_1_2_1_2() {}


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

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

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

LLVM IR (-O2):
define void @foo_1_1_1_2_2_1_2_1_2() {
ret void
}
int test_imm_DEint16_mem(short *val) {
  return ((*val) & (-0xDE << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_DEint16_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movswl (%rax),%edx
and    $0xffffff22,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_DEint16_mem>:
movzwl (%rdi),%eax
test   $0xff22,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_DEint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -222
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int cos(double);
double math_sec(double x) { return 1 / cos(x); }


x86 assembly (clang, -O0):
<math_sec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <cos@plt>
mov    %eax,%ecx
mov    $0x1,%eax
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<math_sec>:
push   %rax
call   1030 <cos@plt>
lea    0x1(%rax),%ecx
xor    %edx,%edx
cmp    $0x3,%ecx
cmovb  %eax,%edx
xorps  %xmm0,%xmm0
cvtsi2sd %edx,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @math_sec(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i32 @cos(double %3)
%5 = sdiv i32 1, %4
%6 = sitofp i32 %5 to double
ret double %6
}

LLVM IR (-O2):
define double @math_sec(double %0) {
%2 = tail call i32 @cos(double %0)
%3 = add i32 %2, 1
%4 = icmp ult i32 %3, 3
%5 = select i1 %4, i32 %2, i32 0
%6 = sitofp i32 %5 to double
ret double %6
}
int hash(char *lexem) {
  int hash = 0;
  char c = ' ';
  int i = 0;
  while (c != '\0') {
    c = lexem[i++];
    hash = (c + hash) % (256 * 122);
  }
  return hash;
}


x86 assembly (clang, -O0):
<hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movb   $0x20,-0xd(%rbp)
movl   $0x0,-0x14(%rbp)
movsbl -0xd(%rbp),%eax
cmp    $0x0,%eax
je     1156 <hash+0x56>
mov    -0x8(%rbp),%rax
mov    -0x14(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x14(%rbp)
movslq %ecx,%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0xd(%rbp)
movsbl -0xd(%rbp),%eax
add    -0xc(%rbp),%eax
mov    $0x7a00,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
jmp    111a <hash+0x1a>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl (%rdi),%ecx
add    %ecx,%eax
cltq
imul   $0x4325c53f,%rax,%rdx
mov    %rdx,%rsi
shr    $0x3f,%rsi
sar    $0x2d,%rdx
add    %esi,%edx
imul   $0x7a00,%edx,%edx
sub    %edx,%eax
add    $0x1,%rdi
test   %ecx,%ecx
jne    1110 <hash+0x10>
ret

LLVM IR (-O0):
define i32 @hash(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i8
%5 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
store i8 32, i8* %4
store i32 0, i32* %5
br label %6
6: ; preds = %10, %1
%7 = load i8, i8* %4
%8 = sext i8 %7 to i32
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %22
10: ; preds = %6
%11 = load i8*, i8** %2
%12 = load i32, i32* %5
%13 = add nsw i32 %12, 1
store i32 %13, i32* %5
%14 = sext i32 %12 to i64
%15 = getelementptr inbounds i8, i8* %11, i64 %14
%16 = load i8, i8* %15
store i8 %16, i8* %4
%17 = load i8, i8* %4
%18 = sext i8 %17 to i32
%19 = load i32, i32* %3
%20 = add nsw i32 %18, %19
%21 = srem i32 %20, 31232
store i32 %21, i32* %3
br label %6
22: ; preds = %6
%23 = load i32, i32* %3
ret i32 %23
}

LLVM IR (-O2):
define i32 @hash(i8* nocapture %0) {
br label %2
2: ; preds = %1, %2
%3 = phi i64 [ 0, %1 ], [ %5, %2 ]
%4 = phi i32 [ 0, %1 ], [ %10, %2 ]
%5 = add nuw i64 %3, 1
%6 = getelementptr inbounds i8, i8* %0, i64 %3
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = add nsw i32 %4, %8
%10 = srem i32 %9, 31232
%11 = icmp eq i8 %7, 0
br i1 %11, label %12, label %2
12: ; preds = %2
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ fatal_error(char *, unsigned long);
void *malloc(size_t);
void *xmalloc(size_t size) {
  void *p = malloc(size);
  if (p == NULL) {
    fatal_error("Failed malloc(%lu)", (unsigned long)size);
  }
  return p;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1154 <xmalloc+0x34>
mov    -0x8(%rbp),%rsi
lea    0xeb1(%rip),%rdi
call   1030 <fatal_error@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1143 <xmalloc+0x23>
lea    0xec5(%rip),%rdi
mov    %r14,%rsi
call   1030 <fatal_error@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [19 x i8] c"Failed malloc(%lu)\00"
define i8* @xmalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i64, i64* %2
%10 = call i32 @fatal_error(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i64 %9)
br label %11
11: ; preds = %8, %1
%12 = load i8*, i8** %3
ret i8* %12
}

LLVM IR (-O2):
@.str = [19 x i8] c"Failed malloc(%lu)\00"
define noalias i8* @xmalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @fatal_error(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i64 %0)
br label %6
6: ; preds = %4, %1
ret i8* %2
}
__attribute__((weak)) void
fd_nrf8001_get_battery_level_success(float voltage __attribute__((unused))) {}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
ret

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

LLVM IR (-O2):
define weak void @fd_nrf8001_get_battery_level_success(float %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ std_err(char *);
usage() {
  std_err("Usage: rm [-fir] file\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <std_err@plt>
mov    $0x1,%edi
call   1030 <exit@plt>

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

LLVM IR (-O0):
@.str = [23 x i8] c"Usage: rm [-fir] file\0A\00"
define i32 @usage() {
%1 = call i32 @std_err(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [23 x i8] c"Usage: rm [-fir] file\0A\00"
define i32 @usage() {
%1 = tail call i32 @std_err(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 1)
unreachable
}
int quadrado(int n) {
  if (n == 1)
    return n;
  return n * n + quadrado(n - 1);
}


x86 assembly (clang, -O0):
<quadrado>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    1130 <quadrado+0x20>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    114f <quadrado+0x3f>
mov    -0x8(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <quadrado@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quadrado>:
mov    $0x1,%eax
cmp    $0x1,%edi
je     114b <quadrado+0x4b>
lea    -0x2(%rdi),%ecx
mov    %ecx,%eax
imul   %edi,%eax
add    $0x1,%eax
imul   %ecx,%eax
mov    $0x3,%esi
sub    %edi,%esi
sub    %edi,%esi
lea    -0x3(%rdi),%edx
imul   %rcx,%rdx
lea    -0x4(%rdi),%ecx
imul   %rdx,%rcx
shr    %rdx
imul   %esi,%edx
shr    %rcx
imul   $0x55555556,%ecx,%ecx
imul   %edi,%edi
add    %eax,%edi
add    %edx,%edi
lea    (%rcx,%rdi,1),%eax
add    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @quadrado(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 1
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = load i32, i32* %3
store i32 %7, i32* %2
br label %16
8: ; preds = %1
%9 = load i32, i32* %3
%10 = load i32, i32* %3
%11 = mul nsw i32 %9, %10
%12 = load i32, i32* %3
%13 = sub nsw i32 %12, 1
%14 = call i32 @quadrado(i32 %13)
%15 = add nsw i32 %11, %14
store i32 %15, i32* %2
br label %16
16: ; preds = %8, %6
%17 = load i32, i32* %2
ret i32 %17
}

LLVM IR (-O2):
define i32 @quadrado(i32 %0) {
%2 = icmp eq i32 %0, 1
br i1 %2, label %28, label %3
3: ; preds = %1
%4 = add i32 %0, -2
%5 = mul i32 %4, %0
%6 = add i32 %5, 1
%7 = mul i32 %4, %6
%8 = mul i32 %0, -2
%9 = add i32 %8, 3
%10 = zext i32 %4 to i33
%11 = add i32 %0, -3
%12 = zext i32 %11 to i33
%13 = mul i33 %10, %12
%14 = lshr i33 %13, 1
%15 = trunc i33 %14 to i32
%16 = mul i32 %9, %15
%17 = add i32 %0, -4
%18 = zext i32 %17 to i33
%19 = mul i33 %13, %18
%20 = lshr i33 %19, 1
%21 = trunc i33 %20 to i32
%22 = mul i32 %21, 1431655766
%23 = mul i32 %0, %0
%24 = add i32 %23, %7
%25 = add i32 %24, %16
%26 = add i32 %25, %22
%27 = add i32 %26, 1
br label %28
28: ; preds = %3, %1
%29 = phi i32 [ 1, %1 ], [ %27, %3 ]
ret i32 %29
}
int main(void) {
  int pid;
  asm volatile("movl $2, %%eax\n"
               "int $0x80\n"
               "movl %%eax, %0\n"
               : "=r"(pid));
  for (;;)
    ;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    $0x2,%eax
int    $0x80
mov    %eax,%eax
mov    %eax,-0x8(%rbp)
jmp    1117 <main+0x17>

x86 assembly (clang, -O2):
<main>:
mov    $0x2,%eax
int    $0x80
mov    %eax,%eax
nopl   0x0(%rax)
jmp    1110 <main+0x10>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 asm sideeffect "movl $$2, %eax\0Aint $$0x80\0Amovl %eax, $0\0A", "=r,~{dirflag},~{fpsr},~{flags}"()
store i32 %3, i32* %2
br label %4
4: ; preds = %4, %0
br label %4
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 asm sideeffect "movl $$2, %eax\0Aint $$0x80\0Amovl %eax, $0\0A", "=r,~{dirflag},~{fpsr},~{flags}"()
br label %2
2: ; preds = %2, %0
br label %2
}
int set_flag(void *dst, __attribute__((unused)) const char *src) {
  *(int *)dst = 1;
  return 0;
}


x86 assembly (clang, -O0):
<set_flag>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x1,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_flag>:
movl   $0x1,(%rdi)
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @set_flag(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 = bitcast i8* %5 to i32*
store i32 1, i32* %6
ret i32 0
}

LLVM IR (-O2):
define i32 @set_flag(i8* nocapture writeonly %0, i8* nocapture readnone %1) {
%3 = bitcast i8* %0 to i32*
store i32 1, i32* %3
ret i32 0
}
int Get2(unsigned char *mem) { return (mem[0] + (mem[1] * 256)); }


x86 assembly (clang, -O0):
<Get2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
mov    -0x8(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
shl    $0x8,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Get2>:
movzwl (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @Get2(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 = zext i8 %5 to i32
%7 = load i8*, i8** %2
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = load i8, i8* %8
%10 = zext i8 %9 to i32
%11 = mul nsw i32 %10, 256
%12 = add nsw i32 %6, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @Get2(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i32
%4 = getelementptr inbounds i8, i8* %0, i64 1
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = shl nuw nsw i32 %6, 8
%8 = or i32 %7, %3
ret i32 %8
}
/* Variables and functions */
int read(int, char *, int);
int /*<<< orphan*/ write(int, char *, int);
void copy_image(int in, int out) {
  char buf[0x1000];
  int n;
  while ((n = read(in, buf, 0x1000)) > 0)
    write(out, buf, n);
}


x86 assembly (clang, -O0):
<copy_image>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1020,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x1010(%rbp),%rsi
mov    $0x1000,%edx
call   1040 <read@plt>
mov    %eax,-0x1014(%rbp)
cmp    $0x0,%eax
jle    116e <copy_image+0x4e>
mov    -0x8(%rbp),%edi
lea    -0x1010(%rbp),%rsi
mov    -0x1014(%rbp),%edx
call   1030 <write@plt>
jmp    1131 <copy_image+0x11>
add    $0x1020,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_image>:
push   %rbp
push   %r14
push   %rbx
sub    $0x1000,%rsp
mov    %esi,%r14d
mov    %edi,%ebp
mov    %rsp,%rsi
mov    $0x1000,%edx
call   1040 <read@plt>
test   %eax,%eax
jle    1170 <copy_image+0x50>
mov    %rsp,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r14d,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <write@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    $0x1000,%edx
call   1040 <read@plt>
test   %eax,%eax
jg     1150 <copy_image+0x30>
add    $0x1000,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @copy_image(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca [4096 x i8]
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
br label %7
7: ; preds = %12, %2
%8 = load i32, i32* %3
%9 = getelementptr inbounds [4096 x i8], [4096 x i8]* %5, i64 0, i64 0
%10 = call i32 @read(i32 %8, i8* %9, i32 4096)
store i32 %10, i32* %6
%11 = icmp sgt i32 %10, 0
br i1 %11, label %12, label %17
12: ; preds = %7
%13 = load i32, i32* %4
%14 = getelementptr inbounds [4096 x i8], [4096 x i8]* %5, i64 0, i64 0
%15 = load i32, i32* %6
%16 = call i32 @write(i32 %13, i8* %14, i32 %15)
br label %7
17: ; preds = %7
ret void
}

LLVM IR (-O2):
define void @copy_image(i32 %0, i32 %1) {
%3 = alloca [4096 x i8]
%4 = getelementptr inbounds [4096 x i8], [4096 x i8]* %3, i64 0, i64 0
%5 = call i32 @read(i32 %0, i8* %4, i32 4096)
%6 = icmp sgt i32 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %2, %7
%8 = phi i32 [ %10, %7 ], [ %5, %2 ]
%9 = call i32 @write(i32 %1, i8* %4, i32 %8)
%10 = call i32 @read(i32 %0, i8* %4, i32 4096)
%11 = icmp sgt i32 %10, 0
br i1 %11, label %7, label %12
12: ; preds = %7, %2
ret void
}
/* Variables and functions */
double strtod(char const *, int /*<<< orphan*/);
double atof(const char *nptr) {
  double tmp = strtod(nptr, 0);
  return tmp;
}


x86 assembly (clang, -O0):
<atof>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
call   1030 <strtod@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<atof>:
xor    %esi,%esi
jmp    1030 <strtod@plt>

LLVM IR (-O0):
define double @atof(i8* %0) {
%2 = alloca i8*
%3 = alloca double
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call double @strtod(i8* %4, i32 0)
store double %5, double* %3
%6 = load double, double* %3
ret double %6
}

LLVM IR (-O2):
define double @atof(i8* %0) {
%2 = tail call double @strtod(i8* %0, i32 0)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ error(int);
char *malloc(unsigned int);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, unsigned int);
char *allocate(unsigned size) {
  char *ptr;
  ptr = malloc(size);
  if (!ptr)
    error(12);
  memset(ptr, 0, size);
  return ptr;
}


x86 assembly (clang, -O0):
<allocate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    115c <allocate+0x2c>
mov    $0xc,%edi
call   1050 <error@plt>
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%edx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<allocate>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    114c <allocate+0x1c>
mov    $0xc,%edi
call   1050 <error@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    %ebp,%edx
call   1030 <memset@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i8* @allocate(i32 %0) {
%2 = tail call i8* @malloc(i32 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @error(i32 12)
br label %6
6: ; preds = %4, %1
%7 = tail call i32 @memset(i8* %2, i32 0, i32 %0)
ret i8* %2
}
/* Variables and functions */
int omp_get_thread_num();
int /*<<< orphan*/ printf(char *, int);
int main() {
  int nt, np;
#pragma omp parallel private(nt, np)
  {
    np = omp_get_thread_num();
#pragma omp sections
    {
#pragma omp section
      printf("Soy el thread %d, en solitario en la seccion 11a \n", np);
#pragma omp section
      printf("Soy el thread %d, en solitario en la sección 22a \n", np);
#pragma omp section
      printf("Soy el thread %d, en solitario en la seccion 33a \n", np);
    }
  }
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1030 <omp_get_thread_num@plt>
mov    %eax,%ebx
lea    0xecf(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
lea    0xef4(%rip),%rdi
mov    %ebx,%esi
call   1040 <printf@plt>
lea    0xf1a(%rip),%rdi
mov    %ebx,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [51 x i8] c"Soy el thread %d, en solitario en la seccion 11a \0A\00"
@.str.1 = [52 x i8] c"Soy el thread %d, en solitario en la secci\C3\B3n 22a \0A\00"
@.str.2 = [51 x i8] c"Soy el thread %d, en solitario en la seccion 33a \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (...) @omp_get_thread_num()
store i32 %4, i32* %3
%5 = load i32, i32* %3
%6 = call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = load i32, i32* %3
%8 = call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.1, i64 0, i64 0), i32 %7)
%9 = load i32, i32* %3
%10 = call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.2, i64 0, i64 0), i32 %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [51 x i8] c"Soy el thread %d, en solitario en la seccion 11a \0A\00"
@.str.1 = [52 x i8] c"Soy el thread %d, en solitario en la secci\C3\B3n 22a \0A\00"
@.str.2 = [51 x i8] c"Soy el thread %d, en solitario en la seccion 33a \0A\00"
define i32 @main() {
%1 = tail call i32 (...) @omp_get_thread_num()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.1, i64 0, i64 0), i32 %1)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.2, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ __real_close(int);
int /*<<< orphan*/ win32_rm_dirpath(int);
int __wrap_close(int fd) {
  if (!win32_rm_dirpath(fd))
    __real_close(fd);
  return 0;
}


x86 assembly (clang, -O0):
<__wrap_close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <win32_rm_dirpath@plt>
cmp    $0x0,%eax
jne    1144 <__wrap_close+0x24>
mov    -0x4(%rbp),%edi
call   1030 <__real_close@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__wrap_close>:
push   %rbx
mov    %edi,%ebx
call   1040 <win32_rm_dirpath@plt>
test   %eax,%eax
jne    1133 <__wrap_close+0x13>
mov    %ebx,%edi
call   1030 <__real_close@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @__wrap_close(i32 %0) {
%2 = tail call i32 @win32_rm_dirpath(i32 %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @__real_close(i32 %0)
br label %6
6: ; preds = %4, %1
ret i32 0
}
int NLtoI(int next, int last) {
  if ((next < 0) || (next > 3) || (last < 0) || (last > 3)) {
    return -1;
  }
  static int dirmid[4][4] = {
      {0, 8, 0, 4}, {5, 1, 9, 1}, {2, 6, 2, 10}, {11, 3, 7, 3}};
  return dirmid[next][last];
}


x86 assembly (clang, -O0):
<NLtoI>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     1132 <NLtoI+0x32>
cmpl   $0x3,-0x8(%rbp)
jg     1132 <NLtoI+0x32>
cmpl   $0x0,-0xc(%rbp)
jl     1132 <NLtoI+0x32>
cmpl   $0x3,-0xc(%rbp)
jle    113e <NLtoI+0x3e>
movl   $0xffffffff,-0x4(%rbp)
jmp    115a <NLtoI+0x5a>
movslq -0x8(%rbp),%rcx
lea    0x2ee7(%rip),%rax
shl    $0x4,%rcx
add    %rcx,%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<NLtoI>:
mov    %esi,%ecx
or     %edi,%ecx
mov    $0xffffffff,%eax
cmp    $0x3,%ecx
ja     1123 <NLtoI+0x23>
mov    %edi,%eax
mov    %esi,%ecx
shl    $0x4,%rax
lea    0xee3(%rip),%rdx
add    %rax,%rdx
mov    (%rdx,%rcx,4),%eax
ret

LLVM IR (-O0):
@NLtoI.dirmid = internal global [4 x [4 x i32]] [[4 x i32] [i32 0, i32 8, i32 0, i32 4], [4 x i32] [i32 5, i32 1, i32 9, i32 1], [4 x i32] [i32 2, i32 6, i32 2, i32 10], [4 x i32] [i32 11, i32 3, i32 7, i32 3]]
define i32 @NLtoI(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %4
%7 = icmp slt i32 %6, 0
br i1 %7, label %17, label %8
8: ; preds = %2
%9 = load i32, i32* %4
%10 = icmp sgt i32 %9, 3
br i1 %10, label %17, label %11
11: ; preds = %8
%12 = load i32, i32* %5
%13 = icmp slt i32 %12, 0
br i1 %13, label %17, label %14
14: ; preds = %11
%15 = load i32, i32* %5
%16 = icmp sgt i32 %15, 3
br i1 %16, label %17, label %18
17: ; preds = %14, %11, %8, %2
store i32 -1, i32* %3
br label %26
18: ; preds = %14
%19 = load i32, i32* %4
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds [4 x [4 x i32]], [4 x [4 x i32]]* @NLtoI.dirmid, i64 0, i64 %20
%22 = load i32, i32* %5
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds [4 x i32], [4 x i32]* %21, i64 0, i64 %23
%25 = load i32, i32* %24
store i32 %25, i32* %3
br label %26
26: ; preds = %18, %17
%27 = load i32, i32* %3
ret i32 %27
}

LLVM IR (-O2):
@NLtoI.dirmid = internal unnamed_addr constant [4 x [4 x i32]] [[4 x i32] [i32 0, i32 8, i32 0, i32 4], [4 x i32] [i32 5, i32 1, i32 9, i32 1], [4 x i32] [i32 2, i32 6, i32 2, i32 10], [4 x i32] [i32 11, i32 3, i32 7, i32 3]]
define i32 @NLtoI(i32 %0, i32 %1) {
%3 = or i32 %1, %0
%4 = icmp ult i32 %3, 4
br i1 %4, label %5, label %10
5: ; preds = %2
%6 = zext i32 %0 to i64
%7 = zext i32 %1 to i64
%8 = getelementptr inbounds [4 x [4 x i32]], [4 x [4 x i32]]* @NLtoI.dirmid, i64 0, i64 %6, i64 %7
%9 = load i32, i32* %8
br label %10
10: ; preds = %2, %5
%11 = phi i32 [ %9, %5 ], [ -1, %2 ]
ret i32 %11
}
/* Variables and functions */
unsigned int read_golomb(unsigned char *, unsigned int *);
int read_golomb_s(unsigned char *buffer, unsigned int *init) {
  unsigned int v = read_golomb(buffer, init);
  return (v & 1) ? ((v + 1) >> 1) : -(v >> 1);
}


x86 assembly (clang, -O0):
<read_golomb_s>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <read_golomb@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1150 <read_golomb_s+0x40>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
shr    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    115d <read_golomb_s+0x4d>
mov    -0x14(%rbp),%ecx
shr    $0x1,%ecx
xor    %eax,%eax
sub    %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_golomb_s>:
push   %rax
call   1030 <read_golomb@plt>
lea    0x1(%rax),%edx
shr    %edx
mov    %eax,%ecx
shr    %ecx
neg    %ecx
test   $0x1,%al
cmovne %edx,%ecx
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @read_golomb_s(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
%5 = alloca i32
store i8* %0, i8** %3
store i32* %1, i32** %4
%6 = load i8*, i8** %3
%7 = load i32*, i32** %4
%8 = call i32 @read_golomb(i8* %6, i32* %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = and i32 %9, 1
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %16
12: ; preds = %2
%13 = load i32, i32* %5
%14 = add i32 %13, 1
%15 = lshr i32 %14, 1
br label %20
16: ; preds = %2
%17 = load i32, i32* %5
%18 = lshr i32 %17, 1
%19 = sub i32 0, %18
br label %20
20: ; preds = %16, %12
%21 = phi i32 [ %15, %12 ], [ %19, %16 ]
ret i32 %21
}

LLVM IR (-O2):
define i32 @read_golomb_s(i8* %0, i32* %1) {
%3 = tail call i32 @read_golomb(i8* %0, i32* %1)
%4 = and i32 %3, 1
%5 = icmp eq i32 %4, 0
%6 = add i32 %3, 1
%7 = lshr i32 %6, 1
%8 = lshr i32 %3, 1
%9 = sub nsw i32 0, %8
%10 = select i1 %5, i32 %9, i32 %7
ret i32 %10
}
__attribute((no)) char *buggy(int b) {
  char c[64];
  char *volatile p = c;
  if (b) {
    p = __builtin_alloca(64);
    p = c;
  }
  return p;
}


x86 assembly (clang, -O0):
<buggy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x50(%rbp),%rax
mov    %rax,-0x58(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1133 <buggy+0x33>
mov    %rsp,%rax
add    $0xffffffffffffffc0,%rax
mov    %rax,%rsp
mov    %rax,-0x58(%rbp)
lea    -0x50(%rbp),%rax
mov    %rax,-0x58(%rbp)
mov    -0x58(%rbp),%rax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<buggy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
lea    -0x50(%rbp),%rax
mov    %rax,-0x8(%rbp)
test   %edi,%edi
je     1126 <buggy+0x26>
mov    %rsp,%rcx
add    $0xffffffffffffffc0,%rcx
mov    %rcx,%rsp
mov    %rcx,-0x8(%rbp)
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rbp,%rsp
pop    %rbp
ret

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

LLVM IR (-O2):
define i8* @buggy(i32 %0) {
%2 = alloca [64 x i8]
%3 = alloca i8*
%4 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 0
%5 = bitcast i8** %3 to i8*
store volatile i8* %4, i8** %3
%6 = icmp eq i32 %0, 0
br i1 %6, label %10, label %7
7: ; preds = %1
%8 = alloca [64 x i8]
%9 = getelementptr inbounds [64 x i8], [64 x i8]* %8, i64 0, i64 0
store volatile i8* %9, i8** %3
store volatile i8* %4, i8** %3
br label %10
10: ; preds = %7, %1
%11 = load volatile i8*, i8** %3
ret i8* %11
}
void gf8mul_11101100(void) {
  __asm__ __volatile__("\tpxor    %xmm7, %xmm2\n"
                       "\tpxor    %xmm6, %xmm1\n"
                       "\tpxor    %xmm5, %xmm0\n"
                       "\tpxor    %xmm4, %xmm7\n"
                       "\tpxor    %xmm4, %xmm3\n"
                       "\tpxor    %xmm4, %xmm1\n"
                       "\tpxor    %xmm3, %xmm6\n"
                       "\tpxor    %xmm3, %xmm2\n"
                       "\tpxor    %xmm3, %xmm0\n"
                       "\tpxor    %xmm2, %xmm7\n"
                       "\tpxor    %xmm2, %xmm4\n"
                       "\tpxor    %xmm1, %xmm7\n"
                       "\tpxor    %xmm1, %xmm6\n"
                       "\tpxor    %xmm1, %xmm2\n"
                       "\tpxor    %xmm2, %xmm1\n"
                       "\tpxor    %xmm0, %xmm7\n"
                       "\tpxor    %xmm0, %xmm6\n"
                       "\tpxor    %xmm0, %xmm5\n"
                       "\tpxor    %xmm0, %xmm3\n"
                       "\tpxor    %xmm0, %xmm2\n"
                       "\tpxor    %xmm2, %xmm0\n");
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
pxor   %xmm7,%xmm2
pxor   %xmm6,%xmm1
pxor   %xmm5,%xmm0
pxor   %xmm4,%xmm7
pxor   %xmm4,%xmm3
pxor   %xmm4,%xmm1
pxor   %xmm3,%xmm6
pxor   %xmm3,%xmm2
pxor   %xmm3,%xmm0
pxor   %xmm2,%xmm7
pxor   %xmm2,%xmm4
pxor   %xmm1,%xmm7
pxor   %xmm1,%xmm6
pxor   %xmm1,%xmm2
pxor   %xmm2,%xmm1
pxor   %xmm0,%xmm7
pxor   %xmm0,%xmm6
pxor   %xmm0,%xmm5
pxor   %xmm0,%xmm3
pxor   %xmm0,%xmm2
pxor   %xmm2,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
pxor   %xmm7,%xmm2
pxor   %xmm6,%xmm1
pxor   %xmm5,%xmm0
pxor   %xmm4,%xmm7
pxor   %xmm4,%xmm3
pxor   %xmm4,%xmm1
pxor   %xmm3,%xmm6
pxor   %xmm3,%xmm2
pxor   %xmm3,%xmm0
pxor   %xmm2,%xmm7
pxor   %xmm2,%xmm4
pxor   %xmm1,%xmm7
pxor   %xmm1,%xmm6
pxor   %xmm1,%xmm2
pxor   %xmm2,%xmm1
pxor   %xmm0,%xmm7
pxor   %xmm0,%xmm6
pxor   %xmm0,%xmm5
pxor   %xmm0,%xmm3
pxor   %xmm0,%xmm2
pxor   %xmm2,%xmm0
ret

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

LLVM IR (-O2):
define void @gf8mul_11101100() {
tail call void asm sideeffect "\09pxor %xmm7, %xmm2\0A\09pxor %xmm6, %xmm1\0A\09pxor %xmm5, %xmm0\0A\09pxor %xmm4, %xmm7\0A\09pxor %xmm4, %xmm3\0A\09pxor %xmm4, %xmm1\0A\09pxor %xmm3, %xmm6\0A\09pxor %xmm3, %xmm2\0A\09pxor %xmm3, %xmm0\0A\09pxor %xmm2, %xmm7\0A\09pxor %xmm2, %xmm4\0A\09pxor %xmm1, %xmm7\0A\09pxor %xmm1, %xmm6\0A\09pxor %xmm1, %xmm2\0A\09pxor %xmm2, %xmm1\0A\09pxor %xmm0, %xmm7\0A\09pxor %xmm0, %xmm6\0A\09pxor %xmm0, %xmm5\0A\09pxor %xmm0, %xmm3\0A\09pxor %xmm0, %xmm2\0A\09pxor %xmm2, %xmm0\0A", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
void EventSwEventClear(uint32_t ui32SwEvent) {
  ;
  (*((volatile unsigned char *)(0x40083000 + 0x00000F00 + ui32SwEvent))) = 0;
}


x86 assembly (clang, -O0):
<EventSwEventClear>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x40083f00,%rax
movb   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<EventSwEventClear>:
movb   $0x0,0x40083f00(%rdi)
ret

LLVM IR (-O0):
define void @EventSwEventClear(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add nsw i64 1074282240, %3
%5 = inttoptr i64 %4 to i8*
store volatile i8 0, i8* %5
ret void
}

LLVM IR (-O2):
define void @EventSwEventClear(i64 %0) {
%2 = add nsw i64 %0, 1074282240
%3 = inttoptr i64 %2 to i8*
store volatile i8 0, i8* %3
ret void
}
/* Variables and functions */
int EOF;
int /*<<< orphan*/ printf(char *, int);
int main() {
  int c = EOF;
  printf("%d", c);
  return 0;
}


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

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

LLVM IR (-O0):
@EOF = global i32 0
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = load i32, i32* @EOF
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}

LLVM IR (-O2):
@EOF = global i32 0
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = load i32, i32* @EOF
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}