xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void help() {
  printf("Usage: ./client.c [-u --upload] [-d --download] [-f --file] file\n");
}


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

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

LLVM IR (-O0):
@.str = [66 x i8] c"Usage: ./client.c [-u --upload] [-d --download] [-f --file] file\0A\00"
define void @help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [65 x i8] c"Usage: ./client.c [-u --upload] [-d --download] [-f --file] file\00"
define void @help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @str, i64 0, i64 0))
ret void
}
int str_len(char *str) {
  int len = 0;
  while (str[++len] != '\0')
    ;
  return len;
}


x86 assembly (clang, -O0):
<str_len>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
add    $0x1,%ecx
mov    %ecx,-0xc(%rbp)
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1131 <str_len+0x31>
jmp    110f <str_len+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_len>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
cmpb   $0x0,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <str_len+0x10>
ret

LLVM IR (-O0):
define i32 @str_len(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %13, %1
%5 = load i8*, i8** %2
%6 = load i32, i32* %3
%7 = add nsw i32 %6, 1
store i32 %7, i32* %3
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %5, 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 %14
13: ; preds = %4
br label %4
14: ; preds = %4
%15 = load i32, i32* %3
ret i32 %15
}

LLVM IR (-O2):
define i32 @str_len(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %4, %2 ], [ 0, %1 ]
%4 = add nuw nsw i64 %3, 1
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
br i1 %7, label %8, label %2
8: ; preds = %2
%9 = trunc i64 %4 to i32
ret i32 %9
}
/* Type definitions */
typedef int u_int32_t;
typedef int in_addr_t;

/* Variables and functions */
int /*<<< orphan*/ SNTP_resync(int, int);
int main(int ac, char **av) {
  (void)ac;
  (void)av;
  u_int32_t server_addr =
      (((in_addr_t)(85) << 24) | (((in_addr_t)(21) & 0xff) << 16) |
       (((in_addr_t)(78) & 0xff) << 8) | ((in_addr_t)(91) & 0xff));
  u_int32_t interval = 20000;
  SNTP_resync(server_addr, interval);
  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)
movl   $0x55154e5b,-0x14(%rbp)
movl   $0x4e20,-0x18(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
call   1030 <SNTP_resync@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x55154e5b,%edi
mov    $0x4e20,%esi
call   1030 <SNTP_resync@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = load i32, i32* %4
%9 = load i8**, i8*** %5
store i32 1427459675, i32* %6
store i32 20000, i32* %7
%10 = load i32, i32* %6
%11 = load i32, i32* %7
%12 = call i32 @SNTP_resync(i32 %10, i32 %11)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @SNTP_resync(i32 1427459675, i32 20000)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ add_sp_n();
void opcode_e8() { add_sp_n(); }


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

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

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

LLVM IR (-O2):
define void @opcode_e8() {
%1 = tail call i32 (...) @add_sp_n()
ret void
}
int sum_of_squares(int N) {
  int sum = 0.0;
  for (int i = 1; i < N + 1; ++i)
    sum += i * i;
  return sum;
}


x86 assembly (clang, -O0):
<sum_of_squares>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jge    1141 <sum_of_squares+0x41>
mov    -0xc(%rbp),%eax
imul   -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1115 <sum_of_squares+0x15>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sum_of_squares>:
test   %edi,%edi
jle    112d <sum_of_squares+0x2d>
lea    -0x1(%rdi),%eax
lea    -0x2(%rdi),%ecx
imul   %rax,%rcx
lea    -0x3(%rdi),%eax
imul   %rcx,%rax
shr    %rax
imul   $0x55555556,%eax,%eax
shr    %rcx
lea    (%rcx,%rcx,4),%ecx
add    %eax,%ecx
lea    (%rcx,%rdi,4),%eax
add    $0xfffffffd,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @sum_of_squares(i32 %0) {
%2 = icmp slt i32 %0, 1
br i1 %2, label %22, label %3
3: ; preds = %1
%4 = add nsw i32 %0, -1
%5 = zext i32 %4 to i33
%6 = add nsw i32 %0, -2
%7 = zext i32 %6 to i33
%8 = mul i33 %5, %7
%9 = add nsw i32 %0, -3
%10 = zext i32 %9 to i33
%11 = mul i33 %8, %10
%12 = lshr i33 %11, 1
%13 = trunc i33 %12 to i32
%14 = mul i32 %13, 1431655766
%15 = lshr i33 %8, 1
%16 = trunc i33 %15 to i32
%17 = mul i32 %16, 5
%18 = add i32 %14, %17
%19 = shl i32 %0, 2
%20 = add i32 %18, %19
%21 = add i32 %20, -3
br label %22
22: ; preds = %3, %1
%23 = phi i32 [ 0, %1 ], [ %21, %3 ]
ret i32 %23
}
/* Type definitions */
typedef int /*<<< orphan*/ siginfo_t;
typedef int /*<<< orphan*/ idtype_t;
typedef int /*<<< orphan*/ id_t;

/* Variables and functions */
int syscall_cp(int, int /*<<< orphan*/, int /*<<< orphan*/,
               int /*<<< orphan*/ *, int, int /*<<< orphan*/);
int waitid(idtype_t type, id_t id, siginfo_t *info, int options) {
  return syscall_cp(280, type, id, info, options, 0);
}


x86 assembly (clang, -O0):
<waitid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0x10(%rbp),%rcx
mov    -0x14(%rbp),%r8d
mov    $0x118,%edi
xor    %r9d,%r9d
call   1030 <syscall_cp@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<waitid>:
mov    %ecx,%r8d
mov    %rdx,%rcx
mov    %esi,%edx
mov    %edi,%esi
mov    $0x118,%edi
xor    %r9d,%r9d
jmp    1030 <syscall_cp@plt>

LLVM IR (-O0):
define i32 @waitid(i32 %0, i32 %1, i32* %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32*
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32* %2, i32** %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = load i32*, i32** %7
%12 = load i32, i32* %8
%13 = call i32 @syscall_cp(i32 280, i32 %9, i32 %10, i32* %11, i32 %12, i32 0)
ret i32 %13
}

LLVM IR (-O2):
define i32 @waitid(i32 %0, i32 %1, i32* %2, i32 %3) {
%5 = tail call i32 @syscall_cp(i32 280, i32 %0, i32 %1, i32* %2, i32 %3, i32 0)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ show_help();
void show_error_and_help(char *msg) {
  printf(msg);
  show_help();
}


x86 assembly (clang, -O0):
<show_error_and_help>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <show_help@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_error_and_help>:
push   %rax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <show_help@plt>

LLVM IR (-O0):
define void @show_error_and_help(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* %3)
%5 = call i32 (...) @show_help()
ret void
}

LLVM IR (-O2):
define void @show_error_and_help(i8* nocapture %0) {
%2 = tail call i32 @printf(i8* dereferenceable(1) %0)
%3 = tail call i32 (...) @show_help()
ret void
}
int lexfile(char *file) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @lexfile(i8* nocapture readnone %0) {
ret i32 0
}
float battV(unsigned short ticks) {
  float f;
  f = (float)(ticks) / 12160.0;
  return f;
}


x86 assembly (clang, -O0):
<battV>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
cvtsi2ss %eax,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xee1(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<battV>:
cvtsi2sd %edi,%xmm0
divsd  0xef4(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @battV(i16 zeroext %0) {
%2 = alloca i16
%3 = alloca float
store i16 %0, i16* %2
%4 = load i16, i16* %2
%5 = uitofp i16 %4 to float
%6 = fpext float %5 to double
%7 = fdiv double %6, 1.216000e+04
%8 = fptrunc double %7 to float
store float %8, float* %3
%9 = load float, float* %3
ret float %9
}

LLVM IR (-O2):
define float @battV(i16 zeroext %0) {
%2 = uitofp i16 %0 to double
%3 = fdiv double %2, 1.216000e+04
%4 = fptrunc double %3 to float
ret float %4
}
void isOdd(int var, int *odnum) {
  if (var % 2 == 0) {
    *odnum = 0;
  } else {
    *odnum = 1;
  }
}


x86 assembly (clang, -O0):
<isOdd>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    112e <isOdd+0x2e>
mov    -0x10(%rbp),%rax
movl   $0x0,(%rax)
jmp    1138 <isOdd+0x38>
mov    -0x10(%rbp),%rax
movl   $0x1,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<isOdd>:
and    $0x1,%edi
mov    %edi,(%rsi)
ret

LLVM IR (-O0):
define void @isOdd(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 = srem i32 %5, 2
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32*, i32** %4
store i32 0, i32* %9
br label %12
10: ; preds = %2
%11 = load i32*, i32** %4
store i32 1, i32* %11
br label %12
12: ; preds = %10, %8
ret void
}

LLVM IR (-O2):
define void @isOdd(i32 %0, i32* nocapture writeonly %1) {
%3 = and i32 %0, 1
store i32 %3, i32* %1
ret void
}
/* Variables and functions */
double sumWeigtedInputs(int const, double const *, double const *);
double tanh(double);
double _hyperbolicTangent(const int numInputs, const double *inputs,
                          const double *connectionWeights) {
  double weightedInputSum;
  double out;
  weightedInputSum = sumWeigtedInputs(numInputs, inputs, connectionWeights);
  out = tanh(weightedInputSum);
  return out;
}


x86 assembly (clang, -O0):
<_hyperbolicTangent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <sumWeigtedInputs@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
call   1040 <tanh@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_hyperbolicTangent>:
push   %rax
call   1030 <sumWeigtedInputs@plt>
pop    %rax
jmp    1040 <tanh@plt>

LLVM IR (-O0):
define double @_hyperbolicTangent(i32 %0, double* %1, double* %2) {
%4 = alloca i32
%5 = alloca double*
%6 = alloca double*
%7 = alloca double
%8 = alloca double
store i32 %0, i32* %4
store double* %1, double** %5
store double* %2, double** %6
%9 = load i32, i32* %4
%10 = load double*, double** %5
%11 = load double*, double** %6
%12 = call double @sumWeigtedInputs(i32 %9, double* %10, double* %11)
store double %12, double* %7
%13 = load double, double* %7
%14 = call double @tanh(double %13)
store double %14, double* %8
%15 = load double, double* %8
ret double %15
}

LLVM IR (-O2):
define double @_hyperbolicTangent(i32 %0, double* %1, double* %2) {
%4 = tail call double @sumWeigtedInputs(i32 %0, double* %1, double* %2)
%5 = tail call double @tanh(double %4)
ret double %5
}
int count_char_bits(char b) {
  int count;
  for (count = 0; b != 0; count++) {
    b &= b - 1;
  }
  return count;
}


x86 assembly (clang, -O0):
<count_char_bits>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movl   $0x0,-0x8(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x0,%eax
je     113c <count_char_bits+0x3c>
movsbl -0x1(%rbp),%ecx
sub    $0x1,%ecx
movsbl -0x1(%rbp),%eax
and    %ecx,%eax
mov    %al,-0x1(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1111 <count_char_bits+0x11>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<count_char_bits>:
xor    %eax,%eax
test   %dil,%dil
je     111d <count_char_bits+0x1d>
nopw   0x0(%rax,%rax,1)
lea    -0x1(%rdi),%ecx
add    $0x1,%eax
and    %dil,%cl
mov    %ecx,%edi
jne    1110 <count_char_bits+0x10>
ret

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

LLVM IR (-O2):
define i32 @count_char_bits(i8 signext %0) {
%2 = icmp eq i8 %0, 0
br i1 %2, label %10, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %8, %3 ], [ 0, %1 ]
%5 = phi i8 [ %7, %3 ], [ %0, %1 ]
%6 = add i8 %5, -1
%7 = and i8 %6, %5
%8 = add nuw nsw i32 %4, 1
%9 = icmp eq i8 %7, 0
br i1 %9, label %10, label %3
10: ; preds = %3, %1
%11 = phi i32 [ 0, %1 ], [ %8, %3 ]
ret i32 %11
}
int update_hash2(int h, int c) {
  return ((h << ((24 + ((3 + 1) - 1)) / (3 + 1))) + c) & ((1 << 24) - 1);
}


x86 assembly (clang, -O0):
<update_hash2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x6,%eax
add    -0x8(%rbp),%eax
and    $0xffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<update_hash2>:
shl    $0x6,%edi
lea    (%rdi,%rsi,1),%eax
and    $0xffffff,%eax
ret

LLVM IR (-O0):
define i32 @update_hash2(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 = shl i32 %5, 6
%7 = load i32, i32* %4
%8 = add nsw i32 %6, %7
%9 = and i32 %8, 16777215
ret i32 %9
}

LLVM IR (-O2):
define i32 @update_hash2(i32 %0, i32 %1) {
%3 = shl i32 %0, 6
%4 = add nsw i32 %3, %1
%5 = and i32 %4, 16777215
ret i32 %5
}
void break_fn(void) {}


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

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

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

LLVM IR (-O2):
define void @break_fn() {
ret void
}
/* Variables and functions */
unsigned char _get_increased_bit(unsigned char const, int);
int /*<<< orphan*/ _transmit_to_gpio(unsigned char, int const);
void _transmit_to_gpio_with_increased_bit(const unsigned char bit,
                                          const int delay) {
  unsigned char offset_bit;
  offset_bit = _get_increased_bit(bit, 1);
  _transmit_to_gpio(offset_bit, delay);
  offset_bit = _get_increased_bit(bit, 0);
  _transmit_to_gpio(offset_bit, delay);
}


x86 assembly (clang, -O0):
<_transmit_to_gpio_with_increased_bit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x1,%esi
movzbl -0x1(%rbp),%edi
call   1030 <_get_increased_bit@plt>
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
mov    -0x8(%rbp),%esi
movzbl %al,%edi
call   1040 <_transmit_to_gpio@plt>
xor    %esi,%esi
movzbl -0x1(%rbp),%edi
call   1030 <_get_increased_bit@plt>
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
mov    -0x8(%rbp),%esi
movzbl %al,%edi
call   1040 <_transmit_to_gpio@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_transmit_to_gpio_with_increased_bit>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    $0x1,%esi
call   1030 <_get_increased_bit@plt>
movzbl %al,%edi
mov    %ebx,%esi
call   1040 <_transmit_to_gpio@plt>
mov    %ebp,%edi
xor    %esi,%esi
call   1030 <_get_increased_bit@plt>
movzbl %al,%edi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <_transmit_to_gpio@plt>

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

LLVM IR (-O2):
define void @_transmit_to_gpio_with_increased_bit(i8 zeroext %0, i32 %1) {
%3 = tail call zeroext i8 @_get_increased_bit(i8 zeroext %0, i32 1)
%4 = tail call i32 @_transmit_to_gpio(i8 zeroext %3, i32 %1)
%5 = tail call zeroext i8 @_get_increased_bit(i8 zeroext %0, i32 0)
%6 = tail call i32 @_transmit_to_gpio(i8 zeroext %5, i32 %1)
ret void
}
/* Variables and functions */
size_t strlen(char const *);
size_t xstr_len(const char *str) { return strlen(str); }


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

x86 assembly (clang, -O2):
<xstr_len>:
jmp    1030 <strlen@plt>

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

LLVM IR (-O2):
define i64 @xstr_len(i8* nocapture %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
ret i64 %2
}
OP(ed, c2) {}


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

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

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

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
ret i32 undef
}
void clearmem(char *start, int cnt) {
  while (cnt--)
    *start++ = '\0';
}


x86 assembly (clang, -O0):
<clearmem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0xc(%rbp)
cmp    $0x0,%eax
je     1136 <clearmem+0x36>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movb   $0x0,(%rax)
jmp    110b <clearmem+0xb>
pop    %rbp
ret

x86 assembly (clang, -O2):
<clearmem>:
test   %esi,%esi
je     1122 <clearmem+0x12>
push   %rax
mov    %esi,%edx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define void @clearmem(i8* nocapture writeonly %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isascii(int);
void t_isascii_0xf1() {
  Assert_real((isascii(241) == 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",
              1210, ("isascii should be 0 for 0xf1"));
}


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

x86 assembly (clang, -O2):
<t_isascii_0xf1>:
push   %rax
mov    $0xf1,%edi
call   1030 <isascii@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x4ba,%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 0xf1\00"
define void @t_isascii_0xf1() {
%1 = call i64 @isascii(i32 241)
%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 1210, 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 0xf1\00"
define void @t_isascii_0xf1() {
%1 = tail call i64 @isascii(i32 241)
%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 1210, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double, double);
void handleMouseScroll(double xOffset, double yOffset) {
  printf("mouse scroll xOffset %f yOffset %f\n", xOffset, yOffset);
}


x86 assembly (clang, -O0):
<handleMouseScroll>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [36 x i8] c"mouse scroll xOffset %f yOffset %f\0A\00"
define void @handleMouseScroll(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), double %5, double %6)
ret void
}

LLVM IR (-O2):
@.str = [36 x i8] c"mouse scroll xOffset %f yOffset %f\0A\00"
define void @handleMouseScroll(double %0, double %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), double %0, double %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
main() {
  int i;
  for (i = 1; i < 100; i++)
    ;
  if (i == 100)
    exit(0);
  abort();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jge    1153 <main+0x33>
jmp    1145 <main+0x25>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1136 <main+0x16>
cmpl   $0x64,-0x8(%rbp)
jne    1164 <main+0x44>
xor    %edi,%edi
call   1040 <exit@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
br label %3
3: ; preds = %7, %0
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 100
br i1 %5, label %6, label %10
6: ; preds = %3
br label %7
7: ; preds = %6
%8 = load i32, i32* %2
%9 = add nsw i32 %8, 1
store i32 %9, i32* %2
br label %3
10: ; preds = %3
%11 = load i32, i32* %2
%12 = icmp eq i32 %11, 100
br i1 %12, label %13, label %15
13: ; preds = %10
%14 = call i32 @exit(i32 0)
unreachable
15: ; preds = %10
%16 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @exit(i32 0)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ uintmax_t;
typedef scalar_t__ time_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, int /*<<< orphan*/);
scalar_t__ time(int /*<<< orphan*/ *);
int main(void) {
  time_t result;
  result = time(NULL);
  printf("%s%ju secs since the Epoch\n", "x", (uintmax_t)result);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,%edx
lea    0xeb7(%rip),%rdi
lea    0xecc(%rip),%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1040 <time@plt>
lea    0xed1(%rip),%rdi
lea    0xee6(%rip),%rsi
mov    %eax,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [28 x i8] c"%s%ju secs since the Epoch\0A\00"
@.str.1 = [2 x i8] c"x\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
store i32 0, i32* %1
%3 = call i64 @time(i32* null)
store i64 %3, i64* %2
%4 = load i64, i64* %2
%5 = trunc i64 %4 to i32
%6 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [28 x i8] c"%s%ju secs since the Epoch\0A\00"
@.str.1 = [2 x i8] c"x\00"
define i32 @main() {
%1 = tail call i64 @time(i32* null)
%2 = trunc i64 %1 to i32
%3 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 %2)
ret i32 0
}
/* Type definitions */
typedef int uint64_t;
typedef int int64_t;

/* Variables and functions */
int getppid();
int rdtsc();
float clock_ppid() {
  uint64_t start = rdtsc();
  int hi = getppid();
  uint64_t stop = rdtsc();
  unsigned int lo = start & (((uint64_t)2 << 32) - 1);
  unsigned int lo2 = stop & (((int64_t)2 << 32) - 1);
  int cycles = lo2 - lo;
  float t = ((float)(cycles));
  float factor = 3591338000.0 * .000001;
  t = t / factor;
  return t;
}


x86 assembly (clang, -O0):
<clock_ppid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    $0x0,%al
call   1030 <rdtsc@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1040 <getppid@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <rdtsc@plt>
mov    %eax,-0xc(%rbp)
and    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
and    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
sub    -0x10(%rbp),%eax
mov    %eax,-0x18(%rbp)
cvtsi2ssl -0x18(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  0xe93(%rip),%xmm0
movss  %xmm0,-0x20(%rbp)
movss  -0x1c(%rbp),%xmm0
divss  -0x20(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x1c(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clock_ppid>:
push   %rax
xor    %eax,%eax
call   1030 <rdtsc@plt>
xor    %eax,%eax
call   1040 <getppid@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <rdtsc@plt>

LLVM IR (-O0):
define float @clock_ppid() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca float
%8 = alloca float
%9 = call i32 (...) @rdtsc()
store i32 %9, i32* %1
%10 = call i32 (...) @getppid()
store i32 %10, i32* %2
%11 = call i32 (...) @rdtsc()
store i32 %11, i32* %3
%12 = load i32, i32* %1
%13 = and i32 %12, poison
store i32 %13, i32* %4
%14 = load i32, i32* %3
%15 = and i32 %14, poison
store i32 %15, i32* %5
%16 = load i32, i32* %5
%17 = load i32, i32* %4
%18 = sub i32 %16, %17
store i32 %18, i32* %6
%19 = load i32, i32* %6
%20 = sitofp i32 %19 to float
store float %20, float* %7
store float 0x40AC0EAD00000000, float* %8
%21 = load float, float* %7
%22 = load float, float* %8
%23 = fdiv float %21, %22
store float %23, float* %7
%24 = load float, float* %7
ret float %24
}

LLVM IR (-O2):
define float @clock_ppid() {
%1 = tail call i32 (...) @rdtsc()
%2 = tail call i32 (...) @getppid()
%3 = tail call i32 (...) @rdtsc()
ret float poison
}
/* Variables and functions */
size_t snprintf(char *, size_t, char *, char const *);
size_t strcpy_s(char *dest, size_t n, char const *src) {
  return snprintf(dest, n, "%s", src);
}


x86 assembly (clang, -O0):
<strcpy_s>:
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),%rcx
lea    0xec9(%rip),%rdx
call   1030 <snprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcpy_s>:
mov    %rdx,%rcx
lea    0xee6(%rip),%rdx
jmp    1030 <snprintf@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define i64 @strcpy_s(i8* %0, i64 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i8*
store i8* %0, i8** %4
store i64 %1, i64* %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = load i64, i64* %5
%9 = load i8*, i8** %6
%10 = call i64 @snprintf(i8* %7, i64 %8, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %9)
ret i64 %10
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i64 @strcpy_s(i8* %0, i64 %1, i8* %2) {
%4 = tail call i64 @snprintf(i8* %0, i64 %1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i64 %4
}
/* Variables and functions */
int U_WMRCORENONE_get(char *);
int U_WMR57_get(void) { return U_WMRCORENONE_get("U_WMR57"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"U_WMR57\00"
define i32 @U_WMR57_get() {
%1 = call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMR57\00"
define i32 @U_WMR57_get() {
%1 = tail call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
void RandomFunc(unsigned short input[1], unsigned short output[1]) {
  unsigned short state[1];
  unsigned short local1;
  {
    state[0UL] = input[0UL] + (unsigned short)2885;
    local1 = 0UL;
    while (local1 < 1UL) {
      state[local1] *= state[local1];
      local1 += 2UL;
    }
    output[0UL] = state[0UL] - (unsigned short)29594;
  }
}


x86 assembly (clang, -O0):
<RandomFunc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movzwl (%rax),%eax
add    $0xb45,%eax
mov    %ax,-0x12(%rbp)
movw   $0x0,-0x14(%rbp)
movzwl -0x14(%rbp),%eax
cmp    $0x1,%rax
jae    115b <RandomFunc+0x5b>
movzwl -0x14(%rbp),%eax
movzwl -0x12(%rbp,%rax,2),%edx
movzwl -0x14(%rbp),%eax
movzwl -0x12(%rbp,%rax,2),%ecx
imul   %edx,%ecx
mov    %cx,-0x12(%rbp,%rax,2)
movzwl -0x14(%rbp),%eax
add    $0x2,%rax
mov    %ax,-0x14(%rbp)
jmp    1122 <RandomFunc+0x22>
movzwl -0x12(%rbp),%eax
sub    $0x739a,%eax
mov    %ax,%cx
mov    -0x10(%rbp),%rax
mov    %cx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<RandomFunc>:
movzwl (%rdi),%eax
add    $0xb45,%eax
imul   %eax,%eax
add    $0xffff8c66,%eax
mov    %ax,(%rsi)
ret

LLVM IR (-O0):
define void @RandomFunc(i16* %0, i16* %1) {
%3 = alloca i16*
%4 = alloca i16*
%5 = alloca [1 x i16]
%6 = alloca i16
store i16* %0, i16** %3
store i16* %1, i16** %4
%7 = load i16*, i16** %3
%8 = getelementptr inbounds i16, i16* %7, i64 0
%9 = load i16, i16* %8
%10 = zext i16 %9 to i32
%11 = add nsw i32 %10, 2885
%12 = trunc i32 %11 to i16
%13 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 0
store i16 %12, i16* %13
store i16 0, i16* %6
br label %14
14: ; preds = %18, %2
%15 = load i16, i16* %6
%16 = zext i16 %15 to i64
%17 = icmp ult i64 %16, 1
br i1 %17, label %18, label %35
18: ; preds = %14
%19 = load i16, i16* %6
%20 = zext i16 %19 to i64
%21 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 %20
%22 = load i16, i16* %21
%23 = zext i16 %22 to i32
%24 = load i16, i16* %6
%25 = zext i16 %24 to i64
%26 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 %25
%27 = load i16, i16* %26
%28 = zext i16 %27 to i32
%29 = mul nsw i32 %28, %23
%30 = trunc i32 %29 to i16
store i16 %30, i16* %26
%31 = load i16, i16* %6
%32 = zext i16 %31 to i64
%33 = add i64 %32, 2
%34 = trunc i64 %33 to i16
store i16 %34, i16* %6
br label %14
35: ; preds = %14
%36 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 0
%37 = load i16, i16* %36
%38 = zext i16 %37 to i32
%39 = sub nsw i32 %38, 29594
%40 = trunc i32 %39 to i16
%41 = load i16*, i16** %4
%42 = getelementptr inbounds i16, i16* %41, i64 0
store i16 %40, i16* %42
ret void
}

LLVM IR (-O2):
define void @RandomFunc(i16* nocapture %0, i16* nocapture writeonly %1) {
%3 = load i16, i16* %0
%4 = add i16 %3, 2885
%5 = mul i16 %4, %4
%6 = add i16 %5, -29594
store i16 %6, i16* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ freeWakeLock(int);
int /*<<< orphan*/ getWakeLock(int);
int main() {
  getWakeLock(1);
  freeWakeLock(2);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <getWakeLock@plt>
mov    $0x2,%edi
call   1040 <freeWakeLock@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1030 <getWakeLock@plt>
mov    $0x2,%edi
call   1040 <freeWakeLock@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @getWakeLock(i32 1)
%2 = call i32 @freeWakeLock(i32 2)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @getWakeLock(i32 1)
%2 = tail call i32 @freeWakeLock(i32 2)
ret i32 0
}
/* Variables and functions */
int fls64(unsigned long);
unsigned long find_zero(unsigned long mask) { return fls64(mask) >> 3; }


x86 assembly (clang, -O0):
<find_zero>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <fls64@plt>
sar    $0x3,%eax
cltq
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<find_zero>:
push   %rax
call   1030 <fls64@plt>
sar    $0x3,%eax
cltq
pop    %rcx
ret

LLVM IR (-O0):
define i64 @find_zero(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i32 @fls64(i64 %3)
%5 = ashr i32 %4, 3
%6 = sext i32 %5 to i64
ret i64 %6
}

LLVM IR (-O2):
define i64 @find_zero(i64 %0) {
%2 = tail call i32 @fls64(i64 %0)
%3 = ashr i32 %2, 3
%4 = sext i32 %3 to i64
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ helper_double_23_recursive(double *, int);
void helper_double_23(double *buf) { helper_double_23_recursive(buf, 23); }


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

x86 assembly (clang, -O2):
<helper_double_23>:
mov    $0x17,%esi
jmp    1030 <helper_double_23_recursive@plt>

LLVM IR (-O0):
define void @helper_double_23(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = call i32 @helper_double_23_recursive(double* %3, i32 23)
ret void
}

LLVM IR (-O2):
define void @helper_double_23(double* %0) {
%2 = tail call i32 @helper_double_23_recursive(double* %0, i32 23)
ret void
}
unsigned char *sha224digest(bitstr, bitcnt)
unsigned char *bitstr;
unsigned long bitcnt;
{ return ((unsigned char *)shacomp(224, 1, bitstr, bitcnt)); }


x86 assembly (clang, -O0):
<sha224digest>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    $0xe0,%edi
mov    $0x1,%esi
mov    $0x0,%al
call   1030 <shacomp@plt>
cltq
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sha224digest>:
push   %rax
mov    %rsi,%rcx
mov    %rdi,%rdx
mov    $0xe0,%edi
mov    $0x1,%esi
xor    %eax,%eax
call   1030 <shacomp@plt>
cltq
pop    %rcx
ret

LLVM IR (-O0):
define i8* @sha224digest(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = load i64, i64* %4
%7 = call i32 (i32, i32, i8*, i64, ...) bitcast (i32 (...)* @shacomp to i32 (i32, i32, i8*, i64, ...)*)(i32 224, i32 1, i8* %5, i64 %6)
%8 = sext i32 %7 to i64
%9 = inttoptr i64 %8 to i8*
ret i8* %9
}

LLVM IR (-O2):
define i8* @sha224digest(i8* %0, i64 %1) {
%3 = tail call i32 (i32, i32, i8*, i64, ...) bitcast (i32 (...)* @shacomp to i32 (i32, i32, i8*, i64, ...)*)(i32 224, i32 1, i8* %0, i64 %1)
%4 = sext i32 %3 to i64
%5 = inttoptr i64 %4 to i8*
ret i8* %5
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ type;
};
struct TYPE_4__ {
  TYPE_1__ xconfigurerequest;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
int get_XEvent_xconfigurerequest_type(void *_p) {
  return (int)((XEvent *)_p)->xconfigurerequest.type;
}


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

x86 assembly (clang, -O2):
<get_XEvent_xconfigurerequest_type>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i64 }
define i32 @get_XEvent_xconfigurerequest_type(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_4__*
%5 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %4, i32 0, i32 0
%6 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %5, i32 0, i32 0
%7 = load i64, i64* %6
%8 = trunc i64 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @get_XEvent_xconfigurerequest_type(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ printf(char *);
scalar_t__ strcmp(char *, char *);
int checkNullity(char *object) {
  if (object == NULL || 0 == strcmp(object, "\n")) {
    printf("Invalid input. Please enter non void values.\n");
    free(object);
    exit(1);
  }
  return 0;
}


x86 assembly (clang, -O0):
<checkNullity>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1175 <checkNullity+0x35>
mov    -0x8(%rbp),%rdi
lea    0xeca(%rip),%rsi
call   1050 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
jne    1194 <checkNullity+0x54>
lea    0xe84(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
mov    $0x1,%edi
call   1060 <exit@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checkNullity>:
push   %rbx
mov    %rdi,%rbx
test   %rdi,%rdi
je     1161 <checkNullity+0x21>
lea    0xeb0(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcmp@plt>
test   %rax,%rax
je     1161 <checkNullity+0x21>
xor    %eax,%eax
pop    %rbx
ret
lea    0xe9a(%rip),%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    $0x1,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
@.str.1 = [46 x i8] c"Invalid input. Please enter non void values.\0A\00"
define i32 @checkNullity(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp eq i8* %3, null
br i1 %4, label %9, label %5
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%8 = icmp eq i64 0, %7
br i1 %8, label %9, label %14
9: ; preds = %5, %1
%10 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.1, i64 0, i64 0))
%11 = load i8*, i8** %2
%12 = call i32 @free(i8* %11)
%13 = call i32 @exit(i32 1)
unreachable
14: ; preds = %5
ret i32 0
}

LLVM IR (-O2):
@.str = [2 x i8] c"\0A\00"
@str = [45 x i8] c"Invalid input. Please enter non void values.\00"
define i32 @checkNullity(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %3, %1
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str, i64 0, i64 0))
%8 = tail call i32 @free(i8* %0)
%9 = tail call i32 @exit(i32 1)
unreachable
10: ; preds = %3
ret i32 0
}
/* Variables and functions */
int strlen(char *);
long hash(char *word) {
  long int a = 42;
  int i;
  for (i = 0; i < strlen(word); i++) {
    a += (word[i] * (i + 1));
  }
  return a;
}


x86 assembly (clang, -O0):
<hash>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x2a,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%eax
cmp    %ecx,%eax
jge    1174 <hash+0x64>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
mov    -0x14(%rbp),%ecx
add    $0x1,%ecx
imul   %ecx,%eax
cltq
add    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112b <hash+0x1b>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
call   1030 <strlen@plt>
mov    $0x2a,%r15d
test   %eax,%eax
jle    1150 <hash+0x40>
xor    %ebx,%ebx
nopl   0x0(%rax)
movsbl (%r14,%rbx,1),%eax
add    $0x1,%rbx
imul   %ebx,%eax
cltq
add    %rax,%r15
mov    %r14,%rdi
call   1030 <strlen@plt>
cltq
cmp    %rax,%rbx
jl     1130 <hash+0x20>
mov    %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i64 @hash(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = icmp sgt i32 %2, 0
br i1 %3, label %4, label %18
4: ; preds = %1, %4
%5 = phi i64 [ %10, %4 ], [ 0, %1 ]
%6 = phi i64 [ %14, %4 ], [ 42, %1 ]
%7 = getelementptr inbounds i8, i8* %0, i64 %5
%8 = load i8, i8* %7
%9 = sext i8 %8 to i64
%10 = add nuw nsw i64 %5, 1
%11 = mul i64 %10, %9
%12 = shl i64 %11, 32
%13 = ashr exact i64 %12, 32
%14 = add nsw i64 %6, %13
%15 = tail call i32 @strlen(i8* %0)
%16 = sext i32 %15 to i64
%17 = icmp slt i64 %10, %16
br i1 %17, label %4, label %18
18: ; preds = %4, %1
%19 = phi i64 [ 42, %1 ], [ %14, %4 ]
ret i64 %19
}
__attribute__((no, noclone)) signed __int128 t114_2sub(signed __int128 y) {
  signed __int128 x =
      (((signed __int128)(((unsigned __int128)1 << (16 * 8 - 1)) - 1)));
  signed __int128 r;
  if (__builtin_sub_overflow(x, y, &r))
    bar();
  return r;
}


x86 assembly (clang, -O0):
<t114_2sub>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %rcx,-0x28(%rbp)
mov    %rax,-0x30(%rbp)
movabs $0x7fffffffffffffff,%rax
ff ff 7f
mov    %rax,-0x38(%rbp)
movq   $0xffffffffffffffff,-0x40(%rbp)
ff
mov    -0x40(%rbp),%rdx
mov    -0x38(%rbp),%rcx
mov    -0x30(%rbp),%rsi
mov    -0x28(%rbp),%rax
sub    %rsi,%rdx
sbb    %rax,%rcx
seto   %al
mov    %rdx,-0x50(%rbp)
mov    %rcx,-0x48(%rbp)
test   $0x1,%al
jne    1174 <t114_2sub+0x64>
jmp    117b <t114_2sub+0x6b>
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x50(%rbp),%rax
mov    -0x48(%rbp),%rcx
mov    %rcx,-0x8(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t114_2sub>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
not    %r14
movabs $0x7fffffffffffffff,%rbx
ff ff 7f
sub    %rsi,%rbx
jno    1130 <t114_2sub+0x20>
xor    %eax,%eax
call   1030 <bar@plt>
mov    %r14,%rax
mov    %rbx,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define { i64, i64 } @t114_2sub(i64 %0, i64 %1) {
%3 = alloca i128
%4 = alloca i128
%5 = alloca i128
%6 = alloca i128
%7 = alloca i128
%8 = bitcast i128* %4 to { i64, i64 }*
%9 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %8, i32 0, i32 0
store i64 %0, i64* %9
%10 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %8, i32 0, i32 1
store i64 %1, i64* %10
%11 = load i128, i128* %4
store i128 %11, i128* %5
store i128 170141183460469231731687303715884105727, i128* %6
%12 = load i128, i128* %6
%13 = load i128, i128* %5
%14 = call { i128, i1 } @llvm.ssub.with.overflow.i128(i128 %12, i128 %13)
%15 = extractvalue { i128, i1 } %14, 1
%16 = extractvalue { i128, i1 } %14, 0
store i128 %16, i128* %7
br i1 %15, label %17, label %19
17: ; preds = %2
%18 = call i32 (...) @bar()
br label %19
19: ; preds = %17, %2
%20 = load i128, i128* %7
store i128 %20, i128* %3
%21 = bitcast i128* %3 to { i64, i64 }*
%22 = load { i64, i64 }, { i64, i64 }* %21
ret { i64, i64 } %22
}

LLVM IR (-O2):
define { i64, i64 } @t114_2sub(i64 %0, i64 %1) {
%3 = zext i64 %1 to i128
%4 = shl nuw i128 %3, 64
%5 = zext i64 %0 to i128
%6 = or i128 %4, %5
%7 = tail call { i128, i1 } @llvm.ssub.with.overflow.i128(i128 170141183460469231731687303715884105727, i128 %6)
%8 = extractvalue { i128, i1 } %7, 1
%9 = extractvalue { i128, i1 } %7, 0
br i1 %8, label %10, label %12
10: ; preds = %2
%11 = tail call i32 (...) @bar()
br label %12
12: ; preds = %10, %2
%13 = trunc i128 %9 to i64
%14 = lshr i128 %9, 64
%15 = trunc i128 %14 to i64
%16 = insertvalue { i64, i64 } poison, i64 %13, 0
%17 = insertvalue { i64, i64 } %16, i64 %15, 1
ret { i64, i64 } %17
}