xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ log_afr(char *);
int /*<<< orphan*/ log_blm(char *);
int /*<<< orphan*/ log_knock(char *);
scalar_t__ verify_line(char *);
void parse_line(char *line) {
  if (verify_line(line) == 0)
    return;
  log_blm(line);
  log_knock(line);
  log_afr(line);
}


x86 assembly (clang, -O0):
<parse_line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1060 <verify_line@plt>
cmp    $0x0,%rax
jne    1164 <parse_line+0x24>
jmp    117f <parse_line+0x3f>
mov    -0x8(%rbp),%rdi
call   1040 <log_blm@plt>
mov    -0x8(%rbp),%rdi
call   1050 <log_knock@plt>
mov    -0x8(%rbp),%rdi
call   1030 <log_afr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_line>:
push   %rbx
mov    %rdi,%rbx
call   1060 <verify_line@plt>
test   %rax,%rax
je     1167 <parse_line+0x27>
mov    %rbx,%rdi
call   1040 <log_blm@plt>
mov    %rbx,%rdi
call   1050 <log_knock@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <log_afr@plt>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @parse_line(i8* %0) {
%2 = tail call i64 @verify_line(i8* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i32 @log_blm(i8* %0)
%6 = tail call i32 @log_knock(i8* %0)
%7 = tail call i32 @log_afr(i8* %0)
br label %8
8: ; preds = %1, %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned long long);
int main(int argc, char **args) {
  unsigned long long int sum;
  (void)argc;
  (void)args;
  printf("%llu\n", sum);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"%llu\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i64 undef)
ret i32 0
}
float fsub(float a, float b) { return a - b; }


x86 assembly (clang, -O0):
<fsub>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
subss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fsub>:
subss  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define float @fsub(float %0, float %1) {
%3 = fsub float %0, %1
ret float %3
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
wchar_t *__wcpcpy(wchar_t *dest, const wchar_t *src) {
  do
    ;
  while ((*dest++ = *src++));
  return dest - 1;
}


x86 assembly (clang, -O0):
<__wcpcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
jmp    1111 <__wcpcpy+0x11>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%eax
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
mov    %eax,(%rcx)
cmp    $0x0,%eax
jne    110c <__wcpcpy+0xc>
mov    -0x8(%rbp),%rax
add    $0xfffffffffffffffc,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__wcpcpy>:
mov    %rdi,%rax
add    $0xfffffffffffffffc,%rax
nopw   0x0(%rax,%rax,1)
mov    (%rsi),%ecx
add    $0x4,%rsi
mov    %ecx,0x4(%rax)
add    $0x4,%rax
test   %ecx,%ecx
jne    1110 <__wcpcpy+0x10>
ret

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

LLVM IR (-O2):
define i32* @__wcpcpy(i32* writeonly %0, i32* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i32* [ %0, %2 ], [ %8, %3 ]
%5 = phi i32* [ %1, %2 ], [ %6, %3 ]
%6 = getelementptr inbounds i32, i32* %5, i64 1
%7 = load i32, i32* %5
%8 = getelementptr inbounds i32, i32* %4, i64 1
store i32 %7, i32* %4
%9 = icmp eq i32 %7, 0
br i1 %9, label %10, label %3
10: ; preds = %3
ret i32* %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int p = 2;
  while (p <= 100) {
    printf("%d\n", p);
    p += 2;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x2,-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    $0x2,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 2, %0 ], [ %4, %1 ]
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = add nuw nsw i32 %2, 2
%5 = icmp ult i32 %2, 99
br i1 %5, label %1, label %6
6: ; preds = %1
ret i32 0
}
/* Variables and functions */
scalar_t__ calloc(size_t, int);
unsigned char *tg_create(void) {
  return (unsigned char *)calloc((size_t)(256 * 256), sizeof(unsigned char));
}


x86 assembly (clang, -O0):
<tg_create>:
push   %rbp
mov    %rsp,%rbp
mov    $0x10000,%edi
mov    $0x1,%esi
call   1030 <calloc@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<tg_create>:
mov    $0x10000,%edi
mov    $0x1,%esi
jmp    1030 <calloc@plt>

LLVM IR (-O0):
define i8* @tg_create() {
%1 = call i64 @calloc(i64 65536, i32 1)
%2 = inttoptr i64 %1 to i8*
ret i8* %2
}

LLVM IR (-O2):
define i8* @tg_create() {
%1 = tail call i64 @calloc(i64 65536, i32 1)
%2 = inttoptr i64 %1 to i8*
ret i8* %2
}
void pollen_text_Text_targetInit__I() {}


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

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

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

LLVM IR (-O2):
define void @pollen_text_Text_targetInit__I() {
ret void
}
/* Variables and functions */
unsigned int w5100_readSn_byte(unsigned int, int);
unsigned w5100_readSnRX_WR(unsigned sock) {
  unsigned res = w5100_readSn_byte(sock, 0x002A);
  res = (res << 8) + w5100_readSn_byte(sock, 0x002A + 1);
  return res;
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x2a,%esi
call   1030 <w5100_readSn_byte@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x8,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x2b,%esi
call   1030 <w5100_readSn_byte@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
mov    $0x2a,%esi
call   1030 <w5100_readSn_byte@plt>
mov    %eax,%ebp
shl    $0x8,%ebp
mov    %ebx,%edi
mov    $0x2b,%esi
call   1030 <w5100_readSn_byte@plt>
add    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @w5100_readSnRX_WR(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @w5100_readSn_byte(i32 %4, i32 42)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = shl i32 %6, 8
%8 = load i32, i32* %2
%9 = call i32 @w5100_readSn_byte(i32 %8, i32 43)
%10 = add i32 %7, %9
store i32 %10, i32* %3
%11 = load i32, i32* %3
ret i32 %11
}

LLVM IR (-O2):
define i32 @w5100_readSnRX_WR(i32 %0) {
%2 = tail call i32 @w5100_readSn_byte(i32 %0, i32 42)
%3 = shl i32 %2, 8
%4 = tail call i32 @w5100_readSn_byte(i32 %0, i32 43)
%5 = add i32 %3, %4
ret i32 %5
}
void g_date_new_julian() {}


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

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

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

LLVM IR (-O2):
define void @g_date_new_julian() {
ret void
}
void apu_inspect(struct APU *apu) {
  printf("%s:%d\t%-20s\t",
         "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
         "2022-01-22/02-19-57/repos/erik/nestorama/refs/heads/master/src/apu.c",
         57, __func__);
  printf("TODO: apu_inspect(struct APU*) %p", (void *)apu);
  printf("\n");
  ;
}


x86 assembly (clang, -O0):
<apu_inspect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
lea    0xee3(%rip),%rsi
mov    $0x39,%edx
lea    0xf5c(%rip),%rcx
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xf56(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf6a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<apu_inspect>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
lea    0xedb(%rip),%rsi
lea    0xf59(%rip),%rcx
mov    $0x39,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf52(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
pop    %rbx
jmp    1030 <putchar@plt>

LLVM IR (-O0):
%struct.APU = type opaque
@.str = [13 x i8] c"%s:%d\09%-20s\09\00"
@.str.1 = [133 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/erik/nestorama/refs/heads/master/src/apu.c\00"
@__func__.apu_inspect = [12 x i8] c"apu_inspect\00"
@.str.2 = [34 x i8] c"TODO: apu_inspect(struct APU*) %p\00"
@.str.3 = [2 x i8] c"\0A\00"
define void @apu_inspect(%struct.APU* %0) {
%2 = alloca %struct.APU*
store %struct.APU* %0, %struct.APU** %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([133 x i8], [133 x i8]* @.str.1, i64 0, i64 0), i32 57, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @__func__.apu_inspect, i64 0, i64 0))
%4 = load %struct.APU*, %struct.APU** %2
%5 = bitcast %struct.APU* %4 to i8*
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0), i8* %5)
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.APU = type opaque
@.str = [13 x i8] c"%s:%d\09%-20s\09\00"
@.str.1 = [133 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/erik/nestorama/refs/heads/master/src/apu.c\00"
@__func__.apu_inspect = [12 x i8] c"apu_inspect\00"
@.str.2 = [34 x i8] c"TODO: apu_inspect(struct APU*) %p\00"
define void @apu_inspect(%struct.APU* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([133 x i8], [133 x i8]* @.str.1, i64 0, i64 0), i32 57, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @__func__.apu_inspect, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0), %struct.APU* %0)
%4 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
double pow(double const, int);
double QualityToCompression(double c) {
  const double linear_c = (c < 0.75) ? c * (2. / 3.) : 2. * c - 1.;
  const double v = pow(linear_c, 1 / 3.);
  return v;
}


x86 assembly (clang, -O0):
<QualityToCompression>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xedb(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    1147 <QualityToCompression+0x37>
movsd  0xed8(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
jmp    1161 <QualityToCompression+0x51>
movsd  -0x8(%rbp),%xmm0
addsd  %xmm0,%xmm0
movsd  0xeb0(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
xor    %edi,%edi
call   1030 <pow@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<QualityToCompression>:
movsd  0xee8(%rip),%xmm1
mulsd  %xmm0,%xmm1
movapd %xmm0,%xmm2
addsd  %xmm0,%xmm2
addsd  0xedc(%rip),%xmm2
cmpltsd 0xedb(%rip),%xmm0
andpd  %xmm0,%xmm1
andnpd %xmm2,%xmm0
orpd   %xmm1,%xmm0
xor    %edi,%edi
jmp    1030 <pow@plt>

LLVM IR (-O0):
define double @QualityToCompression(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %2
%5 = load double, double* %2
%6 = fcmp olt double %5, 7.500000e-01
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load double, double* %2
%9 = fmul double %8, 0x3FE5555555555555
br label %13
10: ; preds = %1
%11 = load double, double* %2
%12 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %11, double -1.000000e+00)
br label %13
13: ; preds = %10, %7
%14 = phi double [ %9, %7 ], [ %12, %10 ]
store double %14, double* %3
%15 = load double, double* %3
%16 = call double @pow(double %15, i32 0)
store double %16, double* %4
%17 = load double, double* %4
ret double %17
}

LLVM IR (-O2):
define double @QualityToCompression(double %0) {
%2 = fcmp olt double %0, 7.500000e-01
%3 = fmul double %0, 0x3FE5555555555555
%4 = tail call double @llvm.fmuladd.f64(double %0, double 2.000000e+00, double -1.000000e+00)
%5 = select i1 %2, double %3, double %4
%6 = tail call double @pow(double %5, i32 0)
ret double %6
}
/* Variables and functions */
int prv_parse_number(char const *, size_t, int *);
int prv_get_number(const char *uriString, size_t uriLength) {
  int index = 0;
  return prv_parse_number(uriString, uriLength, &index);
}


x86 assembly (clang, -O0):
<prv_get_number>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x14(%rbp),%rdx
call   1030 <prv_parse_number@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<prv_get_number>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0x4(%rsp),%rdx
call   1030 <prv_parse_number@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @prv_get_number(i8* %0, i64 %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
store i32 0, i32* %3
%5 = call i32 @prv_parse_number(i8* %0, i64 %1, i32* %3)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ EX_USAGE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void emit_help(void) {
  fprintf(stderr, "Usage: ... | cts [-l]\n");
  exit(EX_USAGE);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [23 x i8] c"Usage: ... | cts [-l]\0A\00"
@EX_USAGE = global i32 0
define void @emit_help() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EX_USAGE
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [23 x i8] c"Usage: ... | cts [-l]\0A\00"
@EX_USAGE = global i32 0
define void @emit_help() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EX_USAGE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
unsigned int __VERIFIER_nondet_unsigned(void) {
  unsigned int u;
  { return (u); }
}


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

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

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

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

/* Variables and functions */
bool ckDynMemPhyIsDynMem(uint32_t phy) {
  return (0x00900000 < phy && phy < 0xc0000000);
}


x86 assembly (clang, -O0):
<ckDynMemPhyIsDynMem>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
mov    $0x900000,%ecx
cmp    -0x4(%rbp),%ecx
mov    %al,-0x5(%rbp)
jge    1127 <ckDynMemPhyIsDynMem+0x27>
cmpl   $0xc0000000,-0x4(%rbp)
setb   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ckDynMemPhyIsDynMem>:
xor    %eax,%eax
cmp    $0x900001,%edi
setge  %al
ret

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

LLVM IR (-O2):
define i32 @ckDynMemPhyIsDynMem(i32 %0) {
%2 = icmp sgt i32 %0, 9437184
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int rand();
void fill_rand8(unsigned char *buf, long len) {
  long i;
  for (i = 0; i < len; i++) {
    buf[i] = rand() % 256;
  }
}


x86 assembly (clang, -O0):
<fill_rand8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jge    1161 <fill_rand8+0x51>
mov    $0x0,%al
call   1030 <rand@plt>
mov    $0x100,%ecx
cltd
idiv   %ecx
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1128 <fill_rand8+0x18>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fill_rand8>:
push   %r15
push   %r14
push   %rbx
test   %rsi,%rsi
jle    1144 <fill_rand8+0x34>
mov    %rsi,%r15
mov    %rdi,%r14
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %eax,%eax
call   1030 <rand@plt>
mov    %al,(%r14,%rbx,1)
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <fill_rand8+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @fill_rand8(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
store i64 0, i64* %5
br label %6
6: ; preds = %17, %2
%7 = load i64, i64* %5
%8 = load i64, i64* %4
%9 = icmp slt i64 %7, %8
br i1 %9, label %10, label %20
10: ; preds = %6
%11 = call i32 (...) @rand()
%12 = srem i32 %11, 256
%13 = trunc i32 %12 to i8
%14 = load i8*, i8** %3
%15 = load i64, i64* %5
%16 = getelementptr inbounds i8, i8* %14, i64 %15
store i8 %13, i8* %16
br label %17
17: ; preds = %10
%18 = load i64, i64* %5
%19 = add nsw i64 %18, 1
store i64 %19, i64* %5
br label %6
20: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @fill_rand8(i8* nocapture writeonly %0, i64 %1) {
%3 = icmp sgt i64 %1, 0
br i1 %3, label %4, label %11
4: ; preds = %2, %4
%5 = phi i64 [ %9, %4 ], [ 0, %2 ]
%6 = tail call i32 (...) @rand()
%7 = trunc i32 %6 to i8
%8 = getelementptr inbounds i8, i8* %0, i64 %5
store i8 %7, i8* %8
%9 = add nuw nsw i64 %5, 1
%10 = icmp eq i64 %9, %1
br i1 %10, label %11, label %4
11: ; preds = %4, %2
ret void
}
float expf(float x) { return __builtin_expf(x); }


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

x86 assembly (clang, -O2):
<expf>:
ucomiss 0xef9(%rip),%xmm0
ja     1120 <expf+0x20>
movss  0xef3(%rip),%xmm1
ucomiss %xmm0,%xmm1
ja     1120 <expf+0x20>
ret
nopw   0x0(%rax,%rax,1)
jmp    1120 <expf+0x20>

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

LLVM IR (-O2):
define float @expf(float %0) {
%2 = fcmp olt float %0, -1.030000e+02
%3 = fcmp ogt float %0, 8.800000e+01
%4 = or i1 %3, %2
br i1 %4, label %5, label %6
5: ; preds = %1, %5
br label %5
6: ; preds = %1
ret float undef
}
/* Variables and functions */
int strlen(char *);
void remover_quebra_linha(char *string) {
  if ((strlen(string) > 0) && (string[strlen(string) - 1] == '\n')) {
    string[strlen(string) - 1] = '\0';
  }
}


x86 assembly (clang, -O0):
<remover_quebra_linha>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x0,%eax
jle    1179 <remover_quebra_linha+0x69>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
sub    $0x1,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0xa,%eax
jne    1179 <remover_quebra_linha+0x69>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<remover_quebra_linha>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
test   %eax,%eax
jle    113d <remover_quebra_linha+0x2d>
mov    %rbx,%rdi
call   1030 <strlen@plt>
cltq
cmpb   $0xa,-0x1(%rax,%rbx,1)
jne    113d <remover_quebra_linha+0x2d>
mov    %rbx,%rdi
call   1030 <strlen@plt>
cltq
movb   $0x0,-0x1(%rax,%rbx,1)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @remover_quebra_linha(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = icmp sgt i32 %2, 0
br i1 %3, label %4, label %16
4: ; preds = %1
%5 = tail call i32 @strlen(i8* %0)
%6 = add nsw i32 %5, -1
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 10
br i1 %10, label %11, label %16
11: ; preds = %4
%12 = tail call i32 @strlen(i8* %0)
%13 = add nsw i32 %12, -1
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8, i8* %0, i64 %14
store i8 0, i8* %15
br label %16
16: ; preds = %11, %4, %1
ret void
}
/* Variables and functions */
char *article(char);
char *exceptionToString(int);
int /*<<< orphan*/ printf(char *, ...);
void interactiveException(int exception) {
  char *what;
  what = exceptionToString(exception);
  printf("\n");
  printf("NOTE: %s %s occurred while executing the command.\n", article(*what),
         what);
  printf("      This event will not alter the state of the CPU.\n");
}


x86 assembly (clang, -O0):
<interactiveException>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <exceptionToString@plt>
mov    %rax,-0x10(%rbp)
lea    0xf1a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1050 <article@plt>
mov    %rax,%rsi
mov    -0x10(%rbp),%rdx
lea    0xe91(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeb6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<interactiveException>:
push   %rbx
call   1060 <exceptionToString@plt>
mov    %rax,%rbx
mov    $0xa,%edi
call   1030 <putchar@plt>
movsbl (%rbx),%edi
call   1070 <article@plt>
lea    0xe8e(%rip),%rdi
mov    %rax,%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xead(%rip),%rdi
pop    %rbx
jmp    1040 <puts@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
@.str.1 = [51 x i8] c"NOTE: %s %s occurred while executing the command.\0A\00"
@.str.2 = [55 x i8] c" This event will not alter the state of the CPU.\0A\00"
define void @interactiveException(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i8* @exceptionToString(i32 %4)
store i8* %5, i8** %3
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%7 = load i8*, i8** %3
%8 = load i8, i8* %7
%9 = call i8* @article(i8 signext %8)
%10 = load i8*, i8** %3
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.1, i64 0, i64 0), i8* %9, i8* %10)
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [51 x i8] c"NOTE: %s %s occurred while executing the command.\0A\00"
@str = [54 x i8] c" This event will not alter the state of the CPU.\00"
define void @interactiveException(i32 %0) {
%2 = tail call i8* @exceptionToString(i32 %0)
%3 = tail call i32 @putchar(i32 10)
%4 = load i8, i8* %2
%5 = tail call i8* @article(i8 signext %4)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @.str.1, i64 0, i64 0), i8* %5, i8* %2)
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @str, i64 0, i64 0))
ret void
}
int pci_iov_resource_bar(struct pci_dev *dev, int resno) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.pci_dev = type opaque
define i32 @pci_iov_resource_bar(%struct.pci_dev* nocapture readnone %0, i32 %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isupper(int);
void t_isupper_0x13() {
  Assert_real((isupper(19) == 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_isupper.c",
              100, ("isupper should be 0 for 0x13"));
}


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

x86 assembly (clang, -O2):
<t_isupper_0x13>:
push   %rax
mov    $0x13,%edi
call   1030 <isupper@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x64,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 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_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0x13\00"
define void @t_isupper_0x13() {
%1 = call i64 @isupper(i32 19)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 100, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 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_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0x13\00"
define void @t_isupper_0x13() {
%1 = tail call i64 @isupper(i32 19)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 100, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ periodSqKepler(double, double, double);
double sqrt(int /*<<< orphan*/);
double periodKepler(double T_ref, double a_ref, double a) {
  return sqrt(periodSqKepler(T_ref, a_ref, a));
}


x86 assembly (clang, -O0):
<periodKepler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
call   1030 <periodSqKepler@plt>
mov    %eax,%edi
call   1040 <sqrt@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define double @periodKepler(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %4
%8 = load double, double* %5
%9 = load double, double* %6
%10 = call i32 @periodSqKepler(double %7, double %8, double %9)
%11 = call double @sqrt(i32 %10)
ret double %11
}

LLVM IR (-O2):
define double @periodKepler(double %0, double %1, double %2) {
%4 = tail call i32 @periodSqKepler(double %0, double %1, double %2)
%5 = tail call double @sqrt(i32 %4)
ret double %5
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SEEK_END;
int /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, int /*<<< orphan*/,
                         int /*<<< orphan*/);
long ftell(int /*<<< orphan*/ *);
long fsize(FILE *f) {
  fseek(f, 0, SEEK_END);
  long size = ftell(f);
  fseek(f, 0, SEEK_SET);
  return size;
}


x86 assembly (clang, -O0):
<fsize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2eb1(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1040 <fseek@plt>
mov    -0x8(%rbp),%rdi
call   1030 <ftell@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2e80(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1040 <fseek@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fsize>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2eba(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1040 <fseek@plt>
mov    %rbx,%rdi
call   1030 <ftell@plt>
mov    %rax,%r14
mov    0x2e8f(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1040 <fseek@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
define i64 @fsize(i32* %0) {
%2 = alloca i32*
%3 = alloca i64
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = load i32, i32* @SEEK_END
%6 = call i32 @fseek(i32* %4, i32 0, i32 %5)
%7 = load i32*, i32** %2
%8 = call i64 @ftell(i32* %7)
store i64 %8, i64* %3
%9 = load i32*, i32** %2
%10 = load i32, i32* @SEEK_SET
%11 = call i32 @fseek(i32* %9, i32 0, i32 %10)
%12 = load i64, i64* %3
ret i64 %12
}

LLVM IR (-O2):
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
define i64 @fsize(i32* nocapture %0) {
%2 = load i32, i32* @SEEK_END
%3 = tail call i32 @fseek(i32* %0, i32 0, i32 %2)
%4 = tail call i64 @ftell(i32* %0)
%5 = load i32, i32* @SEEK_SET
%6 = tail call i32 @fseek(i32* %0, i32 0, i32 %5)
ret i64 %4
}
int test_imm_A2uint8_reg(unsigned char val) {
  return ((val) & (-0xA2 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_A2uint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edx
and    $0xffffff5e,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_A2uint8_reg(i8 zeroext %0) {
%2 = and i8 %0, 94
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stdout;
void sysError(const char *msg) {
  fprintf(stdout, "Error: %s\n\n", msg);
  exit(0);
}


x86 assembly (clang, -O0):
<sysError>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<sysError>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [12 x i8] c"Error: %s\0A\0A\00"
define void @sysError(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stdout
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [12 x i8] c"Error: %s\0A\0A\00"
define void @sysError(i8* %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 0)
unreachable
}
foo6() {}


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

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

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

LLVM IR (-O2):
define i32 @foo6() {
ret i32 undef
}
void yy_1_XmlAttributeStar(char *yytext, int yyleng) {
  ;
  ;
}


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

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

LLVM IR (-O0):
define void @yy_1_XmlAttributeStar(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
define void @yy_1_XmlAttributeStar(i8* nocapture %0, i32 %1) {
ret void
}
int test_imm_B4int64_lowword_reg(long long val) {
  return ((val) & (0xB4 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_B4int64_lowword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
and    $0xb4,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_B4int64_lowword_reg(i64 %0) {
%2 = and i64 %0, 180
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
char *strtok_r(char *restrict str, const char *restrict delim,
               char **restrict saveptr) {
  return NULL;
}


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

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

LLVM IR (-O0):
define i8* @strtok_r(i8* noalias %0, i8* noalias %1, i8** noalias %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8**
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8** %2, i8*** %6
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @strtok_r(i8* noalias nocapture readnone %0, i8* noalias nocapture readnone %1, i8** noalias nocapture readnone %2) {
ret i8* null
}
void foo716() {}


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

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

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

LLVM IR (-O2):
define void @foo716() {
ret void
}
/* Type definitions */
struct UPnPService {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void AVRCP_ResponseSink_AVTransport_Next(struct UPnPService *Service,
                                         int ErrorCode, void *User) {
  printf("AVRCP_ Invoke Response: AVTransport/Next[ErrorCode:%d]()\r\n",
         ErrorCode);
}


x86 assembly (clang, -O0):
<AVRCP_ResponseSink_AVTransport_Next>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0xc(%rbp),%esi
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.UPnPService = type { i32 }
@.str = [59 x i8] c"AVRCP_ Invoke Response: AVTransport/Next[ErrorCode:%d]()\0D\0A\00"
define void @AVRCP_ResponseSink_AVTransport_Next(%struct.UPnPService* %0, i32 %1, i8* %2) {
%4 = alloca %struct.UPnPService*
%5 = alloca i32
%6 = alloca i8*
store %struct.UPnPService* %0, %struct.UPnPService** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i32, i32* %5
%8 = call i32 @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0), i32 %7)
ret void
}

LLVM IR (-O2):
%struct.UPnPService = type { i32 }
@.str = [59 x i8] c"AVRCP_ Invoke Response: AVTransport/Next[ErrorCode:%d]()\0D\0A\00"
define void @AVRCP_ResponseSink_AVTransport_Next(%struct.UPnPService* nocapture readnone %0, i32 %1, i8* nocapture readnone %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ dump_raw_message(char, int *, int, int);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void handle_adsb_frame(uint64_t timestamp, uint8_t *frame, int rs) {
  dump_raw_message('-', frame, (frame[0] >> 3) == 0 ? ((144) / 8) : ((272) / 8),
                   rs);
  fflush(stdout);
}


x86 assembly (clang, -O0):
<handle_adsb_frame>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
sar    $0x3,%ecx
mov    $0x22,%edx
mov    $0x12,%eax
cmp    $0x0,%ecx
cmove  %eax,%edx
mov    -0x14(%rbp),%ecx
mov    $0x2d,%edi
call   1030 <dump_raw_message@plt>
mov    0x2e7d(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<handle_adsb_frame>:
push   %rax
xor    %eax,%eax
cmpl   $0x8,(%rsi)
mov    %edx,%ecx
setae  %al
shl    $0x4,%eax
add    $0x12,%eax
mov    $0x2d,%edi
mov    %eax,%edx
call   1030 <dump_raw_message@plt>
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1040 <fflush@plt>

LLVM IR (-O0):
@stdout = global i32 0
define void @handle_adsb_frame(i32 %0, i32* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32
store i32 %0, i32* %4
store i32* %1, i32** %5
store i32 %2, i32* %6
%7 = load i32*, i32** %5
%8 = load i32*, i32** %5
%9 = getelementptr inbounds i32, i32* %8, i64 0
%10 = load i32, i32* %9
%11 = ashr i32 %10, 3
%12 = icmp eq i32 %11, 0
%13 = zext i1 %12 to i64
%14 = select i1 %12, i32 18, i32 34
%15 = load i32, i32* %6
%16 = call i32 @dump_raw_message(i8 signext 45, i32* %7, i32 %14, i32 %15)
%17 = load i32, i32* @stdout
%18 = call i32 @fflush(i32 %17)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
define void @handle_adsb_frame(i32 %0, i32* %1, i32 %2) {
%4 = load i32, i32* %1
%5 = icmp ult i32 %4, 8
%6 = select i1 %5, i32 18, i32 34
%7 = tail call i32 @dump_raw_message(i8 signext 45, i32* %1, i32 %6, i32 %2)
%8 = load i32, i32* @stdout
%9 = tail call i32 @fflush(i32 %8)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ smp_test_sig_addset();
void smp_test_sig_main() { smp_test_sig_addset(); }


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

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

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

LLVM IR (-O2):
define void @smp_test_sig_main() {
%1 = tail call i32 (...) @smp_test_sig_addset()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ strlen(char *);
char *wPopString();
int /*<<< orphan*/ wPushNumber(int /*<<< orphan*/);
void wBasLen() {
  char *string;
  string = wPopString();
  wPushNumber(strlen(string));
  free(string);
}


x86 assembly (clang, -O0):
<wBasLen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <wPopString@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <strlen@plt>
mov    %eax,%edi
call   1060 <wPushNumber@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wBasLen>:
push   %rbx
xor    %eax,%eax
call   1040 <wPopString@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1050 <strlen@plt>
mov    %eax,%edi
call   1060 <wPushNumber@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @wBasLen() {
%1 = alloca i8*
%2 = call i8* (...) @wPopString()
store i8* %2, i8** %1
%3 = load i8*, i8** %1
%4 = call i32 @strlen(i8* %3)
%5 = call i32 @wPushNumber(i32 %4)
%6 = load i8*, i8** %1
%7 = call i32 @free(i8* %6)
ret void
}

LLVM IR (-O2):
define void @wBasLen() {
%1 = tail call i8* (...) @wPopString()
%2 = tail call i32 @strlen(i8* %1)
%3 = tail call i32 @wPushNumber(i32 %2)
%4 = tail call i32 @free(i8* %1)
ret void
}
/* Type definitions */
typedef scalar_t__ uint64_t;
struct timeval {
  int tv_sec;
  scalar_t__ tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/);
uint64_t CurrentMicrosec() {
  struct timeval t;
  gettimeofday(&t, 0);
  uint64_t d = t.tv_sec * 1000000 + t.tv_usec;
  return d;
}


x86 assembly (clang, -O0):
<CurrentMicrosec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x10(%rbp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
imul   $0xf4240,-0x10(%rbp),%eax
cltq
add    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CurrentMicrosec>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
movslq 0x8(%rsp),%rax
imul   $0xf4240,%rax,%rax
add    0x10(%rsp),%rax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i64 }
define i64 @CurrentMicrosec() {
%1 = alloca %struct.timeval
%2 = alloca i64
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32 0)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%5 = load i32, i32* %4
%6 = mul nsw i32 %5, 1000000
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%9 = load i64, i64* %8
%10 = add nsw i64 %7, %9
store i64 %10, i64* %2
%11 = load i64, i64* %2
ret i64 %11
}

LLVM IR (-O2):
%struct.timeval = type { i32, i64 }
define i64 @CurrentMicrosec() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32 0)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%5 = load i32, i32* %4
%6 = mul nsw i32 %5, 1000000
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%9 = load i64, i64* %8
%10 = add nsw i64 %9, %7
ret i64 %10
}
void rop3_76_0_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = *D & T;
  stk2 = ~stk2;
  stk1 = S & stk2;
  *D = stk1;
}


x86 assembly (clang, -O0):
<rop3_76_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xa(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0xc(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xc(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xc(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xb(%rbp)
mov    -0xb(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_76_0_0>:
and    (%rdi),%dl
not    %dl
and    %sil,%dl
mov    %dl,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_76_0_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%9 = load i8*, i8** %4
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = load i8, i8* %6
%13 = zext i8 %12 to i32
%14 = and i32 %11, %13
%15 = trunc i32 %14 to i8
store i8 %15, i8* %8
%16 = load i8, i8* %8
%17 = zext i8 %16 to i32
%18 = xor i32 %17, -1
%19 = trunc i32 %18 to i8
store i8 %19, i8* %8
%20 = load i8, i8* %5
%21 = zext i8 %20 to i32
%22 = load i8, i8* %8
%23 = zext i8 %22 to i32
%24 = and i32 %21, %23
%25 = trunc i32 %24 to i8
store i8 %25, i8* %7
%26 = load i8, i8* %7
%27 = load i8*, i8** %4
store i8 %26, i8* %27
ret void
}

LLVM IR (-O2):
define void @rop3_76_0_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = and i8 %4, %2
%6 = xor i8 %5, -1
%7 = and i8 %6, %1
store i8 %7, i8* %0
ret void
}