xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ gid_t;

/* Variables and functions */
int /*<<< orphan*/ err_exit(char *);
int getgroups(size_t, int /*<<< orphan*/ *);
int _getgroups(size_t s, gid_t *g) {
  int n = getgroups(s, g);
  if (n < 0)
    err_exit("_getgroups");
  return n;
}


x86 assembly (clang, -O0):
<_getgroups>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <getgroups@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    1156 <_getgroups+0x36>
lea    0xeaf(%rip),%rdi
call   1040 <err_exit@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_getgroups>:
push   %rbx
call   1030 <getgroups@plt>
mov    %eax,%ebx
test   %eax,%eax
jns    1138 <_getgroups+0x18>
lea    0xecd(%rip),%rdi
call   1040 <err_exit@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [11 x i8] c"_getgroups\00"
define i32 @_getgroups(i64 %0, i32* %1) {
%3 = tail call i32 @getgroups(i64 %0, i32* %1)
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @err_exit(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %2
ret i32 %3
}
void power_halt(void) {
  __asm__ volatile("cli\n"
                   "hlt\n");
}


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

x86 assembly (clang, -O2):
<power_halt>:
cli
hlt
ret

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

LLVM IR (-O2):
define void @power_halt() {
tail call void asm sideeffect "cli\0Ahlt\0A", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  printf("No FIPS GCM support\n");
  return (0);
}


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

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

LLVM IR (-O0):
@.str = [21 x i8] c"No FIPS GCM support\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [20 x i8] c"No FIPS GCM support\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ get_token();
scalar_t__ peek(char *);
int accept(char *s) {
  if (peek(s)) {
    get_token();
    return 1;
  } else
    return 0;
}


x86 assembly (clang, -O0):
<accept>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <peek@plt>
cmp    $0x0,%rax
je     1152 <accept+0x32>
mov    $0x0,%al
call   1040 <get_token@plt>
movl   $0x1,-0x4(%rbp)
jmp    1159 <accept+0x39>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<accept>:
push   %rax
call   1030 <peek@plt>
test   %rax,%rax
je     1139 <accept+0x19>
xor    %eax,%eax
call   1040 <get_token@plt>
mov    $0x1,%eax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @accept(i8* %0) {
%2 = tail call i64 @peek(i8* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 (...) @get_token()
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ 1, %4 ], [ 0, %1 ]
ret i32 %7
}
/* Variables and functions */
int func_primo(int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main(void) {
  int num, resul = 0;
  printf("Numero: ");
  scanf("%d", &num);
  resul = func_primo(num);
  printf("%d\n\n", resul);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
lea    0xeb3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xeae(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
call   1030 <func_primo@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xe93(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xec3(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
call   1030 <func_primo@plt>
lea    0xeac(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [9 x i8] c"Numero: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [5 x i8] c"%d\0A\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @func_primo(i32 %5)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %6)
ret i32 0
}
/* Variables and functions */
float fastlog2(float);
float fastpow2(float);
float fastpow(float x, float p) { return fastpow2(p * fastlog2(x)); }


x86 assembly (clang, -O0):
<fastpow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
call   1040 <fastlog2@plt>
movaps %xmm0,%xmm1
movss  -0xc(%rbp),%xmm0
mulss  %xmm1,%xmm0
call   1030 <fastpow2@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fastpow>:
push   %rax
movss  %xmm1,0x4(%rsp)
call   1040 <fastlog2@plt>
mulss  0x4(%rsp),%xmm0
pop    %rax
jmp    1030 <fastpow2@plt>

LLVM IR (-O0):
define float @fastpow(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %4
%6 = load float, float* %3
%7 = call float @fastlog2(float %6)
%8 = fmul float %5, %7
%9 = call float @fastpow2(float %8)
ret float %9
}

LLVM IR (-O2):
define float @fastpow(float %0, float %1) {
%3 = tail call float @fastlog2(float %0)
%4 = fmul float %3, %1
%5 = tail call float @fastpow2(float %4)
ret float %5
}
int cc608_parity(unsigned int byte) {
  int ones = 0, i;
  for (i = 0; i < 7; i++) {
    if (byte & (1 << i))
      ones++;
  }
  return ones & 1;
}


x86 assembly (clang, -O0):
<cc608_parity>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x7,-0xc(%rbp)
jge    1155 <cc608_parity+0x55>
mov    -0x4(%rbp),%eax
mov    -0xc(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
je     1142 <cc608_parity+0x42>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1147 <cc608_parity+0x47>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1115 <cc608_parity+0x15>
mov    -0x8(%rbp),%eax
and    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cc608_parity>:
mov    %edi,%eax
and    $0x1,%eax
mov    %edi,%ecx
shr    %ecx
and    $0x1,%ecx
add    %eax,%ecx
mov    %edi,%eax
shr    $0x2,%eax
and    $0x1,%eax
add    %ecx,%eax
mov    %edi,%ecx
shr    $0x3,%ecx
add    %eax,%ecx
mov    %edi,%edx
shr    $0x4,%edx
add    %ecx,%edx
mov    %edi,%eax
shr    $0x5,%eax
add    %edx,%eax
shr    $0x6,%edi
add    %edi,%eax
and    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @cc608_parity(i32 %0) {
%2 = and i32 %0, 1
%3 = lshr i32 %0, 1
%4 = and i32 %3, 1
%5 = add nuw nsw i32 %4, %2
%6 = lshr i32 %0, 2
%7 = and i32 %6, 1
%8 = add nuw nsw i32 %7, %5
%9 = lshr i32 %0, 3
%10 = add nuw nsw i32 %9, %8
%11 = lshr i32 %0, 4
%12 = add nuw nsw i32 %11, %10
%13 = lshr i32 %0, 5
%14 = add nuw nsw i32 %13, %12
%15 = lshr i32 %0, 6
%16 = add nuw nsw i32 %15, %14
%17 = and i32 %16, 1
ret i32 %17
}
/* Variables and functions */
int fork();
int /*<<< orphan*/ printf(char *);
void testFork() {
  int tid = fork();
  if (tid == 0) {
    printf("in child");
  } else {
    printf("in parent");
  }
}


x86 assembly (clang, -O0):
<testFork>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <fork@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    114d <testFork+0x2d>
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
jmp    1159 <testFork+0x39>
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testFork>:
push   %rax
xor    %eax,%eax
call   1040 <fork@plt>
test   %eax,%eax
lea    0xecf(%rip),%rax
lea    0xed1(%rip),%rdi
cmove  %rax,%rdi
pop    %rax
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [9 x i8] c"in child\00"
@.str.1 = [10 x i8] c"in parent\00"
define void @testFork() {
%1 = tail call i32 (...) @fork()
%2 = icmp eq i32 %1, 0
%3 = select i1 %2, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0)
%4 = tail call i32 @printf(i8* dereferenceable(1) %3)
ret void
}
int *f2(int y) { return &y; }


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

x86 assembly (clang, -O2):
<f2>:
lea    -0x4(%rsp),%rax
ret

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

LLVM IR (-O2):
define noalias i32* @f2(i32 %0) {
%2 = alloca i32
ret i32* %2
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void print_usage(FILE *stream) {
  fprintf(stream,
          "Usage: openport host port fd_num uid gid command [args...]\n");
}


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

x86 assembly (clang, -O2):
<print_usage>:
mov    %rdi,%rcx
lea    0xee6(%rip),%rdi
mov    $0x3b,%esi
mov    $0x1,%edx
jmp    1030 <fwrite@plt>

LLVM IR (-O0):
@.str = [60 x i8] c"Usage: openport host port fd_num uid gid command [args...]\0A\00"
define void @print_usage(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [60 x i8] c"Usage: openport host port fd_num uid gid command [args...]\0A\00"
define void @print_usage(i32* nocapture %0) {
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0), i64 59, i64 1, i32* %0)
ret void
}
/* Variables and functions */
bool issorted(int *arr, size_t len) {
  for (int i = 0; i < len - 1; i++) {
    if (arr[i] > arr[i + 1]) {
      return false;
    }
  }
  return true;
}


x86 assembly (clang, -O0):
<issorted>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movslq -0x1c(%rbp),%rax
mov    -0x18(%rbp),%rcx
sub    $0x1,%rcx
cmp    %rcx,%rax
jae    1168 <issorted+0x68>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    -0x10(%rbp),%rcx
mov    -0x1c(%rbp),%edx
add    $0x1,%edx
movslq %edx,%rdx
cmp    (%rcx,%rdx,4),%eax
jle    1155 <issorted+0x55>
movl   $0x0,-0x4(%rbp)
jmp    116f <issorted+0x6f>
jmp    115a <issorted+0x5a>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1113 <issorted+0x13>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<issorted>:
add    $0xffffffffffffffff,%rsi
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
mov    %rax,%rcx
cmp    %rax,%rsi
je     1125 <issorted+0x25>
mov    (%rdi,%rcx,4),%edx
lea    0x1(%rcx),%rax
cmp    0x4(%rdi,%rcx,4),%edx
jle    1110 <issorted+0x10>
xor    %eax,%eax
cmp    %rcx,%rsi
setbe  %al
ret

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

LLVM IR (-O2):
define i32 @issorted(i32* nocapture %0, i64 %1) {
%3 = add i64 %1, -1
br label %4
4: ; preds = %7, %2
%5 = phi i64 [ %10, %7 ], [ 0, %2 ]
%6 = icmp eq i64 %5, %3
br i1 %6, label %14, label %7
7: ; preds = %4
%8 = getelementptr inbounds i32, i32* %0, i64 %5
%9 = load i32, i32* %8
%10 = add nuw i64 %5, 1
%11 = getelementptr inbounds i32, i32* %0, i64 %10
%12 = load i32, i32* %11
%13 = icmp sgt i32 %9, %12
br i1 %13, label %14, label %4
14: ; preds = %7, %4
%15 = icmp ule i64 %3, %5
%16 = zext i1 %15 to i32
ret i32 %16
}
/* Variables and functions */
scalar_t__ access(char const *, int);
int /*<<< orphan*/ write_error_with_error_number_var(char *, char const *, int);
unsigned char check_file_dir(const char *path, int mode) {
  if (access(path, mode)) {
    write_error_with_error_number_var(
        "Can't access folder/file %s with mode %d. Trying to create it.", path,
        mode);
    return 0;
  } else {
    return 1;
  }
}


x86 assembly (clang, -O0):
<check_file_dir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1040 <access@plt>
cmp    $0x0,%rax
je     1161 <check_file_dir+0x41>
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
lea    0xead(%rip),%rdi
call   1030 <write_error_with_error_number_var@plt>
movb   $0x0,-0x1(%rbp)
jmp    1165 <check_file_dir+0x45>
movb   $0x1,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_file_dir>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1040 <access@plt>
test   %rax,%rax
je     1147 <check_file_dir+0x27>
lea    0xec7(%rip),%rdi
mov    %rbx,%rsi
mov    %ebp,%edx
call   1030 <write_error_with_error_number_var@plt>
xor    %eax,%eax
jmp    1149 <check_file_dir+0x29>
mov    $0x1,%al
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [63 x i8] c"Can't access folder/file %s with mode %d. Trying to create it.\00"
define zeroext i8 @check_file_dir(i8* %0, i32 %1) {
%3 = alloca i8
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
%6 = load i8*, i8** %4
%7 = load i32, i32* %5
%8 = call i64 @access(i8* %6, i32 %7)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %14
10: ; preds = %2
%11 = load i8*, i8** %4
%12 = load i32, i32* %5
%13 = call i32 @write_error_with_error_number_var(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str, i64 0, i64 0), i8* %11, i32 %12)
store i8 0, i8* %3
br label %15
14: ; preds = %2
store i8 1, i8* %3
br label %15
15: ; preds = %14, %10
%16 = load i8, i8* %3
ret i8 %16
}

LLVM IR (-O2):
@.str = [63 x i8] c"Can't access folder/file %s with mode %d. Trying to create it.\00"
define zeroext i8 @check_file_dir(i8* %0, i32 %1) {
%3 = tail call i64 @access(i8* %0, i32 %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @write_error_with_error_number_var(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1)
br label %7
7: ; preds = %2, %5
%8 = phi i8 [ 0, %5 ], [ 1, %2 ]
ret i8 %8
}
void nvic_disable_irqs() {}


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

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

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

LLVM IR (-O2):
define void @nvic_disable_irqs() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
void print_num() {
  static int z = 0;
  printf("%d ", z++);
}


x86 assembly (clang, -O0):
<print_num>:
push   %rbp
mov    %rsp,%rbp
mov    0x2f12(%rip),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,0x2f07(%rip)
lea    0xed4(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_num>:
mov    0x2f16(%rip),%esi
lea    0x1(%rsi),%eax
mov    %eax,0x2f0d(%rip)
lea    0xeda(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@print_num.z = internal global i32 0
@.str = [4 x i8] c"%d \00"
define void @print_num() {
%1 = load i32, i32* @print_num.z
%2 = add nsw i32 %1, 1
store i32 %2, i32* @print_num.z
%3 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}

LLVM IR (-O2):
@print_num.z = internal unnamed_addr global i32 0
@.str = [4 x i8] c"%d \00"
define void @print_num() {
%1 = load i32, i32* @print_num.z
%2 = add nsw i32 %1, 1
store i32 %2, i32* @print_num.z
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
unsigned char slapi_setbit_uchar(unsigned char f, unsigned char bitnum) {
  return (f | ((unsigned char)1 << bitnum));
}


x86 assembly (clang, -O0):
<slapi_setbit_uchar>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movzbl -0x1(%rbp),%eax
movzbl -0x2(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
movzbl %al,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define zeroext i8 @slapi_setbit_uchar(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %1 to i32
%4 = shl nuw i32 1, %3
%5 = trunc i32 %4 to i8
%6 = or i8 %5, %0
ret i8 %6
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void ft_strdel(char **as) {
  if (as) {
    free(*as);
    *as = NULL;
    as = NULL;
  }
}


x86 assembly (clang, -O0):
<ft_strdel>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1146 <ft_strdel+0x36>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
movq   $0x0,-0x8(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_strdel>:
test   %rdi,%rdi
je     1129 <ft_strdel+0x19>
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1030 <free@plt>
movq   $0x0,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @ft_strdel(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = icmp ne i8** %3, null
br i1 %4, label %5, label %10
5: ; preds = %1
%6 = load i8**, i8*** %2
%7 = load i8*, i8** %6
%8 = call i32 @free(i8* %7)
%9 = load i8**, i8*** %2
store i8* null, i8** %9
store i8** null, i8*** %2
br label %10
10: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @ft_strdel(i8** %0) {
%2 = icmp eq i8** %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = load i8*, i8** %0
%5 = tail call i32 @free(i8* %4)
store i8* null, i8** %0
br label %6
6: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void dyad_free(void *ptr) { free(ptr); }


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

x86 assembly (clang, -O2):
<dyad_free>:
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @dyad_free(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @free(i8* %3)
ret void
}

LLVM IR (-O2):
define void @dyad_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
void ulpmc_fwupdate_enter(void) {}


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

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

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

LLVM IR (-O2):
define void @ulpmc_fwupdate_enter() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ mos_run_hook();
int /*<<< orphan*/ mos_run_ready_thread();
int /*<<< orphan*/ mos_set_ready_thread();
int /*<<< orphan*/ mos_tick_enable();
void mos_run(void) {
  mos_run_hook();
  mos_tick_enable();
  mos_set_ready_thread();
  mos_run_ready_thread();
}


x86 assembly (clang, -O0):
<mos_run>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1060 <mos_run_hook@plt>
mov    $0x0,%al
call   1040 <mos_tick_enable@plt>
mov    $0x0,%al
call   1050 <mos_set_ready_thread@plt>
mov    $0x0,%al
call   1030 <mos_run_ready_thread@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<mos_run>:
push   %rax
xor    %eax,%eax
call   1060 <mos_run_hook@plt>
xor    %eax,%eax
call   1040 <mos_tick_enable@plt>
xor    %eax,%eax
call   1050 <mos_set_ready_thread@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <mos_run_ready_thread@plt>

LLVM IR (-O0):
define void @mos_run() {
%1 = call i32 (...) @mos_run_hook()
%2 = call i32 (...) @mos_tick_enable()
%3 = call i32 (...) @mos_set_ready_thread()
%4 = call i32 (...) @mos_run_ready_thread()
ret void
}

LLVM IR (-O2):
define void @mos_run() {
%1 = tail call i32 (...) @mos_run_hook()
%2 = tail call i32 (...) @mos_tick_enable()
%3 = tail call i32 (...) @mos_set_ready_thread()
%4 = tail call i32 (...) @mos_run_ready_thread()
ret void
}
/* Variables and functions */
void *Alloc(int);
void XAlloc(void **var, int siz) {
  var[0] = Alloc(siz);
  var[1] = ((char *)var[0]) + siz;
}


x86 assembly (clang, -O0):
<XAlloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <Alloc@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
movslq -0xc(%rbp),%rax
add    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x8(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<XAlloc>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
mov    %esi,%edi
call   1030 <Alloc@plt>
mov    %rax,(%r14)
movslq %ebx,%rcx
add    %rax,%rcx
mov    %rcx,0x8(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @XAlloc(i8** %0, i32 %1) {
%3 = alloca i8**
%4 = alloca i32
store i8** %0, i8*** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = call i8* @Alloc(i32 %5)
%7 = load i8**, i8*** %3
%8 = getelementptr inbounds i8*, i8** %7, i64 0
store i8* %6, i8** %8
%9 = load i8**, i8*** %3
%10 = getelementptr inbounds i8*, i8** %9, i64 0
%11 = load i8*, i8** %10
%12 = load i32, i32* %4
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i8, i8* %11, i64 %13
%15 = load i8**, i8*** %3
%16 = getelementptr inbounds i8*, i8** %15, i64 1
store i8* %14, i8** %16
ret void
}

LLVM IR (-O2):
define void @XAlloc(i8** nocapture writeonly %0, i32 %1) {
%3 = tail call i8* @Alloc(i32 %1)
store i8* %3, i8** %0
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i8, i8* %3, i64 %4
%6 = getelementptr inbounds i8*, i8** %0, i64 1
store i8* %5, i8** %6
ret void
}
void gcl_swap(void **a, void **b) {
  void *c = *a;
  *a = *b;
  *b = c;
}


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

x86 assembly (clang, -O2):
<gcl_swap>:
mov    (%rdi),%rax
mov    (%rsi),%rcx
mov    %rcx,(%rdi)
mov    %rax,(%rsi)
ret

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

LLVM IR (-O2):
define void @gcl_swap(i8** nocapture %0, i8** nocapture %1) {
%3 = load i8*, i8** %0
%4 = load i8*, i8** %1
store i8* %4, i8** %0
store i8* %3, i8** %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ iis_s3c2410_suspend();
void iis_suspend(void) { iis_s3c2410_suspend(); }


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

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

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

LLVM IR (-O2):
define void @iis_suspend() {
%1 = tail call i32 (...) @iis_s3c2410_suspend()
ret void
}
/* Variables and functions */
int hcreate(size_t nel) { return (1); }


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

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

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

LLVM IR (-O2):
define i32 @hcreate(i64 %0) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, long);
void *PrintHello(void *threadid) {
  long tid;
  tid = (long)threadid;
  printf("Hello from thread #%lu\n", tid);
}


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

x86 assembly (clang, -O2):
<PrintHello>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"Hello from thread #%lu\0A\00"
define i8* @PrintHello(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = ptrtoint i8* %5 to i64
store i64 %6, i64* %4
%7 = load i64, i64* %4
%8 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i64 %7)
%9 = load i8*, i8** %2
ret i8* %9
}

LLVM IR (-O2):
@.str = [24 x i8] c"Hello from thread #%lu\0A\00"
define noalias i8* @PrintHello(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i64 %2)
ret i8* undef
}
int __attribute__((optimize("O0"))) path_exists(char *path) {
  int inode;
  __asm__("nop" ::"b"(path));
  __asm__("int $0x85" ::"a"(0x05));
  __asm__("movl %%edx, %0" : "=r"(inode));
  return inode;
}


x86 assembly (clang, -O0):
<path_exists>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rbx
nop
mov    $0x5,%eax
int    $0x85
mov    %edx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<path_exists>:
push   %rbx
mov    %rdi,%rbx
nop
mov    $0x5,%eax
int    $0x85
mov    %edx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @path_exists(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 asm "movl %edx, $0", "=r,~{dirflag},~{fpsr},~{flags}"()
store i32 %5, i32* %3
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @path_exists(i8* %0) {
tail call void asm sideeffect "nop", "{bx},~{dirflag},~{fpsr},~{flags}"(i8* %0)
tail call void asm sideeffect "int $$0x85", "{ax},~{dirflag},~{fpsr},~{flags}"(i32 5)
%2 = tail call i32 asm "movl %edx, $0", "=r,~{dirflag},~{fpsr},~{flags}"()
ret i32 %2
}
int try_eol(char **cc) { return (**cc == 0) ? 1 : 0; }


x86 assembly (clang, -O0):
<try_eol>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%edx
cmove  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<try_eol>:
mov    (%rdi),%rcx
xor    %eax,%eax
cmpb   $0x0,(%rcx)
sete   %al
ret

LLVM IR (-O0):
define i32 @try_eol(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = load i8*, i8** %3
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 1, i32 0
ret i32 %9
}

LLVM IR (-O2):
define i32 @try_eol(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = load i8, i8* %2
%4 = icmp eq i8 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int /*<<< orphan*/ shift_mul(int, int);
int main(int argc, char *argv[]) {
  int A = 10;
  printf("%lld\n", shift_mul(A, 10));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0xa,-0x14(%rbp)
mov    -0x14(%rbp),%edi
mov    $0xa,%esi
call   1030 <shift_mul@plt>
mov    %eax,%esi
lea    0xeb4(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [6 x i8] c"%lld\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i32
store i32 %0, i32* %3
store i8** %1, i8*** %4
store i32 10, i32* %5
%6 = load i32, i32* %5
%7 = call i32 @shift_mul(i32 %6, i32 10)
%8 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"%lld\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @shift_mul(i32 10, i32 10)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Variables and functions */
int write(int, char *, int);
int layer1_write(char b) {
  if (write(1, &b, 1) != 1) {
    return -1;
  } else {
    return 1;
  }
}


x86 assembly (clang, -O0):
<layer1_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
mov    $0x1,%edx
lea    -0x5(%rbp),%rsi
mov    %edx,%edi
call   1030 <write@plt>
cmp    $0x1,%eax
je     1143 <layer1_write+0x33>
movl   $0xffffffff,-0x4(%rbp)
jmp    114a <layer1_write+0x3a>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<layer1_write>:
push   %rax
mov    %dil,0x7(%rsp)
lea    0x7(%rsp),%rsi
mov    $0x1,%edi
mov    $0x1,%edx
call   1030 <write@plt>
xor    %ecx,%ecx
cmp    $0x1,%eax
sete   %cl
lea    (%rcx,%rcx,1),%eax
add    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @layer1_write(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = call i32 @write(i32 1, i8* %3, i32 1)
%5 = icmp ne i32 %4, 1
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 -1, i32* %2
br label %8
7: ; preds = %1
store i32 1, i32* %2
br label %8
8: ; preds = %7, %6
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
define i32 @layer1_write(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call i32 @write(i32 1, i8* %2, i32 1)
%4 = icmp eq i32 %3, 1
%5 = select i1 %4, i32 1, i32 -1
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
long oc_storage_read(const char *store, uint8_t *buf, size_t size) {
  return -1;
}


x86 assembly (clang, -O0):
<oc_storage_read>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0xffffffffffffffff,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<oc_storage_read>:
mov    $0xffffffffffffffff,%rax
ret

LLVM IR (-O0):
define i64 @oc_storage_read(i8* %0, i32* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i64
store i8* %0, i8** %4
store i32* %1, i32** %5
store i64 %2, i64* %6
ret i64 -1
}

LLVM IR (-O2):
define i64 @oc_storage_read(i8* nocapture readnone %0, i32* nocapture readnone %1, i64 %2) {
ret i64 -1
}
int ZhenWuWoJianQi_cost(struct Ability *self) { return 200; }


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

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

LLVM IR (-O0):
%struct.Ability = type opaque
define i32 @ZhenWuWoJianQi_cost(%struct.Ability* %0) {
%2 = alloca %struct.Ability*
store %struct.Ability* %0, %struct.Ability** %2
ret i32 200
}

LLVM IR (-O2):
%struct.Ability = type opaque
define i32 @ZhenWuWoJianQi_cost(%struct.Ability* nocapture readnone %0) {
ret i32 200
}
double FahrenheitToCelsius(double f) { return (f - 32) * 5.0 / 9.0; }


x86 assembly (clang, -O0):
<FahrenheitToCelsius>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xefa(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xee6(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xed2(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<FahrenheitToCelsius>:
addsd  0xef8(%rip),%xmm0
mulsd  0xef8(%rip),%xmm0
divsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @FahrenheitToCelsius(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fsub double %3, 3.200000e+01
%5 = fmul double %4, 5.000000e+00
%6 = fdiv double %5, 9.000000e+00
ret double %6
}

LLVM IR (-O2):
define double @FahrenheitToCelsius(double %0) {
%2 = fadd double %0, -3.200000e+01
%3 = fmul double %2, 5.000000e+00
%4 = fdiv double %3, 9.000000e+00
ret double %4
}
double f4_cb_send_pre_int_int_int_int_int_int_int(double (*cb)(int, int, int,
                                                               int, int, int,
                                                               int)) {
  int r = 44;
  return cb(8, 9, 10, 11, 12, 13, r) + 1.0;
}


x86 assembly (clang, -O0):
<f4_cb_send_pre_int_int_int_int_int_int_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x2c,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%r10d
mov    $0x8,%edi
mov    $0x9,%esi
mov    $0xa,%edx
mov    $0xb,%ecx
mov    $0xc,%r8d
mov    $0xd,%r9d
mov    %r10d,(%rsp)
call   *%rax
movsd  0xeb7(%rip),%xmm1
addsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f4_cb_send_pre_int_int_int_int_int_int_int>:
push   %rax
mov    %rdi,%rax
movl   $0x2c,(%rsp)
mov    $0x8,%edi
mov    $0x9,%esi
mov    $0xa,%edx
mov    $0xb,%ecx
mov    $0xc,%r8d
mov    $0xd,%r9d
call   *%rax
addsd  0xecb(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @f4_cb_send_pre_int_int_int_int_int_int_int(double (i32, i32, i32, i32, i32, i32, i32)* %0) {
%2 = alloca double (i32, i32, i32, i32, i32, i32, i32)*
%3 = alloca i32
store double (i32, i32, i32, i32, i32, i32, i32)* %0, double (i32, i32, i32, i32, i32, i32, i32)** %2
store i32 44, i32* %3
%4 = load double (i32, i32, i32, i32, i32, i32, i32)*, double (i32, i32, i32, i32, i32, i32, i32)** %2
%5 = load i32, i32* %3
%6 = call double %4(i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 %5)
%7 = fadd double %6, 1.000000e+00
ret double %7
}

LLVM IR (-O2):
define double @f4_cb_send_pre_int_int_int_int_int_int_int(double (i32, i32, i32, i32, i32, i32, i32)* nocapture %0) {
%2 = tail call double %0(i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 44)
%3 = fadd double %2, 1.000000e+00
ret double %3
}
int is_valid_note(int note) { return (note >= 0 && note < 121); }


x86 assembly (clang, -O0):
<is_valid_note>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1120 <is_valid_note+0x20>
cmpl   $0x79,-0x4(%rbp)
setl   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_valid_note>:
xor    %eax,%eax
cmp    $0x79,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @is_valid_note(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 121
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @is_valid_note(i32 %0) {
%2 = icmp ult i32 %0, 121
%3 = zext i1 %2 to i32
ret i32 %3
}
int xmpp_authenticate(const char *authzid, const char *user,
                      const char *secret) {
  return 0;
}


x86 assembly (clang, -O0):
<xmpp_authenticate>:
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):
<xmpp_authenticate>:
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @xmpp_authenticate(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2) {
ret i32 0
}
void arm_mcr2() {}


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

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

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

LLVM IR (-O2):
define void @arm_mcr2() {
ret void
}
const char *Pa_GetVersionText(void) { return "PortAudio V19-devel"; }


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

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

LLVM IR (-O0):
@.str = [20 x i8] c"PortAudio V19-devel\00"
define i8* @Pa_GetVersionText() {
ret i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [20 x i8] c"PortAudio V19-devel\00"
define i8* @Pa_GetVersionText() {
ret i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ getc(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdin;
void fisPause() {
  printf("Hit RETURN to continue ...\n");
  getc(stdin);
}


x86 assembly (clang, -O0):
<fisPause>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2eb1(%rip),%rax
mov    (%rax),%edi
call   1040 <getc@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<fisPause>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    0x2eb4(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1040 <getc@plt>

LLVM IR (-O0):
@.str = [28 x i8] c"Hit RETURN to continue ...\0A\00"
@stdin = global i32 0
define void @fisPause() {
%1 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @stdin
%3 = call i32 @getc(i32 %2)
ret void
}

LLVM IR (-O2):
@stdin = global i32 0
@str = [27 x i8] c"Hit RETURN to continue ...\00"
define void @fisPause() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
%2 = load i32, i32* @stdin
%3 = tail call i32 @getc(i32 %2)
ret void
}
int emac1_atxpausemacctrlframes_set(
    unsigned int dev_id, union emac1_atxpausemacctrlframes_u *value) {
  return 1;
}


x86 assembly (clang, -O0):
<emac1_atxpausemacctrlframes_set>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x1,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%union.emac1_atxpausemacctrlframes_u = type opaque
define i32 @emac1_atxpausemacctrlframes_set(i32 %0, %union.emac1_atxpausemacctrlframes_u* %1) {
%3 = alloca i32
%4 = alloca %union.emac1_atxpausemacctrlframes_u*
store i32 %0, i32* %3
store %union.emac1_atxpausemacctrlframes_u* %1, %union.emac1_atxpausemacctrlframes_u** %4
ret i32 1
}

LLVM IR (-O2):
%union.emac1_atxpausemacctrlframes_u = type opaque
define i32 @emac1_atxpausemacctrlframes_set(i32 %0, %union.emac1_atxpausemacctrlframes_u* nocapture readnone %1) {
ret i32 1
}
/* Variables and functions */
int rand();
int get_rand_in_range(int min, int max) {
  return (rand() % ((max + 1) - min) + min);
}


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

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

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

LLVM IR (-O2):
define i32 @get_rand_in_range(i32 %0, i32 %1) {
%3 = tail call i32 (...) @rand()
%4 = sub i32 1, %0
%5 = add i32 %4, %1
%6 = srem i32 %3, %5
%7 = add nsw i32 %6, %0
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void plan_tests(int n) { printf("1..%d\n", n); }


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

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

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

LLVM IR (-O2):
@.str = [7 x i8] c"1..%d\0A\00"
define void @plan_tests(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
void emit_type_definition_maybe(
    struct processor_explicatory_state *process_state,
    struct modern_stream *stream, void *stream_state,
    struct modern_vfile *vfile, void *vfile_state) {}


x86 assembly (clang, -O0):
<emit_type_definition_maybe>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.processor_explicatory_state = type opaque
%struct.modern_stream = type opaque
%struct.modern_vfile = type opaque
define void @emit_type_definition_maybe(%struct.processor_explicatory_state* %0, %struct.modern_stream* %1, i8* %2, %struct.modern_vfile* %3, i8* %4) {
%6 = alloca %struct.processor_explicatory_state*
%7 = alloca %struct.modern_stream*
%8 = alloca i8*
%9 = alloca %struct.modern_vfile*
%10 = alloca i8*
store %struct.processor_explicatory_state* %0, %struct.processor_explicatory_state** %6
store %struct.modern_stream* %1, %struct.modern_stream** %7
store i8* %2, i8** %8
store %struct.modern_vfile* %3, %struct.modern_vfile** %9
store i8* %4, i8** %10
ret void
}

LLVM IR (-O2):
%struct.processor_explicatory_state = type opaque
%struct.modern_stream = type opaque
%struct.modern_vfile = type opaque
define void @emit_type_definition_maybe(%struct.processor_explicatory_state* nocapture %0, %struct.modern_stream* nocapture %1, i8* nocapture %2, %struct.modern_vfile* nocapture %3, i8* nocapture %4) {
ret void
}
void ScaleARGBRowDownEvenBox_Any_NEON() {}


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

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

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

LLVM IR (-O2):
define void @ScaleARGBRowDownEvenBox_Any_NEON() {
ret void
}
void c_LEVEL4_IRQ(struct c_exception_frame *frame) {}


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

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

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

LLVM IR (-O2):
%struct.c_exception_frame = type opaque
define void @c_LEVEL4_IRQ(%struct.c_exception_frame* nocapture %0) {
ret void
}