xunge/DecIR huggingface dataset:
/* Variables and functions */
int mkstemp(char *);
int /*<<< orphan*/ snprintf(char *, int, char *, int /*<<< orphan*/);
int /*<<< orphan*/ unlink(char *);
int tempfd(void) {
  static int tmpcount;
  int fd;
  char buf[30];
  snprintf(buf, 30, "/tmp/test%d.XXXXXXXX", tmpcount++);
  fd = mkstemp(buf);
  if (fd >= 0)
    unlink(buf);
  return fd;
}


x86 assembly (clang, -O0):
<tempfd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    -0x30(%rbp),%rdi
mov    0x2efa(%rip),%ecx
mov    %ecx,%eax
add    $0x1,%eax
mov    %eax,0x2eef(%rip)
mov    $0x1e,%esi
lea    0xea7(%rip),%rdx
call   1040 <snprintf@plt>
lea    -0x30(%rbp),%rdi
call   1050 <mkstemp@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jl     117d <tempfd+0x4d>
lea    -0x30(%rbp),%rdi
call   1030 <unlink@plt>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tempfd>:
push   %rbx
sub    $0x20,%rsp
mov    0x2f01(%rip),%ecx
lea    0x1(%rcx),%eax
mov    %eax,0x2ef8(%rip)
lea    0xeb5(%rip),%rdx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x1e,%esi
call   1040 <snprintf@plt>
mov    %rbx,%rdi
call   1050 <mkstemp@plt>
mov    %eax,%ebx
test   %eax,%eax
js     1171 <tempfd+0x41>
mov    %rsp,%rdi
call   1030 <unlink@plt>
mov    %ebx,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@tempfd.tmpcount = internal global i32 0
@.str = [21 x i8] c"/tmp/test%d.XXXXXXXX\00"
define i32 @tempfd() {
%1 = alloca i32
%2 = alloca [30 x i8]
%3 = getelementptr inbounds [30 x i8], [30 x i8]* %2, i64 0, i64 0
%4 = load i32, i32* @tempfd.tmpcount
%5 = add nsw i32 %4, 1
store i32 %5, i32* @tempfd.tmpcount
%6 = call i32 @snprintf(i8* %3, i32 30, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %4)
%7 = getelementptr inbounds [30 x i8], [30 x i8]* %2, i64 0, i64 0
%8 = call i32 @mkstemp(i8* %7)
store i32 %8, i32* %1
%9 = load i32, i32* %1
%10 = icmp sge i32 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %0
%12 = getelementptr inbounds [30 x i8], [30 x i8]* %2, i64 0, i64 0
%13 = call i32 @unlink(i8* %12)
br label %14
14: ; preds = %11, %0
%15 = load i32, i32* %1
ret i32 %15
}

LLVM IR (-O2):
@tempfd.tmpcount = internal unnamed_addr global i32 0
@.str = [21 x i8] c"/tmp/test%d.XXXXXXXX\00"
define i32 @tempfd() {
%1 = alloca [30 x i8]
%2 = getelementptr inbounds [30 x i8], [30 x i8]* %1, i64 0, i64 0
%3 = load i32, i32* @tempfd.tmpcount
%4 = add nsw i32 %3, 1
store i32 %4, i32* @tempfd.tmpcount
%5 = call i32 @snprintf(i8* %2, i32 30, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %3)
%6 = call i32 @mkstemp(i8* %2)
%7 = icmp sgt i32 %6, -1
br i1 %7, label %8, label %10
8: ; preds = %0
%9 = call i32 @unlink(i8* %2)
br label %10
10: ; preds = %8, %0
ret i32 %6
}
/* Variables and functions */
scalar_t__ strcmp(char const *, char *);
int is_utf8_encoding(const char *encoding) {
  if ((strcmp(encoding, "UTF-8") == 0))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<is_utf8_encoding>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1142 <is_utf8_encoding+0x32>
movl   $0x1,-0x4(%rbp)
jmp    1149 <is_utf8_encoding+0x39>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_utf8_encoding>:
push   %rax
lea    0xee8(%rip),%rsi
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"UTF-8\00"
define i32 @is_utf8_encoding(i8* %0) {
%2 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
void Swapf(float *x, float *y) {
  float tmp = *x;
  *x = *y;
  *y = tmp;
}


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

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

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

LLVM IR (-O2):
define void @Swapf(float* nocapture %0, float* nocapture %1) {
%3 = load float, float* %0
%4 = load float, float* %1
store float %4, float* %0
store float %3, float* %1
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t hash32mult(uint32_t key) {
  key = (key ^ 61) ^ (key >> 16);
  key = key + (key << 3);
  key = key ^ (key >> 4);
  key = key * 0x27d4eb2d;
  key = key ^ (key >> 15);
  return key;
}


x86 assembly (clang, -O0):
<hash32mult>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
xor    $0x3d,%eax
mov    -0x4(%rbp),%ecx
sar    $0x10,%ecx
xor    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
shl    $0x3,%ecx
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
sar    $0x4,%ecx
xor    %ecx,%eax
mov    %eax,-0x4(%rbp)
imul   $0x27d4eb2d,-0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
sar    $0xf,%ecx
xor    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash32mult>:
mov    %edi,%eax
sar    $0x10,%eax
xor    %edi,%eax
xor    $0x3d,%eax
lea    (%rax,%rax,8),%eax
mov    %eax,%ecx
sar    $0x4,%ecx
xor    %eax,%ecx
imul   $0x27d4eb2d,%ecx,%ecx
mov    %ecx,%eax
sar    $0xf,%eax
xor    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @hash32mult(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = xor i32 %3, 61
%5 = load i32, i32* %2
%6 = ashr i32 %5, 16
%7 = xor i32 %4, %6
store i32 %7, i32* %2
%8 = load i32, i32* %2
%9 = load i32, i32* %2
%10 = shl i32 %9, 3
%11 = add nsw i32 %8, %10
store i32 %11, i32* %2
%12 = load i32, i32* %2
%13 = load i32, i32* %2
%14 = ashr i32 %13, 4
%15 = xor i32 %12, %14
store i32 %15, i32* %2
%16 = load i32, i32* %2
%17 = mul nsw i32 %16, 668265261
store i32 %17, i32* %2
%18 = load i32, i32* %2
%19 = load i32, i32* %2
%20 = ashr i32 %19, 15
%21 = xor i32 %18, %20
store i32 %21, i32* %2
%22 = load i32, i32* %2
ret i32 %22
}

LLVM IR (-O2):
define i32 @hash32mult(i32 %0) {
%2 = ashr i32 %0, 16
%3 = xor i32 %2, %0
%4 = xor i32 %3, 61
%5 = mul i32 %4, 9
%6 = ashr i32 %5, 4
%7 = xor i32 %6, %5
%8 = mul nsw i32 %7, 668265261
%9 = ashr i32 %8, 15
%10 = xor i32 %9, %8
ret i32 %10
}
/* Type definitions */
typedef int /*<<< orphan*/ ASN1_INTEGER;

/* Variables and functions */
int /*<<< orphan*/ *M_ASN1_INTEGER_dup(int /*<<< orphan*/ const *);
ASN1_INTEGER *ASN1_INTEGER_dup(const ASN1_INTEGER *x) {
  return M_ASN1_INTEGER_dup(x);
}


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

x86 assembly (clang, -O2):
<ASN1_INTEGER_dup>:
jmp    1030 <M_ASN1_INTEGER_dup@plt>

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

LLVM IR (-O2):
define i32* @ASN1_INTEGER_dup(i32* %0) {
%2 = tail call i32* @M_ASN1_INTEGER_dup(i32* %0)
ret i32* %2
}
/* Type definitions */
struct timeval {
  scalar_t__ tv_sec;
};

/* Variables and functions */
int h2o_timeval_is_null(struct timeval *tv) { return tv->tv_sec == 0; }


x86 assembly (clang, -O0):
<h2o_timeval_is_null>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<h2o_timeval_is_null>:
xor    %eax,%eax
cmpq   $0x0,(%rdi)
sete   %al
ret

LLVM IR (-O0):
%struct.timeval = type { i64 }
define i32 @h2o_timeval_is_null(%struct.timeval* %0) {
%2 = alloca %struct.timeval*
store %struct.timeval* %0, %struct.timeval** %2
%3 = load %struct.timeval*, %struct.timeval** %2
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i32 0, i32 0
%5 = load i64, i64* %4
%6 = icmp eq i64 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
%struct.timeval = type { i64 }
define i32 @h2o_timeval_is_null(%struct.timeval* nocapture %0) {
%2 = getelementptr inbounds %struct.timeval, %struct.timeval* %0, i64 0, i32 0
%3 = load i64, i64* %2
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int *calloc(int, int);
int /*<<< orphan*/ print_primes(int *, int);
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ sieve(int *, int, int);
int main() {
  int n;
  scanf("%d", &n);
  int *notprime = calloc(n + 1, sizeof(int));
  notprime[0] = notprime[1] = 1;
  sieve(notprime, n, 2);
  print_primes(notprime, n);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1060 <scanf@plt>
mov    -0x8(%rbp),%edi
add    $0x1,%edi
mov    $0x4,%esi
call   1040 <calloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x1,0x4(%rax)
mov    -0x10(%rbp),%rax
movl   $0x1,(%rax)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%esi
mov    $0x2,%edx
call   1050 <sieve@plt>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%esi
call   1030 <print_primes@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xeb5(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1060 <scanf@plt>
mov    0x4(%rsp),%r14d
lea    0x1(%r14),%edi
mov    $0x4,%esi
call   1040 <calloc@plt>
mov    %rax,%rbx
movabs $0x100000001,%rax
mov    %rax,(%rbx)
mov    %rbx,%rdi
mov    %r14d,%esi
mov    $0x2,%edx
call   1050 <sieve@plt>
mov    0x4(%rsp),%esi
mov    %rbx,%rdi
call   1030 <print_primes@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32*
store i32 0, i32* %1
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %2
%6 = add nsw i32 %5, 1
%7 = call i32* @calloc(i32 %6, i32 4)
store i32* %7, i32** %3
%8 = load i32*, i32** %3
%9 = getelementptr inbounds i32, i32* %8, i64 1
store i32 1, i32* %9
%10 = load i32*, i32** %3
%11 = getelementptr inbounds i32, i32* %10, i64 0
store i32 1, i32* %11
%12 = load i32*, i32** %3
%13 = load i32, i32* %2
%14 = call i32 @sieve(i32* %12, i32 %13, i32 2)
%15 = load i32*, i32** %3
%16 = load i32, i32* %2
%17 = call i32 @print_primes(i32* %15, i32 %16)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = add nsw i32 %4, 1
%6 = call i32* @calloc(i32 %5, i32 4)
%7 = getelementptr inbounds i32, i32* %6, i64 1
store i32 1, i32* %7
store i32 1, i32* %6
%8 = call i32 @sieve(i32* %6, i32 %4, i32 2)
%9 = load i32, i32* %1
%10 = call i32 @print_primes(i32* %6, i32 %9)
ret i32 0
}
/* Variables and functions */
int random();
int _sl_random_level(void) {
  int level = 1;
  while ((random() & 0x80) && level < 16)
    ++level;
  return level;
}


x86 assembly (clang, -O0):
<_sl_random_level>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x4(%rbp)
mov    $0x0,%al
call   1030 <random@plt>
mov    %eax,%ecx
and    $0x80,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x5(%rbp)
je     1146 <_sl_random_level+0x36>
cmpl   $0x10,-0x4(%rbp)
setl   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
test   $0x1,%al
jne    1156 <_sl_random_level+0x46>
jmp    1164 <_sl_random_level+0x54>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <_sl_random_level+0xf>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_sl_random_level>:
push   %rbx
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x1,%ebx
xor    %eax,%eax
call   1030 <random@plt>
test   $0x80,%al
je     1133 <_sl_random_level+0x23>
cmp    $0x10,%ebx
jb     1120 <_sl_random_level+0x10>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @_sl_random_level() {
%1 = alloca i32
store i32 1, i32* %1
br label %2
2: ; preds = %11, %0
%3 = call i32 (...) @random()
%4 = and i32 %3, 128
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %2
%7 = load i32, i32* %1
%8 = icmp slt i32 %7, 16
br label %9
9: ; preds = %6, %2
%10 = phi i1 [ false, %2 ], [ %8, %6 ]
br i1 %10, label %11, label %14
11: ; preds = %9
%12 = load i32, i32* %1
%13 = add nsw i32 %12, 1
store i32 %13, i32* %1
br label %2
14: ; preds = %9
%15 = load i32, i32* %1
ret i32 %15
}

LLVM IR (-O2):
define i32 @_sl_random_level() {
br label %1
1: ; preds = %1, %0
%2 = phi i32 [ 1, %0 ], [ %8, %1 ]
%3 = tail call i32 (...) @random()
%4 = and i32 %3, 128
%5 = icmp ne i32 %4, 0
%6 = icmp ult i32 %2, 16
%7 = select i1 %5, i1 %6, i1 false
%8 = add nuw nsw i32 %2, 1
br i1 %7, label %1, label %9
9: ; preds = %1
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalnum(int);
void t_isalnum_0x07() {
  Assert_real((isalnum(7) == 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_isalnum.c",
              40, ("isalnum should be 0 for 0x07"));
}


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

x86 assembly (clang, -O2):
<t_isalnum_0x07>:
push   %rax
mov    $0x7,%edi
call   1030 <isalnum@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x28,%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_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0x07\00"
define void @t_isalnum_0x07() {
%1 = call i64 @isalnum(i32 7)
%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 40, 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_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0x07\00"
define void @t_isalnum_0x07() {
%1 = tail call i64 @isalnum(i32 7)
%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 40, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
unsigned long cache_idx(void *addr) {
  return ((unsigned long)addr >> 12) & (16 - 1);
}


x86 assembly (clang, -O0):
<cache_idx>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shr    $0xc,%rax
and    $0xf,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cache_idx>:
mov    %rdi,%rax
shr    $0xc,%eax
and    $0xf,%eax
ret

LLVM IR (-O0):
define i64 @cache_idx(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = ptrtoint i8* %3 to i64
%5 = lshr i64 %4, 12
%6 = and i64 %5, 15
ret i64 %6
}

LLVM IR (-O2):
define i64 @cache_idx(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = lshr i64 %2, 12
%4 = and i64 %3, 15
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ mf_write_midi_event(int, int, char *, int);
void copy_chanpressure(int chan, int c1) {
  char data[1];
  data[0] = (char)c1;
  mf_write_midi_event(0xd0, chan, data, 1);
}


x86 assembly (clang, -O0):
<copy_chanpressure>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %al,-0x9(%rbp)
mov    -0x4(%rbp),%esi
lea    -0x9(%rbp),%rdx
mov    $0xd0,%edi
mov    $0x1,%ecx
call   1030 <mf_write_midi_event@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_chanpressure>:
push   %rax
mov    %edi,%eax
mov    %sil,0x7(%rsp)
lea    0x7(%rsp),%rdx
mov    $0xd0,%edi
mov    %eax,%esi
mov    $0x1,%ecx
call   1030 <mf_write_midi_event@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @copy_chanpressure(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca [1 x i8]
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = trunc i32 %6 to i8
%8 = getelementptr inbounds [1 x i8], [1 x i8]* %5, i64 0, i64 0
store i8 %7, i8* %8
%9 = load i32, i32* %3
%10 = getelementptr inbounds [1 x i8], [1 x i8]* %5, i64 0, i64 0
%11 = call i32 @mf_write_midi_event(i32 208, i32 %9, i8* %10, i32 1)
ret void
}

LLVM IR (-O2):
define void @copy_chanpressure(i32 %0, i32 %1) {
%3 = alloca [1 x i8]
%4 = getelementptr inbounds [1 x i8], [1 x i8]* %3, i64 0, i64 0
%5 = trunc i32 %1 to i8
store i8 %5, i8* %4
%6 = call i32 @mf_write_midi_event(i32 208, i32 %0, i8* %4, i32 1)
ret void
}
void null_test_success(void **state) { (void)state; }


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

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

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

LLVM IR (-O2):
define void @null_test_success(i8** nocapture %0) {
ret void
}
double UC_11_1_1(double F_c_s_d, double F_c_u_d) { return (F_c_s_d / F_c_u_d); }


x86 assembly (clang, -O0):
<UC_11_1_1>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<UC_11_1_1>:
divsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @UC_11_1_1(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 = fdiv double %5, %6
ret double %7
}

LLVM IR (-O2):
define double @UC_11_1_1(double %0, double %1) {
%3 = fdiv double %0, %1
ret double %3
}
/* Variables and functions */
int SIGINT;
int SIGTERM;
int /*<<< orphan*/ printf(char *, int);
void sig_handle(int signo) {
  if (signo == SIGINT) {
    printf("recv sig SIGINT(%d)\n", SIGINT);
  } else if (signo == SIGTERM) {
    printf("recv sig SIGTERM(%d)\n", SIGTERM);
  }
}


x86 assembly (clang, -O0):
<sig_handle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2ec3(%rip),%rcx
cmp    (%rcx),%eax
jne    1147 <sig_handle+0x37>
mov    0x2eb4(%rip),%rax
mov    (%rax),%esi
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
jmp    1173 <sig_handle+0x63>
mov    -0x4(%rbp),%eax
mov    0x2e8f(%rip),%rcx
cmp    (%rcx),%eax
jne    116e <sig_handle+0x5e>
mov    0x2e80(%rip),%rax
mov    (%rax),%esi
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
jmp    1173 <sig_handle+0x63>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sig_handle>:
mov    %edi,%esi
mov    0x2ecf(%rip),%rax
cmp    %edi,(%rax)
jne    1129 <sig_handle+0x19>
lea    0xedc(%rip),%rdi
jmp    1030 <printf@plt>
mov    0x2eb0(%rip),%rax
cmp    %esi,(%rax)
jne    1140 <sig_handle+0x30>
lea    0xeda(%rip),%rdi
jmp    1030 <printf@plt>
ret

LLVM IR (-O0):
@SIGINT = global i32 0
@.str = [21 x i8] c"recv sig SIGINT(%d)\0A\00"
@SIGTERM = global i32 0
@.str.1 = [22 x i8] c"recv sig SIGTERM(%d)\0A\00"
define void @sig_handle(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @SIGINT
%5 = icmp eq i32 %3, %4
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* @SIGINT
%8 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %7)
br label %17
9: ; preds = %1
%10 = load i32, i32* %2
%11 = load i32, i32* @SIGTERM
%12 = icmp eq i32 %10, %11
br i1 %12, label %13, label %16
13: ; preds = %9
%14 = load i32, i32* @SIGTERM
%15 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %14)
br label %16
16: ; preds = %13, %9
br label %17
17: ; preds = %16, %6
ret void
}

LLVM IR (-O2):
@SIGINT = global i32 0
@.str = [21 x i8] c"recv sig SIGINT(%d)\0A\00"
@SIGTERM = global i32 0
@.str.1 = [22 x i8] c"recv sig SIGTERM(%d)\0A\00"
define void @sig_handle(i32 %0) {
%2 = load i32, i32* @SIGINT
%3 = icmp eq i32 %2, %0
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = load i32, i32* @SIGTERM
%6 = icmp eq i32 %5, %0
br i1 %6, label %7, label %10
7: ; preds = %4, %1
%8 = phi i8* [ getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), %1 ], [ getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), %4 ]
%9 = tail call i32 @printf(i8* %8, i32 %0)
br label %10
10: ; preds = %7, %4
ret void
}
double get_global_improvement(double original_process_time,
                              double improved_process_time) {
  return original_process_time / improved_process_time;
}


x86 assembly (clang, -O0):
<get_global_improvement>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_global_improvement>:
divsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @get_global_improvement(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 = fdiv double %5, %6
ret double %7
}

LLVM IR (-O2):
define double @get_global_improvement(double %0, double %1) {
%3 = fdiv double %0, %1
ret double %3
}
unsigned int decode32(unsigned char **data) {
  unsigned int value = 0;
  value = (*data)[0];
  value = (value << 8) + (*data)[1];
  value = (value << 8) + (*data)[2];
  value = (value << 8) + (*data)[3];
  *data += 4;
  return value;
}


x86 assembly (clang, -O0):
<decode32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movzbl (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
mov    (%rcx),%rcx
movzbl 0x1(%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
mov    (%rcx),%rcx
movzbl 0x2(%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
mov    (%rcx),%rcx
movzbl 0x3(%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x4,%rcx
mov    %rcx,(%rax)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<decode32>:
mov    (%rdi),%rcx
mov    (%rcx),%eax
bswap  %eax
add    $0x4,%rcx
mov    %rcx,(%rdi)
ret

LLVM IR (-O0):
define i32 @decode32(i8** %0) {
%2 = alloca i8**
%3 = alloca i32
store i8** %0, i8*** %2
store i32 0, i32* %3
%4 = load i8**, i8*** %2
%5 = load i8*, i8** %4
%6 = getelementptr inbounds i8, i8* %5, i64 0
%7 = load i8, i8* %6
%8 = zext i8 %7 to i32
store i32 %8, i32* %3
%9 = load i32, i32* %3
%10 = shl i32 %9, 8
%11 = load i8**, i8*** %2
%12 = load i8*, i8** %11
%13 = getelementptr inbounds i8, i8* %12, i64 1
%14 = load i8, i8* %13
%15 = zext i8 %14 to i32
%16 = add i32 %10, %15
store i32 %16, i32* %3
%17 = load i32, i32* %3
%18 = shl i32 %17, 8
%19 = load i8**, i8*** %2
%20 = load i8*, i8** %19
%21 = getelementptr inbounds i8, i8* %20, i64 2
%22 = load i8, i8* %21
%23 = zext i8 %22 to i32
%24 = add i32 %18, %23
store i32 %24, i32* %3
%25 = load i32, i32* %3
%26 = shl i32 %25, 8
%27 = load i8**, i8*** %2
%28 = load i8*, i8** %27
%29 = getelementptr inbounds i8, i8* %28, i64 3
%30 = load i8, i8* %29
%31 = zext i8 %30 to i32
%32 = add i32 %26, %31
store i32 %32, i32* %3
%33 = load i8**, i8*** %2
%34 = load i8*, i8** %33
%35 = getelementptr inbounds i8, i8* %34, i64 4
store i8* %35, i8** %33
%36 = load i32, i32* %3
ret i32 %36
}

LLVM IR (-O2):
define i32 @decode32(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = getelementptr inbounds i8, i8* %2, i64 1
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
%8 = shl nuw nsw i32 %4, 16
%9 = shl nuw nsw i32 %7, 8
%10 = or i32 %9, %8
%11 = getelementptr inbounds i8, i8* %2, i64 2
%12 = load i8, i8* %11
%13 = zext i8 %12 to i32
%14 = or i32 %10, %13
%15 = shl nuw i32 %14, 8
%16 = getelementptr inbounds i8, i8* %2, i64 3
%17 = load i8, i8* %16
%18 = zext i8 %17 to i32
%19 = or i32 %15, %18
%20 = getelementptr inbounds i8, i8* %2, i64 4
store i8* %20, i8** %0
ret i32 %19
}
/* Variables and functions */
double sqrt(double);
double dladt(double a, double omegam, double omegav) {
  double eta;
  eta = sqrt(omegam / a + omegav * a * a + 1.0 - omegam - omegav);
  return a * eta;
}


x86 assembly (clang, -O0):
<dladt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm1
divsd  -0x8(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xeb0(%rip),%xmm1
addsd  %xmm1,%xmm0
subsd  -0x10(%rbp),%xmm0
subsd  -0x18(%rbp),%xmm0
call   1030 <sqrt@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dladt>:
push   %rax
movapd %xmm0,%xmm4
movapd %xmm1,%xmm3
divsd  %xmm0,%xmm3
mulsd  %xmm2,%xmm0
mulsd  %xmm4,%xmm0
addsd  %xmm3,%xmm0
addsd  0xecf(%rip),%xmm0
subsd  %xmm1,%xmm0
subsd  %xmm2,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1149 <dladt+0x39>
sqrtsd %xmm0,%xmm0
jmp    1158 <dladt+0x48>
movsd  %xmm4,(%rsp)
call   1030 <sqrt@plt>
movsd  (%rsp),%xmm4
mulsd  %xmm4,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @dladt(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%8 = load double, double* %5
%9 = load double, double* %4
%10 = fdiv double %8, %9
%11 = load double, double* %6
%12 = load double, double* %4
%13 = fmul double %11, %12
%14 = load double, double* %4
%15 = call double @llvm.fmuladd.f64(double %13, double %14, double %10)
%16 = fadd double %15, 1.000000e+00
%17 = load double, double* %5
%18 = fsub double %16, %17
%19 = load double, double* %6
%20 = fsub double %18, %19
%21 = call double @sqrt(double %20)
store double %21, double* %7
%22 = load double, double* %4
%23 = load double, double* %7
%24 = fmul double %22, %23
ret double %24
}

LLVM IR (-O2):
define double @dladt(double %0, double %1, double %2) {
%4 = fdiv double %1, %0
%5 = fmul double %0, %2
%6 = tail call double @llvm.fmuladd.f64(double %5, double %0, double %4)
%7 = fadd double %6, 1.000000e+00
%8 = fsub double %7, %1
%9 = fsub double %8, %2
%10 = tail call double @sqrt(double %9)
%11 = fmul double %10, %0
ret double %11
}
/* Variables and functions */
scalar_t__ isdigit(char);
int isdigit16(char c) {
  if (isdigit(c))
    return 1;
  if (c >= 'a' && c <= 'f')
    return 1;
  if (c >= 'A' && c <= 'F')
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<isdigit16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     113d <isdigit16+0x2d>
movl   $0x1,-0x4(%rbp)
jmp    1190 <isdigit16+0x80>
movsbl -0x5(%rbp),%eax
cmp    $0x61,%eax
jl     1163 <isdigit16+0x53>
movsbl -0x5(%rbp),%eax
cmp    $0x66,%eax
jg     1163 <isdigit16+0x53>
movl   $0x1,-0x4(%rbp)
jmp    1190 <isdigit16+0x80>
movsbl -0x5(%rbp),%eax
cmp    $0x41,%eax
jl     1189 <isdigit16+0x79>
movsbl -0x5(%rbp),%eax
cmp    $0x46,%eax
jg     1189 <isdigit16+0x79>
movl   $0x1,-0x4(%rbp)
jmp    1190 <isdigit16+0x80>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isdigit16>:
push   %rbx
mov    %edi,%ebx
call   1030 <isdigit@plt>
test   %rax,%rax
setne  %al
and    $0xdf,%bl
add    $0xbf,%bl
cmp    $0x6,%bl
setb   %cl
or     %al,%cl
movzbl %cl,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @isdigit16(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = call i64 @isdigit(i8 signext %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 1, i32* %2
br label %27
8: ; preds = %1
%9 = load i8, i8* %3
%10 = sext i8 %9 to i32
%11 = icmp sge i32 %10, 97
br i1 %11, label %12, label %17
12: ; preds = %8
%13 = load i8, i8* %3
%14 = sext i8 %13 to i32
%15 = icmp sle i32 %14, 102
br i1 %15, label %16, label %17
16: ; preds = %12
store i32 1, i32* %2
br label %27
17: ; preds = %12, %8
%18 = load i8, i8* %3
%19 = sext i8 %18 to i32
%20 = icmp sge i32 %19, 65
br i1 %20, label %21, label %26
21: ; preds = %17
%22 = load i8, i8* %3
%23 = sext i8 %22 to i32
%24 = icmp sle i32 %23, 70
br i1 %24, label %25, label %26
25: ; preds = %21
store i32 1, i32* %2
br label %27
26: ; preds = %21, %17
store i32 0, i32* %2
br label %27
27: ; preds = %26, %25, %16, %7
%28 = load i32, i32* %2
ret i32 %28
}

LLVM IR (-O2):
define i32 @isdigit16(i8 signext %0) {
%2 = tail call i64 @isdigit(i8 signext %0)
%3 = icmp ne i64 %2, 0
%4 = and i8 %0, -33
%5 = add i8 %4, -65
%6 = icmp ult i8 %5, 6
%7 = or i1 %6, %3
%8 = zext i1 %7 to i32
ret i32 %8
}
double SFMLBSToKG(double lbs) { return (lbs * 0.453592); }


x86 assembly (clang, -O0):
<SFMLBSToKG>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define double @SFMLBSToKG(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double %3, 4.535920e-01
ret double %4
}

LLVM IR (-O2):
define double @SFMLBSToKG(double %0) {
%2 = fmul double %0, 4.535920e-01
ret double %2
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
long dll_ftell(int /*<<< orphan*/ *);
long __wrap_ftell(FILE *stream) { return dll_ftell(stream); }


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

x86 assembly (clang, -O2):
<__wrap_ftell>:
jmp    1030 <dll_ftell@plt>

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

LLVM IR (-O2):
define i64 @__wrap_ftell(i32* %0) {
%2 = tail call i64 @dll_ftell(i32* %0)
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void version(void) {
  printf(" CMatrix version %s by Chris Allegretta (compiled %s, %s)\n", "1.1b",
         "07:30:48", "Mar 17 2022");
  printf(" Email: cmatrix@asty.org  Web: http://www.asty.org/cmatrix\n");
}


x86 assembly (clang, -O0):
<version>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xf19(%rip),%rsi
lea    0xf17(%rip),%rdx
lea    0xf19(%rip),%rcx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf17(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<version>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xf0c(%rip),%rsi
lea    0xf0a(%rip),%rdx
lea    0xf0c(%rip),%rcx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf0a(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [59 x i8] c" CMatrix version %s by Chris Allegretta (compiled %s, %s)\0A\00"
@.str.1 = [5 x i8] c"1.1b\00"
@.str.2 = [9 x i8] c"07:30:48\00"
@.str.3 = [12 x i8] c"Mar 17 2022\00"
@.str.4 = [60 x i8] c" Email: cmatrix@asty.org Web: http://www.asty.org/cmatrix\0A\00"
define void @version() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0))
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.4, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [59 x i8] c" CMatrix version %s by Chris Allegretta (compiled %s, %s)\0A\00"
@.str.1 = [5 x i8] c"1.1b\00"
@.str.2 = [9 x i8] c"07:30:48\00"
@.str.3 = [12 x i8] c"Mar 17 2022\00"
@str = [59 x i8] c" Email: cmatrix@asty.org Web: http://www.asty.org/cmatrix\00"
define void @version() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
unsigned char _mm_aesenc256kl_u8(int /*<<< orphan*/ *, int /*<<< orphan*/,
                                 void const *);
unsigned char test_mm_aesenc256kl_u8(__m128i *odata, __m128i idata,
                                     const void *h) {
  return _mm_aesenc256kl_u8(odata, idata, h);
}


x86 assembly (clang, -O0):
<test_mm_aesenc256kl_u8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
call   1030 <_mm_aesenc256kl_u8@plt>
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_mm_aesenc256kl_u8>:
jmp    1030 <_mm_aesenc256kl_u8@plt>

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

LLVM IR (-O2):
define zeroext i8 @test_mm_aesenc256kl_u8(i32* %0, i32 %1, i8* %2) {
%4 = tail call zeroext i8 @_mm_aesenc256kl_u8(i32* %0, i32 %1, i8* %2)
ret i8 %4
}
/* Variables and functions */
int /*<<< orphan*/ comparacao_modulo_test();
int /*<<< orphan*/ comparacao_test();
int main(int argc, char *argv[]) {
  comparacao_test();
  comparacao_modulo_test();
  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)
mov    $0x0,%al
call   1040 <comparacao_test@plt>
mov    $0x0,%al
call   1030 <comparacao_modulo_test@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <comparacao_test@plt>
xor    %eax,%eax
call   1030 <comparacao_modulo_test@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**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @comparacao_test()
%7 = call i32 (...) @comparacao_modulo_test()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @comparacao_test()
%4 = tail call i32 (...) @comparacao_modulo_test()
ret i32 0
}
/* Variables and functions */
int strlen(char *);
void strip_newline(char *s) {
  int len = strlen(s);
  if (s[len - 1] == '\n')
    s[len - 1] = '\0';
}


x86 assembly (clang, -O0):
<strip_newline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0xa,%eax
jne    1153 <strip_newline+0x43>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strip_newline>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
cltq
cmpb   $0xa,-0x1(%rax,%rbx,1)
jne    1127 <strip_newline+0x17>
movb   $0x0,-0x1(%rbx,%rax,1)
pop    %rbx
ret

LLVM IR (-O0):
define void @strip_newline(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strlen(i8* %4)
store i32 %5, i32* %3
%6 = load i8*, i8** %2
%7 = load i32, i32* %3
%8 = sub nsw i32 %7, 1
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i8, i8* %6, i64 %9
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 10
br i1 %13, label %14, label %20
14: ; preds = %1
%15 = load i8*, i8** %2
%16 = load i32, i32* %3
%17 = sub nsw i32 %16, 1
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i8, i8* %15, i64 %18
store i8 0, i8* %19
br label %20
20: ; preds = %14, %1
ret void
}

LLVM IR (-O2):
define void @strip_newline(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add nsw i32 %2, -1
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 10
br i1 %7, label %8, label %9
8: ; preds = %1
store i8 0, i8* %5
br label %9
9: ; preds = %8, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ handle_ILL(int /*<<< orphan*/);
int gen_ILL() { handle_ILL(0); }


x86 assembly (clang, -O0):
<gen_ILL>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %edi,%edi
call   1030 <handle_ILL@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gen_ILL>:
xor    %edi,%edi
jmp    1030 <handle_ILL@plt>

LLVM IR (-O0):
define i32 @gen_ILL() {
%1 = alloca i32
%2 = call i32 @handle_ILL(i32 0)
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @gen_ILL() {
%1 = tail call i32 @handle_ILL(i32 0)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ G();
int /*<<< orphan*/ T();
int /*<<< orphan*/ print_ln(char *);
void E() {
  print_ln("E->TG");
  T();
  G();
}


x86 assembly (clang, -O0):
<E>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
call   1040 <print_ln@plt>
mov    $0x0,%al
call   1030 <T@plt>
mov    $0x0,%al
call   1050 <G@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<E>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <print_ln@plt>
xor    %eax,%eax
call   1030 <T@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <G@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"E->TG\00"
define void @E() {
%1 = call i32 @print_ln(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @T()
%3 = call i32 (...) @G()
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"E->TG\00"
define void @E() {
%1 = tail call i32 @print_ln(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @T()
%3 = tail call i32 (...) @G()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void print_version() {
  fprintf(stderr,
          "DepQBF 4.0\n"
          "Copyright 2010, 2011, 2012, 2013, 2014, 2015 Florian Lonsing,\n"
          "  Johannes Kepler University, Linz, Austria and\n"
          "  Vienna University of Technology, Vienna, Austria.\n"
          "Copyright 2012 Aina Niemetz, "
          "Johannes Kepler University, Linz, Austria.\n"
          "This is free software; see COPYING for copying conditions.\n"
          "There is NO WARRANTY, to the extent permitted by law.\n");
}


x86 assembly (clang, -O0):
<print_version>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_version>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [359 x i8] c"DepQBF 4.0\0ACopyright 2010, 2011, 2012, 2013, 2014, 2015 Florian Lonsing,\0A Johannes Kepler University, Linz, Austria and\0A Vienna University of Technology, Vienna, Austria.\0ACopyright 2012 Aina Niemetz, Johannes Kepler University, Linz, Austria.\0AThis is free software; see COPYING for copying conditions.\0AThere is NO WARRANTY, to the extent permitted by law.\0A\00"
define void @print_version() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([359 x i8], [359 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [359 x i8] c"DepQBF 4.0\0ACopyright 2010, 2011, 2012, 2013, 2014, 2015 Florian Lonsing,\0A Johannes Kepler University, Linz, Austria and\0A Vienna University of Technology, Vienna, Austria.\0ACopyright 2012 Aina Niemetz, Johannes Kepler University, Linz, Austria.\0AThis is free software; see COPYING for copying conditions.\0AThere is NO WARRANTY, to the extent permitted by law.\0A\00"
define void @print_version() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([359 x i8], [359 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ put8(int);
void mov_reg64_reg64(unsigned int reg1, unsigned int reg2) {
  if (reg1 == reg2)
    return;
  put8(0x48);
  put8(0x89);
  put8(0xC0 | (reg2 << 3) | reg1);
}


x86 assembly (clang, -O0):
<mov_reg64_reg64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    112f <mov_reg64_reg64+0x1f>
jmp    1157 <mov_reg64_reg64+0x47>
mov    $0x48,%edi
call   1030 <put8@plt>
mov    $0x89,%edi
call   1030 <put8@plt>
mov    -0x8(%rbp),%edi
shl    $0x3,%edi
or     $0xc0,%edi
or     -0x4(%rbp),%edi
call   1030 <put8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mov_reg64_reg64>:
cmp    %esi,%edi
jne    1115 <mov_reg64_reg64+0x5>
ret
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    $0x48,%edi
call   1030 <put8@plt>
mov    $0x89,%edi
call   1030 <put8@plt>
shl    $0x3,%ebx
or     %ebp,%ebx
or     $0xc0,%ebx
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <put8@plt>

LLVM IR (-O0):
define void @mov_reg64_reg64(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = icmp eq i32 %5, %6
br i1 %7, label %8, label %9
8: ; preds = %2
br label %18
9: ; preds = %2
%10 = call i32 @put8(i32 72)
%11 = call i32 @put8(i32 137)
%12 = load i32, i32* %4
%13 = shl i32 %12, 3
%14 = or i32 192, %13
%15 = load i32, i32* %3
%16 = or i32 %14, %15
%17 = call i32 @put8(i32 %16)
br label %18
18: ; preds = %9, %8
ret void
}

LLVM IR (-O2):
define void @mov_reg64_reg64(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, %1
br i1 %3, label %11, label %4
4: ; preds = %2
%5 = tail call i32 @put8(i32 72)
%6 = tail call i32 @put8(i32 137)
%7 = shl i32 %1, 3
%8 = or i32 %7, %0
%9 = or i32 %8, 192
%10 = tail call i32 @put8(i32 %9)
br label %11
11: ; preds = %2, %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, float *);
int main(int argc, const char *argv[]) {
  float n, Res;
  printf("Please enter a number: ");
  scanf("%f", &n);
  Res = 1 / n;
  printf("The Result is: %f\n", Res);
  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)
lea    0xec7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed1(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1040 <scanf@plt>
movss  0xea4(%rip),%xmm0
divss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xea9(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xedc(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee6(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
movss  0xeb8(%rip),%xmm0
divss  0x4(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xec6(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"Please enter a number: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [19 x i8] c"The Result is: %f\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca float
%7 = alloca float
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %6)
%10 = load float, float* %6
%11 = fdiv float 1.000000e+00, %10
store float %11, float* %7
%12 = load float, float* %7
%13 = fpext float %12 to double
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), double %13)
ret i32 0
}

LLVM IR (-O2):
@.str = [24 x i8] c"Please enter a number: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [19 x i8] c"The Result is: %f\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca float
%4 = bitcast float* %3 to i8*
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %3)
%7 = load float, float* %3
%8 = fdiv float 1.000000e+00, %7
%9 = fpext float %8 to double
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), double %9)
ret i32 0
}