xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int /*<<< orphan*/ free(void *);
void *realloc(void *, size_t);
void *enca_realloc(void *ptr, size_t size) {
  if (size == 0) {
    free(ptr);
    return NULL;
  }
  ptr = realloc(ptr, size);
  assert(ptr != NULL);
  return ptr;
}


x86 assembly (clang, -O0):
<enca_realloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1161 <enca_realloc+0x31>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
movq   $0x0,-0x8(%rbp)
jmp    118c <enca_realloc+0x5c>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1050 <realloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<enca_realloc>:
push   %rbx
test   %rsi,%rsi
je     114e <enca_realloc+0x1e>
call   1050 <realloc@plt>
mov    %rax,%rbx
xor    %edi,%edi
test   %rax,%rax
setne  %dil
call   1040 <assert@plt>
jmp    1155 <enca_realloc+0x25>
call   1030 <free@plt>
xor    %ebx,%ebx
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define noalias i8* @enca_realloc(i8* nocapture %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @free(i8* %0)
br label %11
6: ; preds = %2
%7 = tail call i8* @realloc(i8* %0, i64 %1)
%8 = icmp ne i8* %7, null
%9 = zext i1 %8 to i32
%10 = tail call i32 @assert(i32 %9)
br label %11
11: ; preds = %6, %4
%12 = phi i8* [ null, %4 ], [ %7, %6 ]
ret i8* %12
}
/* Variables and functions */
double sumWeigtedInputs(int const, double const *, double const *);
double _step(const int numInputs, const double *inputs,
             const double *connectionWeights) {
  double weightedInputSum;
  double out;
  weightedInputSum = sumWeigtedInputs(numInputs, inputs, connectionWeights);
  if (weightedInputSum < 0) {
    out = 0;
  } else {
    out = 1;
  }
  return out;
}


x86 assembly (clang, -O0):
<_step>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <sumWeigtedInputs@plt>
movsd  %xmm0,-0x20(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x20(%rbp),%xmm0
jbe    1153 <_step+0x43>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x28(%rbp)
jmp    1160 <_step+0x50>
movsd  0xea5(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_step>:
push   %rax
call   1030 <sumWeigtedInputs@plt>
xorpd  %xmm1,%xmm1
cmpltsd %xmm1,%xmm0
movsd  0xed9(%rip),%xmm1
andnpd %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @_step(i32 %0, double* %1, double* %2) {
%4 = alloca i32
%5 = alloca double*
%6 = alloca double*
%7 = alloca double
%8 = alloca double
store i32 %0, i32* %4
store double* %1, double** %5
store double* %2, double** %6
%9 = load i32, i32* %4
%10 = load double*, double** %5
%11 = load double*, double** %6
%12 = call double @sumWeigtedInputs(i32 %9, double* %10, double* %11)
store double %12, double* %7
%13 = load double, double* %7
%14 = fcmp olt double %13, 0.000000e+00
br i1 %14, label %15, label %16
15: ; preds = %3
store double 0.000000e+00, double* %8
br label %17
16: ; preds = %3
store double 1.000000e+00, double* %8
br label %17
17: ; preds = %16, %15
%18 = load double, double* %8
ret double %18
}

LLVM IR (-O2):
define double @_step(i32 %0, double* %1, double* %2) {
%4 = tail call double @sumWeigtedInputs(i32 %0, double* %1, double* %2)
%5 = fcmp olt double %4, 0.000000e+00
%6 = select i1 %5, double 0.000000e+00, double 1.000000e+00
ret double %6
}
char *RCSid() {
  return RCSid("$Id: geticon.c,v 1.3 2004/07/01 17:10:10 broeker Exp $");
}


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

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

LLVM IR (-O0):
@.str = [55 x i8] c"$Id: geticon.c,v 1.3 2004/07/01 17:10:10 broeker Exp $\00"
define i8* @RCSid() {
%1 = call i8* (i8*, ...) bitcast (i8* ()* @RCSid to i8* (i8*, ...)*)(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}

LLVM IR (-O2):
define noalias i8* @RCSid() {
br label %1
1: ; preds = %1, %0
br label %1
}
unsigned int assemble4le(unsigned char *p) {
  return p[0] | (p[1] << 8) | (p[2] << 16) | (p[3] << 24);
}


x86 assembly (clang, -O0):
<assemble4le>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
mov    -0x8(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x2(%rcx),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x3(%rcx),%ecx
shl    $0x18,%ecx
or     %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @assemble4le(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i32
%4 = getelementptr inbounds i8, i8* %0, i64 1
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = shl nuw nsw i32 %6, 8
%8 = or i32 %7, %3
%9 = getelementptr inbounds i8, i8* %0, i64 2
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = shl nuw nsw i32 %11, 16
%13 = or i32 %8, %12
%14 = getelementptr inbounds i8, i8* %0, i64 3
%15 = load i8, i8* %14
%16 = zext i8 %15 to i32
%17 = shl nuw i32 %16, 24
%18 = or i32 %13, %17
ret i32 %18
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0xd7() {
  Assert_real((isodigit(215) == 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",
              1080, ("isodigit should be 0 for 0xd7"));
}


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

x86 assembly (clang, -O2):
<t_isodigit_0xd7>:
push   %rax
mov    $0xd7,%edi
call   1040 <isodigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x438,%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 = [30 x i8] c"isodigit should be 0 for 0xd7\00"
define void @t_isodigit_0xd7() {
%1 = call i64 @isodigit(i32 215)
%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 1080, 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_isodigit.c\00"
@.str.1 = [30 x i8] c"isodigit should be 0 for 0xd7\00"
define void @t_isodigit_0xd7() {
%1 = tail call i64 @isodigit(i32 215)
%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 1080, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void init_read() {}


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

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

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

LLVM IR (-O2):
define void @init_read() {
ret void
}
unsigned rotateR_fun_uint(unsigned x, int i) {
  if ((i %= 32) == 0)
    return x;
  return (x << (32 - i)) | (x >> i);
}


x86 assembly (clang, -O0):
<rotateR_fun_uint>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x20,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
cmp    $0x0,%edx
jne    112c <rotateR_fun_uint+0x2c>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1148 <rotateR_fun_uint+0x48>
mov    -0x8(%rbp),%eax
mov    $0x20,%ecx
sub    -0xc(%rbp),%ecx
shl    %cl,%eax
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
shr    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rotateR_fun_uint>:
mov    %esi,%ecx
mov    %edi,%eax
ror    %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @rotateR_fun_uint(i32 %0, i32 %1) {
%3 = tail call i32 @llvm.fshr.i32(i32 %0, i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int i;
  for (i = 1; i <= 100; i++) {
    printf("%d - ", i);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jg     114d <main+0x3d>
mov    -0x8(%rbp),%esi
lea    0xec6(%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
mov    $0x1,%ebx
lea    0xee0(%rip),%r14
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0x1,%ebx
cmp    $0x65,%ebx
jne    1120 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"%d - \00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 1, %0 ], [ %4, %1 ]
%3 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = add nuw nsw i32 %2, 1
%5 = icmp eq i32 %4, 101
br i1 %5, label %6, label %1
6: ; preds = %1
ret i32 0
}
int test_imm_FFuint8_mem(unsigned char *val) {
  return ((*val) & (0xFF << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_FFuint8_mem>:
cmpb   $0x0,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_FFuint8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = and i32 %5, 255
%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_FFuint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int add(int l, int r) { return l + r; }


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

x86 assembly (clang, -O2):
<add>:
lea    (%rdi,%rsi,1),%eax
ret

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

LLVM IR (-O2):
define i32 @add(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void XrtVideo_ResetSink() { printf("XrtVideo_Reset\r\n"); }


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @editor_grid_release() {
ret void
}
/* Variables and functions */
char *b64decode(char const *);
int /*<<< orphan*/ free(char *);
void testB64Decode(const char *raw, const char *decoded) {
  char *b64d = b64decode(raw);
  ;
  free(b64d);
}


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

x86 assembly (clang, -O2):
<testB64Decode>:
push   %rax
call   1040 <b64decode@plt>
mov    %rax,%rdi
pop    %rax
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @testB64Decode(i8* %0, i8* nocapture readnone %1) {
%3 = tail call i8* @b64decode(i8* %0)
%4 = tail call i32 @free(i8* %3)
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int strlen(char *);
char *string_ptuc2c(char *P) {
  if (P == NULL) {
    return P;
  }
  uint32_t len = strlen(P);
  if (len < 3) {
    return P;
  } else {
    P[0] = '"';
    P[len - 1] = '"';
    return P;
  }
}


x86 assembly (clang, -O0):
<string_ptuc2c>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1134 <string_ptuc2c+0x24>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1177 <string_ptuc2c+0x67>
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x3,-0x14(%rbp)
jge    1157 <string_ptuc2c+0x47>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1177 <string_ptuc2c+0x67>
mov    -0x10(%rbp),%rax
movb   $0x22,(%rax)
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x22,(%rax,%rcx,1)
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_ptuc2c>:
push   %rbx
mov    %rdi,%rbx
test   %rdi,%rdi
je     1130 <string_ptuc2c+0x20>
mov    %rbx,%rdi
call   1030 <strlen@plt>
cmp    $0x3,%eax
jl     1130 <string_ptuc2c+0x20>
movb   $0x22,(%rbx)
add    $0xffffffff,%eax
movb   $0x22,(%rbx,%rax,1)
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @string_ptuc2c(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = load i8*, i8** %3
store i8* %8, i8** %2
br label %25
9: ; preds = %1
%10 = load i8*, i8** %3
%11 = call i32 @strlen(i8* %10)
store i32 %11, i32* %4
%12 = load i32, i32* %4
%13 = icmp slt i32 %12, 3
br i1 %13, label %14, label %16
14: ; preds = %9
%15 = load i8*, i8** %3
store i8* %15, i8** %2
br label %25
16: ; preds = %9
%17 = load i8*, i8** %3
%18 = getelementptr inbounds i8, i8* %17, i64 0
store i8 34, i8* %18
%19 = load i8*, i8** %3
%20 = load i32, i32* %4
%21 = sub nsw i32 %20, 1
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds i8, i8* %19, i64 %22
store i8 34, i8* %23
%24 = load i8*, i8** %3
store i8* %24, i8** %2
br label %25
25: ; preds = %16, %14, %7
%26 = load i8*, i8** %2
ret i8* %26
}

LLVM IR (-O2):
define i8* @string_ptuc2c(i8* returned %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %10, label %3
3: ; preds = %1
%4 = tail call i32 @strlen(i8* %0)
%5 = icmp slt i32 %4, 3
br i1 %5, label %10, label %6
6: ; preds = %3
store i8 34, i8* %0
%7 = add nsw i32 %4, -1
%8 = zext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %0, i64 %8
store i8 34, i8* %9
br label %10
10: ; preds = %6, %3, %1
ret i8* %0
}
/* Variables and functions */
long r_seek(int, long, int);
long d_seek(int fd, long offset, int whence) {
  return r_seek(fd, offset, whence);
}


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

x86 assembly (clang, -O2):
<d_seek>:
jmp    1030 <r_seek@plt>

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

LLVM IR (-O2):
define i64 @d_seek(i32 %0, i64 %1, i32 %2) {
%4 = tail call i64 @r_seek(i32 %0, i64 %1, i32 %2)
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *serveRSP(char *);
void singleStep() {
  char *reply = serveRSP("$s#73");
  free(reply);
}


x86 assembly (clang, -O0):
<singleStep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1040 <serveRSP@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<singleStep>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <serveRSP@plt>
mov    %rax,%rdi
pop    %rax
jmp    1030 <free@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"$s\00"
define void @singleStep() {
%1 = alloca i8*
%2 = call i8* @serveRSP(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
store i8* %2, i8** %1
%3 = load i8*, i8** %1
%4 = call i32 @free(i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"$s\00"
define void @singleStep() {
%1 = tail call i8* @serveRSP(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @free(i8* %1)
ret void
}
int do_344() { return 344; }


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

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

LLVM IR (-O0):
define i32 @do_344() {
ret i32 344
}

LLVM IR (-O2):
define i32 @do_344() {
ret i32 344
}
/* Variables and functions */
int pair_content(short, short *, short *);
int wrap_pair_content(short pair, short *fg, short *bg) {
  return pair_content(pair, fg, bg);
}


x86 assembly (clang, -O0):
<wrap_pair_content>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x2(%rbp),%ax
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
movswl %ax,%edi
call   1030 <pair_content@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wrap_pair_content>:
jmp    1030 <pair_content@plt>

LLVM IR (-O0):
define i32 @wrap_pair_content(i16 signext %0, i16* %1, i16* %2) {
%4 = alloca i16
%5 = alloca i16*
%6 = alloca i16*
store i16 %0, i16* %4
store i16* %1, i16** %5
store i16* %2, i16** %6
%7 = load i16, i16* %4
%8 = load i16*, i16** %5
%9 = load i16*, i16** %6
%10 = call i32 @pair_content(i16 signext %7, i16* %8, i16* %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @wrap_pair_content(i16 signext %0, i16* %1, i16* %2) {
%4 = tail call i32 @pair_content(i16 signext %0, i16* %1, i16* %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ putchr(char);
void beep(void) { (void)putchr((('G') & 037)); }


x86 assembly (clang, -O0):
<beep>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7,%edi
call   1030 <putchr@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<beep>:
mov    $0x7,%edi
jmp    1030 <putchr@plt>

LLVM IR (-O0):
define void @beep() {
%1 = call i32 @putchr(i8 signext 7)
ret void
}

LLVM IR (-O2):
define void @beep() {
%1 = tail call i32 @putchr(i8 signext 7)
ret void
}
/* Type definitions */
typedef long time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ localtime(long *);
long mktime(struct tm *);
int /*<<< orphan*/ time(long *);
long int getSecondsFromAbsTime(struct tm *tp) {
  time_t current_time;
  time_t delayed_time = 0;
  time(&current_time);
  localtime(&current_time);
  delayed_time = mktime(tp) - current_time;
  return delayed_time;
}


x86 assembly (clang, -O0):
<getSecondsFromAbsTime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x18(%rbp)
lea    -0x10(%rbp),%rdi
call   1040 <time@plt>
lea    -0x10(%rbp),%rdi
call   1030 <localtime@plt>
mov    -0x8(%rbp),%rdi
call   1050 <mktime@plt>
sub    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getSecondsFromAbsTime>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    %rsp,%r14
mov    %r14,%rdi
call   1040 <time@plt>
mov    %r14,%rdi
call   1030 <localtime@plt>
mov    %rbx,%rdi
call   1050 <mktime@plt>
sub    (%rsp),%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
define i64 @getSecondsFromAbsTime(%struct.tm* %0) {
%2 = alloca %struct.tm*
%3 = alloca i64
%4 = alloca i64
store %struct.tm* %0, %struct.tm** %2
store i64 0, i64* %4
%5 = call i32 @time(i64* %3)
%6 = call i32 @localtime(i64* %3)
%7 = load %struct.tm*, %struct.tm** %2
%8 = call i64 @mktime(%struct.tm* %7)
%9 = load i64, i64* %3
%10 = sub nsw i64 %8, %9
store i64 %10, i64* %4
%11 = load i64, i64* %4
ret i64 %11
}

LLVM IR (-O2):
%struct.tm = type { i32 }
define i64 @getSecondsFromAbsTime(%struct.tm* nocapture %0) {
%2 = alloca i64
%3 = bitcast i64* %2 to i8*
%4 = call i32 @time(i64* %2)
%5 = call i32 @localtime(i64* %2)
%6 = call i64 @mktime(%struct.tm* %0)
%7 = load i64, i64* %2
%8 = sub nsw i64 %6, %7
ret i64 %8
}
/* Type definitions */
typedef int time_t;

/* Variables and functions */
int uptime_value(time_t uptime) {
  if (uptime < 3600)
    return uptime / 60;
  if (uptime < 86400)
    return uptime / 3600;
  return uptime / 86400;
}


x86 assembly (clang, -O0):
<uptime_value>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0xe10,-0x8(%rbp)
jge    1127 <uptime_value+0x27>
mov    -0x8(%rbp),%eax
mov    $0x3c,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
jmp    1155 <uptime_value+0x55>
cmpl   $0x15180,-0x8(%rbp)
jge    1147 <uptime_value+0x47>
mov    -0x8(%rbp),%eax
mov    $0xe10,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
jmp    1155 <uptime_value+0x55>
mov    -0x8(%rbp),%eax
mov    $0x15180,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<uptime_value>:
cmp    $0xe0f,%edi
jg     1123 <uptime_value+0x23>
movslq %edi,%rax
imul   $0xffffffff88888889,%rax,%rax
shr    $0x20,%rax
add    %edi,%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
sar    $0x5,%eax
add    %ecx,%eax
ret
mov    %edi,%ecx
cmp    $0x1517f,%edi
ja     113b <uptime_value+0x3b>
mov    $0x91a2b3c5,%eax
imul   %rcx,%rax
shr    $0x2b,%rax
ret
mov    $0xc22e4507,%eax
imul   %rcx,%rax
shr    $0x30,%rax
ret

LLVM IR (-O0):
define i32 @uptime_value(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp slt i32 %4, 3600
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* %3
%8 = sdiv i32 %7, 60
store i32 %8, i32* %2
br label %18
9: ; preds = %1
%10 = load i32, i32* %3
%11 = icmp slt i32 %10, 86400
br i1 %11, label %12, label %15
12: ; preds = %9
%13 = load i32, i32* %3
%14 = sdiv i32 %13, 3600
store i32 %14, i32* %2
br label %18
15: ; preds = %9
%16 = load i32, i32* %3
%17 = sdiv i32 %16, 86400
store i32 %17, i32* %2
br label %18
18: ; preds = %15, %12, %6
%19 = load i32, i32* %2
ret i32 %19
}

LLVM IR (-O2):
define i32 @uptime_value(i32 %0) {
%2 = icmp slt i32 %0, 3600
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = sdiv i32 %0, 60
br label %11
5: ; preds = %1
%6 = icmp ult i32 %0, 86400
br i1 %6, label %7, label %9
7: ; preds = %5
%8 = udiv i32 %0, 3600
br label %11
9: ; preds = %5
%10 = udiv i32 %0, 86400
br label %11
11: ; preds = %9, %7, %3
%12 = phi i32 [ %4, %3 ], [ %8, %7 ], [ %10, %9 ]
ret i32 %12
}
/* Variables and functions */
int linkat(int, char const *, int, char const *, int);
__attribute__((__weak__, __always___)) int
softboundmpx_linkat(int olddirfd, const char *oldpath, int newdirfd,
                    const char *newpath, int flags) {
  return linkat(olddirfd, oldpath, newdirfd, newpath, flags);
}


x86 assembly (clang, -O0):
<softboundmpx_linkat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x20(%rbp),%rcx
mov    -0x24(%rbp),%r8d
call   1030 <linkat@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<softboundmpx_linkat>:
jmp    1030 <linkat@plt>

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

LLVM IR (-O2):
define weak i32 @softboundmpx_linkat(i32 %0, i8* %1, i32 %2, i8* %3, i32 %4) {
%6 = tail call i32 @linkat(i32 %0, i8* %1, i32 %2, i8* %3, i32 %4)
ret i32 %6
}
/* Variables and functions */
scalar_t__ strcasecmp(char const *, char *);
int check_auth(const char *username, const char *password) {
  if (strcasecmp(username, "fred") != 0)
    return -1;
  if (strcasecmp(password, "nerk") != 0)
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<check_auth>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed5(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%rax
je     1146 <check_auth+0x36>
movl   $0xffffffff,-0x4(%rbp)
jmp    1173 <check_auth+0x63>
mov    -0x18(%rbp),%rdi
lea    0xeb4(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%rax
je     116c <check_auth+0x5c>
movl   $0xffffffff,-0x4(%rbp)
jmp    1173 <check_auth+0x63>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_auth>:
push   %rbx
mov    %rsi,%rbx
lea    0xee5(%rip),%rsi
call   1030 <strcasecmp@plt>
mov    %rax,%rcx
mov    $0xffffffff,%eax
test   %rcx,%rcx
je     112f <check_auth+0x1f>
pop    %rbx
ret
lea    0xecf(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcasecmp@plt>
neg    %rax
sbb    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"fred\00"
@.str.1 = [5 x i8] c"nerk\00"
define i32 @check_auth(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i64 @strcasecmp(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = tail call i64 @strcasecmp(i8* %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%7 = icmp ne i64 %6, 0
%8 = sext i1 %7 to i32
br label %9
9: ; preds = %5, %2
%10 = phi i32 [ -1, %2 ], [ %8, %5 ]
ret i32 %10
}
/* Variables and functions */
int detectPresence(char *);
scalar_t__ isatty(int);
int whiptailPresent() {
  static int lWhiptailPresent = -1;
  if (lWhiptailPresent < 0) {
    lWhiptailPresent = detectPresence("whiptail");
  }
  return lWhiptailPresent && isatty(1);
}


x86 assembly (clang, -O0):
<whiptailPresent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
cmpl   $0x0,0x2f01(%rip)
jge    1147 <whiptailPresent+0x27>
lea    0xec4(%rip),%rdi
call   1040 <detectPresence@plt>
mov    %eax,0x2ee9(%rip)
xor    %eax,%eax
cmpl   $0x0,0x2ee0(%rip)
mov    %al,-0x1(%rbp)
je     116d <whiptailPresent+0x4d>
mov    $0x1,%edi
call   1030 <isatty@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<whiptailPresent>:
push   %rax
mov    0x2f09(%rip),%eax
test   %eax,%eax
js     1146 <whiptailPresent+0x26>
test   %eax,%eax
je     115c <whiptailPresent+0x3c>
mov    $0x1,%edi
call   1030 <isatty@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rcx
ret
lea    0xeb3(%rip),%rdi
call   1040 <detectPresence@plt>
mov    %eax,0x2ed8(%rip)
test   %eax,%eax
jne    112f <whiptailPresent+0xf>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@whiptailPresent.lWhiptailPresent = internal global i32 -1
@.str = [9 x i8] c"whiptail\00"
define i32 @whiptailPresent() {
%1 = load i32, i32* @whiptailPresent.lWhiptailPresent
%2 = icmp slt i32 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 @detectPresence(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
store i32 %4, i32* @whiptailPresent.lWhiptailPresent
br label %5
5: ; preds = %3, %0
%6 = load i32, i32* @whiptailPresent.lWhiptailPresent
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %5
%9 = call i64 @isatty(i32 1)
%10 = icmp ne i64 %9, 0
br label %11
11: ; preds = %8, %5
%12 = phi i1 [ false, %5 ], [ %10, %8 ]
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
@whiptailPresent.lWhiptailPresent = internal unnamed_addr global i32 -1
@.str = [9 x i8] c"whiptail\00"
define i32 @whiptailPresent() {
%1 = load i32, i32* @whiptailPresent.lWhiptailPresent
%2 = icmp slt i32 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @detectPresence(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
store i32 %4, i32* @whiptailPresent.lWhiptailPresent
br label %5
5: ; preds = %3, %0
%6 = phi i32 [ %4, %3 ], [ %1, %0 ]
%7 = icmp eq i32 %6, 0
br i1 %7, label %12, label %8
8: ; preds = %5
%9 = tail call i64 @isatty(i32 1)
%10 = icmp ne i64 %9, 0
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %8, %5
%13 = phi i32 [ 0, %5 ], [ %11, %8 ]
ret i32 %13
}
int fun1138() { return 1138; }


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

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

LLVM IR (-O0):
define i32 @fun1138() {
ret i32 1138
}

LLVM IR (-O2):
define i32 @fun1138() {
ret i32 1138
}
/* Variables and functions */
int /*<<< orphan*/ add_sudirriber();
int /*<<< orphan*/ get_all_sudirribers();
int main(int argc, char **argv) {
  char *content = 0;
  add_sudirriber();
  get_all_sudirribers();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    $0x0,%al
call   1040 <add_sudirriber@plt>
mov    $0x0,%al
call   1030 <get_all_sudirribers@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* null, i8** %6
%7 = call i32 (...) @add_sudirriber()
%8 = call i32 (...) @get_all_sudirribers()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @add_sudirriber()
%4 = tail call i32 (...) @get_all_sudirribers()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  int c = 0;
  while (c < 10) {
    printf("Billy Wilson Arante\n");
    c = c + 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    114a <main+0x3a>
lea    0xec9(%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   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@str = [20 x i8] c"Billy Wilson Arante\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ __pmp_inline_atomic_add32(int /*<<< orphan*/ volatile *,
                                             int /*<<< orphan*/);
void __pmp_atomic_add32(volatile int32_t *p, int32_t addend) {
  __pmp_inline_atomic_add32(p, addend);
}


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

x86 assembly (clang, -O2):
<__pmp_atomic_add32>:
jmp    1030 <__pmp_inline_atomic_add32@plt>

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

LLVM IR (-O2):
define void @__pmp_atomic_add32(i32* %0, i32 %1) {
%3 = tail call i32 @__pmp_inline_atomic_add32(i32* %0, i32 %1)
ret void
}
/* Variables and functions */
scalar_t__ virt_to_phys(void volatile *);
__attribute__((always_)) unsigned int isa_virt_to_bus(volatile void *address) {
  return (unsigned int)virt_to_phys(address);
}


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

x86 assembly (clang, -O2):
<isa_virt_to_bus>:
jmp    1030 <virt_to_phys@plt>

LLVM IR (-O0):
define i32 @isa_virt_to_bus(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @virt_to_phys(i8* %3)
%5 = trunc i64 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @isa_virt_to_bus(i8* %0) {
%2 = tail call i64 @virt_to_phys(i8* %0)
%3 = trunc i64 %2 to i32
ret i32 %3
}
unsigned int test_17(int x) { return ~(x >> 31) & 0x00FF0000; }


x86 assembly (clang, -O0):
<test_17>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1f,%eax
xor    $0xffffffff,%eax
and    $0xff0000,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_17>:
xor    %ecx,%ecx
test   %edi,%edi
mov    $0xff0000,%eax
cmovs  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_17(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 31
%5 = xor i32 %4, -1
%6 = and i32 %5, 16711680
ret i32 %6
}

LLVM IR (-O2):
define i32 @test_17(i32 %0) {
%2 = icmp slt i32 %0, 0
%3 = select i1 %2, i32 0, i32 16711680
ret i32 %3
}
double intlin(double x, double y1, double x1, double y2, double x2) {
  double value;
  value = (y2 * (x - x1) + y1 * (x2 - x)) / (x2 - x1);
  return (value);
}


x86 assembly (clang, -O0):
<intlin>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm2
subsd  -0x18(%rbp),%xmm2
movsd  -0x10(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm3
subsd  -0x8(%rbp),%xmm3
mulsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x28(%rbp),%xmm1
subsd  -0x18(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<intlin>:
movapd %xmm4,%xmm5
subsd  %xmm0,%xmm5
subsd  %xmm2,%xmm0
mulsd  %xmm1,%xmm5
mulsd  %xmm3,%xmm0
addsd  %xmm5,%xmm0
subsd  %xmm2,%xmm4
divsd  %xmm4,%xmm0
ret

LLVM IR (-O0):
define double @intlin(double %0, double %1, double %2, double %3, double %4) {
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
store double %0, double* %6
store double %1, double* %7
store double %2, double* %8
store double %3, double* %9
store double %4, double* %10
%12 = load double, double* %9
%13 = load double, double* %6
%14 = load double, double* %8
%15 = fsub double %13, %14
%16 = load double, double* %7
%17 = load double, double* %10
%18 = load double, double* %6
%19 = fsub double %17, %18
%20 = fmul double %16, %19
%21 = call double @llvm.fmuladd.f64(double %12, double %15, double %20)
%22 = load double, double* %10
%23 = load double, double* %8
%24 = fsub double %22, %23
%25 = fdiv double %21, %24
store double %25, double* %11
%26 = load double, double* %11
ret double %26
}

LLVM IR (-O2):
define double @intlin(double %0, double %1, double %2, double %3, double %4) {
%6 = fsub double %0, %2
%7 = fsub double %4, %0
%8 = fmul double %7, %1
%9 = tail call double @llvm.fmuladd.f64(double %3, double %6, double %8)
%10 = fsub double %4, %2
%11 = fdiv double %9, %10
ret double %11
}
/* Variables and functions */
int /*<<< orphan*/ PTRACE_TRACEME;
int /*<<< orphan*/ error(int, int /*<<< orphan*/, char *);
int ptrace(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/ *,
           int /*<<< orphan*/ *);
void listen_me() {
  if (ptrace(PTRACE_TRACEME, 0, NULL, NULL) == -1)
    error(250, 0, "Error initiating ptrace");
}


x86 assembly (clang, -O0):
<listen_me>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
xor    %eax,%eax
mov    %eax,%ecx
mov    %rcx,%rdx
call   1030 <ptrace@plt>
cmp    $0xffffffff,%eax
jne    1157 <listen_me+0x37>
mov    $0xfa,%edi
xor    %esi,%esi
lea    0xeae(%rip),%rdx
call   1040 <error@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<listen_me>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   1030 <ptrace@plt>
cmp    $0xffffffff,%eax
je     113c <listen_me+0x1c>
pop    %rax
ret
lea    0xebd(%rip),%rdx
mov    $0xfa,%edi
xor    %esi,%esi
pop    %rax
jmp    1040 <error@plt>

LLVM IR (-O0):
@PTRACE_TRACEME = global i32 0
@.str = [24 x i8] c"Error initiating ptrace\00"
define void @listen_me() {
%1 = load i32, i32* @PTRACE_TRACEME
%2 = call i32 @ptrace(i32 %1, i32 0, i32* null, i32* null)
%3 = icmp eq i32 %2, -1
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @error(i32 250, i32 0, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %0
ret void
}

LLVM IR (-O2):
@PTRACE_TRACEME = global i32 0
@.str = [24 x i8] c"Error initiating ptrace\00"
define void @listen_me() {
%1 = load i32, i32* @PTRACE_TRACEME
%2 = tail call i32 @ptrace(i32 %1, i32 0, i32* null, i32* null)
%3 = icmp eq i32 %2, -1
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = tail call i32 @error(i32 250, i32 0, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %0
ret void
}
/* Variables and functions */
int SB_Compare(void const *, void const *);
int HT_Compare(const void *Key1, const void *Key2) {
  return SB_Compare(Key1, Key2);
}


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

x86 assembly (clang, -O2):
<HT_Compare>:
jmp    1030 <SB_Compare@plt>

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

LLVM IR (-O2):
define i32 @HT_Compare(i8* %0, i8* %1) {
%3 = tail call i32 @SB_Compare(i8* %0, i8* %1)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ sbphostn64n(int *, char *, int /*<<< orphan*/);
void sbphostn64n_(int *ierr, char *name, uint64_t namelen) {
  sbphostn64n(ierr, name, namelen);
}


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

x86 assembly (clang, -O2):
<sbphostn64n_>:
jmp    1030 <sbphostn64n@plt>

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

LLVM IR (-O2):
define void @sbphostn64n_(i32* %0, i8* %1, i32 %2) {
%4 = tail call i32 @sbphostn64n(i32* %0, i8* %1, i32 %2)
ret void
}
/* Variables and functions */
short lswap2(short);
int /*<<< orphan*/ memmove(unsigned char *, unsigned char *, int);
short read_blk2size(unsigned char *datablk) {
  short size;
  memmove((unsigned char *)&size, datablk, sizeof(short));
  return lswap2(size);
}


x86 assembly (clang, -O0):
<read_blk2size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0xa(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    $0x2,%edx
call   1040 <memmove@plt>
movswl -0xa(%rbp),%edi
call   1030 <lswap2@plt>
cwtl
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_blk2size>:
push   %rax
mov    %rdi,%rsi
lea    0x6(%rsp),%rdi
mov    $0x2,%edx
call   1040 <memmove@plt>
movswl 0x6(%rsp),%edi
call   1030 <lswap2@plt>
pop    %rcx
ret

LLVM IR (-O0):
define signext i16 @read_blk2size(i8* %0) {
%2 = alloca i8*
%3 = alloca i16
store i8* %0, i8** %2
%4 = bitcast i16* %3 to i8*
%5 = load i8*, i8** %2
%6 = call i32 @memmove(i8* %4, i8* %5, i32 2)
%7 = load i16, i16* %3
%8 = call signext i16 @lswap2(i16 signext %7)
ret i16 %8
}

LLVM IR (-O2):
define signext i16 @read_blk2size(i8* %0) {
%2 = alloca i16
%3 = bitcast i16* %2 to i8*
%4 = call i32 @memmove(i8* %3, i8* %0, i32 2)
%5 = load i16, i16* %2
%6 = call signext i16 @lswap2(i16 signext %5)
ret i16 %6
}
/* Variables and functions */
int U_WMRCORENONE_get(char *);
int U_WMRB4_get(void) { return U_WMRCORENONE_get("U_WMRB4"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"U_WMRB4\00"
define i32 @U_WMRB4_get() {
%1 = call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMRB4\00"
define i32 @U_WMRB4_get() {
%1 = tail call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}