xunge/DecIR huggingface dataset:
void fa30(void) {
P0A:
  goto P0A;
  ({
    P01A:
      goto P01A;
      ({
        p012A:
          goto p012A;
          goto a;
        a:
          0;
      });
    P01B:
      goto P01B;
      ({
        P013A:
          goto P013A;
          0;
      });
    P01C:
      goto P01C;
      0;
  });
P0B:
  goto P0B;
  ({
    P02A:
      goto P02A;
      ({
        P024A:
          goto P024A;
          0;
      });
    P02B:
      goto P02B;
      ({
        P025A:
          goto P025A;
          0;
      });
    P02C:
      goto P02C;
      0;
  });
P0C:
  goto P0C;
  0;
P0D:
  goto P0D;
}


x86 assembly (clang, -O0):
<fa30>:
push   %rbp
mov    %rsp,%rbp
jmp    1104 <fa30+0x4>

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

LLVM IR (-O0):
define void @fa30() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
br label %7
7: ; preds = %7, %0
br label %7
8: ; No predecessors!
br label %9
9: ; preds = %9, %8
br label %9
10: ; No predecessors!
br label %11
11: ; preds = %11, %10
br label %11
12: ; preds = %12
br label %12
13: ; No predecessors!
br label %14
14: ; preds = %14, %13
br label %14
15: ; preds = %15
br label %15
16: ; preds = %16
br label %16
17: ; No predecessors!
br label %18
18: ; preds = %18, %17
br label %18
19: ; No predecessors!
br label %20
20: ; preds = %20, %19
br label %20
21: ; preds = %21
br label %21
22: ; No predecessors!
br label %23
23: ; preds = %23, %22
br label %23
24: ; preds = %24
br label %24
25: ; preds = %25
br label %25
26: ; preds = %26
br label %26
}

LLVM IR (-O2):
define void @fa30() {
br label %1
1: ; preds = %1, %0
br label %1
}
int Vec_SetWordNum(int nSize) { return (nSize + 1) >> 1; }


x86 assembly (clang, -O0):
<Vec_SetWordNum>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
sar    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Vec_SetWordNum>:
lea    0x1(%rdi),%eax
sar    %eax
ret

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

LLVM IR (-O2):
define i32 @Vec_SetWordNum(i32 %0) {
%2 = add nsw i32 %0, 1
%3 = ashr i32 %2, 1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void test(int *arg) { printf("Test arg:%d\n", *arg); }


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

x86 assembly (clang, -O2):
<test>:
mov    (%rdi),%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [13 x i8] c"Test arg:%d\0A\00"
define void @test(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %2)
ret void
}
/* Variables and functions */
int bar();
int /*<<< orphan*/ bla(int);
void foo(void) {
  int k;
  goto forward;
back:
  bla(k);
  return;
forward : {
  int i = bar();
  k = i;
  goto back;
}
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
jmp    113b <foo+0x1b>
mov    -0x4(%rbp),%edi
call   1040 <bla@plt>
add    $0x10,%rsp
pop    %rbp
ret
mov    $0x0,%al
call   1030 <bar@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    112d <foo+0xd>

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

LLVM IR (-O0):
define void @foo() {
%1 = alloca i32
%2 = alloca i32
br label %6
3: ; preds = %6
%4 = load i32, i32* %1
%5 = call i32 @bla(i32 %4)
ret void
6: ; preds = %0
%7 = call i32 (...) @bar()
store i32 %7, i32* %2
%8 = load i32, i32* %2
store i32 %8, i32* %1
br label %3
}

LLVM IR (-O2):
define void @foo() {
%1 = tail call i32 (...) @bar()
%2 = tail call i32 @bla(i32 %1)
ret void
}
/* Type definitions */
struct jit_state {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ emit1(struct jit_state *, int);
int /*<<< orphan*/ emit_basic_rex(struct jit_state *, int /*<<< orphan*/,
                                  int /*<<< orphan*/, int);
void emit_pop(struct jit_state *state, int r) {
  emit_basic_rex(state, 0, 0, r);
  emit1(state, 0x58 | (r & 7));
}


x86 assembly (clang, -O0):
<emit_pop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%ecx
xor    %edx,%edx
mov    %edx,%esi
call   1040 <emit_basic_rex@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
and    $0x7,%esi
or     $0x58,%esi
call   1030 <emit1@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<emit_pop>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
xor    %esi,%esi
xor    %edx,%edx
mov    %ebx,%ecx
call   1040 <emit_basic_rex@plt>
and    $0x7,%ebx
or     $0x58,%ebx
mov    %r14,%rdi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <emit1@plt>

LLVM IR (-O0):
%struct.jit_state = type { i32 }
define void @emit_pop(%struct.jit_state* %0, i32 %1) {
%3 = alloca %struct.jit_state*
%4 = alloca i32
store %struct.jit_state* %0, %struct.jit_state** %3
store i32 %1, i32* %4
%5 = load %struct.jit_state*, %struct.jit_state** %3
%6 = load i32, i32* %4
%7 = call i32 @emit_basic_rex(%struct.jit_state* %5, i32 0, i32 0, i32 %6)
%8 = load %struct.jit_state*, %struct.jit_state** %3
%9 = load i32, i32* %4
%10 = and i32 %9, 7
%11 = or i32 88, %10
%12 = call i32 @emit1(%struct.jit_state* %8, i32 %11)
ret void
}

LLVM IR (-O2):
%struct.jit_state = type { i32 }
define void @emit_pop(%struct.jit_state* %0, i32 %1) {
%3 = tail call i32 @emit_basic_rex(%struct.jit_state* %0, i32 0, i32 0, i32 %1)
%4 = and i32 %1, 7
%5 = or i32 %4, 88
%6 = tail call i32 @emit1(%struct.jit_state* %0, i32 %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ initButtons();
int /*<<< orphan*/ initIME();
void LVInit() {
  initButtons();
  initIME();
}


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

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

LLVM IR (-O0):
define void @LVInit() {
%1 = call i32 (...) @initButtons()
%2 = call i32 (...) @initIME()
ret void
}

LLVM IR (-O2):
define void @LVInit() {
%1 = tail call i32 (...) @initButtons()
%2 = tail call i32 (...) @initIME()
ret void
}
void handler(int signo) { return; }


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

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

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

LLVM IR (-O2):
define void @handler(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, char *argv[]) {
  char a;
  printf("%p\n", &a);
  exit(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)
lea    0xec3(%rip),%rdi
lea    -0x11(%rbp),%rsi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x7(%rsp),%rsi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%p\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i8
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @exit(i32 0)
unreachable
}
/* Type definitions */
typedef int u_int32_t;

/* Variables and functions */
int hash(void const *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char const *);
u_int32_t hashkey(const char *key) {
  if (key == NULL)
    return (-1);
  return (hash((const void *)key, strlen(key)) & 0x000000FF);
}


x86 assembly (clang, -O0):
<hashkey>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1143 <hashkey+0x23>
movl   $0xffffffff,-0x4(%rbp)
jmp    1167 <hashkey+0x47>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%esi
call   1040 <hash@plt>
and    $0xff,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hashkey>:
test   %rdi,%rdi
je     113d <hashkey+0x1d>
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <hash@plt>
movzbl %al,%eax
pop    %rbx
ret
mov    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @hashkey(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = tail call i32 @strlen(i8* %0)
%5 = tail call i32 @hash(i8* %0, i32 %4)
%6 = and i32 %5, 255
br label %7
7: ; preds = %1, %3
%8 = phi i32 [ %6, %3 ], [ -1, %1 ]
ret i32 %8
}
XSetWindowBorderWidth() {}


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

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

LLVM IR (-O0):
define i32 @XSetWindowBorderWidth() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @XSetWindowBorderWidth() {
ret i32 undef
}
/* Variables and functions */
size_t CountBitsInLongLong(void) {
  size_t count = 0;
  unsigned long long bits = (unsigned long long)-1;
  while (bits > 0) {
    bits >>= 1;
    ++count;
  }
  return count;
}


x86 assembly (clang, -O0):
<CountBitsInLongLong>:
push   %rbp
mov    %rsp,%rbp
movq   $0x0,-0x8(%rbp)
movq   $0xffffffffffffffff,-0x10(%rbp)
ff
cmpq   $0x0,-0x10(%rbp)
jbe    113c <CountBitsInLongLong+0x3c>
mov    -0x10(%rbp),%rax
shr    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1114 <CountBitsInLongLong+0x14>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i64 @CountBitsInLongLong() {
ret i64 64
}
int arch_irqs_disabled_flags(unsigned long flags) {
  return ((flags & 0x1) == 0);
}


x86 assembly (clang, -O0):
<arch_irqs_disabled_flags>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
and    $0x1,%rax
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @arch_irqs_disabled_flags(i64 %0) {
%2 = trunc i64 %0 to i32
%3 = and i32 %2, 1
%4 = xor i32 %3, 1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int sum = 0, i = 0;
  sum = 266333;
  for (; i < 1000; i += 15) {
    sum -= i;
  }
  printf("Problem 1: %d\n", sum);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x4105d,-0x8(%rbp)
cmpl   $0x3e8,-0xc(%rbp)
jge    115a <main+0x4a>
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0xf,%eax
mov    %eax,-0xc(%rbp)
jmp    1134 <main+0x24>
mov    -0x8(%rbp),%esi
lea    0xe9c(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [15 x i8] c"Problem 1: %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 233168)
ret i32 0
}
/* Variables and functions */
int C_FPCLASSIFY(double);
int main() {
  int x = C_FPCLASSIFY(0.0);
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @C_FPCLASSIFY(double 0.000000e+00)
store i32 %3, i32* %2
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @C_FPCLASSIFY(double 0.000000e+00)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ KeSetEvent(int, int /*<<< orphan*/, int /*<<< orphan*/);
int CdAudioSignalCompletion(int DeviceObject, int Irp, int Event) {
  {
    { KeSetEvent(Event, 0, 0); }
    return (-1073741802);
  }
}


x86 assembly (clang, -O0):
<CdAudioSignalCompletion>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0xc(%rbp),%edi
xor    %edx,%edx
mov    %edx,%esi
call   1030 <KeSetEvent@plt>
mov    $0xc0000016,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CdAudioSignalCompletion>:
push   %rax
mov    %edx,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1030 <KeSetEvent@plt>
mov    $0xc0000016,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @CdAudioSignalCompletion(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %6
%8 = call i32 @KeSetEvent(i32 %7, i32 0, i32 0)
ret i32 -1073741802
}

LLVM IR (-O2):
define i32 @CdAudioSignalCompletion(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @KeSetEvent(i32 %2, i32 0, i32 0)
ret i32 -1073741802
}
/* Variables and functions */
int omp_get_num_threads();
int omp_get_thread_num();
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  int nthreads, tid;
#pragma omp parallel private(nthreads, tid)
  {
    tid = omp_get_thread_num();
    printf("Hello World from thread = %d\n", tid);
    if (tid == 0) {
      nthreads = omp_get_num_threads();
      printf("Number of threads = %d\n", nthreads);
    }
  }
  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)
mov    $0x0,%al
call   1030 <omp_get_thread_num@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%esi
lea    0xea6(%rip),%rdi
call   1040 <printf@plt>
cmpl   $0x0,-0x18(%rbp)
jne    1182 <main+0x52>
mov    $0x0,%al
call   1050 <omp_get_num_threads@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xea1(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%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    0xebf(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
test   %ebx,%ebx
jne    1161 <main+0x31>
xor    %eax,%eax
call   1050 <omp_get_num_threads@plt>
lea    0xec4(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [30 x i8] c"Hello World from thread = %d\0A\00"
@.str.1 = [24 x i8] c"Number of threads = %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = call i32 (...) @omp_get_thread_num()
store i32 %8, i32* %7
%9 = load i32, i32* %7
%10 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = load i32, i32* %7
%12 = icmp eq i32 %11, 0
br i1 %12, label %13, label %17
13: ; preds = %2
%14 = call i32 (...) @omp_get_num_threads()
store i32 %14, i32* %6
%15 = load i32, i32* %6
%16 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i32 %15)
br label %17
17: ; preds = %13, %2
ret i32 0
}

LLVM IR (-O2):
@.str = [30 x i8] c"Hello World from thread = %d\0A\00"
@.str.1 = [24 x i8] c"Number of threads = %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @omp_get_thread_num()
%4 = tail call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = icmp eq i32 %3, 0
br i1 %5, label %6, label %9
6: ; preds = %2
%7 = tail call i32 (...) @omp_get_num_threads()
%8 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i32 %7)
br label %9
9: ; preds = %6, %2
ret i32 0
}
void SmartMac_SendList() {}


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

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

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

LLVM IR (-O2):
define void @SmartMac_SendList() {
ret void
}
int test(int a) { return a * 0x123456; }


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
imul   $0x123456,-0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
imul   $0x123456,%edi,%eax
ret

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

LLVM IR (-O2):
define i32 @test(i32 %0) {
%2 = mul nsw i32 %0, 1193046
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void _moz_foo(void) { printf("blah\n"); }


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

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

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

LLVM IR (-O2):
@str = [5 x i8] c"blah\00"
define void @_moz_foo() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ first_event;
};
typedef TYPE_1__ XExtCodes;

/* Variables and functions */
int get_XExtCodes_first_event(void *_p) {
  return (int)((XExtCodes *)_p)->first_event;
}


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

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

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

LLVM IR (-O2):
define i32 @get_XExtCodes_first_event(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
void **plndup(void *const *, size_t, void *(*)(void const *));
void **pldup(void *const *array, void *copy(const void *p)) {
  return plndup(array, ((size_t)-1), copy);
}


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

x86 assembly (clang, -O2):
<pldup>:
mov    %rsi,%rdx
mov    $0xffffffffffffffff,%rsi
jmp    1030 <plndup@plt>

LLVM IR (-O0):
define i8** @pldup(i8** %0, i8* (i8*)* %1) {
%3 = alloca i8**
%4 = alloca i8* (i8*)*
store i8** %0, i8*** %3
store i8* (i8*)* %1, i8* (i8*)** %4
%5 = load i8**, i8*** %3
%6 = load i8* (i8*)*, i8* (i8*)** %4
%7 = call i8** @plndup(i8** %5, i64 -1, i8* (i8*)* %6)
ret i8** %7
}

LLVM IR (-O2):
define i8** @pldup(i8** %0, i8* (i8*)* %1) {
%3 = tail call i8** @plndup(i8** %0, i64 -1, i8* (i8*)* %1)
ret i8** %3
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_9943() {
  Assert_real((isqrt(9943) == 99),
              "/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/stdlib/isqrt.c",
              1485, ("Integer square root of 9943 should be 99"));
}


x86 assembly (clang, -O0):
<t_sqrt_9943>:
push   %rbp
mov    %rsp,%rbp
mov    $0x26d7,%edi
call   1030 <isqrt@plt>
cmp    $0x63,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xec0(%rip),%rsi
mov    $0x5cd,%edx
lea    0xf56(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_sqrt_9943>:
push   %rax
mov    $0x26d7,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
cmp    $0x63,%eax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0x5cd,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [41 x i8] c"Integer square root of 9943 should be 99\00"
define void @t_sqrt_9943() {
%1 = call i32 @isqrt(i32 9943)
%2 = icmp eq i32 %1, 99
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 1485, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [41 x i8] c"Integer square root of 9943 should be 99\00"
define void @t_sqrt_9943() {
%1 = tail call i32 @isqrt(i32 9943)
%2 = icmp eq i32 %1, 99
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 1485, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int translateVirtualAddressIntoPhysicalAddress(int vAddress) {}


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

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

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

LLVM IR (-O2):
define i32 @translateVirtualAddressIntoPhysicalAddress(i32 %0) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ StudentModel_removeStudent(char *);
void Controller_removeStudent(char studentNumber[]) {
  StudentModel_removeStudent(studentNumber);
  return;
}


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

x86 assembly (clang, -O2):
<Controller_removeStudent>:
jmp    1030 <StudentModel_removeStudent@plt>

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

LLVM IR (-O2):
define void @Controller_removeStudent(i8* %0) {
%2 = tail call i32 @StudentModel_removeStudent(i8* %0)
ret void
}
long f3(long a) { return a & 0x000000ffL; }


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

x86 assembly (clang, -O2):
<f3>:
movzbl %dil,%eax
ret

LLVM IR (-O0):
define i64 @f3(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = and i64 %3, 255
ret i64 %4
}

LLVM IR (-O2):
define i64 @f3(i64 %0) {
%2 = and i64 %0, 255
ret i64 %2
}
void NULL_intr(void) {}


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

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

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

LLVM IR (-O2):
define void @NULL_intr() {
ret void
}
/* Variables and functions */
unsigned int _dfixu(int /*<<< orphan*/);
int /*<<< orphan*/ _f2d(int);
unsigned int _ffixu(int a) { return _dfixu(_f2d(a)); }


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

x86 assembly (clang, -O2):
<_ffixu>:
push   %rax
call   1030 <_f2d@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <_dfixu@plt>

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

LLVM IR (-O2):
define i32 @_ffixu(i32 %0) {
%2 = tail call i32 @_f2d(i32 %0)
%3 = tail call i32 @_dfixu(i32 %2)
ret i32 %3
}
/* Variables and functions */
scalar_t__ regular_char_wildcard_p(char);
char regular_char_wildcard_encode(char c) {
  if (regular_char_wildcard_p(c)) {
    return c | ((char)0x80);
  } else {
    return c;
  }
}


x86 assembly (clang, -O0):
<regular_char_wildcard_encode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%edi
call   1030 <regular_char_wildcard_p@plt>
cmp    $0x0,%rax
je     1140 <regular_char_wildcard_encode+0x30>
movsbl -0x2(%rbp),%eax
or     $0xffffff80,%eax
mov    %al,-0x1(%rbp)
jmp    1146 <regular_char_wildcard_encode+0x36>
mov    -0x2(%rbp),%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<regular_char_wildcard_encode>:
push   %rbx
mov    %edi,%ebx
call   1030 <regular_char_wildcard_p@plt>
mov    %ebx,%ecx
or     $0x80,%cl
test   %rax,%rax
movzbl %cl,%eax
cmove  %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define signext i8 @regular_char_wildcard_encode(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = call i64 @regular_char_wildcard_p(i8 signext %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = or i32 %9, -128
%11 = trunc i32 %10 to i8
store i8 %11, i8* %2
br label %14
12: ; preds = %1
%13 = load i8, i8* %3
store i8 %13, i8* %2
br label %14
14: ; preds = %12, %7
%15 = load i8, i8* %2
ret i8 %15
}

LLVM IR (-O2):
define signext i8 @regular_char_wildcard_encode(i8 signext %0) {
%2 = tail call i64 @regular_char_wildcard_p(i8 signext %0)
%3 = icmp eq i64 %2, 0
%4 = or i8 %0, -128
%5 = select i1 %3, i8 %0, i8 %4
ret i8 %5
}
/* Variables and functions */
void nn_backtrace_print(void) {}


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

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

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

LLVM IR (-O2):
define void @nn_backtrace_print() {
ret void
}
int g5_get_jmemsize(void) { return (1 << 16); }


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

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

LLVM IR (-O0):
define i32 @g5_get_jmemsize() {
ret i32 65536
}

LLVM IR (-O2):
define i32 @g5_get_jmemsize() {
ret i32 65536
}
double radius_effective(int mode, double radius, double thickness) {
  switch (mode) {
  default:
  case 1:
    return radius + thickness;
  case 2:
    return radius;
  }
}


x86 assembly (clang, -O0):
<radius_effective>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
movsd  %xmm0,-0x18(%rbp)
movsd  %xmm1,-0x20(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x24(%rbp)
sub    $0x1,%eax
je     113b <radius_effective+0x3b>
jmp    1125 <radius_effective+0x25>
mov    -0x24(%rbp),%eax
sub    $0x2,%eax
je     114f <radius_effective+0x4f>
jmp    1136 <radius_effective+0x36>
jmp    113b <radius_effective+0x3b>
movsd  -0x18(%rbp),%xmm0
addsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1159 <radius_effective+0x59>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<radius_effective>:
cmp    $0x2,%edi
jne    110d <radius_effective+0xd>
movsd  0xef3(%rip),%xmm1
addsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @radius_effective(i32 %0, double %1, double %2) {
%4 = alloca double
%5 = alloca i32
%6 = alloca double
%7 = alloca double
store i32 %0, i32* %5
store double %1, double* %6
store double %2, double* %7
%8 = load i32, i32* %5
switch i32 %8, label %9 [
i32 1, label %10
i32 2, label %14
]
9: ; preds = %3
br label %10
10: ; preds = %3, %9
%11 = load double, double* %6
%12 = load double, double* %7
%13 = fadd double %11, %12
store double %13, double* %4
br label %16
14: ; preds = %3
%15 = load double, double* %6
store double %15, double* %4
br label %16
16: ; preds = %14, %10
%17 = load double, double* %4
ret double %17
}

LLVM IR (-O2):
define double @radius_effective(i32 %0, double %1, double %2) {
%4 = icmp eq i32 %0, 2
%5 = select i1 %4, double -0.000000e+00, double %2
%6 = fadd double %5, %1
ret double %6
}
/* Variables and functions */
int add(int, int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("add(40,2) = %u\n", add(40, 2));
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [16 x i8] c"add(40,2) = %u\0A\00"
define i32 @main() {
%1 = tail call i32 @add(i32 40, i32 2)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
void RTVfsObjToVfs(void) {}


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

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

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

LLVM IR (-O2):
define void @RTVfsObjToVfs() {
ret void
}
int f(int y, ...) {
  int f = y * y * y;
  return f;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
mov    %ecx,%eax
imul   %eax,%eax
imul   %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
mov    %edi,%eax
imul   %edi,%eax
imul   %edi,%eax
ret

LLVM IR (-O0):
define i32 @f(i32 %0, ...) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = load i32, i32* %2
%6 = mul nsw i32 %4, %5
%7 = load i32, i32* %2
%8 = mul nsw i32 %6, %7
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @f(i32 %0, ...) {
%2 = mul nsw i32 %0, %0
%3 = mul nsw i32 %2, %0
ret i32 %3
}
/* Variables and functions */
scalar_t__ __builtin_vsx_xstdivdp_fg(double, double);
int *test_div_df_3(double a, double b, int *p) {
  if (__builtin_vsx_xstdivdp_fg(a, b))
    *p++ = 1;
  return p;
}


x86 assembly (clang, -O0):
<test_div_df_3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    %rdi,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <__builtin_vsx_xstdivdp_fg@plt>
cmp    $0x0,%rax
je     1154 <test_div_df_3+0x44>
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x18(%rbp)
movl   $0x1,(%rax)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_div_df_3>:
push   %rbx
mov    %rdi,%rbx
call   1030 <__builtin_vsx_xstdivdp_fg@plt>
test   %rax,%rax
je     1128 <test_div_df_3+0x18>
movl   $0x1,(%rbx)
add    $0x4,%rbx
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32* @test_div_df_3(double %0, double %1, i32* writeonly %2) {
%4 = tail call i64 @__builtin_vsx_xstdivdp_fg(double %0, double %1)
%5 = icmp eq i64 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = getelementptr inbounds i32, i32* %2, i64 1
store i32 1, i32* %2
br label %8
8: ; preds = %6, %3
%9 = phi i32* [ %7, %6 ], [ %2, %3 ]
ret i32* %9
}
void library_init(void) {}


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

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

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

LLVM IR (-O2):
define void @library_init() {
ret void
}
int elf_exchange(int n) {
  int b = 0;
  int t = n;
  while (t != 0) {
    b++;
    t >>= 1;
  }
  n = n ^ (0x1 << (b - 1));
  n = (n << 1) | 0x1;
  return n;
}


x86 assembly (clang, -O0):
<elf_exchange>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1135 <elf_exchange+0x35>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1114 <elf_exchange+0x14>
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
xor    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
or     $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<elf_exchange>:
mov    $0xffffffff,%eax
test   %edi,%edi
je     111c <elf_exchange+0x1c>
mov    %edi,%edx
mov    %edi,%ecx
nopl   (%rax)
sar    %ecx
add    $0x1,%eax
cmp    $0x1,%edx
mov    %ecx,%edx
ja     1110 <elf_exchange+0x10>
btc    %eax,%edi
lea    (%rdi,%rdi,1),%eax
add    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @elf_exchange(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
%5 = load i32, i32* %2
store i32 %5, i32* %4
br label %6
6: ; preds = %9, %1
%7 = load i32, i32* %4
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %14
9: ; preds = %6
%10 = load i32, i32* %3
%11 = add nsw i32 %10, 1
store i32 %11, i32* %3
%12 = load i32, i32* %4
%13 = ashr i32 %12, 1
store i32 %13, i32* %4
br label %6
14: ; preds = %6
%15 = load i32, i32* %2
%16 = load i32, i32* %3
%17 = sub nsw i32 %16, 1
%18 = shl i32 1, %17
%19 = xor i32 %15, %18
store i32 %19, i32* %2
%20 = load i32, i32* %2
%21 = shl i32 %20, 1
%22 = or i32 %21, 1
store i32 %22, i32* %2
%23 = load i32, i32* %2
ret i32 %23
}

LLVM IR (-O2):
define i32 @elf_exchange(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ %0, %1 ]
%5 = phi i32 [ %6, %3 ], [ 0, %1 ]
%6 = add nuw nsw i32 %5, 1
%7 = ashr i32 %4, 1
%8 = icmp ult i32 %4, 2
br i1 %8, label %9, label %3
9: ; preds = %3, %1
%10 = phi i32 [ -1, %1 ], [ %5, %3 ]
%11 = shl nuw i32 1, %10
%12 = xor i32 %11, %0
%13 = shl i32 %12, 1
%14 = or i32 %13, 1
ret i32 %14
}
unsigned int unsetIByte(unsigned int e, int i) {
  unsigned int mask = ~(1u << (i - 1));
  unsigned int result = e & mask;
  return result;
}


x86 assembly (clang, -O0):
<unsetIByte>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
mov    $0x1,%eax
shl    %cl,%eax
xor    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
and    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<unsetIByte>:
mov    %edi,%eax
add    $0xff,%sil
btr    %esi,%eax
ret

LLVM IR (-O0):
define i32 @unsetIByte(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %4
%8 = sub nsw i32 %7, 1
%9 = shl i32 1, %8
%10 = xor i32 %9, -1
store i32 %10, i32* %5
%11 = load i32, i32* %3
%12 = load i32, i32* %5
%13 = and i32 %11, %12
store i32 %13, i32* %6
%14 = load i32, i32* %6
ret i32 %14
}

LLVM IR (-O2):
define i32 @unsetIByte(i32 %0, i32 %1) {
%3 = add nsw i32 %1, -1
%4 = shl nuw i32 1, %3
%5 = xor i32 %4, -1
%6 = and i32 %5, %0
ret i32 %6
}
const char *helloString() { return "e2E Test"; }


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

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

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

LLVM IR (-O2):
@.str = [9 x i8] c"e2E Test\00"
define i8* @helloString() {
ret i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ descubra_primos(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int N;
  printf("Insira N: ");
  scanf("%d", &N);
  descubra_primos(N);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <printf@plt>
lea    0xec7(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
call   1030 <descubra_primos@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [11 x i8] c"Insira N: \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @descubra_primos(i32 %5)
ret i32 0
}
int efunc2() { return 2; }


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

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

LLVM IR (-O0):
define i32 @efunc2() {
ret i32 2
}

LLVM IR (-O2):
define i32 @efunc2() {
ret i32 2
}
/* Type definitions */
struct pt_query_decoder {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct pt_query_decoder *);
int /*<<< orphan*/ pt_qry_decoder_fini(struct pt_query_decoder *);
void pt_qry_free_decoder(struct pt_query_decoder *decoder) {
  pt_qry_decoder_fini(decoder);
  free(decoder);
}


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

x86 assembly (clang, -O2):
<pt_qry_free_decoder>:
push   %rbx
mov    %rdi,%rbx
call   1040 <pt_qry_decoder_fini@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.pt_query_decoder = type { i32 }
define void @pt_qry_free_decoder(%struct.pt_query_decoder* %0) {
%2 = alloca %struct.pt_query_decoder*
store %struct.pt_query_decoder* %0, %struct.pt_query_decoder** %2
%3 = load %struct.pt_query_decoder*, %struct.pt_query_decoder** %2
%4 = call i32 @pt_qry_decoder_fini(%struct.pt_query_decoder* %3)
%5 = load %struct.pt_query_decoder*, %struct.pt_query_decoder** %2
%6 = call i32 @free(%struct.pt_query_decoder* %5)
ret void
}

LLVM IR (-O2):
%struct.pt_query_decoder = type { i32 }
define void @pt_qry_free_decoder(%struct.pt_query_decoder* %0) {
%2 = tail call i32 @pt_qry_decoder_fini(%struct.pt_query_decoder* %0)
%3 = tail call i32 @free(%struct.pt_query_decoder* %0)
ret void
}
/* Variables and functions */
int close(int);
int NetClose(int fd) { return close(fd); }


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

x86 assembly (clang, -O2):
<NetClose>:
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define i32 @NetClose(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret i32 %2
}
/* Type definitions */
typedef unsigned long uint32_t;

/* Variables and functions */
void LCDDMAConfigSet(uint32_t ui32Base, uint32_t ui32Config) {
  ;

  ;
  (*((volatile unsigned long *)(ui32Base + 0x00000040))) = ui32Config;
}


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

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

LLVM IR (-O0):
define void @LCDDMAConfigSet(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i64, i64* %3
%7 = add i64 %6, 64
%8 = inttoptr i64 %7 to i64*
store volatile i64 %5, i64* %8
ret void
}

LLVM IR (-O2):
define void @LCDDMAConfigSet(i64 %0, i64 %1) {
%3 = add i64 %0, 64
%4 = inttoptr i64 %3 to i64*
store volatile i64 %1, i64* %4
ret void
}
int test_imm_34int16_reg(short val) {
  return ((val) & (0x34 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_34int16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%edx
and    $0x34,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_34int16_reg(i16 signext %0) {
%2 = and i16 %0, 52
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ notify_pvcall(char *);
int pvCaptureMultiToBuffer(unsigned long *pulBoardIds, void **hEvent,
                           unsigned long ulFlags, int nNumFrames,
                           unsigned char *pBuffer, void *pReserved,
                           long long *pTimeStamp) {
  notify_pvcall("f");
  return (0);
}


x86 assembly (clang, -O0):
<pvCaptureMultiToBuffer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
lea    0xec6(%rip),%rdi
call   1030 <notify_pvcall@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [2 x i8] c"f\00"
define i32 @pvCaptureMultiToBuffer(i64* %0, i8** %1, i64 %2, i32 %3, i8* %4, i8* %5, i64* %6) {
%8 = alloca i64*
%9 = alloca i8**
%10 = alloca i64
%11 = alloca i32
%12 = alloca i8*
%13 = alloca i8*
%14 = alloca i64*
store i64* %0, i64** %8
store i8** %1, i8*** %9
store i64 %2, i64* %10
store i32 %3, i32* %11
store i8* %4, i8** %12
store i8* %5, i8** %13
store i64* %6, i64** %14
%15 = call i32 @notify_pvcall(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [2 x i8] c"f\00"
define i32 @pvCaptureMultiToBuffer(i64* nocapture readnone %0, i8** nocapture readnone %1, i64 %2, i32 %3, i8* nocapture readnone %4, i8* nocapture readnone %5, i64* nocapture readnone %6) {
%8 = tail call i32 @notify_pvcall(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i32 0
}