xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ islower(int);
void t_islower_0x61() {
  Assert_real((islower(97)),
              "/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_islower.c",
              490, ("islower should be 1 for a"));
}


x86 assembly (clang, -O0):
<t_islower_0x61>:
push   %rbp
mov    %rsp,%rbp
mov    $0x61,%edi
call   1030 <islower@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x1ea,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_islower_0x61>:
push   %rax
mov    $0x61,%edi
call   1030 <islower@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x1ea,%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_islower.c\00"
@.str.1 = [26 x i8] c"islower should be 1 for a\00"
define void @t_islower_0x61() {
%1 = call i32 @islower(i32 97)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 490, i8* getelementptr inbounds ([26 x i8], [26 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_islower.c\00"
@.str.1 = [26 x i8] c"islower should be 1 for a\00"
define void @t_islower_0x61() {
%1 = tail call i32 @islower(i32 97)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 490, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
double log(double);
int sqrt(double);
double saltCorrectS(double mv, double dv, double dntp) {
  if (dv <= 0)
    dntp = dv;
  return 0.368 * ((log((mv + 120 * (sqrt(dv - dntp))) / 1000)));
}


x86 assembly (clang, -O0):
<saltCorrectS>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     114f <saltCorrectS+0x2f>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
subsd  -0x18(%rbp),%xmm0
call   1040 <sqrt@plt>
movsd  -0x20(%rbp),%xmm0
imul   $0x78,%eax,%eax
cvtsi2sd %eax,%xmm1
addsd  %xmm1,%xmm0
movsd  0xe88(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1030 <log@plt>
movaps %xmm0,%xmm1
movsd  0xe6c(%rip),%xmm0
mulsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<saltCorrectS>:
push   %rax
movsd  %xmm0,(%rsp)
xorpd  %xmm0,%xmm0
movapd %xmm1,%xmm3
cmpnlesd %xmm0,%xmm3
andpd  %xmm3,%xmm2
andnpd %xmm1,%xmm3
orpd   %xmm2,%xmm3
subsd  %xmm3,%xmm1
movapd %xmm1,%xmm0
call   1040 <sqrt@plt>
imul   $0x78,%eax,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
addsd  (%rsp),%xmm0
divsd  0xe9d(%rip),%xmm0
call   1030 <log@plt>
mulsd  0xe98(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @saltCorrectS(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %5
%8 = fcmp ole double %7, 0.000000e+00
br i1 %8, label %9, label %11
9: ; preds = %3
%10 = load double, double* %5
store double %10, double* %6
br label %11
11: ; preds = %9, %3
%12 = load double, double* %4
%13 = load double, double* %5
%14 = load double, double* %6
%15 = fsub double %13, %14
%16 = call i32 @sqrt(double %15)
%17 = mul nsw i32 120, %16
%18 = sitofp i32 %17 to double
%19 = fadd double %12, %18
%20 = fdiv double %19, 1.000000e+03
%21 = call double @log(double %20)
%22 = fmul double 3.680000e-01, %21
ret double %22
}

LLVM IR (-O2):
define double @saltCorrectS(double %0, double %1, double %2) {
%4 = fcmp ugt double %1, 0.000000e+00
%5 = select i1 %4, double %2, double %1
%6 = fsub double %1, %5
%7 = tail call i32 @sqrt(double %6)
%8 = mul nsw i32 %7, 120
%9 = sitofp i32 %8 to double
%10 = fadd double %9, %0
%11 = fdiv double %10, 1.000000e+03
%12 = tail call double @log(double %11)
%13 = fmul double %12, 3.680000e-01
ret double %13
}
/* Variables and functions */
double __getMhz();
double getMhz(void) {
  static double mhz = 0.0;
  if (mhz == 0.0) {
    mhz = __getMhz();
  }
  return mhz;
}


x86 assembly (clang, -O0):
<getMhz>:
push   %rbp
mov    %rsp,%rbp
movsd  0x2f14(%rip),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    113e <getMhz+0x2e>
jp     113e <getMhz+0x2e>
mov    $0x0,%al
call   1030 <__getMhz@plt>
movsd  %xmm0,0x2ef2(%rip)
movsd  0x2eea(%rip),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<getMhz>:
push   %rax
movsd  0x2f17(%rip),%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1134 <getMhz+0x24>
jp     1134 <getMhz+0x24>
xor    %eax,%eax
call   1030 <__getMhz@plt>
movsd  %xmm0,0x2efc(%rip)
pop    %rax
ret

LLVM IR (-O0):
@getMhz.mhz = internal global double 0.000000e+00
define double @getMhz() {
%1 = load double, double* @getMhz.mhz
%2 = fcmp oeq double %1, 0.000000e+00
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call double (...) @__getMhz()
store double %4, double* @getMhz.mhz
br label %5
5: ; preds = %3, %0
%6 = load double, double* @getMhz.mhz
ret double %6
}

LLVM IR (-O2):
@getMhz.mhz = internal unnamed_addr global double 0.000000e+00
define double @getMhz() {
%1 = load double, double* @getMhz.mhz
%2 = fcmp oeq double %1, 0.000000e+00
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call double (...) @__getMhz()
store double %4, double* @getMhz.mhz
br label %5
5: ; preds = %3, %0
%6 = phi double [ %4, %3 ], [ %1, %0 ]
ret double %6
}
void v2d(vec) double vec[2];
{
  float v[2];
  v[0] = vec[0];
  v[1] = vec[1];
  vcall(v, 2);
}


x86 assembly (clang, -O0):
<v2d>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
lea    -0x10(%rbp),%rdi
mov    $0x2,%esi
mov    $0x0,%al
call   1030 <vcall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<v2d>:
push   %rax
movsd  (%rdi),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,(%rsp)
movsd  0x8(%rdi),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0x4(%rsp)
mov    %rsp,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1030 <vcall@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @v2d(double* %0) {
%2 = alloca double*
%3 = alloca [2 x float]
store double* %0, double** %2
%4 = load double*, double** %2
%5 = getelementptr inbounds double, double* %4, i64 0
%6 = load double, double* %5
%7 = fptrunc double %6 to float
%8 = getelementptr inbounds [2 x float], [2 x float]* %3, i64 0, i64 0
store float %7, float* %8
%9 = load double*, double** %2
%10 = getelementptr inbounds double, double* %9, i64 1
%11 = load double, double* %10
%12 = fptrunc double %11 to float
%13 = getelementptr inbounds [2 x float], [2 x float]* %3, i64 0, i64 1
store float %12, float* %13
%14 = getelementptr inbounds [2 x float], [2 x float]* %3, i64 0, i64 0
%15 = call i32 (float*, i32, ...) bitcast (i32 (...)* @vcall to i32 (float*, i32, ...)*)(float* %14, i32 2)
ret void
}

LLVM IR (-O2):
define void @v2d(double* nocapture %0) {
%2 = alloca [2 x float]
%3 = bitcast [2 x float]* %2 to i8*
%4 = load double, double* %0
%5 = fptrunc double %4 to float
%6 = getelementptr inbounds [2 x float], [2 x float]* %2, i64 0, i64 0
store float %5, float* %6
%7 = getelementptr inbounds double, double* %0, i64 1
%8 = load double, double* %7
%9 = fptrunc double %8 to float
%10 = getelementptr inbounds [2 x float], [2 x float]* %2, i64 0, i64 1
store float %9, float* %10
%11 = call i32 (float*, i32, ...) bitcast (i32 (...)* @vcall to i32 (float*, i32, ...)*)(float* %6, i32 2)
ret void
}
/* Type definitions */
struct DIR {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
int closedir(struct DIR *dirp) {
  errno = ENOSYS;
  return -1;
}


x86 assembly (clang, -O0):
<closedir>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    0x2ed9(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec0(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<closedir>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
%struct.DIR = type { i32 }
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @closedir(%struct.DIR* %0) {
%2 = alloca %struct.DIR*
store %struct.DIR* %0, %struct.DIR** %2
%3 = load i32, i32* @ENOSYS
store i32 %3, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
%struct.DIR = type { i32 }
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @closedir(%struct.DIR* nocapture readnone %0) {
%2 = load i32, i32* @ENOSYS
store i32 %2, i32* @errno
ret i32 -1
}
long NET_recvPadData(void *pData, int Pad) { return 0; }


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

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

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

LLVM IR (-O2):
define i64 @NET_recvPadData(i8* nocapture readnone %0, i32 %1) {
ret i64 0
}
/* Variables and functions */
double THRandom_exponential(double);
double Random_exponential(double lambda) {
  return THRandom_exponential(lambda);
}


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

x86 assembly (clang, -O2):
<Random_exponential>:
jmp    1030 <THRandom_exponential@plt>

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

LLVM IR (-O2):
define double @Random_exponential(double %0) {
%2 = tail call double @THRandom_exponential(double %0)
ret double %2
}
swap(int *a, int *b) {
  int t = *a;
  *a = *b;
  *b = t;
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x1c(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @swap(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
store i32 %4, i32* %0
store i32 %3, i32* %1
ret i32 undef
}
void gtk_ruler_draw_ticks() {}


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

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

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

LLVM IR (-O2):
define void @gtk_ruler_draw_ticks() {
ret void
}
/* Variables and functions */
char *print_vfpu_reg(int, int, char, char, char *);
char *print_vfpumtriple(int reg, char *output) {
  if ((reg >> 6) & 1) {
    return print_vfpu_reg(reg, 1, 'M', 'E', output);
  } else {
    return print_vfpu_reg(reg, 0, 'M', 'E', output);
  }
}


x86 assembly (clang, -O0):
<print_vfpumtriple>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0xc(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0xc(%rbp),%eax
sar    $0x6,%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1155 <print_vfpumtriple+0x45>
mov    -0xc(%rbp),%edi
mov    -0x18(%rbp),%r8
mov    $0x1,%esi
mov    $0x4d,%edx
mov    $0x45,%ecx
call   1030 <print_vfpu_reg@plt>
mov    %rax,-0x8(%rbp)
jmp    1171 <print_vfpumtriple+0x61>
mov    -0xc(%rbp),%edi
mov    -0x18(%rbp),%r8
xor    %esi,%esi
mov    $0x4d,%edx
mov    $0x45,%ecx
call   1030 <print_vfpu_reg@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_vfpumtriple>:
mov    %rsi,%r8
mov    %edi,%esi
shr    $0x6,%esi
and    $0x1,%esi
mov    $0x4d,%edx
mov    $0x45,%ecx
jmp    1030 <print_vfpu_reg@plt>

LLVM IR (-O0):
define i8* @print_vfpumtriple(i32 %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
store i32 %0, i32* %4
store i8* %1, i8** %5
%6 = load i32, i32* %4
%7 = ashr i32 %6, 6
%8 = and i32 %7, 1
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %14
10: ; preds = %2
%11 = load i32, i32* %4
%12 = load i8*, i8** %5
%13 = call i8* @print_vfpu_reg(i32 %11, i32 1, i8 signext 77, i8 signext 69, i8* %12)
store i8* %13, i8** %3
br label %18
14: ; preds = %2
%15 = load i32, i32* %4
%16 = load i8*, i8** %5
%17 = call i8* @print_vfpu_reg(i32 %15, i32 0, i8 signext 77, i8 signext 69, i8* %16)
store i8* %17, i8** %3
br label %18
18: ; preds = %14, %10
%19 = load i8*, i8** %3
ret i8* %19
}

LLVM IR (-O2):
define i8* @print_vfpumtriple(i32 %0, i8* %1) {
%3 = lshr i32 %0, 6
%4 = and i32 %3, 1
%5 = tail call i8* @print_vfpu_reg(i32 %0, i32 %4, i8 signext 77, i8 signext 69, i8* %1)
ret i8* %5
}
double lanc_seconds(void) {
  extern int LANCZOS_TIME;
  double seconds();
  if (LANCZOS_TIME) {
    return (seconds());
  }
  return (0);
}


x86 assembly (clang, -O0):
<lanc_seconds>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ec1(%rip),%rax
cmpl   $0x0,(%rax)
je     1139 <lanc_seconds+0x29>
mov    $0x0,%al
call   1030 <seconds@plt>
movsd  %xmm0,-0x8(%rbp)
jmp    1141 <lanc_seconds+0x31>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lanc_seconds>:
mov    0x2ec9(%rip),%rax
cmpl   $0x0,(%rax)
je     1123 <lanc_seconds+0x13>
xor    %eax,%eax
jmp    1030 <seconds@plt>
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
@LANCZOS_TIME = external global i32
define double @lanc_seconds() {
%1 = alloca double
%2 = load i32, i32* @LANCZOS_TIME
%3 = icmp ne i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call double (...) @seconds()
store double %5, double* %1
br label %7
6: ; preds = %0
store double 0.000000e+00, double* %1
br label %7
7: ; preds = %6, %4
%8 = load double, double* %1
ret double %8
}

LLVM IR (-O2):
@LANCZOS_TIME = external global i32
define double @lanc_seconds() {
%1 = load i32, i32* @LANCZOS_TIME
%2 = icmp eq i32 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call double (...) @seconds()
br label %5
5: ; preds = %0, %3
%6 = phi double [ %4, %3 ], [ 0.000000e+00, %0 ]
ret double %6
}
/* Variables and functions */
int /*<<< orphan*/ CmdEndParagraph(int /*<<< orphan*/);
int /*<<< orphan*/ CmdIndent(int);
int /*<<< orphan*/ CmdVspace(int);
void FinishDisplayedBitmap(void) {
  CmdEndParagraph(0);
  CmdVspace(1);
  CmdIndent(2);
}


x86 assembly (clang, -O0):
<FinishDisplayedBitmap>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1050 <CmdEndParagraph@plt>
mov    $0x1,%edi
call   1030 <CmdVspace@plt>
mov    $0x2,%edi
call   1040 <CmdIndent@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<FinishDisplayedBitmap>:
push   %rax
xor    %edi,%edi
call   1050 <CmdEndParagraph@plt>
mov    $0x1,%edi
call   1030 <CmdVspace@plt>
mov    $0x2,%edi
pop    %rax
jmp    1040 <CmdIndent@plt>

LLVM IR (-O0):
define void @FinishDisplayedBitmap() {
%1 = call i32 @CmdEndParagraph(i32 0)
%2 = call i32 @CmdVspace(i32 1)
%3 = call i32 @CmdIndent(i32 2)
ret void
}

LLVM IR (-O2):
define void @FinishDisplayedBitmap() {
%1 = tail call i32 @CmdEndParagraph(i32 0)
%2 = tail call i32 @CmdVspace(i32 1)
%3 = tail call i32 @CmdIndent(i32 2)
ret void
}
/* Variables and functions */
scalar_t__ execl(char *, char *, char *, int /*<<< orphan*/ *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
void execute_command(char *str_command, char *str_params) {
  if ((execl(str_command, str_params, str_params, NULL) < 0)) {
    perror("Error en el execl\n");
    exit(-1);
  }
}


x86 assembly (clang, -O0):
<execute_command>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x10(%rbp),%rdx
xor    %eax,%eax
mov    %eax,%ecx
call   1050 <execl@plt>
cmp    $0x0,%rax
jge    1175 <execute_command+0x45>
lea    0xe9a(%rip),%rdi
call   1030 <perror@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<execute_command>:
push   %rax
mov    %rsi,%rdx
xor    %ecx,%ecx
call   1050 <execl@plt>
test   %rax,%rax
js     1142 <execute_command+0x12>
pop    %rax
ret
lea    0xeb7(%rip),%rdi
call   1030 <perror@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"Error en el execl\0A\00"
define void @execute_command(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 = load i8*, i8** %4
%8 = call i64 @execl(i8* %5, i8* %6, i8* %7, i32* null)
%9 = icmp slt i64 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %2
%11 = call i32 @perror(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%12 = call i32 @exit(i32 -1)
unreachable
13: ; preds = %2
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"Error en el execl\0A\00"
define void @execute_command(i8* %0, i8* %1) {
%3 = tail call i64 @execl(i8* %0, i8* %1, i8* %1, i32* null)
%4 = icmp slt i64 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = tail call i32 @perror(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 -1)
unreachable
8: ; preds = %2
ret void
}
int omap_pm_set_max_dev_wakeup_lat_helper(struct device *req_dev,
                                          struct device *dev, long t) {
  return 0;
}


x86 assembly (clang, -O0):
<omap_pm_set_max_dev_wakeup_lat_helper>:
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):
<omap_pm_set_max_dev_wakeup_lat_helper>:
xor    %eax,%eax
ret

LLVM IR (-O0):
%struct.device = type opaque
define i32 @omap_pm_set_max_dev_wakeup_lat_helper(%struct.device* %0, %struct.device* %1, i64 %2) {
%4 = alloca %struct.device*
%5 = alloca %struct.device*
%6 = alloca i64
store %struct.device* %0, %struct.device** %4
store %struct.device* %1, %struct.device** %5
store i64 %2, i64* %6
ret i32 0
}

LLVM IR (-O2):
%struct.device = type opaque
define i32 @omap_pm_set_max_dev_wakeup_lat_helper(%struct.device* nocapture readnone %0, %struct.device* nocapture readnone %1, i64 %2) {
ret i32 0
}
/* Type definitions */
struct ascii85 {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct ascii85 *);
void destroy_ascii85(struct ascii85 *ascii85_p) {
  if (ascii85_p != NULL) {
    free(ascii85_p);
  }
}


x86 assembly (clang, -O0):
<destroy_ascii85>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <destroy_ascii85+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<destroy_ascii85>:
test   %rdi,%rdi
je     111a <destroy_ascii85+0xa>
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
%struct.ascii85 = type { i32 }
define void @destroy_ascii85(%struct.ascii85* %0) {
%2 = alloca %struct.ascii85*
store %struct.ascii85* %0, %struct.ascii85** %2
%3 = load %struct.ascii85*, %struct.ascii85** %2
%4 = icmp ne %struct.ascii85* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load %struct.ascii85*, %struct.ascii85** %2
%7 = call i32 @free(%struct.ascii85* %6)
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
%struct.ascii85 = type { i32 }
define void @destroy_ascii85(%struct.ascii85* %0) {
%2 = icmp eq %struct.ascii85* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(%struct.ascii85* %0)
br label %5
5: ; preds = %3, %1
ret void
}
void wake_lock_init(struct wake_lock *lock, int type, const char *name) {}


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

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

LLVM IR (-O0):
%struct.wake_lock = type opaque
define void @wake_lock_init(%struct.wake_lock* %0, i32 %1, i8* %2) {
%4 = alloca %struct.wake_lock*
%5 = alloca i32
%6 = alloca i8*
store %struct.wake_lock* %0, %struct.wake_lock** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
ret void
}

LLVM IR (-O2):
%struct.wake_lock = type opaque
define void @wake_lock_init(%struct.wake_lock* nocapture %0, i32 %1, i8* nocapture %2) {
ret void
}
int test_imm_E3uint64_midword_mem(unsigned long long *val) {
  return ((*val >> 16) & (0xE3 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_E3uint64_midword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = lshr i64 %4, 16
%6 = and i64 %5, 227
%7 = icmp ne i64 %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_E3uint64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 14876672
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int setevent(char *, char *);
int /*<<< orphan*/ sprintf(char *, char *, char *);
int event_enable(char *event) {
  char path[256];
  sprintf(path, "events/%s/enable", event);
  return setevent(path, "1");
}


x86 assembly (clang, -O0):
<event_enable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x110(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xebf(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x110(%rbp),%rdi
lea    0xebd(%rip),%rsi
call   1030 <setevent@plt>
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<event_enable>:
push   %rbx
sub    $0x100,%rsp
mov    %rdi,%rdx
lea    0xece(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <sprintf@plt>
lea    0xecd(%rip),%rsi
mov    %rbx,%rdi
call   1030 <setevent@plt>
add    $0x100,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"events/%s/enable\00"
@.str.1 = [2 x i8] c"1\00"
define i32 @event_enable(i8* %0) {
%2 = alloca i8*
%3 = alloca [256 x i8]
store i8* %0, i8** %2
%4 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%5 = load i8*, i8** %2
%6 = call i32 @sprintf(i8* %4, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%8 = call i32 @setevent(i8* %7, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret i32 %8
}

LLVM IR (-O2):
@.str = [17 x i8] c"events/%s/enable\00"
@.str.1 = [2 x i8] c"1\00"
define i32 @event_enable(i8* %0) {
%2 = alloca [256 x i8]
%3 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
%4 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = call i32 @setevent(i8* %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ parson_free(char *);
void x_json_free_serialized_string(char *string) { parson_free(string); }


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

x86 assembly (clang, -O2):
<x_json_free_serialized_string>:
jmp    1030 <parson_free@plt>

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

LLVM IR (-O2):
define void @x_json_free_serialized_string(i8* %0) {
%2 = tail call i32 @parson_free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ schedule(scalar_t__);
void run() { schedule(0 - 1); }


x86 assembly (clang, -O0):
<run>:
push   %rbp
mov    %rsp,%rbp
mov    $0xffffffffffffffff,%rdi
call   1030 <schedule@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<run>:
mov    $0xffffffffffffffff,%rdi
jmp    1030 <schedule@plt>

LLVM IR (-O0):
define void @run() {
%1 = call i32 @schedule(i64 -1)
ret void
}

LLVM IR (-O2):
define void @run() {
%1 = tail call i32 @schedule(i64 -1)
ret void
}
int floating_point_3(unsigned long long a) {
  double b = a;
  return 42;
}


x86 assembly (clang, -O0):
<floating_point_3>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movaps 0xef1(%rip),%xmm1
movq   -0x8(%rbp),%xmm0
punpckldq %xmm1,%xmm0
movapd 0xef0(%rip),%xmm1
subpd  %xmm1,%xmm0
movaps %xmm0,%xmm1
unpckhpd %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    $0x2a,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @floating_point_3(i64 %0) {
%2 = alloca i64
%3 = alloca double
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = uitofp i64 %4 to double
store double %5, double* %3
ret i32 42
}

LLVM IR (-O2):
define i32 @floating_point_3(i64 %0) {
ret i32 42
}
/* Variables and functions */
int paged_mem_pool_destroy(void *);
int virtual_machine_resource_pool_page_uninit(void *pool_ptr) {
  return paged_mem_pool_destroy(pool_ptr);
}


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

x86 assembly (clang, -O2):
<virtual_machine_resource_pool_page_uninit>:
jmp    1030 <paged_mem_pool_destroy@plt>

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

LLVM IR (-O2):
define i32 @virtual_machine_resource_pool_page_uninit(i8* %0) {
%2 = tail call i32 @paged_mem_pool_destroy(i8* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void start_counter() {
  printf("ERROR: You are trying to use a start_counter routine in clock.c\n");
  printf("that has not been implemented yet on this platform.\n");
  printf("Please choose another timing package in config.h.\n");
  exit(1);
}


x86 assembly (clang, -O0):
<start_counter>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
lea    0xf0a(%rip),%rdi
call   1030 <printf@plt>
lea    0xf33(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<start_counter>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf0c(%rip),%rdi
call   1030 <puts@plt>
lea    0xf34(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [65 x i8] c"ERROR: You are trying to use a start_counter routine in clock.c\0A\00"
@.str.1 = [53 x i8] c"that has not been implemented yet on this platform.\0A\00"
@.str.2 = [51 x i8] c"Please choose another timing package in config.h.\0A\00"
define void @start_counter() {
%1 = call i32 @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [64 x i8] c"ERROR: You are trying to use a start_counter routine in clock.c\00"
@str.3 = [52 x i8] c"that has not been implemented yet on this platform.\00"
@str.4 = [50 x i8] c"Please choose another timing package in config.h.\00"
define void @start_counter() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str.4, i64 0, i64 0))
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ native_safe_halt();
__attribute__((__section__(".cpuidle.text"))) void arch_safe_halt(void) {
  native_safe_halt();
}


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

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

LLVM IR (-O0):
define void @arch_safe_halt() section ".cpuidle.text" {
%1 = call i32 (...) @native_safe_halt()
ret void
}

LLVM IR (-O2):
define void @arch_safe_halt() section ".cpuidle.text" {
%1 = tail call i32 (...) @native_safe_halt()
ret void
}
void handle_get(int fd) {}


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

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

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

LLVM IR (-O2):
define void @handle_get(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0xfc() {
  Assert_real((isspace(252) == 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_isspace.c",
              1265, ("isspace should be 0 for 0xfc"));
}


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

x86 assembly (clang, -O2):
<t_isspace_0xfc>:
push   %rax
mov    $0xfc,%edi
call   1030 <isspace@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x4f1,%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_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0xfc\00"
define void @t_isspace_0xfc() {
%1 = call i64 @isspace(i32 252)
%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 1265, 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_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0xfc\00"
define void @t_isspace_0xfc() {
%1 = tail call i64 @isspace(i32 252)
%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 1265, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
char *strrchr(char const *, char);
char *file_extension(const char *filename) {
  char *dot_tail = strrchr(filename, '.');
  if ((!dot_tail) || (dot_tail == filename))
    return NULL;
  return dot_tail + 1;
}


x86 assembly (clang, -O0):
<file_extension>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x2e,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1147 <file_extension+0x37>
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jne    1154 <file_extension+0x44>
movq   $0x0,-0x8(%rbp)
jmp    1160 <file_extension+0x50>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<file_extension>:
push   %rbx
mov    %rdi,%rbx
mov    $0x2e,%esi
call   1030 <strrchr@plt>
lea    0x1(%rax),%rcx
xor    %edx,%edx
cmp    %rbx,%rax
cmovne %rcx,%rdx
test   %rax,%rax
cmovne %rdx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @file_extension(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i8* @strrchr(i8* %5, i8 signext 46)
store i8* %6, i8** %4
%7 = load i8*, i8** %4
%8 = icmp ne i8* %7, null
br i1 %8, label %9, label %13
9: ; preds = %1
%10 = load i8*, i8** %4
%11 = load i8*, i8** %3
%12 = icmp eq i8* %10, %11
br i1 %12, label %13, label %14
13: ; preds = %9, %1
store i8* null, i8** %2
br label %17
14: ; preds = %9
%15 = load i8*, i8** %4
%16 = getelementptr inbounds i8, i8* %15, i64 1
store i8* %16, i8** %2
br label %17
17: ; preds = %14, %13
%18 = load i8*, i8** %2
ret i8* %18
}

LLVM IR (-O2):
define i8* @file_extension(i8* %0) {
%2 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 46)
%3 = icmp eq i8* %2, null
%4 = icmp eq i8* %2, %0
%5 = or i1 %3, %4
%6 = getelementptr inbounds i8, i8* %2, i64 1
%7 = select i1 %5, i8* null, i8* %6
ret i8* %7
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char const *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, long);
scalar_t__ getpid();
void create_pidfile(const char *pidfile) {
  FILE *fp = fopen(pidfile, "w");
  if (fp) {
    fprintf(fp, "%ld\n", (long)getpid());
    fclose(fp);
  }
}


x86 assembly (clang, -O0):
<create_pidfile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xea9(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1196 <create_pidfile+0x56>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    -0x18(%rbp),%rdi
mov    %rax,%rdx
lea    0xe7a(%rip),%rsi
call   1050 <fprintf@plt>
mov    -0x10(%rbp),%rdi
call   1040 <fclose@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<create_pidfile>:
push   %rbx
lea    0xeb8(%rip),%rsi
call   1060 <fopen@plt>
test   %rax,%rax
je     1177 <create_pidfile+0x37>
mov    %rax,%rbx
xor    %eax,%eax
call   1030 <getpid@plt>
lea    0xe9f(%rip),%rsi
mov    %rbx,%rdi
mov    %rax,%rdx
call   1050 <fprintf@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <fclose@plt>
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [2 x i8] c"w\00"
@.str.1 = [5 x i8] c"%ld\0A\00"
define void @create_pidfile(i8* nocapture %0) {
%2 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32* %2, null
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i64 (...) @getpid()
%6 = tail call i32 @fprintf(i32* %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 %5)
%7 = tail call i32 @fclose(i32* %2)
br label %8
8: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ eputc(char);
int /*<<< orphan*/ eputd(int);
void eputdln(int i) {
  eputd(i);
  eputc('\n');
}


x86 assembly (clang, -O0):
<eputdln>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <eputd@plt>
mov    $0xa,%edi
call   1040 <eputc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eputdln>:
push   %rax
call   1030 <eputd@plt>
mov    $0xa,%edi
pop    %rax
jmp    1040 <eputc@plt>

LLVM IR (-O0):
define void @eputdln(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @eputd(i32 %3)
%5 = call i32 @eputc(i8 signext 10)
ret void
}

LLVM IR (-O2):
define void @eputdln(i32 %0) {
%2 = tail call i32 @eputd(i32 %0)
%3 = tail call i32 @eputc(i8 signext 10)
ret void
}
/* Variables and functions */
char *strrchr(char *, char);
char *efaxbasename(char *p) {
  return strrchr(p, '/') ? strrchr(p, '/') + 1 : p;
}


x86 assembly (clang, -O0):
<efaxbasename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2f,%esi
call   1030 <strrchr@plt>
cmp    $0x0,%rax
je     114f <efaxbasename+0x3f>
mov    -0x8(%rbp),%rdi
mov    $0x2f,%esi
call   1030 <strrchr@plt>
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1157 <efaxbasename+0x47>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<efaxbasename>:
push   %rbx
mov    %rdi,%rbx
mov    $0x2f,%esi
call   1030 <strrchr@plt>
lea    0x1(%rax),%rcx
test   %rax,%rax
cmove  %rbx,%rcx
mov    %rcx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @efaxbasename(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* @strrchr(i8* %3, i8 signext 47)
%5 = icmp ne i8* %4, null
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = call i8* @strrchr(i8* %7, i8 signext 47)
%9 = getelementptr inbounds i8, i8* %8, i64 1
br label %12
10: ; preds = %1
%11 = load i8*, i8** %2
br label %12
12: ; preds = %10, %6
%13 = phi i8* [ %9, %6 ], [ %11, %10 ]
ret i8* %13
}

LLVM IR (-O2):
define i8* @efaxbasename(i8* %0) {
%2 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 47)
%3 = icmp eq i8* %2, null
%4 = getelementptr inbounds i8, i8* %2, i64 1
%5 = select i1 %3, i8* %0, i8* %4
ret i8* %5
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ inl(int);
uint32_t serial_in(unsigned dev, int offset) {
  return inl((0x4000C000 + (0x1000 * (dev))) + offset);
}


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

x86 assembly (clang, -O2):
<serial_in>:
shl    $0xc,%edi
add    %esi,%edi
add    $0x4000c000,%edi
jmp    1030 <inl@plt>

LLVM IR (-O0):
define i32 @serial_in(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 = mul i32 4096, %5
%7 = add i32 1073790976, %6
%8 = load i32, i32* %4
%9 = add i32 %7, %8
%10 = call i32 @inl(i32 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @serial_in(i32 %0, i32 %1) {
%3 = shl i32 %0, 12
%4 = add i32 %3, 1073790976
%5 = add i32 %4, %1
%6 = tail call i32 @inl(i32 %5)
ret i32 %6
}
double sqr(double x) { return (x == 0.0) ? 0.0 : x * x; }


x86 assembly (clang, -O0):
<sqr>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    112e <sqr+0x2e>
jp     112e <sqr+0x2e>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    113d <sqr+0x3d>
movsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<sqr>:
movapd %xmm0,%xmm1
mulsd  %xmm0,%xmm1
xorpd  %xmm2,%xmm2
cmpeqsd %xmm2,%xmm0
andnpd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @sqr(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp oeq double %3, 0.000000e+00
br i1 %4, label %5, label %6
5: ; preds = %1
br label %10
6: ; preds = %1
%7 = load double, double* %2
%8 = load double, double* %2
%9 = fmul double %7, %8
br label %10
10: ; preds = %6, %5
%11 = phi double [ 0.000000e+00, %5 ], [ %9, %6 ]
ret double %11
}

LLVM IR (-O2):
define double @sqr(double %0) {
%2 = fcmp oeq double %0, 0.000000e+00
%3 = fmul double %0, %0
%4 = select i1 %2, double 0.000000e+00, double %3
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, char const *, unsigned int);
char *encode(char *buf, const char *data, unsigned int length) {
  memcpy(buf, data, length);
  return buf + length;
}


x86 assembly (clang, -O0):
<encode>:
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 <memcpy@plt>
mov    -0x8(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    %rcx,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<encode>:
push   %r14
push   %rbx
push   %rax
mov    %edx,%ebx
mov    %rdi,%r14
call   1030 <memcpy@plt>
mov    %ebx,%eax
add    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @encode(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i32 @memcpy(i8* %7, i8* %8, i32 %9)
%11 = load i8*, i8** %4
%12 = load i32, i32* %6
%13 = zext i32 %12 to i64
%14 = getelementptr inbounds i8, i8* %11, i64 %13
ret i8* %14
}

LLVM IR (-O2):
define i8* @encode(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @memcpy(i8* %0, i8* %1, i32 %2)
%5 = zext i32 %2 to i64
%6 = getelementptr inbounds i8, i8* %0, i64 %5
ret i8* %6
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  short lbearing;
};
struct TYPE_4__ {
  TYPE_1__ min_bounds;
};
typedef TYPE_2__ XFontStruct;

/* Variables and functions */
void set_XFontStruct_min_bounds_lbearing(void *_p, short _v) {
  ((XFontStruct *)_p)->min_bounds.lbearing = (short)_v;
}


x86 assembly (clang, -O0):
<set_XFontStruct_min_bounds_lbearing>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
mov    -0xa(%rbp),%cx
mov    -0x8(%rbp),%rax
mov    %cx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_XFontStruct_min_bounds_lbearing>:
mov    %si,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i16 }
define void @set_XFontStruct_min_bounds_lbearing(i8* %0, i16 signext %1) {
%3 = alloca i8*
%4 = alloca i16
store i8* %0, i8** %3
store i16 %1, i16* %4
%5 = load i16, i16* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_4__*
%8 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %7, i32 0, i32 0
%9 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %8, i32 0, i32 0
store i16 %5, i16* %9
ret void
}

LLVM IR (-O2):
define void @set_XFontStruct_min_bounds_lbearing(i8* nocapture writeonly %0, i16 signext %1) {
%3 = bitcast i8* %0 to i16*
store i16 %1, i16* %3
ret void
}
/* Variables and functions */
long long dusec_now();
long long dsec_now(void) { return dusec_now() / 1000000LL; }


x86 assembly (clang, -O0):
<dsec_now>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <dusec_now@plt>
mov    $0xf4240,%ecx
cqto
idiv   %rcx
pop    %rbp
ret

x86 assembly (clang, -O2):
<dsec_now>:
push   %rax
xor    %eax,%eax
call   1030 <dusec_now@plt>
movabs $0x431bde82d7b634db,%rcx
de 1b 43
imul   %rcx
mov    %rdx,%rax
shr    $0x3f,%rax
sar    $0x12,%rdx
add    %rdx,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @dsec_now() {
%1 = call i64 (...) @dusec_now()
%2 = sdiv i64 %1, 1000000
ret i64 %2
}

LLVM IR (-O2):
define i64 @dsec_now() {
%1 = tail call i64 (...) @dusec_now()
%2 = sdiv i64 %1, 1000000
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ usleep(int);
void _mdelay(int t) { usleep(t * 1000); }


x86 assembly (clang, -O0):
<_mdelay>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
imul   $0x3e8,-0x4(%rbp),%edi
call   1030 <usleep@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_mdelay>:
imul   $0x3e8,%edi,%edi
jmp    1030 <usleep@plt>

LLVM IR (-O0):
define void @_mdelay(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul nsw i32 %3, 1000
%5 = call i32 @usleep(i32 %4)
ret void
}

LLVM IR (-O2):
define void @_mdelay(i32 %0) {
%2 = mul nsw i32 %0, 1000
%3 = tail call i32 @usleep(i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, size_t);
void zero_n(void *dest, size_t n) { memset(dest, 0, n); }


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

x86 assembly (clang, -O2):
<zero_n>:
mov    %rsi,%rdx
xor    %esi,%esi
jmp    1030 <memset@plt>

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

LLVM IR (-O2):
define void @zero_n(i8* %0, i64 %1) {
%3 = tail call i32 @memset(i8* %0, i32 0, i64 %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
size_t readdelim(char **, size_t *, char, int /*<<< orphan*/ *);
size_t readline(char **lineptr, size_t *n, FILE *stream) {
  return readdelim(lineptr, n, '\n', stream);
}


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

x86 assembly (clang, -O2):
<readline>:
mov    %rdx,%rcx
mov    $0xa,%edx
jmp    1030 <readdelim@plt>

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

LLVM IR (-O2):
define i64 @readline(i8** %0, i64* %1, i32* %2) {
%4 = tail call i64 @readdelim(i8** %0, i64* %1, i8 signext 10, i32* %2)
ret i64 %4
}
/* Type definitions */
struct options {
  int dummy;
};

/* Variables and functions */
int do_solve(struct options const *, int);
int cmd_solve(const struct options *opt) { return do_solve(opt, 1); }


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

x86 assembly (clang, -O2):
<cmd_solve>:
mov    $0x1,%esi
jmp    1030 <do_solve@plt>

LLVM IR (-O0):
%struct.options = type { i32 }
define i32 @cmd_solve(%struct.options* %0) {
%2 = alloca %struct.options*
store %struct.options* %0, %struct.options** %2
%3 = load %struct.options*, %struct.options** %2
%4 = call i32 @do_solve(%struct.options* %3, i32 1)
ret i32 %4
}

LLVM IR (-O2):
%struct.options = type { i32 }
define i32 @cmd_solve(%struct.options* %0) {
%2 = tail call i32 @do_solve(%struct.options* %0, i32 1)
ret i32 %2
}