xunge/DecIR huggingface dataset:
void _swap(int *a, int *b) {
  *a = *a + *b;
  *b = *a - *b;
  *a = *a - *b;
}


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

x86 assembly (clang, -O2):
<_swap>:
mov    (%rsi),%eax
add    (%rdi),%eax
mov    %eax,(%rdi)
sub    (%rsi),%eax
mov    %eax,(%rsi)
sub    %eax,(%rdi)
ret

LLVM IR (-O0):
define void @_swap(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* %5
%7 = load i32*, i32** %4
%8 = load i32, i32* %7
%9 = add nsw i32 %6, %8
%10 = load i32*, i32** %3
store i32 %9, i32* %10
%11 = load i32*, i32** %3
%12 = load i32, i32* %11
%13 = load i32*, i32** %4
%14 = load i32, i32* %13
%15 = sub nsw i32 %12, %14
%16 = load i32*, i32** %4
store i32 %15, i32* %16
%17 = load i32*, i32** %3
%18 = load i32, i32* %17
%19 = load i32*, i32** %4
%20 = load i32, i32* %19
%21 = sub nsw i32 %18, %20
%22 = load i32*, i32** %3
store i32 %21, i32* %22
ret void
}

LLVM IR (-O2):
define void @_swap(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
%5 = add nsw i32 %4, %3
store i32 %5, i32* %0
%6 = load i32, i32* %1
%7 = sub nsw i32 %5, %6
store i32 %7, i32* %1
%8 = load i32, i32* %0
%9 = sub nsw i32 %8, %7
store i32 %9, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Error(char *, char *);
void ShowHelp(char *argv0) {
  Error(
      "Usage: %s [OPTION]... [FILES]...\nAssemble LCC bytecode assembly to "
      "Q3VM bytecode.\n\n  -o OUTPUT      Write assembled output to file "
      "OUTPUT.qvm\n  -f LISTFILE    Read options and list of files to assemble "
      "from LISTFILE.q3asm\n  -b BUCKETS     Set symbol hash table to BUCKETS "
      "buckets\n  -m             Generate a mapfile for each OUTPUT.qvm\n  -v  "
      "           Verbose compilation report\n  -vq3           Produce a qvm "
      "file compatible with Q3 1.32b\n  -h --help -?   Show this help\n",
      argv0);
}


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

x86 assembly (clang, -O2):
<ShowHelp>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <Error@plt>

LLVM IR (-O0):
@.str = [474 x i8] c"Usage: %s [OPTION]... [FILES]...\0AAssemble LCC bytecode assembly to Q3VM bytecode.\0A\0A -o OUTPUT Write assembled output to file OUTPUT.qvm\0A -f LISTFILE Read options and list of files to assemble from LISTFILE.q3asm\0A -b BUCKETS Set symbol hash table to BUCKETS buckets\0A -m Generate a mapfile for each OUTPUT.qvm\0A -v Verbose compilation report\0A -vq3 Produce a qvm file compatible with Q3 1.32b\0A -h --help -? Show this help\0A\00"
define void @ShowHelp(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @Error(i8* getelementptr inbounds ([474 x i8], [474 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [474 x i8] c"Usage: %s [OPTION]... [FILES]...\0AAssemble LCC bytecode assembly to Q3VM bytecode.\0A\0A -o OUTPUT Write assembled output to file OUTPUT.qvm\0A -f LISTFILE Read options and list of files to assemble from LISTFILE.q3asm\0A -b BUCKETS Set symbol hash table to BUCKETS buckets\0A -m Generate a mapfile for each OUTPUT.qvm\0A -v Verbose compilation report\0A -vq3 Produce a qvm file compatible with Q3 1.32b\0A -h --help -? Show this help\0A\00"
define void @ShowHelp(i8* %0) {
%2 = tail call i32 @Error(i8* getelementptr inbounds ([474 x i8], [474 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ O_RDWR;
int open(char *, int /*<<< orphan*/);
int vrf_tap(const char *vrf) { return open("/dev/net/tun", O_RDWR); }


x86 assembly (clang, -O0):
<vrf_tap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ec5(%rip),%rax
mov    (%rax),%esi
lea    0xed4(%rip),%rdi
call   1030 <open@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vrf_tap>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%esi
lea    0xee0(%rip),%rdi
jmp    1030 <open@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"/dev/net/tun\00"
@O_RDWR = global i32 0
define i32 @vrf_tap(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @O_RDWR
%4 = call i32 @open(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 %4
}

LLVM IR (-O2):
@.str = [13 x i8] c"/dev/net/tun\00"
@O_RDWR = global i32 0
define i32 @vrf_tap(i8* nocapture readnone %0) {
%2 = load i32, i32* @O_RDWR
%3 = tail call i32 @open(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 %3
}
int fitsBits(int x, int n) {
  int sign_x = (x >> 31);
  int minus_one = (~0x00000000);
  return !((x >> (n + minus_one)) ^ sign_x);
}


x86 assembly (clang, -O0):
<fitsBits>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1f,%eax
mov    %eax,-0xc(%rbp)
movl   $0xffffffff,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
add    -0x10(%rbp),%ecx
sar    %cl,%eax
xor    -0xc(%rbp),%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fitsBits>:
mov    %edi,%edx
lea    -0x1(%rsi),%ecx
sar    %cl,%edi
sar    $0x1f,%edx
xor    %eax,%eax
cmp    %edx,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @fitsBits(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = ashr i32 %7, 31
store i32 %8, i32* %5
store i32 -1, i32* %6
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = load i32, i32* %6
%12 = add nsw i32 %10, %11
%13 = ashr i32 %9, %12
%14 = load i32, i32* %5
%15 = xor i32 %13, %14
%16 = icmp ne i32 %15, 0
%17 = xor i1 %16, true
%18 = zext i1 %17 to i32
ret i32 %18
}

LLVM IR (-O2):
define i32 @fitsBits(i32 %0, i32 %1) {
%3 = ashr i32 %0, 31
%4 = add nsw i32 %1, -1
%5 = ashr i32 %0, %4
%6 = icmp eq i32 %5, %3
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
bool is_number(char input) {
  if (input >= '0' && input <= '9')
    return true;
  return false;
}


x86 assembly (clang, -O0):
<is_number>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x30,%eax
jl     1130 <is_number+0x30>
movsbl -0x5(%rbp),%eax
cmp    $0x39,%eax
jg     1130 <is_number+0x30>
movl   $0x1,-0x4(%rbp)
jmp    1137 <is_number+0x37>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_number>:
add    $0xd0,%dil
xor    %eax,%eax
cmp    $0xa,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @is_number(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 48
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 57
br i1 %10, label %11, label %12
11: ; preds = %7
store i32 1, i32* %2
br label %13
12: ; preds = %7, %1
store i32 0, i32* %2
br label %13
13: ; preds = %12, %11
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @is_number(i8 signext %0) {
%2 = add i8 %0, -48
%3 = icmp ult i8 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
scalar_t__ exp(scalar_t__);
scalar_t__ factln(int);
double floor(scalar_t__);
double bico(int n, int k) {
  return floor(0.5 + exp(factln(n) - factln(k) - factln(n - k)));
}


x86 assembly (clang, -O0):
<bico>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <factln@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <factln@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
sub    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
sub    -0x8(%rbp),%edi
call   1030 <factln@plt>
mov    -0x10(%rbp),%rdi
sub    %rax,%rdi
call   1040 <exp@plt>
cvtsi2sd %rax,%xmm1
movsd  0xe7c(%rip),%xmm0
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rdi
call   1050 <floor@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bico>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %esi,%r14d
mov    %edi,%ebp
call   1030 <factln@plt>
mov    %rax,%rbx
mov    %r14d,%edi
call   1030 <factln@plt>
mov    %rax,%r15
sub    %r14d,%ebp
mov    %ebp,%edi
call   1030 <factln@plt>
add    %r15,%rax
sub    %rax,%rbx
mov    %rbx,%rdi
call   1040 <exp@plt>
cvtsi2sd %rax,%xmm0
addsd  0xe8c(%rip),%xmm0
cvttsd2si %xmm0,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1050 <floor@plt>

LLVM IR (-O0):
define double @bico(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 = call i64 @factln(i32 %5)
%7 = load i32, i32* %4
%8 = call i64 @factln(i32 %7)
%9 = sub nsw i64 %6, %8
%10 = load i32, i32* %3
%11 = load i32, i32* %4
%12 = sub nsw i32 %10, %11
%13 = call i64 @factln(i32 %12)
%14 = sub nsw i64 %9, %13
%15 = call i64 @exp(i64 %14)
%16 = sitofp i64 %15 to double
%17 = fadd double 5.000000e-01, %16
%18 = fptosi double %17 to i64
%19 = call double @floor(i64 %18)
ret double %19
}

LLVM IR (-O2):
define double @bico(i32 %0, i32 %1) {
%3 = tail call i64 @factln(i32 %0)
%4 = tail call i64 @factln(i32 %1)
%5 = sub nsw i32 %0, %1
%6 = tail call i64 @factln(i32 %5)
%7 = add i64 %4, %6
%8 = sub i64 %3, %7
%9 = tail call i64 @exp(i64 %8)
%10 = sitofp i64 %9 to double
%11 = fadd double %10, 5.000000e-01
%12 = fptosi double %11 to i64
%13 = tail call double @floor(i64 %12)
ret double %13
}
void caller_1_1_2_1_1_1_2() {}


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

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

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

LLVM IR (-O2):
define void @caller_1_1_2_1_1_1_2() {
ret void
}
/* Variables and functions */
scalar_t__ malloc(int);
int /*<<< orphan*/ sprintf(char *, char *, char *, char *);
int strlen(char *);
char *concat_path(char *dir, char *file) {
  char *buffer =
      (char *)malloc(sizeof(char) * (strlen(dir) + strlen(file) + 2));
  sprintf(buffer, "%s/%s", dir, file);
  return buffer;
}


x86 assembly (clang, -O0):
<concat_path>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x1c(%rbp),%eax
add    %ecx,%eax
add    $0x2,%eax
cltq
shl    $0x0,%rax
mov    %eax,%edi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0xe7d(%rip),%rsi
call   1050 <sprintf@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<concat_path>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%r12
call   1030 <strlen@plt>
mov    %eax,%r15d
mov    %r14,%rdi
call   1030 <strlen@plt>
lea    (%r15,%rax,1),%edi
add    $0x2,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
lea    0xe9c(%rip),%rsi
mov    %rax,%rdi
mov    %r12,%rdx
mov    %r14,%rcx
call   1050 <sprintf@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%s/%s\00"
define i8* @concat_path(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = call i32 @strlen(i8* %6)
%8 = load i8*, i8** %4
%9 = call i32 @strlen(i8* %8)
%10 = add nsw i32 %7, %9
%11 = add nsw i32 %10, 2
%12 = sext i32 %11 to i64
%13 = mul i64 1, %12
%14 = trunc i64 %13 to i32
%15 = call i64 @malloc(i32 %14)
%16 = inttoptr i64 %15 to i8*
store i8* %16, i8** %5
%17 = load i8*, i8** %5
%18 = load i8*, i8** %3
%19 = load i8*, i8** %4
%20 = call i32 @sprintf(i8* %17, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %18, i8* %19)
%21 = load i8*, i8** %5
ret i8* %21
}

LLVM IR (-O2):
@.str = [6 x i8] c"%s/%s\00"
define i8* @concat_path(i8* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = tail call i32 @strlen(i8* %1)
%5 = add i32 %3, 2
%6 = add i32 %5, %4
%7 = tail call i64 @malloc(i32 %6)
%8 = inttoptr i64 %7 to i8*
%9 = tail call i32 @sprintf(i8* dereferenceable(1) %8, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
ret i8* %8
}
int g(int n) {
n:
  return n;
}


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

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

LLVM IR (-O0):
define i32 @g(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %1
%4 = load i32, i32* %2
ret i32 %4
}

LLVM IR (-O2):
define i32 @g(i32 returned %0) {
ret i32 %0
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ memset(struct tm *, int /*<<< orphan*/, int);
struct tm *localtime_r(const time_t *timep, struct tm *result) {
  ;
  memset(result, 0, sizeof(struct tm));
  return result;
}


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

x86 assembly (clang, -O2):
<localtime_r>:
push   %rbx
mov    %rsi,%rbx
mov    %rsi,%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1030 <memset@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
define %struct.tm* @localtime_r(i32* %0, %struct.tm* %1) {
%3 = alloca i32*
%4 = alloca %struct.tm*
store i32* %0, i32** %3
store %struct.tm* %1, %struct.tm** %4
%5 = load %struct.tm*, %struct.tm** %4
%6 = call i32 @memset(%struct.tm* %5, i32 0, i32 4)
%7 = load %struct.tm*, %struct.tm** %4
ret %struct.tm* %7
}

LLVM IR (-O2):
%struct.tm = type { i32 }
define %struct.tm* @localtime_r(i32* nocapture readnone %0, %struct.tm* returned %1) {
%3 = tail call i32 @memset(%struct.tm* %1, i32 0, i32 4)
ret %struct.tm* %1
}
/* Variables and functions */
float atan2f(int /*<<< orphan*/, float);
int /*<<< orphan*/ sqrtf(int);
float acosf(float x) { return atan2f(sqrtf((1 + x) * (1 - x)), x); }


x86 assembly (clang, -O0):
<acosf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  0xecb(%rip),%xmm0
addss  -0x4(%rbp),%xmm0
movss  0xebe(%rip),%xmm1
subss  -0x4(%rbp),%xmm1
mulss  %xmm1,%xmm0
cvttss2si %xmm0,%edi
call   1030 <sqrtf@plt>
mov    %eax,%edi
movss  -0x4(%rbp),%xmm0
call   1040 <atan2f@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<acosf>:
push   %rax
movss  %xmm0,0x4(%rsp)
movss  0xed1(%rip),%xmm2
movaps %xmm0,%xmm1
addss  %xmm2,%xmm1
subss  %xmm0,%xmm2
mulss  %xmm1,%xmm2
cvttss2si %xmm2,%edi
call   1030 <sqrtf@plt>
mov    %eax,%edi
movss  0x4(%rsp),%xmm0
pop    %rax
jmp    1040 <atan2f@plt>

LLVM IR (-O0):
define float @acosf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fadd float 1.000000e+00, %3
%5 = load float, float* %2
%6 = fsub float 1.000000e+00, %5
%7 = fmul float %4, %6
%8 = fptosi float %7 to i32
%9 = call i32 @sqrtf(i32 %8)
%10 = load float, float* %2
%11 = call float @atan2f(i32 %9, float %10)
ret float %11
}

LLVM IR (-O2):
define float @acosf(float %0) {
%2 = fadd float %0, 1.000000e+00
%3 = fsub float 1.000000e+00, %0
%4 = fmul float %2, %3
%5 = fptosi float %4 to i32
%6 = tail call i32 @sqrtf(i32 %5)
%7 = tail call float @atan2f(i32 %6, float %0)
ret float %7
}
/* Variables and functions */
int /*<<< orphan*/ Msp430TimerP__1__Event__fired(int /*<<< orphan*/);
void Msp430TimerP__1__VectorTimerX0__fired(void) {
  Msp430TimerP__1__Event__fired(0);
}


x86 assembly (clang, -O0):
<Msp430TimerP__1__VectorTimerX0__fired>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <Msp430TimerP__1__Event__fired@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @Msp430TimerP__1__VectorTimerX0__fired() {
%1 = call i32 @Msp430TimerP__1__Event__fired(i32 0)
ret void
}

LLVM IR (-O2):
define void @Msp430TimerP__1__VectorTimerX0__fired() {
%1 = tail call i32 @Msp430TimerP__1__Event__fired(i32 0)
ret void
}
/* Variables and functions */
scalar_t__ EOF;
scalar_t__ fputs(char const *, int /*<<< orphan*/);
int putchar(char);
int /*<<< orphan*/ stdout;
int puts(const char *s) {
  if (EOF == fputs(s, stdout)) {
    return EOF;
  }
  return putchar('\n');
}


x86 assembly (clang, -O0):
<puts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    0x2eb5(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    0x2e93(%rip),%rax
mov    (%rax),%esi
call   1040 <fputs@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
cmp    %rcx,%rax
jne    116e <puts+0x4e>
mov    0x2e85(%rip),%rax
mov    (%rax),%rax
mov    %eax,-0x4(%rbp)
jmp    117b <puts+0x5b>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<puts>:
push   %r14
push   %rbx
push   %rax
mov    0x2ebd(%rip),%r14
mov    (%r14),%rbx
mov    0x2ea3(%rip),%rax
mov    (%rax),%esi
call   1040 <fputs@plt>
cmp    %rax,%rbx
jne    114c <puts+0x2c>
mov    (%r14),%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@EOF = global i64 0
@stdout = global i32 0
define i32 @puts(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i64, i64* @EOF
%5 = load i8*, i8** %3
%6 = load i32, i32* @stdout
%7 = call i64 @fputs(i8* %5, i32 %6)
%8 = icmp eq i64 %4, %7
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = load i64, i64* @EOF
%11 = trunc i64 %10 to i32
store i32 %11, i32* %2
br label %14
12: ; preds = %1
%13 = call i32 @putchar(i8 signext 10)
store i32 %13, i32* %2
br label %14
14: ; preds = %12, %9
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
@EOF = global i64 0
@stdout = global i32 0
define i32 @puts(i8* %0) {
%2 = load i64, i64* @EOF
%3 = load i32, i32* @stdout
%4 = tail call i64 @fputs(i8* %0, i32 %3)
%5 = icmp eq i64 %2, %4
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i64, i64* @EOF
%8 = trunc i64 %7 to i32
br label %11
9: ; preds = %1
%10 = tail call i32 @putchar(i8 signext 10)
br label %11
11: ; preds = %9, %6
%12 = phi i32 [ %8, %6 ], [ %10, %9 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ SerialP__SerialFrameComm__putDone();
void HdlcTranslateC__SerialFrameComm__putDone(void) {
  SerialP__SerialFrameComm__putDone();
}


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

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

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

LLVM IR (-O2):
define void @HdlcTranslateC__SerialFrameComm__putDone() {
%1 = tail call i32 (...) @SerialP__SerialFrameComm__putDone()
ret void
}
/* Type definitions */
struct kmod_module_dependency_symbol {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct kmod_module_dependency_symbol *);
void kmod_module_dependency_symbol_free(
    struct kmod_module_dependency_symbol *dependency_symbol) {
  free(dependency_symbol);
}


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

x86 assembly (clang, -O2):
<kmod_module_dependency_symbol_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
%struct.kmod_module_dependency_symbol = type { i32 }
define void @kmod_module_dependency_symbol_free(%struct.kmod_module_dependency_symbol* nocapture %0) {
%2 = tail call i32 @free(%struct.kmod_module_dependency_symbol* %0)
ret void
}
int bytesfor(int mapbits, int metabits, int components, int z_lookup) {
  int bits = mapbits + metabits + (mapbits - 2 * z_lookup) * (components - 1);
  return (bits + 7) / 8;
}


x86 assembly (clang, -O0):
<bytesfor>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    -0x4(%rbp),%ecx
mov    -0x10(%rbp),%edx
shl    $0x1,%edx
sub    %edx,%ecx
mov    -0xc(%rbp),%edx
sub    $0x1,%edx
imul   %edx,%ecx
add    %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x7,%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
pop    %rbp
ret

x86 assembly (clang, -O2):
<bytesfor>:
add    %ecx,%ecx
add    %edi,%esi
sub    %ecx,%edi
add    $0xffffffff,%edx
imul   %edi,%edx
lea    (%rdx,%rsi,1),%ecx
add    $0x7,%ecx
lea    (%rdx,%rsi,1),%eax
add    $0xe,%eax
test   %ecx,%ecx
cmovns %ecx,%eax
sar    $0x3,%eax
ret

LLVM IR (-O0):
define i32 @bytesfor(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%10 = load i32, i32* %5
%11 = load i32, i32* %6
%12 = add nsw i32 %10, %11
%13 = load i32, i32* %5
%14 = load i32, i32* %8
%15 = mul nsw i32 2, %14
%16 = sub nsw i32 %13, %15
%17 = load i32, i32* %7
%18 = sub nsw i32 %17, 1
%19 = mul nsw i32 %16, %18
%20 = add nsw i32 %12, %19
store i32 %20, i32* %9
%21 = load i32, i32* %9
%22 = add nsw i32 %21, 7
%23 = sdiv i32 %22, 8
ret i32 %23
}

LLVM IR (-O2):
define i32 @bytesfor(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = mul i32 %3, -2
%6 = add i32 %5, %0
%7 = add nsw i32 %2, -1
%8 = mul nsw i32 %6, %7
%9 = add i32 %0, 7
%10 = add i32 %9, %1
%11 = add i32 %10, %8
%12 = sdiv i32 %11, 8
ret i32 %12
}
__attribute__((const, pure)) unsigned int __get_28y_year_equiv(unsigned year) {
  year = year % 400U;
  if (year > 300U) {
    return year + 1600U;
  } else if (year > 200U) {
    return year + 1724U;
  } else if (year > 100U) {
    return year + 1820U;
  }
  return year + 2000;
}


x86 assembly (clang, -O0):
<__get_28y_year_equiv>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x190,%ecx
xor    %edx,%edx
div    %ecx
mov    %edx,-0x8(%rbp)
cmpl   $0x12c,-0x8(%rbp)
jbe    1133 <__get_28y_year_equiv+0x33>
mov    -0x8(%rbp),%eax
add    $0x640,%eax
mov    %eax,-0x4(%rbp)
jmp    117f <__get_28y_year_equiv+0x7f>
cmpl   $0xc8,-0x8(%rbp)
jbe    1150 <__get_28y_year_equiv+0x50>
mov    -0x8(%rbp),%eax
add    $0x6bc,%eax
mov    %eax,-0x4(%rbp)
jmp    117f <__get_28y_year_equiv+0x7f>
cmpl   $0x64,-0x8(%rbp)
jbe    116a <__get_28y_year_equiv+0x6a>
mov    -0x8(%rbp),%eax
add    $0x71c,%eax
mov    %eax,-0x4(%rbp)
jmp    117f <__get_28y_year_equiv+0x7f>
jmp    116f <__get_28y_year_equiv+0x6f>
jmp    1174 <__get_28y_year_equiv+0x74>
mov    -0x8(%rbp),%eax
add    $0x7d0,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__get_28y_year_equiv>:
mov    %edi,%eax
mov    %edi,%ecx
imul   $0x51eb851f,%rcx,%rcx
shr    $0x27,%rcx
imul   $0x190,%ecx,%ecx
sub    %ecx,%eax
mov    $0x640,%ecx
cmp    $0x12c,%eax
ja     113f <__get_28y_year_equiv+0x3f>
mov    $0x6bc,%ecx
cmp    $0xc8,%eax
ja     113f <__get_28y_year_equiv+0x3f>
cmp    $0x65,%eax
mov    $0x71c,%edx
mov    $0x7d0,%ecx
cmovae %edx,%ecx
add    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @__get_28y_year_equiv(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = urem i32 %4, 400
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp ugt i32 %6, 300
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i32, i32* %3
%10 = add i32 %9, 1600
store i32 %10, i32* %2
br label %28
11: ; preds = %1
%12 = load i32, i32* %3
%13 = icmp ugt i32 %12, 200
br i1 %13, label %14, label %17
14: ; preds = %11
%15 = load i32, i32* %3
%16 = add i32 %15, 1724
store i32 %16, i32* %2
br label %28
17: ; preds = %11
%18 = load i32, i32* %3
%19 = icmp ugt i32 %18, 100
br i1 %19, label %20, label %23
20: ; preds = %17
%21 = load i32, i32* %3
%22 = add i32 %21, 1820
store i32 %22, i32* %2
br label %28
23: ; preds = %17
br label %24
24: ; preds = %23
br label %25
25: ; preds = %24
%26 = load i32, i32* %3
%27 = add i32 %26, 2000
store i32 %27, i32* %2
br label %28
28: ; preds = %25, %20, %14, %8
%29 = load i32, i32* %2
ret i32 %29
}

LLVM IR (-O2):
define i32 @__get_28y_year_equiv(i32 %0) {
%2 = urem i32 %0, 400
%3 = icmp ugt i32 %2, 300
br i1 %3, label %9, label %4
4: ; preds = %1
%5 = icmp ugt i32 %2, 200
br i1 %5, label %9, label %6
6: ; preds = %4
%7 = icmp ugt i32 %2, 100
%8 = select i1 %7, i32 1820, i32 2000
br label %9
9: ; preds = %6, %4, %1
%10 = phi i32 [ 1600, %1 ], [ 1724, %4 ], [ %8, %6 ]
%11 = add nuw nsw i32 %2, %10
ret i32 %11
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
char nibble_to_hexchar(int);
char *string_append_two_digit_hex_byte(char *string, uint8_t byte) {
  *string = nibble_to_hexchar((byte & 0xf0) >> 4);
  string++;
  *string = nibble_to_hexchar((byte & 0x0f) >> 0);
  string++;
  return string;
}


x86 assembly (clang, -O0):
<string_append_two_digit_hex_byte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%edi
and    $0xf0,%edi
sar    $0x4,%edi
call   1030 <nibble_to_hexchar@plt>
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0xc(%rbp),%edi
and    $0xf,%edi
sar    $0x0,%edi
call   1030 <nibble_to_hexchar@plt>
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_append_two_digit_hex_byte>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
mov    %esi,%edi
shr    $0x4,%edi
and    $0xf,%edi
call   1030 <nibble_to_hexchar@plt>
mov    %al,(%rbx)
and    $0xf,%ebp
mov    %ebp,%edi
call   1030 <nibble_to_hexchar@plt>
mov    %al,0x1(%rbx)
add    $0x2,%rbx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i8* @string_append_two_digit_hex_byte(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = and i32 %5, 240
%7 = ashr i32 %6, 4
%8 = call signext i8 @nibble_to_hexchar(i32 %7)
%9 = load i8*, i8** %3
store i8 %8, i8* %9
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i32 1
store i8* %11, i8** %3
%12 = load i32, i32* %4
%13 = and i32 %12, 15
%14 = ashr i32 %13, 0
%15 = call signext i8 @nibble_to_hexchar(i32 %14)
%16 = load i8*, i8** %3
store i8 %15, i8* %16
%17 = load i8*, i8** %3
%18 = getelementptr inbounds i8, i8* %17, i32 1
store i8* %18, i8** %3
%19 = load i8*, i8** %3
ret i8* %19
}

LLVM IR (-O2):
define i8* @string_append_two_digit_hex_byte(i8* writeonly %0, i32 %1) {
%3 = lshr i32 %1, 4
%4 = and i32 %3, 15
%5 = tail call signext i8 @nibble_to_hexchar(i32 %4)
store i8 %5, i8* %0
%6 = getelementptr inbounds i8, i8* %0, i64 1
%7 = and i32 %1, 15
%8 = tail call signext i8 @nibble_to_hexchar(i32 %7)
store i8 %8, i8* %6
%9 = getelementptr inbounds i8, i8* %0, i64 2
ret i8* %9
}
double erand48(unsigned short xsubi[3]) { return 0.0; }


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

x86 assembly (clang, -O2):
<erand48>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @erand48(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
ret double 0.000000e+00
}

LLVM IR (-O2):
define double @erand48(i16* nocapture readnone %0) {
ret double 0.000000e+00
}
/* Variables and functions */
int /*<<< orphan*/ Com_MD5Init();
void SV_InitChallenger(void) { Com_MD5Init(); }


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

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

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

LLVM IR (-O2):
define void @SV_InitChallenger() {
%1 = tail call i32 (...) @Com_MD5Init()
ret void
}
/* Type definitions */
typedef int int64_t;

/* Variables and functions */
int64_t align(int64_t value, int bits) {
  int64_t mask = ((int64_t)1 << bits) - 1;
  return (value + mask) & (~mask);
}


x86 assembly (clang, -O0):
<align>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
add    -0xc(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<align>:
mov    %esi,%ecx
mov    $0xffffffff,%edx
shl    %cl,%edx
mov    %edx,%eax
not    %eax
add    %edi,%eax
and    %edx,%eax
ret

LLVM IR (-O0):
define i32 @align(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = shl i32 1, %6
%8 = sub nsw i32 %7, 1
store i32 %8, i32* %5
%9 = load i32, i32* %3
%10 = load i32, i32* %5
%11 = add nsw i32 %9, %10
%12 = load i32, i32* %5
%13 = xor i32 %12, -1
%14 = and i32 %11, %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @align(i32 %0, i32 %1) {
%3 = shl nsw i32 -1, %1
%4 = xor i32 %3, -1
%5 = add nsw i32 %4, %0
%6 = and i32 %5, %3
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int getB1Graph(int sizeGraph) {
  assert(sizeGraph <= 14);
  return sizeGraph * sizeGraph + 2;
}


x86 assembly (clang, -O0):
<getB1Graph>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0xe,-0x4(%rbp)
setle  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x4(%rbp),%eax
imul   -0x4(%rbp),%eax
add    $0x2,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getB1Graph>:
push   %rbx
mov    %edi,%ebx
xor    %edi,%edi
cmp    $0xf,%ebx
setl   %dil
call   1030 <assert@plt>
imul   %ebx,%ebx
add    $0x2,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @getB1Graph(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sle i32 %3, 14
%5 = zext i1 %4 to i32
%6 = call i32 @assert(i32 %5)
%7 = load i32, i32* %2
%8 = load i32, i32* %2
%9 = mul nsw i32 %7, %8
%10 = add nsw i32 %9, 2
ret i32 %10
}

LLVM IR (-O2):
define i32 @getB1Graph(i32 %0) {
%2 = icmp slt i32 %0, 15
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = mul nsw i32 %0, %0
%6 = add nuw nsw i32 %5, 2
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ fatal(char *);
const char **os_get_magellan_mountpoints() { fatal("Not implemented"); }


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

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

LLVM IR (-O0):
@.str = [16 x i8] c"Not implemented\00"
define i8** @os_get_magellan_mountpoints() {
%1 = alloca i8**
%2 = call i32 @fatal(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%3 = load i8**, i8*** %1
ret i8** %3
}

LLVM IR (-O2):
@.str = [16 x i8] c"Not implemented\00"
define noalias i8** @os_get_magellan_mountpoints() {
%1 = tail call i32 @fatal(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret i8** undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void success_() { printf("Hey, the process ended succesfully.\n"); }


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

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

LLVM IR (-O0):
@.str = [37 x i8] c"Hey, the process ended succesfully.\0A\00"
define void @success_() {
%1 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [36 x i8] c"Hey, the process ended succesfully.\00"
define void @success_() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str, i64 0, i64 0))
ret void
}
void __attribute__((weak)) can1_rx1_isr() { debug_handler(__FUNCTION__); }


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

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

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

LLVM IR (-O2):
@__FUNCTION__.can1_rx1_isr = [13 x i8] c"can1_rx1_isr\00"
define weak void @can1_rx1_isr() {
%1 = tail call i32 (i8*, ...) bitcast (i32 (...)* @debug_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @__FUNCTION__.can1_rx1_isr, i64 0, i64 0))
ret void
}
unsigned int adreno_ringbuffer_inc_wrapped(unsigned int val,
                                           unsigned int size) {
  return (val + sizeof(unsigned int)) % size;
}


x86 assembly (clang, -O0):
<adreno_ringbuffer_inc_wrapped>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x4,%rax
mov    -0x8(%rbp),%ecx
xor    %edx,%edx
div    %rcx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<adreno_ringbuffer_inc_wrapped>:
mov    %edi,%eax
add    $0x4,%rax
mov    %esi,%ecx
bt     $0x20,%rax
jae    1118 <adreno_ringbuffer_inc_wrapped+0x18>
xor    %edx,%edx
div    %rcx
mov    %rdx,%rax
ret
xor    %edx,%edx
div    %ecx
mov    %edx,%eax
ret

LLVM IR (-O0):
define i32 @adreno_ringbuffer_inc_wrapped(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 = zext i32 %5 to i64
%7 = add i64 %6, 4
%8 = load i32, i32* %4
%9 = zext i32 %8 to i64
%10 = urem i64 %7, %9
%11 = trunc i64 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @adreno_ringbuffer_inc_wrapped(i32 %0, i32 %1) {
%3 = zext i32 %0 to i64
%4 = add nuw nsw i64 %3, 4
%5 = zext i32 %1 to i64
%6 = urem i64 %4, %5
%7 = trunc i64 %6 to i32
ret i32 %7
}
int mult(int p, int q) {
  int p1;
  int p0;
  int q1;
  int q0;
  {
    p1 = p / 10000;
    p0 = p % 10000;
    q1 = q / 10000;
    q0 = q % 10000;
    return (((p0 * q1 + p1 * q0) % 10000) * 10000 + p0 * q0);
  }
}


x86 assembly (clang, -O0):
<mult>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x2710,%ecx
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x2710,%ecx
cltd
idiv   %ecx
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x2710,%ecx
cltd
idiv   %ecx
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x2710,%ecx
cltd
idiv   %ecx
mov    %edx,-0x18(%rbp)
mov    -0x10(%rbp),%eax
imul   -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
imul   -0x18(%rbp),%ecx
add    %ecx,%eax
mov    $0x2710,%ecx
cltd
idiv   %ecx
imul   $0x2710,%edx,%eax
mov    -0x10(%rbp),%ecx
imul   -0x18(%rbp),%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mult>:
movslq %edi,%rcx
imul   $0x68db8bad,%rcx,%rdx
mov    %rdx,%rax
shr    $0x3f,%rax
sar    $0x2c,%rdx
add    %eax,%edx
imul   $0x2710,%edx,%eax
sub    %eax,%ecx
movslq %esi,%rax
imul   $0x68db8bad,%rax,%rsi
mov    %rsi,%rdi
shr    $0x3f,%rdi
sar    $0x2c,%rsi
add    %edi,%esi
imul   $0x2710,%esi,%edi
sub    %edi,%eax
imul   %ecx,%esi
imul   %eax,%edx
add    %esi,%edx
movslq %edx,%rdx
imul   $0x68db8bad,%rdx,%rsi
mov    %rsi,%rdi
shr    $0x3f,%rdi
sar    $0x2c,%rsi
add    %edi,%esi
imul   $0x2710,%esi,%esi
sub    %esi,%edx
imul   $0x2710,%edx,%edx
imul   %ecx,%eax
add    %edx,%eax
ret

LLVM IR (-O0):
define i32 @mult(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%9 = load i32, i32* %3
%10 = sdiv i32 %9, 10000
store i32 %10, i32* %5
%11 = load i32, i32* %3
%12 = srem i32 %11, 10000
store i32 %12, i32* %6
%13 = load i32, i32* %4
%14 = sdiv i32 %13, 10000
store i32 %14, i32* %7
%15 = load i32, i32* %4
%16 = srem i32 %15, 10000
store i32 %16, i32* %8
%17 = load i32, i32* %6
%18 = load i32, i32* %7
%19 = mul nsw i32 %17, %18
%20 = load i32, i32* %5
%21 = load i32, i32* %8
%22 = mul nsw i32 %20, %21
%23 = add nsw i32 %19, %22
%24 = srem i32 %23, 10000
%25 = mul nsw i32 %24, 10000
%26 = load i32, i32* %6
%27 = load i32, i32* %8
%28 = mul nsw i32 %26, %27
%29 = add nsw i32 %25, %28
ret i32 %29
}

LLVM IR (-O2):
define i32 @mult(i32 %0, i32 %1) {
%3 = sdiv i32 %0, 10000
%4 = srem i32 %0, 10000
%5 = sdiv i32 %1, 10000
%6 = srem i32 %1, 10000
%7 = mul nsw i32 %5, %4
%8 = mul nsw i32 %6, %3
%9 = add nsw i32 %7, %8
%10 = srem i32 %9, 10000
%11 = mul nsw i32 %10, 10000
%12 = mul nsw i32 %6, %4
%13 = add nsw i32 %11, %12
ret i32 %13
}
__attribute__((always_)) void flush_cache_vmap(unsigned long start,
                                               unsigned long end) {}


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

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

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

LLVM IR (-O2):
define void @flush_cache_vmap(i64 %0, i64 %1) {
ret void
}
/* Variables and functions */
char *strdup(char *);
int /*<<< orphan*/ tolower(char);
char *bbstrdup(char *s1) {
  char *str, *p;
  str = p = strdup(s1);
  while (*p)
    *p++ = tolower(*p);
  return str;
}


x86 assembly (clang, -O0):
<bbstrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strdup@plt>
mov    %rax,-0x18(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
je     116e <bbstrdup+0x4e>
mov    -0x18(%rbp),%rax
movsbl (%rax),%edi
call   1030 <tolower@plt>
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
jmp    113d <bbstrdup+0x1d>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bbstrdup>:
push   %r14
push   %rbx
push   %rax
call   1040 <strdup@plt>
mov    %rax,%r14
mov    (%rax),%al
test   %al,%al
je     1156 <bbstrdup+0x36>
mov    %r14,%rbx
add    $0x1,%rbx
nopl   0x0(%rax)
movsbl %al,%edi
call   1030 <tolower@plt>
mov    %al,-0x1(%rbx)
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1140 <bbstrdup+0x20>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @bbstrdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i8* @strdup(i8* %5)
store i8* %6, i8** %4
store i8* %6, i8** %3
br label %7
7: ; preds = %11, %1
%8 = load i8*, i8** %4
%9 = load i8, i8* %8
%10 = icmp ne i8 %9, 0
br i1 %10, label %11, label %18
11: ; preds = %7
%12 = load i8*, i8** %4
%13 = load i8, i8* %12
%14 = call i32 @tolower(i8 signext %13)
%15 = trunc i32 %14 to i8
%16 = load i8*, i8** %4
%17 = getelementptr inbounds i8, i8* %16, i32 1
store i8* %17, i8** %4
store i8 %15, i8* %16
br label %7
18: ; preds = %7
%19 = load i8*, i8** %3
ret i8* %19
}

LLVM IR (-O2):
define noalias i8* @bbstrdup(i8* nocapture %0) {
%2 = tail call i8* @strdup(i8* %0)
%3 = load i8, i8* %2
%4 = icmp eq i8 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %1, %5
%6 = phi i8 [ %11, %5 ], [ %3, %1 ]
%7 = phi i8* [ %10, %5 ], [ %2, %1 ]
%8 = tail call i32 @tolower(i8 signext %6)
%9 = trunc i32 %8 to i8
%10 = getelementptr inbounds i8, i8* %7, i64 1
store i8 %9, i8* %7
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5, %1
ret i8* %2
}
OP(ed, df) {}


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

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

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

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ c_die(char *);
void *malloc(size_t);
void *nmalloc(size_t howmuch) {
  void *r;
  if (!(r = malloc(howmuch)))
    c_die("CMatrix: malloc: out of memory!");
  return r;
}


x86 assembly (clang, -O0):
<nmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    114f <nmalloc+0x2f>
lea    0xeb6(%rip),%rdi
call   1030 <c_die@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nmalloc>:
push   %rbx
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113a <nmalloc+0x1a>
lea    0xecb(%rip),%rdi
call   1030 <c_die@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [32 x i8] c"CMatrix: malloc: out of memory!\00"
define i8* @nmalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = icmp ne i8* %5, null
br i1 %6, label %9, label %7
7: ; preds = %1
%8 = call i32 @c_die(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %1
%10 = load i8*, i8** %3
ret i8* %10
}

LLVM IR (-O2):
@.str = [32 x i8] c"CMatrix: malloc: out of memory!\00"
define noalias i8* @nmalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @c_die(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret i8* %2
}
/* Type definitions */
typedef scalar_t__ int32_t;

/* Variables and functions */
double hypot(scalar_t__, scalar_t__);
double length(int32_t *p1, int32_t *p2) {
  return hypot(p1[0] - p2[0], p1[1] - p2[1]);
}


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

x86 assembly (clang, -O2):
<length>:
mov    (%rdi),%rax
mov    0x8(%rdi),%rcx
sub    (%rsi),%rax
sub    0x8(%rsi),%rcx
mov    %rax,%rdi
mov    %rcx,%rsi
jmp    1030 <hypot@plt>

LLVM IR (-O0):
define double @length(i64* %0, i64* %1) {
%3 = alloca i64*
%4 = alloca i64*
store i64* %0, i64** %3
store i64* %1, i64** %4
%5 = load i64*, i64** %3
%6 = getelementptr inbounds i64, i64* %5, i64 0
%7 = load i64, i64* %6
%8 = load i64*, i64** %4
%9 = getelementptr inbounds i64, i64* %8, i64 0
%10 = load i64, i64* %9
%11 = sub nsw i64 %7, %10
%12 = load i64*, i64** %3
%13 = getelementptr inbounds i64, i64* %12, i64 1
%14 = load i64, i64* %13
%15 = load i64*, i64** %4
%16 = getelementptr inbounds i64, i64* %15, i64 1
%17 = load i64, i64* %16
%18 = sub nsw i64 %14, %17
%19 = call double @hypot(i64 %11, i64 %18)
ret double %19
}

LLVM IR (-O2):
define double @length(i64* nocapture %0, i64* nocapture %1) {
%3 = load i64, i64* %0
%4 = load i64, i64* %1
%5 = sub nsw i64 %3, %4
%6 = getelementptr inbounds i64, i64* %0, i64 1
%7 = load i64, i64* %6
%8 = getelementptr inbounds i64, i64* %1, i64 1
%9 = load i64, i64* %8
%10 = sub nsw i64 %7, %9
%11 = tail call double @hypot(i64 %5, i64 %10)
ret double %11
}
/* Variables and functions */
const char *ds9_template(void *p) { return NULL; }


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

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

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

LLVM IR (-O2):
define noalias i8* @ds9_template(i8* nocapture readnone %0) {
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ TriMessage(char *);
int /*<<< orphan*/ triexit(int);
void internalerror() {
  TriMessage("  Please report this bug to jrs@cs.berkeley.edu\n");
  TriMessage(
      "  Include the message above, your input data set, and the exact\n");
  TriMessage("    command line you used to run Triangle.\n");
  triexit(2);
}


x86 assembly (clang, -O0):
<internalerror>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <TriMessage@plt>
lea    0xefa(%rip),%rdi
call   1040 <TriMessage@plt>
lea    0xf2f(%rip),%rdi
call   1040 <TriMessage@plt>
mov    $0x2,%edi
call   1030 <triexit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<internalerror>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <TriMessage@plt>
lea    0xefd(%rip),%rdi
call   1040 <TriMessage@plt>
lea    0xf32(%rip),%rdi
call   1040 <TriMessage@plt>
mov    $0x2,%edi
pop    %rax
jmp    1030 <triexit@plt>

LLVM IR (-O0):
@.str = [49 x i8] c" Please report this bug to jrs@cs.berkeley.edu\0A\00"
@.str.1 = [65 x i8] c" Include the message above, your input data set, and the exact\0A\00"
@.str.2 = [44 x i8] c" command line you used to run Triangle.\0A\00"
define void @internalerror() {
%1 = call i32 @TriMessage(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @TriMessage(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @TriMessage(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @triexit(i32 2)
ret void
}

LLVM IR (-O2):
@.str = [49 x i8] c" Please report this bug to jrs@cs.berkeley.edu\0A\00"
@.str.1 = [65 x i8] c" Include the message above, your input data set, and the exact\0A\00"
@.str.2 = [44 x i8] c" command line you used to run Triangle.\0A\00"
define void @internalerror() {
%1 = tail call i32 @TriMessage(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @TriMessage(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @TriMessage(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @triexit(i32 2)
ret void
}
void av_rescale() {}


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

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

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

LLVM IR (-O2):
define void @av_rescale() {
ret void
}