xunge/DecIR huggingface dataset:
void calc_tf(double a, double k, double t1, double *t2, double x, double h) {
  *t2 = (k * a * t1) - h * x / k * a;
}


x86 assembly (clang, -O0):
<calc_tf>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
mov    %rdi,-0x20(%rbp)
movsd  %xmm3,-0x28(%rbp)
movsd  %xmm4,-0x30(%rbp)
movsd  -0x10(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
movsd  -0x30(%rbp),%xmm1
mulsd  -0x28(%rbp),%xmm1
divsd  -0x10(%rbp),%xmm1
mulsd  -0x8(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<calc_tf>:
mulsd  %xmm4,%xmm3
divsd  %xmm1,%xmm3
mulsd  %xmm0,%xmm3
mulsd  %xmm1,%xmm0
mulsd  %xmm2,%xmm0
subsd  %xmm3,%xmm0
movsd  %xmm0,(%rdi)
ret

LLVM IR (-O0):
define void @calc_tf(double %0, double %1, double %2, double* %3, double %4, double %5) {
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double*
%11 = alloca double
%12 = alloca double
store double %0, double* %7
store double %1, double* %8
store double %2, double* %9
store double* %3, double** %10
store double %4, double* %11
store double %5, double* %12
%13 = load double, double* %8
%14 = load double, double* %7
%15 = fmul double %13, %14
%16 = load double, double* %9
%17 = load double, double* %12
%18 = load double, double* %11
%19 = fmul double %17, %18
%20 = load double, double* %8
%21 = fdiv double %19, %20
%22 = load double, double* %7
%23 = fmul double %21, %22
%24 = fneg double %23
%25 = call double @llvm.fmuladd.f64(double %15, double %16, double %24)
%26 = load double*, double** %10
store double %25, double* %26
ret void
}

LLVM IR (-O2):
define void @calc_tf(double %0, double %1, double %2, double* nocapture writeonly %3, double %4, double %5) {
%7 = fmul double %0, %1
%8 = fneg double %5
%9 = fmul double %8, %4
%10 = fdiv double %9, %1
%11 = fmul double %10, %0
%12 = tail call double @llvm.fmuladd.f64(double %7, double %2, double %11)
store double %12, double* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ put8(int);
void fcomip_fpreg(int fpreg) {
  put8(0xDF);
  put8(0xF0 + fpreg);
}


x86 assembly (clang, -O0):
<fcomip_fpreg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0xdf,%edi
call   1030 <put8@plt>
mov    -0x4(%rbp),%edi
add    $0xf0,%edi
call   1030 <put8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fcomip_fpreg>:
push   %rbx
mov    %edi,%ebx
mov    $0xdf,%edi
call   1030 <put8@plt>
add    $0xf0,%ebx
mov    %ebx,%edi
pop    %rbx
jmp    1030 <put8@plt>

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

LLVM IR (-O2):
define void @fcomip_fpreg(i32 %0) {
%2 = tail call i32 @put8(i32 223)
%3 = add nsw i32 %0, 240
%4 = tail call i32 @put8(i32 %3)
ret void
}
/* Variables and functions */
scalar_t__ floor(float);
int nearestInt(float x) { return (int)floor(x + 0.5f); }


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

x86 assembly (clang, -O2):
<nearestInt>:
addss  0xee8(%rip),%xmm0
jmp    1030 <floor@plt>

LLVM IR (-O0):
define i32 @nearestInt(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fadd float %3, 5.000000e-01
%5 = call i64 @floor(float %4)
%6 = trunc i64 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @nearestInt(float %0) {
%2 = fadd float %0, 5.000000e-01
%3 = tail call i64 @floor(float %2)
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage() {
  printf("Uso: ./client [[getDisps] || [disp_id opc val]]\n");
  printf("\tgetDisps\t: Entrega lista de dispositivos conectados.\n");
  printf("\tdisp_id opc val\t: Setea el parámetro opc del dispositivo disp_id "
         "con el valor val.\n");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
lea    0xf0a(%rip),%rdi
call   1030 <printf@plt>
lea    0xf35(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf0c(%rip),%rdi
call   1030 <puts@plt>
lea    0xf36(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [49 x i8] c"Uso: ./client [[getDisps] || [disp_id opc val]]\0A\00"
@.str.1 = [55 x i8] c"\09getDisps\09: Entrega lista de dispositivos conectados.\0A\00"
@.str.2 = [86 x i8] c"\09disp_id opc val\09: Setea el par\C3\A1metro opc del dispositivo disp_id con el valor val.\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([86 x i8], [86 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [48 x i8] c"Uso: ./client [[getDisps] || [disp_id opc val]]\00"
@str.3 = [54 x i8] c"\09getDisps\09: Entrega lista de dispositivos conectados.\00"
@str.4 = [85 x i8] c"\09disp_id opc val\09: Setea el par\C3\A1metro opc del dispositivo disp_id con el valor val.\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([85 x i8], [85 x i8]* @str.4, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _debug_print_backtrace();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *,
                           char const *, char const *, int);
int /*<<< orphan*/ perror(int /*<<< orphan*/ *);
int /*<<< orphan*/ stderr;
int _error_print(const char *scope, const char *call, const char *file,
                 int line) {
  fprintf(stderr, "Error: [%s] %s\n\tIn file %s at line %d\n\t", scope, call,
          file, line);
  perror(NULL);
  _debug_print_backtrace();
  return -1;
}


x86 assembly (clang, -O0):
<_error_print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    0x2e92(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8
mov    -0x1c(%rbp),%r9d
lea    0xe99(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1050 <perror@plt>
mov    $0x0,%al
call   1040 <_debug_print_backtrace@plt>
mov    $0xffffffff,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_error_print>:
push   %rax
mov    %ecx,%r9d
mov    %rdx,%r8
mov    %rsi,%rcx
mov    %rdi,%rdx
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
lea    0xeb3(%rip),%rsi
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1050 <perror@plt>
xor    %eax,%eax
call   1040 <_debug_print_backtrace@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [40 x i8] c"Error: [%s] %s\0A\09In file %s at line %d\0A\09\00"
define i32 @_error_print(i8* %0, i8* %1, i8* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = load i32, i32* @stderr
%10 = load i8*, i8** %5
%11 = load i8*, i8** %6
%12 = load i8*, i8** %7
%13 = load i32, i32* %8
%14 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i8* %10, i8* %11, i8* %12, i32 %13)
%15 = call i32 @perror(i32* null)
%16 = call i32 (...) @_debug_print_backtrace()
ret i32 -1
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [40 x i8] c"Error: [%s] %s\0A\09In file %s at line %d\0A\09\00"
define i32 @_error_print(i8* %0, i8* %1, i8* %2, i32 %3) {
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1, i8* %2, i32 %3)
%7 = tail call i32 @perror(i32* null)
%8 = tail call i32 (...) @_debug_print_backtrace()
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void fred(int arg) { printf("fred: we passed %d\n", arg); }


x86 assembly (clang, -O0):
<fred>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xedb(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fred>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"fred: we passed %d\0A\00"
define void @fred(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"fred: we passed %d\0A\00"
define void @fred(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Type definitions */
struct sysinfo {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ get_cpu_stats(struct sysinfo *);
int /*<<< orphan*/ get_load_average(struct sysinfo *);
int /*<<< orphan*/ get_mem_usage(struct sysinfo *);
void machine_update(struct sysinfo *info) {
  get_load_average(info);
  get_mem_usage(info);
  get_cpu_stats(info);
}


x86 assembly (clang, -O0):
<machine_update>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <get_load_average@plt>
mov    -0x8(%rbp),%rdi
call   1040 <get_mem_usage@plt>
mov    -0x8(%rbp),%rdi
call   1050 <get_cpu_stats@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<machine_update>:
push   %rbx
mov    %rdi,%rbx
call   1030 <get_load_average@plt>
mov    %rbx,%rdi
call   1040 <get_mem_usage@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1050 <get_cpu_stats@plt>

LLVM IR (-O0):
%struct.sysinfo = type { i32 }
define void @machine_update(%struct.sysinfo* %0) {
%2 = alloca %struct.sysinfo*
store %struct.sysinfo* %0, %struct.sysinfo** %2
%3 = load %struct.sysinfo*, %struct.sysinfo** %2
%4 = call i32 @get_load_average(%struct.sysinfo* %3)
%5 = load %struct.sysinfo*, %struct.sysinfo** %2
%6 = call i32 @get_mem_usage(%struct.sysinfo* %5)
%7 = load %struct.sysinfo*, %struct.sysinfo** %2
%8 = call i32 @get_cpu_stats(%struct.sysinfo* %7)
ret void
}

LLVM IR (-O2):
%struct.sysinfo = type { i32 }
define void @machine_update(%struct.sysinfo* %0) {
%2 = tail call i32 @get_load_average(%struct.sysinfo* %0)
%3 = tail call i32 @get_mem_usage(%struct.sysinfo* %0)
%4 = tail call i32 @get_cpu_stats(%struct.sysinfo* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ATOMIC_4BYTE_ALIGNED_READ(int volatile *, int *);
int atomic_aligned_read_int(volatile int *var) {
  int temp;
  ATOMIC_4BYTE_ALIGNED_READ(var, &temp);
  return temp;
}


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

x86 assembly (clang, -O2):
<atomic_aligned_read_int>:
push   %rax
lea    0x4(%rsp),%rsi
call   1030 <ATOMIC_4BYTE_ALIGNED_READ@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @atomic_aligned_read_int(i32* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @ATOMIC_4BYTE_ALIGNED_READ(i32* %0, i32* %2)
%5 = load i32, i32* %2
ret i32 %5
}
/* Variables and functions */
scalar_t__ is_space(unsigned char);
unsigned char filter_char(unsigned char ch) {
  if (is_space(ch))
    return ' ';
  return ch;
}


x86 assembly (clang, -O0):
<filter_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movzbl -0x2(%rbp),%edi
call   1030 <is_space@plt>
cmp    $0x0,%rax
je     113a <filter_char+0x2a>
movb   $0x20,-0x1(%rbp)
jmp    1140 <filter_char+0x30>
mov    -0x2(%rbp),%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<filter_char>:
push   %rbx
mov    %edi,%ebx
call   1030 <is_space@plt>
test   %rax,%rax
mov    $0x20,%eax
cmove  %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define zeroext i8 @filter_char(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = call i64 @is_space(i8 zeroext %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i8 32, i8* %2
br label %10
8: ; preds = %1
%9 = load i8, i8* %3
store i8 %9, i8* %2
br label %10
10: ; preds = %8, %7
%11 = load i8, i8* %2
ret i8 %11
}

LLVM IR (-O2):
define zeroext i8 @filter_char(i8 zeroext %0) {
%2 = tail call i64 @is_space(i8 zeroext %0)
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i8 %0, i8 32
ret i8 %4
}
/* Type definitions */
struct l2_packet_data {
  int dummy;
};

/* Variables and functions */
void l2_packet_notify_auth_start(struct l2_packet_data *l2) {}


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

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

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

LLVM IR (-O2):
%struct.l2_packet_data = type { i32 }
define void @l2_packet_notify_auth_start(%struct.l2_packet_data* nocapture %0) {
ret void
}
/* Variables and functions */
int iter(int);
int /*<<< orphan*/ printf(char *, int, int);
int rek(int);
int main() { printf("%d %d\n", iter(3), rek(3)); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x3,%edi
call   1050 <iter@plt>
mov    %eax,-0x4(%rbp)
mov    $0x3,%edi
call   1040 <rek@plt>
mov    -0x4(%rbp),%esi
mov    %eax,%edx
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x3,%edi
call   1050 <iter@plt>
mov    %eax,%ebx
mov    $0x3,%edi
call   1040 <rek@plt>
lea    0xeb2(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"%d %d\0A\00"
define i32 @main() {
%1 = tail call i32 @iter(i32 3)
%2 = tail call i32 @rek(i32 3)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %2)
ret i32 0
}
/* Variables and functions */
scalar_t__ malloc(int);
int /*<<< orphan*/ memcpy(char *, char const *, int);
char *webp_filename(char *fn, int size) {
  const char _webp_ending[6] = {0x2e, 0x77, 0x65, 0x62, 0x70, 0x00};
  char *newfile = (char *)malloc(size + 6);
  memcpy(newfile, fn, size);
  memcpy(&newfile[size], _webp_ending, 6);
  return newfile;
}


x86 assembly (clang, -O0):
<webp_filename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0xecb(%rip),%eax
mov    %eax,-0x12(%rbp)
mov    0xec5(%rip),%ax
mov    %ax,-0xe(%rbp)
mov    -0xc(%rbp),%edi
add    $0x6,%edi
call   1040 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <memcpy@plt>
mov    -0x20(%rbp),%rdi
movslq -0xc(%rbp),%rax
add    %rax,%rdi
lea    -0x12(%rbp),%rsi
mov    $0x6,%edx
call   1030 <memcpy@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<webp_filename>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %esi,%ebx
mov    %rdi,%r14
movw   $0x70,0xc(%rsp)
movl   $0x6265772e,0x8(%rsp)
62
lea    0x6(%rbx),%edi
call   1040 <malloc@plt>
mov    %rax,%r15
mov    %rax,%rdi
mov    %r14,%rsi
mov    %ebx,%edx
call   1030 <memcpy@plt>
movslq %ebx,%rdi
add    %r15,%rdi
lea    0x8(%rsp),%rsi
mov    $0x6,%edx
call   1030 <memcpy@plt>
mov    %r15,%rax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__const.webp_filename._webp_ending = [6 x i8] c".webp\00"
define i8* @webp_filename(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca [6 x i8]
%6 = alloca i8*
store i8* %0, i8** %3
store i32 %1, i32* %4
%7 = bitcast [6 x i8]* %5 to i8*
%8 = load i32, i32* %4
%9 = add nsw i32 %8, 6
%10 = call i64 @malloc(i32 %9)
%11 = inttoptr i64 %10 to i8*
store i8* %11, i8** %6
%12 = load i8*, i8** %6
%13 = load i8*, i8** %3
%14 = load i32, i32* %4
%15 = call i32 @memcpy(i8* %12, i8* %13, i32 %14)
%16 = load i8*, i8** %6
%17 = load i32, i32* %4
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i8, i8* %16, i64 %18
%20 = getelementptr inbounds [6 x i8], [6 x i8]* %5, i64 0, i64 0
%21 = call i32 @memcpy(i8* %19, i8* %20, i32 6)
%22 = load i8*, i8** %6
ret i8* %22
}

LLVM IR (-O2):
@__const.webp_filename._webp_ending = [6 x i8] c".webp\00"
define i8* @webp_filename(i8* %0, i32 %1) {
%3 = alloca [6 x i8]
%4 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 0
%5 = add nsw i32 %1, 6
%6 = tail call i64 @malloc(i32 %5)
%7 = inttoptr i64 %6 to i8*
%8 = tail call i32 @memcpy(i8* %7, i8* %0, i32 %1)
%9 = sext i32 %1 to i64
%10 = getelementptr inbounds i8, i8* %7, i64 %9
%11 = call i32 @memcpy(i8* %10, i8* %4, i32 6)
ret i8* %7
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
void bear_print_number(uint64_t value) { printf("%lu\n", value); }


x86 assembly (clang, -O0):
<bear_print_number>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xedb(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bear_print_number>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"%lu\0A\00"
define void @bear_print_number(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"%lu\0A\00"
define void @bear_print_number(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
int getpid();
int get_pid_c8_() { return getpid(); }


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

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

LLVM IR (-O0):
define i32 @get_pid_c8_() {
%1 = call i32 (...) @getpid()
ret i32 %1
}

LLVM IR (-O2):
define i32 @get_pid_c8_() {
%1 = tail call i32 (...) @getpid()
ret i32 %1
}
void threshold_by_comparison_2_Good() {
  int arr[100];
  int j = 0;
  while (1) {
    j++;
    if (j == 100) {
      j = 0;
    }
    arr[j] = 0;
  }
}


x86 assembly (clang, -O0):
<threshold_by_comparison_2_Good>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
movl   $0x0,-0x194(%rbp)
mov    -0x194(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x194(%rbp)
cmpl   $0x64,-0x194(%rbp)
jne    113b <threshold_by_comparison_2_Good+0x3b>
movl   $0x0,-0x194(%rbp)
movslq -0x194(%rbp),%rax
movl   $0x0,-0x190(%rbp,%rax,4)
jmp    1115 <threshold_by_comparison_2_Good+0x15>

x86 assembly (clang, -O2):
<threshold_by_comparison_2_Good>:
jmp    1100 <threshold_by_comparison_2_Good>

LLVM IR (-O0):
define void @threshold_by_comparison_2_Good() {
%1 = alloca [100 x i32]
%2 = alloca i32
store i32 0, i32* %2
br label %3
3: ; preds = %0, %9
%4 = load i32, i32* %2
%5 = add nsw i32 %4, 1
store i32 %5, i32* %2
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 100
br i1 %7, label %8, label %9
8: ; preds = %3
store i32 0, i32* %2
br label %9
9: ; preds = %8, %3
%10 = load i32, i32* %2
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 %11
store i32 0, i32* %12
br label %3
}

LLVM IR (-O2):
define void @threshold_by_comparison_2_Good() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Variables and functions */
size_t strlen(const char *s) {
  size_t res = 0;
  while (*s++)
    res++;
  return res;
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
cmpb   $0x0,(%rax)
je     1139 <strlen+0x39>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <strlen+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
cmpb   $0x0,(%rdi)
je     111f <strlen+0x1f>
xor    %ecx,%ecx
nopw   0x0(%rax,%rax,1)
lea    0x1(%rcx),%rax
cmpb   $0x0,0x1(%rdi,%rcx,1)
mov    %rax,%rcx
jne    1110 <strlen+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i64 @strlen(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %8, %4 ], [ 0, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = add i64 %5, 1
%9 = load i8, i8* %7
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i64 [ 0, %1 ], [ %8, %4 ]
ret i64 %12
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
void clearScreen() { system("cls"); }


x86 assembly (clang, -O0):
<clearScreen>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <system@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [4 x i8] c"cls\00"
define void @clearScreen() {
%1 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"cls\00"
define void @clearScreen() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef unsigned char uint8_t;
typedef int /*<<< orphan*/ int16_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(unsigned char *, int /*<<< orphan*/ *, int);
int /*<<< orphan*/ spi_writeBytes(unsigned char *, int);
void spi_sendIntPacket(uint8_t t, int16_t v) {
  static unsigned char b[4];
  int16_t *vptr = &v;
  b[0] = t;
  memcpy(b + 1, vptr, 2);
  spi_writeBytes(b, 3);
}


x86 assembly (clang, -O0):
<spi_sendIntPacket>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x1(%rbp),%al
mov    %al,0x2eef(%rip)
mov    -0x10(%rbp),%rsi
lea    0x2ee5(%rip),%rdi
mov    $0x2,%edx
call   1030 <memcpy@plt>
lea    0x2ed3(%rip),%rdi
mov    $0x3,%esi
call   1040 <spi_writeBytes@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<spi_sendIntPacket>:
push   %rbx
sub    $0x10,%rsp
mov    %esi,0xc(%rsp)
mov    %dil,0x2f01(%rip)
lea    0x2efa(%rip),%rbx
lea    0x2ef4(%rip),%rdi
lea    0xc(%rsp),%rsi
mov    $0x2,%edx
call   1030 <memcpy@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
call   1040 <spi_writeBytes@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@spi_sendIntPacket.b = internal global [4 x i8] zeroinitializer
define void @spi_sendIntPacket(i8 zeroext %0, i32 %1) {
%3 = alloca i8
%4 = alloca i32
%5 = alloca i32*
store i8 %0, i8* %3
store i32 %1, i32* %4
store i32* %4, i32** %5
%6 = load i8, i8* %3
store i8 %6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @spi_sendIntPacket.b, i64 0, i64 0)
%7 = load i32*, i32** %5
%8 = call i32 @memcpy(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @spi_sendIntPacket.b, i64 0, i64 1), i32* %7, i32 2)
%9 = call i32 @spi_writeBytes(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @spi_sendIntPacket.b, i64 0, i64 0), i32 3)
ret void
}

LLVM IR (-O2):
@spi_sendIntPacket.b = internal global [4 x i8] zeroinitializer
define void @spi_sendIntPacket(i8 zeroext %0, i32 %1) {
%3 = alloca i32
store i32 %1, i32* %3
store i8 %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @spi_sendIntPacket.b, i64 0, i64 0)
%4 = call i32 @memcpy(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @spi_sendIntPacket.b, i64 0, i64 1), i32* %3, i32 2)
%5 = call i32 @spi_writeBytes(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @spi_sendIntPacket.b, i64 0, i64 0), i32 3)
ret void
}
/* Variables and functions */
bool is_whitespace(const char c) {
  int i = 0;
  while ("\t\n "[i++] != '\0') {
    if (c == "\t\n "[i])
      return true;
  }
  return false;
}


x86 assembly (clang, -O0):
<is_whitespace>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0xc(%rbp)
movslq %eax,%rcx
lea    0xeda(%rip),%rax
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     115f <is_whitespace+0x5f>
movsbl -0x5(%rbp),%eax
movslq -0xc(%rbp),%rdx
lea    0xebe(%rip),%rcx
movsbl (%rcx,%rdx,1),%ecx
cmp    %ecx,%eax
jne    115a <is_whitespace+0x5a>
movl   $0x1,-0x4(%rbp)
jmp    1166 <is_whitespace+0x66>
jmp    1111 <is_whitespace+0x11>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_whitespace>:
cmp    $0x20,%dil
ja     1120 <is_whitespace+0x20>
mov    $0x1,%eax
movzbl %dil,%ecx
movabs $0x100000401,%rdx
bt     %rcx,%rdx
jae    1120 <is_whitespace+0x20>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
@.str = [4 x i8] c"\09\0A \00"
define i32 @is_whitespace(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
%4 = alloca i32
store i8 %0, i8* %3
store i32 0, i32* %4
br label %5
5: ; preds = %23, %1
%6 = load i32, i32* %4
%7 = add nsw i32 %6, 1
store i32 %7, i32* %4
%8 = sext i32 %6 to i64
%9 = getelementptr inbounds [4 x i8], [4 x i8]* @.str, i64 0, i64 %8
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %24
13: ; preds = %5
%14 = load i8, i8* %3
%15 = sext i8 %14 to i32
%16 = load i32, i32* %4
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds [4 x i8], [4 x i8]* @.str, i64 0, i64 %17
%19 = load i8, i8* %18
%20 = sext i8 %19 to i32
%21 = icmp eq i32 %15, %20
br i1 %21, label %22, label %23
22: ; preds = %13
store i32 1, i32* %2
br label %25
23: ; preds = %13
br label %5
24: ; preds = %5
store i32 0, i32* %2
br label %25
25: ; preds = %24, %22
%26 = load i32, i32* %2
ret i32 %26
}

LLVM IR (-O2):
define i32 @is_whitespace(i8 signext %0) {
switch i8 %0, label %2 [
i8 10, label %3
i8 32, label %3
i8 0, label %3
]
2: ; preds = %1
br label %3
3: ; preds = %1, %1, %1, %2
%4 = phi i32 [ 1, %1 ], [ 0, %2 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %4
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ menu();
int /*<<< orphan*/ titre(char *);
int main(void) {
  titre("TEST DE LA FONCTION DE MENU GENERIQUE");
  menu();
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1040 <titre@plt>
mov    $0x0,%al
call   1030 <menu@plt>
mov    0x2e97(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <titre@plt>
xor    %eax,%eax
call   1030 <menu@plt>
mov    0x2ea5(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [38 x i8] c"TEST DE LA FONCTION DE MENU GENERIQUE\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @titre(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @menu()
%4 = load i32, i32* @EXIT_SUCCESS
ret i32 %4
}

LLVM IR (-O2):
@.str = [38 x i8] c"TEST DE LA FONCTION DE MENU GENERIQUE\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i32 @titre(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @menu()
%3 = load i32, i32* @EXIT_SUCCESS
ret i32 %3
}
/* Type definitions */
struct timeval {
  int tv_usec;
  int /*<<< orphan*/ tv_sec;
};
struct timespec {
  int tv_nsec;
  int /*<<< orphan*/ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
void bot_timespec_now(struct timespec *ts) {
  struct timeval tv;
  gettimeofday(&tv, NULL);
  ts->tv_sec = tv.tv_sec;
  ts->tv_nsec = tv.tv_usec * 1000;
}


x86 assembly (clang, -O0):
<bot_timespec_now>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x4(%rax)
imul   $0x3e8,-0x10(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bot_timespec_now>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
mov    0xc(%rsp),%eax
mov    %eax,0x4(%rbx)
imul   $0x3e8,0x8(%rsp),%eax
mov    %eax,(%rbx)
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.timespec = type { i32, i32 }
%struct.timeval = type { i32, i32 }
define void @bot_timespec_now(%struct.timespec* %0) {
%2 = alloca %struct.timespec*
%3 = alloca %struct.timeval
store %struct.timespec* %0, %struct.timespec** %2
%4 = call i32 @gettimeofday(%struct.timeval* %3, i32* null)
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i32 0, i32 1
%6 = load i32, i32* %5
%7 = load %struct.timespec*, %struct.timespec** %2
%8 = getelementptr inbounds %struct.timespec, %struct.timespec* %7, i32 0, i32 1
store i32 %6, i32* %8
%9 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i32 0, i32 0
%10 = load i32, i32* %9
%11 = mul nsw i32 %10, 1000
%12 = load %struct.timespec*, %struct.timespec** %2
%13 = getelementptr inbounds %struct.timespec, %struct.timespec* %12, i32 0, i32 0
store i32 %11, i32* %13
ret void
}

LLVM IR (-O2):
%struct.timespec = type { i32, i32 }
%struct.timeval = type { i32, i32 }
define void @bot_timespec_now(%struct.timespec* nocapture writeonly %0) {
%2 = alloca %struct.timeval
%3 = bitcast %struct.timeval* %2 to i8*
%4 = call i32 @gettimeofday(%struct.timeval* %2, i32* null)
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i64 0, i32 1
%6 = load i32, i32* %5
%7 = getelementptr inbounds %struct.timespec, %struct.timespec* %0, i64 0, i32 1
store i32 %6, i32* %7
%8 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i64 0, i32 0
%9 = load i32, i32* %8
%10 = mul nsw i32 %9, 1000
%11 = getelementptr inbounds %struct.timespec, %struct.timespec* %0, i64 0, i32 0
store i32 %10, i32* %11
ret void
}
void g_strv_get_type() {}


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

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

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

LLVM IR (-O2):
define void @g_strv_get_type() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dup(int);
int /*<<< orphan*/ dup2(int, int);
int main() {
  dup(2);
  dup(256);
  dup2(3, 4);
  dup2(255, 256);
  dup2(1, 1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x2,%edi
call   1040 <dup@plt>
mov    $0x100,%edi
call   1040 <dup@plt>
mov    $0x3,%edi
mov    $0x4,%esi
call   1030 <dup2@plt>
mov    $0xff,%edi
mov    $0x100,%esi
call   1030 <dup2@plt>
mov    $0x1,%esi
mov    %esi,%edi
call   1030 <dup2@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x2,%edi
call   1040 <dup@plt>
mov    $0x100,%edi
call   1040 <dup@plt>
mov    $0x3,%edi
mov    $0x4,%esi
call   1030 <dup2@plt>
mov    $0xff,%edi
mov    $0x100,%esi
call   1030 <dup2@plt>
mov    $0x1,%edi
mov    $0x1,%esi
call   1030 <dup2@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @dup(i32 2)
%3 = call i32 @dup(i32 256)
%4 = call i32 @dup2(i32 3, i32 4)
%5 = call i32 @dup2(i32 255, i32 256)
%6 = call i32 @dup2(i32 1, i32 1)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @dup(i32 2)
%2 = tail call i32 @dup(i32 256)
%3 = tail call i32 @dup2(i32 3, i32 4)
%4 = tail call i32 @dup2(i32 255, i32 256)
%5 = tail call i32 @dup2(i32 1, i32 1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ aes_encrypt(unsigned char const *, int const,
                               unsigned char *, unsigned char const *,
                               unsigned char const *, int);
void aes_256_encrypt(const unsigned char *plaintext, const int plaintext_len,
                     unsigned char ciphertext[], void *iv,
                     const unsigned char *key) {
  aes_encrypt(plaintext, plaintext_len, ciphertext, (const unsigned char *)iv,
              key, 32);
}


x86 assembly (clang, -O0):
<aes_256_encrypt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    $0x20,%r9d
call   1030 <aes_encrypt@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aes_256_encrypt>:
mov    $0x20,%r9d
jmp    1030 <aes_encrypt@plt>

LLVM IR (-O0):
define void @aes_256_encrypt(i8* %0, i32 %1, i8* %2, i8* %3, i8* %4) {
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
store i8* %0, i8** %6
store i32 %1, i32* %7
store i8* %2, i8** %8
store i8* %3, i8** %9
store i8* %4, i8** %10
%11 = load i8*, i8** %6
%12 = load i32, i32* %7
%13 = load i8*, i8** %8
%14 = load i8*, i8** %9
%15 = load i8*, i8** %10
%16 = call i32 @aes_encrypt(i8* %11, i32 %12, i8* %13, i8* %14, i8* %15, i32 32)
ret void
}

LLVM IR (-O2):
define void @aes_256_encrypt(i8* %0, i32 %1, i8* %2, i8* %3, i8* %4) {
%6 = tail call i32 @aes_encrypt(i8* %0, i32 %1, i8* %2, i8* %3, i8* %4, i32 32)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ft_putchar(char);
void ligne_3(int x) {
  int a;
  a = 0;
  while (a != x) {
    if (a != 0 && a != x - 1) {
      ft_putchar('B');
    } else {
      ft_putchar('C');
    }
    a++;
  }
}


x86 assembly (clang, -O0):
<ligne_3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
je     1170 <ligne_3+0x60>
cmpl   $0x0,-0x8(%rbp)
je     1158 <ligne_3+0x48>
mov    -0x8(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
je     1158 <ligne_3+0x48>
mov    $0x42,%edi
call   1030 <ft_putchar@plt>
jmp    1162 <ligne_3+0x52>
mov    $0x43,%edi
call   1030 <ft_putchar@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <ligne_3+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ligne_3>:
push   %r14
push   %rbx
push   %rax
test   %edi,%edi
je     1144 <ligne_3+0x34>
mov    %edi,%r14d
xor    %ebx,%ebx
nopl   (%rax)
lea    (%r14,%rbx,1),%eax
sub    $0x1,%ebx
setb   %cl
cmp    $0x1,%eax
sete   %al
or     %cl,%al
movzbl %al,%edi
or     $0x42,%edi
call   1030 <ft_putchar@plt>
mov    %r14d,%eax
add    %ebx,%eax
jne    1120 <ligne_3+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @ligne_3(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
br label %4
4: ; preds = %20, %1
%5 = load i32, i32* %3
%6 = load i32, i32* %2
%7 = icmp ne i32 %5, %6
br i1 %7, label %8, label %23
8: ; preds = %4
%9 = load i32, i32* %3
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %18
11: ; preds = %8
%12 = load i32, i32* %3
%13 = load i32, i32* %2
%14 = sub nsw i32 %13, 1
%15 = icmp ne i32 %12, %14
br i1 %15, label %16, label %18
16: ; preds = %11
%17 = call i32 @ft_putchar(i8 signext 66)
br label %20
18: ; preds = %11, %8
%19 = call i32 @ft_putchar(i8 signext 67)
br label %20
20: ; preds = %18, %16
%21 = load i32, i32* %3
%22 = add nsw i32 %21, 1
store i32 %22, i32* %3
br label %4
23: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @ligne_3(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %14, label %3
3: ; preds = %1
%4 = add nsw i32 %0, -1
br label %5
5: ; preds = %3, %5
%6 = phi i32 [ 0, %3 ], [ %12, %5 ]
%7 = icmp eq i32 %6, 0
%8 = icmp eq i32 %6, %4
%9 = select i1 %7, i1 true, i1 %8
%10 = select i1 %9, i8 67, i8 66
%11 = tail call i32 @ft_putchar(i8 signext %10)
%12 = add nuw nsw i32 %6, 1
%13 = icmp eq i32 %12, %0
br i1 %13, label %14, label %5
14: ; preds = %5, %1
ret void
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
int fstat(int, struct stat *);
int ___fxstat(int __ver, int __filedesc, struct stat *__stat_buf) {
  return fstat(__filedesc, __stat_buf);
}


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

x86 assembly (clang, -O2):
<___fxstat>:
mov    %esi,%edi
mov    %rdx,%rsi
jmp    1030 <fstat@plt>

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @___fxstat(i32 %0, i32 %1, %struct.stat* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca %struct.stat*
store i32 %0, i32* %4
store i32 %1, i32* %5
store %struct.stat* %2, %struct.stat** %6
%7 = load i32, i32* %5
%8 = load %struct.stat*, %struct.stat** %6
%9 = call i32 @fstat(i32 %7, %struct.stat* %8)
ret i32 %9
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @___fxstat(i32 %0, i32 %1, %struct.stat* nocapture %2) {
%4 = tail call i32 @fstat(i32 %1, %struct.stat* %2)
ret i32 %4
}
void memcpy_fromfs(void *to, const void *from, unsigned long n) {
  __asm__ __volatile__("" : : : "memory");
  memcpy(to, from, n);
  __asm__ __volatile__("" : : : "memory");
}


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

x86 assembly (clang, -O2):
<memcpy_fromfs>:
push   %rax
call   1030 <memcpy@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @memcpy_fromfs(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
ret void
}

LLVM IR (-O2):
define void @memcpy_fromfs(i8* nocapture writeonly %0, i8* nocapture %1, i64 %2) {
tail call void asm sideeffect "", "~{memory},~{dirflag},~{fpsr},~{flags}"()
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %0, i8* align 1 %1, i64 %2, i1 false)
tail call void asm sideeffect "", "~{memory},~{dirflag},~{fpsr},~{flags}"()
ret void
}
void foo168() {}


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

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

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

LLVM IR (-O2):
define void @foo168() {
ret void
}
/* Variables and functions */
scalar_t__ isnan(float);
int __ocl_isunordered_float(float src1, float src2) {
  return isnan(src1) || isnan(src2) ? 1 : 0;
}


x86 assembly (clang, -O0):
<__ocl_isunordered_float>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <isnan@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x9(%rbp)
jne    1152 <__ocl_isunordered_float+0x42>
movss  -0x8(%rbp),%xmm0
call   1030 <isnan@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%dl
xor    %eax,%eax
mov    $0x1,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__ocl_isunordered_float>:
push   %rax
movss  %xmm1,0x4(%rsp)
call   1030 <isnan@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     112b <__ocl_isunordered_float+0x1b>
pop    %rcx
ret
movss  0x4(%rsp),%xmm0
call   1030 <isnan@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rcx
ret

LLVM IR (-O0):
define i32 @__ocl_isunordered_float(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = call i64 @isnan(float %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %12, label %8
8: ; preds = %2
%9 = load float, float* %4
%10 = call i64 @isnan(float %9)
%11 = icmp ne i64 %10, 0
br label %12
12: ; preds = %8, %2
%13 = phi i1 [ true, %2 ], [ %11, %8 ]
%14 = zext i1 %13 to i64
%15 = select i1 %13, i32 1, i32 0
ret i32 %15
}

LLVM IR (-O2):
define i32 @__ocl_isunordered_float(float %0, float %1) {
%3 = tail call i64 @isnan(float %0)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = tail call i64 @isnan(float %1)
%7 = icmp ne i64 %6, 0
%8 = zext i1 %7 to i32
br label %9
9: ; preds = %5, %2
%10 = phi i32 [ 1, %2 ], [ %8, %5 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, void *);
int /*<<< orphan*/ stderr;
void rtpp_modman_do_acct_fin(void *pub) {
  fprintf(stderr,
          "Method rtpp_modman@%p::do_acct (rtpp_modman_do_acct) is invoked "
          "after destruction\x0a",
          pub);
  abort();
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [83 x i8] c"Method rtpp_modman@%p::do_acct (rtpp_modman_do_acct) is invoked after destruction\0A\00"
define void @rtpp_modman_do_acct_fin(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* getelementptr inbounds ([83 x i8], [83 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [83 x i8] c"Method rtpp_modman@%p::do_acct (rtpp_modman_do_acct) is invoked after destruction\0A\00"
define void @rtpp_modman_do_acct_fin(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([83 x i8], [83 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void helloFromC() { printf("Hello from C code! \n"); }


x86 assembly (clang, -O0):
<helloFromC>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [21 x i8] c"Hello from C code! \0A\00"
define void @helloFromC() {
%1 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [20 x i8] c"Hello from C code! \00"
define void @helloFromC() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ test_cosup_poly();
int main(void) {
  printf("\nTesting Coefficient Support Polynomial Representations\n");
  test_cosup_poly();
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [57 x i8] c"\0ATesting Coefficient Support Polynomial Representations\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @test_cosup_poly()
ret i32 0
}

LLVM IR (-O2):
@str = [56 x i8] c"\0ATesting Coefficient Support Polynomial Representations\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @test_cosup_poly()
ret i32 0
}
void changeDoubles(double *a, double *b) {
  double tmp = *a;
  *a = *b;
  *b = tmp;
}


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

x86 assembly (clang, -O2):
<changeDoubles>:
movsd  (%rdi),%xmm0
movsd  (%rsi),%xmm1
movsd  %xmm1,(%rdi)
movsd  %xmm0,(%rsi)
ret

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

LLVM IR (-O2):
define void @changeDoubles(double* nocapture %0, double* nocapture %1) {
%3 = load double, double* %0
%4 = load double, double* %1
store double %4, double* %0
store double %3, double* %1
ret void
}
unsigned char in(unsigned short port) {
  unsigned char result;
  __asm__("in %%dx, %%al" : "=a"(result) : "d"(port));
  return result;
}


x86 assembly (clang, -O0):
<in>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    -0x2(%rbp),%dx
in     (%dx),%al
mov    %al,-0x3(%rbp)
movzbl -0x3(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<in>:
mov    %edi,%edx
in     (%dx),%al
ret

LLVM IR (-O0):
define zeroext i8 @in(i16 zeroext %0) {
%2 = alloca i16
%3 = alloca i8
store i16 %0, i16* %2
%4 = load i16, i16* %2
%5 = call i8 asm "in %dx, %al", "={ax},{dx},~{dirflag},~{fpsr},~{flags}"(i16 %4)
store i8 %5, i8* %3
%6 = load i8, i8* %3
ret i8 %6
}

LLVM IR (-O2):
define zeroext i8 @in(i16 zeroext %0) {
%2 = tail call i8 asm "in %dx, %al", "={ax},{dx},~{dirflag},~{fpsr},~{flags}"(i16 %0)
ret i8 %2
}