xunge/DecIR huggingface dataset:
/* Variables and functions */
double ConvertCharToInt(char const);
double pow(int, int const);
double GetNumberFromDigits(double output, const char input, const int i) {
  return (output + pow(10, i) * ConvertCharToInt(input));
}


x86 assembly (clang, -O0):
<GetNumberFromDigits>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dil,%al
movsd  %xmm0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    %esi,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x10(%rbp),%esi
mov    $0xa,%edi
call   1040 <pow@plt>
movsd  %xmm0,-0x18(%rbp)
movsbl -0x9(%rbp),%edi
call   1030 <ConvertCharToInt@plt>
movsd  -0x20(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x18(%rbp),%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetNumberFromDigits>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
movsd  %xmm0,0x8(%rsp)
mov    $0xa,%edi
call   1040 <pow@plt>
movsd  %xmm0,(%rsp)
mov    %ebx,%edi
call   1030 <ConvertCharToInt@plt>
mulsd  (%rsp),%xmm0
addsd  0x8(%rsp),%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @GetNumberFromDigits(double %0, i8 signext %1, i32 %2) {
%4 = alloca double
%5 = alloca i8
%6 = alloca i32
store double %0, double* %4
store i8 %1, i8* %5
store i32 %2, i32* %6
%7 = load double, double* %4
%8 = load i32, i32* %6
%9 = call double @pow(i32 10, i32 %8)
%10 = load i8, i8* %5
%11 = call double @ConvertCharToInt(i8 signext %10)
%12 = call double @llvm.fmuladd.f64(double %9, double %11, double %7)
ret double %12
}

LLVM IR (-O2):
define double @GetNumberFromDigits(double %0, i8 signext %1, i32 %2) {
%4 = tail call double @pow(i32 10, i32 %2)
%5 = tail call double @ConvertCharToInt(i8 signext %1)
%6 = tail call double @llvm.fmuladd.f64(double %4, double %5, double %0)
ret double %6
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0x40() {
  Assert_real((isodigit(64) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isodigit.c",
              325, ("isodigit should be 0 for @"));
}


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

x86 assembly (clang, -O2):
<t_isodigit_0x40>:
push   %rax
mov    $0x40,%edi
call   1040 <isodigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x145,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

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

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isodigit.c\00"
@.str.1 = [27 x i8] c"isodigit should be 0 for @\00"
define void @t_isodigit_0x40() {
%1 = tail call i64 @isodigit(i32 64)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 325, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int isPowerOfTwo(int n) {
  if (n <= 0)
    return 0;
  while (!(n & 1)) {
    n >>= 1;
  }
  return n == 1;
}


x86 assembly (clang, -O0):
<isPowerOfTwo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jg     111d <isPowerOfTwo+0x1d>
movl   $0x0,-0x4(%rbp)
jmp    115a <isPowerOfTwo+0x5a>
jmp    1122 <isPowerOfTwo+0x22>
mov    -0x8(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    113d <isPowerOfTwo+0x3d>
jmp    114b <isPowerOfTwo+0x4b>
mov    -0x8(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <isPowerOfTwo+0x22>
cmpl   $0x1,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isPowerOfTwo>:
test   %edi,%edi
jle    1122 <isPowerOfTwo+0x22>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %edi,%ecx
sar    %edi
test   $0x1,%cl
je     1110 <isPowerOfTwo+0x10>
xor    %eax,%eax
cmp    $0x1,%ecx
sete   %al
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @isPowerOfTwo(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sle i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 0, i32* %2
br label %20
7: ; preds = %1
br label %8
8: ; preds = %13, %7
%9 = load i32, i32* %3
%10 = and i32 %9, 1
%11 = icmp ne i32 %10, 0
%12 = xor i1 %11, true
br i1 %12, label %13, label %16
13: ; preds = %8
%14 = load i32, i32* %3
%15 = ashr i32 %14, 1
store i32 %15, i32* %3
br label %8
16: ; preds = %8
%17 = load i32, i32* %3
%18 = icmp eq i32 %17, 1
%19 = zext i1 %18 to i32
store i32 %19, i32* %2
br label %20
20: ; preds = %16, %6
%21 = load i32, i32* %2
ret i32 %21
}

LLVM IR (-O2):
define i32 @isPowerOfTwo(i32 %0) {
%2 = icmp slt i32 %0, 1
br i1 %2, label %11, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ %0, %1 ]
%5 = and i32 %4, 1
%6 = icmp eq i32 %5, 0
%7 = ashr i32 %4, 1
br i1 %6, label %3, label %8
8: ; preds = %3
%9 = icmp eq i32 %4, 1
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %1, %8
%12 = phi i32 [ %10, %8 ], [ 0, %1 ]
ret i32 %12
}
int test_imm_F3uint16_reg(unsigned short val) {
  return ((val) & (0xF3 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_F3uint16_reg(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = and i32 %4, 243
%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_F3uint16_reg(i16 zeroext %0) {
%2 = and i16 %0, 243
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ outportb(int, int);
extern void WriteMOR(int val) { outportb(0x3C2, val); }


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

x86 assembly (clang, -O2):
<WriteMOR>:
mov    %edi,%esi
mov    $0x3c2,%edi
jmp    1030 <outportb@plt>

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

LLVM IR (-O2):
define void @WriteMOR(i32 %0) {
%2 = tail call i32 @outportb(i32 962, i32 %0)
ret void
}
int do_757() { return 757; }


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

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

LLVM IR (-O0):
define i32 @do_757() {
ret i32 757
}

LLVM IR (-O2):
define i32 @do_757() {
ret i32 757
}
/* Variables and functions */
int xyzToLabPreproc(double);
double xyzToLabB(double xin, double yin, double zin) {
  return 200 * (xyzToLabPreproc(yin) - xyzToLabPreproc(zin));
}


x86 assembly (clang, -O0):
<xyzToLabB>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1030 <xyzToLabPreproc@plt>
mov    %eax,-0x1c(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1030 <xyzToLabPreproc@plt>
mov    %eax,%ecx
mov    -0x1c(%rbp),%eax
sub    %ecx,%eax
imul   $0xc8,%eax,%eax
cvtsi2sd %eax,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xyzToLabB>:
push   %rbx
sub    $0x10,%rsp
movsd  %xmm2,0x8(%rsp)
movaps %xmm1,%xmm0
call   1030 <xyzToLabPreproc@plt>
mov    %eax,%ebx
movsd  0x8(%rsp),%xmm0
call   1030 <xyzToLabPreproc@plt>
sub    %eax,%ebx
imul   $0xc8,%ebx,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @xyzToLabB(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %5
%8 = call i32 @xyzToLabPreproc(double %7)
%9 = load double, double* %6
%10 = call i32 @xyzToLabPreproc(double %9)
%11 = sub nsw i32 %8, %10
%12 = mul nsw i32 200, %11
%13 = sitofp i32 %12 to double
ret double %13
}

LLVM IR (-O2):
define double @xyzToLabB(double %0, double %1, double %2) {
%4 = tail call i32 @xyzToLabPreproc(double %1)
%5 = tail call i32 @xyzToLabPreproc(double %2)
%6 = sub nsw i32 %4, %5
%7 = mul nsw i32 %6, 200
%8 = sitofp i32 %7 to double
ret double %8
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int main(int argc, char **argv) {
  if (argc > 2)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jle    1137 <main+0x27>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
cmp    $0x3,%edi
jge    1118 <main+0x8>
xor    %eax,%eax
ret
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = icmp sgt i32 %6, 2
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = call i32 (...) @abort()
unreachable
10: ; preds = %2
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = icmp sgt i32 %0, 2
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 (...) @abort()
unreachable
6: ; preds = %2
ret i32 0
}
/* Variables and functions */
bool check(const char *word) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @check(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void speex_notify(const char *str) {
  fprintf(stderr, "notification: %s\n", str);
}


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

x86 assembly (clang, -O2):
<speex_notify>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [18 x i8] c"notification: %s\0A\00"
define void @speex_notify(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [18 x i8] c"notification: %s\0A\00"
define void @speex_notify(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
__attribute__((always_)) void patch_NCAS_1_1_9253_extra(void) {}


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

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

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

LLVM IR (-O2):
define void @patch_NCAS_1_1_9253_extra() {
ret void
}
/* Variables and functions */
int socketcall(int, unsigned long *);
int socket(int domain, int type, int protocol) {
  unsigned long arr[3];
  arr[0] = (long)domain;
  arr[1] = (long)type;
  arr[2] = (long)protocol;
  return socketcall(1, arr);
}


x86 assembly (clang, -O0):
<socket>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movslq -0x4(%rbp),%rax
mov    %rax,-0x30(%rbp)
movslq -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
movslq -0xc(%rbp),%rax
mov    %rax,-0x20(%rbp)
lea    -0x30(%rbp),%rsi
mov    $0x1,%edi
call   1030 <socketcall@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<socket>:
sub    $0x18,%rsp
movslq %edi,%rax
mov    %rax,(%rsp)
movslq %esi,%rax
mov    %rax,0x8(%rsp)
movslq %edx,%rax
mov    %rax,0x10(%rsp)
mov    %rsp,%rsi
mov    $0x1,%edi
call   1030 <socketcall@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @socket(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca [3 x i64]
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %4
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds [3 x i64], [3 x i64]* %7, i64 0, i64 0
store i64 %9, i64* %10
%11 = load i32, i32* %5
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds [3 x i64], [3 x i64]* %7, i64 0, i64 1
store i64 %12, i64* %13
%14 = load i32, i32* %6
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds [3 x i64], [3 x i64]* %7, i64 0, i64 2
store i64 %15, i64* %16
%17 = getelementptr inbounds [3 x i64], [3 x i64]* %7, i64 0, i64 0
%18 = call i32 @socketcall(i32 1, i64* %17)
ret i32 %18
}

LLVM IR (-O2):
define i32 @socket(i32 %0, i32 %1, i32 %2) {
%4 = alloca [3 x i64]
%5 = bitcast [3 x i64]* %4 to i8*
%6 = sext i32 %0 to i64
%7 = getelementptr inbounds [3 x i64], [3 x i64]* %4, i64 0, i64 0
store i64 %6, i64* %7
%8 = sext i32 %1 to i64
%9 = getelementptr inbounds [3 x i64], [3 x i64]* %4, i64 0, i64 1
store i64 %8, i64* %9
%10 = sext i32 %2 to i64
%11 = getelementptr inbounds [3 x i64], [3 x i64]* %4, i64 0, i64 2
store i64 %10, i64* %11
%12 = call i32 @socketcall(i32 1, i64* %7)
ret i32 %12
}
void usage(const char *bin) {
  int pad_length = strlen(bin);
  printf("Usage: %s [-p port]\n", bin);
  printf("       %*s [-k start|restart|stop]\n", pad_length, " ");
  printf("Options:\n");
  printf("  -p port    : the port to listen on\n");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xebd(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0xc(%rbp),%esi
lea    0xec1(%rip),%rdi
lea    0xede(%rip),%rdx
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xed2(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xece(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1040 <strlen@plt>
mov    %rax,%r14
lea    0xeba(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xebe(%rip),%rdi
lea    0xedb(%rip),%rdx
mov    %r14d,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xecc(%rip),%rdi
call   1030 <puts@plt>
lea    0xec9(%rip),%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"Usage: %s [-p port]\0A\00"
@.str.1 = [36 x i8] c" %*s [-k start|restart|stop]\0A\00"
@.str.2 = [2 x i8] c" \00"
@.str.3 = [10 x i8] c"Options:\0A\00"
@.str.4 = [38 x i8] c" -p port : the port to listen on\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = trunc i64 %5 to i32
store i32 %6, i32* %3
%7 = load i8*, i8** %2
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %7)
%9 = load i32, i32* %3
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i32 %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.4, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"Usage: %s [-p port]\0A\00"
@.str.1 = [36 x i8] c" %*s [-k start|restart|stop]\0A\00"
@.str.2 = [2 x i8] c" \00"
@str = [9 x i8] c"Options:\00"
@str.5 = [37 x i8] c" -p port : the port to listen on\00"
define void @usage(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = trunc i64 %2 to i32
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i32 %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str.5, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ outb(int, int);
int timer_handler() {
  outb(0x20, 0x20);
  return 0;
}


x86 assembly (clang, -O0):
<timer_handler>:
push   %rbp
mov    %rsp,%rbp
mov    $0x20,%esi
mov    %esi,%edi
call   1030 <outb@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @timer_handler() {
%1 = call i32 @outb(i32 32, i32 32)
ret i32 0
}

LLVM IR (-O2):
define i32 @timer_handler() {
%1 = tail call i32 @outb(i32 32, i32 32)
ret i32 0
}
void myth_log_start_body(void) {}


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

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

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

LLVM IR (-O2):
define void @myth_log_start_body() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ closelog();
void xc_log_exit(void) {
  closelog();
  return;
}


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

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

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

LLVM IR (-O2):
define void @xc_log_exit() {
%1 = tail call i32 (...) @closelog()
ret void
}
/* Variables and functions */
double CLOCKS_PER_SEC;
scalar_t__ clock();
double tempo() { return (double)clock() / CLOCKS_PER_SEC; }


x86 assembly (clang, -O0):
<tempo>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <clock@plt>
cvtsi2sd %rax,%xmm0
mov    0x2ec1(%rip),%rax
divsd  (%rax),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<tempo>:
push   %rax
xor    %eax,%eax
call   1030 <clock@plt>
cvtsi2sd %rax,%xmm0
mov    0x2ec4(%rip),%rax
divsd  (%rax),%xmm0
pop    %rax
ret

LLVM IR (-O0):
@CLOCKS_PER_SEC = global double 0.000000e+00
define double @tempo() {
%1 = call i64 (...) @clock()
%2 = sitofp i64 %1 to double
%3 = load double, double* @CLOCKS_PER_SEC
%4 = fdiv double %2, %3
ret double %4
}

LLVM IR (-O2):
@CLOCKS_PER_SEC = global double 0.000000e+00
define double @tempo() {
%1 = tail call i64 (...) @clock()
%2 = sitofp i64 %1 to double
%3 = load double, double* @CLOCKS_PER_SEC
%4 = fdiv double %2, %3
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  int g;
  for (g = 0; g <= 255; g++) {
    printf("%c%10d\n", g, g);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xff,-0x8(%rbp)
jg     1153 <main+0x43>
mov    -0x8(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %ebx,%ebx
lea    0xee3(%rip),%r14
nopl   (%rax)
mov    %r14,%rdi
mov    %ebx,%esi
mov    %ebx,%edx
call   1030 <printf@plt>
add    $0x1,%ebx
cmp    $0x100,%ebx
jne    1120 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [8 x i8] c"%c%10d\0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %4, %1 ]
%3 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %2)
%4 = add nuw nsw i32 %2, 1
%5 = icmp eq i32 %4, 256
br i1 %5, label %6, label %1
6: ; preds = %1
ret i32 0
}
void path_040_expected_1(int y) {
  do {
    y++;
  } while (1 - 1);
}


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

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

LLVM IR (-O0):
define void @path_040_expected_1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %1
%4 = load i32, i32* %2
%5 = add nsw i32 %4, 1
store i32 %5, i32* %2
br label %6
6: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @path_040_expected_1(i32 %0) {
ret void
}
/* Type definitions */
struct node {
  int dummy;
};

/* Variables and functions */
struct node *makeList();
int /*<<< orphan*/ printList(struct node *);
int /*<<< orphan*/ removeDuplicates(struct node *);
int main(void) {
  struct node *listHead = makeList();
  printList(listHead);
  removeDuplicates(listHead);
  printList(listHead);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <makeList@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1050 <printList@plt>
mov    %rbx,%rdi
call   1030 <removeDuplicates@plt>
mov    %rbx,%rdi
call   1050 <printList@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.node = type { i32 }
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.node*
store i32 0, i32* %1
%3 = call %struct.node* (...) @makeList()
store %struct.node* %3, %struct.node** %2
%4 = load %struct.node*, %struct.node** %2
%5 = call i32 @printList(%struct.node* %4)
%6 = load %struct.node*, %struct.node** %2
%7 = call i32 @removeDuplicates(%struct.node* %6)
%8 = load %struct.node*, %struct.node** %2
%9 = call i32 @printList(%struct.node* %8)
ret i32 0
}

LLVM IR (-O2):
%struct.node = type { i32 }
define i32 @main() {
%1 = tail call %struct.node* (...) @makeList()
%2 = tail call i32 @printList(%struct.node* %1)
%3 = tail call i32 @removeDuplicates(%struct.node* %1)
%4 = tail call i32 @printList(%struct.node* %1)
ret i32 0
}
int test_imm_82uint16_mem(unsigned short *val) {
  return ((*val) & (0x82 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_82uint16_mem>:
testb  $0x82,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_82uint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 130
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ glVertex4f(float, float, int /*<<< orphan*/, int);
void glVertex2f(float x, float y) { glVertex4f(x, y, 0, 1); }


x86 assembly (clang, -O0):
<glVertex2f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
xor    %edi,%edi
mov    $0x1,%esi
call   1030 <glVertex4f@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<glVertex2f>:
xor    %edi,%edi
mov    $0x1,%esi
jmp    1030 <glVertex4f@plt>

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

LLVM IR (-O2):
define void @glVertex2f(float %0, float %1) {
%3 = tail call i32 @glVertex4f(float %0, float %1, i32 0, i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ scanf(char *, float *);
float inputfloat(char *c, float num) {
  printf("Inserisci %s\n", c);
  scanf("%f", &num);
  return num;
}


x86 assembly (clang, -O0):
<inputfloat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
lea    0xec6(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0xc(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inputfloat>:
push   %rax
mov    %rdi,%rsi
movss  %xmm0,0x4(%rsp)
lea    0xecf(%rip),%rdi
call   1030 <printf@plt>
lea    0xed1(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
movss  0x4(%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
@.str = [14 x i8] c"Inserisci %s\0A\00"
@.str.1 = [3 x i8] c"%f\00"
define float @inputfloat(i8* %0, float %1) {
%3 = alloca i8*
%4 = alloca float
store i8* %0, i8** %3
store float %1, float* %4
%5 = load i8*, i8** %3
%6 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %4)
%8 = load float, float* %4
ret float %8
}

LLVM IR (-O2):
@.str = [14 x i8] c"Inserisci %s\0A\00"
@.str.1 = [3 x i8] c"%f\00"
define float @inputfloat(i8* %0, float %1) {
%3 = alloca float
store float %1, float* %3
%4 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %3)
%6 = load float, float* %3
ret float %6
}
void kmemleak_init(void) {}


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

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

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

LLVM IR (-O2):
define void @kmemleak_init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ arm_memio_immt_op();
int /*<<< orphan*/ arm_memio_strbt(int /*<<< orphan*/);
void arm_strbt_imm() { arm_memio_strbt(arm_memio_immt_op()); }


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

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

LLVM IR (-O0):
define void @arm_strbt_imm() {
%1 = call i32 (...) @arm_memio_immt_op()
%2 = call i32 @arm_memio_strbt(i32 %1)
ret void
}

LLVM IR (-O2):
define void @arm_strbt_imm() {
%1 = tail call i32 (...) @arm_memio_immt_op()
%2 = tail call i32 @arm_memio_strbt(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ putc(int /*<<< orphan*/);
void puts(const char *s) {
  while (*s)
    putc(*s++);
}


x86 assembly (clang, -O0):
<puts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1145 <puts+0x35>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
call   1030 <putc@plt>
jmp    111c <puts+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<puts>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <puts+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <putc@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <puts+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @puts(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %10, %4 ], [ %2, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = sext i8 %5 to i32
%9 = tail call i32 @putc(i32 %8)
%10 = load i8, i8* %7
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
ret void
}
/* Variables and functions */
int getppid();
int /*<<< orphan*/ usleep(int);
int child_fn(const char *cgroup, void *arg) {
  int ppid = getppid();
  while (getppid() == ppid)
    usleep(1000);
  return getppid() == ppid;
}


x86 assembly (clang, -O0):
<child_fn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <getppid@plt>
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1030 <getppid@plt>
cmp    -0x14(%rbp),%eax
jne    1159 <child_fn+0x39>
mov    $0x3e8,%edi
call   1040 <usleep@plt>
jmp    113a <child_fn+0x1a>
mov    $0x0,%al
call   1030 <getppid@plt>
cmp    -0x14(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<child_fn>:
push   %rbx
xor    %eax,%eax
call   1030 <getppid@plt>
mov    %eax,%ebx
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <getppid@plt>
cmp    %ebx,%eax
jne    1147 <child_fn+0x27>
mov    $0x3e8,%edi
call   1040 <usleep@plt>
jmp    1130 <child_fn+0x10>
xor    %eax,%eax
call   1030 <getppid@plt>
xor    %ecx,%ecx
cmp    %ebx,%eax
sete   %cl
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @child_fn(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = call i32 (...) @getppid()
store i32 %6, i32* %5
br label %7
7: ; preds = %11, %2
%8 = call i32 (...) @getppid()
%9 = load i32, i32* %5
%10 = icmp eq i32 %8, %9
br i1 %10, label %11, label %13
11: ; preds = %7
%12 = call i32 @usleep(i32 1000)
br label %7
13: ; preds = %7
%14 = call i32 (...) @getppid()
%15 = load i32, i32* %5
%16 = icmp eq i32 %14, %15
%17 = zext i1 %16 to i32
ret i32 %17
}

LLVM IR (-O2):
define i32 @child_fn(i8* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = tail call i32 (...) @getppid()
%4 = tail call i32 (...) @getppid()
%5 = icmp eq i32 %4, %3
br i1 %5, label %6, label %10
6: ; preds = %2, %6
%7 = tail call i32 @usleep(i32 1000)
%8 = tail call i32 (...) @getppid()
%9 = icmp eq i32 %8, %3
br i1 %9, label %6, label %10
10: ; preds = %6, %2
%11 = tail call i32 (...) @getppid()
%12 = icmp eq i32 %11, %3
%13 = zext i1 %12 to i32
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ memmgr_init_messages();
void malloc_init_messages(void) { memmgr_init_messages(); }


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

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

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

LLVM IR (-O2):
define void @malloc_init_messages() {
%1 = tail call i32 (...) @memmgr_init_messages()
ret void
}
void ssd_start_eacs_monitor_scan(void) {
  printf("TODO : %s : %d\n", __func__, 579);
}


x86 assembly (clang, -O0):
<ssd_start_eacs_monitor_scan>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xeee(%rip),%rsi
mov    $0x243,%edx
mov    $0x0,%al
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ssd_start_eacs_monitor_scan>:
lea    0xee9(%rip),%rdi
lea    0xef2(%rip),%rsi
mov    $0x243,%edx
xor    %eax,%eax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"TODO : %s : %d\0A\00"
@__func__.ssd_start_eacs_monitor_scan = [28 x i8] c"ssd_start_eacs_monitor_scan\00"
define void @ssd_start_eacs_monitor_scan() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @__func__.ssd_start_eacs_monitor_scan, i64 0, i64 0), i32 579)
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"TODO : %s : %d\0A\00"
@__func__.ssd_start_eacs_monitor_scan = [28 x i8] c"ssd_start_eacs_monitor_scan\00"
define void @ssd_start_eacs_monitor_scan() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @__func__.ssd_start_eacs_monitor_scan, i64 0, i64 0), i32 579)
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int uint16_t;

/* Variables and functions */
uint8_t is_leap_year(uint16_t y) {
  if (((y % 4 == 0) && (y % 100 != 0)) || (y % 400 == 0))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<is_leap_year>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    112f <is_leap_year+0x2f>
mov    -0x8(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1143 <is_leap_year+0x43>
mov    -0x8(%rbp),%eax
mov    $0x190,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    114f <is_leap_year+0x4f>
movl   $0x1,-0x4(%rbp)
jmp    1156 <is_leap_year+0x56>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_leap_year>:
test   $0x3,%dil
sete   %al
imul   $0xc28f5c29,%edi,%ecx
add    $0x51eb850,%ecx
mov    %ecx,%edx
ror    $0x2,%edx
cmp    $0x28f5c29,%edx
setae  %dl
and    %al,%dl
ror    $0x4,%ecx
cmp    $0xa3d70b,%ecx
setb   %al
or     %dl,%al
movzbl %al,%eax
ret

LLVM IR (-O0):
define i32 @is_leap_year(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = srem i32 %4, 4
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i32, i32* %3
%9 = srem i32 %8, 100
%10 = icmp ne i32 %9, 0
br i1 %10, label %15, label %11
11: ; preds = %7, %1
%12 = load i32, i32* %3
%13 = srem i32 %12, 400
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %11, %7
store i32 1, i32* %2
br label %17
16: ; preds = %11
store i32 0, i32* %2
br label %17
17: ; preds = %16, %15
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @is_leap_year(i32 %0) {
%2 = and i32 %0, 3
%3 = icmp eq i32 %2, 0
%4 = srem i32 %0, 100
%5 = icmp ne i32 %4, 0
%6 = and i1 %3, %5
%7 = srem i32 %0, 400
%8 = icmp eq i32 %7, 0
%9 = or i1 %8, %6
%10 = zext i1 %9 to i32
ret i32 %10
}
void X509V3_EXT_CRL_add_conf(void) {}


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

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

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

LLVM IR (-O2):
define void @X509V3_EXT_CRL_add_conf() {
ret void
}
form_size(c) char c;
{
  int wid;
  switch (c) {
  case 'A':
    wid = 1;
    break;
  case 'I':
    wid = 2;
    break;
  case 'E':
    wid = 4;
    break;
  case 'D':
    wid = 8;
    break;
  default:
    wid = 0;
  }
  return (wid);
}


x86 assembly (clang, -O0):
<form_size>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0xffffffbf,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x8,%eax
ja     1164 <form_size+0x64>
mov    -0x10(%rbp),%rax
lea    0xed5(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x1,-0x8(%rbp)
jmp    116b <form_size+0x6b>
movl   $0x2,-0x8(%rbp)
jmp    116b <form_size+0x6b>
movl   $0x4,-0x8(%rbp)
jmp    116b <form_size+0x6b>
movl   $0x8,-0x8(%rbp)
jmp    116b <form_size+0x6b>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<form_size>:
movsbl %dil,%ecx
add    $0xffffffbf,%ecx
xor    %eax,%eax
cmp    $0x8,%ecx
ja     111b <form_size+0x1b>
movslq %ecx,%rax
lea    0xee8(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @form_size(i32 %0) {
%2 = alloca i8
%3 = alloca i32
%4 = trunc i32 %0 to i8
store i8 %4, i8* %2
%5 = load i8, i8* %2
%6 = sext i8 %5 to i32
switch i32 %6, label %11 [
i32 65, label %7
i32 73, label %8
i32 69, label %9
i32 68, label %10
]
7: ; preds = %1
store i32 1, i32* %3
br label %12
8: ; preds = %1
store i32 2, i32* %3
br label %12
9: ; preds = %1
store i32 4, i32* %3
br label %12
10: ; preds = %1
store i32 8, i32* %3
br label %12
11: ; preds = %1
store i32 0, i32* %3
br label %12
12: ; preds = %11, %10, %9, %8, %7
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
@switch.table.form_size = [9 x i32] [i32 1, i32 0, i32 0, i32 8, i32 4, i32 0, i32 0, i32 0, i32 2]
define i32 @form_size(i32 %0) {
%2 = shl i32 %0, 24
%3 = ashr exact i32 %2, 24
%4 = add nsw i32 %3, -65
%5 = icmp ult i32 %4, 9
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = sext i32 %4 to i64
%8 = getelementptr inbounds [9 x i32], [9 x i32]* @switch.table.form_size, i64 0, i64 %7
%9 = load i32, i32* %8
br label %10
10: ; preds = %1, %6
%11 = phi i32 [ %9, %6 ], [ 0, %1 ]
ret i32 %11
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  printf("hello, world!\n");
  printf("\n");
  printf("hello,");
  printf(" ");
  printf("world!\n");
  return EXIT_SUCCESS;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xecf(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xeb2(%rip),%rdi
call   1050 <printf@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
lea    0xeaa(%rip),%rdi
call   1040 <puts@plt>
mov    0x2e70(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"hello, world!\0A\00"
@.str.1 = [2 x i8] c"\0A\00"
@.str.2 = [7 x i8] c"hello,\00"
@.str.3 = [2 x i8] c" \00"
@.str.4 = [8 x i8] c"world!\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%10 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0))
%11 = load i32, i32* @EXIT_SUCCESS
ret i32 %11
}

LLVM IR (-O2):
@.str.2 = [7 x i8] c"hello,\00"
@EXIT_SUCCESS = global i32 0
@str = [14 x i8] c"hello, world!\00"
@str.5 = [7 x i8] c"world!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @putchar(i32 10)
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%6 = tail call i32 @putchar(i32 32)
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.5, i64 0, i64 0))
%8 = load i32, i32* @EXIT_SUCCESS
ret i32 %8
}
void s3mplayer_code_lock_end(void) {}


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

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

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

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

/* Variables and functions */
int FP32_MAKE(int, int, int);
int /*<<< orphan*/ assert(int);
uint32_t FP32_NAN(bool sign, uint32_t payload) {
  assert(payload);
  assert(payload < 0x800000);
  return FP32_MAKE(sign, 0xff, payload);
}


x86 assembly (clang, -O0):
<FP32_NAN>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <assert@plt>
cmpl   $0x800000,-0x8(%rbp)
setl   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%edx
mov    $0xff,%esi
call   1030 <FP32_MAKE@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FP32_NAN>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    %esi,%edi
call   1040 <assert@plt>
xor    %edi,%edi
cmp    $0x800000,%ebx
setl   %dil
call   1040 <assert@plt>
mov    %ebp,%edi
mov    $0xff,%esi
mov    %ebx,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <FP32_MAKE@plt>

LLVM IR (-O0):
define i32 @FP32_NAN(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = call i32 @assert(i32 %5)
%7 = load i32, i32* %4
%8 = icmp slt i32 %7, 8388608
%9 = zext i1 %8 to i32
%10 = call i32 @assert(i32 %9)
%11 = load i32, i32* %3
%12 = load i32, i32* %4
%13 = call i32 @FP32_MAKE(i32 %11, i32 255, i32 %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @FP32_NAN(i32 %0, i32 %1) {
%3 = tail call i32 @assert(i32 %1)
%4 = icmp slt i32 %1, 8388608
%5 = zext i1 %4 to i32
%6 = tail call i32 @assert(i32 %5)
%7 = tail call i32 @FP32_MAKE(i32 %0, i32 255, i32 %1)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *);
void panel_utils_yesno_str(char *tempstr, int val) {
  if (val) {
    sprintf(tempstr, "YES");
  } else {
    sprintf(tempstr, "NO");
  }
}


x86 assembly (clang, -O0):
<panel_utils_yesno_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     113e <panel_utils_yesno_str+0x2e>
mov    -0x8(%rbp),%rdi
lea    0xecc(%rip),%rsi
call   1030 <sprintf@plt>
jmp    114e <panel_utils_yesno_str+0x3e>
mov    -0x8(%rbp),%rdi
lea    0xebb(%rip),%rsi
call   1030 <sprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<panel_utils_yesno_str>:
test   %esi,%esi
je     110b <panel_utils_yesno_str+0xb>
movl   $0x534559,(%rdi)
ret
movb   $0x0,0x2(%rdi)
movw   $0x4f4e,(%rdi)
ret

LLVM IR (-O0):
@.str = [4 x i8] c"YES\00"
@.str.1 = [3 x i8] c"NO\00"
define void @panel_utils_yesno_str(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i8*, i8** %3
%9 = call i32 @sprintf(i8* %8, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
br label %13
10: ; preds = %2
%11 = load i8*, i8** %3
%12 = call i32 @sprintf(i8* %11, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
br label %13
13: ; preds = %10, %7
ret void
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"NO\00"
define void @panel_utils_yesno_str(i8* nocapture writeonly %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = bitcast i8* %0 to i32*
store i32 5457241, i32* %5
br label %7
6: ; preds = %2
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 dereferenceable(3) %0, i8* align 1 dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i64 3, i1 false)
br label %7
7: ; preds = %6, %4
ret void
}
/* Variables and functions */
scalar_t__ strcmp(char *, char *);
int cmp(char *s1, char *s2) {
  if (strcmp(s1, s2) == 0)
    return (1);
  return (0);
}


x86 assembly (clang, -O0):
<cmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1143 <cmp+0x33>
movl   $0x1,-0x4(%rbp)
jmp    114a <cmp+0x3a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp>:
push   %rax
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @cmp(i8* %0, i8* %1) {
%3 = tail call i64 @strcmp(i8* %0, i8* %1)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ bf_write(char *, int, int);
void bf_set(char *b, int nr) { bf_write(b, nr, 1); }


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

x86 assembly (clang, -O2):
<bf_set>:
mov    $0x1,%edx
jmp    1030 <bf_write@plt>

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

LLVM IR (-O2):
define void @bf_set(i8* %0, i32 %1) {
%3 = tail call i32 @bf_write(i8* %0, i32 %1, i32 1)
ret void
}
void g_signal_type_cclosure_new() {}


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

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

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

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