xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void isOdd(int n) {
  if (n % 2 == 0)
    printf("Not Weird\n");
  else
    printf("Weird\n");
}


x86 assembly (clang, -O0):
<isOdd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1140 <isOdd+0x30>
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
jmp    114c <isOdd+0x3c>
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isOdd>:
test   $0x1,%dil
lea    0xee5(%rip),%rax
lea    0xee2(%rip),%rdi
cmove  %rax,%rdi
jmp    1030 <puts@plt>

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

LLVM IR (-O2):
@str = [6 x i8] c"Weird\00"
@str.2 = [10 x i8] c"Not Weird\00"
define void @isOdd(i32 %0) {
%2 = and i32 %0, 1
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @str.2, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0)
%5 = tail call i32 @puts(i8* dereferenceable(1) %4)
ret void
}
/* Variables and functions */
scalar_t__ argint(int /*<<< orphan*/, int *);
long rfork(int);
long sys_rfork(void) {
  int flags;
  if (argint(0, &flags) < 0) {
    return -1;
  }
  return rfork(flags);
}


x86 assembly (clang, -O0):
<sys_rfork>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %edi,%edi
lea    -0xc(%rbp),%rsi
call   1030 <argint@plt>
cmp    $0x0,%rax
jge    114a <sys_rfork+0x2a>
movq   $0xffffffffffffffff,-0x8(%rbp)
ff
jmp    1156 <sys_rfork+0x36>
mov    -0xc(%rbp),%edi
call   1040 <rfork@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys_rfork>:
push   %rax
lea    0x4(%rsp),%rsi
xor    %edi,%edi
call   1030 <argint@plt>
test   %rax,%rax
js     113d <sys_rfork+0x1d>
mov    0x4(%rsp),%edi
call   1040 <rfork@plt>
pop    %rcx
ret
mov    $0xffffffffffffffff,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @sys_rfork() {
%1 = alloca i64
%2 = alloca i32
%3 = call i64 @argint(i32 0, i32* %2)
%4 = icmp slt i64 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %0
store i64 -1, i64* %1
br label %9
6: ; preds = %0
%7 = load i32, i32* %2
%8 = call i64 @rfork(i32 %7)
store i64 %8, i64* %1
br label %9
9: ; preds = %6, %5
%10 = load i64, i64* %1
ret i64 %10
}

LLVM IR (-O2):
define i64 @sys_rfork() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i64 @argint(i32 0, i32* %1)
%4 = icmp slt i64 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %0
%6 = load i32, i32* %1
%7 = call i64 @rfork(i32 %6)
br label %8
8: ; preds = %0, %5
%9 = phi i64 [ %7, %5 ], [ -1, %0 ]
ret i64 %9
}
/* Variables and functions */
int /*<<< orphan*/ kfree(void *);
int /*<<< orphan*/ kmem_cache_free(void *, void *);
void mtrie_free(void *cache, void *ptr) {
  if (ptr) {
    if (cache)
      kmem_cache_free(cache, ptr);
    else
      kfree(ptr);
  }
}


x86 assembly (clang, -O0):
<mtrie_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1166 <mtrie_free+0x46>
cmpq   $0x0,-0x8(%rbp)
je     1158 <mtrie_free+0x38>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <kmem_cache_free@plt>
jmp    1161 <mtrie_free+0x41>
mov    -0x10(%rbp),%rdi
call   1040 <kfree@plt>
jmp    1166 <mtrie_free+0x46>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mtrie_free>:
test   %rsi,%rsi
je     112f <mtrie_free+0xf>
test   %rdi,%rdi
je     1130 <mtrie_free+0x10>
jmp    1030 <kmem_cache_free@plt>
ret
mov    %rsi,%rdi
jmp    1040 <kfree@plt>

LLVM IR (-O0):
define void @mtrie_free(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = icmp ne i8* %5, null
br i1 %6, label %7, label %18
7: ; preds = %2
%8 = load i8*, i8** %3
%9 = icmp ne i8* %8, null
br i1 %9, label %10, label %14
10: ; preds = %7
%11 = load i8*, i8** %3
%12 = load i8*, i8** %4
%13 = call i32 @kmem_cache_free(i8* %11, i8* %12)
br label %17
14: ; preds = %7
%15 = load i8*, i8** %4
%16 = call i32 @kfree(i8* %15)
br label %17
17: ; preds = %14, %10
br label %18
18: ; preds = %17, %2
ret void
}

LLVM IR (-O2):
define void @mtrie_free(i8* %0, i8* %1) {
%3 = icmp eq i8* %1, null
br i1 %3, label %10, label %4
4: ; preds = %2
%5 = icmp eq i8* %0, null
br i1 %5, label %8, label %6
6: ; preds = %4
%7 = tail call i32 @kmem_cache_free(i8* %0, i8* %1)
br label %10
8: ; preds = %4
%9 = tail call i32 @kfree(i8* %1)
br label %10
10: ; preds = %6, %8, %2
ret void
}
void cdev_init(struct cdev *cdev, struct file_operations const *fops) {
  unsigned long __cil_tmp3;
  unsigned long __cil_tmp4;
  {
    __cil_tmp3 = (unsigned long)cdev;
    __cil_tmp4 = __cil_tmp3 + 8;
    *((struct file_operations const **)__cil_tmp4) = fops;
    return;
  }
}


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

x86 assembly (clang, -O2):
<cdev_init>:
mov    %rsi,0x8(%rdi)
ret

LLVM IR (-O0):
%struct.cdev = type opaque
%struct.file_operations = type opaque
define void @cdev_init(%struct.cdev* %0, %struct.file_operations* %1) {
%3 = alloca %struct.cdev*
%4 = alloca %struct.file_operations*
%5 = alloca i64
%6 = alloca i64
store %struct.cdev* %0, %struct.cdev** %3
store %struct.file_operations* %1, %struct.file_operations** %4
%7 = load %struct.cdev*, %struct.cdev** %3
%8 = ptrtoint %struct.cdev* %7 to i64
store i64 %8, i64* %5
%9 = load i64, i64* %5
%10 = add i64 %9, 8
store i64 %10, i64* %6
%11 = load %struct.file_operations*, %struct.file_operations** %4
%12 = load i64, i64* %6
%13 = inttoptr i64 %12 to %struct.file_operations**
store %struct.file_operations* %11, %struct.file_operations** %13
ret void
}

LLVM IR (-O2):
%struct.cdev = type opaque
%struct.file_operations = type opaque
define void @cdev_init(%struct.cdev* %0, %struct.file_operations* %1) {
%3 = ptrtoint %struct.cdev* %0 to i64
%4 = add i64 %3, 8
%5 = inttoptr i64 %4 to %struct.file_operations**
store %struct.file_operations* %1, %struct.file_operations** %5
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ d;

/* Variables and functions */
int /*<<< orphan*/ oled_SendCommand(unsigned char *, int);
void EntireDisplayOnOff(char x) {
  unsigned char d[] = {0xA4 | (x & 0x01)};
  oled_SendCommand(d, sizeof(d));
}


x86 assembly (clang, -O0):
<EntireDisplayOnOff>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
and    $0x1,%eax
or     $0xa4,%eax
mov    %al,-0x2(%rbp)
lea    -0x2(%rbp),%rdi
mov    $0x1,%esi
call   1030 <oled_SendCommand@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EntireDisplayOnOff>:
push   %rax
and    $0x1,%dil
or     $0xa4,%dil
mov    %dil,0x7(%rsp)
lea    0x7(%rsp),%rdi
mov    $0x1,%esi
call   1030 <oled_SendCommand@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @EntireDisplayOnOff(i8 signext %0) {
%2 = alloca i8
%3 = alloca [1 x i8]
store i8 %0, i8* %2
%4 = getelementptr inbounds [1 x i8], [1 x i8]* %3, i64 0, i64 0
%5 = load i8, i8* %2
%6 = sext i8 %5 to i32
%7 = and i32 %6, 1
%8 = or i32 164, %7
%9 = trunc i32 %8 to i8
store i8 %9, i8* %4
%10 = getelementptr inbounds [1 x i8], [1 x i8]* %3, i64 0, i64 0
%11 = call i32 @oled_SendCommand(i8* %10, i32 1)
ret void
}

LLVM IR (-O2):
define void @EntireDisplayOnOff(i8 signext %0) {
%2 = alloca [1 x i8]
%3 = getelementptr inbounds [1 x i8], [1 x i8]* %2, i64 0, i64 0
%4 = and i8 %0, 1
%5 = or i8 %4, -92
store i8 %5, i8* %3
%6 = call i32 @oled_SendCommand(i8* %3, i32 1)
ret void
}
/* Variables and functions */
unsigned char *hours_of_observational_data_cutoff_after_reference_time_location(
    unsigned char **);
int int2(unsigned char *);
int hours_of_observational_data_cutoff_after_reference_time(
    unsigned char **sec) {
  unsigned char *p;
  p = hours_of_observational_data_cutoff_after_reference_time_location(sec);
  if (p)
    return int2(p);
  return -1;
}


x86 assembly (clang, -O0):
<hours_of_observational_data_cutoff_after_reference_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <hours_of_observational_data_cutoff_after_reference_time_location@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1155 <hours_of_observational_data_cutoff_after_reference_time+0x35>
mov    -0x18(%rbp),%rdi
call   1030 <int2@plt>
mov    %eax,-0x4(%rbp)
jmp    115c <hours_of_observational_data_cutoff_after_reference_time+0x3c>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hours_of_observational_data_cutoff_after_reference_time>:
push   %rax
call   1040 <hours_of_observational_data_cutoff_after_reference_time_location@plt>
test   %rax,%rax
je     1134 <hours_of_observational_data_cutoff_after_reference_time+0x14>
mov    %rax,%rdi
pop    %rax
jmp    1030 <int2@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @hours_of_observational_data_cutoff_after_reference_time(i8** %0) {
%2 = tail call i8* @hours_of_observational_data_cutoff_after_reference_time_location(i8** %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @int2(i8* %2)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ %5, %4 ], [ -1, %1 ]
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ maccess(void *);
size_t rdtsc();
size_t onlyreload(void *addr) {
  size_t time = rdtsc();
  maccess(addr);
  size_t delta = rdtsc() - time;
  return delta;
}


x86 assembly (clang, -O0):
<onlyreload>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <rdtsc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <maccess@plt>
mov    $0x0,%al
call   1030 <rdtsc@plt>
sub    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<onlyreload>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <rdtsc@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1040 <maccess@plt>
xor    %eax,%eax
call   1030 <rdtsc@plt>
sub    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i64 @onlyreload(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = alloca i64
store i8* %0, i8** %2
%5 = call i64 (...) @rdtsc()
store i64 %5, i64* %3
%6 = load i8*, i8** %2
%7 = call i32 @maccess(i8* %6)
%8 = call i64 (...) @rdtsc()
%9 = load i64, i64* %3
%10 = sub i64 %8, %9
store i64 %10, i64* %4
%11 = load i64, i64* %4
ret i64 %11
}

LLVM IR (-O2):
define i64 @onlyreload(i8* %0) {
%2 = tail call i64 (...) @rdtsc()
%3 = tail call i32 @maccess(i8* %0)
%4 = tail call i64 (...) @rdtsc()
%5 = sub i64 %4, %2
ret i64 %5
}
int sc_is_symbol(char el) { return ((0x21 <= el && el <= 0x7e)) ? 1 : 0; }


x86 assembly (clang, -O0):
<sc_is_symbol>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
xor    %eax,%eax
mov    $0x21,%ecx
cmp    %edx,%ecx
mov    %al,-0x2(%rbp)
jg     112d <sc_is_symbol+0x2d>
movsbl -0x1(%rbp),%eax
cmp    $0x7e,%eax
setle  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%dl
xor    %eax,%eax
mov    $0x1,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sc_is_symbol>:
add    $0xdf,%dil
xor    %eax,%eax
cmp    $0x5e,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @sc_is_symbol(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sle i32 33, %4
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 126
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ false, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i64
%13 = select i1 %11, i32 1, i32 0
ret i32 %13
}

LLVM IR (-O2):
define i32 @sc_is_symbol(i8 signext %0) {
%2 = add i8 %0, -33
%3 = icmp ult i8 %2, 94
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
int exec(char *path, char **argv) {
  printf("exec() not implemented\n");
  exit(-1);
}


x86 assembly (clang, -O0):
<exec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<exec>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"exec() not implemented\0A\00"
define i32 @exec(i8* %0, i8** %1) {
%3 = alloca i8*
%4 = alloca i8**
store i8* %0, i8** %3
store i8** %1, i8*** %4
%5 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@str = [23 x i8] c"exec() not implemented\00"
define i32 @exec(i8* nocapture readnone %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @exit(i32 -1)
unreachable
}
/* 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    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%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 */
scalar_t__ IsLetter(char);
scalar_t__ IsSpecialChar(char);
int IsFirstNickChar(char c) {
  if (IsLetter(c) || IsSpecialChar(c)) {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<IsFirstNickChar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%edi
call   1030 <IsLetter@plt>
cmp    $0x0,%rax
jne    1154 <IsFirstNickChar+0x34>
movsbl -0x5(%rbp),%edi
call   1040 <IsSpecialChar@plt>
cmp    $0x0,%rax
je     1160 <IsFirstNickChar+0x40>
movl   $0x1,-0x4(%rbp)
jmp    1167 <IsFirstNickChar+0x47>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<IsFirstNickChar>:
push   %rbx
mov    %edi,%ebx
call   1030 <IsLetter@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1137 <IsFirstNickChar+0x17>
pop    %rbx
ret
movsbl %bl,%edi
call   1040 <IsSpecialChar@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @IsFirstNickChar(i8 signext %0) {
%2 = tail call i64 @IsLetter(i8 signext %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i64 @IsSpecialChar(i8 signext %0)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ GLint;
typedef int /*<<< orphan*/ GLenum;

/* Variables and functions */
int /*<<< orphan*/ __glConvolutionParameterfv_size(int /*<<< orphan*/);
__attribute__((visibility("internal"))) __attribute__((pure)) GLint
__glConvolutionParameteriv_size(GLenum e) {
  return __glConvolutionParameterfv_size(e);
}


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

x86 assembly (clang, -O2):
<__glConvolutionParameteriv_size>:
jmp    1030 <__glConvolutionParameterfv_size@plt>

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

LLVM IR (-O2):
define hidden i32 @__glConvolutionParameteriv_size(i32 %0) {
%2 = tail call i32 @__glConvolutionParameterfv_size(i32 %0)
ret i32 %2
}
XMapSubwindows() {}


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

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

LLVM IR (-O0):
define i32 @XMapSubwindows() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @XMapSubwindows() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
void print_version() {
  printf("%s\n", "2.0.1");
  exit(0);
}


x86 assembly (clang, -O0):
<print_version>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xed2(%rip),%rsi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<print_version>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xed5(%rip),%rsi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [6 x i8] c"2.0.1\00"
define void @print_version() {
%1 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [6 x i8] c"2.0.1\00"
define void @print_version() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  float x = 2.55;
  printf("%.2f\n", (3 * x * x * x) - (5 * x * x) + 6);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movss  0xee5(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xed4(%rip),%xmm0
mulss  -0x8(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  -0x8(%rbp),%xmm2
movss  0xeb9(%rip),%xmm1
mulss  -0x8(%rbp),%xmm1
mulss  -0x8(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  0xe8e(%rip),%xmm1
addss  %xmm1,%xmm0
cvttss2si %xmm0,%esi
lea    0xe8f(%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    $0x17,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%.2f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
store i32 0, i32* %1
store float 0x4004666660000000, float* %2
%3 = load float, float* %2
%4 = fmul float 3.000000e+00, %3
%5 = load float, float* %2
%6 = fmul float %4, %5
%7 = load float, float* %2
%8 = load float, float* %2
%9 = fmul float 5.000000e+00, %8
%10 = load float, float* %2
%11 = fmul float %9, %10
%12 = fneg float %11
%13 = call float @llvm.fmuladd.f32(float %6, float %7, float %12)
%14 = fadd float %13, 6.000000e+00
%15 = fptosi float %14 to i32
%16 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %15)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"%.2f\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 23)
ret i32 0
}
/* Variables and functions */
int LOCK_EX;
int LOCK_NB;
int LOCK_UN;
int /*<<< orphan*/ flock(int /*<<< orphan*/, int);
main() { flock(0, LOCK_EX | LOCK_UN | LOCK_NB); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%esi
mov    0x2eb4(%rip),%rax
or     (%rax),%esi
mov    0x2e9b(%rip),%rax
or     (%rax),%esi
xor    %edi,%edi
call   1030 <flock@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    0x2eb9(%rip),%rcx
mov    (%rcx),%esi
or     (%rax),%esi
mov    0x2e9e(%rip),%rax
or     (%rax),%esi
xor    %edi,%edi
call   1030 <flock@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@LOCK_EX = global i32 0
@LOCK_UN = global i32 0
@LOCK_NB = global i32 0
define i32 @main() {
%1 = load i32, i32* @LOCK_EX
%2 = load i32, i32* @LOCK_UN
%3 = or i32 %1, %2
%4 = load i32, i32* @LOCK_NB
%5 = or i32 %3, %4
%6 = call i32 @flock(i32 0, i32 %5)
ret i32 0
}

LLVM IR (-O2):
@LOCK_EX = global i32 0
@LOCK_UN = global i32 0
@LOCK_NB = global i32 0
define i32 @main() {
%1 = load i32, i32* @LOCK_EX
%2 = load i32, i32* @LOCK_UN
%3 = or i32 %2, %1
%4 = load i32, i32* @LOCK_NB
%5 = or i32 %3, %4
%6 = tail call i32 @flock(i32 0, i32 %5)
ret i32 0
}
void main() {
  __asm__("         jmp forward\n"
          "backward:\n"
          "         pop   %rsi\n"
          "         mov   $4, %rax\n"
          "         mov   $2, %rdi\n"
          "         mov   %rsi, %rcx\n"
          "         mov   $12, %rdx\n"
          "         int   $0x80\n"
          "         int3\n"
          "forward:\n"
          "         call backward\n"
          "         .string \"Hello World\\n\"");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
jmp    1125 <forward>

x86 assembly (clang, -O2):
<main>:
jmp    111e <forward>

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

LLVM IR (-O2):
define void @main() {
tail call void asm sideeffect " jmp forward\0Abackward:\0A pop %rsi\0A mov $$4, %rax\0A mov $$2, %rdi\0A mov %rsi, %rcx\0A mov $$12, %rdx\0A int $$0x80\0A int3\0Aforward:\0A call backward\0A .string \22Hello World\\n\22", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __u64;

/* Variables and functions */
__u64 ptr_to_u64(void *ptr) { return (__u64)(unsigned long)ptr; }


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

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

LLVM IR (-O0):
define i32 @ptr_to_u64(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = ptrtoint i8* %3 to i64
%5 = trunc i64 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @ptr_to_u64(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = trunc i64 %2 to i32
ret i32 %3
}
void console_deinit(void) {}


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

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

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

LLVM IR (-O2):
define void @console_deinit() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void *thr_fn(void *arg) {
  printf("detached thread 1\n");
  return (void *)0;
}


x86 assembly (clang, -O0):
<thr_fn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [19 x i8] c"detached thread 1\0A\00"
define i8* @thr_fn(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret i8* null
}

LLVM IR (-O2):
@str = [18 x i8] c"detached thread 1\00"
define noalias i8* @thr_fn(i8* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
ret i8* null
}
/* Type definitions */
typedef int /*<<< orphan*/ regex_t;

/* Variables and functions */
int /*<<< orphan*/ ERROR_CONSTRUCTION_FAILED(char *, char const *);
int regcomp(int /*<<< orphan*/ *, char const *, int /*<<< orphan*/);
int compileRegex(regex_t *regex, const char *regexString) {
  int reti;
  reti = regcomp(regex, regexString, 0);
  if (reti) {
    ERROR_CONSTRUCTION_FAILED("regex", regexString);
  }
  return reti;
}


x86 assembly (clang, -O0):
<compileRegex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
xor    %edx,%edx
call   1030 <regcomp@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     115c <compileRegex+0x3c>
mov    -0x10(%rbp),%rsi
lea    0xea9(%rip),%rdi
call   1040 <ERROR_CONSTRUCTION_FAILED@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compileRegex>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
xor    %edx,%edx
call   1030 <regcomp@plt>
mov    %eax,%ebp
test   %eax,%eax
je     1142 <compileRegex+0x22>
lea    0xec6(%rip),%rdi
mov    %rbx,%rsi
call   1040 <ERROR_CONSTRUCTION_FAILED@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"regex\00"
define i32 @compileRegex(i32* %0, i8* %1) {
%3 = tail call i32 @regcomp(i32* %0, i8* %1, i32 0)
%4 = icmp eq i32 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @ERROR_CONSTRUCTION_FAILED(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %1)
br label %7
7: ; preds = %5, %2
ret i32 %3
}
/* Type definitions */
struct list_head {
  int dummy;
};
struct list_entry {
  int dummy;
};

/* Variables and functions */
struct list_entry *list_front(struct list_head *);
int /*<<< orphan*/ list_remove(struct list_entry *);
struct list_entry *list_pop_front(struct list_head *head) {
  struct list_entry *entry;
  entry = list_front(head);
  if (entry)
    list_remove(entry);
  return entry;
}


x86 assembly (clang, -O0):
<list_pop_front>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <list_front@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     114d <list_pop_front+0x2d>
mov    -0x10(%rbp),%rdi
call   1040 <list_remove@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<list_pop_front>:
push   %rbx
call   1030 <list_front@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1136 <list_pop_front+0x16>
mov    %rbx,%rdi
call   1040 <list_remove@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.list_entry = type { i32 }
%struct.list_head = type { i32 }
define %struct.list_entry* @list_pop_front(%struct.list_head* %0) {
%2 = alloca %struct.list_head*
%3 = alloca %struct.list_entry*
store %struct.list_head* %0, %struct.list_head** %2
%4 = load %struct.list_head*, %struct.list_head** %2
%5 = call %struct.list_entry* @list_front(%struct.list_head* %4)
store %struct.list_entry* %5, %struct.list_entry** %3
%6 = load %struct.list_entry*, %struct.list_entry** %3
%7 = icmp ne %struct.list_entry* %6, null
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load %struct.list_entry*, %struct.list_entry** %3
%10 = call i32 @list_remove(%struct.list_entry* %9)
br label %11
11: ; preds = %8, %1
%12 = load %struct.list_entry*, %struct.list_entry** %3
ret %struct.list_entry* %12
}

LLVM IR (-O2):
%struct.list_entry = type { i32 }
%struct.list_head = type { i32 }
define %struct.list_entry* @list_pop_front(%struct.list_head* %0) {
%2 = tail call %struct.list_entry* @list_front(%struct.list_head* %0)
%3 = icmp eq %struct.list_entry* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @list_remove(%struct.list_entry* %2)
br label %6
6: ; preds = %4, %1
ret %struct.list_entry* %2
}
/* Variables and functions */
double RAND_MAX;
double rand();
double RandDB(double a, double b) {
  return (a + (rand() * 1.0) / RAND_MAX * (b - a));
}


x86 assembly (clang, -O0):
<RandDB>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
movsd  -0x18(%rbp),%xmm1
movsd  0xec0(%rip),%xmm2
mulsd  %xmm2,%xmm0
mov    0x2e9d(%rip),%rax
divsd  (%rax),%xmm0
movsd  -0x10(%rbp),%xmm2
subsd  -0x8(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RandDB>:
sub    $0x18,%rsp
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
xor    %eax,%eax
call   1030 <rand@plt>
mov    0x2eba(%rip),%rax
divsd  (%rax),%xmm0
movsd  0x8(%rsp),%xmm1
movsd  0x10(%rsp),%xmm2
subsd  %xmm1,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
@RAND_MAX = global double 0.000000e+00
define double @RandDB(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = call double (...) @rand()
%7 = fmul double %6, 1.000000e+00
%8 = load double, double* @RAND_MAX
%9 = fdiv double %7, %8
%10 = load double, double* %4
%11 = load double, double* %3
%12 = fsub double %10, %11
%13 = call double @llvm.fmuladd.f64(double %9, double %12, double %5)
ret double %13
}

LLVM IR (-O2):
@RAND_MAX = global double 0.000000e+00
define double @RandDB(double %0, double %1) {
%3 = tail call double (...) @rand()
%4 = load double, double* @RAND_MAX
%5 = fdiv double %3, %4
%6 = fsub double %1, %0
%7 = tail call double @llvm.fmuladd.f64(double %5, double %6, double %0)
ret double %7
}
int xmpi_select_read(int fd, int msec) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @xmpi_select_read(i32 %0, i32 %1) {
ret i32 0
}
double __attribute__((mips16)) f2(int i, float f, double d) {
  return i + f + d;
}


x86 assembly (clang, -O0):
<f2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movss  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
cvtsi2ssl -0x4(%rbp),%xmm0
addss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
addsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<f2>:
cvtsi2ss %edi,%xmm2
addss  %xmm0,%xmm2
xorps  %xmm0,%xmm0
cvtss2sd %xmm2,%xmm0
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @f2(i32 %0, float %1, double %2) {
%4 = alloca i32
%5 = alloca float
%6 = alloca double
store i32 %0, i32* %4
store float %1, float* %5
store double %2, double* %6
%7 = load i32, i32* %4
%8 = sitofp i32 %7 to float
%9 = load float, float* %5
%10 = fadd float %8, %9
%11 = fpext float %10 to double
%12 = load double, double* %6
%13 = fadd double %11, %12
ret double %13
}

LLVM IR (-O2):
define double @f2(i32 %0, float %1, double %2) {
%4 = sitofp i32 %0 to float
%5 = fadd float %4, %1
%6 = fpext float %5 to double
%7 = fadd double %6, %2
ret double %7
}
/* Type definitions */
typedef int /*<<< orphan*/ Widget;

/* Variables and functions */
int /*<<< orphan*/ XtDisplay(int /*<<< orphan*/);
int /*<<< orphan*/ XtWindow(int /*<<< orphan*/);
int /*<<< orphan*/ glXSwapBuffers(int /*<<< orphan*/, int /*<<< orphan*/);
void GLwDrawingAreaSwapBuffers(Widget w) {
  glXSwapBuffers(XtDisplay(w), XtWindow(w));
}


x86 assembly (clang, -O0):
<GLwDrawingAreaSwapBuffers>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <XtDisplay@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <XtWindow@plt>
mov    -0x8(%rbp),%edi
mov    %eax,%esi
call   1050 <glXSwapBuffers@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GLwDrawingAreaSwapBuffers>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
call   1040 <XtDisplay@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1030 <XtWindow@plt>
mov    %ebp,%edi
mov    %eax,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <glXSwapBuffers@plt>

LLVM IR (-O0):
define void @GLwDrawingAreaSwapBuffers(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @XtDisplay(i32 %3)
%5 = load i32, i32* %2
%6 = call i32 @XtWindow(i32 %5)
%7 = call i32 @glXSwapBuffers(i32 %4, i32 %6)
ret void
}

LLVM IR (-O2):
define void @GLwDrawingAreaSwapBuffers(i32 %0) {
%2 = tail call i32 @XtDisplay(i32 %0)
%3 = tail call i32 @XtWindow(i32 %0)
%4 = tail call i32 @glXSwapBuffers(i32 %2, i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void show_version(char *toolname) {
  fprintf(stderr, "spill version %s\n", "dev");
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [18 x i8] c"spill version %s\0A\00"
@.str.1 = [4 x i8] c"dev\00"
define void @show_version(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [18 x i8] c"spill version %s\0A\00"
@.str.1 = [4 x i8] c"dev\00"
define void @show_version(i8* nocapture readnone %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ pacer_to_heart_diastolic_pulse();
void heart_out_to_body_diastolic_pulse() { pacer_to_heart_diastolic_pulse(); }


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

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

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

LLVM IR (-O2):
define void @heart_out_to_body_diastolic_pulse() {
%1 = tail call i32 (...) @pacer_to_heart_diastolic_pulse()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print_graph(int *, int, int);
int /*<<< orphan*/ read_words(int *, int);
int main() {
  int count[16];
  read_words(count, 16);
  print_graph(count, 16, 10);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x50(%rbp),%rdi
mov    $0x10,%esi
call   1040 <read_words@plt>
lea    -0x50(%rbp),%rdi
mov    $0x10,%esi
mov    $0xa,%edx
call   1030 <print_graph@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x40,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x10,%esi
call   1040 <read_words@plt>
mov    %rbx,%rdi
mov    $0x10,%esi
mov    $0xa,%edx
call   1030 <print_graph@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [16 x i32]
store i32 0, i32* %1
%3 = getelementptr inbounds [16 x i32], [16 x i32]* %2, i64 0, i64 0
%4 = call i32 @read_words(i32* %3, i32 16)
%5 = getelementptr inbounds [16 x i32], [16 x i32]* %2, i64 0, i64 0
%6 = call i32 @print_graph(i32* %5, i32 16, i32 10)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [16 x i32]
%2 = bitcast [16 x i32]* %1 to i8*
%3 = getelementptr inbounds [16 x i32], [16 x i32]* %1, i64 0, i64 0
%4 = call i32 @read_words(i32* %3, i32 16)
%5 = call i32 @print_graph(i32* %3, i32 16, i32 10)
ret i32 0
}
void abcde8fghijklmn9opqrstuvwxzy() {}


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

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

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

LLVM IR (-O2):
define void @abcde8fghijklmn9opqrstuvwxzy() {
ret void
}
int test_imm_11int8_mem(signed char *val) {
  return ((*val) & (-0x11 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_11int8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edx
and    $0xffffffef,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_11int8_mem>:
testb  $0xef,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_11int8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -17
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void of_free(void *ptr) {
  if (ptr) {
    free(ptr);
  }
}


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

x86 assembly (clang, -O2):
<of_free>:
test   %rdi,%rdi
je     111a <of_free+0xa>
jmp    1030 <free@plt>
ret

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

LLVM IR (-O2):
define void @of_free(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %3, %1
ret void
}
/* Variables and functions */
scalar_t__ strcmp(char const *, char *);
int test_callback1(int err, const char *msg) {
  if (strcmp(msg, "callback message") == 0) {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<test_callback1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed6(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1145 <test_callback1+0x35>
movl   $0x1,-0x4(%rbp)
jmp    114c <test_callback1+0x3c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [17 x i8] c"callback message\00"
define i32 @test_callback1(i32 %0, i8* %1) {
%3 = tail call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
unsigned xrop3_63_1_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  stk1 = T & S;
  stk1 = ~stk1;
  return (stk1 & (~S) & (~T)) | (D & S) | (D & T);
}


x86 assembly (clang, -O0):
<xrop3_63_1_1>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
and    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x10(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0x10(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_63_1_1>:
mov    %edi,%ecx
shl    $0x8,%ecx
or     %edi,%ecx
mov    %esi,%eax
shl    $0x8,%eax
or     %esi,%eax
or     %ecx,%eax
not    %eax
or     %edi,%esi
or     %esi,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_63_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%9 = load i8, i8* %3
%10 = zext i8 %9 to i32
%11 = shl i32 %10, 8
%12 = load i8, i8* %3
%13 = zext i8 %12 to i32
%14 = or i32 %11, %13
store i32 %14, i32* %6
%15 = load i8, i8* %4
%16 = zext i8 %15 to i32
%17 = shl i32 %16, 8
%18 = load i8, i8* %4
%19 = zext i8 %18 to i32
%20 = or i32 %17, %19
store i32 %20, i32* %7
%21 = load i32, i32* %7
%22 = load i32, i32* %6
%23 = and i32 %21, %22
store i32 %23, i32* %8
%24 = load i32, i32* %8
%25 = xor i32 %24, -1
store i32 %25, i32* %8
%26 = load i32, i32* %8
%27 = load i32, i32* %6
%28 = xor i32 %27, -1
%29 = and i32 %26, %28
%30 = load i32, i32* %7
%31 = xor i32 %30, -1
%32 = and i32 %29, %31
%33 = load i32, i32* %5
%34 = load i32, i32* %6
%35 = and i32 %33, %34
%36 = or i32 %32, %35
%37 = load i32, i32* %5
%38 = load i32, i32* %7
%39 = and i32 %37, %38
%40 = or i32 %36, %39
ret i32 %40
}

LLVM IR (-O2):
define i32 @xrop3_63_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = or i32 %6, %4
%8 = xor i32 %7, -1
%9 = or i8 %1, %0
%10 = zext i8 %9 to i32
%11 = or i32 %10, %8
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ atof(char *);
int /*<<< orphan*/ putDouble(int /*<<< orphan*/);
void IF_vers(void) { putDouble(atof("0.44")); }


x86 assembly (clang, -O0):
<IF_vers>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <atof@plt>
mov    %eax,%edi
call   1040 <putDouble@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<IF_vers>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <atof@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <putDouble@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"0.44\00"
define void @IF_vers() {
%1 = call i32 @atof(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @putDouble(i32 %1)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"0.44\00"
define void @IF_vers() {
%1 = tail call i32 @atof(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @putDouble(i32 %1)
ret void
}
/* Variables and functions */
void *_sp_realloc(int /*<<< orphan*/ *, size_t);
void *sp_mem_alloc(size_t size) { return _sp_realloc(NULL, size); }


x86 assembly (clang, -O0):
<sp_mem_alloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edi
call   1030 <_sp_realloc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sp_mem_alloc>:
mov    %rdi,%rsi
xor    %edi,%edi
jmp    1030 <_sp_realloc@plt>

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

LLVM IR (-O2):
define i8* @sp_mem_alloc(i64 %0) {
%2 = tail call i8* @_sp_realloc(i32* null, i64 %0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ trap_SendConsoleCommand(char *);
void CG_ServerCloseMenus_f(void) { trap_SendConsoleCommand("closemenus\n"); }


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

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

LLVM IR (-O0):
@.str = [12 x i8] c"closemenus\0A\00"
define void @CG_ServerCloseMenus_f() {
%1 = call i32 @trap_SendConsoleCommand(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"closemenus\0A\00"
define void @CG_ServerCloseMenus_f() {
%1 = tail call i32 @trap_SendConsoleCommand(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}
unsigned long usec_to_nsec(unsigned long usec) { return usec * 1000; }


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

x86 assembly (clang, -O2):
<usec_to_nsec>:
imul   $0x3e8,%rdi,%rax
ret

LLVM IR (-O0):
define i64 @usec_to_nsec(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = mul i64 %3, 1000
ret i64 %4
}

LLVM IR (-O2):
define i64 @usec_to_nsec(i64 %0) {
%2 = mul i64 %0, 1000
ret i64 %2
}
int (*(*f4(int i))[10])(int i, int k) {}


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

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

LLVM IR (-O0):
define [10 x i32 (i32, i32)*]* @f4(i32 %0) {
%2 = alloca [10 x i32 (i32, i32)*]*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load [10 x i32 (i32, i32)*]*, [10 x i32 (i32, i32)*]** %2
ret [10 x i32 (i32, i32)*]* %4
}

LLVM IR (-O2):
define noalias [10 x i32 (i32, i32)*]* @f4(i32 %0) {
ret [10 x i32 (i32, i32)*]* undef
}