xunge/DecIR huggingface dataset:
int afterl(unsigned long a, unsigned long b) { return (long)(a - b) > 0; }


x86 assembly (clang, -O0):
<afterl>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
sub    -0x10(%rbp),%rax
cmp    $0x0,%rax
setg   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<afterl>:
sub    %rsi,%rdi
xor    %eax,%eax
test   %rdi,%rdi
setg   %al
ret

LLVM IR (-O0):
define i32 @afterl(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = sub i64 %5, %6
%8 = icmp sgt i64 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @afterl(i64 %0, i64 %1) {
%3 = sub i64 %0, %1
%4 = icmp sgt i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
void gtk_notebook_append_page() {}


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

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

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

LLVM IR (-O2):
define void @gtk_notebook_append_page() {
ret void
}
void rmdirfiles(char *path) {}


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

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

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

LLVM IR (-O2):
define void @rmdirfiles(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int myAtoi(char *);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, char *);
int main(int argc, char *argv[]) {
  char buf[50];
  scanf("%s", buf);
  printf("%d\n", myAtoi(buf));
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x40,%rsp
lea    0xec4(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1040 <scanf@plt>
mov    %rbx,%rdi
call   1050 <myAtoi@plt>
lea    0xead(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [50 x i8]
%4 = getelementptr inbounds [50 x i8], [50 x i8]* %3, i64 0, i64 0
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @myAtoi(i8* %4)
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  int age = 31;
  int height = (12 * 6) + 2;
  printf("I am %d years old.\n", age);
  printf("I am %d inches tall.\n", height);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x1f,%esi
call   1030 <printf@plt>
lea    0xeeb(%rip),%rdi
mov    $0x4a,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [20 x i8] c"I am %d years old.\0A\00"
@.str.1 = [22 x i8] c"I am %d inches tall.\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 31)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 74)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void shl_freep(void *p) { free(*(void **)p); }


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

x86 assembly (clang, -O2):
<shl_freep>:
mov    (%rdi),%rdi
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @shl_freep(i8* nocapture %0) {
%2 = bitcast i8* %0 to i8**
%3 = load i8*, i8** %2
%4 = tail call i32 @free(i8* %3)
ret void
}
void *bpf_internal_load_pointer_neg_helper(const struct sk_buff *skb, int k,
                                           unsigned int size) {}


x86 assembly (clang, -O0):
<bpf_internal_load_pointer_neg_helper>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.sk_buff = type opaque
define i8* @bpf_internal_load_pointer_neg_helper(%struct.sk_buff* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca %struct.sk_buff*
%6 = alloca i32
%7 = alloca i32
store %struct.sk_buff* %0, %struct.sk_buff** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
%8 = load i8*, i8** %4
ret i8* %8
}

LLVM IR (-O2):
%struct.sk_buff = type opaque
define noalias i8* @bpf_internal_load_pointer_neg_helper(%struct.sk_buff* nocapture readnone %0, i32 %1, i32 %2) {
ret i8* undef
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
void *realloc(void *, size_t);
int /*<<< orphan*/ stderr;
void *wrealloc(void *block, size_t size) {
  void *tmp;
  tmp = NULL;
  tmp = realloc(block, size);
  if (tmp == NULL) {
    fprintf(stderr, "Realloc() error: Out of memory.\n");
    exit(EXIT_FAILURE);
  }
  return (tmp);
}


x86 assembly (clang, -O0):
<wrealloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1187 <wrealloc+0x57>
mov    0x2e75(%rip),%rax
mov    (%rax),%edi
lea    0xe8c(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e58(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wrealloc>:
push   %rax
call   1040 <realloc@plt>
test   %rax,%rax
je     113d <wrealloc+0xd>
pop    %rcx
ret
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
lea    0xeb3(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e7f(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [33 x i8] c"Realloc() error: Out of memory.\0A\00"
@EXIT_FAILURE = global i32 0
define i8* @wrealloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
store i8* null, i8** %5
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = call i8* @realloc(i8* %6, i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %16
11: ; preds = %2
%12 = load i32, i32* @stderr
%13 = call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%14 = load i32, i32* @EXIT_FAILURE
%15 = call i32 @exit(i32 %14)
unreachable
16: ; preds = %2
%17 = load i8*, i8** %5
ret i8* %17
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [33 x i8] c"Realloc() error: Out of memory.\0A\00"
@EXIT_FAILURE = global i32 0
define noalias i8* @wrealloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %10
5: ; preds = %2
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* @EXIT_FAILURE
%9 = tail call i32 @exit(i32 %8)
unreachable
10: ; preds = %2
ret i8* %3
}
void test122_SleepWakeImpl_targetInit__I() {}


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

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

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

LLVM IR (-O2):
define void @test122_SleepWakeImpl_targetInit__I() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ creatembspr();
int /*<<< orphan*/ drawbags();
int /*<<< orphan*/ drawemeralds();
int /*<<< orphan*/ drawstatics();
int /*<<< orphan*/ initdigger();
int /*<<< orphan*/ initmonsters();
void drawscreen(void) {
  creatembspr();
  drawstatics();
  drawbags();
  drawemeralds();
  initdigger();
  initmonsters();
}


x86 assembly (clang, -O0):
<drawscreen>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <creatembspr@plt>
mov    $0x0,%al
call   1050 <drawstatics@plt>
mov    $0x0,%al
call   1080 <drawbags@plt>
mov    $0x0,%al
call   1030 <drawemeralds@plt>
mov    $0x0,%al
call   1070 <initdigger@plt>
mov    $0x0,%al
call   1060 <initmonsters@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<drawscreen>:
push   %rax
xor    %eax,%eax
call   1040 <creatembspr@plt>
xor    %eax,%eax
call   1050 <drawstatics@plt>
xor    %eax,%eax
call   1080 <drawbags@plt>
xor    %eax,%eax
call   1030 <drawemeralds@plt>
xor    %eax,%eax
call   1070 <initdigger@plt>
xor    %eax,%eax
pop    %rcx
jmp    1060 <initmonsters@plt>

LLVM IR (-O0):
define void @drawscreen() {
%1 = call i32 (...) @creatembspr()
%2 = call i32 (...) @drawstatics()
%3 = call i32 (...) @drawbags()
%4 = call i32 (...) @drawemeralds()
%5 = call i32 (...) @initdigger()
%6 = call i32 (...) @initmonsters()
ret void
}

LLVM IR (-O2):
define void @drawscreen() {
%1 = tail call i32 (...) @creatembspr()
%2 = tail call i32 (...) @drawstatics()
%3 = tail call i32 (...) @drawbags()
%4 = tail call i32 (...) @drawemeralds()
%5 = tail call i32 (...) @initdigger()
%6 = tail call i32 (...) @initmonsters()
ret void
}
/* Variables and functions */
int atoi(char *);
int /*<<< orphan*/ free(char *);
int atoi_del(char *data) {
  int ret = atoi(data);
  free(data);
  return ret;
}


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

x86 assembly (clang, -O2):
<atoi_del>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1040 <atoi@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @atoi_del(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @atoi(i8* %4)
store i32 %5, i32* %3
%6 = load i8*, i8** %2
%7 = call i32 @free(i8* %6)
%8 = load i32, i32* %3
ret i32 %8
}

LLVM IR (-O2):
define i32 @atoi_del(i8* nocapture %0) {
%2 = tail call i32 @atoi(i8* %0)
%3 = tail call i32 @free(i8* %0)
ret i32 %2
}
adr0reg1_set(r0, r1, x0, x1, p0, p1) short r0, r1;
short *p0, *p1;
{ (*((short *)10000000)) = r1; }


x86 assembly (clang, -O0):
<adr0reg1_set>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %di,%si
mov    %si,-0x6(%rbp)
mov    %ax,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
mov    -0x8(%rbp),%cx
mov    $0x989680,%eax
mov    %cx,(%rax)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<adr0reg1_set>:
mov    %si,0x989680
ret

LLVM IR (-O0):
define i32 @adr0reg1_set(i32 %0, i32 %1, i32 %2, i32 %3, i16* %4, i16* %5) {
%7 = alloca i32
%8 = alloca i16
%9 = alloca i16
%10 = alloca i32
%11 = alloca i32
%12 = alloca i16*
%13 = alloca i16*
%14 = trunc i32 %0 to i16
%15 = trunc i32 %1 to i16
store i16 %14, i16* %8
store i16 %15, i16* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i16* %4, i16** %12
store i16* %5, i16** %13
%16 = load i16, i16* %9
store i16 %16, i16* inttoptr (i64 10000000 to i16*)
%17 = load i32, i32* %7
ret i32 %17
}

LLVM IR (-O2):
define i32 @adr0reg1_set(i32 %0, i32 %1, i32 %2, i32 %3, i16* nocapture readnone %4, i16* nocapture readnone %5) {
%7 = trunc i32 %1 to i16
store i16 %7, i16* inttoptr (i64 10000000 to i16*)
ret i32 undef
}
/* Variables and functions */
int rand();
void fillArray(int *a, int l) {
  int i;
  for (i = 0; i < l; i++) {
    a[i] = rand() % (100) + 1;
  }
  return;
}


x86 assembly (clang, -O0):
<fillArray>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    115d <fillArray+0x4d>
mov    $0x0,%al
call   1030 <rand@plt>
mov    $0x64,%ecx
cltd
idiv   %ecx
add    $0x1,%edx
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <fillArray+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fillArray>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
jle    1164 <fillArray+0x54>
mov    %rdi,%r14
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <rand@plt>
cltq
imul   $0x51eb851f,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x25,%rcx
add    %edx,%ecx
imul   $0x64,%ecx,%ecx
neg    %ecx
add    %ecx,%eax
add    $0x1,%eax
mov    %eax,(%r14,%rbx,4)
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <fillArray+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @fillArray(i32* nocapture writeonly %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %14
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %12, %6 ]
%8 = tail call i32 (...) @rand()
%9 = srem i32 %8, 100
%10 = add nsw i32 %9, 1
%11 = getelementptr inbounds i32, i32* %0, i64 %7
store i32 %10, i32* %11
%12 = add nuw nsw i64 %7, 1
%13 = icmp eq i64 %12, %5
br i1 %13, label %14, label %6
14: ; preds = %6, %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ fd_set;

/* Variables and functions */
int /*<<< orphan*/ FD_SET(int, int /*<<< orphan*/ *);
void fdset_add(fd_set *fds, int fd, int *max) {
  FD_SET(fd, fds);
  if (fd > *max)
    *max = fd;
}


x86 assembly (clang, -O0):
<fdset_add>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%rsi
call   1030 <FD_SET@plt>
mov    -0xc(%rbp),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jle    1147 <fdset_add+0x37>
mov    -0xc(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fdset_add>:
push   %rbp
push   %rbx
push   %rax
mov    %rdx,%rbx
mov    %esi,%ebp
mov    %rdi,%rsi
mov    %ebp,%edi
call   1030 <FD_SET@plt>
cmp    %ebp,(%rbx)
jge    1128 <fdset_add+0x18>
mov    %ebp,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define void @fdset_add(i32* %0, i32 %1, i32* nocapture %2) {
%4 = tail call i32 @FD_SET(i32 %1, i32* %0)
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, %1
br i1 %6, label %7, label %8
7: ; preds = %3
store i32 %1, i32* %2
br label %8
8: ; preds = %7, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void catchint(int signo) { printf("SIGINT Received\n"); }


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

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

LLVM IR (-O0):
@.str = [17 x i8] c"SIGINT Received\0A\00"
define void @catchint(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [16 x i8] c"SIGINT Received\00"
define void @catchint(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
ret void
}
int f_int(void) { return 128; }


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

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

LLVM IR (-O0):
define i32 @f_int() {
ret i32 128
}

LLVM IR (-O2):
define i32 @f_int() {
ret i32 128
}
void inc(int *op1, int *op2, unsigned int *pc) {
  (*op1)++;
  (*pc)++;
}


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

x86 assembly (clang, -O2):
<inc>:
addl   $0x1,(%rdi)
addl   $0x1,(%rdx)
ret

LLVM IR (-O0):
define void @inc(i32* %0, i32* %1, i32* %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i32*
store i32* %0, i32** %4
store i32* %1, i32** %5
store i32* %2, i32** %6
%7 = load i32*, i32** %4
%8 = load i32, i32* %7
%9 = add nsw i32 %8, 1
store i32 %9, i32* %7
%10 = load i32*, i32** %6
%11 = load i32, i32* %10
%12 = add i32 %11, 1
store i32 %12, i32* %10
ret void
}

LLVM IR (-O2):
define void @inc(i32* nocapture %0, i32* nocapture readnone %1, i32* nocapture %2) {
%4 = load i32, i32* %0
%5 = add nsw i32 %4, 1
store i32 %5, i32* %0
%6 = load i32, i32* %2
%7 = add i32 %6, 1
store i32 %7, i32* %2
ret void
}
void foo730() {}


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

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

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

LLVM IR (-O2):
define void @foo730() {
ret void
}
void waitq_link_delete_protected(struct waitq_link *pwql) {}


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

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

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

LLVM IR (-O2):
%struct.waitq_link = type opaque
define void @waitq_link_delete_protected(%struct.waitq_link* nocapture %0) {
ret void
}
wr_int2(fd, i) {
  char buf[2];
  (*((short *)(buf)) = (i));
  wr_bytes(fd, buf, 2L);
}


x86 assembly (clang, -O0):
<wr_int2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %ax,-0xe(%rbp)
mov    -0x8(%rbp),%edi
lea    -0xe(%rbp),%rsi
mov    $0x2,%edx
mov    $0x0,%al
call   1030 <wr_bytes@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wr_int2>:
push   %rax
mov    %si,0x6(%rsp)
lea    0x6(%rsp),%rsi
mov    $0x2,%edx
xor    %eax,%eax
call   1030 <wr_bytes@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @wr_int2(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca [2 x i8]
store i32 %0, i32* %4
store i32 %1, i32* %5
%7 = load i32, i32* %5
%8 = trunc i32 %7 to i16
%9 = getelementptr inbounds [2 x i8], [2 x i8]* %6, i64 0, i64 0
%10 = bitcast i8* %9 to i16*
store i16 %8, i16* %10
%11 = load i32, i32* %4
%12 = getelementptr inbounds [2 x i8], [2 x i8]* %6, i64 0, i64 0
%13 = call i32 (i32, i8*, i64, ...) bitcast (i32 (...)* @wr_bytes to i32 (i32, i8*, i64, ...)*)(i32 %11, i8* %12, i64 2)
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
define i32 @wr_int2(i32 %0, i32 %1) {
%3 = alloca i16
%4 = bitcast i16* %3 to i8*
%5 = trunc i32 %1 to i16
store i16 %5, i16* %3
%6 = call i32 (i32, i8*, i64, ...) bitcast (i32 (...)* @wr_bytes to i32 (i32, i8*, i64, ...)*)(i32 %0, i8* %4, i64 2)
ret i32 undef
}
/* Variables and functions */
unsigned short log(unsigned int const);
unsigned short int colorPosition(const unsigned int colorMask) {
  return log(colorMask / 255.) / log(256);
}


x86 assembly (clang, -O0):
<colorPosition>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
cvtsi2sd %rax,%xmm0
movsd  0xed5(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rax
mov    %eax,%edi
call   1030 <log@plt>
movzwl %ax,%eax
mov    %eax,-0x8(%rbp)
mov    $0x100,%edi
call   1030 <log@plt>
mov    %ax,%cx
mov    -0x8(%rbp),%eax
movzwl %cx,%ecx
cltd
idiv   %ecx
movzwl %ax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<colorPosition>:
push   %rbx
mov    %edi,%eax
cvtsi2sd %rax,%xmm0
divsd  0xee0(%rip),%xmm0
cvttsd2si %xmm0,%rdi
call   1030 <log@plt>
mov    %eax,%ebx
mov    $0x100,%edi
call   1030 <log@plt>
mov    %eax,%ecx
mov    %ebx,%eax
xor    %edx,%edx
div    %cx
pop    %rbx
ret

LLVM IR (-O0):
define zeroext i16 @colorPosition(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = uitofp i32 %3 to double
%5 = fdiv double %4, 2.550000e+02
%6 = fptoui double %5 to i32
%7 = call zeroext i16 @log(i32 %6)
%8 = zext i16 %7 to i32
%9 = call zeroext i16 @log(i32 256)
%10 = zext i16 %9 to i32
%11 = sdiv i32 %8, %10
%12 = trunc i32 %11 to i16
ret i16 %12
}

LLVM IR (-O2):
define zeroext i16 @colorPosition(i32 %0) {
%2 = uitofp i32 %0 to double
%3 = fdiv double %2, 2.550000e+02
%4 = fptoui double %3 to i32
%5 = tail call zeroext i16 @log(i32 %4)
%6 = tail call zeroext i16 @log(i32 256)
%7 = udiv i16 %5, %6
ret i16 %7
}
void RTThreadGetNative(void) {}


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

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

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

LLVM IR (-O2):
define void @RTThreadGetNative() {
ret void
}
unsigned short in16(unsigned long addr) {
  return *(volatile unsigned short *)addr;
}


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

x86 assembly (clang, -O2):
<in16>:
movzwl (%rdi),%eax
ret

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

LLVM IR (-O2):
define zeroext i16 @in16(i64 %0) {
%2 = inttoptr i64 %0 to i16*
%3 = load volatile i16, i16* %2
ret i16 %3
}
int int_cmp(int ls, int rs) { return rs - ls; }


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

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

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

LLVM IR (-O2):
define i32 @int_cmp(i32 %0, i32 %1) {
%3 = sub nsw i32 %1, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ fatal_error(int /*<<< orphan*/, char *, int, int);
void check_xtc_magic(int magic) {
  if (magic != 1995)
    fatal_error(0, "Magic Number Error in XTC file (read %d, should be %d)",
                magic, 1995);
}


x86 assembly (clang, -O0):
<check_xtc_magic>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x7cb,-0x4(%rbp)
je     113e <check_xtc_magic+0x2e>
mov    -0x4(%rbp),%edx
xor    %edi,%edi
lea    0xecc(%rip),%rsi
mov    $0x7cb,%ecx
call   1030 <fatal_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_xtc_magic>:
cmp    $0x7cb,%edi
jne    1119 <check_xtc_magic+0x9>
ret
mov    %edi,%edx
lea    0xede(%rip),%rsi
xor    %edi,%edi
mov    $0x7cb,%ecx
jmp    1030 <fatal_error@plt>

LLVM IR (-O0):
@.str = [55 x i8] c"Magic Number Error in XTC file (read %d, should be %d)\00"
define void @check_xtc_magic(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 1995
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = call i32 @fatal_error(i32 0, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0), i32 %6, i32 1995)
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
@.str = [55 x i8] c"Magic Number Error in XTC file (read %d, should be %d)\00"
define void @check_xtc_magic(i32 %0) {
%2 = icmp eq i32 %0, 1995
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @fatal_error(i32 0, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0), i32 %0, i32 1995)
br label %5
5: ; preds = %3, %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m256i;

/* Variables and functions */
int /*<<< orphan*/ _mm256_or_si256(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ _mm256_slli_epi32(int /*<<< orphan*/, int);
int /*<<< orphan*/ _mm256_srli_epi32(int /*<<< orphan*/, int);
__attribute__((always_)) __m256i rot12(__m256i x) {
  return _mm256_or_si256(_mm256_srli_epi32(x, 12),
                         _mm256_slli_epi32(x, 32 - 12));
}


x86 assembly (clang, -O0):
<rot12>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0xc,%esi
call   1050 <_mm256_srli_epi32@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x14,%esi
call   1030 <_mm256_slli_epi32@plt>
mov    -0x8(%rbp),%edi
mov    %eax,%esi
call   1040 <_mm256_or_si256@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rot12>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
mov    $0xc,%esi
call   1050 <_mm256_srli_epi32@plt>
mov    %eax,%ebp
mov    %ebx,%edi
mov    $0x14,%esi
call   1030 <_mm256_slli_epi32@plt>
mov    %ebp,%edi
mov    %eax,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <_mm256_or_si256@plt>

LLVM IR (-O0):
define i32 @rot12(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @_mm256_srli_epi32(i32 %3, i32 12)
%5 = load i32, i32* %2
%6 = call i32 @_mm256_slli_epi32(i32 %5, i32 20)
%7 = call i32 @_mm256_or_si256(i32 %4, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @rot12(i32 %0) {
%2 = tail call i32 @_mm256_srli_epi32(i32 %0, i32 12)
%3 = tail call i32 @_mm256_slli_epi32(i32 %0, i32 20)
%4 = tail call i32 @_mm256_or_si256(i32 %2, i32 %3)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void speex_warning(char *str) { fprintf(stderr, "warning: %s\n", str); }


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

x86 assembly (clang, -O2):
<speex_warning>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [13 x i8] c"warning: %s\0A\00"
define void @speex_warning(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void signed_char_rem_signed_char_unsigned_int(signed char *LHS,
                                              unsigned int RHS) {
  (*LHS) %= RHS;
}


x86 assembly (clang, -O0):
<signed_char_rem_signed_char_unsigned_int>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
movsbl (%rax),%eax
xor    %edx,%edx
div    %ecx
mov    -0x18(%rbp),%rax
mov    %dl,%cl
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<signed_char_rem_signed_char_unsigned_int>:
movsbl (%rdi),%eax
xor    %edx,%edx
div    %esi
mov    %dl,(%rdi)
ret

LLVM IR (-O0):
define void @signed_char_rem_signed_char_unsigned_int(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = urem i32 %8, %5
%10 = trunc i32 %9 to i8
store i8 %10, i8* %6
ret void
}

LLVM IR (-O2):
define void @signed_char_rem_signed_char_unsigned_int(i8* nocapture %0, i32 %1) {
%3 = load i8, i8* %0
%4 = sext i8 %3 to i32
%5 = urem i32 %4, %1
%6 = trunc i32 %5 to i8
store i8 %6, i8* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int main(int argc, const char *argv[]) {
  puts("Hello, world!");
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [14 x i8] c"Hello, world!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ addbyte(int);
int ZERO_EXTEND_L_B(int reg) {
  addbyte(0x0f);
  addbyte(0xb6);
  addbyte(0xc0 | reg | (reg << 3));
  return reg;
}


x86 assembly (clang, -O0):
<ZERO_EXTEND_L_B>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0xf,%edi
call   1030 <addbyte@plt>
mov    $0xb6,%edi
call   1030 <addbyte@plt>
mov    -0x4(%rbp),%edi
or     $0xc0,%edi
mov    -0x4(%rbp),%eax
shl    $0x3,%eax
or     %eax,%edi
call   1030 <addbyte@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ZERO_EXTEND_L_B>:
push   %rbx
mov    %edi,%ebx
mov    $0xf,%edi
call   1030 <addbyte@plt>
mov    $0xb6,%edi
call   1030 <addbyte@plt>
lea    0x0(,%rbx,8),%edi
or     %ebx,%edi
or     $0xc0,%edi
call   1030 <addbyte@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @ZERO_EXTEND_L_B(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @addbyte(i32 15)
%4 = call i32 @addbyte(i32 182)
%5 = load i32, i32* %2
%6 = or i32 192, %5
%7 = load i32, i32* %2
%8 = shl i32 %7, 3
%9 = or i32 %6, %8
%10 = call i32 @addbyte(i32 %9)
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
define i32 @ZERO_EXTEND_L_B(i32 returned %0) {
%2 = tail call i32 @addbyte(i32 15)
%3 = tail call i32 @addbyte(i32 182)
%4 = shl i32 %0, 3
%5 = or i32 %4, %0
%6 = or i32 %5, 192
%7 = tail call i32 @addbyte(i32 %6)
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ switch_off_bits(unsigned char *, int);
int /*<<< orphan*/ switch_on_bits(unsigned char *, int);
void CTRL_REGSC_BITSET_R6g_T4p5g(unsigned char *data) {
  switch_on_bits(data, (0x01));
  switch_off_bits(data, (0x02 | 0x10));
}


x86 assembly (clang, -O0):
<CTRL_REGSC_BITSET_R6g_T4p5g>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
call   1030 <switch_on_bits@plt>
mov    -0x8(%rbp),%rdi
mov    $0x12,%esi
call   1040 <switch_off_bits@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CTRL_REGSC_BITSET_R6g_T4p5g>:
push   %rbx
mov    %rdi,%rbx
mov    $0x1,%esi
call   1030 <switch_on_bits@plt>
mov    %rbx,%rdi
mov    $0x12,%esi
pop    %rbx
jmp    1040 <switch_off_bits@plt>

LLVM IR (-O0):
define void @CTRL_REGSC_BITSET_R6g_T4p5g(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @switch_on_bits(i8* %3, i32 1)
%5 = load i8*, i8** %2
%6 = call i32 @switch_off_bits(i8* %5, i32 18)
ret void
}

LLVM IR (-O2):
define void @CTRL_REGSC_BITSET_R6g_T4p5g(i8* %0) {
%2 = tail call i32 @switch_on_bits(i8* %0, i32 1)
%3 = tail call i32 @switch_off_bits(i8* %0, i32 18)
ret void
}
float clamp_on_range(float x, float min, float max) {
  if (x < min)
    return min;
  else if (max < x)
    return max;
  else
    return x;
}


x86 assembly (clang, -O0):
<clamp_on_range>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  %xmm2,-0x10(%rbp)
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1135 <clamp_on_range+0x35>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1161 <clamp_on_range+0x61>
movss  -0x10(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1157 <clamp_on_range+0x57>
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1161 <clamp_on_range+0x61>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<clamp_on_range>:
minss  %xmm0,%xmm2
cmpltss %xmm1,%xmm0
movaps %xmm0,%xmm3
andnps %xmm2,%xmm3
andps  %xmm1,%xmm0
orps   %xmm3,%xmm0
ret

LLVM IR (-O0):
define float @clamp_on_range(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
store float %0, float* %5
store float %1, float* %6
store float %2, float* %7
%8 = load float, float* %5
%9 = load float, float* %6
%10 = fcmp olt float %8, %9
br i1 %10, label %11, label %13
11: ; preds = %3
%12 = load float, float* %6
store float %12, float* %4
br label %21
13: ; preds = %3
%14 = load float, float* %7
%15 = load float, float* %5
%16 = fcmp olt float %14, %15
br i1 %16, label %17, label %19
17: ; preds = %13
%18 = load float, float* %7
store float %18, float* %4
br label %21
19: ; preds = %13
%20 = load float, float* %5
store float %20, float* %4
br label %21
21: ; preds = %19, %17, %11
%22 = load float, float* %4
ret float %22
}

LLVM IR (-O2):
define float @clamp_on_range(float %0, float %1, float %2) {
%4 = fcmp olt float %0, %1
%5 = fcmp olt float %2, %0
%6 = select i1 %5, float %2, float %0
%7 = select i1 %4, float %1, float %6
ret float %7
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_error();
int /*<<< orphan*/ pthread_exit(int /*<<< orphan*/ *);
void *t1(void *arg) {
  pthread_exit(NULL);
  __VERIFIER_error();
}


x86 assembly (clang, -O0):
<t1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1030 <pthread_exit@plt>
mov    $0x0,%al
call   1040 <__VERIFIER_error@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t1>:
push   %rax
xor    %edi,%edi
call   1030 <pthread_exit@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <__VERIFIER_error@plt>

LLVM IR (-O0):
define i8* @t1(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %3
%4 = call i32 @pthread_exit(i32* null)
%5 = call i32 (...) @__VERIFIER_error()
%6 = load i8*, i8** %2
ret i8* %6
}

LLVM IR (-O2):
define noalias i8* @t1(i8* nocapture readnone %0) {
%2 = tail call i32 @pthread_exit(i32* null)
%3 = tail call i32 (...) @__VERIFIER_error()
ret i8* undef
}
/* Variables and functions */
int /*<<< orphan*/ isdir(char const *);
int makedir(int /*<<< orphan*/);
int /*<<< orphan*/ str_store(char const *);
int install_dir(const char *name) {
  if (!isdir(name))
    return makedir(str_store(name));
  return 1;
}


x86 assembly (clang, -O0):
<install_dir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <isdir@plt>
cmp    $0x0,%eax
jne    1166 <install_dir+0x36>
mov    -0x10(%rbp),%rdi
call   1050 <str_store@plt>
mov    %eax,%edi
call   1040 <makedir@plt>
mov    %eax,-0x4(%rbp)
jmp    116d <install_dir+0x3d>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<install_dir>:
push   %rbx
mov    %rdi,%rbx
call   1030 <isdir@plt>
test   %eax,%eax
je     1144 <install_dir+0x14>
mov    $0x1,%eax
pop    %rbx
ret
mov    %rbx,%rdi
call   1050 <str_store@plt>
mov    %eax,%edi
pop    %rbx
jmp    1040 <makedir@plt>

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

LLVM IR (-O2):
define i32 @install_dir(i8* %0) {
%2 = tail call i32 @isdir(i8* %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 @str_store(i8* %0)
%6 = tail call i32 @makedir(i32 %5)
br label %7
7: ; preds = %1, %4
%8 = phi i32 [ %6, %4 ], [ 1, %1 ]
ret i32 %8
}
int unhex(char c) {
  return (c >= '0' && c <= '9'   ? c - '0'
          : c >= 'A' && c <= 'F' ? c - 'A' + 10
                                 : c - 'a' + 10);
}


x86 assembly (clang, -O0):
<unhex>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x30,%eax
jl     1133 <unhex+0x33>
movsbl -0x1(%rbp),%eax
cmp    $0x39,%eax
jg     1133 <unhex+0x33>
movsbl -0x1(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x8(%rbp)
jmp    1172 <unhex+0x72>
movsbl -0x1(%rbp),%eax
cmp    $0x41,%eax
jl     115f <unhex+0x5f>
movsbl -0x1(%rbp),%eax
cmp    $0x46,%eax
jg     115f <unhex+0x5f>
movsbl -0x1(%rbp),%eax
sub    $0x41,%eax
add    $0xa,%eax
mov    %eax,-0xc(%rbp)
jmp    116c <unhex+0x6c>
movsbl -0x1(%rbp),%eax
sub    $0x61,%eax
add    $0xa,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<unhex>:
lea    -0x30(%rdi),%eax
lea    -0x41(%rdi),%ecx
xor    %edx,%edx
cmp    $0x6,%cl
setb   %dl
shl    $0x5,%edx
add    $0xffffffa9,%edx
cmp    $0xa,%al
mov    $0xffffffd0,%eax
cmovae %edx,%eax
add    %edi,%eax
ret

LLVM IR (-O0):
define i32 @unhex(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sge i32 %4, 48
br i1 %5, label %6, label %14
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 57
br i1 %9, label %10, label %14
10: ; preds = %6
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = sub nsw i32 %12, 48
br label %34
14: ; preds = %6, %1
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp sge i32 %16, 65
br i1 %17, label %18, label %27
18: ; preds = %14
%19 = load i8, i8* %2
%20 = sext i8 %19 to i32
%21 = icmp sle i32 %20, 70
br i1 %21, label %22, label %27
22: ; preds = %18
%23 = load i8, i8* %2
%24 = sext i8 %23 to i32
%25 = sub nsw i32 %24, 65
%26 = add nsw i32 %25, 10
br label %32
27: ; preds = %18, %14
%28 = load i8, i8* %2
%29 = sext i8 %28 to i32
%30 = sub nsw i32 %29, 97
%31 = add nsw i32 %30, 10
br label %32
32: ; preds = %27, %22
%33 = phi i32 [ %26, %22 ], [ %31, %27 ]
br label %34
34: ; preds = %32, %10
%35 = phi i32 [ %13, %10 ], [ %33, %32 ]
ret i32 %35
}

LLVM IR (-O2):
define i32 @unhex(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = add i8 %0, -48
%4 = icmp ult i8 %3, 10
%5 = add i8 %0, -65
%6 = icmp ult i8 %5, 6
%7 = select i1 %6, i32 -55, i32 -87
%8 = select i1 %4, i32 -48, i32 %7
%9 = add nsw i32 %8, %2
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void print_int(void *data, void *extra_data) {
  int x = *(int *)data;
  printf("%d, ", x);
}


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

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"%d, \00"
define void @print_int(i8* nocapture %0, i8* nocapture readnone %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %4)
ret void
}
void NV21ToRGB24() {}


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

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

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

LLVM IR (-O2):
define void @NV21ToRGB24() {
ret void
}
int test_imm_58int64_lowword_mem(long long *val) {
  return ((*val) & (0x58 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_58int64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 88
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int generic_get_cpu_isa_extensions() { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @generic_get_cpu_isa_extensions() {
ret i32 -1
}
double imin2(double i1, double i2) { return (i1 < i2) ? i1 : i2; }


x86 assembly (clang, -O0):
<imin2>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1131 <imin2+0x31>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    113b <imin2+0x3b>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<imin2>:
minsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @imin2(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fcmp olt double %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load double, double* %3
br label %12
10: ; preds = %2
%11 = load double, double* %4
br label %12
12: ; preds = %10, %8
%13 = phi double [ %9, %8 ], [ %11, %10 ]
ret double %13
}

LLVM IR (-O2):
define double @imin2(double %0, double %1) {
%3 = fcmp olt double %0, %1
%4 = select i1 %3, double %0, double %1
ret double %4
}
/* Type definitions */
typedef int /*<<< orphan*/ z;

/* Variables and functions */
int /*<<< orphan*/ memset(long double *, int /*<<< orphan*/, int);
int /*<<< orphan*/ printfp(char *, long double *);
int main(void) {
  long double x = 3.141592653589793238462643383279502884L;
  long double y = 2.718281828459045235360287471352662498L;
  long double z;
  memset(&z, 0, sizeof(z));
  z = x - y;
  printfp("result", &z);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
fldt   0xecb(%rip)
fstpt  -0x20(%rbp)
fldt   0xed2(%rip)
fstpt  -0x30(%rbp)
lea    -0x40(%rbp),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1040 <memset@plt>
fldt   -0x20(%rbp)
fldt   -0x30(%rbp)
fsubrp %st,%st(1)
fstpt  -0x40(%rbp)
lea    0xebd(%rip),%rdi
lea    -0x40(%rbp),%rsi
call   1030 <printfp@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1040 <memset@plt>
fldt   0xec3(%rip)
fstpt  (%rsp)
lea    0xec9(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printfp@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"result\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca x86_fp80
%3 = alloca x86_fp80
%4 = alloca x86_fp80
store i32 0, i32* %1
store x86_fp80 0xK4000C90FDAA22168C235, x86_fp80* %2
store x86_fp80 0xK4000ADF85458A2BB4A9B, x86_fp80* %3
%5 = call i32 @memset(x86_fp80* %4, i32 0, i32 16)
%6 = load x86_fp80, x86_fp80* %2
%7 = load x86_fp80, x86_fp80* %3
%8 = fsub x86_fp80 %6, %7
store x86_fp80 %8, x86_fp80* %4
%9 = call i32 @printfp(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), x86_fp80* %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"result\00"
define i32 @main() {
%1 = alloca x86_fp80
%2 = bitcast x86_fp80* %1 to i8*
%3 = call i32 @memset(x86_fp80* %1, i32 0, i32 16)
store x86_fp80 0xK3FFDD8BC324BF56BBCD0, x86_fp80* %1
%4 = call i32 @printfp(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), x86_fp80* %1)
ret i32 0
}