xunge/DecIR huggingface dataset:
/* Variables and functions */
double M_1_PI;
double exp(double);
float g(float rsq, float one_sigma2) {
  float ans;
  ans = 0.5 * M_1_PI * one_sigma2 * exp(-0.5 * rsq * one_sigma2);
  return ans;
}


x86 assembly (clang, -O0):
<g>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movsd  0xede(%rip),%xmm0
mov    0x2eaf(%rip),%rax
mulsd  (%rax),%xmm0
movss  -0x8(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xea8(%rip),%xmm0
mulsd  %xmm1,%xmm0
movss  -0x8(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm1,%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<g>:
push   %rax
mov    0x2ec8(%rip),%rax
movsd  (%rax),%xmm2
mulsd  0xedc(%rip),%xmm2
cvtss2sd %xmm1,%xmm1
mulsd  %xmm1,%xmm2
movsd  %xmm2,(%rsp)
cvtss2sd %xmm0,%xmm0
mulsd  0xecb(%rip),%xmm0
mulsd  %xmm1,%xmm0
call   1030 <exp@plt>
mulsd  (%rsp),%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@M_1_PI = global double 0.000000e+00
define float @g(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
store float %0, float* %3
store float %1, float* %4
%6 = load double, double* @M_1_PI
%7 = fmul double 5.000000e-01, %6
%8 = load float, float* %4
%9 = fpext float %8 to double
%10 = fmul double %7, %9
%11 = load float, float* %3
%12 = fpext float %11 to double
%13 = fmul double -5.000000e-01, %12
%14 = load float, float* %4
%15 = fpext float %14 to double
%16 = fmul double %13, %15
%17 = call double @exp(double %16)
%18 = fmul double %10, %17
%19 = fptrunc double %18 to float
store float %19, float* %5
%20 = load float, float* %5
ret float %20
}

LLVM IR (-O2):
@M_1_PI = global double 0.000000e+00
define float @g(float %0, float %1) {
%3 = load double, double* @M_1_PI
%4 = fmul double %3, 5.000000e-01
%5 = fpext float %1 to double
%6 = fmul double %4, %5
%7 = fpext float %0 to double
%8 = fmul double %7, -5.000000e-01
%9 = fmul double %8, %5
%10 = tail call double @exp(double %9)
%11 = fmul double %10, %6
%12 = fptrunc double %11 to float
ret float %12
}
void destroy_function(void *data) { data = 0; }


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

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

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

LLVM IR (-O2):
define void @destroy_function(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ inicializarSemilla();
int rand();
int aleatorioInter(int numeroMin, int numeroMax) {
  inicializarSemilla();
  return (numeroMin + (rand() % (numeroMax + 1 - numeroMin)));
}


x86 assembly (clang, -O0):
<aleatorioInter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <inicializarSemilla@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1040 <rand@plt>
mov    -0x8(%rbp),%ecx
add    $0x1,%ecx
sub    -0x4(%rbp),%ecx
cltd
idiv   %ecx
mov    -0xc(%rbp),%eax
add    %edx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aleatorioInter>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <inicializarSemilla@plt>
xor    %eax,%eax
call   1040 <rand@plt>
sub    %ebp,%ebx
add    $0x1,%ebx
cltd
idiv   %ebx
add    %edx,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @aleatorioInter(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 (...) @inicializarSemilla()
%6 = load i32, i32* %3
%7 = call i32 (...) @rand()
%8 = load i32, i32* %4
%9 = add nsw i32 %8, 1
%10 = load i32, i32* %3
%11 = sub nsw i32 %9, %10
%12 = srem i32 %7, %11
%13 = add nsw i32 %6, %12
ret i32 %13
}

LLVM IR (-O2):
define i32 @aleatorioInter(i32 %0, i32 %1) {
%3 = tail call i32 (...) @inicializarSemilla()
%4 = tail call i32 (...) @rand()
%5 = sub i32 1, %0
%6 = add i32 %5, %1
%7 = srem i32 %4, %6
%8 = add nsw i32 %7, %0
ret i32 %8
}
/* Variables and functions */
unsigned char *alien_offset(int /*<<< orphan*/);
int /*<<< orphan*/ dpeek();
unsigned int bignum_producer(unsigned int digit) {
  unsigned char *ptr = alien_offset(dpeek());
  return *(ptr + digit);
}


x86 assembly (clang, -O0):
<bignum_producer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <dpeek@plt>
mov    %eax,%edi
call   1040 <alien_offset@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x4(%rbp),%ecx
movzbl (%rax,%rcx,1),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bignum_producer>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <dpeek@plt>
mov    %eax,%edi
call   1040 <alien_offset@plt>
mov    %ebx,%ecx
movzbl (%rax,%rcx,1),%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @bignum_producer(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = call i32 (...) @dpeek()
%5 = call i8* @alien_offset(i32 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = load i32, i32* %2
%8 = zext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %6, i64 %8
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @bignum_producer(i32 %0) {
%2 = tail call i32 (...) @dpeek()
%3 = tail call i8* @alien_offset(i32 %2)
%4 = zext i32 %0 to i64
%5 = getelementptr inbounds i8, i8* %3, i64 %4
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
ret i32 %7
}
/* Variables and functions */
int libc_strlen(char *);
char libc_tolower(char);
char *libc_strtolower(char *str) {
  int i = 0, n = libc_strlen(str);
  while (n < i) {
    str[i] = libc_tolower(str[i]);
    i++;
  }
  return str;
}


x86 assembly (clang, -O0):
<libc_strtolower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <libc_strlen@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1177 <libc_strtolower+0x57>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <libc_tolower@plt>
mov    %al,%dl
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    113f <libc_strtolower+0x1f>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<libc_strtolower>:
push   %rbx
mov    %rdi,%rbx
call   1040 <libc_strlen@plt>
test   %eax,%eax
js     1140 <libc_strtolower+0x20>
mov    %rbx,%rax
pop    %rbx
ret
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl (%rbx),%edi
call   1030 <libc_tolower@plt>
mov    %al,(%rbx)
add    $0x1,%rbx
jmp    1140 <libc_strtolower+0x20>

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

LLVM IR (-O2):
define i8* @libc_strtolower(i8* returned %0) {
%2 = tail call i32 @libc_strlen(i8* %0)
%3 = icmp slt i32 %2, 0
br i1 %3, label %4, label %10
4: ; preds = %1, %4
%5 = phi i64 [ %9, %4 ], [ 0, %1 ]
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = load i8, i8* %6
%8 = tail call signext i8 @libc_tolower(i8 signext %7)
store i8 %8, i8* %6
%9 = add nuw i64 %5, 1
br label %4
10: ; preds = %1
ret i8* %0
}
/* Variables and functions */
int main(int argc, char **argv) {
  char *ptr = (char *)NULL;
  *ptr = 0x00;
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movb   $0x0,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* null, i8** %6
%7 = load i8*, i8** %6
store i8 0, i8* %7
ret i32 0
}

LLVM IR (-O2):
void updateMovieReleaseYear(unsigned int movieID, unsigned short year) {
  return;
}


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

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

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

LLVM IR (-O2):
define void @updateMovieReleaseYear(i32 %0, i16 zeroext %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ StubBug(char *);
int ffsl(long int i) {
  StubBug("STUB:"
          "ffsl");
  return -1;
}


x86 assembly (clang, -O0):
<ffsl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
call   1030 <StubBug@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ffsl>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <StubBug@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"STUB:ffsl\00"
define i32 @ffsl(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = call i32 @StubBug(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret i32 -1
}

LLVM IR (-O2):
@.str = [10 x i8] c"STUB:ffsl\00"
define i32 @ffsl(i64 %0) {
%2 = tail call i32 @StubBug(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret i32 -1
}
/* Variables and functions */
double cos(double);
int /*<<< orphan*/ link_error();
void f(double a) {
  double b = cos(a);
  double c = cos(a);
  if (b != c)
    link_error();
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <cos@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <cos@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
ucomisd -0x18(%rbp),%xmm0
jne    1166 <f+0x46>
jp     1166 <f+0x46>
jmp    116d <f+0x4d>
mov    $0x0,%al
call   1030 <link_error@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
sub    $0x18,%rsp
movsd  %xmm0,0x8(%rsp)
call   1040 <cos@plt>
movsd  %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
call   1040 <cos@plt>
movsd  0x10(%rsp),%xmm1
ucomisd %xmm0,%xmm1
jne    114e <f+0x2e>
jnp    1159 <f+0x39>
xor    %eax,%eax
add    $0x18,%rsp
jmp    1030 <link_error@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define void @f(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %2
%5 = load double, double* %2
%6 = call double @cos(double %5)
store double %6, double* %3
%7 = load double, double* %2
%8 = call double @cos(double %7)
store double %8, double* %4
%9 = load double, double* %3
%10 = load double, double* %4
%11 = fcmp une double %9, %10
br i1 %11, label %12, label %14
12: ; preds = %1
%13 = call i32 (...) @link_error()
br label %14
14: ; preds = %12, %1
ret void
}

LLVM IR (-O2):
define void @f(double %0) {
%2 = tail call double @cos(double %0)
%3 = tail call double @cos(double %0)
%4 = fcmp une double %2, %3
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 (...) @link_error()
br label %7
7: ; preds = %5, %1
ret void
}
/* Type definitions */
struct sched_param {
  int /*<<< orphan*/ sched_priority;
};

/* Variables and functions */
int /*<<< orphan*/ SCHED_RR;
int /*<<< orphan*/ execlp(char *, char *, int /*<<< orphan*/ *);
int /*<<< orphan*/ sched_get_priority_max(int /*<<< orphan*/);
int /*<<< orphan*/ sched_setscheduler(int /*<<< orphan*/, int /*<<< orphan*/,
                                      struct sched_param *);
int main() {
  struct sched_param p;
  p.sched_priority = sched_get_priority_max(SCHED_RR);
  sched_setscheduler(0, SCHED_RR, &p);
  execlp("bash", "bash", NULL);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2e92(%rip),%rax
mov    (%rax),%edi
call   1040 <sched_get_priority_max@plt>
mov    %eax,-0x8(%rbp)
mov    0x2e81(%rip),%rax
mov    (%rax),%esi
xor    %edi,%edi
lea    -0x8(%rbp),%rdx
call   1030 <sched_setscheduler@plt>
lea    0xe95(%rip),%rsi
xor    %eax,%eax
mov    %eax,%edx
mov    %rsi,%rdi
call   1050 <execlp@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
mov    0x2e9c(%rip),%rbx
mov    (%rbx),%edi
call   1040 <sched_get_priority_max@plt>
mov    %eax,0x8(%rsp)
mov    (%rbx),%esi
lea    0x8(%rsp),%rdx
xor    %edi,%edi
call   1030 <sched_setscheduler@plt>
lea    0xea4(%rip),%rdi
mov    %rdi,%rsi
xor    %edx,%edx
call   1050 <execlp@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.sched_param = type { i32 }
@SCHED_RR = global i32 0
@.str = [5 x i8] c"bash\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.sched_param
store i32 0, i32* %1
%3 = load i32, i32* @SCHED_RR
%4 = call i32 @sched_get_priority_max(i32 %3)
%5 = getelementptr inbounds %struct.sched_param, %struct.sched_param* %2, i32 0, i32 0
store i32 %4, i32* %5
%6 = load i32, i32* @SCHED_RR
%7 = call i32 @sched_setscheduler(i32 0, i32 %6, %struct.sched_param* %2)
%8 = call i32 @execlp(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* null)
ret i32 0
}

LLVM IR (-O2):
%struct.sched_param = type { i32 }
@SCHED_RR = global i32 0
@.str = [5 x i8] c"bash\00"
define i32 @main() {
%1 = alloca %struct.sched_param
%2 = bitcast %struct.sched_param* %1 to i8*
%3 = load i32, i32* @SCHED_RR
%4 = tail call i32 @sched_get_priority_max(i32 %3)
%5 = getelementptr inbounds %struct.sched_param, %struct.sched_param* %1, i64 0, i32 0
store i32 %4, i32* %5
%6 = load i32, i32* @SCHED_RR
%7 = call i32 @sched_setscheduler(i32 0, i32 %6, %struct.sched_param* %1)
%8 = call i32 @execlp(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* null)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void g9_cb(void *arg) { puts("GPIO_9 triggered"); }


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

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

LLVM IR (-O0):
@.str = [17 x i8] c"GPIO_9 triggered\00"
define void @g9_cb(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @puts(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"GPIO_9 triggered\00"
define void @g9_cb(i8* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ vpn_error(char *);
void vpn_error_exit(char *msg, int code) {
  vpn_error(msg);
  exit(code);
}


x86 assembly (clang, -O0):
<vpn_error_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <vpn_error@plt>
mov    -0xc(%rbp),%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<vpn_error_exit>:
push   %rbx
mov    %esi,%ebx
call   1040 <vpn_error@plt>
mov    %ebx,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @vpn_error_exit(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = call i32 @vpn_error(i8* %5)
%7 = load i32, i32* %4
%8 = call i32 @exit(i32 %7)
unreachable
}

LLVM IR (-O2):
define void @vpn_error_exit(i8* %0, i32 %1) {
%3 = tail call i32 @vpn_error(i8* %0)
%4 = tail call i32 @exit(i32 %1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ printf(char *, unsigned int);
int main() {
  unsigned int x = 1;
  unsigned int y = -x;
  assert(y == 4294967295);
  printf("y: %u\n", y);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
xor    %eax,%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0xffffffff,%ecx
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0xc(%rbp),%esi
lea    0xea0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1040 <assert@plt>
lea    0xece(%rip),%rdi
mov    $0xffffffff,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"y: %u\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
%4 = load i32, i32* %2
%5 = sub i32 0, %4
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = zext i32 %6 to i64
%8 = icmp eq i64 %7, 4294967295
%9 = zext i1 %8 to i32
%10 = call i32 @assert(i32 %9)
%11 = load i32, i32* %3
%12 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"y: %u\0A\00"
define i32 @main() {
%1 = tail call i32 @assert(i32 1)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 -1)
ret i32 0
}
int sub2(int i) { return i + (5 + i); }


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

x86 assembly (clang, -O2):
<sub2>:
lea    (%rdi,%rdi,1),%eax
add    $0x5,%eax
ret

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

LLVM IR (-O2):
define i32 @sub2(i32 %0) {
%2 = shl i32 %0, 1
%3 = add i32 %2, 5
ret i32 %3
}
/* Variables and functions */
long abs(long);
long labs(long n) { return abs(n); }


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

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

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

LLVM IR (-O2):
define i64 @labs(i64 %0) {
%2 = tail call i64 @llvm.abs.i64(i64 %0, i1 true)
ret i64 %2
}
void gemini_led_on(int led) {
  if (led >= 0 && led < 8)
    *(unsigned char *)((0xffeffe80) + (led << 3)) = 1;
}


x86 assembly (clang, -O0):
<gemini_led_on>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jl     112b <gemini_led_on+0x2b>
cmpl   $0x8,-0x4(%rbp)
jge    112b <gemini_led_on+0x2b>
mov    -0x4(%rbp),%eax
shl    $0x3,%eax
add    $0xffeffe80,%eax
mov    %eax,%eax
movb   $0x1,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<gemini_led_on>:
cmp    $0x7,%edi
ja     1110 <gemini_led_on+0x10>
mov    %edi,%eax
mov    $0xffeffe80,%ecx
movb   $0x1,(%rcx,%rax,8)
ret

LLVM IR (-O0):
define void @gemini_led_on(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 0
br i1 %4, label %5, label %14
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 8
br i1 %7, label %8, label %14
8: ; preds = %5
%9 = load i32, i32* %2
%10 = shl i32 %9, 3
%11 = add i32 -1048960, %10
%12 = zext i32 %11 to i64
%13 = inttoptr i64 %12 to i8*
store i8 1, i8* %13
br label %14
14: ; preds = %8, %5, %1
ret void
}

LLVM IR (-O2):
define void @gemini_led_on(i32 %0) {
%2 = icmp ult i32 %0, 8
br i1 %2, label %3, label %8
3: ; preds = %1
%4 = shl nuw nsw i32 %0, 3
%5 = add nuw nsw i32 %4, -1048960
%6 = zext i32 %5 to i64
%7 = inttoptr i64 %6 to i8*
store i8 1, i8* %7
br label %8
8: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main() {
  int a = 1;
  int b = 0;
  if (a == 0 && b++) {
    printf("True\n");
  } else {
    printf("False\n");
  }
  printf("b = %d\n", b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    115e <main+0x4e>
mov    -0xc(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0xc(%rbp)
cmp    $0x0,%eax
je     115e <main+0x4e>
lea    0xeae(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    116c <main+0x5c>
lea    0xea1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
lea    0xe97(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str.2 = [8 x i8] c"b = %d\0A\00"
@str = [6 x i8] c"False\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 0)
ret i32 0
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
uint8_t GET_A(const uint32_t value) {
  return (((uint32_t)value & 0xff000000) >> 24);
}


x86 assembly (clang, -O0):
<GET_A>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff000000,%eax
shr    $0x18,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<GET_A>:
mov    %edi,%eax
shr    $0x18,%eax
ret

LLVM IR (-O0):
define i32 @GET_A(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, -16777216
%5 = lshr i32 %4, 24
ret i32 %5
}

LLVM IR (-O2):
define i32 @GET_A(i32 %0) {
%2 = lshr i32 %0, 24
ret i32 %2
}
void free_physical(unsigned int physBase, unsigned int size) {}


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

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

LLVM IR (-O0):
define void @free_physical(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 @free_physical(i32 %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalpha(int);
void t_isalpha_0x05() {
  Assert_real((isalpha(5) == 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_isalpha.c",
              30, ("isalpha should be 0 for 0x05"));
}


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

x86 assembly (clang, -O2):
<t_isalpha_0x05>:
push   %rax
mov    $0x5,%edi
call   1030 <isalpha@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x1e,%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_isalpha.c\00"
@.str.1 = [29 x i8] c"isalpha should be 0 for 0x05\00"
define void @t_isalpha_0x05() {
%1 = call i64 @isalpha(i32 5)
%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 30, 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_isalpha.c\00"
@.str.1 = [29 x i8] c"isalpha should be 0 for 0x05\00"
define void @t_isalpha_0x05() {
%1 = tail call i64 @isalpha(i32 5)
%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 30, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char const *);
void fatal(const char *fCall) {
  perror(fCall);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<fatal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <perror@plt>
mov    0x2ea4(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<fatal>:
push   %rax
call   1030 <perror@plt>
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
define void @fatal(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @perror(i8* %3)
%5 = load i32, i32* @EXIT_FAILURE
%6 = call i32 @exit(i32 %5)
unreachable
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
define void @fatal(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = load i32, i32* @EXIT_FAILURE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0x9c() {
  Assert_real((islower(156) == 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_islower.c",
              785, ("islower should be 0 for 0x9c"));
}


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

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

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0x9c\00"
define void @t_islower_0x9c() {
%1 = call i64 @islower(i32 156)
%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 785, 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_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0x9c\00"
define void @t_islower_0x9c() {
%1 = tail call i64 @islower(i32 156)
%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 785, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void abort_with(char *s) {
  fprintf(stderr, s);
  exit(1);
}


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

x86 assembly (clang, -O2):
<abort_with>:
push   %rax
mov    %rdi,%rsi
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
define void @abort_with(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
define void @abort_with(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ sendByte(int, int /*<<< orphan*/);
void tube_WriteN(unsigned int *reg) {
  unsigned char *ptr = (unsigned char *)reg[0];
  int len = reg[1];
  while (len-- > 0) {
    sendByte(1, *ptr++);
  }
}


x86 assembly (clang, -O0):
<tube_WriteN>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x14(%rbp)
cmp    $0x0,%eax
jle    1165 <tube_WriteN+0x55>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movzbl (%rax),%esi
mov    $0x1,%edi
call   1030 <sendByte@plt>
jmp    1130 <tube_WriteN+0x20>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tube_WriteN>:
push   %rbp
push   %rbx
push   %rax
mov    0x4(%rdi),%ebp
test   %ebp,%ebp
jle    1139 <tube_WriteN+0x29>
mov    (%rdi),%ebx
add    $0x1,%ebp
nop
movzbl (%rbx),%esi
add    $0x1,%rbx
mov    $0x1,%edi
call   1030 <sendByte@plt>
add    $0xffffffff,%ebp
cmp    $0x1,%ebp
ja     1120 <tube_WriteN+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define void @tube_WriteN(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 1
%3 = load i32, i32* %2
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %18
5: ; preds = %1
%6 = load i32, i32* %0
%7 = zext i32 %6 to i64
%8 = inttoptr i64 %7 to i8*
br label %9
9: ; preds = %5, %9
%10 = phi i32 [ %12, %9 ], [ %3, %5 ]
%11 = phi i8* [ %13, %9 ], [ %8, %5 ]
%12 = add nsw i32 %10, -1
%13 = getelementptr inbounds i8, i8* %11, i64 1
%14 = load i8, i8* %11
%15 = zext i8 %14 to i32
%16 = tail call i32 @sendByte(i32 1, i32 %15)
%17 = icmp ugt i32 %10, 1
br i1 %17, label %9, label %18
18: ; preds = %9, %1
ret void
}
/* Variables and functions */
size_t triplet_ind(char const *);
char conv(const char *s) {
  static const char Conv_Table[64] = {
      'F', 'L', 'I', 'V', 'S', 'P', 'T', 'A', 'Y', 'H', 'N', 'D', 'C',
      'R', 'S', 'G', 'F', 'L', 'I', 'V', 'S', 'P', 'T', 'A', 'Y', 'H',
      'N', 'D', 'C', 'R', 'S', 'G', 'L', 'L', 'I', 'V', 'S', 'P', 'T',
      'A', '*', 'Q', 'K', 'E', '*', 'R', 'R', 'G', 'L', 'L', 'M', 'V',
      'S', 'P', 'T', 'A', '*', 'Q', 'K', 'E', 'W', 'R', 'R', 'G'};
  return Conv_Table[triplet_ind(s)];
}


x86 assembly (clang, -O0):
<conv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <triplet_ind@plt>
mov    %rax,%rcx
lea    0xed1(%rip),%rax
movsbl (%rax,%rcx,1),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<conv>:
push   %rax
call   1030 <triplet_ind@plt>
lea    0xee3(%rip),%rcx
mov    (%rax,%rcx,1),%al
pop    %rcx
ret

LLVM IR (-O0):
@conv.Conv_Table = internal constant [64 x i8] c"FLIVSPTAYHNDCRSGFLIVSPTAYHNDCRSGLLIVSPTA*QKE*RRGLLMVSPTA*QKEWRRG"
define signext i8 @conv(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @triplet_ind(i8* %3)
%5 = getelementptr inbounds [64 x i8], [64 x i8]* @conv.Conv_Table, i64 0, i64 %4
%6 = load i8, i8* %5
ret i8 %6
}

LLVM IR (-O2):
@conv.Conv_Table = internal unnamed_addr constant [64 x i8] c"FLIVSPTAYHNDCRSGFLIVSPTAYHNDCRSGLLIVSPTA*QKE*RRGLLMVSPTA*QKEWRRG"
define signext i8 @conv(i8* %0) {
%2 = tail call i64 @triplet_ind(i8* %0)
%3 = getelementptr inbounds [64 x i8], [64 x i8]* @conv.Conv_Table, i64 0, i64 %2
%4 = load i8, i8* %3
ret i8 %4
}
/* Variables and functions */
int /*<<< orphan*/ ClearWinSock();
int /*<<< orphan*/ ErrorHandler(char *);
int /*<<< orphan*/ close(int);
scalar_t__ listen(int, int);
int socketAscoltoDati(int serverSocket) {
  int esito = 0;
  if (listen(serverSocket, 6) < 0) {
    ErrorHandler("listen() failed.\n");
    close(serverSocket);
    ClearWinSock();
    esito = 1;
  }
  return (esito);
}


x86 assembly (clang, -O0):
<socketAscoltoDati>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x6,%esi
call   1060 <listen@plt>
cmp    $0x0,%rax
jge    118b <socketAscoltoDati+0x4b>
lea    0xe90(%rip),%rdi
call   1050 <ErrorHandler@plt>
mov    -0x4(%rbp),%edi
call   1030 <close@plt>
mov    $0x0,%al
call   1040 <ClearWinSock@plt>
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<socketAscoltoDati>:
push   %rbx
mov    %edi,%ebx
mov    $0x6,%esi
call   1060 <listen@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
js     1159 <socketAscoltoDati+0x19>
pop    %rbx
ret
lea    0xea0(%rip),%rdi
call   1050 <ErrorHandler@plt>
mov    %ebx,%edi
call   1030 <close@plt>
xor    %eax,%eax
call   1040 <ClearWinSock@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"listen() failed.\0A\00"
define i32 @socketAscoltoDati(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
%4 = load i32, i32* %2
%5 = call i64 @listen(i32 %4, i32 6)
%6 = icmp slt i64 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = call i32 @ErrorHandler(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%9 = load i32, i32* %2
%10 = call i32 @close(i32 %9)
%11 = call i32 (...) @ClearWinSock()
store i32 1, i32* %3
br label %12
12: ; preds = %7, %1
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
@.str = [18 x i8] c"listen() failed.\0A\00"
define i32 @socketAscoltoDati(i32 %0) {
%2 = tail call i64 @listen(i32 %0, i32 6)
%3 = icmp slt i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i32 @ErrorHandler(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @close(i32 %0)
%7 = tail call i32 (...) @ClearWinSock()
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %4 ], [ 0, %1 ]
ret i32 %9
}
void foo240() {}


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

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

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

LLVM IR (-O2):
define void @foo240() {
ret void
}
void task_begin() { ("task_begin"); }


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

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

LLVM IR (-O0):
@.str = [11 x i8] c"task_begin\00"
define void @task_begin() {
ret void
}

LLVM IR (-O2):
define void @task_begin() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char *);
void overflow(char str[]) {
  char buffer[4];
  strcpy(buffer, str);
}


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

x86 assembly (clang, -O2):
<overflow>:
push   %rax
mov    %rdi,%rsi
lea    0x4(%rsp),%rdi
call   1030 <strcpy@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @overflow(i8* %0) {
%2 = alloca i8*
%3 = alloca [4 x i8]
store i8* %0, i8** %2
%4 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 0
%5 = load i8*, i8** %2
%6 = call i32 @strcpy(i8* %4, i8* %5)
ret void
}

LLVM IR (-O2):
define void @overflow(i8* %0) {
%2 = alloca [4 x i8]
%3 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 0
%4 = call i32 @strcpy(i8* %3, i8* %0)
ret void
}
struct ev_loop *ev_default_loop_uc(void) {
  extern struct ev_loop *ev_default_loop_ptr;
  return ev_default_loop_ptr;
}


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

x86 assembly (clang, -O2):
<ev_default_loop_uc>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%rax
ret

LLVM IR (-O0):
%struct.ev_loop = type opaque
@ev_default_loop_ptr = external global %struct.ev_loop*
define %struct.ev_loop* @ev_default_loop_uc() {
%1 = load %struct.ev_loop*, %struct.ev_loop** @ev_default_loop_ptr
ret %struct.ev_loop* %1
}

LLVM IR (-O2):
%struct.ev_loop = type opaque
@ev_default_loop_ptr = external global %struct.ev_loop*
define %struct.ev_loop* @ev_default_loop_uc() {
%1 = load %struct.ev_loop*, %struct.ev_loop** @ev_default_loop_ptr
ret %struct.ev_loop* %1
}
/* Variables and functions */
int extractArchive(char *, char *);
int main(int argc, char **argv) {
  return extractArchive("archive.zip", "test-data/archive_out");
}


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

x86 assembly (clang, -O2):
<main>:
lea    0xee9(%rip),%rdi
lea    0xeee(%rip),%rsi
jmp    1030 <extractArchive@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"archive.zip\00"
@.str.1 = [22 x i8] c"test-data/archive_out\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @extractArchive(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
ret i32 %6
}

LLVM IR (-O2):
@.str = [12 x i8] c"archive.zip\00"
@.str.1 = [22 x i8] c"test-data/archive_out\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @extractArchive(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
void nrerror(char error_text[]) {
  fprintf(stderr, "Numerical Recipes run-time error ...\n");
  fprintf(stderr, "%s\n", error_text);
  fprintf(stderr, "... now exiting to system ...\n");
  exit(1);
}


x86 assembly (clang, -O0):
<nrerror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
lea    0xec4(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e96(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xecf(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e7b(%rip),%rax
mov    (%rax),%edi
lea    0xebc(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<nrerror>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2eb2(%rip),%r14
mov    (%r14),%edi
lea    0xec8(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0xedd(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0xecd(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [38 x i8] c"Numerical Recipes run-time error ...\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
@.str.2 = [31 x i8] c"... now exiting to system ...\0A\00"
define void @nrerror(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %2
%7 = call i32 (i32, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %6)
%8 = load i32, i32* @stderr
%9 = call i32 (i32, i8*, ...) @fprintf(i32 %8, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [38 x i8] c"Numerical Recipes run-time error ...\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
@.str.2 = [31 x i8] c"... now exiting to system ...\0A\00"
define void @nrerror(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 (i32, i8*, ...) @fprintf(i32 %2, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @stderr
%5 = tail call i32 (i32, i8*, ...) @fprintf(i32 %4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%6 = load i32, i32* @stderr
%7 = tail call i32 (i32, i8*, ...) @fprintf(i32 %6, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0))
%8 = tail call i32 @exit(i32 1)
unreachable
}
void HAL_TIM_Powerdown(void) {}


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

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

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

LLVM IR (-O2):
define void @HAL_TIM_Powerdown() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;
struct tcphdr {
  int /*<<< orphan*/ check;
};

/* Variables and functions */
int /*<<< orphan*/ ntohs(int /*<<< orphan*/);
uint16_t tcphdr_check_ntohs(struct tcphdr *h) { return ntohs(h->check); }


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

x86 assembly (clang, -O2):
<tcphdr_check_ntohs>:
mov    (%rdi),%edi
jmp    1030 <ntohs@plt>

LLVM IR (-O0):
%struct.tcphdr = type { i32 }
define i32 @tcphdr_check_ntohs(%struct.tcphdr* %0) {
%2 = alloca %struct.tcphdr*
store %struct.tcphdr* %0, %struct.tcphdr** %2
%3 = load %struct.tcphdr*, %struct.tcphdr** %2
%4 = getelementptr inbounds %struct.tcphdr, %struct.tcphdr* %3, i32 0, i32 0
%5 = load i32, i32* %4
%6 = call i32 @ntohs(i32 %5)
ret i32 %6
}

LLVM IR (-O2):
%struct.tcphdr = type { i32 }
define i32 @tcphdr_check_ntohs(%struct.tcphdr* nocapture %0) {
%2 = getelementptr inbounds %struct.tcphdr, %struct.tcphdr* %0, i64 0, i32 0
%3 = load i32, i32* %2
%4 = tail call i32 @ntohs(i32 %3)
ret i32 %4
}
void linewidthf(w) float w;
{ linewidth((short)(w + 0.5)); }


x86 assembly (clang, -O0):
<linewidthf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xece(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
movswl %ax,%edi
mov    $0x0,%al
call   1030 <linewidth@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<linewidthf>:
cvtsd2ss %xmm0,%xmm0
cvtss2sd %xmm0,%xmm0
addsd  0xee0(%rip),%xmm0
cvttsd2si %xmm0,%eax
movswl %ax,%edi
xor    %eax,%eax
jmp    1030 <linewidth@plt>

LLVM IR (-O0):
define void @linewidthf(double %0) {
%2 = alloca float
%3 = fptrunc double %0 to float
store float %3, float* %2
%4 = load float, float* %2
%5 = fpext float %4 to double
%6 = fadd double %5, 5.000000e-01
%7 = fptosi double %6 to i16
%8 = sext i16 %7 to i32
%9 = call i32 (i32, ...) bitcast (i32 (...)* @linewidth to i32 (i32, ...)*)(i32 %8)
ret void
}

LLVM IR (-O2):
define void @linewidthf(double %0) {
%2 = fptrunc double %0 to float
%3 = fpext float %2 to double
%4 = fadd double %3, 5.000000e-01
%5 = fptosi double %4 to i16
%6 = sext i16 %5 to i32
%7 = tail call i32 (i32, ...) bitcast (i32 (...)* @linewidth to i32 (i32, ...)*)(i32 %6)
ret void
}
const char *RegexVer() { return "regex"; }


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"regex\00"
define i8* @RegexVer() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}
void rop3_95_0_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  stk1 = *D & T;
  stk1 = ~stk1;
  *D = stk1;
}


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

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

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

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