xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int scanf(char *, long *);
void checkIntInput(long *a) {
  if ((scanf("%ld", a)) != 1) {
    printf("Not digit!");
    exit(EXIT_FAILURE);
  }
}


x86 assembly (clang, -O0):
<checkIntInput>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xeb9(%rip),%rdi
call   1040 <scanf@plt>
cmp    $0x1,%eax
je     116f <checkIntInput+0x3f>
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e78(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checkIntInput>:
push   %rax
mov    %rdi,%rsi
lea    0xec5(%rip),%rdi
call   1040 <scanf@plt>
cmp    $0x1,%eax
jne    1147 <checkIntInput+0x17>
pop    %rax
ret
lea    0xeb6(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e86(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%ld\00"
@.str.1 = [11 x i8] c"Not digit!\00"
@EXIT_FAILURE = global i32 0
define void @checkIntInput(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64* %3)
%5 = icmp ne i32 %4, 1
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%8 = load i32, i32* @EXIT_FAILURE
%9 = call i32 @exit(i32 %8)
unreachable
10: ; preds = %1
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%ld\00"
@.str.1 = [11 x i8] c"Not digit!\00"
@EXIT_FAILURE = global i32 0
define void @checkIntInput(i64* %0) {
%2 = tail call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64* %0)
%3 = icmp eq i32 %2, 1
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%6 = load i32, i32* @EXIT_FAILURE
%7 = tail call i32 @exit(i32 %6)
unreachable
8: ; preds = %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_usage() { printf("usage: physlock [-dhLlmsv]\n"); }


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

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

LLVM IR (-O0):
@.str = [28 x i8] c"usage: physlock [-dhLlmsv]\0A\00"
define void @print_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [27 x i8] c"usage: physlock [-dhLlmsv]\00"
define void @print_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ handle_XFSZ(int /*<<< orphan*/);
int gen_XFSZ() { handle_XFSZ(0); }


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

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

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

LLVM IR (-O2):
define i32 @gen_XFSZ() {
%1 = tail call i32 @handle_XFSZ(i32 0)
ret i32 undef
}
int cpusupport_x86_aesni_detect_1(void) { return (0); }


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

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

LLVM IR (-O0):
define i32 @cpusupport_x86_aesni_detect_1() {
ret i32 0
}

LLVM IR (-O2):
define i32 @cpusupport_x86_aesni_detect_1() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void DisplayMenu() {
  printf("------------------MENU--------------\n");
  printf("1. To Evaluate a Postfix Expression.\n");
  printf("2. Solve Tower of Hanoi for n discs.\n");
  printf("3. Exit the program.\n");
}


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

x86 assembly (clang, -O2):
<DisplayMenu>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf01(%rip),%rdi
call   1030 <puts@plt>
lea    0xf1a(%rip),%rdi
call   1030 <puts@plt>
lea    0xf33(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [38 x i8] c"------------------MENU--------------\0A\00"
@.str.1 = [38 x i8] c"1. To Evaluate a Postfix Expression.\0A\00"
@.str.2 = [38 x i8] c"2. Solve Tower of Hanoi for n discs.\0A\00"
@.str.3 = [22 x i8] c"3. Exit the program.\0A\00"
define void @DisplayMenu() {
%1 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [37 x i8] c"------------------MENU--------------\00"
@str.4 = [37 x i8] c"1. To Evaluate a Postfix Expression.\00"
@str.5 = [37 x i8] c"2. Solve Tower of Hanoi for n discs.\00"
@str.6 = [21 x i8] c"3. Exit the program.\00"
define void @DisplayMenu() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str.4, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str.5, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.6, i64 0, i64 0))
ret void
}
void File_Error(word_file) char *word_file;
{
  perror(word_file);
  exit(1);
}


x86 assembly (clang, -O0):
<File_Error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<File_Error>:
push   %rax
xor    %eax,%eax
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @File_Error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) bitcast (i32 (...)* @perror to i32 (i8*, ...)*)(i8* %3)
unreachable
}

LLVM IR (-O2):
define void @File_Error(i8* %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @perror to i32 (i8*, ...)*)(i8* %0)
tail call void @exit(i32 1)
unreachable
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int set_lowest_cleared_bit(int);
uint32_t test(uint32_t x) {
  x = set_lowest_cleared_bit(x);
  x = set_lowest_cleared_bit(x);
  x = set_lowest_cleared_bit(x);
  x = set_lowest_cleared_bit(x);
  return x << 28;
}


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

x86 assembly (clang, -O2):
<test>:
push   %rax
call   1030 <set_lowest_cleared_bit@plt>
mov    %eax,%edi
call   1030 <set_lowest_cleared_bit@plt>
mov    %eax,%edi
call   1030 <set_lowest_cleared_bit@plt>
mov    %eax,%edi
call   1030 <set_lowest_cleared_bit@plt>
shl    $0x1c,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @test(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @set_lowest_cleared_bit(i32 %3)
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = call i32 @set_lowest_cleared_bit(i32 %5)
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = call i32 @set_lowest_cleared_bit(i32 %7)
store i32 %8, i32* %2
%9 = load i32, i32* %2
%10 = call i32 @set_lowest_cleared_bit(i32 %9)
store i32 %10, i32* %2
%11 = load i32, i32* %2
%12 = shl i32 %11, 28
ret i32 %12
}

LLVM IR (-O2):
define i32 @test(i32 %0) {
%2 = tail call i32 @set_lowest_cleared_bit(i32 %0)
%3 = tail call i32 @set_lowest_cleared_bit(i32 %2)
%4 = tail call i32 @set_lowest_cleared_bit(i32 %3)
%5 = tail call i32 @set_lowest_cleared_bit(i32 %4)
%6 = shl i32 %5, 28
ret i32 %6
}
void ff_hevc_put_hevc_uni_qpel_v8_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_qpel_v8_10_sse4() {
ret void
}
/* Variables and functions */
size_t rtrie_klen(char *ka, char *ke) { return (size_t)(ke - ka); }


x86 assembly (clang, -O0):
<rtrie_klen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i64 @rtrie_klen(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 = load i8*, i8** %3
%7 = ptrtoint i8* %5 to i64
%8 = ptrtoint i8* %6 to i64
%9 = sub i64 %7, %8
ret i64 %9
}

LLVM IR (-O2):
define i64 @rtrie_klen(i8* %0, i8* %1) {
%3 = ptrtoint i8* %1 to i64
%4 = ptrtoint i8* %0 to i64
%5 = sub i64 %3, %4
ret i64 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void fifteen(const int value) {
  switch (value) {
  case 1:
    printf("You passed in the value of one!\n");
    break;
  case 2:
    printf("You passed in the value of two!\n");
    break;
  default:
    printf("You passed in some other value!\n");
    break;
  }
}


x86 assembly (clang, -O0):
<fifteen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
sub    $0x1,%eax
je     1140 <fifteen+0x30>
jmp    112f <fifteen+0x1f>
mov    -0x8(%rbp),%eax
sub    $0x2,%eax
je     1151 <fifteen+0x41>
jmp    1162 <fifteen+0x52>
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
jmp    116e <fifteen+0x5e>
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
jmp    116e <fifteen+0x5e>
lea    0xed9(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fifteen>:
cmp    $0x2,%edi
lea    0xee6(%rip),%rax
lea    0xf1f(%rip),%rcx
cmove  %rax,%rcx
cmp    $0x1,%edi
lea    0xef1(%rip),%rdi
cmovne %rcx,%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [33 x i8] c"You passed in the value of one!\0A\00"
@.str.1 = [33 x i8] c"You passed in the value of two!\0A\00"
@.str.2 = [33 x i8] c"You passed in some other value!\0A\00"
define void @fifteen(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %8 [
i32 1, label %4
i32 2, label %6
]
4: ; preds = %1
%5 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
br label %10
6: ; preds = %1
%7 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
br label %10
8: ; preds = %1
%9 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0))
br label %10
10: ; preds = %8, %6, %4
ret void
}

LLVM IR (-O2):
@str = [32 x i8] c"You passed in the value of two!\00"
@str.3 = [32 x i8] c"You passed in the value of one!\00"
@str.4 = [32 x i8] c"You passed in some other value!\00"
define void @fifteen(i32 %0) {
%2 = icmp eq i32 %0, 2
%3 = select i1 %2, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @str, i64 0, i64 0), i8* getelementptr inbounds ([32 x i8], [32 x i8]* @str.4, i64 0, i64 0)
%4 = icmp eq i32 %0, 1
%5 = select i1 %4, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @str.3, i64 0, i64 0), i8* %3
%6 = tail call i32 @puts(i8* dereferenceable(1) %5)
ret void
}
/* Variables and functions */
double strtod(char const *, char **);
double inchi_strtod(const char *str, const char **p) {
  return strtod(str, (char **)p);
}


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

x86 assembly (clang, -O2):
<inchi_strtod>:
jmp    1030 <strtod@plt>

LLVM IR (-O0):
define double @inchi_strtod(i8* %0, i8** %1) {
%3 = alloca i8*
%4 = alloca i8**
store i8* %0, i8** %3
store i8** %1, i8*** %4
%5 = load i8*, i8** %3
%6 = load i8**, i8*** %4
%7 = call double @strtod(i8* %5, i8** %6)
ret double %7
}

LLVM IR (-O2):
define double @inchi_strtod(i8* %0, i8** nocapture %1) {
%3 = tail call double @strtod(i8* %0, i8** %1)
ret double %3
}
int charToInt(char c) {
  switch (c) {
  case 'M':
    return 1000;
  case 'D':
    return 500;
    ;
  case 'C':
    return 100;
  case 'L':
    return 50;
    ;
  case 'X':
    return 10;
    ;
  case 'V':
    return 5;
  case 'I':
    return 1;
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<charToInt>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
add    $0xffffffbd,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x15,%eax
ja     1188 <charToInt+0x88>
mov    -0x10(%rbp),%rax
lea    0xed5(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x3e8,-0x4(%rbp)
jmp    118f <charToInt+0x8f>
movl   $0x1f4,-0x4(%rbp)
jmp    118f <charToInt+0x8f>
movl   $0x64,-0x4(%rbp)
jmp    118f <charToInt+0x8f>
movl   $0x32,-0x4(%rbp)
jmp    118f <charToInt+0x8f>
movl   $0xa,-0x4(%rbp)
jmp    118f <charToInt+0x8f>
movl   $0x5,-0x4(%rbp)
jmp    118f <charToInt+0x8f>
movl   $0x1,-0x4(%rbp)
jmp    118f <charToInt+0x8f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<charToInt>:
add    $0xffffffbd,%edi
cmp    $0x15,%edi
ja     1129 <charToInt+0x29>
mov    $0x3e8,%eax
lea    0xeec(%rip),%rcx
movslq (%rcx,%rdi,4),%rdx
add    %rcx,%rdx
jmp    *%rdx
mov    $0x64,%eax
ret
mov    $0x1f4,%eax
ret
xor    %eax,%eax
ret
mov    $0x1,%eax
ret
mov    $0x5,%eax
ret
mov    $0xa,%eax
ret
mov    $0x32,%eax
ret

LLVM IR (-O0):
define i32 @charToInt(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
switch i32 %5, label %13 [
i32 77, label %6
i32 68, label %7
i32 67, label %8
i32 76, label %9
i32 88, label %10
i32 86, label %11
i32 73, label %12
]
6: ; preds = %1
store i32 1000, i32* %2
br label %14
7: ; preds = %1
store i32 500, i32* %2
br label %14
8: ; preds = %1
store i32 100, i32* %2
br label %14
9: ; preds = %1
store i32 50, i32* %2
br label %14
10: ; preds = %1
store i32 10, i32* %2
br label %14
11: ; preds = %1
store i32 5, i32* %2
br label %14
12: ; preds = %1
store i32 1, i32* %2
br label %14
13: ; preds = %1
store i32 0, i32* %2
br label %14
14: ; preds = %13, %12, %11, %10, %9, %8, %7, %6
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @charToInt(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %9 [
i32 77, label %10
i32 68, label %3
i32 67, label %4
i32 76, label %5
i32 88, label %6
i32 86, label %7
i32 73, label %8
]
3: ; preds = %1
br label %10
4: ; preds = %1
br label %10
5: ; preds = %1
br label %10
6: ; preds = %1
br label %10
7: ; preds = %1
br label %10
8: ; preds = %1
br label %10
9: ; preds = %1
br label %10
10: ; preds = %1, %9, %8, %7, %6, %5, %4, %3
%11 = phi i32 [ 0, %9 ], [ 1, %8 ], [ 5, %7 ], [ 10, %6 ], [ 50, %5 ], [ 100, %4 ], [ 500, %3 ], [ 1000, %1 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
void pause_clear(int pause, int clear) {
  if (pause)
    system("pause");
  if (clear)
    system("cls");
}


x86 assembly (clang, -O0):
<pause_clear>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1134 <pause_clear+0x24>
lea    0xed1(%rip),%rdi
call   1030 <system@plt>
cmpl   $0x0,-0x8(%rbp)
je     114a <pause_clear+0x3a>
lea    0xec1(%rip),%rdi
call   1030 <system@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pause_clear>:
push   %rbx
mov    %esi,%ebx
test   %edi,%edi
je     1123 <pause_clear+0x13>
lea    0xee2(%rip),%rdi
call   1030 <system@plt>
test   %ebx,%ebx
je     1134 <pause_clear+0x24>
lea    0xed8(%rip),%rdi
pop    %rbx
jmp    1030 <system@plt>
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"pause\00"
@.str.1 = [4 x i8] c"cls\00"
define void @pause_clear(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %2
%7 = icmp eq i32 %1, 0
br i1 %7, label %10, label %8
8: ; preds = %6
%9 = tail call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
br label %10
10: ; preds = %8, %6
ret void
}
void __attribute__((weak)) can2_sce_isr() { debug_handler(__FUNCTION__); }


x86 assembly (clang, -O0):
<can2_sce_isr>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x0,%al
call   1030 <debug_handler@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<can2_sce_isr>:
lea    0xee9(%rip),%rdi
xor    %eax,%eax
jmp    1030 <debug_handler@plt>

LLVM IR (-O0):
@__FUNCTION__.can2_sce_isr = [13 x i8] c"can2_sce_isr\00"
define weak void @can2_sce_isr() {
%1 = call i32 (i8*, ...) bitcast (i32 (...)* @debug_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @__FUNCTION__.can2_sce_isr, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__FUNCTION__.can2_sce_isr = [13 x i8] c"can2_sce_isr\00"
define weak void @can2_sce_isr() {
%1 = tail call i32 (i8*, ...) bitcast (i32 (...)* @debug_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @__FUNCTION__.can2_sce_isr, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  (void)fprintf(stderr, "usage: dirname string [...]\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [29 x i8] c"usage: dirname string [...]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [29 x i8] c"usage: dirname string [...]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
int isws(int c) {
  if ((c == ' ') || (c == '\t')) {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<isws>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x20,-0x8(%rbp)
je     111b <isws+0x1b>
cmpl   $0x9,-0x8(%rbp)
jne    1127 <isws+0x27>
movl   $0x1,-0x4(%rbp)
jmp    112e <isws+0x2e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isws>:
cmp    $0x20,%edi
sete   %al
cmp    $0x9,%edi
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @isws(i32 %0) {
%2 = icmp eq i32 %0, 32
%3 = icmp eq i32 %0, 9
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
char *echo(char *text) { return text; }


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

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

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

LLVM IR (-O2):
define i8* @echo(i8* readnone returned %0) {
ret i8* %0
}
/* Variables and functions */
int f(int);
unsigned int bar(unsigned short n) {
  switch (n) {
      case (1 ? 1 : f(1)):
              return 4;
      }
}


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x6(%rbp)
mov    -0x6(%rbp),%ax
sub    $0x1,%ax
jne    1125 <bar+0x25>
jmp    111e <bar+0x1e>
movl   $0x4,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @bar(i16 zeroext %0) {
ret i32 4
}
/* Variables and functions */
int /*<<< orphan*/ lprcat(char *);
void cnsitm() { lprcat("\nSorry, we can't accept unidentified objects."); }


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

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

LLVM IR (-O0):
@.str = [46 x i8] c"\0ASorry, we can't accept unidentified objects.\00"
define void @cnsitm() {
%1 = call i32 @lprcat(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [46 x i8] c"\0ASorry, we can't accept unidentified objects.\00"
define void @cnsitm() {
%1 = tail call i32 @lprcat(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ kfree(void *);
void sys_free(void *addr) { kfree(addr); }


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

x86 assembly (clang, -O2):
<sys_free>:
jmp    1030 <kfree@plt>

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

LLVM IR (-O2):
define void @sys_free(i8* %0) {
%2 = tail call i32 @kfree(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdout;
void call_red() {
  printf("signal red\n");
  fflush(stdout);
}


x86 assembly (clang, -O0):
<call_red>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<call_red>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1040 <fflush@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"signal red\0A\00"
@stdout = global i32 0
define void @call_red() {
%1 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @stdout
%3 = call i32 @fflush(i32 %2)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@str = [11 x i8] c"signal red\00"
define void @call_red() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
%2 = load i32, i32* @stdout
%3 = tail call i32 @fflush(i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_assume(int);
int __VERIFIER_nondet_int();
int /*<<< orphan*/ findMax(int);
void *thr1(void *arg) {
  int offset = __VERIFIER_nondet_int();
  __VERIFIER_assume(offset % 2 == 0 && offset >= 0 && offset < 2 * 3);
  findMax(offset);
  return 0;
}


x86 assembly (clang, -O0):
<thr1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
xor    %eax,%eax
cmp    $0x0,%edx
mov    %al,-0xd(%rbp)
jne    1178 <thr1+0x48>
xor    %eax,%eax
cmpl   $0x0,-0xc(%rbp)
mov    %al,-0xd(%rbp)
jl     1178 <thr1+0x48>
cmpl   $0x6,-0xc(%rbp)
setl   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <__VERIFIER_assume@plt>
mov    -0xc(%rbp),%edi
call   1050 <findMax@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<thr1>:
push   %rbx
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,%ebx
test   $0x80000001,%eax
sete   %al
cmp    $0x6,%ebx
setl   %cl
and    %al,%cl
movzbl %cl,%edi
call   1040 <__VERIFIER_assume@plt>
mov    %ebx,%edi
call   1050 <findMax@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @thr1(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %4, i32* %3
%5 = load i32, i32* %3
%6 = srem i32 %5, 2
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %14
8: ; preds = %1
%9 = load i32, i32* %3
%10 = icmp sge i32 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = load i32, i32* %3
%13 = icmp slt i32 %12, 6
br label %14
14: ; preds = %11, %8, %1
%15 = phi i1 [ false, %8 ], [ false, %1 ], [ %13, %11 ]
%16 = zext i1 %15 to i32
%17 = call i32 @__VERIFIER_assume(i32 %16)
%18 = load i32, i32* %3
%19 = call i32 @findMax(i32 %18)
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @thr1(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
%3 = and i32 %2, -2147483647
%4 = icmp eq i32 %3, 0
%5 = icmp slt i32 %2, 6
%6 = and i1 %5, %4
%7 = zext i1 %6 to i32
%8 = tail call i32 @__VERIFIER_assume(i32 %7)
%9 = tail call i32 @findMax(i32 %2)
ret i8* null
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void element_blank_data_output(FILE *output_file) {
  fprintf(output_file, "<td>");
  fprintf(output_file, "</td>\n");
}


x86 assembly (clang, -O0):
<element_blank_data_output>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xece(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<element_blank_data_output>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1030 <fwrite@plt>
lea    0xed1(%rip),%rdi
mov    $0x6,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
pop    %rbx
jmp    1030 <fwrite@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"<td>\00"
@.str.1 = [7 x i8] c"</td>\0A\00"
define void @element_blank_data_output(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%5 = load i32*, i32** %2
%6 = call i32 @fprintf(i32* %5, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"<td>\00"
@.str.1 = [7 x i8] c"</td>\0A\00"
define void @element_blank_data_output(i32* nocapture %0) {
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 4, i64 1, i32* %0)
%3 = tail call i64 @fwrite(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i64 6, i64 1, i32* %0)
ret void
}
/* Variables and functions */
scalar_t__ strtol(char const *, char **, int);
int atoi(const char *s) { return (int)strtol(s, (char **)NULL, 10); }


x86 assembly (clang, -O0):
<atoi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1030 <strtol@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<atoi>:
xor    %esi,%esi
mov    $0xa,%edx
jmp    1030 <strtol@plt>

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

LLVM IR (-O2):
define i32 @atoi(i8* nocapture %0) {
%2 = tail call i64 @strtol(i8* nocapture %0, i8** null, i32 10)
%3 = trunc i64 %2 to i32
ret i32 %3
}
__attribute__((target("sse2"), no)) void foo(void) {
  asm volatile("" : : : "memory");
}


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

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

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

LLVM IR (-O2):
define void @foo() {
tail call void asm sideeffect "", "~{memory},~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Type definitions */
typedef int pid_t;

/* Variables and functions */
scalar_t__ EINTR;
scalar_t__ errno;
int waitpid(int, int *, int);
pid_t r_waitpid(pid_t pid, int *stat_loc, int options) {
  pid_t retval;
  while (((retval = waitpid(pid, stat_loc, options)) == -1) && (errno == EINTR))
    ;
  return retval;
}


x86 assembly (clang, -O0):
<r_waitpid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <waitpid@plt>
mov    %eax,%ecx
mov    %ecx,-0x18(%rbp)
xor    %eax,%eax
cmp    $0xffffffff,%ecx
mov    %al,-0x19(%rbp)
jne    115e <r_waitpid+0x4e>
mov    0x2e95(%rip),%rax
mov    (%rax),%rax
mov    0x2e83(%rip),%rcx
cmp    (%rcx),%rax
sete   %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
test   $0x1,%al
jne    116e <r_waitpid+0x5e>
jmp    1173 <r_waitpid+0x63>
jmp    1122 <r_waitpid+0x12>
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<r_waitpid>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %edi,%ebp
mov    0x2eb9(%rip),%r15
mov    0x2eaa(%rip),%r12
xchg   %ax,%ax
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %r14d,%edx
call   1030 <waitpid@plt>
cmp    $0xffffffff,%eax
jne    114b <r_waitpid+0x3b>
mov    (%r12),%rcx
cmp    %rcx,(%r15)
je     1130 <r_waitpid+0x20>
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@errno = global i64 0
@EINTR = global i64 0
define i32 @r_waitpid(i32 %0, i32* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i32* %1, i32** %5
store i32 %2, i32* %6
br label %8
8: ; preds = %20, %3
%9 = load i32, i32* %4
%10 = load i32*, i32** %5
%11 = load i32, i32* %6
%12 = call i32 @waitpid(i32 %9, i32* %10, i32 %11)
store i32 %12, i32* %7
%13 = icmp eq i32 %12, -1
br i1 %13, label %14, label %18
14: ; preds = %8
%15 = load i64, i64* @errno
%16 = load i64, i64* @EINTR
%17 = icmp eq i64 %15, %16
br label %18
18: ; preds = %14, %8
%19 = phi i1 [ false, %8 ], [ %17, %14 ]
br i1 %19, label %20, label %21
20: ; preds = %18
br label %8
21: ; preds = %18
%22 = load i32, i32* %7
ret i32 %22
}

LLVM IR (-O2):
@errno = global i64 0
@EINTR = global i64 0
define i32 @r_waitpid(i32 %0, i32* %1, i32 %2) {
br label %4
4: ; preds = %4, %3
%5 = tail call i32 @waitpid(i32 %0, i32* %1, i32 %2)
%6 = icmp eq i32 %5, -1
%7 = load i64, i64* @errno
%8 = load i64, i64* @EINTR
%9 = icmp eq i64 %7, %8
%10 = select i1 %6, i1 %9, i1 false
br i1 %10, label %4, label %11
11: ; preds = %4
ret i32 %5
}
int arch_intsize() { return 8; }


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

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

LLVM IR (-O0):
define i32 @arch_intsize() {
ret i32 8
}

LLVM IR (-O2):
define i32 @arch_intsize() {
ret i32 8
}
void cli() { __asm__("cli\n\t"); }


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

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

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

LLVM IR (-O2):
define void @cli() {
tail call void asm sideeffect "cli\0A\09", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
int fat_is_last_cluster(unsigned long cluster) {
  return ((cluster & 0xFFF8) == 0xFFF8);
}


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

x86 assembly (clang, -O2):
<fat_is_last_cluster>:
not    %edi
xor    %eax,%eax
test   $0xfff8,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @fat_is_last_cluster(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = and i64 %3, 65528
%5 = icmp eq i64 %4, 65528
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @fat_is_last_cluster(i64 %0) {
%2 = and i64 %0, 65528
%3 = icmp eq i64 %2, 65528
%4 = zext i1 %3 to i32
ret i32 %4
}
void SXNET_get_id_INTEGER(void) {}


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

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

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

LLVM IR (-O2):
define void @SXNET_get_id_INTEGER() {
ret void
}
double __FM_clampd(double value, double low, double high) {
  const double t = value < low ? low : value;
  return high < t ? high : t;
}


x86 assembly (clang, -O0):
<__FM_clampd>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1136 <__FM_clampd+0x36>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
jmp    1140 <__FM_clampd+0x40>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    116d <__FM_clampd+0x6d>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
jmp    1177 <__FM_clampd+0x77>
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<__FM_clampd>:
maxsd  %xmm0,%xmm1
minsd  %xmm1,%xmm2
movapd %xmm2,%xmm0
ret

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

LLVM IR (-O2):
define double @__FM_clampd(double %0, double %1, double %2) {
%4 = fcmp olt double %0, %1
%5 = select i1 %4, double %1, double %0
%6 = fcmp ogt double %5, %2
%7 = select i1 %6, double %2, double %5
ret double %7
}
/* Variables and functions */
int /*<<< orphan*/ set_io_bit(int, int);
void TOSH_MAKE_RADIO_SFD_OUTPUT() { set_io_bit(-3, 4); }


x86 assembly (clang, -O0):
<TOSH_MAKE_RADIO_SFD_OUTPUT>:
push   %rbp
mov    %rsp,%rbp
mov    $0xfffffffd,%edi
mov    $0x4,%esi
call   1030 <set_io_bit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<TOSH_MAKE_RADIO_SFD_OUTPUT>:
mov    $0xfffffffd,%edi
mov    $0x4,%esi
jmp    1030 <set_io_bit@plt>

LLVM IR (-O0):
define void @TOSH_MAKE_RADIO_SFD_OUTPUT() {
%1 = call i32 @set_io_bit(i32 -3, i32 4)
ret void
}

LLVM IR (-O2):
define void @TOSH_MAKE_RADIO_SFD_OUTPUT() {
%1 = tail call i32 @set_io_bit(i32 -3, i32 4)
ret void
}
int main() {
  int i = 0;
  int a = 0;
  for (i = 0; i < 111; i++) {
    a++;
  }
  return a;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x6f,-0x8(%rbp)
jge    1141 <main+0x41>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1120 <main+0x20>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 111
}
/* Variables and functions */
int rand();
int get_nonce(void) {
  static int first = 0;
  static int a;
  if (first == 0) {
    int b = rand();
    a = b;
  }
  first += 1;
  return a;
}


x86 assembly (clang, -O0):
<get_nonce>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
cmpl   $0x0,0x2f0d(%rip)
jne    1138 <get_nonce+0x28>
mov    $0x0,%al
call   1030 <rand@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,0x2ef8(%rip)
mov    0x2eee(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2ee5(%rip)
mov    0x2ee3(%rip),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_nonce>:
push   %rax
mov    0x2f15(%rip),%ecx
test   %ecx,%ecx
je     1123 <get_nonce+0x13>
mov    0x2f0f(%rip),%eax
jmp    1136 <get_nonce+0x26>
xor    %eax,%eax
call   1030 <rand@plt>
mov    %eax,0x2f00(%rip)
mov    0x2ef6(%rip),%ecx
add    $0x1,%ecx
mov    %ecx,0x2eed(%rip)
pop    %rcx
ret

LLVM IR (-O0):
@get_nonce.first = internal global i32 0
@get_nonce.a = internal global i32 0
define i32 @get_nonce() {
%1 = alloca i32
%2 = load i32, i32* @get_nonce.first
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %7
4: ; preds = %0
%5 = call i32 (...) @rand()
store i32 %5, i32* %1
%6 = load i32, i32* %1
store i32 %6, i32* @get_nonce.a
br label %7
7: ; preds = %4, %0
%8 = load i32, i32* @get_nonce.first
%9 = add nsw i32 %8, 1
store i32 %9, i32* @get_nonce.first
%10 = load i32, i32* @get_nonce.a
ret i32 %10
}

LLVM IR (-O2):
@get_nonce.first = internal unnamed_addr global i32 0
@get_nonce.a = internal unnamed_addr global i32 0
define i32 @get_nonce() {
%1 = load i32, i32* @get_nonce.first
%2 = icmp eq i32 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = load i32, i32* @get_nonce.a
br label %8
5: ; preds = %0
%6 = tail call i32 (...) @rand()
store i32 %6, i32* @get_nonce.a
%7 = load i32, i32* @get_nonce.first
br label %8
8: ; preds = %3, %5
%9 = phi i32 [ %6, %5 ], [ %4, %3 ]
%10 = phi i32 [ %7, %5 ], [ %1, %3 ]
%11 = add nsw i32 %10, 1
store i32 %11, i32* @get_nonce.first
ret i32 %9
}
void exec_vm(void) {}


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

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

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

LLVM IR (-O2):
define void @exec_vm() {
ret void
}
int test_imm_A5uint16_reg(unsigned short val) {
  return ((val) & (0xA5 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_A5uint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edx
and    $0xa5,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_A5uint16_reg(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = and i32 %4, 165
%6 = icmp ne i32 %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_A5uint16_reg(i16 zeroext %0) {
%2 = and i16 %0, 165
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ f2();
void __attribute__((stdcall)) f4(void) { f2(); }


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

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

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

LLVM IR (-O2):
define void @f4() {
%1 = tail call i32 (...) @f2()
ret void
}
Init_md5() {}


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

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

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

LLVM IR (-O2):
define i32 @Init_md5() {
ret i32 undef
}
void kegi_env_init() {}


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

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

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

LLVM IR (-O2):
define void @kegi_env_init() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ gid_t;

/* Variables and functions */
int errno;
int getgroups(int, int /*<<< orphan*/ *);
void c_getgroups_(gid_t *glist, int *gmax, int *ngroups, int *err) {
  *ngroups = getgroups(*gmax, glist);
  *err = errno;
}


x86 assembly (clang, -O0):
<c_getgroups_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
call   1030 <getgroups@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    0x2e9a(%rip),%rax
mov    (%rax),%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_getgroups_>:
push   %r14
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %rdx,%rbx
mov    %rdi,%rax
mov    (%rsi),%edi
mov    %rax,%rsi
call   1030 <getgroups@plt>
mov    %eax,(%rbx)
mov    0x2eb0(%rip),%rax
mov    (%rax),%eax
mov    %eax,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@errno = global i32 0
define void @c_getgroups_(i32* %0, i32* %1, i32* %2, i32* %3) {
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32*
store i32* %0, i32** %5
store i32* %1, i32** %6
store i32* %2, i32** %7
store i32* %3, i32** %8
%9 = load i32*, i32** %6
%10 = load i32, i32* %9
%11 = load i32*, i32** %5
%12 = call i32 @getgroups(i32 %10, i32* %11)
%13 = load i32*, i32** %7
store i32 %12, i32* %13
%14 = load i32, i32* @errno
%15 = load i32*, i32** %8
store i32 %14, i32* %15
ret void
}

LLVM IR (-O2):
@errno = global i32 0
define void @c_getgroups_(i32* %0, i32* nocapture %1, i32* nocapture writeonly %2, i32* nocapture writeonly %3) {
%5 = load i32, i32* %1
%6 = tail call i32 @getgroups(i32 %5, i32* %0)
store i32 %6, i32* %2
%7 = load i32, i32* @errno
store i32 %7, i32* %3
ret void
}
int belongsto(int k, int *qual_tags, int nQ) {
  int i;
  for (i = 0; i < nQ; i++) {
    if (k == qual_tags[i])
      return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<belongsto>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1154 <belongsto+0x54>
mov    -0x8(%rbp),%eax
mov    -0x10(%rbp),%rcx
movslq -0x18(%rbp),%rdx
cmp    (%rcx,%rdx,4),%eax
jne    1141 <belongsto+0x41>
movl   $0x1,-0x4(%rbp)
jmp    115b <belongsto+0x5b>
jmp    1146 <belongsto+0x46>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1115 <belongsto+0x15>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<belongsto>:
test   %edx,%edx
jle    111e <belongsto+0x1e>
mov    %edx,%eax
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
cmp    %edi,(%rsi,%rcx,4)
je     1121 <belongsto+0x21>
add    $0x1,%rcx
cmp    %rcx,%rax
jne    1110 <belongsto+0x10>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @belongsto(i32 %0, i32* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32* %1, i32** %6
store i32 %2, i32* %7
store i32 0, i32* %8
br label %9
9: ; preds = %23, %3
%10 = load i32, i32* %8
%11 = load i32, i32* %7
%12 = icmp slt i32 %10, %11
br i1 %12, label %13, label %26
13: ; preds = %9
%14 = load i32, i32* %5
%15 = load i32*, i32** %6
%16 = load i32, i32* %8
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i32, i32* %15, i64 %17
%19 = load i32, i32* %18
%20 = icmp eq i32 %14, %19
br i1 %20, label %21, label %22
21: ; preds = %13
store i32 1, i32* %4
br label %27
22: ; preds = %13
br label %23
23: ; preds = %22
%24 = load i32, i32* %8
%25 = add nsw i32 %24, 1
store i32 %25, i32* %8
br label %9
26: ; preds = %9
store i32 0, i32* %4
br label %27
27: ; preds = %26, %21
%28 = load i32, i32* %4
ret i32 %28
}

LLVM IR (-O2):
define i32 @belongsto(i32 %0, i32* nocapture %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %15
5: ; preds = %3
%6 = zext i32 %2 to i64
br label %9
7: ; preds = %9
%8 = icmp eq i64 %14, %6
br i1 %8, label %15, label %9
9: ; preds = %5, %7
%10 = phi i64 [ 0, %5 ], [ %14, %7 ]
%11 = getelementptr inbounds i32, i32* %1, i64 %10
%12 = load i32, i32* %11
%13 = icmp eq i32 %12, %0
%14 = add nuw nsw i64 %10, 1
br i1 %13, label %15, label %7
15: ; preds = %9, %7, %3
%16 = phi i32 [ 0, %3 ], [ 0, %7 ], [ 1, %9 ]
ret i32 %16
}
/* Variables and functions */
int /*<<< orphan*/ execv(char *, char **);
int main(int argc, char **argv) {
  argv[0] = "awk";
  execv("/vsta/bin/awk", argv);
  return (1);
}


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"awk\00"
@.str.1 = [14 x i8] c"/vsta/bin/awk\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 = load i8**, i8*** %5
%7 = getelementptr inbounds i8*, i8** %6, i64 0
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %7
%8 = load i8**, i8*** %5
%9 = call i32 @execv(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8** %8)
ret i32 1
}

LLVM IR (-O2):
@.str = [4 x i8] c"awk\00"
@.str.1 = [14 x i8] c"/vsta/bin/awk\00"
define i32 @main(i32 %0, i8** %1) {
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %1
%3 = tail call i32 @execv(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8** %1)
ret i32 1
}