xunge/DecIR huggingface dataset:
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ display;
};
typedef TYPE_1__ XConfigureRequestEvent;

/* Variables and functions */
void *get_XConfigureRequestEvent_display(void *_p) {
  return (void *)((XConfigureRequestEvent *)_p)->display;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i8* @get_XConfigureRequestEvent_display(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = inttoptr i64 %6 to i8*
ret i8* %7
}

LLVM IR (-O2):
define i8* @get_XConfigureRequestEvent_display(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}
/* Variables and functions */
double tan(double const);
double _tangent(const int numInputs, const double *inputs,
                const double *connectionWeights) {
  return tan(inputs[0]);
}


x86 assembly (clang, -O0):
<_tangent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
call   1030 <tan@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_tangent>:
movsd  (%rsi),%xmm0
jmp    1030 <tan@plt>

LLVM IR (-O0):
define double @_tangent(i32 %0, double* %1, double* %2) {
%4 = alloca i32
%5 = alloca double*
%6 = alloca double*
store i32 %0, i32* %4
store double* %1, double** %5
store double* %2, double** %6
%7 = load double*, double** %5
%8 = getelementptr inbounds double, double* %7, i64 0
%9 = load double, double* %8
%10 = call double @tan(double %9)
ret double %10
}

LLVM IR (-O2):
define double @_tangent(i32 %0, double* nocapture %1, double* nocapture readnone %2) {
%4 = load double, double* %1
%5 = tail call double @tan(double %4)
ret double %5
}
/* Variables and functions */
char *next_token(const char *istream) { return NULL; }


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

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

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

LLVM IR (-O2):
define noalias i8* @next_token(i8* nocapture readnone %0) {
ret i8* null
}
void coop_array_copy_int_(int *x, int *y, int *n) {
  int i;
  for (i = 0; i < *n; i++)
    *(y + i) = *(x + i);
}


x86 assembly (clang, -O0):
<coop_array_copy_int_>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jge    114a <coop_array_copy_int_+0x4a>
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1117 <coop_array_copy_int_+0x17>
pop    %rbp
ret

x86 assembly (clang, -O2):
<coop_array_copy_int_>:
cmpl   $0x0,(%rdx)
jle    1122 <coop_array_copy_int_+0x22>
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
mov    (%rdi,%rax,4),%ecx
mov    %ecx,(%rsi,%rax,4)
add    $0x1,%rax
movslq (%rdx),%rcx
cmp    %rcx,%rax
jl     1110 <coop_array_copy_int_+0x10>
ret

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

LLVM IR (-O2):
define void @coop_array_copy_int_(i32* nocapture %0, i32* nocapture writeonly %1, i32* nocapture %2) {
%4 = load i32, i32* %2
%5 = icmp sgt i32 %4, 0
br i1 %5, label %6, label %15
6: ; preds = %3, %6
%7 = phi i64 [ %11, %6 ], [ 0, %3 ]
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = getelementptr inbounds i32, i32* %1, i64 %7
store i32 %9, i32* %10
%11 = add nuw nsw i64 %7, 1
%12 = load i32, i32* %2
%13 = sext i32 %12 to i64
%14 = icmp slt i64 %11, %13
br i1 %14, label %6, label %15
15: ; preds = %6, %3
ret void
}
int main() {
  int x;
  x = 0;
  while (x < 11) {
    x = x + 4;
  }
  return x;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xb,-0x8(%rbp)
jge    112a <main+0x2a>
mov    -0x8(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x8(%rbp)
jmp    1112 <main+0x12>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 12
}
void foo286() {}


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

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

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

LLVM IR (-O2):
define void @foo286() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ outop1str(char *);
void outdec() { outop1str("DEC"); }


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"DEC\00"
define void @outdec() {
%1 = call i32 @outop1str(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"DEC\00"
define void @outdec() {
%1 = tail call i32 @outop1str(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int func2(int, int);
int func(int arg) {
  int x = 16;
  int y = arg - x;
  int z = func2(x, y);
  return x + y + z;
}


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

x86 assembly (clang, -O2):
<func>:
push   %rbx
mov    %edi,%ebx
lea    -0x10(%rbx),%esi
mov    $0x10,%edi
call   1030 <func2@plt>
add    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @func(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %2
store i32 16, i32* %3
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = sub nsw i32 %6, %7
store i32 %8, i32* %4
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = call i32 @func2(i32 %9, i32 %10)
store i32 %11, i32* %5
%12 = load i32, i32* %3
%13 = load i32, i32* %4
%14 = add nsw i32 %12, %13
%15 = load i32, i32* %5
%16 = add nsw i32 %14, %15
ret i32 %16
}

LLVM IR (-O2):
define i32 @func(i32 %0) {
%2 = add nsw i32 %0, -16
%3 = tail call i32 @func2(i32 16, i32 %2)
%4 = add nsw i32 %3, %0
ret i32 %4
}
/* Variables and functions */
unsigned short crc16_byte(unsigned short, int /*<<< orphan*/);
unsigned short fio_crc16(const void *buffer, unsigned int len) {
  const unsigned char *cp = (const unsigned char *)buffer;
  unsigned short crc = 0;
  while (len--)
    crc = crc16_byte(crc, *cp++);
  return crc;
}


x86 assembly (clang, -O0):
<fio_crc16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
movw   $0x0,-0x1a(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0xc(%rbp)
cmp    $0x0,%eax
je     1168 <fio_crc16+0x58>
mov    -0x1a(%rbp),%ax
mov    -0x18(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
movzbl (%rcx),%esi
movzwl %ax,%edi
call   1030 <crc16_byte@plt>
mov    %ax,-0x1a(%rbp)
jmp    112d <fio_crc16+0x1d>
movzwl -0x1a(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fio_crc16>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
je     1148 <fio_crc16+0x38>
mov    %rdi,%r14
mov    %esi,%r15d
xor    %ebx,%ebx
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movzbl (%r14,%rbx,1),%esi
movzwl %ax,%edi
call   1030 <crc16_byte@plt>
add    $0x1,%rbx
cmp    %ebx,%r15d
jne    1130 <fio_crc16+0x20>
jmp    114a <fio_crc16+0x3a>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define zeroext i16 @fio_crc16(i8* nocapture %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %14, label %4
4: ; preds = %2, %4
%5 = phi i16 [ %12, %4 ], [ 0, %2 ]
%6 = phi i8* [ %9, %4 ], [ %0, %2 ]
%7 = phi i32 [ %8, %4 ], [ %1, %2 ]
%8 = add i32 %7, -1
%9 = getelementptr inbounds i8, i8* %6, i64 1
%10 = load i8, i8* %6
%11 = zext i8 %10 to i32
%12 = tail call zeroext i16 @crc16_byte(i16 zeroext %5, i32 %11)
%13 = icmp eq i32 %8, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %2
%15 = phi i16 [ 0, %2 ], [ %12, %4 ]
ret i16 %15
}
int absInt(int x) { return x > 0 ? x : -x; }


x86 assembly (clang, -O0):
<absInt>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    111c <absInt+0x1c>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1124 <absInt+0x24>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @absInt(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = load i32, i32* %2
br label %10
7: ; preds = %1
%8 = load i32, i32* %2
%9 = sub nsw i32 0, %8
br label %10
10: ; preds = %7, %5
%11 = phi i32 [ %6, %5 ], [ %9, %7 ]
ret i32 %11
}

LLVM IR (-O2):
define i32 @absInt(i32 %0) {
%2 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int i;
  while (i <= 10) {
    i++;
    if (i == 5)
      continue;
    printf("looping %d \n", i);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0xa,-0x8(%rbp)
jg     1155 <main+0x45>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jne    1141 <main+0x31>
jmp    111f <main+0xf>
mov    -0x8(%rbp),%esi
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
jmp    111f <main+0xf>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [13 x i8] c"looping %d \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
br label %3
3: ; preds = %12, %11, %0
%4 = load i32, i32* %2
%5 = icmp sle i32 %4, 10
br i1 %5, label %6, label %15
6: ; preds = %3
%7 = load i32, i32* %2
%8 = add nsw i32 %7, 1
store i32 %8, i32* %2
%9 = load i32, i32* %2
%10 = icmp eq i32 %9, 5
br i1 %10, label %11, label %12
11: ; preds = %6
br label %3
12: ; preds = %6
%13 = load i32, i32* %2
%14 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %13)
br label %3
15: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int fat32_rd16(int /*<<< orphan*/ const *);
bool fat32_check_sig(const void *b, unsigned sector_size) {
  return fat32_rd16((const uint8_t *)b + sector_size - 2) == 0xaa55;
}


x86 assembly (clang, -O0):
<fat32_check_sig>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%eax
shl    $0x2,%rax
add    %rax,%rdi
add    $0xfffffffffffffff8,%rdi
call   1030 <fat32_rd16@plt>
cmp    $0xaa55,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fat32_check_sig>:
push   %rax
mov    %esi,%eax
lea    (%rdi,%rax,4),%rdi
add    $0xfffffffffffffff8,%rdi
call   1030 <fat32_rd16@plt>
xor    %ecx,%ecx
cmp    $0xaa55,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @fat32_check_sig(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i32*
%7 = load i32, i32* %4
%8 = zext i32 %7 to i64
%9 = getelementptr inbounds i32, i32* %6, i64 %8
%10 = getelementptr inbounds i32, i32* %9, i64 -2
%11 = call i32 @fat32_rd16(i32* %10)
%12 = icmp eq i32 %11, 43605
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @fat32_check_sig(i8* %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
%4 = zext i32 %1 to i64
%5 = getelementptr inbounds i32, i32* %3, i64 %4
%6 = getelementptr inbounds i32, i32* %5, i64 -2
%7 = tail call i32 @fat32_rd16(i32* %6)
%8 = icmp eq i32 %7, 43605
%9 = zext i1 %8 to i32
ret i32 %9
}
double C_Utils_min_double(const double item1, const double item2) {
  return item1 > item2 ? item1 : item2;
}


x86 assembly (clang, -O0):
<C_Utils_min_double>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    112d <C_Utils_min_double+0x2d>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1137 <C_Utils_min_double+0x37>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<C_Utils_min_double>:
maxsd  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define double @C_Utils_min_double(double %0, double %1) {
%3 = fcmp ogt double %0, %1
%4 = select i1 %3, double %0, double %1
ret double %4
}
/* Variables and functions */
char *sendMsg(char const *, char *);
char *browseFromPoint(const char *point) {
  return sendMsg(point, "{\"type\":\"browse\",\"point\":\"%s\"}");
}


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

x86 assembly (clang, -O2):
<browseFromPoint>:
lea    0xee9(%rip),%rsi
jmp    1030 <sendMsg@plt>

LLVM IR (-O0):
@.str = [31 x i8] c"{\22type\22:\22browse\22,\22point\22:\22%s\22}\00"
define i8* @browseFromPoint(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* @sendMsg(i8* %3, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
ret i8* %4
}

LLVM IR (-O2):
@.str = [31 x i8] c"{\22type\22:\22browse\22,\22point\22:\22%s\22}\00"
define i8* @browseFromPoint(i8* %0) {
%2 = tail call i8* @sendMsg(i8* %0, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
ret i8* %2
}
int main() {
  int i = 0;
  while (1)
    i++;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    %eax,-0x8(%rbp)
jmp    1112 <main+0x12>

x86 assembly (clang, -O2):
<main>:
jmp    1100 <main>

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

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %1, %0
br label %1
}
void _infix_operator_mult_u8_u8(unsigned char lhs, unsigned char rhs,
                                unsigned char *__rval_1) {
  *__rval_1 = lhs * rhs;
}


x86 assembly (clang, -O0):
<_infix_operator_mult_u8_u8>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
mov    %rdx,-0x10(%rbp)
movzbl -0x1(%rbp),%eax
movzbl -0x2(%rbp),%ecx
imul   %ecx,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<_infix_operator_mult_u8_u8>:
mov    %esi,%eax
mul    %dil
mov    %al,(%rdx)
ret

LLVM IR (-O0):
define void @_infix_operator_mult_u8_u8(i8 zeroext %0, i8 zeroext %1, i8* %2) {
%4 = alloca i8
%5 = alloca i8
%6 = alloca i8*
store i8 %0, i8* %4
store i8 %1, i8* %5
store i8* %2, i8** %6
%7 = load i8, i8* %4
%8 = zext i8 %7 to i32
%9 = load i8, i8* %5
%10 = zext i8 %9 to i32
%11 = mul nsw i32 %8, %10
%12 = trunc i32 %11 to i8
%13 = load i8*, i8** %6
store i8 %12, i8* %13
ret void
}

LLVM IR (-O2):
define void @_infix_operator_mult_u8_u8(i8 zeroext %0, i8 zeroext %1, i8* nocapture writeonly %2) {
%4 = mul i8 %1, %0
store i8 %4, i8* %2
ret void
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_size;
};
typedef int /*<<< orphan*/ off_t;

/* Variables and functions */
scalar_t__ fstat(int, struct stat *);
int get_size(int fd, off_t *size) {
  struct stat s;
  if (fstat(fd, &s) < 0) {
    return -1;
  }
  *size = s.st_size;
  return 0;
}


x86 assembly (clang, -O0):
<get_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
lea    -0x18(%rbp),%rsi
call   1030 <fstat@plt>
cmp    $0x0,%rax
jge    1141 <get_size+0x31>
movl   $0xffffffff,-0x4(%rbp)
jmp    1151 <get_size+0x41>
mov    -0x18(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_size>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
lea    0x8(%rsp),%rsi
call   1030 <fstat@plt>
test   %rax,%rax
js     1131 <get_size+0x21>
mov    0x8(%rsp),%eax
mov    %eax,(%rbx)
xor    %eax,%eax
jmp    1136 <get_size+0x26>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @get_size(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32*
%6 = alloca %struct.stat
store i32 %0, i32* %4
store i32* %1, i32** %5
%7 = load i32, i32* %4
%8 = call i64 @fstat(i32 %7, %struct.stat* %6)
%9 = icmp slt i64 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %2
store i32 -1, i32* %3
br label %15
11: ; preds = %2
%12 = getelementptr inbounds %struct.stat, %struct.stat* %6, i32 0, i32 0
%13 = load i32, i32* %12
%14 = load i32*, i32** %5
store i32 %13, i32* %14
store i32 0, i32* %3
br label %15
15: ; preds = %11, %10
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @get_size(i32 %0, i32* nocapture writeonly %1) {
%3 = alloca %struct.stat
%4 = bitcast %struct.stat* %3 to i8*
%5 = call i64 @fstat(i32 %0, %struct.stat* %3)
%6 = icmp slt i64 %5, 0
br i1 %6, label %10, label %7
7: ; preds = %2
%8 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 0
%9 = load i32, i32* %8
store i32 %9, i32* %1
br label %10
10: ; preds = %2, %7
%11 = phi i32 [ 0, %7 ], [ -1, %2 ]
ret i32 %11
}
int test_imm_BFint16_mem(short *val) {
  return ((*val) & (0xBF << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_BFint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 191
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, int);
void tgl_free_release(void *ptr, int size) {
  memset(ptr, 0, size);
  free(ptr);
}


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

x86 assembly (clang, -O2):
<tgl_free_release>:
push   %rbx
mov    %esi,%edx
mov    %rdi,%rbx
xor    %esi,%esi
call   1040 <memset@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @tgl_free_release(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i32 @memset(i8* %5, i32 0, i32 %6)
%8 = load i8*, i8** %3
%9 = call i32 @free(i8* %8)
ret void
}

LLVM IR (-O2):
define void @tgl_free_release(i8* %0, i32 %1) {
%3 = tail call i32 @memset(i8* %0, i32 0, i32 %1)
%4 = tail call i32 @free(i8* %0)
ret void
}
int NeedBitrate() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @NeedBitrate() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ print(char *);
int /*<<< orphan*/ test_return_address();
void testmain() {
  print("builtin");
  test_return_address();
}


x86 assembly (clang, -O0):
<testmain>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <print@plt>
mov    $0x0,%al
call   1030 <test_return_address@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<testmain>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <print@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <test_return_address@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"builtin\00"
define void @testmain() {
%1 = call i32 @print(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @test_return_address()
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"builtin\00"
define void @testmain() {
%1 = tail call i32 @print(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @test_return_address()
ret void
}
void push_literal() {}


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

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

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

LLVM IR (-O2):
define void @push_literal() {
ret void
}
int test_imm_1Duint32_mem(unsigned int *val) {
  return ((*val) & (0x1D << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_1Duint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 29
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void RTErrInfoFree(void) {}


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

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

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

LLVM IR (-O2):
define void @RTErrInfoFree() {
ret void
}
/* Type definitions */
typedef int uint32_t;
struct in6_addr {
  int *s6_addr32;
};

/* Variables and functions */
uint32_t hashFunction6(const struct in6_addr input, uint32_t tableSize) {
  return ((uint32_t)(input.s6_addr32[0] + input.s6_addr32[1] +
                     input.s6_addr32[2] + input.s6_addr32[3] * 2654435761) %
          tableSize);
}


x86 assembly (clang, -O0):
<hashFunction6>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    -0x8(%rbp),%rcx
add    0x4(%rcx),%eax
mov    -0x8(%rbp),%rcx
add    0x8(%rcx),%eax
cltq
mov    -0x8(%rbp),%rcx
movslq 0xc(%rcx),%rcx
movabs $0x9e3779b1,%rdx
imul   %rdx,%rcx
add    %rcx,%rax
cltd
idivl  -0xc(%rbp)
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hashFunction6>:
mov    0x4(%rdi),%ecx
add    (%rdi),%ecx
add    0x8(%rdi),%ecx
imul   $0x9e3779b1,0xc(%rdi),%eax
add    %ecx,%eax
cltd
idiv   %esi
mov    %edx,%eax
ret

LLVM IR (-O0):
%struct.in6_addr = type { i32* }
define i32 @hashFunction6(i32* %0, i32 %1) {
%3 = alloca %struct.in6_addr
%4 = alloca i32
%5 = getelementptr inbounds %struct.in6_addr, %struct.in6_addr* %3, i32 0, i32 0
store i32* %0, i32** %5
store i32 %1, i32* %4
%6 = getelementptr inbounds %struct.in6_addr, %struct.in6_addr* %3, i32 0, i32 0
%7 = load i32*, i32** %6
%8 = getelementptr inbounds i32, i32* %7, i64 0
%9 = load i32, i32* %8
%10 = getelementptr inbounds %struct.in6_addr, %struct.in6_addr* %3, i32 0, i32 0
%11 = load i32*, i32** %10
%12 = getelementptr inbounds i32, i32* %11, i64 1
%13 = load i32, i32* %12
%14 = add nsw i32 %9, %13
%15 = getelementptr inbounds %struct.in6_addr, %struct.in6_addr* %3, i32 0, i32 0
%16 = load i32*, i32** %15
%17 = getelementptr inbounds i32, i32* %16, i64 2
%18 = load i32, i32* %17
%19 = add nsw i32 %14, %18
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds %struct.in6_addr, %struct.in6_addr* %3, i32 0, i32 0
%22 = load i32*, i32** %21
%23 = getelementptr inbounds i32, i32* %22, i64 3
%24 = load i32, i32* %23
%25 = sext i32 %24 to i64
%26 = mul nsw i64 %25, 2654435761
%27 = add nsw i64 %20, %26
%28 = trunc i64 %27 to i32
%29 = load i32, i32* %4
%30 = srem i32 %28, %29
ret i32 %30
}

LLVM IR (-O2):
define i32 @hashFunction6(i32* nocapture %0, i32 %1) {
%3 = load i32, i32* %0
%4 = getelementptr inbounds i32, i32* %0, i64 1
%5 = load i32, i32* %4
%6 = add nsw i32 %5, %3
%7 = getelementptr inbounds i32, i32* %0, i64 2
%8 = load i32, i32* %7
%9 = add nsw i32 %6, %8
%10 = getelementptr inbounds i32, i32* %0, i64 3
%11 = load i32, i32* %10
%12 = mul i32 %11, -1640531535
%13 = add i32 %9, %12
%14 = srem i32 %13, %1
ret i32 %14
}
int ld_gt_mm1(long double *a1, long double *a2) { return (((*a1) > (*a2))); }


x86 assembly (clang, -O0):
<ld_gt_mm1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
fldt   (%rax)
mov    -0x10(%rbp),%rax
fldt   (%rax)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
seta   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ld_gt_mm1>:
fldt   (%rdi)
fldt   (%rsi)
xor    %eax,%eax
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
seta   %al
ret

LLVM IR (-O0):
define i32 @ld_gt_mm1(x86_fp80* %0, x86_fp80* %1) {
%3 = alloca x86_fp80*
%4 = alloca x86_fp80*
store x86_fp80* %0, x86_fp80** %3
store x86_fp80* %1, x86_fp80** %4
%5 = load x86_fp80*, x86_fp80** %3
%6 = load x86_fp80, x86_fp80* %5
%7 = load x86_fp80*, x86_fp80** %4
%8 = load x86_fp80, x86_fp80* %7
%9 = fcmp ogt x86_fp80 %6, %8
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @ld_gt_mm1(x86_fp80* nocapture %0, x86_fp80* nocapture %1) {
%3 = load x86_fp80, x86_fp80* %0
%4 = load x86_fp80, x86_fp80* %1
%5 = fcmp ogt x86_fp80 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
int unlockpt(int fildes) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @unlockpt(i32 %0) {
ret i32 0
}
/* Type definitions */
struct imgdst {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct imgdst *);
void fiodst_free(struct imgdst *img) {
  if (!img) {
    return;
  }
  free(img);
}


x86 assembly (clang, -O0):
<fiodst_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    112c <fiodst_free+0x1c>
jmp    1135 <fiodst_free+0x25>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fiodst_free>:
test   %rdi,%rdi
je     111a <fiodst_free+0xa>
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
%struct.imgdst = type { i32 }
define void @fiodst_free(%struct.imgdst* %0) {
%2 = alloca %struct.imgdst*
store %struct.imgdst* %0, %struct.imgdst** %2
%3 = load %struct.imgdst*, %struct.imgdst** %2
%4 = icmp ne %struct.imgdst* %3, null
br i1 %4, label %6, label %5
5: ; preds = %1
br label %9
6: ; preds = %1
%7 = load %struct.imgdst*, %struct.imgdst** %2
%8 = call i32 @free(%struct.imgdst* %7)
br label %9
9: ; preds = %6, %5
ret void
}

LLVM IR (-O2):
%struct.imgdst = type { i32 }
define void @fiodst_free(%struct.imgdst* %0) {
%2 = icmp eq %struct.imgdst* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(%struct.imgdst* %0)
br label %5
5: ; preds = %1, %3
ret void
}
main() { char(*p)[] = &"hello"; }


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"hello\00"
define i32 @main() {
%1 = alloca [0 x i8]*
store [0 x i8]* bitcast ([6 x i8]* @.str to [0 x i8]*), [0 x i8]** %1
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
char *cat(char *, char *);
void mk_in_name(char *to, char *part1, char *part2) {
  cat(cat(cat(to, part1), "In"), part2);
}


x86 assembly (clang, -O0):
<mk_in_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <cat@plt>
mov    %rax,%rdi
lea    0xec5(%rip),%rsi
call   1030 <cat@plt>
mov    %rax,%rdi
mov    -0x18(%rbp),%rsi
call   1030 <cat@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mk_in_name>:
push   %rbx
mov    %rdx,%rbx
call   1030 <cat@plt>
lea    0xee0(%rip),%rsi
mov    %rax,%rdi
call   1030 <cat@plt>
mov    %rax,%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <cat@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"In\00"
define void @mk_in_name(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = call i8* @cat(i8* %7, i8* %8)
%10 = call i8* @cat(i8* %9, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%11 = load i8*, i8** %6
%12 = call i8* @cat(i8* %10, i8* %11)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"In\00"
define void @mk_in_name(i8* %0, i8* %1, i8* %2) {
%4 = tail call i8* @cat(i8* %0, i8* %1)
%5 = tail call i8* @cat(i8* %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%6 = tail call i8* @cat(i8* %5, i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int D1730;
  int D1731;
  int D1732;
  int D1733;
  int D1734;
  int a;
  int b;
  int c;
  int d;
  int eval;
  a = 0;
  b = 10;
  c = 20;
  d = 40;
  D1730 = b / a;
  D1731 = D1730 + a;
  D1732 = d * 2;
  eval = D1731 + D1732;
  D1733 = c * d;
  eval = D1733 + eval;
  printf("%d", eval);
  D1734 = 0;
  return D1734;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0xa,-0x20(%rbp)
movl   $0x14,-0x24(%rbp)
movl   $0x28,-0x28(%rbp)
mov    -0x20(%rbp),%eax
cltd
idivl  -0x1c(%rbp)
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    -0x1c(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x28(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x24(%rbp),%eax
imul   -0x28(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    -0x2c(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%esi
lea    0xe83(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %7
store i32 10, i32* %8
store i32 20, i32* %9
store i32 40, i32* %10
%12 = load i32, i32* %8
%13 = load i32, i32* %7
%14 = sdiv i32 %12, %13
store i32 %14, i32* %2
%15 = load i32, i32* %2
%16 = load i32, i32* %7
%17 = add nsw i32 %15, %16
store i32 %17, i32* %3
%18 = load i32, i32* %10
%19 = mul nsw i32 %18, 2
store i32 %19, i32* %4
%20 = load i32, i32* %3
%21 = load i32, i32* %4
%22 = add nsw i32 %20, %21
store i32 %22, i32* %11
%23 = load i32, i32* %9
%24 = load i32, i32* %10
%25 = mul nsw i32 %23, %24
store i32 %25, i32* %5
%26 = load i32, i32* %5
%27 = load i32, i32* %11
%28 = add nsw i32 %26, %27
store i32 %28, i32* %11
%29 = load i32, i32* %11
%30 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %29)
store i32 0, i32* %6
%31 = load i32, i32* %6
ret i32 %31
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 poison)
ret i32 0
}
int main(void) { return (__builtin_ctzll(0x100000000LL) == 32) ? 1 : 0; }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ __slibc_explicit_memset(void *, int /*<<< orphan*/, size_t);
void explicit_bzero(void *segment, size_t size) {
  __slibc_explicit_memset(segment, ~0, size);
  __slibc_explicit_memset(segment, 0, size);
}


x86 assembly (clang, -O0):
<explicit_bzero>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    $0xffffffff,%esi
call   1030 <__slibc_explicit_memset@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
xor    %esi,%esi
call   1030 <__slibc_explicit_memset@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<explicit_bzero>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    $0xffffffff,%esi
mov    %r14,%rdx
call   1030 <__slibc_explicit_memset@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <__slibc_explicit_memset@plt>

LLVM IR (-O0):
define void @explicit_bzero(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = load i64, i64* %4
%7 = call i32 @__slibc_explicit_memset(i8* %5, i32 -1, i64 %6)
%8 = load i8*, i8** %3
%9 = load i64, i64* %4
%10 = call i32 @__slibc_explicit_memset(i8* %8, i32 0, i64 %9)
ret void
}

LLVM IR (-O2):
define void @explicit_bzero(i8* %0, i64 %1) {
%3 = tail call i32 @__slibc_explicit_memset(i8* %0, i32 -1, i64 %1)
%4 = tail call i32 @__slibc_explicit_memset(i8* %0, i32 0, i64 %1)
ret void
}
void RGB24ToARGBRow_SSSE3() {}


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

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

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

LLVM IR (-O2):
define void @RGB24ToARGBRow_SSSE3() {
ret void
}
const char *char_in_str(const char ch, const char *str) {
  for (; *str; str++) {
    if (*str == ch)
      return str;
  }
  return 0;
}


x86 assembly (clang, -O0):
<char_in_str>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x9(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
je     1151 <char_in_str+0x51>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
movsbl -0x9(%rbp),%ecx
cmp    %ecx,%eax
jne    113b <char_in_str+0x3b>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1159 <char_in_str+0x59>
jmp    1140 <char_in_str+0x40>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    110e <char_in_str+0xe>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<char_in_str>:
mov    (%rsi),%cl
test   %cl,%cl
je     1121 <char_in_str+0x21>
mov    %rsi,%rax
nopl   0x0(%rax)
cmp    %dil,%cl
je     1123 <char_in_str+0x23>
movzbl 0x1(%rax),%ecx
add    $0x1,%rax
test   %cl,%cl
jne    1110 <char_in_str+0x10>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i8* @char_in_str(i8 signext %0, i8* %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %2, %9
%6 = phi i8 [ %11, %9 ], [ %3, %2 ]
%7 = phi i8* [ %10, %9 ], [ %1, %2 ]
%8 = icmp eq i8 %6, %0
br i1 %8, label %13, label %9
9: ; preds = %5
%10 = getelementptr inbounds i8, i8* %7, i64 1
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5, %9, %2
%14 = phi i8* [ null, %2 ], [ null, %9 ], [ %7, %5 ]
ret i8* %14
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Hellow world\n");
  printf("newly added\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"Hellow world\0A\00"
@.str.1 = [13 x i8] c"newly added\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [13 x i8] c"Hellow world\00"
@str.2 = [12 x i8] c"newly added\00"
define i32 @main() {
%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 ([12 x i8], [12 x i8]* @str.2, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ SetMotor(int, int);
int /*<<< orphan*/ SetMotors(int);
int /*<<< orphan*/ SetTime(int);
int flicker(int seq) {
  SetMotors(-1);
  if (seq > 2)
    SetTime(200);
  else
    SetTime(20);
  seq %= 3;
  SetMotor(seq, 80);
  return 1;
}


x86 assembly (clang, -O0):
<flicker>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0xffffffff,%edi
call   1030 <SetMotors@plt>
cmpl   $0x2,-0x4(%rbp)
jle    115e <flicker+0x2e>
mov    $0xc8,%edi
call   1050 <SetTime@plt>
jmp    1168 <flicker+0x38>
mov    $0x14,%edi
call   1050 <SetTime@plt>
mov    -0x4(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %edx,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x50,%esi
call   1040 <SetMotor@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<flicker>:
push   %rbx
mov    %edi,%ebx
mov    $0xffffffff,%edi
call   1030 <SetMotors@plt>
cmp    $0x3,%ebx
mov    $0xc8,%eax
mov    $0x14,%edi
cmovge %eax,%edi
call   1050 <SetTime@plt>
movslq %ebx,%rdi
imul   $0x55555556,%rdi,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
shr    $0x20,%rax
add    %ecx,%eax
lea    (%rax,%rax,2),%eax
sub    %eax,%edi
mov    $0x50,%esi
call   1040 <SetMotor@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @flicker(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @SetMotors(i32 -1)
%4 = load i32, i32* %2
%5 = icmp sgt i32 %4, 2
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @SetTime(i32 200)
br label %10
8: ; preds = %1
%9 = call i32 @SetTime(i32 20)
br label %10
10: ; preds = %8, %6
%11 = load i32, i32* %2
%12 = srem i32 %11, 3
store i32 %12, i32* %2
%13 = load i32, i32* %2
%14 = call i32 @SetMotor(i32 %13, i32 80)
ret i32 1
}

LLVM IR (-O2):
define i32 @flicker(i32 %0) {
%2 = tail call i32 @SetMotors(i32 -1)
%3 = icmp sgt i32 %0, 2
%4 = select i1 %3, i32 200, i32 20
%5 = tail call i32 @SetTime(i32 %4)
%6 = srem i32 %0, 3
%7 = tail call i32 @SetMotor(i32 %6, i32 80)
ret i32 1
}
unsigned long long
nlm_crypto_form_pkt_desc2(unsigned int ivoff, unsigned int cipherbit_cnt,
                          unsigned int cipheroff, unsigned int hashbit_cnt,
                          unsigned int hashclobber, unsigned int hashoff) {
  return ((unsigned long long)(ivoff) << (45)) |
         ((unsigned long long)(cipherbit_cnt) << (42)) |
         ((unsigned long long)(cipheroff) << (22)) |
         ((unsigned long long)(hashbit_cnt) << (19)) |
         ((unsigned long long)(hashclobber) << (18)) |
         ((unsigned long long)(hashoff) << (0));
}


x86 assembly (clang, -O0):
<nlm_crypto_form_pkt_desc2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x2d,%rax
mov    -0x8(%rbp),%ecx
shl    $0x2a,%rcx
or     %rcx,%rax
mov    -0xc(%rbp),%ecx
shl    $0x16,%rcx
or     %rcx,%rax
mov    -0x10(%rbp),%ecx
shl    $0x13,%rcx
or     %rcx,%rax
mov    -0x14(%rbp),%ecx
shl    $0x12,%rcx
or     %rcx,%rax
mov    -0x18(%rbp),%ecx
shl    $0x0,%rcx
or     %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nlm_crypto_form_pkt_desc2>:
shl    $0x2d,%rdi
shl    $0x2a,%rsi
or     %rdi,%rsi
mov    %edx,%eax
shl    $0x16,%rax
or     %rsi,%rax
mov    %ecx,%ecx
shl    $0x13,%rcx
mov    %r8d,%edx
shl    $0x12,%rdx
or     %rcx,%rdx
or     %rax,%rdx
mov    %r9d,%eax
or     %rdx,%rax
ret

LLVM IR (-O0):
define i64 @nlm_crypto_form_pkt_desc2(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
store i32 %0, i32* %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%13 = load i32, i32* %7
%14 = zext i32 %13 to i64
%15 = shl i64 %14, 45
%16 = load i32, i32* %8
%17 = zext i32 %16 to i64
%18 = shl i64 %17, 42
%19 = or i64 %15, %18
%20 = load i32, i32* %9
%21 = zext i32 %20 to i64
%22 = shl i64 %21, 22
%23 = or i64 %19, %22
%24 = load i32, i32* %10
%25 = zext i32 %24 to i64
%26 = shl i64 %25, 19
%27 = or i64 %23, %26
%28 = load i32, i32* %11
%29 = zext i32 %28 to i64
%30 = shl i64 %29, 18
%31 = or i64 %27, %30
%32 = load i32, i32* %12
%33 = zext i32 %32 to i64
%34 = shl i64 %33, 0
%35 = or i64 %31, %34
ret i64 %35
}

LLVM IR (-O2):
define i64 @nlm_crypto_form_pkt_desc2(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = zext i32 %0 to i64
%8 = shl i64 %7, 45
%9 = zext i32 %1 to i64
%10 = shl i64 %9, 42
%11 = or i64 %10, %8
%12 = zext i32 %2 to i64
%13 = shl nuw nsw i64 %12, 22
%14 = or i64 %11, %13
%15 = zext i32 %3 to i64
%16 = shl nuw nsw i64 %15, 19
%17 = or i64 %14, %16
%18 = zext i32 %4 to i64
%19 = shl nuw nsw i64 %18, 18
%20 = or i64 %17, %19
%21 = zext i32 %5 to i64
%22 = or i64 %20, %21
ret i64 %22
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_format_info_set_rate() {
  printf("NOT IMPLEMENTED:"
         "pa_format_info_set_rate"
         "\n");
}


x86 assembly (clang, -O0):
<pa_format_info_set_rate>:
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_format_info_set_rate>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

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

LLVM IR (-O2):
@str = [40 x i8] c"NOT IMPLEMENTED:pa_format_info_set_rate\00"
define i32 @pa_format_info_set_rate() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
int f(int a, int b) {
  if (a == 0)
    return 0;
  if (a != b)
    return a;
  return a;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1120 <f+0x20>
movl   $0x0,-0x4(%rbp)
jmp    113d <f+0x3d>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
je     1137 <f+0x37>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    113d <f+0x3d>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @f(i32 %0, i32 %1) {
ret i32 %0
}