xunge/DecIR huggingface dataset:
void pgm_default_powerup_powerdown(struct programmer_t *pgm) {}


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

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

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

LLVM IR (-O2):
%struct.programmer_t = type opaque
define void @pgm_default_powerup_powerdown(%struct.programmer_t* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int /*<<< orphan*/ LOG_INFO;
int /*<<< orphan*/ vsyslog(int /*<<< orphan*/, char *, int /*<<< orphan*/);
void verbose_syslog(char *format, va_list ap) { vsyslog(LOG_INFO, format, ap); }


x86 assembly (clang, -O0):
<verbose_syslog>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <vsyslog@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<verbose_syslog>:
mov    %esi,%edx
mov    %rdi,%rsi
mov    0x2ec4(%rip),%rax
mov    (%rax),%edi
jmp    1030 <vsyslog@plt>

LLVM IR (-O0):
@LOG_INFO = global i32 0
define void @verbose_syslog(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @LOG_INFO
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = call i32 @vsyslog(i32 %5, i8* %6, i32 %7)
ret void
}

LLVM IR (-O2):
@LOG_INFO = global i32 0
define void @verbose_syslog(i8* %0, i32 %1) {
%3 = load i32, i32* @LOG_INFO
%4 = tail call i32 @vsyslog(i32 %3, i8* %0, i32 %1)
ret void
}
int main() {
  signed char c;
  c = 0x55;
  c = 0xAA;
  c = 0x00;
  c = 0xFF;
  c = 0x80;
  c = 0x01;
  c = 0x7F;
  c = 0xFE;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movb   $0x55,-0x5(%rbp)
movb   $0xaa,-0x5(%rbp)
movb   $0x0,-0x5(%rbp)
movb   $0xff,-0x5(%rbp)
movb   $0x80,-0x5(%rbp)
movb   $0x1,-0x5(%rbp)
movb   $0x7f,-0x5(%rbp)
movb   $0xfe,-0x5(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
store i8 85, i8* %2
store i8 -86, i8* %2
store i8 0, i8* %2
store i8 -1, i8* %2
store i8 -128, i8* %2
store i8 1, i8* %2
store i8 127, i8* %2
store i8 -2, i8* %2
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Putb(int, int);
extern void DoBlit(void) { Putb(0x24, 1); }


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

x86 assembly (clang, -O2):
<DoBlit>:
mov    $0x24,%edi
mov    $0x1,%esi
jmp    1030 <Putb@plt>

LLVM IR (-O0):
define void @DoBlit() {
%1 = call i32 @Putb(i32 36, i32 1)
ret void
}

LLVM IR (-O2):
define void @DoBlit() {
%1 = tail call i32 @Putb(i32 36, i32 1)
ret void
}
void add(double *x, double *y, double *result) { *result = *x + *y; }


x86 assembly (clang, -O0):
<add>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
addsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<add>:
movsd  (%rdi),%xmm0
addsd  (%rsi),%xmm0
movsd  %xmm0,(%rdx)
ret

LLVM IR (-O0):
define void @add(double* %0, double* %1, double* %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca double*
store double* %0, double** %4
store double* %1, double** %5
store double* %2, double** %6
%7 = load double*, double** %4
%8 = load double, double* %7
%9 = load double*, double** %5
%10 = load double, double* %9
%11 = fadd double %8, %10
%12 = load double*, double** %6
store double %11, double* %12
ret void
}

LLVM IR (-O2):
define void @add(double* nocapture %0, double* nocapture %1, double* nocapture writeonly %2) {
%4 = load double, double* %0
%5 = load double, double* %1
%6 = fadd double %4, %5
store double %6, double* %2
ret void
}
/* Variables and functions */
int ardilla();
int cuadrado(int);
int /*<<< orphan*/ funcion_que_no_devuelve();
int /*<<< orphan*/ printf(char *, ...);
int main() {
  int x;
  printf("HOLA\n");
  x = ardilla();
  printf("%d\n", x);
  funcion_que_no_devuelve();
  int n = 5, resultado;
  resultado = cuadrado(n);
  printf("%d\n", resultado);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <ardilla@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe95(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1060 <funcion_que_no_devuelve@plt>
movl   $0x5,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1050 <cuadrado@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%esi
lea    0xe6b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xeac(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1050 <ardilla@plt>
lea    0xe95(%rip),%rbx
mov    %rbx,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1070 <funcion_que_no_devuelve@plt>
mov    $0x5,%edi
call   1060 <cuadrado@plt>
mov    %rbx,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str.1 = [4 x i8] c"%d\0A\00"
@str = [5 x i8] c"HOLA\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @ardilla()
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %2)
%4 = tail call i32 (...) @funcion_que_no_devuelve()
%5 = tail call i32 @cuadrado(i32 5)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ islessequal(long double, long double);
void uninitvar_islessequal(void) {
  float f1, f2;
  (void)islessequal(f1, f2);
  double d1, d2;
  (void)islessequal(d1, d2);
  long double ld1, ld2;
  (void)islessequal(ld1, ld2);
}


x86 assembly (clang, -O0):
<uninitvar_islessequal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
flds   -0x4(%rbp)
flds   -0x8(%rbp)
mov    %rsp,%rax
fstpt  0x10(%rax)
fstpt  (%rax)
call   1030 <islessequal@plt>
fldl   -0x10(%rbp)
fldl   -0x18(%rbp)
mov    %rsp,%rax
fstpt  0x10(%rax)
fstpt  (%rax)
call   1030 <islessequal@plt>
fldt   -0x30(%rbp)
fldt   -0x40(%rbp)
mov    %rsp,%rax
fstpt  0x10(%rax)
fstpt  (%rax)
call   1030 <islessequal@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uninitvar_islessequal>:
sub    $0x28,%rsp
call   1030 <islessequal@plt>
call   1030 <islessequal@plt>
call   1030 <islessequal@plt>
add    $0x28,%rsp
ret

LLVM IR (-O0):
define void @uninitvar_islessequal() {
%1 = alloca float
%2 = alloca float
%3 = alloca double
%4 = alloca double
%5 = alloca x86_fp80
%6 = alloca x86_fp80
%7 = load float, float* %1
%8 = fpext float %7 to x86_fp80
%9 = load float, float* %2
%10 = fpext float %9 to x86_fp80
%11 = call i32 @islessequal(x86_fp80 %8, x86_fp80 %10)
%12 = load double, double* %3
%13 = fpext double %12 to x86_fp80
%14 = load double, double* %4
%15 = fpext double %14 to x86_fp80
%16 = call i32 @islessequal(x86_fp80 %13, x86_fp80 %15)
%17 = load x86_fp80, x86_fp80* %5
%18 = load x86_fp80, x86_fp80* %6
%19 = call i32 @islessequal(x86_fp80 %17, x86_fp80 %18)
ret void
}

LLVM IR (-O2):
define void @uninitvar_islessequal() {
%1 = tail call i32 @islessequal(x86_fp80 undef, x86_fp80 undef)
%2 = tail call i32 @islessequal(x86_fp80 undef, x86_fp80 undef)
%3 = tail call i32 @islessequal(x86_fp80 undef, x86_fp80 undef)
ret void
}
/* Variables and functions */
int strcmp(char *, char *);
int list_strcmp(const void *s1, const void *s2) {
  char **str1 = (char **)s1;
  char **str2 = (char **)s2;
  return (strcmp(*str1, *str2));
}


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

x86 assembly (clang, -O2):
<list_strcmp>:
mov    (%rdi),%rdi
mov    (%rsi),%rsi
jmp    1030 <strcmp@plt>

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

LLVM IR (-O2):
define i32 @list_strcmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = bitcast i8* %1 to i8**
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %5, i8* dereferenceable(1) %6)
ret i32 %7
}
/* Variables and functions */
scalar_t__ strcmp(char const *, char *);
int isADD(const char *comm) { return strcmp(comm, "add") == 0; }


x86 assembly (clang, -O0):
<isADD>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isADD>:
push   %rax
lea    0xee8(%rip),%rsi
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"add\00"
define i32 @isADD(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @strcmp(i8* %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
@.str = [4 x i8] c"add\00"
define i32 @isADD(i8* %0) {
%2 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
void kvmppc_enable_logical_ci_hcalls(void) {}


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

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

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

LLVM IR (-O2):
define void @kvmppc_enable_logical_ci_hcalls() {
ret void
}
const char *xbee_build_info(void) {
  return "Built on "
         "Mar 19 2022"
         " @ "
         "06:41:02"
         " for "
         "Linux";
}


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

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

LLVM IR (-O0):
@.str = [42 x i8] c"Built on Mar 19 2022 @ 06:41:02 for Linux\00"
define i8* @xbee_build_info() {
ret i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [42 x i8] c"Built on Mar 19 2022 @ 06:41:02 for Linux\00"
define i8* @xbee_build_info() {
ret i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
long double *_zero_arr_plus_longdouble_fn(long double *, int, int, char const *,
                                          unsigned int);
long double *_zero_arr_inplace_plus_longdouble_fn(long double **x, int orig_i,
                                                  const char *filename,
                                                  unsigned lineno) {
  *x = _zero_arr_plus_longdouble_fn(*x, 1, orig_i, filename, lineno);
  return *x;
}


x86 assembly (clang, -O0):
<_zero_arr_inplace_plus_longdouble_fn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    -0x1c(%rbp),%r8d
mov    $0x1,%esi
call   1030 <_zero_arr_plus_longdouble_fn@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_zero_arr_inplace_plus_longdouble_fn>:
push   %rbx
mov    %ecx,%r8d
mov    %rdx,%rcx
mov    %esi,%edx
mov    %rdi,%rbx
mov    (%rdi),%rdi
mov    $0x1,%esi
call   1030 <_zero_arr_plus_longdouble_fn@plt>
mov    %rax,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define x86_fp80* @_zero_arr_inplace_plus_longdouble_fn(x86_fp80** nocapture %0, i32 %1, i8* %2, i32 %3) {
%5 = load x86_fp80*, x86_fp80** %0
%6 = tail call x86_fp80* @_zero_arr_plus_longdouble_fn(x86_fp80* %5, i32 1, i32 %1, i8* %2, i32 %3)
store x86_fp80* %6, x86_fp80** %0
ret x86_fp80* %6
}
int hiddenfunc(int i) {
  if (i)
    return i + hiddenfunc(i - 1);
  else
    return 0;
}


x86 assembly (clang, -O0):
<hiddenfunc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1145 <hiddenfunc+0x35>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <hiddenfunc@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    114c <hiddenfunc+0x3c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hiddenfunc>:
test   %edi,%edi
je     1119 <hiddenfunc+0x19>
lea    -0x1(%rdi),%eax
lea    -0x2(%rdi),%ecx
imul   %rax,%rcx
imul   %eax,%eax
shr    %rcx
add    %edi,%eax
sub    %ecx,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @hiddenfunc(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %14, label %3
3: ; preds = %1
%4 = add i32 %0, -1
%5 = mul i32 %4, %4
%6 = zext i32 %4 to i33
%7 = add i32 %0, -2
%8 = zext i32 %7 to i33
%9 = mul i33 %6, %8
%10 = lshr i33 %9, 1
%11 = trunc i33 %10 to i32
%12 = add i32 %5, %0
%13 = sub i32 %12, %11
br label %14
14: ; preds = %3, %1
%15 = phi i32 [ 0, %1 ], [ %13, %3 ]
ret i32 %15
}
/* Variables and functions */
bool dummy_bool(void) { return true; }


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

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

LLVM IR (-O0):
define i32 @dummy_bool() {
ret i32 1
}

LLVM IR (-O2):
define i32 @dummy_bool() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ output_string(char *);
header() {
  output_string("#\tSmall C for MIPS32\n");
  output_string("#\tRetroBSD Project\n");
  output_string("#\n");
  output_string("\t.set\tnoreorder\n");
}


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

x86 assembly (clang, -O2):
<header>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <output_string@plt>
lea    0xef2(%rip),%rdi
call   1030 <output_string@plt>
lea    0xefa(%rip),%rdi
call   1030 <output_string@plt>
lea    0xef1(%rip),%rdi
pop    %rax
jmp    1030 <output_string@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"#\09Small C for MIPS32\0A\00"
@.str.1 = [20 x i8] c"#\09RetroBSD Project\0A\00"
@.str.2 = [3 x i8] c"#\0A\00"
@.str.3 = [17 x i8] c"\09.set\09noreorder\0A\00"
define i32 @header() {
%1 = alloca i32
%2 = call i32 @output_string(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @output_string(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @output_string(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 @output_string(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0))
%6 = load i32, i32* %1
ret i32 %6
}

LLVM IR (-O2):
@.str = [22 x i8] c"#\09Small C for MIPS32\0A\00"
@.str.1 = [20 x i8] c"#\09RetroBSD Project\0A\00"
@.str.2 = [3 x i8] c"#\0A\00"
@.str.3 = [17 x i8] c"\09.set\09noreorder\0A\00"
define i32 @header() {
%1 = tail call i32 @output_string(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @output_string(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @output_string(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @output_string(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0))
ret i32 undef
}
void init_rdft(int n, int *ip, float *w) {
  int nw, nc;
  void makewt(int nw, int *ip, float *w);
  void makect(int nc, int *ip, float *c);
  nw = n >> 2;
  makewt(nw, ip, w);
  nc = n >> 2;
  makect(nc, ip, w + nw);
  return;
}


x86 assembly (clang, -O0):
<init_rdft>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x2,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <makewt@plt>
mov    -0x4(%rbp),%eax
sar    $0x2,%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
movslq -0x1c(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdx
call   1040 <makect@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_rdft>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%rbx
mov    %rsi,%r14
mov    %edi,%ebp
sar    $0x2,%ebp
mov    %ebp,%edi
call   1030 <makewt@plt>
movslq %ebp,%rdi
lea    (%rbx,%rdi,4),%rdx
mov    %r14,%rsi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <makect@plt>

LLVM IR (-O0):
define void @init_rdft(i32 %0, i32* %1, float* %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca float*
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %4
store i32* %1, i32** %5
store float* %2, float** %6
%9 = load i32, i32* %4
%10 = ashr i32 %9, 2
store i32 %10, i32* %7
%11 = load i32, i32* %7
%12 = load i32*, i32** %5
%13 = load float*, float** %6
%14 = load i32, i32* %4
%15 = ashr i32 %14, 2
store i32 %15, i32* %8
%16 = load i32, i32* %8
%17 = load i32*, i32** %5
%18 = load float*, float** %6
%19 = load i32, i32* %7
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds float, float* %18, i64 %20
ret void
}

LLVM IR (-O2):
define void @init_rdft(i32 %0, i32* %1, float* %2) {
%4 = ashr i32 %0, 2
tail call void @makewt(i32 %4, i32* %1, float* %2)
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds float, float* %2, i64 %5
tail call void @makect(i32 %4, i32* %1, float* %6)
ret void
}
/* Variables and functions */
scalar_t__ malloc(size_t);
void *ft_memalloc(size_t size) {
  unsigned char *mem;
  mem = (unsigned char *)(malloc(size));
  if (mem == NULL)
    return (NULL);
  while (size > 0) {
    *(mem + (size - 1)) = 0;
    size--;
  }
  return ((void *)mem);
}


x86 assembly (clang, -O0):
<ft_memalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1141 <ft_memalloc+0x31>
movq   $0x0,-0x8(%rbp)
jmp    117a <ft_memalloc+0x6a>
jmp    1146 <ft_memalloc+0x36>
cmpq   $0x0,-0x10(%rbp)
jbe    1172 <ft_memalloc+0x62>
mov    -0x18(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    $0x1,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x10(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x10(%rbp)
jmp    1146 <ft_memalloc+0x36>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_memalloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <malloc@plt>
test   %rax,%rax
je     1148 <ft_memalloc+0x28>
mov    %rax,%rbx
test   %r14,%r14
je     114a <ft_memalloc+0x2a>
mov    %rbx,%rdi
xor    %esi,%esi
mov    %r14,%rdx
call   1030 <memset@plt>
jmp    114a <ft_memalloc+0x2a>
xor    %ebx,%ebx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @ft_memalloc(i64 %0) {
%2 = tail call i64 @malloc(i64 %0)
%3 = inttoptr i64 %2 to i8*
%4 = icmp eq i64 %2, 0
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = icmp eq i64 %0, 0
br i1 %6, label %8, label %7
7: ; preds = %5
br label %8
8: ; preds = %7, %5, %1
%9 = phi i8* [ null, %1 ], [ %3, %5 ], [ %3, %7 ]
ret i8* %9
}
/* Variables and functions */
int /*<<< orphan*/ enableARMInterrupts();
void os_enableInterrupts() { enableARMInterrupts(); }


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

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

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

LLVM IR (-O2):
define void @os_enableInterrupts() {
%1 = tail call i32 (...) @enableARMInterrupts()
ret void
}
int demoImplicitInt(x) { return x; }


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

x86 assembly (clang, -O2):
<demoImplicitInt>:
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @demoImplicitInt(i32 returned %0) {
ret i32 %0
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int uint64();
double float64() {
  return ((double)(uint64() >> 11)) / ((double)(((uint64_t)1) << 53));
}


x86 assembly (clang, -O0):
<float64>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <uint64@plt>
sar    $0xb,%eax
cvtsi2sd %eax,%xmm0
divsd  %xmm1,%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define double @float64() {
%1 = call i32 (...) @uint64()
%2 = ashr i32 %1, 11
%3 = sitofp i32 %2 to double
%4 = fdiv double %3, poison
ret double %4
}

LLVM IR (-O2):
define double @float64() {
%1 = tail call i32 (...) @uint64()
ret double poison
}
void FMX2Free(float **mx) {
  free(mx[0]);
  free(mx);
}


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

x86 assembly (clang, -O2):
<FMX2Free>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @FMX2Free(float** %0) {
%2 = alloca float**
store float** %0, float*** %2
%3 = load float**, float*** %2
%4 = getelementptr inbounds float*, float** %3, i64 0
%5 = load float*, float** %4
%6 = bitcast float* %5 to i8*
%7 = load float**, float*** %2
%8 = bitcast float** %7 to i8*
ret void
}

LLVM IR (-O2):
define void @FMX2Free(float** nocapture %0) {
%2 = bitcast float** %0 to i8**
%3 = load i8*, i8** %2
tail call void @free(i8* %3)
%4 = bitcast float** %0 to i8*
tail call void @free(i8* %4)
ret void
}
extern char *pdf_version() { return "0.0.1"; }


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"0.0.1\00"
define i8* @pdf_version() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [6 x i8] c"0.0.1\00"
define i8* @pdf_version() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}
int do_621() { return 621; }


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

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

LLVM IR (-O0):
define i32 @do_621() {
ret i32 621
}

LLVM IR (-O2):
define i32 @do_621() {
ret i32 621
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *intToRoman(int);
int /*<<< orphan*/ printf(char *, char *);
void intToRomanMain(void) {
  int i = 0;
  char *result = NULL;
  for (i = 0; i < 4000; i++) {
    result = intToRoman(i);
    printf("%s\n", result);
    free(result);
  }
}


x86 assembly (clang, -O0):
<intToRomanMain>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
movl   $0x0,-0x4(%rbp)
cmpl   $0xfa0,-0x4(%rbp)
jge    118e <intToRomanMain+0x5e>
mov    -0x4(%rbp),%edi
call   1030 <intToRoman@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xe8e(%rip),%rdi
call   1050 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1040 <free@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    114e <intToRomanMain+0x1e>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<intToRomanMain>:
push   %r15
push   %r14
push   %rbx
xor    %ebx,%ebx
lea    0xec2(%rip),%r14
xchg   %ax,%ax
mov    %ebx,%edi
call   1030 <intToRoman@plt>
mov    %rax,%r15
mov    %r14,%rdi
mov    %rax,%rsi
call   1050 <printf@plt>
mov    %r15,%rdi
call   1040 <free@plt>
add    $0x1,%ebx
cmp    $0xfa0,%ebx
jne    1140 <intToRomanMain+0x10>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
define void @intToRomanMain() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
store i8* null, i8** %2
store i32 0, i32* %1
br label %3
3: ; preds = %13, %0
%4 = load i32, i32* %1
%5 = icmp slt i32 %4, 4000
br i1 %5, label %6, label %16
6: ; preds = %3
%7 = load i32, i32* %1
%8 = call i8* @intToRoman(i32 %7)
store i8* %8, i8** %2
%9 = load i8*, i8** %2
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %9)
%11 = load i8*, i8** %2
%12 = call i32 @free(i8* %11)
br label %13
13: ; preds = %6
%14 = load i32, i32* %1
%15 = add nsw i32 %14, 1
store i32 %15, i32* %1
br label %3
16: ; preds = %3
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @intToRomanMain() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %6, %1 ]
%3 = tail call i8* @intToRoman(i32 %2)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = tail call i32 @free(i8* %3)
%6 = add nuw nsw i32 %2, 1
%7 = icmp eq i32 %6, 4000
br i1 %7, label %8, label %1
8: ; preds = %1
ret void
}
int unpackInt16(const unsigned char *buffer) {
  return (buffer[0] | (buffer[1] << 8));
}


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

x86 assembly (clang, -O2):
<unpackInt16>:
movzwl (%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @unpackInt16(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i32
%4 = getelementptr inbounds i8, i8* %0, i64 1
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = shl nuw nsw i32 %6, 8
%8 = or i32 %7, %3
ret i32 %8
}
/* Type definitions */
struct eembed_log {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ eembed_sprintf_append(struct eembed_log *, char *,
                                         char const *);
void eembed_sprintf_append_s(struct eembed_log *log, const char *str) {
  eembed_sprintf_append(log, "%s", str);
}


x86 assembly (clang, -O0):
<eembed_sprintf_append_s>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xed1(%rip),%rsi
call   1030 <eembed_sprintf_append@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eembed_sprintf_append_s>:
mov    %rsi,%rdx
lea    0xee6(%rip),%rsi
jmp    1030 <eembed_sprintf_append@plt>

LLVM IR (-O0):
%struct.eembed_log = type { i32 }
@.str = [3 x i8] c"%s\00"
define void @eembed_sprintf_append_s(%struct.eembed_log* %0, i8* %1) {
%3 = alloca %struct.eembed_log*
%4 = alloca i8*
store %struct.eembed_log* %0, %struct.eembed_log** %3
store i8* %1, i8** %4
%5 = load %struct.eembed_log*, %struct.eembed_log** %3
%6 = load i8*, i8** %4
%7 = call i32 @eembed_sprintf_append(%struct.eembed_log* %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %6)
ret void
}

LLVM IR (-O2):
%struct.eembed_log = type { i32 }
@.str = [3 x i8] c"%s\00"
define void @eembed_sprintf_append_s(%struct.eembed_log* %0, i8* %1) {
%3 = tail call i32 @eembed_sprintf_append(%struct.eembed_log* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %1)
ret void
}
long double asinl(long double x) {
  long double res;
  asm("fld	%%st\n\t"
      "fmul	%%st(0)\n\t"
      "fld1\n\t"
      "fsubp\n\t"
      "fsqrt\n\t"
      "fpatan"
      : "=t"(res)
      : "0"(x)
      : "st(1)");
  return res;
}


x86 assembly (clang, -O0):
<asinl>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
fld    %st(0)
fmul   %st(0),%st
fld1
fsubp  %st,%st(1)
fsqrt
fpatan
fstpt  -0x20(%rbp)
fldt   -0x20(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<asinl>:
fldt   0x8(%rsp)
fld    %st(0)
fmul   %st(0),%st
fld1
fsubp  %st,%st(1)
fsqrt
fpatan
ret

LLVM IR (-O0):
define x86_fp80 @asinl(x86_fp80 %0) {
%2 = alloca x86_fp80
%3 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%4 = load x86_fp80, x86_fp80* %2
%5 = call x86_fp80 asm "fld\09%st\0A\09fmul\09%st(0)\0A\09fld1\0A\09fsubp\0A\09fsqrt\0A\09fpatan", "={st},0,~{st(1)},~{dirflag},~{fpsr},~{flags}"(x86_fp80 %4)
store x86_fp80 %5, x86_fp80* %3
%6 = load x86_fp80, x86_fp80* %3
ret x86_fp80 %6
}

LLVM IR (-O2):
define x86_fp80 @asinl(x86_fp80 %0) {
%2 = tail call x86_fp80 asm "fld\09%st\0A\09fmul\09%st(0)\0A\09fld1\0A\09fsubp\0A\09fsqrt\0A\09fpatan", "={st},0,~{st(1)},~{dirflag},~{fpsr},~{flags}"(x86_fp80 %0)
ret x86_fp80 %2
}
/* Variables and functions */
int /*<<< orphan*/ foo();
int main(void) {
  int i;
  return i = 40, foo(), i + 2;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <foo@plt>
mov    $0x2a,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 40, i32* %2
%3 = call i32 (...) @foo()
%4 = load i32, i32* %2
%5 = add nsw i32 %4, 2
ret i32 %5
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @foo()
ret i32 42
}
/* Type definitions */
struct timeval {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
int utimes(const char *filename, const struct timeval tv[2]) {
  errno = ENOSYS;
  return -1;
}


x86 assembly (clang, -O0):
<utimes>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ed5(%rip),%rax
mov    (%rax),%ecx
mov    0x2ebc(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.timeval = type { i32 }
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @utimes(i8* %0, %struct.timeval* %1) {
%3 = alloca i8*
%4 = alloca %struct.timeval*
store i8* %0, i8** %3
store %struct.timeval* %1, %struct.timeval** %4
%5 = load i32, i32* @ENOSYS
store i32 %5, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
%struct.timeval = type { i32 }
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @utimes(i8* nocapture readnone %0, %struct.timeval* nocapture readnone %1) {
%3 = load i32, i32* @ENOSYS
store i32 %3, i32* @errno
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isgraph(int);
void t_isgraph_0x9b() {
  Assert_real((isgraph(155) == 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_isgraph.c",
              780, ("isgraph should be 0 for 0x9b"));
}


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

x86 assembly (clang, -O2):
<t_isgraph_0x9b>:
push   %rax
mov    $0x9b,%edi
call   1040 <isgraph@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x30c,%edx
pop    %rax
jmp    1030 <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_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0x9b\00"
define void @t_isgraph_0x9b() {
%1 = call i64 @isgraph(i32 155)
%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 780, 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_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0x9b\00"
define void @t_isgraph_0x9b() {
%1 = tail call i64 @isgraph(i32 155)
%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 780, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
void RunEncryptionKeySchedule(uint8_t *key, uint8_t *roundKeys) {}


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

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

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

LLVM IR (-O2):
define void @RunEncryptionKeySchedule(i32* nocapture %0, i32* nocapture %1) {
ret void
}
/* Variables and functions */
int toascii(int);
void test_toascii_concrete(int v) {
  int ret = toascii(256);
  (void)ret;
}


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

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

LLVM IR (-O0):
define void @test_toascii_concrete(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = call i32 @toascii(i32 256)
store i32 %4, i32* %3
%5 = load i32, i32* %3
ret void
}

LLVM IR (-O2):
define void @test_toascii_concrete(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
int mainc() {
  double pi = 3.1415926535897932;
  double d = 30.0;
  double a = d * pi;
  printf("%15.15f\n", a);
  return 0;
}


x86 assembly (clang, -O0):
<mainc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  0xee8(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  0xed3(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [9 x i8] c"%15.15f\0A\00"
define i32 @mainc() {
%1 = alloca double
%2 = alloca double
%3 = alloca double
store double 0x400921FB54442D18, double* %1
store double 3.000000e+01, double* %2
%4 = load double, double* %2
%5 = load double, double* %1
%6 = fmul double %4, %5
store double %6, double* %3
%7 = load double, double* %3
%8 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), double %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"%15.15f\0A\00"
define i32 @mainc() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), double 0x40578FDB9EFFEA46)
ret i32 0
}
int cmp_char(const void *p1, const void *p2) {
  int r = *(const char *)p1 - *(const char *)p2;
  if (r < 0)
    return -1;
  else if (r > 0)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<cmp_char>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
mov    -0x18(%rbp),%rcx
movsbl (%rcx),%ecx
sub    %ecx,%eax
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jge    1135 <cmp_char+0x35>
movl   $0xffffffff,-0x4(%rbp)
jmp    1152 <cmp_char+0x52>
cmpl   $0x0,-0x1c(%rbp)
jle    114b <cmp_char+0x4b>
movl   $0x1,-0x4(%rbp)
jmp    1152 <cmp_char+0x52>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp_char>:
movsbl (%rdi),%eax
movsbl (%rsi),%ecx
xor    %edx,%edx
cmp    %ecx,%eax
setne  %dl
mov    $0xffffffff,%eax
cmovns %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @cmp_char(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = sext i8 %3 to i32
%5 = load i8, i8* %1
%6 = sext i8 %5 to i32
%7 = sub nsw i32 %4, %6
%8 = icmp ne i32 %7, 0
%9 = zext i1 %8 to i32
%10 = icmp sgt i32 %7, -1
%11 = select i1 %10, i32 %9, i32 -1
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ read_varid();
int /*<<< orphan*/ write_src(char *, int /*<<< orphan*/);
void PUSHvar_handler(void) {
  write_src("PUSH(getvar("
            "%d"
            "));\n",
            read_varid());
}


x86 assembly (clang, -O0):
<PUSHvar_handler>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <read_varid@plt>
mov    %eax,%esi
lea    0xecc(%rip),%rdi
call   1030 <write_src@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<PUSHvar_handler>:
push   %rax
xor    %eax,%eax
call   1040 <read_varid@plt>
lea    0xed1(%rip),%rdi
mov    %eax,%esi
pop    %rax
jmp    1030 <write_src@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"PUSH(getvar(%d));\0A\00"
define void @PUSHvar_handler() {
%1 = call i32 (...) @read_varid()
%2 = call i32 @write_src(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"PUSH(getvar(%d));\0A\00"
define void @PUSHvar_handler() {
%1 = tail call i32 (...) @read_varid()
%2 = tail call i32 @write_src(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
void rop3_171_0_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = T | S;
  stk2 = ~stk2;
  stk1 = *D | stk2;
  *D = (stk1 & S) | (stk1 & (~T)) | (T & (~S) & *D);
}


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

x86 assembly (clang, -O2):
<rop3_171_0_1>:
or     %edx,%esi
not    %sil
mov    (%rdi),%al
or     %al,%sil
not    %dl
and    %sil,%dl
or     %al,%dl
mov    %dl,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_171_0_1(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%9 = load i8, i8* %6
%10 = zext i8 %9 to i32
%11 = load i8, i8* %5
%12 = zext i8 %11 to i32
%13 = or i32 %10, %12
%14 = trunc i32 %13 to i8
store i8 %14, i8* %8
%15 = load i8, i8* %8
%16 = zext i8 %15 to i32
%17 = xor i32 %16, -1
%18 = trunc i32 %17 to i8
store i8 %18, i8* %8
%19 = load i8*, i8** %4
%20 = load i8, i8* %19
%21 = zext i8 %20 to i32
%22 = load i8, i8* %8
%23 = zext i8 %22 to i32
%24 = or i32 %21, %23
%25 = trunc i32 %24 to i8
store i8 %25, i8* %7
%26 = load i8, i8* %7
%27 = zext i8 %26 to i32
%28 = load i8, i8* %5
%29 = zext i8 %28 to i32
%30 = and i32 %27, %29
%31 = load i8, i8* %7
%32 = zext i8 %31 to i32
%33 = load i8, i8* %6
%34 = zext i8 %33 to i32
%35 = xor i32 %34, -1
%36 = and i32 %32, %35
%37 = or i32 %30, %36
%38 = load i8, i8* %6
%39 = zext i8 %38 to i32
%40 = load i8, i8* %5
%41 = zext i8 %40 to i32
%42 = xor i32 %41, -1
%43 = and i32 %39, %42
%44 = load i8*, i8** %4
%45 = load i8, i8* %44
%46 = zext i8 %45 to i32
%47 = and i32 %43, %46
%48 = or i32 %37, %47
%49 = trunc i32 %48 to i8
%50 = load i8*, i8** %4
store i8 %49, i8* %50
ret void
}

LLVM IR (-O2):
define void @rop3_171_0_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = or i8 %2, %1
%5 = xor i8 %4, -1
%6 = load i8, i8* %0
%7 = or i8 %6, %5
%8 = xor i8 %2, -1
%9 = and i8 %7, %8
%10 = or i8 %6, %9
store i8 %10, i8* %0
ret void
}
char *langRomTypeHalnote() { return "Halnote"; }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"Halnote\00"
define i8* @langRomTypeHalnote() {
ret i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [8 x i8] c"Halnote\00"
define i8* @langRomTypeHalnote() {
ret i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ strcasecmp(char *, char *);
int isSupported(char *type) {
  if (!strcasecmp(type, "PCM"))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<isSupported>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%eax
jne    1141 <isSupported+0x31>
movl   $0x1,-0x4(%rbp)
jmp    1148 <isSupported+0x38>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isSupported>:
push   %rax
lea    0xee8(%rip),%rsi
call   1030 <strcasecmp@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"PCM\00"
define i32 @isSupported(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i32 @strcasecmp(i8* %4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%6 = icmp ne i32 %5, 0
br i1 %6, label %8, label %7
7: ; preds = %1
store i32 1, i32* %2
br label %9
8: ; preds = %1
store i32 0, i32* %2
br label %9
9: ; preds = %8, %7
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
@.str = [4 x i8] c"PCM\00"
define i32 @isSupported(i8* nocapture %0) {
%2 = tail call i32 @strcasecmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}