xunge/DecIR huggingface dataset:
/* Variables and functions */
char EOF;
char getchar();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ putchar(char);
int main(void) {
  char c;
  while ((c = getchar()) != EOF) {
    printf(" = ");
    putchar(c);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <getchar@plt>
mov    %al,-0x5(%rbp)
movsbl %al,%eax
mov    0x2e95(%rip),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
je     1178 <main+0x48>
lea    0xe9b(%rip),%rdi
call   1040 <printf@plt>
movsbl -0x5(%rbp),%edi
call   1030 <putchar@plt>
jmp    113f <main+0xf>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
xor    %eax,%eax
call   1050 <getchar@plt>
mov    0x2ea5(%rip),%r15
cmp    (%r15),%al
je     117e <main+0x4e>
mov    %eax,%ebx
lea    0xeaf(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1040 <printf@plt>
movsbl %bl,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
mov    %eax,%ebx
cmp    (%r15),%al
jne    1160 <main+0x30>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@EOF = global i8 0
@.str = [4 x i8] c" = \00"
define i32 @main() {
%1 = tail call signext i8 (...) @getchar()
%2 = load i8, i8* @EOF
%3 = icmp eq i8 %1, %2
br i1 %3, label %11, label %4
4: ; preds = %0, %4
%5 = phi i8 [ %8, %4 ], [ %1, %0 ]
%6 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @putchar(i8 signext %5)
%8 = tail call signext i8 (...) @getchar()
%9 = load i8, i8* @EOF
%10 = icmp eq i8 %8, %9
br i1 %10, label %11, label %4
11: ; preds = %4, %0
ret i32 0
}
/* Variables and functions */
scalar_t__ testIntegerList();
scalar_t__ testStringList();
int main(int argc, char **argv) {
  int ret = 0;
  ret += testIntegerList();
  ret += testStringList();
  return ret;
}


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   $0x0,-0x14(%rbp)
mov    $0x0,%al
call   1030 <testIntegerList@plt>
mov    %rax,%rcx
movslq -0x14(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1040 <testStringList@plt>
mov    %rax,%rcx
movslq -0x14(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1030 <testIntegerList@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1040 <testStringList@plt>
add    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
%7 = call i64 (...) @testIntegerList()
%8 = load i32, i32* %6
%9 = sext i32 %8 to i64
%10 = add nsw i64 %9, %7
%11 = trunc i64 %10 to i32
store i32 %11, i32* %6
%12 = call i64 (...) @testStringList()
%13 = load i32, i32* %6
%14 = sext i32 %13 to i64
%15 = add nsw i64 %14, %12
%16 = trunc i64 %15 to i32
store i32 %16, i32* %6
%17 = load i32, i32* %6
ret i32 %17
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i64 (...) @testIntegerList()
%4 = tail call i64 (...) @testStringList()
%5 = add i64 %4, %3
%6 = trunc i64 %5 to i32
ret i32 %6
}
int f3(__attribute__((vector_size(16))) int t) { return ((int *)&t)[3]; }


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

x86 assembly (clang, -O2):
<f3>:
pshufd $0xff,%xmm0,%xmm0
movd   %xmm0,%eax
ret

LLVM IR (-O0):
define i32 @f3(<4 x i32> %0) {
%2 = alloca <4 x i32>
store <4 x i32> %0, <4 x i32>* %2
%3 = bitcast <4 x i32>* %2 to i32*
%4 = getelementptr inbounds i32, i32* %3, i64 3
%5 = load i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @f3(<4 x i32> %0) {
%2 = extractelement <4 x i32> %0, i64 3
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ RDTSC();
int /*<<< orphan*/ srand(int /*<<< orphan*/);
void disc_random_init() {
  uint32_t seed = RDTSC();
  srand(seed);
  return;
}


x86 assembly (clang, -O0):
<disc_random_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <RDTSC@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <srand@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @disc_random_init() {
%1 = alloca i32
%2 = call i32 (...) @RDTSC()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = call i32 @srand(i32 %3)
ret void
}

LLVM IR (-O2):
define void @disc_random_init() {
%1 = tail call i32 (...) @RDTSC()
%2 = tail call i32 @srand(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ quit();
scalar_t__ read(int /*<<< orphan*/, char *, int);
int getch0() {
  char c;
  if (read(0, &c, 1) <= 0)
    quit();
  return c;
}


x86 assembly (clang, -O0):
<getch0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %edi,%edi
lea    -0x1(%rbp),%rsi
mov    $0x1,%edx
call   1040 <read@plt>
cmp    $0x0,%rax
jg     1149 <getch0+0x29>
mov    $0x0,%al
call   1030 <quit@plt>
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getch0>:
push   %rax
lea    0x7(%rsp),%rsi
xor    %edi,%edi
mov    $0x1,%edx
call   1040 <read@plt>
test   %rax,%rax
jg     113e <getch0+0x1e>
xor    %eax,%eax
call   1030 <quit@plt>
movsbl 0x7(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @getch0() {
%1 = alloca i8
%2 = call i64 @read(i32 0, i8* %1, i32 1)
%3 = icmp sle i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @quit()
br label %6
6: ; preds = %4, %0
%7 = load i8, i8* %1
%8 = sext i8 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @getch0() {
%1 = alloca i8
%2 = call i64 @read(i32 0, i8* %1, i32 1)
%3 = icmp slt i64 %2, 1
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = tail call i32 (...) @quit()
br label %6
6: ; preds = %4, %0
%7 = load i8, i8* %1
%8 = sext i8 %7 to i32
ret i32 %8
}
unsigned char count_set_bits(unsigned char n) {
  unsigned char count = 0;
  for (count = 0; n != 0; count++) {
    n &= n - 1;
  }
  return count;
}


x86 assembly (clang, -O0):
<count_set_bits>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movb   $0x0,-0x2(%rbp)
movb   $0x0,-0x2(%rbp)
movzbl -0x1(%rbp),%eax
cmp    $0x0,%eax
je     113c <count_set_bits+0x3c>
movzbl -0x1(%rbp),%ecx
sub    $0x1,%ecx
movzbl -0x1(%rbp),%eax
and    %ecx,%eax
mov    %al,-0x1(%rbp)
mov    -0x2(%rbp),%al
add    $0x1,%al
mov    %al,-0x2(%rbp)
jmp    1112 <count_set_bits+0x12>
movzbl -0x2(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<count_set_bits>:
xor    %eax,%eax
test   %edi,%edi
je     111c <count_set_bits+0x1c>
cs nopw 0x0(%rax,%rax,1)
lea    -0x1(%rdi),%ecx
add    $0x1,%al
and    %dil,%cl
mov    %ecx,%edi
jne    1110 <count_set_bits+0x10>
ret

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

LLVM IR (-O2):
define zeroext i8 @count_set_bits(i8 zeroext %0) {
%2 = icmp eq i8 %0, 0
br i1 %2, label %10, label %3
3: ; preds = %1, %3
%4 = phi i8 [ %8, %3 ], [ 0, %1 ]
%5 = phi i8 [ %7, %3 ], [ %0, %1 ]
%6 = add i8 %5, -1
%7 = and i8 %6, %5
%8 = add i8 %4, 1
%9 = icmp eq i8 %7, 0
br i1 %9, label %10, label %3
10: ; preds = %3, %1
%11 = phi i8 [ 0, %1 ], [ %8, %3 ]
ret i8 %11
}
/* Variables and functions */
char *_osmo_hexdump(unsigned char const *, int, char *);
char *osmo_hexdump(const unsigned char *buf, int len) {
  return _osmo_hexdump(buf, len, " ");
}


x86 assembly (clang, -O0):
<osmo_hexdump>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
lea    0xed3(%rip),%rdx
call   1030 <_osmo_hexdump@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<osmo_hexdump>:
lea    0xee9(%rip),%rdx
jmp    1030 <_osmo_hexdump@plt>

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

LLVM IR (-O2):
@.str = [2 x i8] c" \00"
define i8* @osmo_hexdump(i8* %0, i32 %1) {
%3 = tail call i8* @_osmo_hexdump(i8* %0, i32 %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i8* %3
}
int is_empty(char *str) {
  if (*str == '\n')
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<is_empty>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
jne    1124 <is_empty+0x24>
movl   $0x1,-0x4(%rbp)
jmp    112b <is_empty+0x2b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_empty>:
xor    %eax,%eax
cmpb   $0xa,(%rdi)
sete   %al
ret

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

LLVM IR (-O2):
define i32 @is_empty(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
void SDL_Quit(void) {}


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

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

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

LLVM IR (-O2):
define void @SDL_Quit() {
ret void
}
char *langRomTypeKanji12() { return "Kanji 12"; }


x86 assembly (clang, -O0):
<langRomTypeKanji12>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<langRomTypeKanji12>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [9 x i8] c"Kanji 12\00"
define i8* @langRomTypeKanji12() {
ret i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [9 x i8] c"Kanji 12\00"
define i8* @langRomTypeKanji12() {
ret i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
struct stat {
  int dummy;
};
struct FTW {
  int dummy;
};

/* Variables and functions */
int remove(char const *);
int removeDir_nftw_cb(const char *fpath, const struct stat *sb, int typeflag,
                      struct FTW *ftwbuf) {
  int ret = remove(fpath);
  return ret;
}


x86 assembly (clang, -O0):
<removeDir_nftw_cb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <remove@plt>
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<removeDir_nftw_cb>:
jmp    1030 <remove@plt>

LLVM IR (-O0):
%struct.stat = type { i32 }
%struct.FTW = type { i32 }
define i32 @removeDir_nftw_cb(i8* %0, %struct.stat* %1, i32 %2, %struct.FTW* %3) {
%5 = alloca i8*
%6 = alloca %struct.stat*
%7 = alloca i32
%8 = alloca %struct.FTW*
%9 = alloca i32
store i8* %0, i8** %5
store %struct.stat* %1, %struct.stat** %6
store i32 %2, i32* %7
store %struct.FTW* %3, %struct.FTW** %8
%10 = load i8*, i8** %5
%11 = call i32 @remove(i8* %10)
store i32 %11, i32* %9
%12 = load i32, i32* %9
ret i32 %12
}

LLVM IR (-O2):
%struct.stat = type { i32 }
%struct.FTW = type { i32 }
define i32 @removeDir_nftw_cb(i8* nocapture %0, %struct.stat* nocapture readnone %1, i32 %2, %struct.FTW* nocapture readnone %3) {
%5 = tail call i32 @remove(i8* %0)
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ strtoll(char *, char **, int);
int mystrtou32(char **p, int base, uint32_t *res) {
  char *start = *p;
  *res = strtoll(*p, p, base);
  if (*p != start)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<mystrtou32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <strtoll@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
cmp    -0x28(%rbp),%rax
je     1166 <mystrtou32+0x56>
movl   $0x1,-0x4(%rbp)
jmp    116d <mystrtou32+0x5d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mystrtou32>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %esi,%edx
mov    %rdi,%rbx
mov    (%rdi),%r15
mov    %r15,%rdi
mov    %rbx,%rsi
call   1030 <strtoll@plt>
mov    %eax,(%r14)
xor    %eax,%eax
cmp    %r15,(%rbx)
setne  %al
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i32 @mystrtou32(i8** nocapture %0, i32 %1, i32* nocapture writeonly %2) {
%4 = load i8*, i8** %0
%5 = tail call i32 @strtoll(i8* %4, i8** %0, i32 %1)
store i32 %5, i32* %2
%6 = load i8*, i8** %0
%7 = icmp ne i8* %6, %4
%8 = zext i1 %7 to i32
ret i32 %8
}
int max2(int vetor[], int tamVetor) {
  if (tamVetor == 1) {
    return vetor[0];
  } else {
    int x = max2(vetor, tamVetor - 1);
    if (x > vetor[tamVetor - 1]) {
      return x;
    } else {
      return vetor[tamVetor - 1];
    }
  }
}


x86 assembly (clang, -O0):
<max2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
cmpl   $0x1,-0x14(%rbp)
jne    1137 <max2+0x27>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1180 <max2+0x70>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
sub    $0x1,%esi
call   1030 <max2@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    -0x10(%rbp),%rcx
mov    -0x14(%rbp),%edx
sub    $0x1,%edx
movslq %edx,%rdx
cmp    (%rcx,%rdx,4),%eax
jle    116d <max2+0x5d>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1180 <max2+0x70>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<max2>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
cmp    $0x1,%esi
jne    1121 <max2+0x11>
mov    (%r14),%eax
jmp    113d <max2+0x2d>
mov    %esi,%ebx
lea    -0x1(%rbx),%esi
mov    %r14,%rdi
call   1030 <max2@plt>
mov    %eax,%ecx
movslq %ebx,%rax
mov    -0x4(%r14,%rax,4),%eax
cmp    %eax,%ecx
cmovg  %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @max2(i32* nocapture %0, i32 %1) {
%3 = icmp eq i32 %1, 1
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = load i32, i32* %0
br label %6
6: ; preds = %4, %8
%7 = phi i32 [ %15, %8 ], [ %5, %4 ]
ret i32 %7
8: ; preds = %2
%9 = add nsw i32 %1, -1
%10 = tail call i32 @max2(i32* %0, i32 %9)
%11 = sext i32 %9 to i64
%12 = getelementptr inbounds i32, i32* %0, i64 %11
%13 = load i32, i32* %12
%14 = icmp sgt i32 %10, %13
%15 = select i1 %14, i32 %10, i32 %13
br label %6
}
/* Variables and functions */
int ksft_exit_fail();
int ksft_exit_pass();
scalar_t__ validate_freq();
scalar_t__ validate_set_offset();
int main(int argc, char **argv) {
  if (validate_freq())
    return ksft_exit_fail();
  if (validate_set_offset())
    return ksft_exit_fail();
  return ksft_exit_pass();
}


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    $0x0,%al
call   1050 <validate_freq@plt>
cmp    $0x0,%rax
je     1176 <main+0x36>
mov    $0x0,%al
call   1040 <ksft_exit_fail@plt>
mov    %eax,-0x4(%rbp)
jmp    11a0 <main+0x60>
mov    $0x0,%al
call   1060 <validate_set_offset@plt>
cmp    $0x0,%rax
je     1196 <main+0x56>
mov    $0x0,%al
call   1040 <ksft_exit_fail@plt>
mov    %eax,-0x4(%rbp)
jmp    11a0 <main+0x60>
mov    $0x0,%al
call   1030 <ksft_exit_pass@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <validate_freq@plt>
test   %rax,%rax
jne    1159 <main+0x19>
xor    %eax,%eax
call   1060 <validate_set_offset@plt>
test   %rax,%rax
je     1161 <main+0x21>
xor    %eax,%eax
pop    %rcx
jmp    1040 <ksft_exit_fail@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <ksft_exit_pass@plt>

LLVM IR (-O0):
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 i64 (...) @validate_freq()
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = call i32 (...) @ksft_exit_fail()
store i32 %9, i32* %3
br label %17
10: ; preds = %2
%11 = call i64 (...) @validate_set_offset()
%12 = icmp ne i64 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %10
%14 = call i32 (...) @ksft_exit_fail()
store i32 %14, i32* %3
br label %17
15: ; preds = %10
%16 = call i32 (...) @ksft_exit_pass()
store i32 %16, i32* %3
br label %17
17: ; preds = %15, %13, %8
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i64 (...) @validate_freq()
%4 = icmp eq i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 (...) @ksft_exit_fail()
br label %14
7: ; preds = %2
%8 = tail call i64 (...) @validate_set_offset()
%9 = icmp eq i64 %8, 0
br i1 %9, label %12, label %10
10: ; preds = %7
%11 = tail call i32 (...) @ksft_exit_fail()
br label %14
12: ; preds = %7
%13 = tail call i32 (...) @ksft_exit_pass()
br label %14
14: ; preds = %12, %10, %5
%15 = phi i32 [ %6, %5 ], [ %11, %10 ], [ %13, %12 ]
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ libpcspeak_release(int);
void libpcspeak_close(int device) {
  libpcspeak_release(device);
  if (device != -1) {
    close(device);
  }
}


x86 assembly (clang, -O0):
<libpcspeak_close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <libpcspeak_release@plt>
cmpl   $0xffffffff,-0x4(%rbp)
je     1145 <libpcspeak_close+0x25>
mov    -0x4(%rbp),%edi
call   1030 <close@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<libpcspeak_close>:
push   %rbx
mov    %edi,%ebx
call   1040 <libpcspeak_release@plt>
cmp    $0xffffffff,%ebx
je     1135 <libpcspeak_close+0x15>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <close@plt>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @libpcspeak_close(i32 %0) {
%2 = tail call i32 @libpcspeak_release(i32 %0)
%3 = icmp eq i32 %0, -1
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @close(i32 %0)
br label %6
6: ; preds = %4, %1
ret void
}
/* Variables and functions */
int isinf(float f) {
  unsigned long *pl = (unsigned long *)&f;
  return *pl == 0x7f800000 || *pl == 0xff800000;
}


x86 assembly (clang, -O0):
<isinf>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
mov    $0x1,%al
cmpq   $0x7f800000,(%rcx)
mov    %al,-0x11(%rbp)
je     1139 <isinf+0x39>
mov    -0x10(%rbp),%rax
mov    $0xff800000,%ecx
cmp    %rcx,(%rax)
sete   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isinf>:
movss  %xmm0,-0x8(%rsp)
movabs $0xffffffff7fffffff,%rcx
ff ff ff
and    -0x8(%rsp),%rcx
xor    %eax,%eax
cmp    $0x7f800000,%rcx
sete   %al
ret

LLVM IR (-O0):
define i32 @isinf(float %0) {
%2 = alloca float
%3 = alloca i64*
store float %0, float* %2
%4 = bitcast float* %2 to i64*
store i64* %4, i64** %3
%5 = load i64*, i64** %3
%6 = load i64, i64* %5
%7 = icmp eq i64 %6, 2139095040
br i1 %7, label %12, label %8
8: ; preds = %1
%9 = load i64*, i64** %3
%10 = load i64, i64* %9
%11 = icmp eq i64 %10, 4286578688
br label %12
12: ; preds = %8, %1
%13 = phi i1 [ true, %1 ], [ %11, %8 ]
%14 = zext i1 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
define i32 @isinf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = bitcast float* %2 to i64*
%4 = load i64, i64* %3
%5 = and i64 %4, -2147483649
%6 = icmp eq i64 %5, 2139095040
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ strncat(char *, char *, int);
void strncat_fn(char *x) { strncat(x, (char *)&strncat_fn, 4); }


x86 assembly (clang, -O0):
<strncat_fn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2eb9(%rip),%rsi
mov    $0x4,%edx
call   1030 <strncat@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strncat_fn>:
mov    0x2ec9(%rip),%rsi
mov    $0x4,%edx
jmp    1030 <strncat@plt>

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

LLVM IR (-O2):
define void @strncat_fn(i8* %0) {
%2 = tail call i32 @strncat(i8* %0, i8* bitcast (void (i8*)* @strncat_fn to i8*), i32 4)
ret void
}
unsigned char encode64Char4(char ci3) {
  unsigned char c4 = ci3 & 63;
  return c4;
}


x86 assembly (clang, -O0):
<encode64Char4>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
and    $0x3f,%eax
mov    %al,-0x2(%rbp)
movzbl -0x2(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<encode64Char4>:
mov    %edi,%eax
and    $0x3f,%al
ret

LLVM IR (-O0):
define zeroext i8 @encode64Char4(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %2
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
%6 = and i32 %5, 63
%7 = trunc i32 %6 to i8
store i8 %7, i8* %3
%8 = load i8, i8* %3
ret i8 %8
}

LLVM IR (-O2):
define zeroext i8 @encode64Char4(i8 signext %0) {
%2 = and i8 %0, 63
ret i8 %2
}
int tea_bag_size(int len) {
  int mod = len & (8 - 1);
  if (mod)
    len += 8 - mod;
  return len;
}


x86 assembly (clang, -O0):
<tea_bag_size>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x7,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1128 <tea_bag_size+0x28>
mov    $0x8,%eax
sub    -0x8(%rbp),%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tea_bag_size>:
mov    %edi,%ecx
and    $0x7,%ecx
mov    $0x8,%eax
sub    %ecx,%eax
test   %ecx,%ecx
cmove  %ecx,%eax
add    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @tea_bag_size(i32 %0) {
%2 = and i32 %0, 7
%3 = icmp eq i32 %2, 0
%4 = sub nuw nsw i32 8, %2
%5 = select i1 %3, i32 0, i32 %4
%6 = add nsw i32 %5, %0
ret i32 %6
}
void *hashmap_int_duplicate(void *key) { return key; }


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

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

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

LLVM IR (-O2):
define i8* @hashmap_int_duplicate(i8* readnone returned %0) {
ret i8* %0
}
void UART0_SendData8(unsigned char data) {}


x86 assembly (clang, -O0):
<UART0_SendData8>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @UART0_SendData8(i8 zeroext %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gmx_filter(int, char **);
int main(int argc, char *argv[]) {
  gmx_filter(argc, argv);
  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)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <gmx_filter@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
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 i32, i32* %4
%7 = load i8**, i8*** %5
%8 = call i32 @gmx_filter(i32 %6, i8** %7)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @gmx_filter(i32 %0, i8** %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ getchar();
int main(int argc, char *argv[]) {
  (void)getchar();
  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)
mov    $0x0,%al
call   1030 <getchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
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 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @getchar()
ret i32 0
}
void b43_debugfs_remove_device(struct b43_wldev *dev) {}


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

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

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

LLVM IR (-O2):
%struct.b43_wldev = type opaque
define void @b43_debugfs_remove_device(%struct.b43_wldev* nocapture %0) {
ret void
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ AT_FDCWD;
int /*<<< orphan*/ AT_SYMLINK_NOFOLLOW;
int fstatat(int /*<<< orphan*/, char const *, struct stat *,
            int /*<<< orphan*/);
int lstat(const char *restrict path, struct stat *restrict buf) {
  return fstatat(AT_FDCWD, path, buf, AT_SYMLINK_NOFOLLOW);
}


x86 assembly (clang, -O0):
<lstat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    0x2ea8(%rip),%rax
mov    (%rax),%ecx
call   1030 <fstatat@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lstat>:
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
mov    0x2eba(%rip),%rax
mov    (%rax),%ecx
jmp    1030 <fstatat@plt>

LLVM IR (-O0):
%struct.stat = type { i32 }
@AT_FDCWD = global i32 0
@AT_SYMLINK_NOFOLLOW = global i32 0
define i32 @lstat(i8* noalias %0, %struct.stat* noalias %1) {
%3 = alloca i8*
%4 = alloca %struct.stat*
store i8* %0, i8** %3
store %struct.stat* %1, %struct.stat** %4
%5 = load i32, i32* @AT_FDCWD
%6 = load i8*, i8** %3
%7 = load %struct.stat*, %struct.stat** %4
%8 = load i32, i32* @AT_SYMLINK_NOFOLLOW
%9 = call i32 @fstatat(i32 %5, i8* %6, %struct.stat* %7, i32 %8)
ret i32 %9
}

LLVM IR (-O2):
%struct.stat = type { i32 }
@AT_FDCWD = global i32 0
@AT_SYMLINK_NOFOLLOW = global i32 0
define i32 @lstat(i8* noalias %0, %struct.stat* noalias %1) {
%3 = load i32, i32* @AT_FDCWD
%4 = load i32, i32* @AT_SYMLINK_NOFOLLOW
%5 = tail call i32 @fstatat(i32 %3, i8* %0, %struct.stat* %1, i32 %4)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int seedRandom() {
  srand(time(NULL));
  return 0;
}


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

x86 assembly (clang, -O2):
<seedRandom>:
push   %rax
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @seedRandom() {
%1 = call i32 @time(i32* null)
%2 = call i32 @srand(i32 %1)
ret i32 0
}

LLVM IR (-O2):
define i32 @seedRandom() {
%1 = tail call i32 @time(i32* null)
%2 = tail call i32 @srand(i32 %1)
ret i32 0
}
int fpattern_matchn(const char *pat, const char *fname) {
  int rc;
  if (fname == ((void *)0))
    return (0);
  if (pat == ((void *)0))
    return (0);
  rc = fpattern_submatch(pat, fname);
  return (rc);
}


x86 assembly (clang, -O0):
<fpattern_matchn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1137 <fpattern_matchn+0x27>
movl   $0x0,-0x4(%rbp)
jmp    1166 <fpattern_matchn+0x56>
cmpq   $0x0,-0x10(%rbp)
jne    114e <fpattern_matchn+0x3e>
movl   $0x0,-0x4(%rbp)
jmp    1166 <fpattern_matchn+0x56>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x0,%al
call   1030 <fpattern_submatch@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fpattern_matchn>:
test   %rdi,%rdi
je     1121 <fpattern_matchn+0x11>
test   %rsi,%rsi
je     1121 <fpattern_matchn+0x11>
xor    %eax,%eax
jmp    1030 <fpattern_submatch@plt>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @fpattern_matchn(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
%7 = load i8*, i8** %5
%8 = icmp eq i8* %7, null
br i1 %8, label %9, label %10
9: ; preds = %2
store i32 0, i32* %3
br label %19
10: ; preds = %2
%11 = load i8*, i8** %4
%12 = icmp eq i8* %11, null
br i1 %12, label %13, label %14
13: ; preds = %10
store i32 0, i32* %3
br label %19
14: ; preds = %10
%15 = load i8*, i8** %4
%16 = load i8*, i8** %5
%17 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @fpattern_submatch to i32 (i8*, i8*, ...)*)(i8* %15, i8* %16)
store i32 %17, i32* %6
%18 = load i32, i32* %6
store i32 %18, i32* %3
br label %19
19: ; preds = %14, %13, %9
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
define i32 @fpattern_matchn(i8* %0, i8* %1) {
%3 = icmp eq i8* %1, null
%4 = icmp eq i8* %0, null
%5 = or i1 %4, %3
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @fpattern_submatch to i32 (i8*, i8*, ...)*)(i8* %0, i8* %1)
br label %8
8: ; preds = %2, %6
%9 = phi i32 [ %7, %6 ], [ 0, %2 ]
ret i32 %9
}
char *timlib_system_date_string(void) {
  return "echo '<h2>' && TZ=`appaserver_tz.sh` date '+%x %H:%M' && echo "
         "'</h2>'";
}


x86 assembly (clang, -O0):
<timlib_system_date_string>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<timlib_system_date_string>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [70 x i8] c"echo '<h2>' && TZ=`appaserver_tz.sh` date '+%x %H:%M' && echo '</h2>'\00"
define i8* @timlib_system_date_string() {
ret i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [70 x i8] c"echo '<h2>' && TZ=`appaserver_tz.sh` date '+%x %H:%M' && echo '</h2>'\00"
define i8* @timlib_system_date_string() {
ret i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
void *malloc(unsigned int);
void *MemAlloc(unsigned int ulMemSize) { return malloc(ulMemSize); }


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

x86 assembly (clang, -O2):
<MemAlloc>:
jmp    1030 <malloc@plt>

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

LLVM IR (-O2):
define noalias i8* @MemAlloc(i32 %0) {
%2 = tail call i8* @malloc(i32 %0)
ret i8* %2
}
/* Variables and functions */
int strlen(char const *);
int /*<<< orphan*/ write(char const *, int);
int main() {
  const char *message = "Hello, World\n";
  int len = strlen(message);
  write(message, len);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <write@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [14 x i8] c"Hello, World\0A\00"
define i32 @main() {
%1 = tail call i32 @strlen(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @write(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
int test_imm_0Auint64_lowword_reg(unsigned long long val) {
  return ((val) & (0x0A << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_0Auint64_lowword_reg(i64 %0) {
%2 = and i64 %0, 10
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void RnAssemblyCLI() { asm volatile("cli"); }


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

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

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

LLVM IR (-O2):
define void @RnAssemblyCLI() {
tail call void asm sideeffect "cli", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("intsize=%d;\n", (int)sizeof(int));
  printf("longsize=%d;\n", (int)sizeof(long));
  printf("shortsize=%d;\n", (int)sizeof(short));
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
lea    0xec6(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
lea    0xec3(%rip),%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
lea    0xed4(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
lea    0xed1(%rip),%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"intsize=%d;\0A\00"
@.str.1 = [14 x i8] c"longsize=%d;\0A\00"
@.str.2 = [15 x i8] c"shortsize=%d;\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 4)
%3 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 8)
%4 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i32 2)
%5 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [13 x i8] c"intsize=%d;\0A\00"
@.str.1 = [14 x i8] c"longsize=%d;\0A\00"
@.str.2 = [15 x i8] c"shortsize=%d;\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 4)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 8)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i32 2)
%4 = tail call i32 @exit(i32 0)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ UP3D_GetParameter(int);
float UP3D_GetHeaterTemp(int heater) {
  if ((heater < 1) || (heater > 4))
    return -1;
  uint32_t f = UP3D_GetParameter(0x06 + heater - 1);
  return *((float *)&f);
}


x86 assembly (clang, -O0):
<UP3D_GetHeaterTemp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jl     112f <UP3D_GetHeaterTemp+0x1f>
cmpl   $0x4,-0x8(%rbp)
jle    1141 <UP3D_GetHeaterTemp+0x31>
movss  0xec9(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    115c <UP3D_GetHeaterTemp+0x4c>
mov    -0x8(%rbp),%edi
add    $0x6,%edi
sub    $0x1,%edi
call   1030 <UP3D_GetParameter@plt>
mov    %eax,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UP3D_GetHeaterTemp>:
push   %rax
lea    -0x5(%rdi),%eax
cmp    $0xfffffffc,%eax
jae    1123 <UP3D_GetHeaterTemp+0x13>
movss  0xedf(%rip),%xmm0
pop    %rax
ret
add    $0x5,%edi
call   1030 <UP3D_GetParameter@plt>
movd   %eax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @UP3D_GetHeaterTemp(i32 %0) {
%2 = alloca float
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 1
br i1 %6, label %10, label %7
7: ; preds = %1
%8 = load i32, i32* %3
%9 = icmp sgt i32 %8, 4
br i1 %9, label %10, label %11
10: ; preds = %7, %1
store float -1.000000e+00, float* %2
br label %18
11: ; preds = %7
%12 = load i32, i32* %3
%13 = add nsw i32 6, %12
%14 = sub nsw i32 %13, 1
%15 = call i32 @UP3D_GetParameter(i32 %14)
store i32 %15, i32* %4
%16 = bitcast i32* %4 to float*
%17 = load float, float* %16
store float %17, float* %2
br label %18
18: ; preds = %11, %10
%19 = load float, float* %2
ret float %19
}

LLVM IR (-O2):
define float @UP3D_GetHeaterTemp(i32 %0) {
%2 = add i32 %0, -5
%3 = icmp ult i32 %2, -4
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = add nuw nsw i32 %0, 5
%6 = tail call i32 @UP3D_GetParameter(i32 %5)
%7 = bitcast i32 %6 to float
br label %8
8: ; preds = %1, %4
%9 = phi float [ %7, %4 ], [ -1.000000e+00, %1 ]
ret float %9
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
struct tm *gmtime(int /*<<< orphan*/ *);
scalar_t__ malloc(int);
int /*<<< orphan*/ strftime(char *, int, char *, struct tm *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
char *timeNow() {
  time_t current_time;
  current_time = time(NULL);
  struct tm *gmt = gmtime(&current_time);
  char *c_time_string = (char *)malloc(15);
  strftime(c_time_string, 14, "%y%m%d%H%M%SZ", gmt);
  return c_time_string;
}


x86 assembly (clang, -O0):
<timeNow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
xor    %eax,%eax
mov    %eax,%edi
call   1030 <time@plt>
mov    %eax,-0x4(%rbp)
lea    -0x4(%rbp),%rdi
call   1060 <gmtime@plt>
mov    %rax,-0x10(%rbp)
mov    $0xf,%edi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    $0xe,%esi
lea    0xe7d(%rip),%rdx
call   1050 <strftime@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<timeNow>:
push   %r14
push   %rbx
push   %rax
xor    %edi,%edi
call   1030 <time@plt>
mov    %eax,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1060 <gmtime@plt>
mov    %rax,%r14
mov    $0xf,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
lea    0xe90(%rip),%rdx
mov    %rax,%rdi
mov    $0xe,%esi
mov    %r14,%rcx
call   1050 <strftime@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
@.str = [14 x i8] c"%y%m%d%H%M%SZ\00"
define i8* @timeNow() {
%1 = alloca i32
%2 = alloca %struct.tm*
%3 = alloca i8*
%4 = call i32 @time(i32* null)
store i32 %4, i32* %1
%5 = call %struct.tm* @gmtime(i32* %1)
store %struct.tm* %5, %struct.tm** %2
%6 = call i64 @malloc(i32 15)
%7 = inttoptr i64 %6 to i8*
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = load %struct.tm*, %struct.tm** %2
%10 = call i32 @strftime(i8* %8, i32 14, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), %struct.tm* %9)
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
%struct.tm = type { i32 }
@.str = [14 x i8] c"%y%m%d%H%M%SZ\00"
define i8* @timeNow() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @time(i32* null)
store i32 %3, i32* %1
%4 = call %struct.tm* @gmtime(i32* %1)
%5 = call i64 @malloc(i32 15)
%6 = inttoptr i64 %5 to i8*
%7 = call i32 @strftime(i8* %6, i32 14, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), %struct.tm* %4)
ret i8* %6
}
int thumb_insn_size(unsigned short inst1) {
  if ((inst1 & 0xe000) == 0xe000 && (inst1 & 0x1800) != 0)
    return 4;
  else
    return 2;
}


x86 assembly (clang, -O0):
<thumb_insn_size>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x6(%rbp)
movzwl -0x6(%rbp),%eax
and    $0xe000,%eax
cmp    $0xe000,%eax
jne    113d <thumb_insn_size+0x3d>
movzwl -0x6(%rbp),%eax
and    $0x1800,%eax
cmp    $0x0,%eax
je     113d <thumb_insn_size+0x3d>
movl   $0x4,-0x4(%rbp)
jmp    1144 <thumb_insn_size+0x44>
movl   $0x2,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<thumb_insn_size>:
xor    %eax,%eax
test   $0x1800,%edi
not    %edi
setne  %al
test   $0xe000,%edi
lea    0x2(%rax,%rax,1),%ecx
mov    $0x2,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @thumb_insn_size(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
%6 = and i32 %5, 57344
%7 = icmp eq i32 %6, 57344
br i1 %7, label %8, label %14
8: ; preds = %1
%9 = load i16, i16* %3
%10 = zext i16 %9 to i32
%11 = and i32 %10, 6144
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %14
13: ; preds = %8
store i32 4, i32* %2
br label %15
14: ; preds = %8, %1
store i32 2, i32* %2
br label %15
15: ; preds = %14, %13
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
define i32 @thumb_insn_size(i16 zeroext %0) {
%2 = zext i16 %0 to i32
%3 = and i32 %2, 57344
%4 = icmp ne i32 %3, 57344
%5 = and i32 %2, 6144
%6 = icmp eq i32 %5, 0
%7 = or i1 %4, %6
%8 = select i1 %7, i32 2, i32 4
ret i32 %8
}
/* Type definitions */
typedef int uintmax_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, size_t, int);
int main() {
  size_t st = 12001;
  uintmax_t it = 121212121212;
  printf("st %zd, it %ju\n", st, it);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x2ee1,-0x10(%rbp)
movl   $0x38ce307c,-0x14(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
lea    0xec4(%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    $0x2ee1,%esi
mov    $0x38ce307c,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [16 x i8] c"st %zd, it %ju\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i64 12001, i32 953036924)
ret i32 0
}