xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int int64_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
float stdlib_strided_smeankbn2(int, float *, int);
int main() {
  float x[] = {1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0};
  int64_t N = 4;
  int64_t stride = 2;
  float v = stdlib_strided_smeankbn2(N, x, stride);
  printf("mean: %f\n", v);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0xed1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xece(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xecb(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xec8(%rip),%rax
mov    %rax,-0x8(%rbp)
movl   $0x4,-0x24(%rbp)
movl   $0x2,-0x28(%rbp)
mov    -0x24(%rbp),%edi
lea    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%edx
call   1040 <stdlib_strided_smeankbn2@plt>
movss  %xmm0,-0x2c(%rbp)
movss  -0x2c(%rbp),%xmm0
lea    0xe9e(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
movaps 0xee5(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xec9(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rsi
mov    $0x4,%edi
mov    $0x2,%edx
call   1040 <stdlib_strided_smeankbn2@plt>
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.main.x = [8 x float] [float 1.000000e+00, float 2.000000e+00, float 3.000000e+00, float 4.000000e+00, float 5.000000e+00, float 6.000000e+00, float 7.000000e+00, float 8.000000e+00]
@.str = [10 x i8] c"mean: %f\0A\00"
define i32 @main() {
%1 = alloca [8 x float]
%2 = alloca i32
%3 = alloca i32
%4 = alloca float
%5 = bitcast [8 x float]* %1 to i8*
store i32 4, i32* %2
store i32 2, i32* %3
%6 = load i32, i32* %2
%7 = getelementptr inbounds [8 x float], [8 x float]* %1, i64 0, i64 0
%8 = load i32, i32* %3
%9 = call float @stdlib_strided_smeankbn2(i32 %6, float* %7, i32 %8)
store float %9, float* %4
%10 = load float, float* %4
%11 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), float %10)
ret i32 0
}

LLVM IR (-O2):
@__const.main.x = [8 x float] [float 1.000000e+00, float 2.000000e+00, float 3.000000e+00, float 4.000000e+00, float 5.000000e+00, float 6.000000e+00, float 7.000000e+00, float 8.000000e+00]
@.str = [10 x i8] c"mean: %f\0A\00"
define i32 @main() {
%1 = alloca [8 x float]
%2 = bitcast [8 x float]* %1 to i8*
%3 = getelementptr inbounds [8 x float], [8 x float]* %1, i64 0, i64 0
%4 = call float @stdlib_strided_smeankbn2(i32 4, float* %3, i32 2)
%5 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), float %4)
ret i32 0
}
void av_shr_i() {}


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

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

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

LLVM IR (-O2):
define void @av_shr_i() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ drawBuffer(int /*<<< orphan*/, unsigned int, unsigned int);
int /*<<< orphan*/ getCharBuffer(char, unsigned int, unsigned int);
void drawChar(unsigned int x, unsigned int y, char chr, unsigned int bgcolor,
              unsigned int color) {
  drawBuffer(getCharBuffer(chr, bgcolor, color), x, y);
}


x86 assembly (clang, -O0):
<drawChar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dl,%al
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    -0x9(%rbp),%al
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
movsbl %al,%edi
call   1040 <getCharBuffer@plt>
mov    %eax,%edi
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
call   1030 <drawBuffer@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<drawChar>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    %edx,%edi
mov    %ecx,%esi
mov    %r8d,%edx
call   1040 <getCharBuffer@plt>
mov    %eax,%edi
mov    %ebp,%esi
mov    %ebx,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <drawBuffer@plt>

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

LLVM IR (-O2):
define void @drawChar(i32 %0, i32 %1, i8 signext %2, i32 %3, i32 %4) {
%6 = tail call i32 @getCharBuffer(i8 signext %2, i32 %3, i32 %4)
%7 = tail call i32 @drawBuffer(i32 %6, i32 %0, i32 %1)
ret void
}
/* Variables and functions */
void *realloc(void *, size_t);
void *b(void *e, size_t f, size_t g) {
  void *d = realloc(e, g);
  return d;
}


x86 assembly (clang, -O0):
<b>:
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    -0x18(%rbp),%rsi
call   1030 <realloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<b>:
mov    %rdx,%rsi
jmp    1030 <realloc@plt>

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

LLVM IR (-O2):
define noalias i8* @b(i8* nocapture %0, i64 %1, i64 %2) {
%4 = tail call i8* @realloc(i8* %0, i64 %2)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void printDifference(int n, double x) {
  printf("printDifference says %f.\n", n - x);
}


x86 assembly (clang, -O0):
<printDifference>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movsd  %xmm0,-0x10(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
cvttsd2si %xmm0,%esi
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printDifference>:
cvtsi2sd %edi,%xmm1
subsd  %xmm0,%xmm1
cvttsd2si %xmm1,%esi
lea    0xedd(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"printDifference says %f.\0A\00"
define void @printDifference(i32 %0, double %1) {
%3 = alloca i32
%4 = alloca double
store i32 %0, i32* %3
store double %1, double* %4
%5 = load i32, i32* %3
%6 = sitofp i32 %5 to double
%7 = load double, double* %4
%8 = fsub double %6, %7
%9 = fptosi double %8 to i32
%10 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %9)
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"printDifference says %f.\0A\00"
define void @printDifference(i32 %0, double %1) {
%3 = sitofp i32 %0 to double
%4 = fsub double %3, %1
%5 = fptosi double %4 to i32
%6 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ mpgdecoder_close(void *);
void default_mpgdecoder_close(void *ctx) { mpgdecoder_close(ctx); }


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

x86 assembly (clang, -O2):
<default_mpgdecoder_close>:
jmp    1030 <mpgdecoder_close@plt>

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

LLVM IR (-O2):
define void @default_mpgdecoder_close(i8* %0) {
%2 = tail call i32 @mpgdecoder_close(i8* %0)
ret void
}
void permuttation(char *data) {
  unsigned char t1 = (*data) & 0xF0;
  unsigned char t2 = (*data) & 0x0F;
  (*data) = ((t1 >> 4) & 0x0F) | (t2 << 4);
}


x86 assembly (clang, -O0):
<permuttation>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
and    $0xf0,%eax
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
and    $0xf,%eax
mov    %al,-0xa(%rbp)
movzbl -0x9(%rbp),%eax
sar    $0x4,%eax
and    $0xf,%eax
movzbl -0xa(%rbp),%ecx
shl    $0x4,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<permuttation>:
rolb   $0x4,(%rdi)
ret

LLVM IR (-O0):
define void @permuttation(i8* %0) {
%2 = alloca i8*
%3 = alloca i8
%4 = alloca i8
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = and i32 %7, 240
%9 = trunc i32 %8 to i8
store i8 %9, i8* %3
%10 = load i8*, i8** %2
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = and i32 %12, 15
%14 = trunc i32 %13 to i8
store i8 %14, i8* %4
%15 = load i8, i8* %3
%16 = zext i8 %15 to i32
%17 = ashr i32 %16, 4
%18 = and i32 %17, 15
%19 = load i8, i8* %4
%20 = zext i8 %19 to i32
%21 = shl i32 %20, 4
%22 = or i32 %18, %21
%23 = trunc i32 %22 to i8
%24 = load i8*, i8** %2
store i8 %23, i8* %24
ret void
}

LLVM IR (-O2):
define void @permuttation(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = tail call i8 @llvm.fshl.i8(i8 %2, i8 %2, i8 4)
store i8 %3, i8* %0
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t tr_isBool(uint8_t b) { return b == 1 || b == 0; }


x86 assembly (clang, -O0):
<tr_isBool>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x1,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     1120 <tr_isBool+0x20>
cmpl   $0x0,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tr_isBool>:
xor    %eax,%eax
cmp    $0x2,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @tr_isBool(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 1
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 0
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ true, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @tr_isBool(i32 %0) {
%2 = icmp ult i32 %0, 2
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void foo2() {
  printf("foo2 in lib\n");
  return;
}


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

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

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

LLVM IR (-O2):
@str = [12 x i8] c"foo2 in lib\00"
define void @foo2() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct winsize {
  int ws_row;
};

/* Variables and functions */
int /*<<< orphan*/ STDOUT_FILENO;
int /*<<< orphan*/ TIOCGWINSZ;
int ioctl(int /*<<< orphan*/, int /*<<< orphan*/, struct winsize *);
int get_win_height(void) {
  struct winsize win;
  int rows = 3600 * 24;
  if (ioctl(STDOUT_FILENO, TIOCGWINSZ, &win) != -1) {
    if (win.ws_row > 2) {
      rows = win.ws_row - 2;
    }
  }
  return rows;
}


x86 assembly (clang, -O0):
<get_win_height>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x15180,-0xc(%rbp)
mov    0x2eca(%rip),%rax
mov    (%rax),%edi
mov    0x2ea1(%rip),%rax
mov    (%rax),%esi
lea    -0x8(%rbp),%rdx
call   1030 <ioctl@plt>
cmp    $0xffffffff,%eax
je     115b <get_win_height+0x4b>
cmpl   $0x2,-0x8(%rbp)
jle    1156 <get_win_height+0x46>
mov    -0x8(%rbp),%eax
sub    $0x2,%eax
mov    %eax,-0xc(%rbp)
jmp    115b <get_win_height+0x4b>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_win_height>:
push   %rax
mov    0x2ed8(%rip),%rax
mov    (%rax),%edi
mov    0x2eaf(%rip),%rax
mov    (%rax),%esi
mov    %rsp,%rdx
call   1030 <ioctl@plt>
mov    (%rsp),%edx
lea    -0x2(%rdx),%ecx
cmp    $0x3,%edx
mov    $0x15180,%edx
cmovl  %edx,%ecx
cmp    $0xffffffff,%eax
cmove  %edx,%ecx
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.winsize = type { i32 }
@STDOUT_FILENO = global i32 0
@TIOCGWINSZ = global i32 0
define i32 @get_win_height() {
%1 = alloca %struct.winsize
%2 = alloca i32
store i32 86400, i32* %2
%3 = load i32, i32* @STDOUT_FILENO
%4 = load i32, i32* @TIOCGWINSZ
%5 = call i32 @ioctl(i32 %3, i32 %4, %struct.winsize* %1)
%6 = icmp ne i32 %5, -1
br i1 %6, label %7, label %16
7: ; preds = %0
%8 = getelementptr inbounds %struct.winsize, %struct.winsize* %1, i32 0, i32 0
%9 = load i32, i32* %8
%10 = icmp sgt i32 %9, 2
br i1 %10, label %11, label %15
11: ; preds = %7
%12 = getelementptr inbounds %struct.winsize, %struct.winsize* %1, i32 0, i32 0
%13 = load i32, i32* %12
%14 = sub nsw i32 %13, 2
store i32 %14, i32* %2
br label %15
15: ; preds = %11, %7
br label %16
16: ; preds = %15, %0
%17 = load i32, i32* %2
ret i32 %17
}

LLVM IR (-O2):
%struct.winsize = type { i32 }
@STDOUT_FILENO = global i32 0
@TIOCGWINSZ = global i32 0
define i32 @get_win_height() {
%1 = alloca %struct.winsize
%2 = bitcast %struct.winsize* %1 to i8*
%3 = load i32, i32* @STDOUT_FILENO
%4 = load i32, i32* @TIOCGWINSZ
%5 = call i32 @ioctl(i32 %3, i32 %4, %struct.winsize* %1)
%6 = icmp ne i32 %5, -1
%7 = getelementptr inbounds %struct.winsize, %struct.winsize* %1, i64 0, i32 0
%8 = load i32, i32* %7
%9 = icmp sgt i32 %8, 2
%10 = select i1 %6, i1 %9, i1 false
%11 = add nsw i32 %8, -2
%12 = select i1 %10, i32 %11, i32 86400
ret i32 %12
}
void func2(int *val) {
  const void *const labels[] = {&&a, &&b, &&c, &&d};
  goto *labels[2];
a:
  a(val);
b:
  b(val);
c:
  c(val);
d:
  d(val);
}


x86 assembly (clang, -O0):
<func2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2cad(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0x2caa(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0x2ca7(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0x2ca4(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x38(%rbp)
jmp    11b7 <func2+0x77>
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1060 <a@plt>
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1040 <b@plt>
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1050 <c@plt>
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1030 <d@plt>
add    $0x40,%rsp
pop    %rbp
ret
mov    -0x38(%rbp),%rax
jmp    *%rax

x86 assembly (clang, -O2):
<func2>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <c@plt>
mov    %rbx,%rdi
xor    %eax,%eax
pop    %rbx
jmp    1030 <d@plt>

LLVM IR (-O0):
@__const.func2.labels = [4 x i8*] [i8* blockaddress(@func2, %7), i8* blockaddress(@func2, %10), i8* blockaddress(@func2, %13), i8* blockaddress(@func2, %16)]
define void @func2(i32* %0) {
%2 = alloca i32*
%3 = alloca [4 x i8*]
store i32* %0, i32** %2
%4 = bitcast [4 x i8*]* %3 to i8*
%5 = getelementptr inbounds [4 x i8*], [4 x i8*]* %3, i64 0, i64 2
%6 = load i8*, i8** %5
br label %19
7: ; preds = %19
%8 = load i32*, i32** %2
%9 = call i32 (i32*, ...) bitcast (i32 (...)* @a to i32 (i32*, ...)*)(i32* %8)
br label %10
10: ; preds = %7, %19
%11 = load i32*, i32** %2
%12 = call i32 (i32*, ...) bitcast (i32 (...)* @b to i32 (i32*, ...)*)(i32* %11)
br label %13
13: ; preds = %10, %19
%14 = load i32*, i32** %2
%15 = call i32 (i32*, ...) bitcast (i32 (...)* @c to i32 (i32*, ...)*)(i32* %14)
br label %16
16: ; preds = %13, %19
%17 = load i32*, i32** %2
%18 = call i32 (i32*, ...) bitcast (i32 (...)* @d to i32 (i32*, ...)*)(i32* %17)
ret void
19: ; preds = %1
%20 = phi i8* [ %6, %1 ]
indirectbr i8* %20, [label %7, label %10, label %13, label %16]
}

LLVM IR (-O2):
define void @func2(i32* %0) {
%2 = tail call i32 (i32*, ...) bitcast (i32 (...)* @c to i32 (i32*, ...)*)(i32* %0)
%3 = tail call i32 (i32*, ...) bitcast (i32 (...)* @d to i32 (i32*, ...)*)(i32* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ debug(char *, ...);
int G56_f(char *s) {
  debug("G56_f(const char *s) is not yet implemented!\n");
  debug("%s\n", s);
  return 1;
}


x86 assembly (clang, -O0):
<G56_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    -0x8(%rbp),%rsi
lea    0xef9(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<G56_f>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
xor    %eax,%eax
call   1030 <debug@plt>
lea    0xf05(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <debug@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [46 x i8] c"G56_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @G56_f(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 1
}

LLVM IR (-O2):
@.str = [46 x i8] c"G56_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @G56_f(i8* %0) {
%2 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ init_bss();
void _c_reset(void) {
  init_bss();
  while (1)
    ;
}


x86 assembly (clang, -O0):
<_c_reset>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <init_bss@plt>
jmp    111b <_c_reset+0xb>

x86 assembly (clang, -O2):
<_c_reset>:
push   %rax
xor    %eax,%eax
call   1030 <init_bss@plt>
nopl   0x0(%rax,%rax,1)
jmp    1120 <_c_reset+0x10>

LLVM IR (-O0):
define void @_c_reset() {
%1 = call i32 (...) @init_bss()
br label %2
2: ; preds = %0, %2
br label %2
}

LLVM IR (-O2):
define void @_c_reset() {
%1 = tail call i32 (...) @init_bss()
br label %2
2: ; preds = %0, %2
br label %2
}
void set_bit(unsigned int *bitmap, const int bitn) {
  bitmap[bitn >> 5] |= (1 << (bitn & 0x1F));
}


x86 assembly (clang, -O0):
<set_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
and    $0x1f,%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sar    $0x5,%ecx
movslq %ecx,%rcx
or     (%rax,%rcx,4),%edx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_bit>:
mov    %esi,%ecx
mov    $0x1,%eax
shl    %cl,%eax
sar    $0x5,%ecx
movslq %ecx,%rcx
or     %eax,(%rdi,%rcx,4)
ret

LLVM IR (-O0):
define void @set_bit(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 = and i32 %5, 31
%7 = shl i32 1, %6
%8 = load i32*, i32** %3
%9 = load i32, i32* %4
%10 = ashr i32 %9, 5
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i32, i32* %8, i64 %11
%13 = load i32, i32* %12
%14 = or i32 %13, %7
store i32 %14, i32* %12
ret void
}

LLVM IR (-O2):
define void @set_bit(i32* nocapture %0, i32 %1) {
%3 = and i32 %1, 31
%4 = shl nuw i32 1, %3
%5 = ashr i32 %1, 5
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds i32, i32* %0, i64 %6
%8 = load i32, i32* %7
%9 = or i32 %8, %4
store i32 %9, i32* %7
ret void
}
void __attribute__((weak)) user_tick(void) {}


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

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

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

LLVM IR (-O2):
define weak void @user_tick() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int number;
  printf("Enter a number: ");
  scanf("%d", &number);
  printf("You entered: %d\n", number);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xedb(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%esi
lea    0xec9(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [17 x i8] c"Enter a number: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [17 x i8] c"You entered: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ pixel_avg_wxh(int /*<<< orphan*/ *, int,
                                 int /*<<< orphan*/ *, int, int, int);
void pixel_avg_4x4(uint8_t *pix1, int i_stride_pix1, uint8_t *pix2,
                   int i_stride_pix2) {
  pixel_avg_wxh(pix1, i_stride_pix1, pix2, i_stride_pix2, 4, 4);
}


x86 assembly (clang, -O0):
<pixel_avg_4x4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    $0x4,%r9d
mov    %r9d,%r8d
call   1030 <pixel_avg_wxh@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pixel_avg_4x4>:
mov    $0x4,%r8d
mov    $0x4,%r9d
jmp    1030 <pixel_avg_wxh@plt>

LLVM IR (-O0):
define void @pixel_avg_4x4(i32* %0, i32 %1, i32* %2, i32 %3) {
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i32*
%8 = alloca i32
store i32* %0, i32** %5
store i32 %1, i32* %6
store i32* %2, i32** %7
store i32 %3, i32* %8
%9 = load i32*, i32** %5
%10 = load i32, i32* %6
%11 = load i32*, i32** %7
%12 = load i32, i32* %8
%13 = call i32 @pixel_avg_wxh(i32* %9, i32 %10, i32* %11, i32 %12, i32 4, i32 4)
ret void
}

LLVM IR (-O2):
define void @pixel_avg_4x4(i32* %0, i32 %1, i32* %2, i32 %3) {
%5 = tail call i32 @pixel_avg_wxh(i32* %0, i32 %1, i32* %2, i32 %3, i32 4, i32 4)
ret void
}
/* Variables and functions */
void *__coverity_alloc__(int);
int /*<<< orphan*/ __coverity_mark_as_afm_allocated__(void *, char *);
void *H5Gcreate2(void *loc_id, const char *name, void *lcpl_id, void *gcpl_id,
                 void *gapl_id) {
  void *id = __coverity_alloc__(10);
  __coverity_mark_as_afm_allocated__(id, "H5Gclose");
  return id;
}


x86 assembly (clang, -O0):
<H5Gcreate2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    $0xa,%edi
call   1040 <__coverity_alloc__@plt>
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rdi
lea    0xeab(%rip),%rsi
call   1030 <__coverity_mark_as_afm_allocated__@plt>
mov    -0x30(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<H5Gcreate2>:
push   %rbx
mov    $0xa,%edi
call   1040 <__coverity_alloc__@plt>
mov    %rax,%rbx
lea    0xecb(%rip),%rsi
mov    %rax,%rdi
call   1030 <__coverity_mark_as_afm_allocated__@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [9 x i8] c"H5Gclose\00"
define i8* @H5Gcreate2(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2, i8* nocapture readnone %3, i8* nocapture readnone %4) {
%6 = tail call i8* @__coverity_alloc__(i32 10)
%7 = tail call i32 @__coverity_mark_as_afm_allocated__(i8* %6, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret i8* %6
}
char escape_char(char c) {
  switch (c) {
  case 't':
    return '\t';
  case 'n':
    return '\n';
  default:
    return (c);
  }
}


x86 assembly (clang, -O0):
<escape_char>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
mov    %eax,-0x8(%rbp)
sub    $0x6e,%eax
je     1139 <escape_char+0x39>
jmp    111f <escape_char+0x1f>
mov    -0x8(%rbp),%eax
sub    $0x74,%eax
jne    1142 <escape_char+0x42>
jmp    1130 <escape_char+0x30>
movb   $0x9,-0x1(%rbp)
jmp    1148 <escape_char+0x48>
movb   $0xa,-0x1(%rbp)
jmp    1148 <escape_char+0x48>
mov    -0x2(%rbp),%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<escape_char>:
cmp    $0x74,%edi
je     110f <escape_char+0xf>
mov    %edi,%eax
cmp    $0x6e,%edi
jne    110e <escape_char+0xe>
mov    $0xa,%al
ret
mov    $0x9,%al
ret

LLVM IR (-O0):
define signext i8 @escape_char(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
switch i32 %5, label %8 [
i32 116, label %6
i32 110, label %7
]
6: ; preds = %1
store i8 9, i8* %2
br label %10
7: ; preds = %1
store i8 10, i8* %2
br label %10
8: ; preds = %1
%9 = load i8, i8* %3
store i8 %9, i8* %2
br label %10
10: ; preds = %8, %7, %6
%11 = load i8, i8* %2
ret i8 %11
}

LLVM IR (-O2):
define signext i8 @escape_char(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %4 [
i32 116, label %5
i32 110, label %3
]
3: ; preds = %1
br label %5
4: ; preds = %1
br label %5
5: ; preds = %1, %4, %3
%6 = phi i8 [ %0, %4 ], [ 10, %3 ], [ 9, %1 ]
ret i8 %6
}
OP(dd, b0) {
  illegal_1();
  op_b0();
}


x86 assembly (clang, -O0):
<OP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1030 <illegal_1@plt>
mov    $0x0,%al
call   1040 <op_b0@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @illegal_1()
%4 = tail call i32 (...) @op_b0()
ret i32 undef
}
BLK(n) int n;
{
  int i = 1;
  while (i <= n) {
    printf(" ");
    i++;
  }
}


x86 assembly (clang, -O0):
<BLK>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     114a <BLK+0x3a>
lea    0xecb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1122 <BLK+0x12>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BLK>:
push   %rbx
test   %edi,%edi
jle    112f <BLK+0x1f>
mov    %edi,%ebx
nopw   0x0(%rax,%rax,1)
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1120 <BLK+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @BLK(i32 %0) {
%2 = icmp slt i32 %0, 1
br i1 %2, label %8, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 1, %1 ]
%5 = tail call i32 @putchar(i32 32)
%6 = add nuw i32 %4, 1
%7 = icmp eq i32 %4, %0
br i1 %7, label %8, label %3
8: ; preds = %3, %1
ret i32 undef
}
void __attribute__((fastcall)) test2(int a, ...) {}


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

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

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

LLVM IR (-O2):
define void @test2(i32 %0, ...) {
ret void
}
/* Variables and functions */
scalar_t__ strpbrk(char const *, char *);
int UserIsNameValid(const char *strName) {
  ;
  if (!strName)
    return 0;
  if (!*strName || strpbrk(strName, "!~@ "))
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<UserIsNameValid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1133 <UserIsNameValid+0x23>
movl   $0x0,-0x4(%rbp)
jmp    116d <UserIsNameValid+0x5d>
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     115a <UserIsNameValid+0x4a>
mov    -0x10(%rbp),%rdi
lea    0xeb5(%rip),%rsi
call   1030 <strpbrk@plt>
cmp    $0x0,%rax
je     1166 <UserIsNameValid+0x56>
movl   $0x0,-0x4(%rbp)
jmp    116d <UserIsNameValid+0x5d>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UserIsNameValid>:
push   %rax
xor    %eax,%eax
test   %rdi,%rdi
je     1134 <UserIsNameValid+0x24>
cmpb   $0x0,(%rdi)
je     1134 <UserIsNameValid+0x24>
lea    0xedc(%rip),%rsi
call   1030 <strpbrk@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
pop    %rcx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"!~@ \00"
define i32 @UserIsNameValid(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = icmp ne i8* %4, null
br i1 %5, label %7, label %6
6: ; preds = %1
store i32 0, i32* %2
br label %17
7: ; preds = %1
%8 = load i8*, i8** %3
%9 = load i8, i8* %8
%10 = icmp ne i8 %9, 0
br i1 %10, label %11, label %15
11: ; preds = %7
%12 = load i8*, i8** %3
%13 = call i64 @strpbrk(i8* %12, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%14 = icmp ne i64 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %11, %7
store i32 0, i32* %2
br label %17
16: ; preds = %11
store i32 1, i32* %2
br label %17
17: ; preds = %16, %15, %6
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
@.str = [5 x i8] c"!~@ \00"
define i32 @UserIsNameValid(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %10, label %3
3: ; preds = %1
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %3
%7 = tail call i64 @strpbrk(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %6, %3, %1
%11 = phi i32 [ 0, %1 ], [ 0, %3 ], [ %9, %6 ]
ret i32 %11
}
int cairo_code_draw_ivoryDial_get_height() { return 91; }


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

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

LLVM IR (-O0):
define i32 @cairo_code_draw_ivoryDial_get_height() {
ret i32 91
}

LLVM IR (-O2):
define i32 @cairo_code_draw_ivoryDial_get_height() {
ret i32 91
}
void RandomFunc(unsigned short input[1], unsigned short output[1]) {
  unsigned short state[1];
  unsigned short local1;
  {
    state[0UL] = (input[0UL] - 51238316UL) - (unsigned short)47038;
    local1 = 0UL;
    while (local1 < input[1UL]) {
      local1++;
    }
    output[0UL] = ((state[0UL] << (unsigned short)1) |
                   (state[0UL] >> (unsigned short)15)) ^
                  (unsigned short)57088;
  }
}


x86 assembly (clang, -O0):
<RandomFunc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movzwl (%rax),%eax
sub    $0x30dd5ac,%rax
sub    $0xb7be,%rax
mov    %ax,-0x12(%rbp)
movw   $0x0,-0x14(%rbp)
movzwl -0x14(%rbp),%eax
mov    -0x8(%rbp),%rcx
movzwl 0x2(%rcx),%ecx
cmp    %ecx,%eax
jge    114e <RandomFunc+0x4e>
mov    -0x14(%rbp),%ax
add    $0x1,%ax
mov    %ax,-0x14(%rbp)
jmp    1129 <RandomFunc+0x29>
movzwl -0x12(%rbp),%eax
shl    $0x1,%eax
movzwl -0x12(%rbp),%ecx
sar    $0xf,%ecx
or     %ecx,%eax
xor    $0xdf00,%eax
mov    %ax,%cx
mov    -0x10(%rbp),%rax
mov    %cx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<RandomFunc>:
movzwl (%rdi),%eax
add    $0x7296,%eax
rol    %ax
xor    $0xdf00,%eax
mov    %ax,(%rsi)
ret

LLVM IR (-O0):
define void @RandomFunc(i16* %0, i16* %1) {
%3 = alloca i16*
%4 = alloca i16*
%5 = alloca [1 x i16]
%6 = alloca i16
store i16* %0, i16** %3
store i16* %1, i16** %4
%7 = load i16*, i16** %3
%8 = getelementptr inbounds i16, i16* %7, i64 0
%9 = load i16, i16* %8
%10 = zext i16 %9 to i64
%11 = sub i64 %10, 51238316
%12 = sub i64 %11, 47038
%13 = trunc i64 %12 to i16
%14 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 0
store i16 %13, i16* %14
store i16 0, i16* %6
br label %15
15: ; preds = %23, %2
%16 = load i16, i16* %6
%17 = zext i16 %16 to i32
%18 = load i16*, i16** %3
%19 = getelementptr inbounds i16, i16* %18, i64 1
%20 = load i16, i16* %19
%21 = zext i16 %20 to i32
%22 = icmp slt i32 %17, %21
br i1 %22, label %23, label %26
23: ; preds = %15
%24 = load i16, i16* %6
%25 = add i16 %24, 1
store i16 %25, i16* %6
br label %15
26: ; preds = %15
%27 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 0
%28 = load i16, i16* %27
%29 = zext i16 %28 to i32
%30 = shl i32 %29, 1
%31 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 0
%32 = load i16, i16* %31
%33 = zext i16 %32 to i32
%34 = ashr i32 %33, 15
%35 = or i32 %30, %34
%36 = xor i32 %35, 57088
%37 = trunc i32 %36 to i16
%38 = load i16*, i16** %4
%39 = getelementptr inbounds i16, i16* %38, i64 0
store i16 %37, i16* %39
ret void
}

LLVM IR (-O2):
define void @RandomFunc(i16* nocapture %0, i16* nocapture writeonly %1) {
%3 = load i16, i16* %0
%4 = add i16 %3, 29334
%5 = tail call i16 @llvm.fshl.i16(i16 %4, i16 %4, i16 1)
%6 = xor i16 %5, -8448
store i16 %6, i16* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr,
          "usage: c89 [-cEgOs] [-D name[=value]] ... [-I directory] ... [-L "
          "directory] ...\n"
          "           [-o outfile] [-U name] ... operand ...\n"
          "\n"
          "       where operand is one or more of file.c, file.o, file.a\n"
          "       or -llibrary\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [214 x i8] c"usage: c89 [-cEgOs] [-D name[=value]] ... [-I directory] ... [-L directory] ...\0A [-o outfile] [-U name] ... operand ...\0A\0A where operand is one or more of file.c, file.o, file.a\0A or -llibrary\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([214 x i8], [214 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [214 x i8] c"usage: c89 [-cEgOs] [-D name[=value]] ... [-I directory] ... [-L directory] ...\0A [-o outfile] [-U name] ... operand ...\0A\0A where operand is one or more of file.c, file.o, file.a\0A or -llibrary\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([214 x i8], [214 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
int execute_fchownat() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_fchownat() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_hashmap_put() {
  printf("NOT IMPLEMENTED:"
         "pa_hashmap_put"
         "\n");
}


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

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

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

LLVM IR (-O2):
@str = [31 x i8] c"NOT IMPLEMENTED:pa_hashmap_put\00"
define i32 @pa_hashmap_put() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
int util_cputime(double *user_time, double *system_time) {
  *user_time = 0;
  *system_time = 0;
  return (0);
}


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

x86 assembly (clang, -O2):
<util_cputime>:
movq   $0x0,(%rdi)
movq   $0x0,(%rsi)
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @util_cputime(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
store double* %0, double** %3
store double* %1, double** %4
%5 = load double*, double** %3
store double 0.000000e+00, double* %5
%6 = load double*, double** %4
store double 0.000000e+00, double* %6
ret i32 0
}

LLVM IR (-O2):
define i32 @util_cputime(double* nocapture writeonly %0, double* nocapture writeonly %1) {
store double 0.000000e+00, double* %0
store double 0.000000e+00, double* %1
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ COLOR_PAIR(int);
int /*<<< orphan*/ attroff(int /*<<< orphan*/);
int /*<<< orphan*/ attron(int /*<<< orphan*/);
int /*<<< orphan*/ mvprintw(int /*<<< orphan*/, int /*<<< orphan*/, char *, int,
                            int);
void space_warning() {
  attron(COLOR_PAIR(300));
  mvprintw(
      0, 0,
      "The space is not big enough to play this game. You need at least %dx%d.",
      48, 12);
  attroff(COLOR_PAIR(300));
}


x86 assembly (clang, -O0):
<space_warning>:
push   %rbp
mov    %rsp,%rbp
mov    $0x12c,%edi
call   1050 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1040 <attron@plt>
xor    %esi,%esi
lea    0xea2(%rip),%rdx
mov    $0x30,%ecx
mov    $0xc,%r8d
mov    %esi,%edi
call   1060 <mvprintw@plt>
mov    $0x12c,%edi
call   1050 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1030 <attroff@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<space_warning>:
push   %rax
mov    $0x12c,%edi
call   1050 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1040 <attron@plt>
lea    0xea7(%rip),%rdx
xor    %edi,%edi
xor    %esi,%esi
mov    $0x30,%ecx
mov    $0xc,%r8d
call   1060 <mvprintw@plt>
mov    $0x12c,%edi
call   1050 <COLOR_PAIR@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <attroff@plt>

LLVM IR (-O0):
@.str = [72 x i8] c"The space is not big enough to play this game. You need at least %dx%d.\00"
define void @space_warning() {
%1 = call i32 @COLOR_PAIR(i32 300)
%2 = call i32 @attron(i32 %1)
%3 = call i32 @mvprintw(i32 0, i32 0, i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str, i64 0, i64 0), i32 48, i32 12)
%4 = call i32 @COLOR_PAIR(i32 300)
%5 = call i32 @attroff(i32 %4)
ret void
}

LLVM IR (-O2):
@.str = [72 x i8] c"The space is not big enough to play this game. You need at least %dx%d.\00"
define void @space_warning() {
%1 = tail call i32 @COLOR_PAIR(i32 300)
%2 = tail call i32 @attron(i32 %1)
%3 = tail call i32 @mvprintw(i32 0, i32 0, i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str, i64 0, i64 0), i32 48, i32 12)
%4 = tail call i32 @COLOR_PAIR(i32 300)
%5 = tail call i32 @attroff(i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isbdigit(int);
void t_isbdigit_0x0d() {
  Assert_real((isbdigit(13) == 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_isbdigit.c",
              70, ("isbdigit should be 0 for 0x0d"));
}


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

x86 assembly (clang, -O2):
<t_isbdigit_0x0d>:
push   %rax
mov    $0xd,%edi
call   1040 <isbdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x46,%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_isbdigit.c\00"
@.str.1 = [30 x i8] c"isbdigit should be 0 for 0x0d\00"
define void @t_isbdigit_0x0d() {
%1 = call i64 @isbdigit(i32 13)
%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 70, i8* getelementptr inbounds ([30 x i8], [30 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_isbdigit.c\00"
@.str.1 = [30 x i8] c"isbdigit should be 0 for 0x0d\00"
define void @t_isbdigit_0x0d() {
%1 = tail call i64 @isbdigit(i32 13)
%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 70, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "usage: colcrt [-] [-2] [file ...]\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [35 x i8] c"usage: colcrt [-] [-2] [file ...]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [35 x i8] c"usage: colcrt [-] [-2] [file ...]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
double tanh(double const);
double tanh_activate(const double x) { return tanh(x); }


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

x86 assembly (clang, -O2):
<tanh_activate>:
jmp    1030 <tanh@plt>

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

LLVM IR (-O2):
define double @tanh_activate(double %0) {
%2 = tail call double @tanh(double %0)
ret double %2
}
/* Type definitions */
typedef size_t ssize_t;

/* Variables and functions */
ssize_t len(const char *str) {
  ssize_t i;
  i = 0;
  if ((str)) {
    while (str[i] != '\0')
      i++;
    return (i);
  }
  return (0);
}


x86 assembly (clang, -O0):
<len>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1153 <len+0x53>
jmp    1120 <len+0x20>
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1146 <len+0x46>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1120 <len+0x20>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    115b <len+0x5b>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<len>:
test   %rdi,%rdi
je     111f <len+0x1f>
mov    $0xffffffffffffffff,%rcx
nopl   0x0(%rax)
lea    0x1(%rcx),%rax
cmpb   $0x0,0x1(%rdi,%rcx,1)
mov    %rax,%rcx
jne    1110 <len+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i64 @len(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i64 [ %8, %3 ], [ 0, %1 ]
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
%8 = add i64 %4, 1
br i1 %7, label %9, label %3
9: ; preds = %3, %1
%10 = phi i64 [ 0, %1 ], [ %4, %3 ]
ret i64 %10
}