xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_sys_cfg_ssid_usage(void) {
  printf("\nUsage : sys_cfg_ssid [SSID]\n");
  printf("\nIf SSID is provided, a 'set' is performed, else a 'get' is "
         "performed.\n");
  return;
}


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

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

LLVM IR (-O0):
@.str = [30 x i8] c"\0AUsage : sys_cfg_ssid [SSID]\0A\00"
@.str.1 = [72 x i8] c"\0AIf SSID is provided, a 'set' is performed, else a 'get' is performed.\0A\00"
define void @print_sys_cfg_ssid_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [29 x i8] c"\0AUsage : sys_cfg_ssid [SSID]\00"
@str.2 = [71 x i8] c"\0AIf SSID is provided, a 'set' is performed, else a 'get' is performed.\00"
define void @print_sys_cfg_ssid_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([71 x i8], [71 x i8]* @str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ large_function();
int main() { large_function(); }


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @large_function()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @large_function()
ret i32 0
}
/* Variables and functions */
scalar_t__ btp_skip_char(char **, char);
int btp_skip_char_sequence(char **input, char c) {
  int count = 0;
  while (btp_skip_char(input, c))
    ++count;
  return count;
}


x86 assembly (clang, -O0):
<btp_skip_char_sequence>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
movsbl -0x9(%rbp),%esi
call   1030 <btp_skip_char@plt>
cmp    $0x0,%rax
je     114e <btp_skip_char_sequence+0x3e>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1129 <btp_skip_char_sequence+0x19>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<btp_skip_char_sequence>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%r14
mov    $0xffffffff,%ebp
movsbl %sil,%ebx
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <btp_skip_char@plt>
add    $0x1,%ebp
test   %rax,%rax
jne    1120 <btp_skip_char_sequence+0x10>
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @btp_skip_char_sequence(i8** %0, i8 signext %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i32 [ 0, %2 ], [ %7, %3 ]
%5 = tail call i64 @btp_skip_char(i8** %0, i8 signext %1)
%6 = icmp eq i64 %5, 0
%7 = add nuw nsw i32 %4, 1
br i1 %6, label %8, label %3
8: ; preds = %3
ret i32 %4
}
/* Variables and functions */
int write_int(char *, int /*<<< orphan*/);
int idlestat_flush_trace(void) {
  return write_int("/sys/kernel/debug/tracing"
                   "/trace",
                   0);
}


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

x86 assembly (clang, -O2):
<idlestat_flush_trace>:
lea    0xee9(%rip),%rdi
xor    %esi,%esi
jmp    1030 <write_int@plt>

LLVM IR (-O0):
@.str = [32 x i8] c"/sys/kernel/debug/tracing/trace\00"
define i32 @idlestat_flush_trace() {
%1 = call i32 @write_int(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 0)
ret i32 %1
}

LLVM IR (-O2):
@.str = [32 x i8] c"/sys/kernel/debug/tracing/trace\00"
define i32 @idlestat_flush_trace() {
%1 = tail call i32 @write_int(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 0)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, char const *, char const *,
                           char const *);
char *build_sql(const char *select, const char *from, const char *where) {
  char sql_pattern[] = "SELECT %s FROM %s WHERE %s";
  static char __sql[(16 * 1024)] = {0};
  sprintf(__sql, sql_pattern, select, from, where);
  return __sql;
}


x86 assembly (clang, -O0):
<build_sql>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0xed5(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xed2(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    0xecf(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xecc(%rip),%ax
mov    %ax,-0x28(%rbp)
mov    0xec4(%rip),%al
mov    %al,-0x26(%rbp)
lea    -0x40(%rbp),%rsi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8
lea    0x2ed0(%rip),%rdi
call   1030 <sprintf@plt>
lea    0x2ec4(%rip),%rax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<build_sql>:
push   %rbx
sub    $0x20,%rsp
mov    %rdx,%r8
mov    %rsi,%rcx
mov    %rdi,%rdx
movups 0xee6(%rip),%xmm0
movups %xmm0,0xb(%rsp)
movaps 0xecf(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0x2f04(%rip),%rbx
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1030 <sprintf@plt>
mov    %rbx,%rax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.build_sql.sql_pattern = [27 x i8] c"SELECT %s FROM %s WHERE %s\00"
@build_sql.__sql = internal global [16384 x i8] zeroinitializer
define i8* @build_sql(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca [27 x i8]
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%8 = bitcast [27 x i8]* %7 to i8*
%9 = getelementptr inbounds [27 x i8], [27 x i8]* %7, i64 0, i64 0
%10 = load i8*, i8** %4
%11 = load i8*, i8** %5
%12 = load i8*, i8** %6
%13 = call i32 @sprintf(i8* getelementptr inbounds ([16384 x i8], [16384 x i8]* @build_sql.__sql, i64 0, i64 0), i8* %9, i8* %10, i8* %11, i8* %12)
ret i8* getelementptr inbounds ([16384 x i8], [16384 x i8]* @build_sql.__sql, i64 0, i64 0)
}

LLVM IR (-O2):
@__const.build_sql.sql_pattern = [27 x i8] c"SELECT %s FROM %s WHERE %s\00"
@build_sql.__sql = internal global [16384 x i8] zeroinitializer
define i8* @build_sql(i8* %0, i8* %1, i8* %2) {
%4 = alloca [27 x i8]
%5 = getelementptr inbounds [27 x i8], [27 x i8]* %4, i64 0, i64 0
%6 = call i32 @sprintf(i8* dereferenceable(1) getelementptr inbounds ([16384 x i8], [16384 x i8]* @build_sql.__sql, i64 0, i64 0), i8* %5, i8* %0, i8* %1, i8* %2)
ret i8* getelementptr inbounds ([16384 x i8], [16384 x i8]* @build_sql.__sql, i64 0, i64 0)
}
int ft_atoi(const char *str) {
  int i;
  int total;
  i = 0;
  total = 0;
  while (*(str + i)) {
    total = total * 10 + (*(str + i) - 48);
    i++;
  }
  return (total);
}


x86 assembly (clang, -O0):
<ft_atoi>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     114e <ft_atoi+0x4e>
imul   $0xa,-0x10(%rbp),%eax
mov    -0x8(%rbp),%rcx
movslq -0xc(%rbp),%rdx
movsbl (%rcx,%rdx,1),%ecx
sub    $0x30,%ecx
add    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1116 <ft_atoi+0x16>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_atoi>:
mov    (%rdi),%cl
test   %cl,%cl
je     1128 <ft_atoi+0x28>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
lea    (%rax,%rax,4),%eax
movsbl %cl,%ecx
lea    (%rcx,%rax,2),%eax
add    $0xffffffd0,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <ft_atoi+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @ft_atoi(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %16, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %12, %4 ], [ 0, %1 ]
%6 = phi i8 [ %14, %4 ], [ %2, %1 ]
%7 = phi i32 [ %11, %4 ], [ 0, %1 ]
%8 = mul nsw i32 %7, 10
%9 = sext i8 %6 to i32
%10 = add i32 %8, -48
%11 = add i32 %10, %9
%12 = add nuw nsw i64 %5, 1
%13 = getelementptr inbounds i8, i8* %0, i64 %12
%14 = load i8, i8* %13
%15 = icmp eq i8 %14, 0
br i1 %15, label %16, label %4
16: ; preds = %4, %1
%17 = phi i32 [ 0, %1 ], [ %11, %4 ]
ret i32 %17
}
void Lut_XYZ2Lut(double *out, double *in) {
  out[0] = in[0] * (1.0 / (1.0 + 32767.0 / 32768));
  out[1] = in[1] * (1.0 / (1.0 + 32767.0 / 32768));
  out[2] = in[2] * (1.0 / (1.0 + 32767.0 / 32768));
}


x86 assembly (clang, -O0):
<Lut_XYZ2Lut>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsd  0xee8(%rip),%xmm0
mulsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movsd  0xed0(%rip),%xmm0
mulsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x10(%rbp),%rax
movsd  0xeb6(%rip),%xmm0
mulsd  0x10(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x10(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<Lut_XYZ2Lut>:
movsd  0xef8(%rip),%xmm0
movsd  (%rsi),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,(%rdi)
movsd  0x8(%rsi),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rdi)
mulsd  0x10(%rsi),%xmm0
movsd  %xmm0,0x10(%rdi)
ret

LLVM IR (-O0):
define void @Lut_XYZ2Lut(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
store double* %0, double** %3
store double* %1, double** %4
%5 = load double*, double** %4
%6 = getelementptr inbounds double, double* %5, i64 0
%7 = load double, double* %6
%8 = fmul double %7, 0x3FE0001000100010
%9 = load double*, double** %3
%10 = getelementptr inbounds double, double* %9, i64 0
store double %8, double* %10
%11 = load double*, double** %4
%12 = getelementptr inbounds double, double* %11, i64 1
%13 = load double, double* %12
%14 = fmul double %13, 0x3FE0001000100010
%15 = load double*, double** %3
%16 = getelementptr inbounds double, double* %15, i64 1
store double %14, double* %16
%17 = load double*, double** %4
%18 = getelementptr inbounds double, double* %17, i64 2
%19 = load double, double* %18
%20 = fmul double %19, 0x3FE0001000100010
%21 = load double*, double** %3
%22 = getelementptr inbounds double, double* %21, i64 2
store double %20, double* %22
ret void
}

LLVM IR (-O2):
define void @Lut_XYZ2Lut(double* nocapture writeonly %0, double* nocapture %1) {
%3 = load double, double* %1
%4 = fmul double %3, 0x3FE0001000100010
store double %4, double* %0
%5 = getelementptr inbounds double, double* %1, i64 1
%6 = load double, double* %5
%7 = fmul double %6, 0x3FE0001000100010
%8 = getelementptr inbounds double, double* %0, i64 1
store double %7, double* %8
%9 = getelementptr inbounds double, double* %1, i64 2
%10 = load double, double* %9
%11 = fmul double %10, 0x3FE0001000100010
%12 = getelementptr inbounds double, double* %0, i64 2
store double %11, double* %12
ret void
}
void foo434() {}


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

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

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

LLVM IR (-O2):
define void @foo434() {
ret void
}
long GetLine(Pos)
long Pos;
{ return (Pos % ((long)10000 * (long)100)) / (long)100; }


x86 assembly (clang, -O0):
<GetLine>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    $0xf4240,%ecx
cqto
idiv   %rcx
mov    %rdx,%rax
mov    $0x64,%ecx
cqto
idiv   %rcx
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetLine>:
movabs $0x431bde82d7b634db,%rcx
de 1b 43
mov    %rdi,%rax
imul   %rcx
mov    %rdx,%rax
shr    $0x3f,%rax
shr    $0x12,%rdx
add    %eax,%edx
imul   $0xf4240,%edx,%eax
sub    %eax,%edi
movslq %edi,%rax
imul   $0x51eb851f,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x25,%rax
add    %ecx,%eax
cltq
ret

LLVM IR (-O0):
define i64 @GetLine(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = srem i64 %3, 1000000
%5 = sdiv i64 %4, 100
ret i64 %5
}

LLVM IR (-O2):
define i64 @GetLine(i64 %0) {
%2 = srem i64 %0, 1000000
%3 = trunc i64 %2 to i32
%4 = sdiv i32 %3, 100
%5 = sext i32 %4 to i64
ret i64 %5
}
/* Variables and functions */
int /*<<< orphan*/ Initial_Environment();
int /*<<< orphan*/ Watch_Std_Input();
int main() {
  Initial_Environment();
  Watch_Std_Input();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <Initial_Environment@plt>
xor    %eax,%eax
call   1030 <Watch_Std_Input@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @Initial_Environment()
%2 = tail call i32 (...) @Watch_Std_Input()
ret i32 0
}
int udelay(int usec) {
  int i, j, k = 0;
  for (i = 0; i < 133; i++)
    for (j = 0; j < usec; j++)
      k += (k + 1) * j * k * (j + 1);
  return k;
}


x86 assembly (clang, -O0):
<udelay>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x85,-0x8(%rbp)
jge    1173 <udelay+0x73>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1160 <udelay+0x60>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
imul   -0xc(%rbp),%eax
imul   -0x10(%rbp),%eax
mov    -0xc(%rbp),%ecx
add    $0x1,%ecx
imul   %ecx,%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1129 <udelay+0x29>
jmp    1165 <udelay+0x65>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1115 <udelay+0x15>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @udelay(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %5
store i32 0, i32* %3
br label %6
6: ; preds = %30, %1
%7 = load i32, i32* %3
%8 = icmp slt i32 %7, 133
br i1 %8, label %9, label %33
9: ; preds = %6
store i32 0, i32* %4
br label %10
10: ; preds = %26, %9
%11 = load i32, i32* %4
%12 = load i32, i32* %2
%13 = icmp slt i32 %11, %12
br i1 %13, label %14, label %29
14: ; preds = %10
%15 = load i32, i32* %5
%16 = add nsw i32 %15, 1
%17 = load i32, i32* %4
%18 = mul nsw i32 %16, %17
%19 = load i32, i32* %5
%20 = mul nsw i32 %18, %19
%21 = load i32, i32* %4
%22 = add nsw i32 %21, 1
%23 = mul nsw i32 %20, %22
%24 = load i32, i32* %5
%25 = add nsw i32 %24, %23
store i32 %25, i32* %5
br label %26
26: ; preds = %14
%27 = load i32, i32* %4
%28 = add nsw i32 %27, 1
store i32 %28, i32* %4
br label %10
29: ; preds = %10
br label %30
30: ; preds = %29
%31 = load i32, i32* %3
%32 = add nsw i32 %31, 1
store i32 %32, i32* %3
br label %6
33: ; preds = %6
%34 = load i32, i32* %5
ret i32 %34
}

LLVM IR (-O2):
define i32 @udelay(i32 %0) {
ret i32 0
}
void i2d_X509_REQ_bio(void) {}


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

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

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

LLVM IR (-O2):
define void @i2d_X509_REQ_bio() {
ret void
}
/* Variables and functions */
int validate_inexistent_task(char *);
int validate_number(char *);
int validate_switch_task(char *id) {
  int check = validate_number(id);
  if (check != 0)
    return check;
  check = validate_inexistent_task(id);
  if (check != 0)
    return check;
  return 0;
}


x86 assembly (clang, -O0):
<validate_switch_task>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <validate_number@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     114d <validate_switch_task+0x2d>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1175 <validate_switch_task+0x55>
mov    -0x10(%rbp),%rdi
call   1040 <validate_inexistent_task@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     116e <validate_switch_task+0x4e>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1175 <validate_switch_task+0x55>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<validate_switch_task>:
push   %rbx
mov    %rdi,%rbx
call   1030 <validate_number@plt>
test   %eax,%eax
je     112f <validate_switch_task+0xf>
pop    %rbx
ret
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <validate_inexistent_task@plt>

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

LLVM IR (-O2):
define i32 @validate_switch_task(i8* %0) {
%2 = tail call i32 @validate_number(i8* %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @validate_inexistent_task(i8* %0)
br label %6
6: ; preds = %4, %1
%7 = phi i32 [ %2, %1 ], [ %5, %4 ]
ret i32 %7
}
void quit(void) {}


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

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

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

LLVM IR (-O2):
define void @quit() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memset(short *, char, int);
double build_silence(signed short *pcm, unsigned samples, double sample_dt,
                     double pitch) {
  memset(pcm, '\0', sizeof(*pcm) * 2 * samples);
  return sample_dt * pitch * samples;
}


x86 assembly (clang, -O0):
<build_silence>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movsd  %xmm0,-0x18(%rbp)
movsd  %xmm1,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
shl    $0x2,%edx
xor    %esi,%esi
call   1030 <memset@plt>
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
mulsd  %xmm1,%xmm0
mov    -0xc(%rbp),%eax
cvtsi2sd %rax,%xmm1
mulsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<build_silence>:
push   %rbx
sub    $0x10,%rsp
movsd  %xmm1,0x8(%rsp)
movsd  %xmm0,(%rsp)
mov    %esi,%ebx
lea    0x0(,%rbx,4),%edx
xor    %esi,%esi
call   1030 <memset@plt>
movsd  (%rsp),%xmm1
mulsd  0x8(%rsp),%xmm1
mov    %ebx,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
mulsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @build_silence(i16* %0, i32 %1, double %2, double %3) {
%5 = alloca i16*
%6 = alloca i32
%7 = alloca double
%8 = alloca double
store i16* %0, i16** %5
store i32 %1, i32* %6
store double %2, double* %7
store double %3, double* %8
%9 = load i16*, i16** %5
%10 = load i32, i32* %6
%11 = zext i32 %10 to i64
%12 = mul i64 4, %11
%13 = trunc i64 %12 to i32
%14 = call i32 @memset(i16* %9, i8 signext 0, i32 %13)
%15 = load double, double* %7
%16 = load double, double* %8
%17 = fmul double %15, %16
%18 = load i32, i32* %6
%19 = uitofp i32 %18 to double
%20 = fmul double %17, %19
ret double %20
}

LLVM IR (-O2):
define double @build_silence(i16* %0, i32 %1, double %2, double %3) {
%5 = shl i32 %1, 2
%6 = tail call i32 @memset(i16* %0, i8 signext 0, i32 %5)
%7 = fmul double %2, %3
%8 = uitofp i32 %1 to double
%9 = fmul double %7, %8
ret double %9
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t MAJ(uint32_t x, uint32_t y, uint32_t z) {
  uint32_t answ = (x & y) ^ (x & z) ^ (y & z);
  return answ;
}


x86 assembly (clang, -O0):
<MAJ>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
and    -0x8(%rbp),%eax
mov    -0x4(%rbp),%ecx
and    -0xc(%rbp),%ecx
xor    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
xor    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<MAJ>:
mov    %edx,%eax
xor    %esi,%eax
and    %edi,%eax
and    %esi,%edx
xor    %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @MAJ(i32 %0, i32 %1, i32 %2) {
%4 = xor i32 %2, %1
%5 = and i32 %4, %0
%6 = and i32 %2, %1
%7 = xor i32 %5, %6
ret i32 %7
}
double pdfEquilikely(long a, long b, long x) { return (1.0 / (b - a + 1.0)); }


x86 assembly (clang, -O0):
<pdfEquilikely>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
sub    -0x8(%rbp),%rax
cvtsi2sd %rax,%xmm1
movsd  0xedb(%rip),%xmm0
addsd  %xmm0,%xmm1
movsd  0xecf(%rip),%xmm0
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<pdfEquilikely>:
sub    %rdi,%rsi
cvtsi2sd %rsi,%xmm1
movsd  0xef0(%rip),%xmm0
addsd  %xmm0,%xmm1
divsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @pdfEquilikely(i64 %0, i64 %1, i64 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load i64, i64* %5
%8 = load i64, i64* %4
%9 = sub nsw i64 %7, %8
%10 = sitofp i64 %9 to double
%11 = fadd double %10, 1.000000e+00
%12 = fdiv double 1.000000e+00, %11
ret double %12
}

LLVM IR (-O2):
define double @pdfEquilikely(i64 %0, i64 %1, i64 %2) {
%4 = sub nsw i64 %1, %0
%5 = sitofp i64 %4 to double
%6 = fadd double %5, 1.000000e+00
%7 = fdiv double 1.000000e+00, %6
ret double %7
}
void pollen_events_Dispatcher_targetInit__I() {}


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

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

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

LLVM IR (-O2):
define void @pollen_events_Dispatcher_targetInit__I() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isascii(int);
void t_isascii_0xcb() {
  Assert_real((isascii(203) == 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_isascii.c",
              1020, ("isascii should be 0 for 0xcb"));
}


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

x86 assembly (clang, -O2):
<t_isascii_0xcb>:
push   %rax
mov    $0xcb,%edi
call   1030 <isascii@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x3fc,%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_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 0 for 0xcb\00"
define void @t_isascii_0xcb() {
%1 = call i64 @isascii(i32 203)
%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 1020, 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_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 0 for 0xcb\00"
define void @t_isascii_0xcb() {
%1 = tail call i64 @isascii(i32 203)
%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 1020, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int _XSetLastRequestRead() {
  printf("_XSetLastRequestRead called\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [29 x i8] c"_XSetLastRequestRead called\0A\00"
define i32 @_XSetLastRequestRead() {
%1 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [28 x i8] c"_XSetLastRequestRead called\00"
define i32 @_XSetLastRequestRead() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ unimplemented();
void ldfi_dir(void) { unimplemented(); }


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

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

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

LLVM IR (-O2):
define void @ldfi_dir() {
%1 = tail call i32 (...) @unimplemented()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
int32_t FlashUserGet(uint32_t *pui32User0, uint32_t *pui32User1) {
  ASSERT(pui32User0 != 0);
  ASSERT(pui32User1 != 0);
  *pui32User0 = (*((volatile uint32_t *)(0x400FE1E0)));
  *pui32User1 = (*((volatile uint32_t *)(0x400FE1E4)));
  return (0);
}


x86 assembly (clang, -O0):
<FlashUserGet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
cmpq   $0x0,-0x10(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
mov    $0x400fe1e0,%eax
mov    (%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    $0x400fe1e4,%eax
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FlashUserGet>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %edi,%edi
test   %rbx,%rbx
setne  %dil
call   1030 <ASSERT@plt>
xor    %edi,%edi
test   %r14,%r14
setne  %dil
call   1030 <ASSERT@plt>
mov    0x400fe1e0,%eax
mov    %eax,(%rbx)
mov    0x400fe1e4,%eax
mov    %eax,(%r14)
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @FlashUserGet(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%5 = load i32*, i32** %3
%6 = icmp ne i32* %5, null
%7 = zext i1 %6 to i32
%8 = call i32 @ASSERT(i32 %7)
%9 = load i32*, i32** %4
%10 = icmp ne i32* %9, null
%11 = zext i1 %10 to i32
%12 = call i32 @ASSERT(i32 %11)
%13 = load volatile i32, i32* inttoptr (i64 1074782688 to i32*)
%14 = load i32*, i32** %3
store i32 %13, i32* %14
%15 = load volatile i32, i32* inttoptr (i64 1074782692 to i32*)
%16 = load i32*, i32** %4
store i32 %15, i32* %16
ret i32 0
}

LLVM IR (-O2):
define i32 @FlashUserGet(i32* writeonly %0, i32* writeonly %1) {
%3 = icmp ne i32* %0, null
%4 = zext i1 %3 to i32
%5 = tail call i32 @ASSERT(i32 %4)
%6 = icmp ne i32* %1, null
%7 = zext i1 %6 to i32
%8 = tail call i32 @ASSERT(i32 %7)
%9 = load volatile i32, i32* inttoptr (i64 1074782688 to i32*)
store i32 %9, i32* %0
%10 = load volatile i32, i32* inttoptr (i64 1074782692 to i32*)
store i32 %10, i32* %1
ret i32 0
}
int func0(
    char very_very_very_very_very_long_variable_name_just_to_test_length) {
  return (1);
}


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

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

LLVM IR (-O0):
define i32 @func0(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
ret i32 1
}

LLVM IR (-O2):
define i32 @func0(i8 signext %0) {
ret i32 1
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
const uint32_t bswap_32(uint32_t x) {
  x = ((x << 8) & 0xFF00FF00) | ((x >> 8) & 0x00FF00FF);
  x = (x >> 16) | (x << 16);
  return x;
}


x86 assembly (clang, -O0):
<bswap_32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x8,%eax
and    $0xff00ff00,%eax
mov    -0x4(%rbp),%ecx
sar    $0x8,%ecx
and    $0xff00ff,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x10,%eax
mov    -0x4(%rbp),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bswap_32>:
bswap  %edi
ror    $0x10,%edi
mov    %edi,%eax
sar    $0x10,%eax
shl    $0x10,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @bswap_32(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = shl i32 %3, 8
%5 = and i32 %4, -16711936
%6 = load i32, i32* %2
%7 = ashr i32 %6, 8
%8 = and i32 %7, 16711935
%9 = or i32 %5, %8
store i32 %9, i32* %2
%10 = load i32, i32* %2
%11 = ashr i32 %10, 16
%12 = load i32, i32* %2
%13 = shl i32 %12, 16
%14 = or i32 %11, %13
store i32 %14, i32* %2
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @bswap_32(i32 %0) {
%2 = shl i32 %0, 8
%3 = and i32 %2, -16711936
%4 = lshr i32 %0, 8
%5 = and i32 %4, 16711935
%6 = or i32 %3, %5
%7 = ashr i32 %6, 16
%8 = shl i32 %6, 16
%9 = or i32 %7, %8
ret i32 %9
}
unsigned char cast_uint_uchar_fast(unsigned int x) { return (unsigned char)x; }


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

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

LLVM IR (-O0):
define zeroext i8 @cast_uint_uchar_fast(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = trunc i32 %3 to i8
ret i8 %4
}

LLVM IR (-O2):
define zeroext i8 @cast_uint_uchar_fast(i32 %0) {
%2 = trunc i32 %0 to i8
ret i8 %2
}
void g_DUMMY_popup_set_title(int cont_id, int item_id, char *title) {
  cont_id = cont_id;
  item_id = item_id;
  title = title;
}


x86 assembly (clang, -O0):
<g_DUMMY_popup_set_title>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @g_DUMMY_popup_set_title(i32 %0, i32 %1, i8* nocapture %2) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print_array(unsigned *val, int n) {
  int i;
  for (i = 0; i < n; i++)
    printf("%d \n", val[i]);
  printf("\n");
}


x86 assembly (clang, -O0):
<print_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1159 <print_array+0x49>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <print_array+0x16>
lea    0xea3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_array>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1157 <print_array+0x37>
mov    %rdi,%r15
mov    %esi,%r12d
lea    0xec7(%rip),%r14
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <print_array+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c"%d \0A\00"
define void @print_array(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
%14 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
int subtotal();
int main(void) {
  double i = 7.0;
  int j;
  j = i + i;
  int k = i + i;
  return j + k + subtotal();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xed9(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x14(%rbp)
movsd  -0x10(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
add    -0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    $0x0,%al
call   1030 <subtotal@plt>
mov    %eax,%ecx
mov    -0x1c(%rbp),%eax
add    %ecx,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store double 7.000000e+00, double* %2
%5 = load double, double* %2
%6 = load double, double* %2
%7 = fadd double %5, %6
%8 = fptosi double %7 to i32
store i32 %8, i32* %3
%9 = load double, double* %2
%10 = load double, double* %2
%11 = fadd double %9, %10
%12 = fptosi double %11 to i32
store i32 %12, i32* %4
%13 = load i32, i32* %3
%14 = load i32, i32* %4
%15 = add nsw i32 %13, %14
%16 = call i32 (...) @subtotal()
%17 = add nsw i32 %15, %16
ret i32 %17
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @subtotal()
%2 = add nsw i32 %1, 28
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  int i, j, k;
  do {
    if (k == 1) {
      while (j > 0) {
        printf("1\n");
        for (i = 0; i < 50; i++) {
          printf("2\n");
        }
      }
    }
  } while (k < 50);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x1c(%rbp)
jne    1180 <main+0x70>
jmp    1135 <main+0x25>
cmpl   $0x0,-0x18(%rbp)
jle    117b <main+0x6b>
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0x32,-0x14(%rbp)
jge    1176 <main+0x66>
lea    0xea0(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1152 <main+0x42>
jmp    1135 <main+0x25>
jmp    1180 <main+0x70>
jmp    1185 <main+0x75>
cmpl   $0x32,-0x1c(%rbp)
jl     1126 <main+0x16>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [3 x i8] c"1\0A\00"
@.str.1 = [3 x i8] c"2\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
br label %9
9: ; preds = %29, %2
%10 = load i32, i32* %8
%11 = icmp eq i32 %10, 1
br i1 %11, label %12, label %28
12: ; preds = %9
br label %13
13: ; preds = %26, %12
%14 = load i32, i32* %7
%15 = icmp sgt i32 %14, 0
br i1 %15, label %16, label %27
16: ; preds = %13
%17 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %6
br label %18
18: ; preds = %23, %16
%19 = load i32, i32* %6
%20 = icmp slt i32 %19, 50
br i1 %20, label %21, label %26
21: ; preds = %18
%22 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
br label %23
23: ; preds = %21
%24 = load i32, i32* %6
%25 = add nsw i32 %24, 1
store i32 %25, i32* %6
br label %18
26: ; preds = %18
br label %13
27: ; preds = %13
br label %28
28: ; preds = %27, %9
br label %29
29: ; preds = %28
%30 = load i32, i32* %8
%31 = icmp slt i32 %30, 50
br i1 %31, label %9, label %32
32: ; preds = %29
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
char *strcpy(char *dest, const char *src) {
  const char *s = src;
  char *d = dest;
  while (*s)
    *d++ = *s++;
  *d = 0;
  return dest;
}


x86 assembly (clang, -O0):
<strcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
je     1150 <strcpy+0x50>
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x18(%rbp)
mov    (%rax),%cl
mov    -0x20(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x20(%rbp)
mov    %cl,(%rax)
jmp    111c <strcpy+0x1c>
mov    -0x20(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcpy>:
mov    %rdi,%rax
mov    (%rsi),%cl
mov    %rdi,%rdx
test   %cl,%cl
je     1131 <strcpy+0x31>
add    $0x1,%rsi
mov    %rax,%rdx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %cl,(%rdx)
add    $0x1,%rdx
movzbl (%rsi),%ecx
add    $0x1,%rsi
test   %cl,%cl
jne    1120 <strcpy+0x20>
movb   $0x0,(%rdx)
ret

LLVM IR (-O0):
define i8* @strcpy(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %4
store i8* %7, i8** %5
%8 = load i8*, i8** %3
store i8* %8, i8** %6
br label %9
9: ; preds = %13, %2
%10 = load i8*, i8** %5
%11 = load i8, i8* %10
%12 = icmp ne i8 %11, 0
br i1 %12, label %13, label %19
13: ; preds = %9
%14 = load i8*, i8** %5
%15 = getelementptr inbounds i8, i8* %14, i32 1
store i8* %15, i8** %5
%16 = load i8, i8* %14
%17 = load i8*, i8** %6
%18 = getelementptr inbounds i8, i8* %17, i32 1
store i8* %18, i8** %6
store i8 %16, i8* %17
br label %9
19: ; preds = %9
%20 = load i8*, i8** %6
store i8 0, i8* %20
%21 = load i8*, i8** %3
ret i8* %21
}

LLVM IR (-O2):
define i8* @strcpy(i8* returned writeonly %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %11, %5 ], [ %3, %2 ]
%7 = phi i8* [ %10, %5 ], [ %0, %2 ]
%8 = phi i8* [ %9, %5 ], [ %1, %2 ]
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = getelementptr inbounds i8, i8* %7, i64 1
store i8 %6, i8* %7
%11 = load i8, i8* %9
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5, %2
%14 = phi i8* [ %0, %2 ], [ %10, %5 ]
store i8 0, i8* %14
ret i8* %0
}
int ShouldBeLeft(int first, int second) { return first < second; }


x86 assembly (clang, -O0):
<ShouldBeLeft>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
setl   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ShouldBeLeft>:
xor    %eax,%eax
cmp    %esi,%edi
setl   %al
ret

LLVM IR (-O0):
define i32 @ShouldBeLeft(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = icmp slt i32 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @ShouldBeLeft(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
void foo603() {}


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

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

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

LLVM IR (-O2):
define void @foo603() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ngen2(char *, char *, int, int);
void cgincpl(int a, int v) { ngen2("%s\t$%d,%d(%%ebp)", "addl", v, a); }


x86 assembly (clang, -O0):
<cgincpl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edx
mov    -0x4(%rbp),%ecx
lea    0xed5(%rip),%rdi
lea    0xedf(%rip),%rsi
call   1030 <ngen2@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cgincpl>:
mov    %esi,%edx
mov    %edi,%ecx
lea    0xee5(%rip),%rdi
lea    0xeef(%rip),%rsi
jmp    1030 <ngen2@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"%s\09$%d,%d(%%ebp)\00"
@.str.1 = [5 x i8] c"addl\00"
define void @cgincpl(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32, i32* %3
%7 = call i32 @ngen2(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %5, i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"%s\09$%d,%d(%%ebp)\00"
@.str.1 = [5 x i8] c"addl\00"
define void @cgincpl(i32 %0, i32 %1) {
%3 = tail call i32 @ngen2(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %1, i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Primes(int);
int scanf(char *, int *);
int main(void) {
  int v = 0;
  int r = scanf("%d", &v);
  if (r == 1) {
    Primes(v);
    return 0;
  }
  return -1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
lea    0xec3(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
jne    1167 <main+0x47>
mov    -0x8(%rbp),%edi
call   1030 <Primes@plt>
movl   $0x0,-0x4(%rbp)
jmp    116e <main+0x4e>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0xed0(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    %eax,%ecx
mov    $0xffffffff,%eax
cmp    $0x1,%ecx
jne    1151 <main+0x31>
mov    0x4(%rsp),%edi
call   1030 <Primes@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = icmp eq i32 %3, 1
br i1 %4, label %5, label %8
5: ; preds = %0
%6 = load i32, i32* %1
%7 = call i32 @Primes(i32 %6)
br label %8
8: ; preds = %0, %5
%9 = phi i32 [ 0, %5 ], [ -1, %0 ]
ret i32 %9
}
int BIO_sock_init(void) { return (1); }


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

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

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

LLVM IR (-O2):
define i32 @BIO_sock_init() {
ret i32 1
}
int plugin_manager_load(struct plugin_manager_struct *manager, const char *path,
                        const char *name) {
  return 0;
}


x86 assembly (clang, -O0):
<plugin_manager_load>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
%struct.plugin_manager_struct = type opaque
define i32 @plugin_manager_load(%struct.plugin_manager_struct* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2) {
ret i32 0
}