xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ _putchar(int);
void print_times_table(int n) {
  int a, b, c;
  a = n / 100;
  b = ((n % 100) / 10);
  c = n % 10;
  n = a + b + c;
  _putchar(n);
}


x86 assembly (clang, -O0):
<print_times_table>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <_putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_times_table>:
movslq %edi,%rdi
imul   $0x51eb851f,%rdi,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x25,%rax
add    %ecx,%eax
imul   $0x64,%eax,%ecx
mov    %edi,%edx
sub    %ecx,%edx
movsbl %dl,%ecx
imul   $0x67,%ecx,%ecx
movzwl %cx,%ecx
movswl %cx,%edx
shr    $0xf,%ecx
shr    $0xa,%edx
add    %cl,%dl
movsbl %dl,%ecx
imul   $0x66666667,%rdi,%rdx
mov    %rdx,%rsi
shr    $0x3f,%rsi
sar    $0x22,%rdx
add    %esi,%edx
add    %edx,%edx
lea    (%rdx,%rdx,4),%edx
sub    %edx,%edi
add    %eax,%edi
add    %ecx,%edi
jmp    1030 <_putchar@plt>

LLVM IR (-O0):
define void @print_times_table(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %2
%6 = load i32, i32* %2
%7 = sdiv i32 %6, 100
store i32 %7, i32* %3
%8 = load i32, i32* %2
%9 = srem i32 %8, 100
%10 = sdiv i32 %9, 10
store i32 %10, i32* %4
%11 = load i32, i32* %2
%12 = srem i32 %11, 10
store i32 %12, i32* %5
%13 = load i32, i32* %3
%14 = load i32, i32* %4
%15 = add nsw i32 %13, %14
%16 = load i32, i32* %5
%17 = add nsw i32 %15, %16
store i32 %17, i32* %2
%18 = load i32, i32* %2
%19 = call i32 @_putchar(i32 %18)
ret void
}

LLVM IR (-O2):
define void @print_times_table(i32 %0) {
%2 = sdiv i32 %0, 100
%3 = srem i32 %0, 100
%4 = trunc i32 %3 to i8
%5 = sdiv i8 %4, 10
%6 = sext i8 %5 to i32
%7 = srem i32 %0, 10
%8 = add nsw i32 %7, %2
%9 = add nsw i32 %8, %6
%10 = tail call i32 @_putchar(i32 %9)
ret void
}
void f_local_basepcs(void) {}


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

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

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

LLVM IR (-O2):
define void @f_local_basepcs() {
ret void
}
int ft_sqrt(int nb) {
  int i;
  i = 1;
  while (i * i <= nb) {
    if (i * i == nb)
      return (i);
    else
      i++;
  }
  return (i);
}


x86 assembly (clang, -O0):
<ft_sqrt>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
imul   -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     1147 <ft_sqrt+0x47>
mov    -0xc(%rbp),%eax
imul   -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    1139 <ft_sqrt+0x39>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    114d <ft_sqrt+0x4d>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110e <ft_sqrt+0xe>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_sqrt>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%eax
mov    %eax,%ecx
imul   %eax,%ecx
cmp    %edi,%ecx
jl     1110 <ft_sqrt+0x10>
ret

LLVM IR (-O0):
define i32 @ft_sqrt(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 1, i32* %4
br label %5
5: ; preds = %22, %1
%6 = load i32, i32* %4
%7 = load i32, i32* %4
%8 = mul nsw i32 %6, %7
%9 = load i32, i32* %3
%10 = icmp sle i32 %8, %9
br i1 %10, label %11, label %23
11: ; preds = %5
%12 = load i32, i32* %4
%13 = load i32, i32* %4
%14 = mul nsw i32 %12, %13
%15 = load i32, i32* %3
%16 = icmp eq i32 %14, %15
br i1 %16, label %17, label %19
17: ; preds = %11
%18 = load i32, i32* %4
store i32 %18, i32* %2
br label %25
19: ; preds = %11
%20 = load i32, i32* %4
%21 = add nsw i32 %20, 1
store i32 %21, i32* %4
br label %22
22: ; preds = %19
br label %5
23: ; preds = %5
%24 = load i32, i32* %4
store i32 %24, i32* %2
br label %25
25: ; preds = %23, %17
%26 = load i32, i32* %2
ret i32 %26
}

LLVM IR (-O2):
define i32 @ft_sqrt(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ 1, %1 ], [ %6, %2 ]
%4 = mul nsw i32 %3, %3
%5 = icmp slt i32 %4, %0
%6 = add nuw nsw i32 %3, 1
br i1 %5, label %2, label %7
7: ; preds = %2
ret i32 %3
}
/* Variables and functions */
int __builtin_inb(int);
int /*<<< orphan*/ __builtin_outb(unsigned int, int);
void spd_set_nbxcfg(void) {
  unsigned device;
  for (device = 0x50; device <= 0x53; device += 1) {
    int byte;
    byte = 0;
    if (byte != 2)
      continue;
    __builtin_outb(device, 0x1004);
    byte = __builtin_inb(0x10);
    while (byte == 0) {
      byte = __builtin_inb(0x10);
    }
  }
}


x86 assembly (clang, -O0):
<spd_set_nbxcfg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x50,-0x4(%rbp)
cmpl   $0x53,-0x4(%rbp)
ja     1198 <spd_set_nbxcfg+0x78>
movl   $0x0,-0x8(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     114f <spd_set_nbxcfg+0x2f>
jmp    118a <spd_set_nbxcfg+0x6a>
mov    -0x4(%rbp),%edi
mov    $0x1004,%esi
call   1040 <__builtin_outb@plt>
mov    $0x10,%edi
call   1030 <__builtin_inb@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1185 <spd_set_nbxcfg+0x65>
mov    $0x10,%edi
call   1030 <__builtin_inb@plt>
mov    %eax,-0x8(%rbp)
jmp    1169 <spd_set_nbxcfg+0x49>
jmp    118a <spd_set_nbxcfg+0x6a>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    112f <spd_set_nbxcfg+0xf>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @spd_set_nbxcfg() {
%1 = alloca i32
%2 = alloca i32
store i32 80, i32* %1
br label %3
3: ; preds = %20, %0
%4 = load i32, i32* %1
%5 = icmp ule i32 %4, 83
br i1 %5, label %6, label %23
6: ; preds = %3
store i32 0, i32* %2
%7 = load i32, i32* %2
%8 = icmp ne i32 %7, 2
br i1 %8, label %9, label %10
9: ; preds = %6
br label %20
10: ; preds = %6
%11 = load i32, i32* %1
%12 = call i32 @__builtin_outb(i32 %11, i32 4100)
%13 = call i32 @__builtin_inb(i32 16)
store i32 %13, i32* %2
br label %14
14: ; preds = %17, %10
%15 = load i32, i32* %2
%16 = icmp eq i32 %15, 0
br i1 %16, label %17, label %19
17: ; preds = %14
%18 = call i32 @__builtin_inb(i32 16)
store i32 %18, i32* %2
br label %14
19: ; preds = %14
br label %20
20: ; preds = %19, %9
%21 = load i32, i32* %1
%22 = add i32 %21, 1
store i32 %22, i32* %1
br label %3
23: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @spd_set_nbxcfg() {
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int movRs2(uint8_t opCode) {
  switch (opCode) {
  case 0x01:
    return 1;
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<movRs2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
jne    1124 <movRs2+0x24>
jmp    1118 <movRs2+0x18>
movl   $0x1,-0x4(%rbp)
jmp    112b <movRs2+0x2b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<movRs2>:
xor    %eax,%eax
cmp    $0x1,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @movRs2(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %6 [
i32 1, label %5
]
5: ; preds = %1
store i32 1, i32* %2
br label %7
6: ; preds = %1
store i32 0, i32* %2
br label %7
7: ; preds = %6, %5
%8 = load i32, i32* %2
ret i32 %8
}

LLVM IR (-O2):
define i32 @movRs2(i32 %0) {
%2 = icmp eq i32 %0, 1
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
unsigned int time(int /*<<< orphan*/ *);
unsigned int get_time() { return time(NULL); }


x86 assembly (clang, -O0):
<get_time>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    %eax,%edi
call   1030 <time@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_time>:
xor    %edi,%edi
jmp    1030 <time@plt>

LLVM IR (-O0):
define i32 @get_time() {
%1 = call i32 @time(i32* null)
ret i32 %1
}

LLVM IR (-O2):
define i32 @get_time() {
%1 = tail call i32 @time(i32* null)
ret i32 %1
}
void foo(int *p, int (*q)[10], int r[10], int s[10][10]) {
  int a[10], b[10][10];
#pragma acc parallel copy(p [-1:2])
  ;
#pragma acc parallel copy(q [-1:2] [0:10])
  ;
#pragma acc parallel copy(q [-1:2] [-2:10])
  ;
#pragma acc parallel copy(r [-1:2])
  ;
#pragma acc parallel copy(s [-1:2][:])
  ;
#pragma acc parallel copy(s [-1:2] [-2:10])
  ;
#pragma acc parallel copy(a [-1:2])
  ;
#pragma acc parallel copy(b [-1:2] [0:])
  ;
#pragma acc parallel copy(b [1:2] [-2:10])
  ;
#pragma acc parallel copy(p [2:-3])
  ;
#pragma acc parallel copy(q [2:-3][:])
  ;
#pragma acc parallel copy(q [2:3] [0:-1])
  ;
#pragma acc parallel copy(r [2:-5])
  ;
#pragma acc parallel copy(s [2:-5][:])
  ;
#pragma acc parallel copy(s [2:5] [0:-4])
  ;
#pragma acc parallel copy(a [2:-5])
  ;
#pragma acc parallel copy(b [2:-5] [0:10])
  ;
#pragma acc parallel copy(b [2:5] [0:-4])
  ;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x160,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
add    $0x160,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @foo(i32* %0, [10 x i32]* %1, i32* %2, [10 x i32]* %3) {
%5 = alloca i32*
%6 = alloca [10 x i32]*
%7 = alloca i32*
%8 = alloca [10 x i32]*
%9 = alloca [10 x i32]
%10 = alloca [10 x [10 x i32]]
store i32* %0, i32** %5
store [10 x i32]* %1, [10 x i32]** %6
store i32* %2, i32** %7
store [10 x i32]* %3, [10 x i32]** %8
ret void
}

LLVM IR (-O2):
define void @foo(i32* nocapture %0, [10 x i32]* nocapture %1, i32* nocapture %2, [10 x i32]* nocapture %3) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fake_method();
int /*<<< orphan*/ unity_method(int);
void header_method() {
  unity_method(1);
  fake_method();
}


x86 assembly (clang, -O0):
<header_method>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <unity_method@plt>
mov    $0x0,%al
call   1040 <fake_method@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<header_method>:
push   %rax
mov    $0x1,%edi
call   1030 <unity_method@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <fake_method@plt>

LLVM IR (-O0):
define void @header_method() {
%1 = call i32 @unity_method(i32 1)
%2 = call i32 (...) @fake_method()
ret void
}

LLVM IR (-O2):
define void @header_method() {
%1 = tail call i32 @unity_method(i32 1)
%2 = tail call i32 (...) @fake_method()
ret void
}
int getParent(int i) { return (i - 1) / 2; }


x86 assembly (clang, -O0):
<getParent>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
pop    %rbp
ret

x86 assembly (clang, -O2):
<getParent>:
mov    %edi,%eax
add    $0xffffffff,%eax
shr    $0x1f,%eax
add    %edi,%eax
add    $0xffffffff,%eax
sar    %eax
ret

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

LLVM IR (-O2):
define i32 @getParent(i32 %0) {
%2 = add nsw i32 %0, -1
%3 = sdiv i32 %2, 2
ret i32 %3
}
/* Variables and functions */
int cmd_diag_probe_common(int, char **, int /*<<< orphan*/);
int cmd_diag_probe(int argc, char **argv) {
  return cmd_diag_probe_common(argc, argv, 0);
}


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

x86 assembly (clang, -O2):
<cmd_diag_probe>:
xor    %edx,%edx
jmp    1030 <cmd_diag_probe_common@plt>

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

LLVM IR (-O2):
define i32 @cmd_diag_probe(i32 %0, i8** %1) {
%3 = tail call i32 @cmd_diag_probe_common(i32 %0, i8** %1, i32 0)
ret i32 %3
}
/* Type definitions */
struct timespec {
  int /*<<< orphan*/ member_1;
  int /*<<< orphan*/ member_0;
};
struct in6_addr {
  int dummy;
};

/* Variables and functions */
int mpd_schedule_first_mps(struct in6_addr const *, struct in6_addr const *,
                           struct timespec *);
int mpd_trigger_mps(const struct in6_addr *hoa, const struct in6_addr *ha) {
  struct timespec zero = {0, 0};
  return mpd_schedule_first_mps(hoa, ha, &zero);
}


x86 assembly (clang, -O0):
<mpd_trigger_mps>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x18(%rbp),%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1030 <memset@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
call   1040 <mpd_schedule_first_mps@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mpd_trigger_mps>:
push   %rax
movq   $0x0,(%rsp)
mov    %rsp,%rdx
call   1030 <mpd_schedule_first_mps@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.in6_addr = type { i32 }
%struct.timespec = type { i32, i32 }
define i32 @mpd_trigger_mps(%struct.in6_addr* %0, %struct.in6_addr* %1) {
%3 = alloca %struct.in6_addr*
%4 = alloca %struct.in6_addr*
%5 = alloca %struct.timespec
store %struct.in6_addr* %0, %struct.in6_addr** %3
store %struct.in6_addr* %1, %struct.in6_addr** %4
%6 = bitcast %struct.timespec* %5 to i8*
%7 = load %struct.in6_addr*, %struct.in6_addr** %3
%8 = load %struct.in6_addr*, %struct.in6_addr** %4
%9 = call i32 @mpd_schedule_first_mps(%struct.in6_addr* %7, %struct.in6_addr* %8, %struct.timespec* %5)
ret i32 %9
}

LLVM IR (-O2):
%struct.in6_addr = type { i32 }
%struct.timespec = type { i32, i32 }
define i32 @mpd_trigger_mps(%struct.in6_addr* %0, %struct.in6_addr* %1) {
%3 = alloca i64
%4 = bitcast i64* %3 to %struct.timespec*
%5 = bitcast i64* %3 to i8*
store i64 0, i64* %3
%6 = call i32 @mpd_schedule_first_mps(%struct.in6_addr* %0, %struct.in6_addr* %1, %struct.timespec* %4)
ret i32 %6
}
int isdot(int c) { return '.' == c; }


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

x86 assembly (clang, -O2):
<isdot>:
xor    %eax,%eax
cmp    $0x2e,%edi
sete   %al
ret

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

LLVM IR (-O2):
define i32 @isdot(i32 %0) {
%2 = icmp eq i32 %0, 46
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
uint32_t exFatChecksum(uint32_t sum, uint8_t data) {
  return (sum << 31) + (sum >> 1) + data;
}


x86 assembly (clang, -O0):
<exFatChecksum>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1f,%eax
mov    -0x4(%rbp),%ecx
sar    $0x1,%ecx
add    %ecx,%eax
add    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<exFatChecksum>:
mov    %edi,%eax
shl    $0x1f,%eax
sar    %edi
add    %edi,%eax
add    %esi,%eax
ret

LLVM IR (-O0):
define i32 @exFatChecksum(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 = shl i32 %5, 31
%7 = load i32, i32* %3
%8 = ashr i32 %7, 1
%9 = add nsw i32 %6, %8
%10 = load i32, i32* %4
%11 = add nsw i32 %9, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @exFatChecksum(i32 %0, i32 %1) {
%3 = shl i32 %0, 31
%4 = ashr i32 %0, 1
%5 = add nsw i32 %3, %4
%6 = add nsw i32 %5, %1
ret i32 %6
}
/* Variables and functions */
bool nrf52_errata_249(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @nrf52_errata_249() {
ret i32 0
}
/* Type definitions */
struct event {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void printExitMsg(void *stateData, struct event *event) {
  printf("Exiting %s state\n", (char *)stateData);
}


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

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

LLVM IR (-O0):
%struct.event = type { i32 }
@.str = [18 x i8] c"Exiting %s state\0A\00"
define void @printExitMsg(i8* %0, %struct.event* %1) {
%3 = alloca i8*
%4 = alloca %struct.event*
store i8* %0, i8** %3
store %struct.event* %1, %struct.event** %4
%5 = load i8*, i8** %3
%6 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %5)
ret void
}

LLVM IR (-O2):
%struct.event = type { i32 }
@.str = [18 x i8] c"Exiting %s state\0A\00"
define void @printExitMsg(i8* %0, %struct.event* nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
double sqrt(int);
void ncov_calc(double gcon[4][4], double ncov[4]) {
  double lapse;
  lapse = sqrt(-1. / gcon[0][0]);
  ncov[0] = -lapse;
  ncov[1] = 0.;
  ncov[2] = 0.;
  ncov[3] = 0.;
  return;
}


x86 assembly (clang, -O0):
<ncov_calc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  0xed4(%rip),%xmm0
divsd  (%rax),%xmm0
cvttsd2si %xmm0,%edi
call   1030 <sqrt@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x8(%rax)
mov    -0x10(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x10(%rax)
mov    -0x10(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x18(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ncov_calc>:
push   %rbx
mov    %rsi,%rbx
movsd  0xee4(%rip),%xmm0
divsd  (%rdi),%xmm0
cvttsd2si %xmm0,%edi
call   1030 <sqrt@plt>
xorpd  0xedf(%rip),%xmm0
movlpd %xmm0,(%rbx)
xorpd  %xmm0,%xmm0
movupd %xmm0,0x8(%rbx)
movq   $0x0,0x18(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @ncov_calc([4 x double]* %0, double* %1) {
%3 = alloca [4 x double]*
%4 = alloca double*
%5 = alloca double
store [4 x double]* %0, [4 x double]** %3
store double* %1, double** %4
%6 = load [4 x double]*, [4 x double]** %3
%7 = getelementptr inbounds [4 x double], [4 x double]* %6, i64 0
%8 = getelementptr inbounds [4 x double], [4 x double]* %7, i64 0, i64 0
%9 = load double, double* %8
%10 = fdiv double -1.000000e+00, %9
%11 = fptosi double %10 to i32
%12 = call double @sqrt(i32 %11)
store double %12, double* %5
%13 = load double, double* %5
%14 = fneg double %13
%15 = load double*, double** %4
%16 = getelementptr inbounds double, double* %15, i64 0
store double %14, double* %16
%17 = load double*, double** %4
%18 = getelementptr inbounds double, double* %17, i64 1
store double 0.000000e+00, double* %18
%19 = load double*, double** %4
%20 = getelementptr inbounds double, double* %19, i64 2
store double 0.000000e+00, double* %20
%21 = load double*, double** %4
%22 = getelementptr inbounds double, double* %21, i64 3
store double 0.000000e+00, double* %22
ret void
}

LLVM IR (-O2):
define void @ncov_calc([4 x double]* nocapture %0, double* nocapture writeonly %1) {
%3 = getelementptr inbounds [4 x double], [4 x double]* %0, i64 0, i64 0
%4 = load double, double* %3
%5 = fdiv double -1.000000e+00, %4
%6 = fptosi double %5 to i32
%7 = tail call double @sqrt(i32 %6)
%8 = fneg double %7
store double %8, double* %1
%9 = getelementptr inbounds double, double* %1, i64 1
%10 = bitcast double* %9 to i8*
ret void
}
/* Type definitions */
struct GenIterator {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct GenIterator *);
void DestroyGenIterator(struct GenIterator *_Iterator) { free(_Iterator); }


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

x86 assembly (clang, -O2):
<DestroyGenIterator>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
%struct.GenIterator = type { i32 }
define void @DestroyGenIterator(%struct.GenIterator* nocapture %0) {
%2 = tail call i32 @free(%struct.GenIterator* %0)
ret void
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int copy_quaddobl_Laurent_target_system_to_container(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(788, a, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<copy_quaddobl_Laurent_target_system_to_container>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x314,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_quaddobl_Laurent_target_system_to_container>:
mov    $0x314,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

LLVM IR (-O0):
define i32 @copy_quaddobl_Laurent_target_system_to_container() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc4c(i32 788, i32* %5, i32* %6, double* %7, i32 0)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @copy_quaddobl_Laurent_target_system_to_container() {
%1 = tail call i32 @_ada_use_c2phc4c(i32 788, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
void dummy_(double *a, double *b, double *c, double *d) {}


x86 assembly (clang, -O0):
<dummy_>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @dummy_(double* %0, double* %1, double* %2, double* %3) {
%5 = alloca double*
%6 = alloca double*
%7 = alloca double*
%8 = alloca double*
store double* %0, double** %5
store double* %1, double** %6
store double* %2, double** %7
store double* %3, double** %8
ret void
}

LLVM IR (-O2):
define void @dummy_(double* nocapture %0, double* nocapture %1, double* nocapture %2, double* nocapture %3) {
ret void
}
int NumLeadingZeros(long x) {
  long y = 0x80000000, count = 0;
  long i;
  for (i = 0; i < 32; i++) {
    if (0x00 != (x & y))
      break;
    count++;
    y = y >> 1;
  }
  return count;
}


x86 assembly (clang, -O0):
<NumLeadingZeros>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    $0x80000000,%eax
mov    %rax,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
cmpq   $0x20,-0x20(%rbp)
jge    116d <NumLeadingZeros+0x6d>
mov    -0x8(%rbp),%rcx
and    -0x10(%rbp),%rcx
xor    %eax,%eax
cmp    %rcx,%rax
je     1144 <NumLeadingZeros+0x44>
jmp    116d <NumLeadingZeros+0x6d>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
sar    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    1121 <NumLeadingZeros+0x21>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<NumLeadingZeros>:
xor    %eax,%eax
test   $0x80000000,%edi
jne    1138 <NumLeadingZeros+0x38>
mov    $0x80000000,%ecx
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %rax,%rdx
add    $0x1,%rax
cmp    $0x1e,%rdx
ja     1138 <NumLeadingZeros+0x38>
shr    %rcx
mov    %rcx,%rdx
and    %rdi,%rdx
je     1120 <NumLeadingZeros+0x20>
ret

LLVM IR (-O0):
define i32 @NumLeadingZeros(i64 %0) {
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
store i64 %0, i64* %2
store i64 2147483648, i64* %3
store i64 0, i64* %4
store i64 0, i64* %5
br label %6
6: ; preds = %20, %1
%7 = load i64, i64* %5
%8 = icmp slt i64 %7, 32
br i1 %8, label %9, label %23
9: ; preds = %6
%10 = load i64, i64* %2
%11 = load i64, i64* %3
%12 = and i64 %10, %11
%13 = icmp ne i64 0, %12
br i1 %13, label %14, label %15
14: ; preds = %9
br label %23
15: ; preds = %9
%16 = load i64, i64* %4
%17 = add nsw i64 %16, 1
store i64 %17, i64* %4
%18 = load i64, i64* %3
%19 = ashr i64 %18, 1
store i64 %19, i64* %3
br label %20
20: ; preds = %15
%21 = load i64, i64* %5
%22 = add nsw i64 %21, 1
store i64 %22, i64* %5
br label %6
23: ; preds = %14, %6
%24 = load i64, i64* %4
%25 = trunc i64 %24 to i32
ret i32 %25
}

LLVM IR (-O2):
define i32 @NumLeadingZeros(i64 %0) {
%2 = and i64 %0, 2147483648
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %15
4: ; preds = %1, %4
%5 = phi i64 [ %7, %4 ], [ 0, %1 ]
%6 = phi i64 [ %8, %4 ], [ 2147483648, %1 ]
%7 = add nuw nsw i64 %5, 1
%8 = lshr i64 %6, 1
%9 = icmp ult i64 %5, 31
%10 = and i64 %8, %0
%11 = icmp eq i64 %10, 0
%12 = select i1 %9, i1 %11, i1 false
br i1 %12, label %4, label %13
13: ; preds = %4
%14 = trunc i64 %7 to i32
br label %15
15: ; preds = %13, %1
%16 = phi i32 [ 0, %1 ], [ %14, %13 ]
ret i32 %16
}
/* Variables and functions */
scalar_t__ strtol(char const *, char **, int);
long unsigned int strtoul(const char *nptr, char **endptr, int base) {
  return (long unsigned int)strtol(nptr, endptr, base);
}


x86 assembly (clang, -O0):
<strtoul>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <strtol@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strtoul>:
jmp    1030 <strtol@plt>

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

LLVM IR (-O2):
define i64 @strtoul(i8* %0, i8** nocapture %1, i32 %2) {
%4 = tail call i64 @strtol(i8* %0, i8** %1, i32 %2)
ret i64 %4
}
/* Type definitions */
struct packet_s {
  int dummy;
};

/* Variables and functions */
struct packet_s *genPack(int /*<<< orphan*/ *, int, int /*<<< orphan*/);
struct packet_s *genCfg_Req(void) {
  struct packet_s *pack = NULL;
  pack = genPack(NULL, 275, 0);
  return pack;
}


x86 assembly (clang, -O0):
<genCfg_Req>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x0,-0x8(%rbp)
xor    %eax,%eax
mov    %eax,%edi
mov    $0x113,%esi
xor    %edx,%edx
call   1030 <genPack@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<genCfg_Req>:
xor    %edi,%edi
mov    $0x113,%esi
xor    %edx,%edx
jmp    1030 <genPack@plt>

LLVM IR (-O0):
%struct.packet_s = type { i32 }
define %struct.packet_s* @genCfg_Req() {
%1 = alloca %struct.packet_s*
store %struct.packet_s* null, %struct.packet_s** %1
%2 = call %struct.packet_s* @genPack(i32* null, i32 275, i32 0)
store %struct.packet_s* %2, %struct.packet_s** %1
%3 = load %struct.packet_s*, %struct.packet_s** %1
ret %struct.packet_s* %3
}

LLVM IR (-O2):
%struct.packet_s = type { i32 }
define %struct.packet_s* @genCfg_Req() {
%1 = tail call %struct.packet_s* @genPack(i32* null, i32 275, i32 0)
ret %struct.packet_s* %1
}
dcat(a, b) struct node *a, *b;
{
  register struct node *c;
  c = cat(a, b);
  delete (a);
  delete (b);
  return (c);
}


x86 assembly (clang, -O0):
<dcat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1040 <cat@plt>
cltq
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1030 <delete@plt>
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1030 <delete@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dcat>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <cat@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <delete@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <delete@plt>
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
%struct.node = type opaque
%struct.node.0 = type opaque
define i32 @dcat(%struct.node* %0, %struct.node* %1) {
%3 = alloca %struct.node*
%4 = alloca %struct.node*
%5 = alloca %struct.node.0*
store %struct.node* %0, %struct.node** %3
store %struct.node* %1, %struct.node** %4
%6 = load %struct.node*, %struct.node** %3
%7 = load %struct.node*, %struct.node** %4
%8 = call i32 (%struct.node*, %struct.node*, ...) bitcast (i32 (...)* @cat to i32 (%struct.node*, %struct.node*, ...)*)(%struct.node* %6, %struct.node* %7)
%9 = sext i32 %8 to i64
%10 = inttoptr i64 %9 to %struct.node.0*
store %struct.node.0* %10, %struct.node.0** %5
%11 = load %struct.node*, %struct.node** %3
%12 = call i32 (%struct.node*, ...) bitcast (i32 (...)* @delete to i32 (%struct.node*, ...)*)(%struct.node* %11)
%13 = load %struct.node*, %struct.node** %4
%14 = call i32 (%struct.node*, ...) bitcast (i32 (...)* @delete to i32 (%struct.node*, ...)*)(%struct.node* %13)
%15 = load %struct.node.0*, %struct.node.0** %5
%16 = ptrtoint %struct.node.0* %15 to i32
ret i32 %16
}

LLVM IR (-O2):
%struct.node = type opaque
define i32 @dcat(%struct.node* %0, %struct.node* %1) {
%3 = tail call i32 (%struct.node*, %struct.node*, ...) bitcast (i32 (...)* @cat to i32 (%struct.node*, %struct.node*, ...)*)(%struct.node* %0, %struct.node* %1)
%4 = tail call i32 (%struct.node*, ...) bitcast (i32 (...)* @delete to i32 (%struct.node*, ...)*)(%struct.node* %0)
%5 = tail call i32 (%struct.node*, ...) bitcast (i32 (...)* @delete to i32 (%struct.node*, ...)*)(%struct.node* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ display(int *);
int /*<<< orphan*/ eliminate(int *);
int /*<<< orphan*/ fill_array(int *);
int main() {
  int arr[100];
  fill_array(arr);
  eliminate(arr);
  display(arr);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x190,%rsp
lea    -0x190(%rbp),%rdi
call   1050 <fill_array@plt>
lea    -0x190(%rbp),%rdi
call   1030 <eliminate@plt>
lea    -0x190(%rbp),%rdi
call   1040 <display@plt>
xor    %eax,%eax
add    $0x190,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x190,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1050 <fill_array@plt>
mov    %rbx,%rdi
call   1030 <eliminate@plt>
mov    %rbx,%rdi
call   1040 <display@plt>
xor    %eax,%eax
add    $0x190,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca [100 x i32]
%2 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 0
%3 = call i32 @fill_array(i32* %2)
%4 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 0
%5 = call i32 @eliminate(i32* %4)
%6 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 0
%7 = call i32 @display(i32* %6)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [100 x i32]
%2 = bitcast [100 x i32]* %1 to i8*
%3 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 0
%4 = call i32 @fill_array(i32* %3)
%5 = call i32 @eliminate(i32* %3)
%6 = call i32 @display(i32* %3)
ret i32 0
}
double fmax(double x, double y) {
  if (x > y)
    return x;
  else
    return y;
}


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

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

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

LLVM IR (-O2):
define double @fmax(double %0, double %1) {
%3 = fcmp ogt double %0, %1
%4 = select i1 %3, double %0, double %1
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void exampleHeader(int exampleNumber) {
  printf("Sample Function Example %d\n\n", exampleNumber);
}


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

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

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

LLVM IR (-O2):
@.str = [29 x i8] c"Sample Function Example %d\0A\0A\00"
define void @exampleHeader(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
char tolower(unsigned char);
char tolower_c(char c) { return tolower((unsigned char)c); }


x86 assembly (clang, -O0):
<tolower_c>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edi
call   1030 <tolower@plt>
movsbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tolower_c>:
movzbl %dil,%edi
jmp    1030 <tolower@plt>

LLVM IR (-O0):
define signext i8 @tolower_c(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call signext i8 @tolower(i8 zeroext %3)
ret i8 %4
}

LLVM IR (-O2):
define signext i8 @tolower_c(i8 signext %0) {
%2 = tail call signext i8 @tolower(i8 zeroext %0)
ret i8 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ __m64;

/* Variables and functions */
int /*<<< orphan*/ _mm_subs_pi8(int /*<<< orphan*/, int /*<<< orphan*/);
__m64 __attribute__((no, unused)) test(__m64 s1, __m64 s2) {
  return _mm_subs_pi8(s1, s2);
}


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

x86 assembly (clang, -O2):
<test>:
jmp    1030 <_mm_subs_pi8@plt>

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

LLVM IR (-O2):
define i32 @test(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_subs_pi8(i32 %0, i32 %1)
ret i32 %3
}
char *GroupType_metaClassName(void *const this) { return "GroupType"; }


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

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

LLVM IR (-O0):
@.str = [10 x i8] c"GroupType\00"
define i8* @GroupType_metaClassName(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [10 x i8] c"GroupType\00"
define i8* @GroupType_metaClassName(i8* nocapture readnone %0) {
ret i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0)
}
int blk_mq_debugfs_register_hctx(struct request_queue *q,
                                 struct blk_mq_hw_ctx *hctx) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.request_queue = type opaque
%struct.blk_mq_hw_ctx = type opaque
define i32 @blk_mq_debugfs_register_hctx(%struct.request_queue* %0, %struct.blk_mq_hw_ctx* %1) {
%3 = alloca %struct.request_queue*
%4 = alloca %struct.blk_mq_hw_ctx*
store %struct.request_queue* %0, %struct.request_queue** %3
store %struct.blk_mq_hw_ctx* %1, %struct.blk_mq_hw_ctx** %4
ret i32 0
}

LLVM IR (-O2):
%struct.request_queue = type opaque
%struct.blk_mq_hw_ctx = type opaque
define i32 @blk_mq_debugfs_register_hctx(%struct.request_queue* nocapture readnone %0, %struct.blk_mq_hw_ctx* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ mkdir(char *, int);
void createDir(char *dirname) { mkdir(dirname, 0777); }


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

x86 assembly (clang, -O2):
<createDir>:
mov    $0x1ff,%esi
jmp    1030 <mkdir@plt>

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

LLVM IR (-O2):
define void @createDir(i8* nocapture %0) {
%2 = tail call i32 @mkdir(i8* %0, i32 511)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("i am template");
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [14 x i8] c"i am template\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ serial;
};
struct TYPE_4__ {
  TYPE_1__ xkeymap;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
unsigned long get_XEvent_xkeymap_serial(void *_p) {
  return (unsigned long)((XEvent *)_p)->xkeymap.serial;
}


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

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

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

LLVM IR (-O2):
define i64 @get_XEvent_xkeymap_serial(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
/* Type definitions */
struct genlist_link {
  int dummy;
};
struct genlist {
  int dummy;
};
struct clause_list_link {
  int dummy;
};
struct clause_list {
  int dummy;
};
struct Clause {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ genlist_insert_before(struct genlist *, struct Clause *,
                                         struct genlist_link *);
void clause_list_insert_before(struct clause_list *tthis, struct Clause *pfoo,
                               struct clause_list_link *plink) {
  genlist_insert_before((struct genlist *)tthis, pfoo,
                        (struct genlist_link *)plink);
}


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

x86 assembly (clang, -O2):
<clause_list_insert_before>:
jmp    1030 <genlist_insert_before@plt>

LLVM IR (-O0):
%struct.clause_list = type { i32 }
%struct.Clause = type { i32 }
%struct.clause_list_link = type { i32 }
%struct.genlist = type { i32 }
%struct.genlist_link = type { i32 }
define void @clause_list_insert_before(%struct.clause_list* %0, %struct.Clause* %1, %struct.clause_list_link* %2) {
%4 = alloca %struct.clause_list*
%5 = alloca %struct.Clause*
%6 = alloca %struct.clause_list_link*
store %struct.clause_list* %0, %struct.clause_list** %4
store %struct.Clause* %1, %struct.Clause** %5
store %struct.clause_list_link* %2, %struct.clause_list_link** %6
%7 = load %struct.clause_list*, %struct.clause_list** %4
%8 = bitcast %struct.clause_list* %7 to %struct.genlist*
%9 = load %struct.Clause*, %struct.Clause** %5
%10 = load %struct.clause_list_link*, %struct.clause_list_link** %6
%11 = bitcast %struct.clause_list_link* %10 to %struct.genlist_link*
%12 = call i32 @genlist_insert_before(%struct.genlist* %8, %struct.Clause* %9, %struct.genlist_link* %11)
ret void
}

LLVM IR (-O2):
%struct.clause_list = type { i32 }
%struct.Clause = type { i32 }
%struct.clause_list_link = type { i32 }
%struct.genlist = type { i32 }
%struct.genlist_link = type { i32 }
define void @clause_list_insert_before(%struct.clause_list* %0, %struct.Clause* %1, %struct.clause_list_link* %2) {
%4 = bitcast %struct.clause_list* %0 to %struct.genlist*
%5 = bitcast %struct.clause_list_link* %2 to %struct.genlist_link*
%6 = tail call i32 @genlist_insert_before(%struct.genlist* %4, %struct.Clause* %1, %struct.genlist_link* %5)
ret void
}
int registers_len() { return 33; }


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

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

LLVM IR (-O0):
define i32 @registers_len() {
ret i32 33
}

LLVM IR (-O2):
define i32 @registers_len() {
ret i32 33
}
/* Type definitions */
typedef int /*<<< orphan*/ off_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SEEK_CUR;
scalar_t__ fseek(int /*<<< orphan*/ *, int /*<<< orphan*/, int /*<<< orphan*/);
int stdio_seek(void *data, off_t len) {
  FILE *f = (FILE *)data;
  int err = 0;
  if (fseek(f, len, SEEK_CUR))
    err = -11;
  return err;
}


x86 assembly (clang, -O0):
<stdio_seek>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    0x2eac(%rip),%rax
mov    (%rax),%edx
call   1030 <fseek@plt>
cmp    $0x0,%rax
je     1154 <stdio_seek+0x44>
movl   $0xfffffff5,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stdio_seek>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edx
call   1030 <fseek@plt>
xor    %ecx,%ecx
test   %rax,%rax
mov    $0xfffffff5,%eax
cmove  %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@SEEK_CUR = global i32 0
define i32 @stdio_seek(i8* nocapture %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* @SEEK_CUR
%5 = tail call i64 @fseek(i32* %3, i32 %1, i32 %4)
%6 = icmp eq i64 %5, 0
%7 = select i1 %6, i32 0, i32 -11
ret i32 %7
}
int wake_up_task(char *function) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @wake_up_task(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ VIM_SIF_I2cReadByte(unsigned char, unsigned char *);
void SensorGetReg_NOON30PC11(unsigned char uAddr, unsigned short *uVal) {
  VIM_SIF_I2cReadByte((unsigned char)uAddr, (unsigned char *)uVal);
}


x86 assembly (clang, -O0):
<SensorGetReg_NOON30PC11>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x1(%rbp),%al
mov    -0x10(%rbp),%rsi
movzbl %al,%edi
call   1030 <VIM_SIF_I2cReadByte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SensorGetReg_NOON30PC11>:
jmp    1030 <VIM_SIF_I2cReadByte@plt>

LLVM IR (-O0):
define void @SensorGetReg_NOON30PC11(i8 zeroext %0, i16* %1) {
%3 = alloca i8
%4 = alloca i16*
store i8 %0, i8* %3
store i16* %1, i16** %4
%5 = load i8, i8* %3
%6 = load i16*, i16** %4
%7 = bitcast i16* %6 to i8*
%8 = call i32 @VIM_SIF_I2cReadByte(i8 zeroext %5, i8* %7)
ret void
}

LLVM IR (-O2):
define void @SensorGetReg_NOON30PC11(i8 zeroext %0, i16* %1) {
%3 = bitcast i16* %1 to i8*
%4 = tail call i32 @VIM_SIF_I2cReadByte(i8 zeroext %0, i8* %3)
ret void
}
/* Variables and functions */
void *realloc(void *, int);
void *btshas_mm_realloc(void *ptr, int sz) { return (realloc(ptr, sz)); }


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

x86 assembly (clang, -O2):
<btshas_mm_realloc>:
jmp    1030 <realloc@plt>

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

LLVM IR (-O2):
define i8* @btshas_mm_realloc(i8* %0, i32 %1) {
%3 = tail call i8* @realloc(i8* %0, i32 %1)
ret i8* %3
}