xunge/DecIR huggingface dataset:
int agypt(int x, int y) {
  int E = 0;
  while (x > 1) {
    if (x % 2 != 0) {
      E = E + y;
    }
    y = y + y;
    x = x / 2;
  }
  return E;
}


x86 assembly (clang, -O0):
<agypt>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x1,-0x4(%rbp)
jle    1154 <agypt+0x54>
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     1138 <agypt+0x38>
mov    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
jmp    1111 <agypt+0x11>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<agypt>:
xor    %eax,%eax
cmp    $0x2,%edi
jl     1126 <agypt+0x26>
xor    %eax,%eax
mov    %edi,%ecx
nopl   0x0(%rax,%rax,1)
mov    %edi,%edx
and    $0x1,%edx
neg    %edx
and    %esi,%edx
add    %edx,%eax
add    %esi,%esi
shr    %ecx
cmp    $0x3,%edi
mov    %ecx,%edi
ja     1110 <agypt+0x10>
ret

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

LLVM IR (-O2):
define i32 @agypt(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %15
4: ; preds = %2, %4
%5 = phi i32 [ %11, %4 ], [ 0, %2 ]
%6 = phi i32 [ %12, %4 ], [ %1, %2 ]
%7 = phi i32 [ %13, %4 ], [ %0, %2 ]
%8 = and i32 %7, 1
%9 = icmp eq i32 %8, 0
%10 = select i1 %9, i32 0, i32 %6
%11 = add nsw i32 %10, %5
%12 = shl nsw i32 %6, 1
%13 = lshr i32 %7, 1
%14 = icmp ugt i32 %7, 3
br i1 %14, label %4, label %15
15: ; preds = %4, %2
%16 = phi i32 [ 0, %2 ], [ %11, %4 ]
ret i32 %16
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, char *, size_t);
size_t j64_estr_encode(char *buf, size_t len) {
  len = ((len) < (2) ? (len) : (2));
  memcpy(buf, "\"\"", len);
  return len;
}


x86 assembly (clang, -O0):
<j64_estr_encode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x2,-0x10(%rbp)
jae    1138 <j64_estr_encode+0x28>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    1146 <j64_estr_encode+0x36>
mov    $0x2,%eax
mov    %rax,-0x18(%rbp)
jmp    1146 <j64_estr_encode+0x36>
mov    -0x18(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xea3(%rip),%rsi
call   1030 <memcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<j64_estr_encode>:
push   %rbx
cmp    $0x2,%rsi
mov    $0x2,%ebx
cmovb  %rsi,%rbx
lea    0xedb(%rip),%rsi
mov    %rbx,%rdx
call   1030 <memcpy@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"\22\22\00"
define i64 @j64_estr_encode(i8* %0, i64 %1) {
%3 = icmp ult i64 %1, 2
%4 = select i1 %3, i64 %1, i64 2
%5 = tail call i32 @memcpy(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i64 %4)
ret i64 %4
}
/* Variables and functions */
int rand();
int /*<<< orphan*/ sleep(int);
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/);
long currentPrice(char *symbol) {
  srand(time(0));
  sleep(5);
  if (rand() % 100 > 80) {
    return -1;
  }
  return 42 + (rand() % 24);
}


x86 assembly (clang, -O0):
<currentPrice>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
mov    $0x5,%edi
call   1050 <sleep@plt>
mov    $0x0,%al
call   1060 <rand@plt>
mov    $0x64,%ecx
cltd
idiv   %ecx
cmp    $0x50,%edx
jle    1189 <currentPrice+0x49>
movq   $0xffffffffffffffff,-0x8(%rbp)
ff
jmp    11a2 <currentPrice+0x62>
mov    $0x0,%al
call   1060 <rand@plt>
mov    $0x18,%ecx
cltd
idiv   %ecx
add    $0x2a,%edx
movslq %edx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<currentPrice>:
push   %rax
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
mov    $0x5,%edi
call   1050 <sleep@plt>
xor    %eax,%eax
call   1060 <rand@plt>
movslq %eax,%rcx
imul   $0x51eb851f,%rcx,%rax
mov    %rax,%rdx
shr    $0x3f,%rdx
sar    $0x25,%rax
add    %edx,%eax
imul   $0x64,%eax,%eax
sub    %eax,%ecx
mov    $0xffffffffffffffff,%rax
cmp    $0x50,%ecx
jg     11b2 <currentPrice+0x72>
xor    %eax,%eax
call   1060 <rand@plt>
cltq
imul   $0x2aaaaaab,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x22,%rcx
add    %edx,%ecx
shl    $0x3,%ecx
lea    (%rcx,%rcx,2),%ecx
neg    %ecx
add    %ecx,%eax
add    $0x2a,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @currentPrice(i8* %0) {
%2 = alloca i64
%3 = alloca i8*
store i8* %0, i8** %3
%4 = call i32 @time(i32 0)
%5 = call i32 @srand(i32 %4)
%6 = call i32 @sleep(i32 5)
%7 = call i32 (...) @rand()
%8 = srem i32 %7, 100
%9 = icmp sgt i32 %8, 80
br i1 %9, label %10, label %11
10: ; preds = %1
store i64 -1, i64* %2
br label %16
11: ; preds = %1
%12 = call i32 (...) @rand()
%13 = srem i32 %12, 24
%14 = add nsw i32 42, %13
%15 = sext i32 %14 to i64
store i64 %15, i64* %2
br label %16
16: ; preds = %11, %10
%17 = load i64, i64* %2
ret i64 %17
}

LLVM IR (-O2):
define i64 @currentPrice(i8* nocapture readnone %0) {
%2 = tail call i32 @time(i32 0)
%3 = tail call i32 @srand(i32 %2)
%4 = tail call i32 @sleep(i32 5)
%5 = tail call i32 (...) @rand()
%6 = srem i32 %5, 100
%7 = icmp sgt i32 %6, 80
br i1 %7, label %13, label %8
8: ; preds = %1
%9 = tail call i32 (...) @rand()
%10 = srem i32 %9, 24
%11 = add nsw i32 %10, 42
%12 = zext i32 %11 to i64
br label %13
13: ; preds = %1, %8
%14 = phi i64 [ %12, %8 ], [ -1, %1 ]
ret i64 %14
}
/* Variables and functions */
int tor_memcmp(char const *, char const *, int);
int _compare_digests256(const void **_a, const void **_b) {
  return tor_memcmp((const char *)*_a, (const char *)*_b, 32);
}


x86 assembly (clang, -O0):
<_compare_digests256>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
mov    $0x20,%edx
call   1030 <tor_memcmp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_compare_digests256>:
mov    (%rdi),%rdi
mov    (%rsi),%rsi
mov    $0x20,%edx
jmp    1030 <tor_memcmp@plt>

LLVM IR (-O0):
define i32 @_compare_digests256(i8** %0, i8** %1) {
%3 = alloca i8**
%4 = alloca i8**
store i8** %0, i8*** %3
store i8** %1, i8*** %4
%5 = load i8**, i8*** %3
%6 = load i8*, i8** %5
%7 = load i8**, i8*** %4
%8 = load i8*, i8** %7
%9 = call i32 @tor_memcmp(i8* %6, i8* %8, i32 32)
ret i32 %9
}

LLVM IR (-O2):
define i32 @_compare_digests256(i8** nocapture %0, i8** nocapture %1) {
%3 = load i8*, i8** %0
%4 = load i8*, i8** %1
%5 = tail call i32 @tor_memcmp(i8* %3, i8* %4, i32 32)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ my_hold(int *);
int *my_malloc(int);
int *af5() {
  int *p = my_malloc(12);
  my_hold(p);
  return p;
}


x86 assembly (clang, -O0):
<af5>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xc,%edi
call   1030 <my_malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <my_hold@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<af5>:
push   %rbx
mov    $0xc,%edi
call   1030 <my_malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <my_hold@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i32* @af5() {
%1 = alloca i32*
%2 = call i32* @my_malloc(i32 12)
store i32* %2, i32** %1
%3 = load i32*, i32** %1
%4 = call i32 @my_hold(i32* %3)
%5 = load i32*, i32** %1
ret i32* %5
}

LLVM IR (-O2):
define i32* @af5() {
%1 = tail call i32* @my_malloc(i32 12)
%2 = tail call i32 @my_hold(i32* %1)
ret i32* %1
}
int decrypt(int n) { return -n; }


x86 assembly (clang, -O0):
<decrypt>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
sub    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @decrypt(i32 %0) {
%2 = sub nsw i32 0, %0
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ key;

/* Variables and functions */
int /*<<< orphan*/ snprintf(char *, int, char *, char const *);
char const *spx_php_global_array_get(char *, char *);
const char *source_handler_http_header(const char *parameter) {
  char key[128];
  snprintf(key, sizeof(key), "HTTP_%s", parameter);
  return spx_php_global_array_get("_SERVER", key);
}


x86 assembly (clang, -O0):
<source_handler_http_header>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x90(%rbp),%rdi
mov    -0x8(%rbp),%rcx
mov    $0x80,%esi
lea    0xeba(%rip),%rdx
call   1030 <snprintf@plt>
lea    -0x90(%rbp),%rsi
lea    0xeaf(%rip),%rdi
call   1040 <spx_php_global_array_get@plt>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<source_handler_http_header>:
push   %rbx
sub    $0x80,%rsp
mov    %rdi,%rcx
lea    0xece(%rip),%rdx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x80,%esi
call   1030 <snprintf@plt>
lea    0xebf(%rip),%rdi
mov    %rbx,%rsi
call   1040 <spx_php_global_array_get@plt>
add    $0x80,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [8 x i8] c"HTTP_%s\00"
@.str.1 = [8 x i8] c"_SERVER\00"
define i8* @source_handler_http_header(i8* %0) {
%2 = alloca [128 x i8]
%3 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 0
%4 = call i32 @snprintf(i8* %3, i32 128, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = call i8* @spx_php_global_array_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* %3)
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ HiveX_motor_setDirection(int, int);
void moveBack() {
  HiveX_motor_setDirection(0, 1);
  HiveX_motor_setDirection(1, 1);
}


x86 assembly (clang, -O0):
<moveBack>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
mov    $0x1,%esi
call   1030 <HiveX_motor_setDirection@plt>
mov    $0x1,%esi
mov    %esi,%edi
call   1030 <HiveX_motor_setDirection@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<moveBack>:
push   %rax
xor    %edi,%edi
mov    $0x1,%esi
call   1030 <HiveX_motor_setDirection@plt>
mov    $0x1,%edi
mov    $0x1,%esi
pop    %rax
jmp    1030 <HiveX_motor_setDirection@plt>

LLVM IR (-O0):
define void @moveBack() {
%1 = call i32 @HiveX_motor_setDirection(i32 0, i32 1)
%2 = call i32 @HiveX_motor_setDirection(i32 1, i32 1)
ret void
}

LLVM IR (-O2):
define void @moveBack() {
%1 = tail call i32 @HiveX_motor_setDirection(i32 0, i32 1)
%2 = tail call i32 @HiveX_motor_setDirection(i32 1, i32 1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ key_t;

/* Variables and functions */
int IPC_CREAT;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ init_sem(int, int);
int /*<<< orphan*/ perror(char *);
int semget(int /*<<< orphan*/, int, int);
int creat_sem(key_t key) {
  int sem_id;
  if ((sem_id = semget(key, 1, IPC_CREAT | 0666)) == -1) {
    perror("semget error");
    exit(-1);
  }
  init_sem(sem_id, 1);
  return sem_id;
}


x86 assembly (clang, -O0):
<creat_sem>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2e8b(%rip),%rax
mov    (%rax),%edx
or     $0x1b6,%edx
mov    $0x1,%esi
call   1030 <semget@plt>
mov    %eax,-0x8(%rbp)
cmp    $0xffffffff,%eax
jne    1189 <creat_sem+0x49>
lea    0xe86(%rip),%rdi
call   1050 <perror@plt>
mov    $0xffffffff,%edi
call   1060 <exit@plt>
mov    -0x8(%rbp),%edi
mov    $0x1,%esi
call   1040 <init_sem@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<creat_sem>:
push   %rbx
mov    0x2e98(%rip),%rax
mov    $0x1b6,%edx
or     (%rax),%edx
mov    $0x1,%esi
call   1030 <semget@plt>
cmp    $0xffffffff,%eax
je     1170 <creat_sem+0x30>
mov    %eax,%ebx
mov    %eax,%edi
mov    $0x1,%esi
call   1040 <init_sem@plt>
mov    %ebx,%eax
pop    %rbx
ret
lea    0xe89(%rip),%rdi
call   1050 <perror@plt>
mov    $0xffffffff,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@IPC_CREAT = global i32 0
@.str = [13 x i8] c"semget error\00"
define i32 @creat_sem(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = load i32, i32* @IPC_CREAT
%6 = or i32 %5, 438
%7 = call i32 @semget(i32 %4, i32 1, i32 %6)
store i32 %7, i32* %3
%8 = icmp eq i32 %7, -1
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = call i32 @perror(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @exit(i32 -1)
unreachable
12: ; preds = %1
%13 = load i32, i32* %3
%14 = call i32 @init_sem(i32 %13, i32 1)
%15 = load i32, i32* %3
ret i32 %15
}

LLVM IR (-O2):
@IPC_CREAT = global i32 0
@.str = [13 x i8] c"semget error\00"
define i32 @creat_sem(i32 %0) {
%2 = load i32, i32* @IPC_CREAT
%3 = or i32 %2, 438
%4 = tail call i32 @semget(i32 %0, i32 1, i32 %3)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = tail call i32 @perror(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 @exit(i32 -1)
unreachable
9: ; preds = %1
%10 = tail call i32 @init_sem(i32 %4, i32 1)
ret i32 %4
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t msf_to_lba(uint32_t msf) {
  return (((msf & 0x00ff0000) >> 16) * 60 * 75) +
         (((msf & 0x0000ff00) >> 8) * 75) + ((msf & 0x000000ff) >> 0);
}


x86 assembly (clang, -O0):
<msf_to_lba>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff0000,%eax
sar    $0x10,%eax
imul   $0x3c,%eax,%eax
imul   $0x4b,%eax,%eax
mov    -0x4(%rbp),%ecx
and    $0xff00,%ecx
sar    $0x8,%ecx
imul   $0x4b,%ecx,%ecx
add    %ecx,%eax
mov    -0x4(%rbp),%ecx
and    $0xff,%ecx
sar    $0x0,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<msf_to_lba>:
mov    %edi,%ecx
movzbl %ch,%edx
movzbl %cl,%eax
shr    $0x10,%ecx
movzbl %cl,%ecx
imul   $0x1194,%ecx,%ecx
imul   $0x4b,%edx,%edx
add    %edx,%eax
add    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @msf_to_lba(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 16711680
%5 = ashr i32 %4, 16
%6 = mul nsw i32 %5, 60
%7 = mul nsw i32 %6, 75
%8 = load i32, i32* %2
%9 = and i32 %8, 65280
%10 = ashr i32 %9, 8
%11 = mul nsw i32 %10, 75
%12 = add nsw i32 %7, %11
%13 = load i32, i32* %2
%14 = and i32 %13, 255
%15 = ashr i32 %14, 0
%16 = add nsw i32 %12, %15
ret i32 %16
}

LLVM IR (-O2):
define i32 @msf_to_lba(i32 %0) {
%2 = lshr i32 %0, 16
%3 = and i32 %2, 255
%4 = mul nuw nsw i32 %3, 4500
%5 = lshr i32 %0, 8
%6 = and i32 %5, 255
%7 = mul nuw nsw i32 %6, 75
%8 = and i32 %0, 255
%9 = add nuw nsw i32 %7, %8
%10 = add nuw nsw i32 %9, %4
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void print_version() {
  fprintf(stderr, "MAC-Ping"
                  " "
                  "0.4.0"
                  "\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 = [16 x i8] c"MAC-Ping 0.4.0\0A\00"
define void @print_version() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [16 x i8] c"MAC-Ping 0.4.0\0A\00"
define void @print_version() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret void
}
int interpolate(int x, int xa, int xb, int ya, int yb) {
  int bf, factor, plus;
  bf = 2 * (yb - ya) * (x - xa) / (xb - xa);
  factor = bf / 2;
  plus = bf % 2;
  return ya + factor + plus;
}


x86 assembly (clang, -O0):
<interpolate>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    -0x14(%rbp),%eax
sub    -0x10(%rbp),%eax
shl    $0x1,%eax
mov    -0x4(%rbp),%ecx
sub    -0x8(%rbp),%ecx
imul   %ecx,%eax
mov    -0xc(%rbp),%ecx
sub    -0x8(%rbp),%ecx
cltd
idiv   %ecx
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %edx,-0x20(%rbp)
mov    -0x10(%rbp),%eax
add    -0x1c(%rbp),%eax
add    -0x20(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<interpolate>:
mov    %edx,%r9d
sub    %ecx,%r8d
sub    %esi,%edi
imul   %r8d,%edi
lea    (%rdi,%rdi,1),%eax
sub    %esi,%r9d
cltd
idiv   %r9d
mov    %eax,%edx
shr    $0x1f,%edx
add    %eax,%edx
mov    %edx,%esi
and    $0xfffffffe,%esi
sub    %esi,%eax
sar    %edx
add    %ecx,%edx
add    %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @interpolate(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = sub nsw i32 %4, %3
%7 = sub nsw i32 %0, %1
%8 = shl i32 %7, 1
%9 = mul i32 %8, %6
%10 = sub nsw i32 %2, %1
%11 = sdiv i32 %9, %10
%12 = sdiv i32 %11, 2
%13 = srem i32 %11, 2
%14 = add nsw i32 %12, %3
%15 = add nsw i32 %14, %13
ret i32 %15
}
int omap4_usb_phy_power(struct device *dev, int on) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.device = type opaque
define i32 @omap4_usb_phy_power(%struct.device* nocapture readnone %0, i32 %1) {
ret i32 0
}
/* Variables and functions */
float atan2f(float, float);
float __glsl_atan(float y, float x) { return atan2f(y, x); }


x86 assembly (clang, -O0):
<__glsl_atan>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
call   1030 <atan2f@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__glsl_atan>:
jmp    1030 <atan2f@plt>

LLVM IR (-O0):
define float @__glsl_atan(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = call float @atan2f(float %5, float %6)
ret float %7
}

LLVM IR (-O2):
define float @__glsl_atan(float %0, float %1) {
%3 = tail call float @atan2f(float %0, float %1)
ret float %3
}
void main() {
  int i, j;
  i = 1;
  j = 10;
  while (j >= i) {
    i = i + 2;
    j = -1 + j;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x1,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jl     1137 <main+0x37>
mov    -0x4(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    1112 <main+0x12>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @main() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int age = 24;
  int height = 70;
  printf("I am %d years old.\n", age);
  printf("I am %d inches tall.\n", height);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x18,-0x8(%rbp)
movl   $0x46,-0xc(%rbp)
mov    -0x8(%rbp),%esi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
lea    0xece(%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
mov    $0x18,%esi
call   1030 <printf@plt>
lea    0xeeb(%rip),%rdi
mov    $0x46,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"I am %d years old.\0A\00"
@.str.1 = [22 x i8] c"I am %d inches tall.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 24, i32* %2
store i32 70, i32* %3
%4 = load i32, i32* %2
%5 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = load i32, i32* %3
%7 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"I am %d years old.\0A\00"
@.str.1 = [22 x i8] c"I am %d inches tall.\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 24)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 70)
ret i32 0
}
long long bit14() { return 0x0000000000004000LL; }


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

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

LLVM IR (-O0):
define i64 @bit14() {
ret i64 16384
}

LLVM IR (-O2):
define i64 @bit14() {
ret i64 16384
}
long absdiff_cm(long x, long y) {
  long result;
  result = x - y;
  long eval = y - x;
  if (x <= y)
    result = eval;
  return result;
}


x86 assembly (clang, -O0):
<absdiff_cm>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
sub    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
sub    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jg     113a <absdiff_cm+0x3a>
mov    -0x20(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<absdiff_cm>:
mov    %rdi,%rax
sub    %rsi,%rax
neg    %rax
sub    %rsi,%rdi
cmovg  %rdi,%rax
ret

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

LLVM IR (-O2):
define i64 @absdiff_cm(i64 %0, i64 %1) {
%3 = sub nsw i64 %0, %1
%4 = icmp sgt i64 %0, %1
%5 = sub nsw i64 %1, %0
%6 = select i1 %4, i64 %3, i64 %5
ret i64 %6
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
scalar_t__ size_sub_check(size_t const, size_t const);
int size_sub(size_t *z, const size_t x, const size_t y) {
  assert(z != NULL);
  if (size_sub_check(x, y) != 0) {
    *z = x - y;
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<size_sub>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
cmpq   $0x0,-0x10(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1030 <size_sub_check@plt>
cmp    $0x0,%rax
je     1178 <size_sub+0x58>
mov    -0x18(%rbp),%rcx
sub    -0x20(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
movl   $0x0,-0x4(%rbp)
jmp    117f <size_sub+0x5f>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<size_sub>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %rdi,%r15
xor    %edi,%edi
test   %r15,%r15
setne  %dil
call   1040 <assert@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <size_sub_check@plt>
test   %rax,%rax
je     1156 <size_sub+0x36>
sub    %r14,%rbx
mov    %rbx,(%r15)
xor    %eax,%eax
jmp    115b <size_sub+0x3b>
mov    $0x1,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32 @size_sub(i64* %0, i64 %1, i64 %2) {
%4 = alloca i32
%5 = alloca i64*
%6 = alloca i64
%7 = alloca i64
store i64* %0, i64** %5
store i64 %1, i64* %6
store i64 %2, i64* %7
%8 = load i64*, i64** %5
%9 = icmp ne i64* %8, null
%10 = zext i1 %9 to i32
%11 = call i32 @assert(i32 %10)
%12 = load i64, i64* %6
%13 = load i64, i64* %7
%14 = call i64 @size_sub_check(i64 %12, i64 %13)
%15 = icmp ne i64 %14, 0
br i1 %15, label %16, label %21
16: ; preds = %3
%17 = load i64, i64* %6
%18 = load i64, i64* %7
%19 = sub i64 %17, %18
%20 = load i64*, i64** %5
store i64 %19, i64* %20
store i32 0, i32* %4
br label %22
21: ; preds = %3
store i32 1, i32* %4
br label %22
22: ; preds = %21, %16
%23 = load i32, i32* %4
ret i32 %23
}

LLVM IR (-O2):
define i32 @size_sub(i64* writeonly %0, i64 %1, i64 %2) {
%4 = icmp ne i64* %0, null
%5 = zext i1 %4 to i32
%6 = tail call i32 @assert(i32 %5)
%7 = tail call i64 @size_sub_check(i64 %1, i64 %2)
%8 = icmp eq i64 %7, 0
br i1 %8, label %11, label %9
9: ; preds = %3
%10 = sub i64 %1, %2
store i64 %10, i64* %0
br label %11
11: ; preds = %3, %9
%12 = phi i32 [ 0, %9 ], [ 1, %3 ]
ret i32 %12
}
/* Variables and functions */
scalar_t__ reg_isalpharune(int);
int reg_isunicodeletter(int c) {
  return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || reg_isalpharune(c);
}


x86 assembly (clang, -O0):
<reg_isunicodeletter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x61,-0x4(%rbp)
jl     1134 <reg_isunicodeletter+0x24>
mov    $0x1,%al
cmpl   $0x7a,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jle    115f <reg_isunicodeletter+0x4f>
cmpl   $0x41,-0x4(%rbp)
jl     114d <reg_isunicodeletter+0x3d>
mov    $0x1,%al
cmpl   $0x5a,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jle    115f <reg_isunicodeletter+0x4f>
mov    -0x4(%rbp),%edi
call   1030 <reg_isalpharune@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reg_isunicodeletter>:
mov    %edi,%ecx
and    $0xffffffdf,%ecx
add    $0xffffffbf,%ecx
mov    $0x1,%eax
cmp    $0x1a,%ecx
jb     1137 <reg_isunicodeletter+0x27>
push   %rax
call   1030 <reg_isalpharune@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
add    $0x8,%rsp
ret

LLVM IR (-O0):
define i32 @reg_isunicodeletter(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 97
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 122
br i1 %7, label %18, label %8
8: ; preds = %5, %1
%9 = load i32, i32* %2
%10 = icmp sge i32 %9, 65
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = load i32, i32* %2
%13 = icmp sle i32 %12, 90
br i1 %13, label %18, label %14
14: ; preds = %11, %8
%15 = load i32, i32* %2
%16 = call i64 @reg_isalpharune(i32 %15)
%17 = icmp ne i64 %16, 0
br label %18
18: ; preds = %14, %11, %5
%19 = phi i1 [ true, %11 ], [ true, %5 ], [ %17, %14 ]
%20 = zext i1 %19 to i32
ret i32 %20
}

LLVM IR (-O2):
define i32 @reg_isunicodeletter(i32 %0) {
%2 = and i32 %0, -33
%3 = add i32 %2, -65
%4 = icmp ult i32 %3, 26
br i1 %4, label %9, label %5
5: ; preds = %1
%6 = tail call i64 @reg_isalpharune(i32 %0)
%7 = icmp ne i64 %6, 0
%8 = zext i1 %7 to i32
br label %9
9: ; preds = %1, %5
%10 = phi i32 [ %8, %5 ], [ 1, %1 ]
ret i32 %10
}
/* Variables and functions */
int strlen(char const *);
int validate_license(const char *license) {
  if (license == NULL) {
    return -1;
  }
  if (strlen(license) > 50) {
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<validate_license>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1133 <validate_license+0x23>
movl   $0xffffffff,-0x4(%rbp)
jmp    1158 <validate_license+0x48>
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x32,%eax
jle    1151 <validate_license+0x41>
movl   $0xffffffff,-0x4(%rbp)
jmp    1158 <validate_license+0x48>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<validate_license>:
test   %rdi,%rdi
je     112c <validate_license+0x1c>
push   %rax
call   1030 <strlen@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x33,%ecx
setge  %al
neg    %eax
add    $0x8,%rsp
ret
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @validate_license(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 -1, i32* %2
br label %13
7: ; preds = %1
%8 = load i8*, i8** %3
%9 = call i32 @strlen(i8* %8)
%10 = icmp sgt i32 %9, 50
br i1 %10, label %11, label %12
11: ; preds = %7
store i32 -1, i32* %2
br label %13
12: ; preds = %7
store i32 0, i32* %2
br label %13
13: ; preds = %12, %11, %6
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @validate_license(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = tail call i32 @strlen(i8* %0)
%5 = icmp sgt i32 %4, 50
%6 = sext i1 %5 to i32
br label %7
7: ; preds = %3, %1
%8 = phi i32 [ -1, %1 ], [ %6, %3 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ matNd_mult_matNd_new(double *, double const *,
                                        double const *, int);
void mat4d_mult_mat4d_new(double result[16], const double matA[16],
                          const double matB[16]) {
  matNd_mult_matNd_new(result, matA, matB, 4);
}


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

x86 assembly (clang, -O2):
<mat4d_mult_mat4d_new>:
mov    $0x4,%ecx
jmp    1030 <matNd_mult_matNd_new@plt>

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

LLVM IR (-O2):
define void @mat4d_mult_mat4d_new(double* %0, double* %1, double* %2) {
%4 = tail call i32 @matNd_mult_matNd_new(double* %0, double* %1, double* %2, i32 4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cgnot();
int /*<<< orphan*/ gentext();
void gennot(void) {
  gentext();
  cgnot();
}


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

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

LLVM IR (-O0):
define void @gennot() {
%1 = call i32 (...) @gentext()
%2 = call i32 (...) @cgnot()
ret void
}

LLVM IR (-O2):
define void @gennot() {
%1 = tail call i32 (...) @gentext()
%2 = tail call i32 (...) @cgnot()
ret void
}
int aclamp(long val) {
  while (val < 0)
    val += 26;
  return val % 26;
}


x86 assembly (clang, -O0):
<aclamp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jge    1124 <aclamp+0x24>
mov    -0x8(%rbp),%rax
add    $0x1a,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <aclamp+0x8>
mov    -0x8(%rbp),%rax
mov    $0x1a,%ecx
cqto
idiv   %rcx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<aclamp>:
xor    %eax,%eax
test   %rdi,%rdi
cmovg  %rdi,%rax
xor    %esi,%esi
sub    %rdi,%rax
setne  %sil
sub    %rsi,%rax
movabs $0x4ec4ec4ec4ec4ec5,%r8
ec c4 4e
mul    %r8
shr    $0x3,%rdx
add    %rdx,%rsi
lea    (%rsi,%rsi,4),%rax
lea    (%rax,%rax,4),%rcx
add    %rsi,%rcx
add    %rdi,%rcx
mov    %rcx,%rax
mul    %r8
shr    $0x3,%rdx
lea    (%rdx,%rdx,4),%eax
lea    (%rax,%rax,4),%eax
add    %edx,%eax
sub    %eax,%ecx
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @aclamp(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
br label %3
3: ; preds = %6, %1
%4 = load i64, i64* %2
%5 = icmp slt i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = load i64, i64* %2
%8 = add nsw i64 %7, 26
store i64 %8, i64* %2
br label %3
9: ; preds = %3
%10 = load i64, i64* %2
%11 = srem i64 %10, 26
%12 = trunc i64 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @aclamp(i64 %0) {
%2 = call i64 @llvm.smax.i64(i64 %0, i64 0)
%3 = sub i64 %2, %0
%4 = icmp ne i64 %3, 0
%5 = zext i1 %4 to i64
%6 = sub i64 %3, %5
%7 = udiv i64 %6, 26
%8 = add nuw nsw i64 %7, %5
%9 = mul i64 %8, 26
%10 = add i64 %9, %0
%11 = urem i64 %10, 26
%12 = trunc i64 %11 to i32
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void error_print(char *arr) {
  fprintf(stderr,
          "\n%s reads intensity distribution and outputs the same scaled\n",
          arr);
  fprintf(
      stderr,
      "\nUSAGE: %s  K < int_in > int_out \nwhere K is coefficient to multiply "
      "the  intensity, may be\nnecessary to scale the distribution.\n\n",
      arr);
}


x86 assembly (clang, -O0):
<error_print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2ea4(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xef5(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<error_print>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2ec2(%rip),%r14
mov    (%r14),%edi
lea    0xed8(%rip),%rsi
mov    %rbx,%rdx
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0xf04(%rip),%rsi
mov    %rbx,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [62 x i8] c"\0A%s reads intensity distribution and outputs the same scaled\0A\00"
@.str.1 = [131 x i8] c"\0AUSAGE: %s K < int_in > int_out \0Awhere K is coefficient to multiply the intensity, may be\0Anecessary to scale the distribution.\0A\0A\00"
define void @error_print(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @stderr
%7 = load i8*, i8** %2
%8 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([131 x i8], [131 x i8]* @.str.1, i64 0, i64 0), i8* %7)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [62 x i8] c"\0A%s reads intensity distribution and outputs the same scaled\0A\00"
@.str.1 = [131 x i8] c"\0AUSAGE: %s K < int_in > int_out \0Awhere K is coefficient to multiply the intensity, may be\0Anecessary to scale the distribution.\0A\0A\00"
define void @error_print(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([131 x i8], [131 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ pagesize_init();
int map_init(void) {
  pagesize_init();
  return (0);
}


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

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

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

LLVM IR (-O2):
define i32 @map_init() {
%1 = tail call i32 (...) @pagesize_init()
ret i32 0
}
int test_imm_86uint32_reg(unsigned int val) {
  return ((val) & (0x86 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_86uint32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0x86,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_86uint32_reg>:
test   $0x86,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_86uint32_reg(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 134
%5 = icmp ne i32 %4, 0
%6 = zext i1 %5 to i64
%7 = select i1 %5, i32 -20, i32 -40
ret i32 %7
}

LLVM IR (-O2):
define i32 @test_imm_86uint32_reg(i32 %0) {
%2 = and i32 %0, 134
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
struct mat3 {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ mat3_multiply(float *, float *, float *);
__attribute__((always_)) struct mat3 *
psmat3_multiply(struct mat3 *result, struct mat3 *a, struct mat3 *b) {
  mat3_multiply((float *)result, (float *)a, (float *)b);
  return result;
}


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

x86 assembly (clang, -O2):
<psmat3_multiply>:
push   %rbx
mov    %rdi,%rbx
call   1030 <mat3_multiply@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.mat3 = type { i32 }
define %struct.mat3* @psmat3_multiply(%struct.mat3* %0, %struct.mat3* %1, %struct.mat3* %2) {
%4 = alloca %struct.mat3*
%5 = alloca %struct.mat3*
%6 = alloca %struct.mat3*
store %struct.mat3* %0, %struct.mat3** %4
store %struct.mat3* %1, %struct.mat3** %5
store %struct.mat3* %2, %struct.mat3** %6
%7 = load %struct.mat3*, %struct.mat3** %4
%8 = bitcast %struct.mat3* %7 to float*
%9 = load %struct.mat3*, %struct.mat3** %5
%10 = bitcast %struct.mat3* %9 to float*
%11 = load %struct.mat3*, %struct.mat3** %6
%12 = bitcast %struct.mat3* %11 to float*
%13 = call i32 @mat3_multiply(float* %8, float* %10, float* %12)
%14 = load %struct.mat3*, %struct.mat3** %4
ret %struct.mat3* %14
}

LLVM IR (-O2):
%struct.mat3 = type { i32 }
define %struct.mat3* @psmat3_multiply(%struct.mat3* returned %0, %struct.mat3* %1, %struct.mat3* %2) {
%4 = bitcast %struct.mat3* %0 to float*
%5 = bitcast %struct.mat3* %1 to float*
%6 = bitcast %struct.mat3* %2 to float*
%7 = tail call i32 @mat3_multiply(float* %4, float* %5, float* %6)
ret %struct.mat3* %0
}
/* Variables and functions */
int _get_load(char **, int);
int rfi_load_5min(char **s) { return _get_load(s, 2); }


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

x86 assembly (clang, -O2):
<rfi_load_5min>:
mov    $0x2,%esi
jmp    1030 <_get_load@plt>

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

LLVM IR (-O2):
define i32 @rfi_load_5min(i8** %0) {
%2 = tail call i32 @_get_load(i8** %0, i32 2)
ret i32 %2
}
int strlenx(const char *pstr) {
  int len;
  for (len = 0; *pstr != '\0'; len++)
    pstr++;
  return len;
}


x86 assembly (clang, -O0):
<strlenx>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1139 <strlenx+0x39>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <strlenx+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlenx>:
cmpb   $0x0,(%rdi)
je     111c <strlenx+0x1c>
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <strlenx+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @strlenx(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %8, %4 ], [ 0, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = add nuw nsw i32 %5, 1
%9 = load i8, i8* %7
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i32 [ 0, %1 ], [ %8, %4 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ leitura_arquivo(char *);
int main(int argc, char **argv) {
  leitura_arquivo("eu.wav");
  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 <leitura_arquivo@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [7 x i8] c"eu.wav\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 @leitura_arquivo(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"eu.wav\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @leitura_arquivo(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
int mvprintnum3x(int y, int x, int number) {
  int iret = 0;
  return iret;
}


x86 assembly (clang, -O0):
<mvprintnum3x>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @mvprintnum3x(i32 %0, i32 %1, i32 %2) {
ret i32 0
}
char *_(char *s) { return s; }


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

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

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

LLVM IR (-O2):
define i8* @_(i8* readnone returned %0) {
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *pname) {
  fprintf(stderr,
          "usage: %s [-i] [-r <min>-<max>] -f <inputfile>\n"
          "       -i:  make an index, don't extract\n"
          "       -r:  work on items in the range min-max (default all items)\n"
          "       -f:  set the input file\n",
          pname);
  exit(-1);
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [187 x i8] c"usage: %s [-i] [-r <min>-<max>] -f <inputfile>\0A -i: make an index, don't extract\0A -r: work on items in the range min-max (default all items)\0A -f: set the input file\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([187 x i8], [187 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [187 x i8] c"usage: %s [-i] [-r <min>-<max>] -f <inputfile>\0A -i: make an index, don't extract\0A -r: work on items in the range min-max (default all items)\0A -f: set the input file\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([187 x i8], [187 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 -1)
unreachable
}