xunge/DecIR huggingface dataset:
/* Variables and functions */
int EINVAL;
int errno;
int optind;
int /*<<< orphan*/ perror(char *);
int check_arg_dev(int argc, char **argv) {
  if (optind >= argc) {
    errno = EINVAL;
    perror(argv[0]);
    return -EINVAL;
  }
  return 0;
}


x86 assembly (clang, -O0):
<check_arg_dev>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ec2(%rip),%rax
mov    (%rax),%eax
cmp    -0x8(%rbp),%eax
jl     1162 <check_arg_dev+0x52>
mov    0x2e98(%rip),%rax
mov    (%rax),%ecx
mov    0x2e97(%rip),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1030 <perror@plt>
xor    %eax,%eax
mov    0x2e78(%rip),%rcx
sub    (%rcx),%eax
mov    %eax,-0x4(%rbp)
jmp    1169 <check_arg_dev+0x59>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_arg_dev>:
push   %rbx
mov    0x2ed0(%rip),%rcx
xor    %eax,%eax
cmp    %edi,(%rcx)
jge    1120 <check_arg_dev+0x10>
pop    %rbx
ret
mov    0x2ea9(%rip),%rbx
mov    (%rbx),%eax
mov    0x2ea8(%rip),%rcx
mov    %eax,(%rcx)
mov    (%rsi),%rdi
call   1030 <perror@plt>
xor    %eax,%eax
sub    (%rbx),%eax
pop    %rbx
ret

LLVM IR (-O0):
@optind = global i32 0
@EINVAL = global i32 0
@errno = global i32 0
define i32 @check_arg_dev(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* @optind
%7 = load i32, i32* %4
%8 = icmp sge i32 %6, %7
br i1 %8, label %9, label %17
9: ; preds = %2
%10 = load i32, i32* @EINVAL
store i32 %10, i32* @errno
%11 = load i8**, i8*** %5
%12 = getelementptr inbounds i8*, i8** %11, i64 0
%13 = load i8*, i8** %12
%14 = call i32 @perror(i8* %13)
%15 = load i32, i32* @EINVAL
%16 = sub nsw i32 0, %15
store i32 %16, i32* %3
br label %18
17: ; preds = %2
store i32 0, i32* %3
br label %18
18: ; preds = %17, %9
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
@optind = global i32 0
@EINVAL = global i32 0
@errno = global i32 0
define i32 @check_arg_dev(i32 %0, i8** nocapture %1) {
%3 = load i32, i32* @optind
%4 = icmp slt i32 %3, %0
br i1 %4, label %11, label %5
5: ; preds = %2
%6 = load i32, i32* @EINVAL
store i32 %6, i32* @errno
%7 = load i8*, i8** %1
%8 = tail call i32 @perror(i8* %7)
%9 = load i32, i32* @EINVAL
%10 = sub nsw i32 0, %9
br label %11
11: ; preds = %2, %5
%12 = phi i32 [ %10, %5 ], [ 0, %2 ]
ret i32 %12
}
/* Variables and functions */
char *NextPhoneme(char const *);
int /*<<< orphan*/ *PhonemeCodeByName(char const *);
int PhonemeStringIsValid(const char *phonemes) {
  for (; phonemes; phonemes = NextPhoneme(phonemes)) {
    if (PhonemeCodeByName(phonemes) == NULL) {
      return 0;
    }
  }
  return 1;
}


x86 assembly (clang, -O0):
<PhonemeStringIsValid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     116d <PhonemeStringIsValid+0x4d>
mov    -0x10(%rbp),%rdi
call   1030 <PhonemeCodeByName@plt>
cmp    $0x0,%rax
jne    1156 <PhonemeStringIsValid+0x36>
movl   $0x0,-0x4(%rbp)
jmp    1174 <PhonemeStringIsValid+0x54>
jmp    115b <PhonemeStringIsValid+0x3b>
mov    -0x10(%rbp),%rdi
call   1040 <NextPhoneme@plt>
mov    %rax,-0x10(%rbp)
jmp    112c <PhonemeStringIsValid+0xc>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PhonemeStringIsValid>:
push   %rbp
push   %rbx
push   %rax
mov    $0x1,%ebp
test   %rdi,%rdi
je     1151 <PhonemeStringIsValid+0x31>
mov    %rdi,%rbx
mov    %rbx,%rdi
call   1030 <PhonemeCodeByName@plt>
test   %rax,%rax
je     114f <PhonemeStringIsValid+0x2f>
mov    %rbx,%rdi
call   1040 <NextPhoneme@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1130 <PhonemeStringIsValid+0x10>
jmp    1151 <PhonemeStringIsValid+0x31>
xor    %ebp,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @PhonemeStringIsValid(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %10, label %3
3: ; preds = %1, %7
%4 = phi i8* [ %8, %7 ], [ %0, %1 ]
%5 = tail call i32* @PhonemeCodeByName(i8* %4)
%6 = icmp eq i32* %5, null
br i1 %6, label %10, label %7
7: ; preds = %3
%8 = tail call i8* @NextPhoneme(i8* %4)
%9 = icmp eq i8* %8, null
br i1 %9, label %10, label %3
10: ; preds = %3, %7, %1
%11 = phi i32 [ 1, %1 ], [ 1, %7 ], [ 0, %3 ]
ret i32 %11
}
extern int isonum_723(p)
unsigned char *p;
{ return isonum_721(p); }


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

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

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

LLVM IR (-O2):
define i32 @isonum_723(i8* %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @isonum_721 to i32 (i8*, ...)*)(i8* %0)
ret i32 %2
}
cub(pn) int pn;
{ brc(pn, 'D'); }


x86 assembly (clang, -O0):
<cub>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    $0x44,%esi
mov    $0x0,%al
call   1030 <brc@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cub>:
mov    $0x44,%esi
xor    %eax,%eax
jmp    1030 <brc@plt>

LLVM IR (-O0):
define i32 @cub(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = call i32 (i32, i32, ...) bitcast (i32 (...)* @brc to i32 (i32, i32, ...)*)(i32 %4, i32 68)
%6 = load i32, i32* %2
ret i32 %6
}

LLVM IR (-O2):
define i32 @cub(i32 %0) {
%2 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @brc to i32 (i32, i32, ...)*)(i32 %0, i32 68)
ret i32 undef
}
/* Variables and functions */
scalar_t__ qe_inrange(int, char, char);
int qe_toupper(int c) { return (qe_inrange(c, 'a', 'z') ? c + 'A' - 'a' : c); }


x86 assembly (clang, -O0):
<qe_toupper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x61,%esi
mov    $0x7a,%edx
call   1030 <qe_inrange@plt>
cmp    $0x0,%rax
je     1148 <qe_toupper+0x38>
mov    -0x4(%rbp),%eax
add    $0x41,%eax
sub    $0x61,%eax
mov    %eax,-0x8(%rbp)
jmp    114e <qe_toupper+0x3e>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<qe_toupper>:
push   %rbx
mov    %edi,%ebx
mov    $0x61,%esi
mov    $0x7a,%edx
call   1030 <qe_inrange@plt>
lea    -0x20(%rbx),%ecx
test   %rax,%rax
cmove  %ebx,%ecx
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @qe_toupper(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @qe_inrange(i32 %3, i8 signext 97, i8 signext 122)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i32, i32* %2
%8 = add nsw i32 %7, 65
%9 = sub nsw i32 %8, 97
br label %12
10: ; preds = %1
%11 = load i32, i32* %2
br label %12
12: ; preds = %10, %6
%13 = phi i32 [ %9, %6 ], [ %11, %10 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @qe_toupper(i32 %0) {
%2 = tail call i64 @qe_inrange(i32 %0, i8 signext 97, i8 signext 122)
%3 = icmp eq i64 %2, 0
%4 = add nsw i32 %0, -32
%5 = select i1 %3, i32 %0, i32 %4
ret i32 %5
}
void usage(name) char *name;
{
  printf("usage: %s [-q] [-b block_size] dbmfile [gdbmfile]\n", name);
  exit(2);
}


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

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

LLVM IR (-O0):
@.str = [51 x i8] c"usage: %s [-q] [-b block_size] dbmfile [gdbmfile]\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0), i8* %3)
unreachable
}

LLVM IR (-O2):
@.str = [51 x i8] c"usage: %s [-q] [-b block_size] dbmfile [gdbmfile]\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0), i8* %0)
tail call void @exit(i32 2)
unreachable
}
char *_hs_stpcpy(char *dest, const char *src) {
  while ((*dest++ = *src++))
    continue;
  return dest - 1;
}


x86 assembly (clang, -O0):
<_hs_stpcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %al,(%rcx)
cmp    $0x0,%al
je     113b <_hs_stpcpy+0x3b>
jmp    110c <_hs_stpcpy+0xc>
mov    -0x8(%rbp),%rax
add    $0xffffffffffffffff,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_hs_stpcpy>:
mov    %rdi,%rax
add    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
movzbl (%rsi),%ecx
add    $0x1,%rsi
mov    %cl,0x1(%rax)
add    $0x1,%rax
test   %cl,%cl
jne    1110 <_hs_stpcpy+0x10>
ret

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

LLVM IR (-O2):
define i8* @_hs_stpcpy(i8* writeonly %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %8, %3 ]
%5 = phi i8* [ %1, %2 ], [ %6, %3 ]
%6 = getelementptr inbounds i8, i8* %5, i64 1
%7 = load i8, i8* %5
%8 = getelementptr inbounds i8, i8* %4, i64 1
store i8 %7, i8* %4
%9 = icmp eq i8 %7, 0
br i1 %9, label %10, label %3
10: ; preds = %3
ret i8* %4
}
int execute_socketpair() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_socketpair() {
ret i32 0
}
/* Variables and functions */
int fileno(int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
int tosFile_stdout(void) { return fileno(stdout); }


x86 assembly (clang, -O0):
<tosFile_stdout>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
call   1030 <fileno@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<tosFile_stdout>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
jmp    1030 <fileno@plt>

LLVM IR (-O0):
@stdout = global i32 0
define i32 @tosFile_stdout() {
%1 = load i32, i32* @stdout
%2 = call i32 @fileno(i32 %1)
ret i32 %2
}

LLVM IR (-O2):
@stdout = global i32 0
define i32 @tosFile_stdout() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fileno(i32 %1)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ e_absx();
int /*<<< orphan*/ e_sbc();
void e_sbc_absx() {
  e_absx();
  e_sbc();
}


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

x86 assembly (clang, -O2):
<e_sbc_absx>:
push   %rax
xor    %eax,%eax
call   1040 <e_absx@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <e_sbc@plt>

LLVM IR (-O0):
define void @e_sbc_absx() {
%1 = call i32 (...) @e_absx()
%2 = call i32 (...) @e_sbc()
ret void
}

LLVM IR (-O2):
define void @e_sbc_absx() {
%1 = tail call i32 (...) @e_absx()
%2 = tail call i32 (...) @e_sbc()
ret void
}
/* Variables and functions */
scalar_t__ calloc(int, int);
void calloc_bad1() {
  int *arr = (int *)calloc(10, sizeof(int));
  arr[-1] = 0;
  arr[10] = 0;
}


x86 assembly (clang, -O0):
<calloc_bad1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xa,%edi
mov    $0x4,%esi
call   1030 <calloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x0,-0x4(%rax)
mov    -0x8(%rbp),%rax
movl   $0x0,0x28(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calloc_bad1>:
push   %rax
mov    $0xa,%edi
mov    $0x4,%esi
call   1030 <calloc@plt>
movl   $0x0,-0x4(%rax)
movl   $0x0,0x28(%rax)
pop    %rax
ret

LLVM IR (-O0):
define void @calloc_bad1() {
%1 = alloca i32*
%2 = call i64 @calloc(i32 10, i32 4)
%3 = inttoptr i64 %2 to i32*
store i32* %3, i32** %1
%4 = load i32*, i32** %1
%5 = getelementptr inbounds i32, i32* %4, i64 -1
store i32 0, i32* %5
%6 = load i32*, i32** %1
%7 = getelementptr inbounds i32, i32* %6, i64 10
store i32 0, i32* %7
ret void
}

LLVM IR (-O2):
define void @calloc_bad1() {
%1 = tail call i64 @calloc(i32 10, i32 4)
%2 = inttoptr i64 %1 to i32*
%3 = getelementptr inbounds i32, i32* %2, i64 -1
store i32 0, i32* %3
%4 = getelementptr inbounds i32, i32* %2, i64 10
store i32 0, i32* %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_atou() {
  printf("NOT IMPLEMENTED:"
         "pa_atou"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [25 x i8] c"NOT IMPLEMENTED:pa_atou\0A\00"
define i32 @pa_atou() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [24 x i8] c"NOT IMPLEMENTED:pa_atou\00"
define i32 @pa_atou() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
void enterGenfskSysPatch(void) {}


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

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

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

LLVM IR (-O2):
define void @enterGenfskSysPatch() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ acos(int /*<<< orphan*/);
double glmDegd(int /*<<< orphan*/);
int /*<<< orphan*/ glmDotProduct3d(double const *, double const *);
double glmComputeNormalizedVectorAngle3dDeg(const double v1[3],
                                            const double v2[3]) {
  return glmDegd(acos(glmDotProduct3d(v1, v2)));
}


x86 assembly (clang, -O0):
<glmComputeNormalizedVectorAngle3dDeg>:
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   1040 <glmDotProduct3d@plt>
mov    %eax,%edi
call   1030 <acos@plt>
mov    %eax,%edi
call   1050 <glmDegd@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<glmComputeNormalizedVectorAngle3dDeg>:
push   %rax
call   1040 <glmDotProduct3d@plt>
mov    %eax,%edi
call   1030 <acos@plt>
mov    %eax,%edi
pop    %rax
jmp    1050 <glmDegd@plt>

LLVM IR (-O0):
define double @glmComputeNormalizedVectorAngle3dDeg(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
store double* %0, double** %3
store double* %1, double** %4
%5 = load double*, double** %3
%6 = load double*, double** %4
%7 = call i32 @glmDotProduct3d(double* %5, double* %6)
%8 = call i32 @acos(i32 %7)
%9 = call double @glmDegd(i32 %8)
ret double %9
}

LLVM IR (-O2):
define double @glmComputeNormalizedVectorAngle3dDeg(double* %0, double* %1) {
%3 = tail call i32 @glmDotProduct3d(double* %0, double* %1)
%4 = tail call i32 @acos(i32 %3)
%5 = tail call double @glmDegd(i32 %4)
ret double %5
}
/* Type definitions */
struct archive {
  int dummy;
};

/* Variables and functions */
int archive_read_support_compression_all(struct archive *);
int _alpm_archive_read_support_filter_all(struct archive *archive) {
  return archive_read_support_compression_all(archive);
}


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

x86 assembly (clang, -O2):
<_alpm_archive_read_support_filter_all>:
jmp    1030 <archive_read_support_compression_all@plt>

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

LLVM IR (-O2):
%struct.archive = type { i32 }
define i32 @_alpm_archive_read_support_filter_all(%struct.archive* %0) {
%2 = tail call i32 @archive_read_support_compression_all(%struct.archive* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void printArgsNoRet(char a3, char *a5) {
  printf("'%c' '%c'\n", (int)a3, (int)*a5);
}


x86 assembly (clang, -O0):
<printArgsNoRet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
movsbl -0x1(%rbp),%esi
mov    -0x10(%rbp),%rax
movsbl (%rax),%edx
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printArgsNoRet>:
mov    %edi,%eax
movsbl (%rsi),%edx
lea    0xee4(%rip),%rdi
mov    %eax,%esi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"'%c' '%c'\0A\00"
define void @printArgsNoRet(i8 signext %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 = sext i8 %5 to i32
%7 = load i8*, i8** %4
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %9)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"'%c' '%c'\0A\00"
define void @printArgsNoRet(i8 signext %0, i8* nocapture %1) {
%3 = sext i8 %0 to i32
%4 = load i8, i8* %1
%5 = sext i8 %4 to i32
%6 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %5)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ cpu_set_t;

/* Variables and functions */
int /*<<< orphan*/ CPU_SET(int, int /*<<< orphan*/ *);
int /*<<< orphan*/ CPU_ZERO(int /*<<< orphan*/ *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
scalar_t__ sched_setaffinity(int /*<<< orphan*/, int, int /*<<< orphan*/ *);
void runon(int cpu) {
  cpu_set_t cset;
  CPU_ZERO(&cset);
  CPU_SET(cpu, &cset);
  if (sched_setaffinity(0, sizeof(cpu_set_t), &cset) < 0) {
    perror("setaffinity");
    exit(1);
  }
}


x86 assembly (clang, -O0):
<runon>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x8(%rbp),%rdi
call   1040 <CPU_ZERO@plt>
mov    -0x4(%rbp),%edi
lea    -0x8(%rbp),%rsi
call   1070 <CPU_SET@plt>
xor    %edi,%edi
mov    $0x4,%esi
lea    -0x8(%rbp),%rdx
call   1030 <sched_setaffinity@plt>
cmp    $0x0,%rax
jge    11a0 <runon+0x50>
lea    0xe6f(%rip),%rdi
call   1050 <perror@plt>
mov    $0x1,%edi
call   1060 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<runon>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
lea    0x4(%rsp),%r14
mov    %r14,%rdi
call   1040 <CPU_ZERO@plt>
mov    %ebx,%edi
mov    %r14,%rsi
call   1070 <CPU_SET@plt>
xor    %edi,%edi
mov    $0x4,%esi
mov    %r14,%rdx
call   1030 <sched_setaffinity@plt>
test   %rax,%rax
js     1189 <runon+0x39>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
lea    0xe70(%rip),%rdi
call   1050 <perror@plt>
mov    $0x1,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"setaffinity\00"
define void @runon(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = call i32 @CPU_ZERO(i32* %3)
%5 = load i32, i32* %2
%6 = call i32 @CPU_SET(i32 %5, i32* %3)
%7 = call i64 @sched_setaffinity(i32 0, i32 4, i32* %3)
%8 = icmp slt i64 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = call i32 @perror(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @exit(i32 1)
unreachable
12: ; preds = %1
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"setaffinity\00"
define void @runon(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @CPU_ZERO(i32* %2)
%5 = call i32 @CPU_SET(i32 %0, i32* %2)
%6 = call i64 @sched_setaffinity(i32 0, i32 4, i32* %2)
%7 = icmp slt i64 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = call i32 @perror(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @exit(i32 1)
unreachable
11: ; preds = %1
ret void
}
/* Variables and functions */
int IPC_numHandlers(char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
void connect2Hnd(const char *moduleName, void *clientData) {
  fprintf(stderr, "CONNECT2: Connection from %s\n", moduleName);
  fprintf(stderr, "          Number of handlers: %d\n",
          IPC_numHandlers("message1"));
}


x86 assembly (clang, -O0):
<connect2Hnd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xebc(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e8e(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
lea    0xee2(%rip),%rdi
call   1040 <IPC_numHandlers@plt>
mov    -0x14(%rbp),%edi
mov    %eax,%edx
lea    0xeaf(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<connect2Hnd>:
push   %rbx
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rbx
mov    (%rbx),%edi
lea    0xecc(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%ebx
lea    0xefc(%rip),%rdi
call   1040 <IPC_numHandlers@plt>
lea    0xece(%rip),%rsi
mov    %ebx,%edi
mov    %eax,%edx
xor    %eax,%eax
pop    %rbx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [30 x i8] c"CONNECT2: Connection from %s\0A\00"
@.str.1 = [34 x i8] c" Number of handlers: %d\0A\00"
@.str.2 = [9 x i8] c"message1\00"
define void @connect2Hnd(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %3
%7 = call i32 (i32, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = load i32, i32* @stderr
%9 = call i32 @IPC_numHandlers(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 (i32, i8*, ...) @fprintf(i32 %8, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), i32 %9)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [30 x i8] c"CONNECT2: Connection from %s\0A\00"
@.str.1 = [34 x i8] c" Number of handlers: %d\0A\00"
@.str.2 = [9 x i8] c"message1\00"
define void @connect2Hnd(i8* %0, i8* nocapture readnone %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = load i32, i32* @stderr
%6 = tail call i32 @IPC_numHandlers(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
%7 = tail call i32 (i32, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), i32 %6)
ret void
}
/* Variables and functions */
int SIGINT;
int SIGTERM;
int /*<<< orphan*/ stop_proxy();
void sigproc(int sig) {
  if (sig == SIGTERM || sig == SIGINT)
    stop_proxy();
}


x86 assembly (clang, -O0):
<sigproc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2ebb(%rip),%rcx
cmp    (%rcx),%eax
je     113f <sigproc+0x2f>
mov    -0x4(%rbp),%eax
mov    0x2eb1(%rip),%rcx
cmp    (%rcx),%eax
jne    1146 <sigproc+0x36>
mov    $0x0,%al
call   1030 <stop_proxy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigproc>:
mov    0x2ec9(%rip),%rax
cmp    %edi,(%rax)
je     1127 <sigproc+0x17>
mov    0x2ec6(%rip),%rax
cmp    %edi,(%rax)
je     1127 <sigproc+0x17>
ret
xor    %eax,%eax
jmp    1030 <stop_proxy@plt>

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

LLVM IR (-O2):
@SIGTERM = global i32 0
@SIGINT = global i32 0
define void @sigproc(i32 %0) {
%2 = load i32, i32* @SIGTERM
%3 = icmp eq i32 %2, %0
%4 = load i32, i32* @SIGINT
%5 = icmp eq i32 %4, %0
%6 = select i1 %3, i1 true, i1 %5
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = tail call i32 (...) @stop_proxy()
br label %9
9: ; preds = %1, %7
ret void
}
/* Variables and functions */
int /*<<< orphan*/ foo(int);
int main() {
  foo(2);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x2,%edi
call   1030 <foo@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foo(i32 2)
ret i32 0
}
/* Variables and functions */
int dup3(int, int, int /*<<< orphan*/);
int dup2(int fd, int fd2) { return dup3(fd, fd2, 0); }


x86 assembly (clang, -O0):
<dup2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
xor    %edx,%edx
call   1030 <dup3@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dup2>:
xor    %edx,%edx
jmp    1030 <dup3@plt>

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

LLVM IR (-O2):
define i32 @dup2(i32 %0, i32 %1) {
%3 = tail call i32 @dup3(i32 %0, i32 %1, i32 0)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void myHello(void) {
  printf("Hello Makefile!\n");
  return;
}


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

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

LLVM IR (-O0):
@.str = [17 x i8] c"Hello Makefile!\0A\00"
define void @myHello() {
%1 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [16 x i8] c"Hello Makefile!\00"
define void @myHello() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ m136_setParams4103(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ m172doBitRev(int /*<<< orphan*/);
void m172_setParams4103(uint16_t addr, uint8_t val) {
  m136_setParams4103(addr, m172doBitRev(val));
}


x86 assembly (clang, -O0):
<m172_setParams4103>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <m172doBitRev@plt>
mov    -0xc(%rbp),%edi
mov    %eax,%esi
call   1040 <m136_setParams4103@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m172_setParams4103>:
push   %rbx
mov    %edi,%ebx
mov    %esi,%edi
call   1030 <m172doBitRev@plt>
mov    %ebx,%edi
mov    %eax,%esi
pop    %rbx
jmp    1040 <m136_setParams4103@plt>

LLVM IR (-O0):
define void @m172_setParams4103(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 = load i32, i32* %4
%7 = call i32 @m172doBitRev(i32 %6)
%8 = call i32 @m136_setParams4103(i32 %5, i32 %7)
ret void
}

LLVM IR (-O2):
define void @m172_setParams4103(i32 %0, i32 %1) {
%3 = tail call i32 @m172doBitRev(i32 %1)
%4 = tail call i32 @m136_setParams4103(i32 %0, i32 %3)
ret void
}
void __attribute__((no)) HEX00_jsonDatInit(void) {}


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

x86 assembly (clang, -O2):
ret

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

LLVM IR (-O2):
define void @HEX00_jsonDatInit() {
ret void
}
/* Type definitions */
struct fsm {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ fsm_compose(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ fsm_copy(struct fsm *);
int /*<<< orphan*/ fsm_invert(int /*<<< orphan*/);
int fsm_isidentity(int /*<<< orphan*/);
int /*<<< orphan*/ fsm_minimize(int /*<<< orphan*/);
int fsm_isfunctional(struct fsm *net) {
  return (fsm_isidentity(
      fsm_minimize(fsm_compose(fsm_invert(fsm_copy(net)), fsm_copy(net)))));
}


x86 assembly (clang, -O0):
<fsm_isfunctional>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <fsm_copy@plt>
mov    %eax,%edi
call   1050 <fsm_invert@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <fsm_copy@plt>
mov    -0xc(%rbp),%edi
mov    %eax,%esi
call   1060 <fsm_compose@plt>
mov    %eax,%edi
call   1030 <fsm_minimize@plt>
mov    %eax,%edi
call   1070 <fsm_isidentity@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fsm_isfunctional>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1040 <fsm_copy@plt>
mov    %eax,%edi
call   1050 <fsm_invert@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1040 <fsm_copy@plt>
mov    %ebp,%edi
mov    %eax,%esi
call   1060 <fsm_compose@plt>
mov    %eax,%edi
call   1030 <fsm_minimize@plt>
mov    %eax,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1070 <fsm_isidentity@plt>

LLVM IR (-O0):
%struct.fsm = type { i32 }
define i32 @fsm_isfunctional(%struct.fsm* %0) {
%2 = alloca %struct.fsm*
store %struct.fsm* %0, %struct.fsm** %2
%3 = load %struct.fsm*, %struct.fsm** %2
%4 = call i32 @fsm_copy(%struct.fsm* %3)
%5 = call i32 @fsm_invert(i32 %4)
%6 = load %struct.fsm*, %struct.fsm** %2
%7 = call i32 @fsm_copy(%struct.fsm* %6)
%8 = call i32 @fsm_compose(i32 %5, i32 %7)
%9 = call i32 @fsm_minimize(i32 %8)
%10 = call i32 @fsm_isidentity(i32 %9)
ret i32 %10
}

LLVM IR (-O2):
%struct.fsm = type { i32 }
define i32 @fsm_isfunctional(%struct.fsm* %0) {
%2 = tail call i32 @fsm_copy(%struct.fsm* %0)
%3 = tail call i32 @fsm_invert(i32 %2)
%4 = tail call i32 @fsm_copy(%struct.fsm* %0)
%5 = tail call i32 @fsm_compose(i32 %3, i32 %4)
%6 = tail call i32 @fsm_minimize(i32 %5)
%7 = tail call i32 @fsm_isidentity(i32 %6)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int usage() {
  printf("rpi-toolbox options ...\n");
  printf("options = util|ud|buzzer|bmp180|lcd1602\n");
  return -1;
}


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

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

LLVM IR (-O0):
@.str = [25 x i8] c"rpi-toolbox options ...\0A\00"
@.str.1 = [41 x i8] c"options = util|ud|buzzer|bmp180|lcd1602\0A\00"
define i32 @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
ret i32 -1
}

LLVM IR (-O2):
@str = [24 x i8] c"rpi-toolbox options ...\00"
@str.2 = [40 x i8] c"options = util|ud|buzzer|bmp180|lcd1602\00"
define i32 @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.2, i64 0, i64 0))
ret i32 -1
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
scalar_t__ mp_sizeof_binl(scalar_t__);
uint32_t mp_sizeof_bin(uint32_t len) { return mp_sizeof_binl(len) + len; }


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

x86 assembly (clang, -O2):
<mp_sizeof_bin>:
push   %rbx
mov    %rdi,%rbx
call   1030 <mp_sizeof_binl@plt>
add    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @mp_sizeof_bin(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i64 @mp_sizeof_binl(i64 %3)
%5 = load i64, i64* %2
%6 = add nsw i64 %4, %5
ret i64 %6
}

LLVM IR (-O2):
define i64 @mp_sizeof_bin(i64 %0) {
%2 = tail call i64 @mp_sizeof_binl(i64 %0)
%3 = add nsw i64 %2, %0
ret i64 %3
}
int gp2d120_to_dist(int ir) {
  int dist;
  if (ir > 80)
    dist = (2914 / (ir + 5)) - 1;
  else
    dist = 40;
  return dist;
}


x86 assembly (clang, -O0):
<gp2d120_to_dist>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x50,-0x4(%rbp)
jle    112a <gp2d120_to_dist+0x2a>
mov    -0x4(%rbp),%ecx
add    $0x5,%ecx
mov    $0xb62,%eax
cltd
idiv   %ecx
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1131 <gp2d120_to_dist+0x31>
movl   $0x28,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gp2d120_to_dist>:
mov    $0x28,%eax
cmp    $0x51,%edi
jl     1119 <gp2d120_to_dist+0x19>
add    $0x5,%edi
mov    $0xb62,%eax
xor    %edx,%edx
div    %edi
add    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @gp2d120_to_dist(i32 %0) {
%2 = icmp sgt i32 %0, 80
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = add nuw nsw i32 %0, 5
%5 = udiv i32 2914, %4
%6 = add nsw i32 %5, -1
br label %7
7: ; preds = %1, %3
%8 = phi i32 [ %6, %3 ], [ 40, %1 ]
ret i32 %8
}
void RTAvlUIntPtrInsert(void) {}


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

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

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

LLVM IR (-O2):
define void @RTAvlUIntPtrInsert() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
void usage(char *progname) {
  fprintf(stderr, ("Usage: %s [ options ] [ <interval> [ <count> ] ]\n"),
          progname);
  fprintf(stderr, ("Options are:\n"
                   "[ -A ] [ -I { SUM | CPU | ALL } ] [ -u ] [ -P { <cpu> | "
                   "ALL } ] [ -V ]\n"));
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e92(%rip),%rax
mov    (%rax),%edi
lea    0xedb(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rbx
mov    (%rbx),%edi
lea    0xecc(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xeee(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [50 x i8] c"Usage: %s [ options ] [ <interval> [ <count> ] ]\0A\00"
@.str.1 = [85 x i8] c"Options are:\0A[ -A ] [ -I { SUM | CPU | ALL } ] [ -u ] [ -P { <cpu> | ALL } ] [ -V ]\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @stderr
%7 = call i32 (i32, i8*, ...) @fprintf(i32 %6, i8* getelementptr inbounds ([85 x i8], [85 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [50 x i8] c"Usage: %s [ options ] [ <interval> [ <count> ] ]\0A\00"
@.str.1 = [85 x i8] c"Options are:\0A[ -A ] [ -I { SUM | CPU | ALL } ] [ -u ] [ -P { <cpu> | ALL } ] [ -V ]\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 (i32, i8*, ...) @fprintf(i32 %2, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @stderr
%5 = tail call i32 (i32, i8*, ...) @fprintf(i32 %4, i8* getelementptr inbounds ([85 x i8], [85 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i32 @exit(i32 1)
unreachable
}
main() {
  for (int i = 0; i < 10; i++) {
    int i = 2;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    1131 <main+0x31>
movl   $0x2,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1112 <main+0x12>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
xor    %eax,%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
br label %4
4: ; preds = %8, %0
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 10
br i1 %6, label %7, label %11
7: ; preds = %4
store i32 2, i32* %3
br label %8
8: ; preds = %7
%9 = load i32, i32* %2
%10 = add nsw i32 %9, 1
store i32 %10, i32* %2
br label %4
11: ; preds = %4
%12 = load i32, i32* %1
ret i32 %12
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
double __ieee754_log(double);
double log(double x) { return __ieee754_log(x); }


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

x86 assembly (clang, -O2):
<log>:
jmp    1030 <__ieee754_log@plt>

LLVM IR (-O0):
define double @log(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @__ieee754_log(double %3)
ret double %4
}

LLVM IR (-O2):
define double @log(double %0) {
%2 = tail call double @__ieee754_log(double %0)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void version() {
  puts("FLASH "
       "v1.2.4");
  puts("License:  GNU General Public License Version 3+ "
       "(http://gnu.org/licenses/gpl.html)");
  puts("Report bugs to flash.comment@gmail.com or "
       "https://sourceforge.net/p/flashpage/bugs");
}


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

x86 assembly (clang, -O2):
<version>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xee9(%rip),%rdi
call   1030 <puts@plt>
lea    0xf30(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"FLASH v1.2.4\00"
@.str.1 = [83 x i8] c"License: GNU General Public License Version 3+ (http://gnu.org/licenses/gpl.html)\00"
@.str.2 = [83 x i8] c"Report bugs to flash.comment@gmail.com or https://sourceforge.net/p/flashpage/bugs\00"
define void @version() {
%1 = call i32 @puts(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @puts(i8* getelementptr inbounds ([83 x i8], [83 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @puts(i8* getelementptr inbounds ([83 x i8], [83 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"FLASH v1.2.4\00"
@.str.1 = [83 x i8] c"License: GNU General Public License Version 3+ (http://gnu.org/licenses/gpl.html)\00"
@.str.2 = [83 x i8] c"Report bugs to flash.comment@gmail.com or https://sourceforge.net/p/flashpage/bugs\00"
define void @version() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([83 x i8], [83 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([83 x i8], [83 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ecarter(double *, double *);
int /*<<< orphan*/ printf(char *, double, double);
int main() {
  double db1 = 0.0;
  double *ptr_db1 = &db1;
  double db2 = 0.0;
  double *ptr_db2 = &db2;
  ecarter(ptr_db1, ptr_db2);
  printf("%.1lf %.1lf\n", db1, db2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
lea    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
lea    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   1040 <ecarter@plt>
movsd  -0x10(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
lea    0xe93(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movq   $0x0,0x10(%rsp)
movq   $0x0,0x8(%rsp)
lea    0x10(%rsp),%rdi
lea    0x8(%rsp),%rsi
call   1040 <ecarter@plt>
movsd  0x10(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [13 x i8] c"%.1lf %.1lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double*
%4 = alloca double
%5 = alloca double*
store i32 0, i32* %1
store double 0.000000e+00, double* %2
store double* %2, double** %3
store double 0.000000e+00, double* %4
store double* %4, double** %5
%6 = load double*, double** %3
%7 = load double*, double** %5
%8 = call i32 @ecarter(double* %6, double* %7)
%9 = load double, double* %2
%10 = load double, double* %4
%11 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), double %9, double %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"%.1lf %.1lf\0A\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = bitcast double* %1 to i8*
store double 0.000000e+00, double* %1
%4 = bitcast double* %2 to i8*
store double 0.000000e+00, double* %2
%5 = call i32 @ecarter(double* %1, double* %2)
%6 = load double, double* %1
%7 = load double, double* %2
%8 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), double %6, double %7)
ret i32 0
}
/* Type definitions */
struct ttrie__iterator {
  int dummy;
};
struct ttrie__frame {
  int dummy;
};

/* Variables and functions */
struct ttrie__frame *pop_frame(struct ttrie__iterator *);
struct ttrie__frame *walk_terminator_table(struct ttrie__iterator *iter,
                                           struct ttrie__frame *lframe,
                                           int *direction) {
  struct ttrie__frame *f = pop_frame(iter);
  *direction = 6;
  return f;
}


x86 assembly (clang, -O0):
<walk_terminator_table>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <pop_frame@plt>
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movl   $0x6,(%rax)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<walk_terminator_table>:
push   %rbx
mov    %rdx,%rbx
call   1030 <pop_frame@plt>
movl   $0x6,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
%struct.ttrie__iterator = type { i32 }
%struct.ttrie__frame = type { i32 }
define %struct.ttrie__frame* @walk_terminator_table(%struct.ttrie__iterator* %0, %struct.ttrie__frame* %1, i32* %2) {
%4 = alloca %struct.ttrie__iterator*
%5 = alloca %struct.ttrie__frame*
%6 = alloca i32*
%7 = alloca %struct.ttrie__frame*
store %struct.ttrie__iterator* %0, %struct.ttrie__iterator** %4
store %struct.ttrie__frame* %1, %struct.ttrie__frame** %5
store i32* %2, i32** %6
%8 = load %struct.ttrie__iterator*, %struct.ttrie__iterator** %4
%9 = call %struct.ttrie__frame* @pop_frame(%struct.ttrie__iterator* %8)
store %struct.ttrie__frame* %9, %struct.ttrie__frame** %7
%10 = load i32*, i32** %6
store i32 6, i32* %10
%11 = load %struct.ttrie__frame*, %struct.ttrie__frame** %7
ret %struct.ttrie__frame* %11
}

LLVM IR (-O2):
%struct.ttrie__iterator = type { i32 }
%struct.ttrie__frame = type { i32 }
define %struct.ttrie__frame* @walk_terminator_table(%struct.ttrie__iterator* %0, %struct.ttrie__frame* nocapture readnone %1, i32* nocapture writeonly %2) {
%4 = tail call %struct.ttrie__frame* @pop_frame(%struct.ttrie__iterator* %0)
store i32 6, i32* %2
ret %struct.ttrie__frame* %4
}
void log_debug(char *info) { return; }


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

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

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

LLVM IR (-O2):
define void @log_debug(i8* nocapture %0) {
ret void
}
void asn1_ex_c2i(void) {}


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

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

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

LLVM IR (-O2):
define void @asn1_ex_c2i() {
ret void
}
/* Variables and functions */
int epoll_create(int /*<<< orphan*/);
void __test_epoll() { int i = epoll_create(0); }


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

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

LLVM IR (-O0):
define void @__test_epoll() {
%1 = alloca i32
%2 = call i32 @epoll_create(i32 0)
store i32 %2, i32* %1
ret void
}

LLVM IR (-O2):
define void @__test_epoll() {
%1 = tail call i32 @epoll_create(i32 0)
ret void
}