xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void help(void) {
  fprintf(stderr, "usage: coscmt [-h] [-l] [-o outfile] [infiles]\n");
  exit(EXIT_FAILURE);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [48 x i8] c"usage: coscmt [-h] [-l] [-o outfile] [infiles]\0A\00"
@EXIT_FAILURE = global i32 0
define void @help() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EXIT_FAILURE
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [48 x i8] c"usage: coscmt [-h] [-l] [-o outfile] [infiles]\0A\00"
@EXIT_FAILURE = global i32 0
define void @help() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EXIT_FAILURE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ execl(char *, char *, char *, int /*<<< orphan*/ *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, ...);
int main() {
  int salida = 0;
  printf("Ejemplo exec\n");
  execl("/bin/ls", "ls", "-1", NULL);
  printf("Salida: %d\n", salida);
  exit(salida);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
lea    0xeb3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeb3(%rip),%rdi
lea    0xeb1(%rip),%rsi
lea    0xead(%rip),%rdx
xor    %eax,%eax
mov    %eax,%ecx
call   1050 <execl@plt>
mov    -0x8(%rbp),%esi
lea    0xe9d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xecf(%rip),%rdi
call   1030 <puts@plt>
lea    0xeac(%rip),%rdi
lea    0xeaa(%rip),%rsi
lea    0xea6(%rip),%rdx
xor    %ecx,%ecx
call   1060 <execl@plt>
lea    0xe9b(%rip),%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"Ejemplo exec\0A\00"
@.str.1 = [8 x i8] c"/bin/ls\00"
@.str.2 = [3 x i8] c"ls\00"
@.str.3 = [3 x i8] c"-1\00"
@.str.4 = [12 x i8] c"Salida: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @execl(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* null)
%5 = load i32, i32* %2
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i32 %5)
%7 = load i32, i32* %2
%8 = call i32 @exit(i32 %7)
unreachable
}

LLVM IR (-O2):
@.str.1 = [8 x i8] c"/bin/ls\00"
@.str.2 = [3 x i8] c"ls\00"
@.str.3 = [3 x i8] c"-1\00"
@.str.4 = [12 x i8] c"Salida: %d\0A\00"
@str = [13 x i8] c"Ejemplo exec\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @execl(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* null)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i32 0)
%4 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
void *sbrk(size_t);
void __attribute__((weak)) * malloc(size_t size) {
  if (size != 0) {
    void *ptr = sbrk(size);
    ;
    if (ptr != (void *)-1) {
      return ptr;
    }
  }
  return NULL;
}


x86 assembly (clang, -O0):
<malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1157 <malloc+0x47>
mov    -0x10(%rbp),%rdi
call   1030 <sbrk@plt>
mov    %rax,-0x18(%rbp)
mov    $0xffffffffffffffff,%rax
cmp    %rax,-0x18(%rbp)
je     1152 <malloc+0x42>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    115f <malloc+0x4f>
jmp    1157 <malloc+0x47>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<malloc>:
test   %rdi,%rdi
je     1127 <malloc+0x17>
push   %rax
call   1030 <sbrk@plt>
cmp    $0xffffffffffffffff,%rax
lea    0x8(%rsp),%rsp
je     1127 <malloc+0x17>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define weak i8* @malloc(i64 %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = alloca i8*
store i64 %0, i64* %3
%5 = load i64, i64* %3
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %15
7: ; preds = %1
%8 = load i64, i64* %3
%9 = call i8* @sbrk(i64 %8)
store i8* %9, i8** %4
%10 = load i8*, i8** %4
%11 = icmp ne i8* %10, inttoptr (i64 -1 to i8*)
br i1 %11, label %12, label %14
12: ; preds = %7
%13 = load i8*, i8** %4
store i8* %13, i8** %2
br label %16
14: ; preds = %7
br label %15
15: ; preds = %14, %1
store i8* null, i8** %2
br label %16
16: ; preds = %15, %12
%17 = load i8*, i8** %2
ret i8* %17
}

LLVM IR (-O2):
define weak i8* @malloc(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i8* @sbrk(i64 %0)
%5 = icmp eq i8* %4, inttoptr (i64 -1 to i8*)
br i1 %5, label %6, label %7
6: ; preds = %3, %1
br label %7
7: ; preds = %3, %6
%8 = phi i8* [ %4, %3 ], [ null, %6 ]
ret i8* %8
}
/* Variables and functions */
double __dmod(double, double);
double cos(double);
double __dcosd(double x) {
  double circle = 360.0;
  return cos(.017453292519943295 * __dmod(x, circle));
}


x86 assembly (clang, -O0):
<__dcosd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xed3(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <__dmod@plt>
movaps %xmm0,%xmm1
movsd  0xeac(%rip),%xmm0
mulsd  %xmm1,%xmm0
call   1040 <cos@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__dcosd>:
push   %rax
movsd  0xed7(%rip),%xmm1
call   1030 <__dmod@plt>
mulsd  0xed2(%rip),%xmm0
pop    %rax
jmp    1040 <cos@plt>

LLVM IR (-O0):
define double @__dcosd(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
store double 3.600000e+02, double* %3
%4 = load double, double* %2
%5 = load double, double* %3
%6 = call double @__dmod(double %4, double %5)
%7 = fmul double 0x3F91DF46A2529D39, %6
%8 = call double @cos(double %7)
ret double %8
}

LLVM IR (-O2):
define double @__dcosd(double %0) {
%2 = tail call double @__dmod(double %0, double 3.600000e+02)
%3 = fmul double %2, 0x3F91DF46A2529D39
%4 = tail call double @cos(double %3)
ret double %4
}
/* Forward declarations */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ valid;
};
typedef int /*<<< orphan*/ ASN1_VALUE;
typedef TYPE_1__ ASN1_TLC;
typedef int /*<<< orphan*/ ASN1_TEMPLATE;

/* Variables and functions */
int asn1_template_ex_d2i(int /*<<< orphan*/ **, unsigned char const **, long,
                         int /*<<< orphan*/ const *, int /*<<< orphan*/,
                         TYPE_1__ *);
int ASN1_template_d2i(ASN1_VALUE **pval, const unsigned char **in, long len,
                      const ASN1_TEMPLATE *tt) {
  ASN1_TLC c;
  if (&c)
    (&c)->valid = 0;
  return asn1_template_ex_d2i(pval, in, len, tt, 0, &c);
}


x86 assembly (clang, -O0):
<ASN1_template_d2i>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
lea    -0x28(%rbp),%rax
cmp    $0x0,%rax
je     113e <ASN1_template_d2i+0x2e>
movq   $0x0,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
xor    %r8d,%r8d
lea    -0x28(%rbp),%r9
call   1030 <asn1_template_ex_d2i@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ASN1_template_d2i>:
push   %rax
movq   $0x0,(%rsp)
mov    %rsp,%r9
xor    %r8d,%r8d
call   1030 <asn1_template_ex_d2i@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
%struct.TYPE_3__ = type { i64 }
define i32 @ASN1_template_d2i(i32** %0, i8** %1, i64 %2, i32* %3) {
%5 = alloca %struct.TYPE_3__
%6 = bitcast %struct.TYPE_3__* %5 to i8*
%7 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %5, i64 0, i32 0
store i64 0, i64* %7
%8 = call i32 @asn1_template_ex_d2i(i32** %0, i8** %1, i64 %2, i32* %3, i32 0, %struct.TYPE_3__* %5)
ret i32 %8
}
float withdrawal(float currentValue, float withdrawnValue) {
  currentValue -= withdrawnValue - withdrawnValue * 0.0017;
  return currentValue;
}


x86 assembly (clang, -O0):
<withdrawal>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x8(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
movsd  0xec1(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
subsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<withdrawal>:
cvtss2sd %xmm1,%xmm1
movsd  0xef4(%rip),%xmm2
mulsd  %xmm1,%xmm2
addsd  %xmm1,%xmm2
cvtss2sd %xmm0,%xmm0
subsd  %xmm2,%xmm0
cvtsd2ss %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @withdrawal(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %4
%6 = fpext float %5 to double
%7 = load float, float* %4
%8 = fpext float %7 to double
%9 = fneg double %8
%10 = call double @llvm.fmuladd.f64(double %9, double 1.700000e-03, double %6)
%11 = load float, float* %3
%12 = fpext float %11 to double
%13 = fsub double %12, %10
%14 = fptrunc double %13 to float
store float %14, float* %3
%15 = load float, float* %3
ret float %15
}

LLVM IR (-O2):
define float @withdrawal(float %0, float %1) {
%3 = fpext float %1 to double
%4 = fneg double %3
%5 = tail call double @llvm.fmuladd.f64(double %4, double 1.700000e-03, double %3)
%6 = fpext float %0 to double
%7 = fsub double %6, %5
%8 = fptrunc double %7 to float
ret float %8
}
/* Variables and functions */
int /*<<< orphan*/ CONF_modules_finish();
int /*<<< orphan*/ CONF_modules_unload(int);
void conf_modules_free_int(void) {
  CONF_modules_finish();
  CONF_modules_unload(1);
}


x86 assembly (clang, -O0):
<conf_modules_free_int>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <CONF_modules_finish@plt>
mov    $0x1,%edi
call   1040 <CONF_modules_unload@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<conf_modules_free_int>:
push   %rax
xor    %eax,%eax
call   1030 <CONF_modules_finish@plt>
mov    $0x1,%edi
pop    %rax
jmp    1040 <CONF_modules_unload@plt>

LLVM IR (-O0):
define void @conf_modules_free_int() {
%1 = call i32 (...) @CONF_modules_finish()
%2 = call i32 @CONF_modules_unload(i32 1)
ret void
}

LLVM IR (-O2):
define void @conf_modules_free_int() {
%1 = tail call i32 (...) @CONF_modules_finish()
%2 = tail call i32 @CONF_modules_unload(i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void t10() { free((void *)&t10); }


x86 assembly (clang, -O0):
<t10>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rdi
call   1030 <free@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t10>:
mov    0x2ed1(%rip),%rdi
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @t10() {
%1 = call i32 @free(i8* bitcast (void ()* @t10 to i8*))
ret void
}

LLVM IR (-O2):
define void @t10() {
%1 = tail call i32 @free(i8* bitcast (void ()* @t10 to i8*))
ret void
}
/* Variables and functions */
int destroy(int *);
int main() {
  int x;
  return destroy(&x), 0;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @destroy(i32* %2)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @destroy(i32* %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ptext(char *);
int /*<<< orphan*/ sprintf(char *, char *, int, int);
void put_dec(char *f, int i) {
  char tm[128];
  sprintf(tm, f, i / 10, i % 10);
  ptext(tm);
}


x86 assembly (clang, -O0):
<put_dec>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    -0x90(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x94(%rbp)
mov    -0xc(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,%ecx
mov    -0x94(%rbp),%edx
call   1040 <sprintf@plt>
lea    -0x90(%rbp),%rdi
call   1030 <ptext@plt>
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<put_dec>:
push   %rbx
sub    $0x80,%rsp
mov    %rdi,%rax
movslq %esi,%rcx
imul   $0x66666667,%rcx,%rdx
mov    %rdx,%rsi
shr    $0x3f,%rsi
sar    $0x22,%rdx
add    %esi,%edx
lea    (%rdx,%rdx,1),%esi
lea    (%rsi,%rsi,4),%esi
sub    %esi,%ecx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    %rax,%rsi
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <ptext@plt>
add    $0x80,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @put_dec(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca [128 x i8]
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = getelementptr inbounds [128 x i8], [128 x i8]* %5, i64 0, i64 0
%7 = load i8*, i8** %3
%8 = load i32, i32* %4
%9 = sdiv i32 %8, 10
%10 = load i32, i32* %4
%11 = srem i32 %10, 10
%12 = call i32 @sprintf(i8* %6, i8* %7, i32 %9, i32 %11)
%13 = getelementptr inbounds [128 x i8], [128 x i8]* %5, i64 0, i64 0
%14 = call i32 @ptext(i8* %13)
ret void
}

LLVM IR (-O2):
define void @put_dec(i8* nocapture %0, i32 %1) {
%3 = alloca [128 x i8]
%4 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%5 = sdiv i32 %1, 10
%6 = srem i32 %1, 10
%7 = call i32 @sprintf(i8* %4, i8* dereferenceable(1) %0, i32 %5, i32 %6)
%8 = call i32 @ptext(i8* %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
char solve();
int main() {
  char resp = solve();
  printf("%s\n", resp ? "S" : "N");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <solve@plt>
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
lea    0xec9(%rip),%rsi
lea    0xec0(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rsi
lea    0xeae(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <solve@plt>
test   %al,%al
lea    0xed5(%rip),%rax
lea    0xecc(%rip),%rsi
cmove  %rax,%rsi
lea    0xebd(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [2 x i8] c"S\00"
@.str.2 = [2 x i8] c"N\00"
define i32 @main() {
%1 = alloca i8
%2 = call signext i8 (...) @solve()
store i8 %2, i8* %1
%3 = load i8, i8* %1
%4 = sext i8 %3 to i32
%5 = icmp ne i32 %4, 0
%6 = zext i1 %5 to i64
%7 = select i1 %5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0)
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [2 x i8] c"S\00"
@.str.2 = [2 x i8] c"N\00"
define i32 @main() {
%1 = tail call signext i8 (...) @solve()
%2 = icmp eq i8 %1, 0
%3 = select i1 %2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %3)
ret i32 0
}
void bar(void) { int a = 42; }


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
movl   $0x2a,-0x4(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @bar() {
%1 = alloca i32
store i32 42, i32* %1
ret void
}

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


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

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

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

LLVM IR (-O2):
define void @gdk_drawable_get_display() {
ret void
}
int main() {
  __builtin_ia32_rdtsc();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
rdtsc
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 @llvm.x86.rdtsc()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 @llvm.x86.rdtsc()
ret i32 0
}
int main(void) {
  int sekunder;
  printf("Test \n");
  scanf("%d", &sekunder);
  printf("%d sekunder \n", &sekunder);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xed5(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb8(%rip),%rdi
lea    0xc(%rsp),%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
lea    0xea5(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"Test \0A\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [14 x i8] c"%d sekunder \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32* %2)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [14 x i8] c"%d sekunder \0A\00"
@str = [6 x i8] c"Test \00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
%4 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32* %1)
ret i32 0
}
void *MyAlloc(void *ptr) { return ptr; }


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

x86 assembly (clang, -O2):
<MyAlloc>:
mov    %rdi,%rax
ret

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

LLVM IR (-O2):
define i8* @MyAlloc(i8* readnone returned %0) {
ret i8* %0
}
void g_io_channel_flush() {}


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

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

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

LLVM IR (-O2):
define void @g_io_channel_flush() {
ret void
}
void spinlock_destroy(struct spinlock *lock) {}


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

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

LLVM IR (-O0):
%struct.spinlock = type opaque
define void @spinlock_destroy(%struct.spinlock* %0) {
%2 = alloca %struct.spinlock*
store %struct.spinlock* %0, %struct.spinlock** %2
ret void
}

LLVM IR (-O2):
%struct.spinlock = type opaque
define void @spinlock_destroy(%struct.spinlock* nocapture %0) {
ret void
}
int d_eq_rm1(double a1, double *a2) { return (((a1) == (*a2))); }


x86 assembly (clang, -O0):
<d_eq_rm1>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rax
ucomisd (%rax),%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<d_eq_rm1>:
cmpeqsd (%rdi),%xmm0
movq   %xmm0,%rax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @d_eq_rm1(double %0, double* %1) {
%3 = alloca double
%4 = alloca double*
store double %0, double* %3
store double* %1, double** %4
%5 = load double, double* %3
%6 = load double*, double** %4
%7 = load double, double* %6
%8 = fcmp oeq double %5, %7
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @d_eq_rm1(double %0, double* nocapture %1) {
%3 = load double, double* %1
%4 = fcmp oeq double %3, %0
%5 = zext i1 %4 to i32
ret i32 %5
}
const char *Ref_Definition(void) {
  return "struct Ref {\n"
         "  var val;\n"
         "};\n";
}


x86 assembly (clang, -O0):
<Ref_Definition>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Ref_Definition>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [28 x i8] c"struct Ref {\0A var val;\0A};\0A\00"
define i8* @Ref_Definition() {
ret i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [28 x i8] c"struct Ref {\0A var val;\0A};\0A\00"
define i8* @Ref_Definition() {
ret i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
typedef scalar_t__ pid_t;

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
scalar_t__ fork();
int /*<<< orphan*/ start();
int main(void) {
  pid_t pid, sid;
  pid = fork();
  if (pid < 0)
    exit(EXIT_FAILURE);
  if (pid > 0)
    exit(EXIT_SUCCESS);
  start();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <fork@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jge    115c <main+0x2c>
mov    0x2e8b(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>
cmpq   $0x0,-0x8(%rbp)
jle    1175 <main+0x45>
mov    0x2e6a(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>
mov    $0x0,%al
call   1030 <start@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <fork@plt>
test   %rax,%rax
js     114a <main+0x1a>
jne    1158 <main+0x28>
xor    %eax,%eax
call   1030 <start@plt>
xor    %eax,%eax
pop    %rcx
ret
mov    0x2e8f(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>
mov    0x2e79(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i64
%2 = alloca i64
%3 = call i64 (...) @fork()
store i64 %3, i64* %1
%4 = load i64, i64* %1
%5 = icmp slt i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = load i32, i32* @EXIT_FAILURE
%8 = call i32 @exit(i32 %7)
unreachable
9: ; preds = %0
%10 = load i64, i64* %1
%11 = icmp sgt i64 %10, 0
br i1 %11, label %12, label %15
12: ; preds = %9
%13 = load i32, i32* @EXIT_SUCCESS
%14 = call i32 @exit(i32 %13)
unreachable
15: ; preds = %9
%16 = call i32 (...) @start()
ret i32 0
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i64 (...) @fork()
%2 = icmp slt i64 %1, 0
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = load i32, i32* @EXIT_FAILURE
%5 = tail call i32 @exit(i32 %4)
unreachable
6: ; preds = %0
%7 = icmp eq i64 %1, 0
br i1 %7, label %11, label %8
8: ; preds = %6
%9 = load i32, i32* @EXIT_SUCCESS
%10 = tail call i32 @exit(i32 %9)
unreachable
11: ; preds = %6
%12 = tail call i32 (...) @start()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isupper(int);
void t_isupper_0xa9() {
  Assert_real((isupper(169) == 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",
              850, ("isupper should be 0 for 0xa9"));
}


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

x86 assembly (clang, -O2):
<t_isupper_0xa9>:
push   %rax
mov    $0xa9,%edi
call   1030 <isupper@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x352,%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 0xa9\00"
define void @t_isupper_0xa9() {
%1 = call i64 @isupper(i32 169)
%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 850, 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 0xa9\00"
define void @t_isupper_0xa9() {
%1 = tail call i64 @isupper(i32 169)
%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 850, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m64;

/* Variables and functions */
int /*<<< orphan*/ _mm_unpacklo_pi16(int /*<<< orphan*/, int /*<<< orphan*/);
__m64 test82(__m64 a, __m64 b) { return _mm_unpacklo_pi16(a, b); }


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

x86 assembly (clang, -O2):
<test82>:
jmp    1030 <_mm_unpacklo_pi16@plt>

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

LLVM IR (-O2):
define i32 @test82(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_unpacklo_pi16(i32 %0, i32 %1)
ret i32 %3
}
void handle_60(int sig) {}


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

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

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

LLVM IR (-O2):
define void @handle_60(i32 %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ WINDOW;

/* Variables and functions */
int /*<<< orphan*/ *newwin(int, int, int, int);
int /*<<< orphan*/ wrefresh(int /*<<< orphan*/ *);
WINDOW *initboard() {
  WINDOW *temp;
  int height = 16;
  int width = 3 * 16;
  int starty = 0;
  int startx = 0;
  temp = newwin(height, width, starty, startx);
  wrefresh(temp);
  return temp;
}


x86 assembly (clang, -O0):
<initboard>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x10,-0xc(%rbp)
movl   $0x30,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
call   1040 <newwin@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <wrefresh@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<initboard>:
push   %rbx
mov    $0x10,%edi
mov    $0x30,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   1040 <newwin@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1030 <wrefresh@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32* @initboard() {
%1 = tail call i32* @newwin(i32 16, i32 48, i32 0, i32 0)
%2 = tail call i32 @wrefresh(i32* %1)
ret i32* %1
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
uint16_t lv2_event_pad_size(uint16_t size) {
  return (uint16_t)(size + 7U) & (uint16_t)(~7U);
}


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

x86 assembly (clang, -O2):
<lv2_event_pad_size>:
lea    0x7(%rdi),%eax
and    $0xfffffff8,%eax
ret

LLVM IR (-O0):
define i32 @lv2_event_pad_size(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add i32 %3, 7
%5 = and i32 %4, -8
ret i32 %5
}

LLVM IR (-O2):
define i32 @lv2_event_pad_size(i32 %0) {
%2 = add i32 %0, 7
%3 = and i32 %2, -8
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ write_nibbles(int);
void lcd_clear() { write_nibbles(0x01); }


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

x86 assembly (clang, -O2):
<lcd_clear>:
mov    $0x1,%edi
jmp    1030 <write_nibbles@plt>

LLVM IR (-O0):
define void @lcd_clear() {
%1 = call i32 @write_nibbles(i32 1)
ret void
}

LLVM IR (-O2):
define void @lcd_clear() {
%1 = tail call i32 @write_nibbles(i32 1)
ret void
}
void SPI1_IRQHandler() {}


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

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

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

LLVM IR (-O2):
define void @SPI1_IRQHandler() {
ret void
}
int max3(int d, int l, int u) {
  int max;
  max = (d > l) ? d : l;
  max = (u > max) ? u : max;
  return max;
}


x86 assembly (clang, -O0):
<max3>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1124 <max3+0x24>
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    112a <max3+0x2a>
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    1147 <max3+0x47>
mov    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
jmp    114d <max3+0x4d>
mov    -0x10(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<max3>:
mov    %esi,%eax
cmp    %esi,%edi
cmovg  %edi,%eax
cmp    %edx,%eax
cmovl  %edx,%eax
ret

LLVM IR (-O0):
define i32 @max3(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %4
%9 = load i32, i32* %5
%10 = icmp sgt i32 %8, %9
br i1 %10, label %11, label %13
11: ; preds = %3
%12 = load i32, i32* %4
br label %15
13: ; preds = %3
%14 = load i32, i32* %5
br label %15
15: ; preds = %13, %11
%16 = phi i32 [ %12, %11 ], [ %14, %13 ]
store i32 %16, i32* %7
%17 = load i32, i32* %6
%18 = load i32, i32* %7
%19 = icmp sgt i32 %17, %18
br i1 %19, label %20, label %22
20: ; preds = %15
%21 = load i32, i32* %6
br label %24
22: ; preds = %15
%23 = load i32, i32* %7
br label %24
24: ; preds = %22, %20
%25 = phi i32 [ %21, %20 ], [ %23, %22 ]
store i32 %25, i32* %7
%26 = load i32, i32* %7
ret i32 %26
}

LLVM IR (-O2):
define i32 @max3(i32 %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %0, %1
%5 = select i1 %4, i32 %0, i32 %1
%6 = icmp slt i32 %5, %2
%7 = select i1 %6, i32 %2, i32 %5
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0x2c() {
  Assert_real((isodigit(44) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isodigit.c",
              225, ("isodigit should be 0 for ,"));
}


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

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

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

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isodigit.c\00"
@.str.1 = [27 x i8] c"isodigit should be 0 for ,\00"
define void @t_isodigit_0x2c() {
%1 = tail call i64 @isodigit(i32 44)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 225, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ foo();
void test03(int flag) {
  if (flag)
    foo();
  foo();
}


x86 assembly (clang, -O0):
<test03>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     112c <test03+0x1c>
mov    $0x0,%al
call   1030 <foo@plt>
mov    $0x0,%al
call   1030 <foo@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test03>:
test   %edi,%edi
je     1120 <test03+0x10>
push   %rax
xor    %eax,%eax
call   1030 <foo@plt>
add    $0x8,%rsp
xor    %eax,%eax
jmp    1030 <foo@plt>

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

LLVM IR (-O2):
define void @test03(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 (...) @foo()
br label %5
5: ; preds = %3, %1
%6 = tail call i32 (...) @foo()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned char);
void battery_dump(void *data, void *payload, int len) {
  unsigned char *pp = (unsigned char *)payload;
  if (pp[0] != 0x03) {
    printf("Unknown command %d\n", pp[0]);
    return;
  }
  printf("Battery Level is %d\n", pp[1]);
}


x86 assembly (clang, -O0):
<battery_dump>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movzbl (%rax),%eax
cmp    $0x3,%eax
je     1153 <battery_dump+0x43>
mov    -0x20(%rbp),%rax
lea    0xeba(%rip),%rdi
movzbl (%rax),%esi
call   1030 <printf@plt>
jmp    1167 <battery_dump+0x57>
mov    -0x20(%rbp),%rax
lea    0xeb6(%rip),%rdi
movzbl 0x1(%rax),%esi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<battery_dump>:
mov    (%rsi),%al
cmp    $0x3,%al
jne    1126 <battery_dump+0x16>
movzbl 0x1(%rsi),%esi
lea    0xef3(%rip),%rdi
jmp    1030 <printf@plt>
movzbl %al,%esi
lea    0xed0(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"Unknown command %d\0A\00"
@.str.1 = [21 x i8] c"Battery Level is %d\0A\00"
define void @battery_dump(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%8 = load i8*, i8** %5
store i8* %8, i8** %7
%9 = load i8*, i8** %7
%10 = getelementptr inbounds i8, i8* %9, i64 0
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = icmp ne i32 %12, 3
br i1 %13, label %14, label %19
14: ; preds = %3
%15 = load i8*, i8** %7
%16 = getelementptr inbounds i8, i8* %15, i64 0
%17 = load i8, i8* %16
%18 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8 zeroext %17)
br label %24
19: ; preds = %3
%20 = load i8*, i8** %7
%21 = getelementptr inbounds i8, i8* %20, i64 1
%22 = load i8, i8* %21
%23 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i8 zeroext %22)
br label %24
24: ; preds = %19, %14
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"Unknown command %d\0A\00"
@.str.1 = [21 x i8] c"Battery Level is %d\0A\00"
define void @battery_dump(i8* nocapture readnone %0, i8* nocapture %1, i32 %2) {
%4 = load i8, i8* %1
%5 = icmp eq i8 %4, 3
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8 zeroext %4)
br label %12
8: ; preds = %3
%9 = getelementptr inbounds i8, i8* %1, i64 1
%10 = load i8, i8* %9
%11 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i8 zeroext %10)
br label %12
12: ; preds = %8, %6
ret void
}
int translate_line_number(file, lnum)
struct file_data *file;
int lnum;
{ return lnum + 1; }


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

x86 assembly (clang, -O2):
<translate_line_number>:
lea    0x1(%rsi),%eax
ret

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

LLVM IR (-O2):
%struct.file_data = type opaque
define i32 @translate_line_number(%struct.file_data* nocapture readnone %0, i32 %1) {
%3 = add nsw i32 %1, 1
ret i32 %3
}
/* Type definitions */
typedef unsigned long long __u32;

/* Variables and functions */
__u32 hea_u32_bit(int b) {
  return ((~0ULL << (63 - (b + 32))) & (~0ULL >> (b + 32)));
}


x86 assembly (clang, -O0):
<hea_u32_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
add    $0x20,%ecx
mov    $0x3f,%eax
sub    %ecx,%eax
mov    %eax,%eax
mov    %eax,%ecx
mov    $0xffffffffffffffff,%rax
shl    %cl,%rax
mov    -0x4(%rbp),%ecx
add    $0x20,%ecx
mov    %ecx,%ecx
mov    $0xffffffffffffffff,%rdx
shr    %cl,%rdx
mov    %rdx,%rcx
and    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hea_u32_bit>:
mov    $0x1f,%cl
sub    %dil,%cl
mov    $0xffffffffffffffff,%rax
shl    %cl,%rax
lea    0x20(%rdi),%ecx
shl    %cl,%rax
shr    %cl,%rax
ret

LLVM IR (-O0):
define i64 @hea_u32_bit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 32
%5 = sub nsw i32 63, %4
%6 = zext i32 %5 to i64
%7 = shl i64 -1, %6
%8 = load i32, i32* %2
%9 = add nsw i32 %8, 32
%10 = zext i32 %9 to i64
%11 = lshr i64 -1, %10
%12 = and i64 %7, %11
ret i64 %12
}

LLVM IR (-O2):
define i64 @hea_u32_bit(i32 %0) {
%2 = add nsw i32 %0, 32
%3 = sub i32 31, %0
%4 = zext i32 %3 to i64
%5 = shl nsw i64 -1, %4
%6 = zext i32 %2 to i64
%7 = lshr i64 -1, %6
%8 = and i64 %5, %7
ret i64 %8
}
int *test_func_02(int *p, int c) {
  *--p = c;
  return p;
}


x86 assembly (clang, -O0):
<test_func_02>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0xfffffffffffffffc,%rdx
mov    %rdx,-0x8(%rbp)
mov    %ecx,-0x4(%rax)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_func_02>:
mov    %esi,-0x4(%rdi)
lea    -0x4(%rdi),%rax
ret

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

LLVM IR (-O2):
define i32* @test_func_02(i32* writeonly %0, i32 %1) {
%3 = getelementptr inbounds i32, i32* %0, i64 -1
store i32 %1, i32* %3
ret i32* %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
void SysCtlDeepSleepClockSet(uint32_t ui32Config) {
  (*((volatile uint32_t *)(0x400FE144))) = ui32Config;
}


x86 assembly (clang, -O0):
<SysCtlDeepSleepClockSet>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
mov    $0x400fe144,%eax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<SysCtlDeepSleepClockSet>:
mov    %edi,0x400fe144
ret

LLVM IR (-O0):
define void @SysCtlDeepSleepClockSet(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
store volatile i32 %3, i32* inttoptr (i64 1074782532 to i32*)
ret void
}

LLVM IR (-O2):
define void @SysCtlDeepSleepClockSet(i32 %0) {
store volatile i32 %0, i32* inttoptr (i64 1074782532 to i32*)
ret void
}
__attribute__((no)) void ff(int i) { asm volatile(""); }


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

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

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

LLVM IR (-O2):
define void @ff(i32 %0) {
tail call void asm sideeffect "", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ handle_55(int /*<<< orphan*/);
int gen_55() {
  handle_55(0);
  return 0;
}


x86 assembly (clang, -O0):
<gen_55>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <handle_55@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gen_55>:
push   %rax
xor    %edi,%edi
call   1030 <handle_55@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @gen_55() {
%1 = call i32 @handle_55(i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @gen_55() {
%1 = tail call i32 @handle_55(i32 0)
ret i32 0
}
void NotToRemove1() { return; }


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

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

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

LLVM IR (-O2):
define void @NotToRemove1() {
ret void
}
/* Variables and functions */
int add_digits(int);
int count_digits(int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n;
  scanf("%d", &n);
  printf("Number of digits: %d\n", count_digits(n));
  printf("Sum the of digits: %d\n", add_digits(n));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1060 <scanf@plt>
mov    -0x8(%rbp),%edi
call   1050 <count_digits@plt>
mov    %eax,%esi
lea    0xe93(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%edi
call   1040 <add_digits@plt>
mov    %eax,%esi
lea    0xe93(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeb8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1060 <scanf@plt>
mov    0x4(%rsp),%edi
call   1050 <count_digits@plt>
lea    0xea1(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    0x4(%rsp),%edi
call   1040 <add_digits@plt>
lea    0xea0(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [22 x i8] c"Number of digits: %d\0A\00"
@.str.2 = [23 x i8] c"Sum the of digits: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%4 = load i32, i32* %2
%5 = call i32 @count_digits(i32 %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %5)
%7 = load i32, i32* %2
%8 = call i32 @add_digits(i32 %7)
%9 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [22 x i8] c"Number of digits: %d\0A\00"
@.str.2 = [23 x i8] c"Sum the of digits: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @count_digits(i32 %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %5)
%7 = load i32, i32* %1
%8 = call i32 @add_digits(i32 %7)
%9 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i32 %8)
ret i32 0
}