xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int);
int main() {
  int n;
  scanf("%d\n", n);
  printf("%d\n", n);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xed8(%rip),%rbx
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 undef)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 undef)
ret i32 0
}
unsigned char *hmac384digest(bitstr, bitcnt, key, keylen)
unsigned char *bitstr;
unsigned long bitcnt;
unsigned char *key;
unsigned int keylen;
{ return ((unsigned char *)hmaccomp(384, 1, bitstr, bitcnt, key, keylen)); }


x86 assembly (clang, -O0):
<hmac384digest>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8
mov    -0x1c(%rbp),%r9d
mov    $0x180,%edi
mov    $0x1,%esi
mov    $0x0,%al
call   1030 <hmaccomp@plt>
cltq
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hmac384digest>:
push   %rax
mov    %ecx,%r9d
mov    %rdx,%r8
mov    %rsi,%rcx
mov    %rdi,%rdx
mov    $0x180,%edi
mov    $0x1,%esi
xor    %eax,%eax
call   1030 <hmaccomp@plt>
cltq
pop    %rcx
ret

LLVM IR (-O0):
define i8* @hmac384digest(i8* %0, i64 %1, i8* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i8*
%8 = alloca i32
store i8* %0, i8** %5
store i64 %1, i64* %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = load i8*, i8** %5
%10 = load i64, i64* %6
%11 = load i8*, i8** %7
%12 = load i32, i32* %8
%13 = call i32 (i32, i32, i8*, i64, i8*, i32, ...) bitcast (i32 (...)* @hmaccomp to i32 (i32, i32, i8*, i64, i8*, i32, ...)*)(i32 384, i32 1, i8* %9, i64 %10, i8* %11, i32 %12)
%14 = sext i32 %13 to i64
%15 = inttoptr i64 %14 to i8*
ret i8* %15
}

LLVM IR (-O2):
define i8* @hmac384digest(i8* %0, i64 %1, i8* %2, i32 %3) {
%5 = tail call i32 (i32, i32, i8*, i64, i8*, i32, ...) bitcast (i32 (...)* @hmaccomp to i32 (i32, i32, i8*, i64, i8*, i32, ...)*)(i32 384, i32 1, i8* %0, i64 %1, i8* %2, i32 %3)
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to i8*
ret i8* %7
}
/* Variables and functions */
int /*<<< orphan*/ Nokia5110_OutChar(unsigned char);
void Nokia5110_OutString(char *ptr) {
  while (*ptr) {
    Nokia5110_OutChar((unsigned char)*ptr);
    ptr = ptr + 1;
  }
}


x86 assembly (clang, -O0):
<Nokia5110_OutString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1146 <Nokia5110_OutString+0x36>
mov    -0x8(%rbp),%rax
movzbl (%rax),%edi
call   1030 <Nokia5110_OutChar@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <Nokia5110_OutString+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Nokia5110_OutString>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <Nokia5110_OutString+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movzbl %al,%edi
call   1030 <Nokia5110_OutChar@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <Nokia5110_OutString+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @Nokia5110_OutString(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 i8 [ %9, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = tail call i32 @Nokia5110_OutChar(i8 zeroext %5)
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
ret void
}
/* Variables and functions */
bool is_valid_ipv4(char value[]) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @is_valid_ipv4(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
double GETTIME();
double gettime() {
  static double time;
  static char settime = (0);
  if (!settime) {
    time = GETTIME();
    settime = (1);
  }
  return (GETTIME() - time);
}


x86 assembly (clang, -O0):
<gettime>:
push   %rbp
mov    %rsp,%rbp
cmpb   $0x0,0x2f1d(%rip)
jne    1137 <gettime+0x27>
mov    $0x0,%al
call   1030 <GETTIME@plt>
movsd  %xmm0,0x2f00(%rip)
movb   $0x1,0x2f01(%rip)
mov    $0x0,%al
call   1030 <GETTIME@plt>
subsd  0x2eea(%rip),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<gettime>:
push   %rax
cmpb   $0x0,0x2f20(%rip)
jne    1130 <gettime+0x20>
xor    %eax,%eax
call   1030 <GETTIME@plt>
movsd  %xmm0,0x2f07(%rip)
movb   $0x1,0x2f08(%rip)
xor    %eax,%eax
call   1030 <GETTIME@plt>
subsd  0x2ef1(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
@gettime.time = internal global double 0.000000e+00
@gettime.settime = internal global i8 0
define double @gettime() {
%1 = load i8, i8* @gettime.settime
%2 = icmp ne i8 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = call double (...) @GETTIME()
store double %4, double* @gettime.time
store i8 1, i8* @gettime.settime
br label %5
5: ; preds = %3, %0
%6 = call double (...) @GETTIME()
%7 = load double, double* @gettime.time
%8 = fsub double %6, %7
ret double %8
}

LLVM IR (-O2):
@gettime.time = internal unnamed_addr global double 0.000000e+00
@gettime.settime = internal unnamed_addr global i1 false
define double @gettime() {
%1 = load i1, i1* @gettime.settime
br i1 %1, label %4, label %2
2: ; preds = %0
%3 = tail call double (...) @GETTIME()
store double %3, double* @gettime.time
store i1 true, i1* @gettime.settime
br label %4
4: ; preds = %2, %0
%5 = tail call double (...) @GETTIME()
%6 = load double, double* @gettime.time
%7 = fsub double %5, %6
ret double %7
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int int8_t;

/* Variables and functions */
int /*<<< orphan*/ inet_aton(int /*<<< orphan*/ *, void *);
int8_t parse_ip(uint8_t *text, void *buf) { return !inet_aton(text, buf); }


x86 assembly (clang, -O0):
<parse_ip>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <inet_aton@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_ip>:
push   %rax
call   1030 <inet_aton@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @parse_ip(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
store i32* %0, i32** %3
store i8* %1, i8** %4
%5 = load i32*, i32** %3
%6 = load i8*, i8** %4
%7 = call i32 @inet_aton(i32* %5, i8* %6)
%8 = icmp ne i32 %7, 0
%9 = xor i1 %8, true
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @parse_ip(i32* %0, i8* %1) {
%3 = tail call i32 @inet_aton(i32* %0, i8* %1)
%4 = icmp eq i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
void ff_hevc_put_hevc_bi_qpel_v8_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_qpel_v8_12_sse4() {
ret void
}
int recursion(int acumulator) {
  if (acumulator < 20) {
    return recursion(acumulator + 1);
  }
  return acumulator;
}


x86 assembly (clang, -O0):
<recursion>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x14,-0x8(%rbp)
jge    1138 <recursion+0x28>
mov    -0x8(%rbp),%edi
add    $0x1,%edi
call   1030 <recursion@plt>
mov    %eax,-0x4(%rbp)
jmp    113e <recursion+0x2e>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<recursion>:
cmp    $0x15,%edi
mov    $0x14,%eax
cmovge %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @recursion(i32 %0) {
%2 = call i32 @llvm.smax.i32(i32 %0, i32 20)
ret i32 %2
}
int joy_open(void) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @joy_open() {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Hello world.\n");
  return 1;
}


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"Hello world.\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@str = [13 x i8] c"Hello world.\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ motion_set(int);
void back(void) { motion_set(0x09); }


x86 assembly (clang, -O0):
<back>:
push   %rbp
mov    %rsp,%rbp
mov    $0x9,%edi
call   1030 <motion_set@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<back>:
mov    $0x9,%edi
jmp    1030 <motion_set@plt>

LLVM IR (-O0):
define void @back() {
%1 = call i32 @motion_set(i32 9)
ret void
}

LLVM IR (-O2):
define void @back() {
%1 = tail call i32 @motion_set(i32 9)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int EINVAL;
__attribute__((visibility("default"))) int
sd_pid_get_machine_name(pid_t pid, char **name) {
  return -EINVAL;
}


x86 assembly (clang, -O0):
<sd_pid_get_machine_name>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
mov    0x2ecc(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sd_pid_get_machine_name>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@EINVAL = global i32 0
define i32 @sd_pid_get_machine_name(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* @EINVAL
%6 = sub nsw i32 0, %5
ret i32 %6
}

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @sd_pid_get_machine_name(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @EINVAL
%4 = sub nsw i32 0, %3
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_attr_t;

/* Variables and functions */
int /*<<< orphan*/ gptp(char *, int);
void g_pthread_attr_t() { gptp("pthread_attr_t", sizeof(pthread_attr_t)); }


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

x86 assembly (clang, -O2):
<g_pthread_attr_t>:
lea    0xee9(%rip),%rdi
mov    $0x4,%esi
jmp    1030 <gptp@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"pthread_attr_t\00"
define void @g_pthread_attr_t() {
%1 = call i32 @gptp(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 4)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"pthread_attr_t\00"
define void @g_pthread_attr_t() {
%1 = tail call i32 @gptp(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 4)
ret void
}
int necati() {
  int count = 0;
  return 1000;
}


x86 assembly (clang, -O0):
<necati>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    $0x3e8,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @necati() {
ret i32 1000
}
void perf_counters_lapic_init(void) {}


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

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

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

LLVM IR (-O2):
define void @perf_counters_lapic_init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char a;
  int b;
  scanf("%c", &a);
  b = a - 'a';
  printf("%c\n", 'z' - b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x5(%rbp),%rsi
call   1040 <scanf@plt>
movsbl -0x5(%rbp),%eax
sub    $0x61,%eax
mov    %eax,-0xc(%rbp)
mov    $0x7a,%eax
sub    -0xc(%rbp),%eax
lea    0xeab(%rip),%rdi
movsbl %al,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x7(%rsp),%rsi
call   1040 <scanf@plt>
mov    $0xdb,%al
sub    0x7(%rsp),%al
movsbl %al,%esi
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%c\00"
@.str.1 = [4 x i8] c"%c\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%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), i8* %2)
%5 = load i8, i8* %2
%6 = sext i8 %5 to i32
%7 = sub nsw i32 %6, 97
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = sub nsw i32 122, %8
%10 = trunc i32 %9 to i8
%11 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8 signext %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
@.str.1 = [4 x i8] c"%c\0A\00"
define i32 @main() {
%1 = alloca i8
%2 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %1)
%3 = load i8, i8* %1
%4 = sub i8 -37, %3
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8 signext %4)
ret i32 0
}
/* Variables and functions */
int print_hello_world();
int main() { return print_hello_world(); }


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @print_hello_world()
ret i32 %1
}
int makeMask(int bit_count) {
  int i;
  int ret = 0;
  for (i = 0; i < bit_count; i++) {
    ret <<= 1;
    ret |= 1;
  }
  return ret;
}


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

x86 assembly (clang, -O2):
<makeMask>:
test   %edi,%edi
jle    1115 <makeMask+0x15>
lea    -0x1(%rdi),%eax
mov    %edi,%ecx
and    $0x7,%ecx
cmp    $0x7,%eax
jae    1118 <makeMask+0x18>
xor    %eax,%eax
jmp    112d <makeMask+0x2d>
xor    %eax,%eax
ret
and    $0xfffffff8,%edi
xor    %eax,%eax
nopl   (%rax)
shl    $0x8,%eax
or     $0xff,%eax
add    $0xfffffff8,%edi
jne    1120 <makeMask+0x20>
test   %ecx,%ecx
je     114a <makeMask+0x4a>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    %eax,%eax
add    $0x1,%eax
add    $0xffffffff,%ecx
jne    1140 <makeMask+0x40>
ret

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

LLVM IR (-O2):
define i32 @makeMask(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %27
3: ; preds = %1
%4 = add i32 %0, -1
%5 = and i32 %0, 7
%6 = icmp ult i32 %4, 7
br i1 %6, label %16, label %7
7: ; preds = %3
%8 = and i32 %0, -8
br label %9
9: ; preds = %9, %7
%10 = phi i32 [ 0, %7 ], [ %13, %9 ]
%11 = phi i32 [ 0, %7 ], [ %14, %9 ]
%12 = shl i32 %10, 8
%13 = or i32 %12, 255
%14 = add i32 %11, 8
%15 = icmp eq i32 %14, %8
br i1 %15, label %16, label %9
16: ; preds = %9, %3
%17 = phi i32 [ undef, %3 ], [ %13, %9 ]
%18 = phi i32 [ 0, %3 ], [ %13, %9 ]
%19 = icmp eq i32 %5, 0
br i1 %19, label %27, label %20
20: ; preds = %16, %20
%21 = phi i32 [ %24, %20 ], [ %18, %16 ]
%22 = phi i32 [ %25, %20 ], [ 0, %16 ]
%23 = shl i32 %21, 1
%24 = or i32 %23, 1
%25 = add i32 %22, 1
%26 = icmp eq i32 %25, %5
br i1 %26, label %27, label %20
27: ; preds = %16, %20, %1
%28 = phi i32 [ 0, %1 ], [ %17, %16 ], [ %24, %20 ]
ret i32 %28
}
void foo159() {}


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

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

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

LLVM IR (-O2):
define void @foo159() {
ret void
}
int ti_rsi_start(double const *options) { return (int)options[0]; }


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

x86 assembly (clang, -O2):
<ti_rsi_start>:
cvttsd2si (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @ti_rsi_start(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = getelementptr inbounds double, double* %3, i64 0
%5 = load double, double* %4
%6 = fptosi double %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @ti_rsi_start(double* nocapture %0) {
%2 = load double, double* %0
%3 = fptosi double %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ adjust(int *, int, int);
void heap(int list[], int length) {
  int i;
  for (i = (length - 2) / 2; i >= 0; --i)
    adjust(list, i, length - 1);
}


x86 assembly (clang, -O0):
<heap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x2,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jl     115a <heap+0x4a>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
mov    -0xc(%rbp),%edx
sub    $0x1,%edx
call   1030 <adjust@plt>
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    1130 <heap+0x20>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<heap>:
push   %rbp
push   %r14
push   %rbx
test   %esi,%esi
jle    1141 <heap+0x31>
mov    %esi,%ebx
mov    %rdi,%r14
lea    -0x2(%rbx),%eax
shr    $0x1f,%eax
lea    (%rbx,%rax,1),%ebp
add    $0xfffffffe,%ebp
sar    %ebp
add    $0xffffffff,%ebx
xchg   %ax,%ax
mov    %r14,%rdi
mov    %ebp,%esi
mov    %ebx,%edx
call   1030 <adjust@plt>
add    $0xffffffff,%ebp
jb     1130 <heap+0x20>
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define void @heap(i32* %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = add nsw i32 %1, -2
%6 = sdiv i32 %5, 2
%7 = add nsw i32 %1, -1
br label %8
8: ; preds = %4, %8
%9 = phi i32 [ %6, %4 ], [ %11, %8 ]
%10 = tail call i32 @adjust(i32* %0, i32 %9, i32 %7)
%11 = add nsw i32 %9, -1
%12 = icmp eq i32 %9, 0
br i1 %12, label %13, label %8
13: ; preds = %8, %2
ret void
}
/* Type definitions */
struct srange_tracker {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct srange_tracker *);
void srange_tracker_free(struct srange_tracker *tk) { free(tk); }


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

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

LLVM IR (-O0):
%struct.srange_tracker = type { i32 }
define void @srange_tracker_free(%struct.srange_tracker* %0) {
%2 = alloca %struct.srange_tracker*
store %struct.srange_tracker* %0, %struct.srange_tracker** %2
%3 = load %struct.srange_tracker*, %struct.srange_tracker** %2
%4 = call i32 @free(%struct.srange_tracker* %3)
ret void
}

LLVM IR (-O2):
%struct.srange_tracker = type { i32 }
define void @srange_tracker_free(%struct.srange_tracker* nocapture %0) {
%2 = tail call i32 @free(%struct.srange_tracker* %0)
ret void
}
void glmReverseVector4d(double v[4]) {
  v[0] = -v[0];
  v[1] = -v[1];
  v[2] = -v[2];
  v[3] = -v[3];
}


x86 assembly (clang, -O0):
<glmReverseVector4d>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x10(%rax)
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x18(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<glmReverseVector4d>:
movaps 0xef9(%rip),%xmm0
movups (%rdi),%xmm1
movups 0x10(%rdi),%xmm2
xorps  %xmm0,%xmm1
movups %xmm1,(%rdi)
xorps  %xmm0,%xmm2
movups %xmm2,0x10(%rdi)
ret

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

LLVM IR (-O2):
define void @glmReverseVector4d(double* nocapture %0) {
%2 = bitcast double* %0 to <2 x double>*
%3 = load <2 x double>, <2 x double>* %2
%4 = fneg <2 x double> %3
%5 = bitcast double* %0 to <2 x double>*
store <2 x double> %4, <2 x double>* %5
%6 = getelementptr inbounds double, double* %0, i64 2
%7 = bitcast double* %6 to <2 x double>*
%8 = load <2 x double>, <2 x double>* %7
%9 = fneg <2 x double> %8
%10 = bitcast double* %6 to <2 x double>*
store <2 x double> %9, <2 x double>* %10
ret void
}
void dispatcher_process_exit() {}


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

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

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

LLVM IR (-O2):
define void @dispatcher_process_exit() {
ret void
}
/* Type definitions */
typedef unsigned long volatile uint32_t;

/* Variables and functions */
uint32_t TimerDMAEventGet(uint32_t ui32Base) {
  ;
  return ((*((volatile unsigned long *)(ui32Base + 0x0000006C))));
}


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

x86 assembly (clang, -O2):
<TimerDMAEventGet>:
mov    %rdi,-0x8(%rsp)
mov    -0x8(%rsp),%rax
mov    0x6c(%rax),%rax
ret

LLVM IR (-O0):
define i64 @TimerDMAEventGet(i64 %0) {
%2 = alloca i64
store volatile i64 %0, i64* %2
%3 = load volatile i64, i64* %2
%4 = add i64 %3, 108
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
ret i64 %6
}

LLVM IR (-O2):
define i64 @TimerDMAEventGet(i64 %0) {
%2 = alloca i64
store volatile i64 %0, i64* %2
%3 = load volatile i64, i64* %2
%4 = add i64 %3, 108
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
ret i64 %6
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
void mp2vgop_set_closedgop(uint8_t *p_mp2vgop) { p_mp2vgop[7] |= 0x40; }


x86 assembly (clang, -O0):
<mp2vgop_set_closedgop>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x1c(%rax),%ecx
or     $0x40,%ecx
mov    %ecx,0x1c(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<mp2vgop_set_closedgop>:
orb    $0x40,0x1c(%rdi)
ret

LLVM IR (-O0):
define void @mp2vgop_set_closedgop(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 7
%5 = load i32, i32* %4
%6 = or i32 %5, 64
store i32 %6, i32* %4
ret void
}

LLVM IR (-O2):
define void @mp2vgop_set_closedgop(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 7
%3 = load i32, i32* %2
%4 = or i32 %3, 64
store i32 %4, i32* %2
ret void
}
int bitcount(unsigned x) {
  int b;
  for (b = 0; x != 0; x >>= 1) {
    if (x & 01)
      b++;
  }
  return b;
}


x86 assembly (clang, -O0):
<bitcount>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1143 <bitcount+0x43>
mov    -0x4(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1130 <bitcount+0x30>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1135 <bitcount+0x35>
mov    -0x4(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110e <bitcount+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitcount>:
xor    %eax,%eax
test   %edi,%edi
je     1120 <bitcount+0x20>
mov    %edi,%ecx
nopl   0x0(%rax,%rax,1)
mov    %edi,%edx
and    $0x1,%edx
add    %edx,%eax
shr    %ecx
cmp    $0x1,%edi
mov    %ecx,%edi
ja     1110 <bitcount+0x10>
ret

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

LLVM IR (-O2):
define i32 @bitcount(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %10, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 0, %1 ]
%5 = phi i32 [ %8, %3 ], [ %0, %1 ]
%6 = and i32 %5, 1
%7 = add nuw nsw i32 %4, %6
%8 = lshr i32 %5, 1
%9 = icmp ult i32 %5, 2
br i1 %9, label %10, label %3
10: ; preds = %3, %1
%11 = phi i32 [ 0, %1 ], [ %7, %3 ]
ret i32 %11
}
void RSA_get_ex_data(void) {}


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

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

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

LLVM IR (-O2):
define void @RSA_get_ex_data() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0x92() {
  Assert_real((islower(146) == 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_islower.c",
              735, ("islower should be 0 for 0x92"));
}


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

x86 assembly (clang, -O2):
<t_islower_0x92>:
push   %rax
mov    $0x92,%edi
call   1030 <islower@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x2df,%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_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0x92\00"
define void @t_islower_0x92() {
%1 = call i64 @islower(i32 146)
%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 735, 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_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0x92\00"
define void @t_islower_0x92() {
%1 = tail call i64 @islower(i32 146)
%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 735, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
struct timeval {
  int tv_sec;
  long long tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
long long get_time() {
  struct timeval tv;
  gettimeofday(&tv, NULL);
  return (tv.tv_sec * 1000000) + tv.tv_usec;
}


x86 assembly (clang, -O0):
<get_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
imul   $0xf4240,-0x10(%rbp),%eax
cltq
add    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_time>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
movslq 0x8(%rsp),%rax
imul   $0xf4240,%rax,%rax
add    0x10(%rsp),%rax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i64 }
define i64 @get_time() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%4 = load i32, i32* %3
%5 = mul nsw i32 %4, 1000000
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%8 = load i64, i64* %7
%9 = add nsw i64 %6, %8
ret i64 %9
}

LLVM IR (-O2):
%struct.timeval = type { i32, i64 }
define i64 @get_time() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%5 = load i32, i32* %4
%6 = mul nsw i32 %5, 1000000
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%9 = load i64, i64* %8
%10 = add nsw i64 %9, %7
ret i64 %10
}
/* Type definitions */
struct stat64 {
  int dummy;
};

/* Variables and functions */
int dll_fstat64(int, struct stat64 *);
int __wrap___fxstat64(int ver, int fd, struct stat64 *buf) {
  return dll_fstat64(fd, buf);
}


x86 assembly (clang, -O0):
<__wrap___fxstat64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <dll_fstat64@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__wrap___fxstat64>:
mov    %esi,%edi
mov    %rdx,%rsi
jmp    1030 <dll_fstat64@plt>

LLVM IR (-O0):
%struct.stat64 = type { i32 }
define i32 @__wrap___fxstat64(i32 %0, i32 %1, %struct.stat64* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca %struct.stat64*
store i32 %0, i32* %4
store i32 %1, i32* %5
store %struct.stat64* %2, %struct.stat64** %6
%7 = load i32, i32* %5
%8 = load %struct.stat64*, %struct.stat64** %6
%9 = call i32 @dll_fstat64(i32 %7, %struct.stat64* %8)
ret i32 %9
}

LLVM IR (-O2):
%struct.stat64 = type { i32 }
define i32 @__wrap___fxstat64(i32 %0, i32 %1, %struct.stat64* %2) {
%4 = tail call i32 @dll_fstat64(i32 %1, %struct.stat64* %2)
ret i32 %4
}
/* Variables and functions */
float __infer_nondet_float();
float atanhf(float x) { return __infer_nondet_float(); }


x86 assembly (clang, -O0):
<atanhf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__infer_nondet_float@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define float @atanhf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = call float (...) @__infer_nondet_float()
ret float %3
}

LLVM IR (-O2):
define float @atanhf(float %0) {
%2 = tail call float (...) @__infer_nondet_float()
ret float %2
}
void inflate_fast(void) {}


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

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

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

LLVM IR (-O2):
define void @inflate_fast() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void display_version() { printf("%s\n", "mutt_vc_query"); }


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [14 x i8] c"mutt_vc_query\00"
define void @display_version() {
%1 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [14 x i8] c"mutt_vc_query\00"
define void @display_version() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int ws_known_message_type(int type) {
  switch (type) {
  case 0x1:
  case 0x2:
  case 0x8:
  case 0x9:
  case 0xa:
    return 1;
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<ws_known_message_type>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
add    $0xffffffff,%eax
sub    $0x2,%eax
jb     1132 <ws_known_message_type+0x32>
jmp    111e <ws_known_message_type+0x1e>
mov    -0xc(%rbp),%eax
add    $0xfffffff8,%eax
sub    $0x2,%eax
ja     113e <ws_known_message_type+0x3e>
jmp    1132 <ws_known_message_type+0x32>
movl   $0x1,-0x4(%rbp)
jmp    1145 <ws_known_message_type+0x45>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ws_known_message_type>:
add    $0xffffffff,%edi
xor    %eax,%eax
cmp    $0x9,%edi
ja     1117 <ws_known_message_type+0x17>
movslq %edi,%rax
lea    0xeec(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @ws_known_message_type(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %6 [
i32 1, label %5
i32 2, label %5
i32 8, label %5
i32 9, label %5
i32 10, label %5
]
5: ; preds = %1, %1, %1, %1, %1
store i32 1, i32* %2
br label %7
6: ; preds = %1
store i32 0, i32* %2
br label %7
7: ; preds = %6, %5
%8 = load i32, i32* %2
ret i32 %8
}

LLVM IR (-O2):
@switch.table.ws_known_message_type = [10 x i32] [i32 1, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 1, i32 1]
define i32 @ws_known_message_type(i32 %0) {
%2 = add i32 %0, -1
%3 = icmp ult i32 %2, 10
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = sext i32 %2 to i64
%6 = getelementptr inbounds [10 x i32], [10 x i32]* @switch.table.ws_known_message_type, i64 0, i64 %5
%7 = load i32, i32* %6
br label %8
8: ; preds = %1, %4
%9 = phi i32 [ %7, %4 ], [ 0, %1 ]
ret i32 %9
}
/* Type definitions */
struct timeval {
  int tv_usec;
  scalar_t__ tv_sec;
};
typedef int /*<<< orphan*/ fd_set;

/* Variables and functions */
int /*<<< orphan*/ select(int, int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                          int /*<<< orphan*/ *, struct timeval *);
int delay(int us) {
  struct timeval tv;
  tv.tv_sec = 0;
  tv.tv_usec = us;
  (void)select(1, (fd_set *)0, (fd_set *)0, (fd_set *)0, &tv);
  return (1);
}


x86 assembly (clang, -O0):
<delay>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    $0x1,%edi
xor    %eax,%eax
mov    %eax,%ecx
lea    -0x18(%rbp),%r8
mov    %rcx,%rsi
mov    %rcx,%rdx
call   1030 <select@plt>
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<delay>:
sub    $0x18,%rsp
movq   $0x0,0x10(%rsp)
mov    %edi,0x8(%rsp)
lea    0x8(%rsp),%r8
mov    $0x1,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   1030 <select@plt>
mov    $0x1,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i64 }
define i32 @delay(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.timeval
store i32 %0, i32* %2
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i32 0, i32 1
store i64 0, i64* %4
%5 = load i32, i32* %2
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i32 0, i32 0
store i32 %5, i32* %6
%7 = call i32 @select(i32 1, i32* null, i32* null, i32* null, %struct.timeval* %3)
ret i32 1
}

LLVM IR (-O2):
%struct.timeval = type { i32, i64 }
define i32 @delay(i32 %0) {
%2 = alloca %struct.timeval
%3 = bitcast %struct.timeval* %2 to i8*
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i64 0, i32 1
store i64 0, i64* %4
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i64 0, i32 0
store i32 %0, i32* %5
%6 = call i32 @select(i32 1, i32* null, i32* null, i32* null, %struct.timeval* %2)
ret i32 1
}
/* Variables and functions */
scalar_t__ realloc(char **, int);
char **clibf_table_add(char **table, char *add, int table_len) {
  table = (char **)realloc(table, (table_len + 1) * sizeof(char));
  table[table_len] = add;
  return table;
}


x86 assembly (clang, -O0):
<clibf_table_add>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%eax
add    $0x1,%eax
cltq
shl    $0x0,%rax
mov    %eax,%esi
call   1030 <realloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clibf_table_add>:
push   %r14
push   %rbx
push   %rax
mov    %edx,%ebx
mov    %rsi,%r14
lea    0x1(%rbx),%esi
call   1030 <realloc@plt>
movslq %ebx,%rcx
mov    %r14,(%rax,%rcx,8)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8** @clibf_table_add(i8** %0, i8* %1, i32 %2) {
%4 = alloca i8**
%5 = alloca i8*
%6 = alloca i32
store i8** %0, i8*** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8**, i8*** %4
%8 = load i32, i32* %6
%9 = add nsw i32 %8, 1
%10 = sext i32 %9 to i64
%11 = mul i64 %10, 1
%12 = trunc i64 %11 to i32
%13 = call i64 @realloc(i8** %7, i32 %12)
%14 = inttoptr i64 %13 to i8**
store i8** %14, i8*** %4
%15 = load i8*, i8** %5
%16 = load i8**, i8*** %4
%17 = load i32, i32* %6
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i8*, i8** %16, i64 %18
store i8* %15, i8** %19
%20 = load i8**, i8*** %4
ret i8** %20
}

LLVM IR (-O2):
define i8** @clibf_table_add(i8** %0, i8* %1, i32 %2) {
%4 = add nsw i32 %2, 1
%5 = tail call i64 @realloc(i8** %0, i32 %4)
%6 = inttoptr i64 %5 to i8**
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i8*, i8** %6, i64 %7
store i8* %1, i8** %8
ret i8** %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Hello World\n");
  return 1;
}


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

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

LLVM IR (-O0):
@.str = [13 x i8] c"Hello World\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@str = [12 x i8] c"Hello World\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret i32 1
}
/* Variables and functions */
float randFloat();
float getRandFloat(float imin, float imax) {
  return imin + (imax - imin) * randFloat();
}


x86 assembly (clang, -O0):
<getRandFloat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x8(%rbp),%xmm0
subss  -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
mov    $0x0,%al
call   1030 <randFloat@plt>
movss  -0x10(%rbp),%xmm1
movaps %xmm0,%xmm2
movss  -0xc(%rbp),%xmm0
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getRandFloat>:
push   %rax
movss  %xmm0,0x4(%rsp)
subss  %xmm0,%xmm1
movss  %xmm1,(%rsp)
xor    %eax,%eax
call   1030 <randFloat@plt>
mulss  (%rsp),%xmm0
addss  0x4(%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @getRandFloat(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 = load float, float* %3
%8 = fsub float %6, %7
%9 = call float (...) @randFloat()
%10 = call float @llvm.fmuladd.f32(float %8, float %9, float %5)
ret float %10
}

LLVM IR (-O2):
define float @getRandFloat(float %0, float %1) {
%3 = fsub float %1, %0
%4 = tail call float (...) @randFloat()
%5 = tail call float @llvm.fmuladd.f32(float %3, float %4, float %0)
ret float %5
}
/* Variables and functions */
int /*<<< orphan*/ FCEU_QSimpleCommand(int);
void FCEUI_PowerNES(void) { FCEU_QSimpleCommand(0x02); }


x86 assembly (clang, -O0):
<FCEUI_PowerNES>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
call   1030 <FCEU_QSimpleCommand@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<FCEUI_PowerNES>:
mov    $0x2,%edi
jmp    1030 <FCEU_QSimpleCommand@plt>

LLVM IR (-O0):
define void @FCEUI_PowerNES() {
%1 = call i32 @FCEU_QSimpleCommand(i32 2)
ret void
}

LLVM IR (-O2):
define void @FCEUI_PowerNES() {
%1 = tail call i32 @FCEU_QSimpleCommand(i32 2)
ret void
}
/* Variables and functions */
size_t strlen(const char *s) {
  size_t i = 0;
  for (i = 0; s[i] != '\0'; i++)
    ;
  return i;
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1143 <strlen+0x43>
jmp    1132 <strlen+0x32>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1118 <strlen+0x18>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
mov    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <strlen+0x10>
ret

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

LLVM IR (-O2):
define i64 @strlen(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ 0, %1 ], [ %7, %2 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
long timer_to_date(int /*<<< orphan*/);
long date_now(void) { return (timer_to_date(time(NULL))); }


x86 assembly (clang, -O0):
<date_now>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <timer_to_date@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<date_now>:
push   %rax
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <timer_to_date@plt>

LLVM IR (-O0):
define i64 @date_now() {
%1 = call i32 @time(i32* null)
%2 = call i64 @timer_to_date(i32 %1)
ret i64 %2
}

LLVM IR (-O2):
define i64 @date_now() {
%1 = tail call i32 @time(i32* null)
%2 = tail call i64 @timer_to_date(i32 %1)
ret i64 %2
}