xunge/DecIR huggingface dataset:
int less_vec(int *a1, int *a2, int length) {
  int i;
  for (i = 0; i < length; i++) {
    if (a1[i] > a2[i])
      return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<less_vec>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    115d <less_vec+0x5d>
mov    -0x10(%rbp),%rax
movslq -0x20(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    -0x18(%rbp),%rcx
movslq -0x20(%rbp),%rdx
cmp    (%rcx,%rdx,4),%eax
jle    114a <less_vec+0x4a>
movl   $0x0,-0x4(%rbp)
jmp    1164 <less_vec+0x64>
jmp    114f <less_vec+0x4f>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1116 <less_vec+0x16>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<less_vec>:
mov    $0x1,%eax
test   %edx,%edx
jle    1121 <less_vec+0x21>
mov    %edx,%r8d
xor    %edx,%edx
xchg   %ax,%ax
mov    (%rdi,%rdx,4),%ecx
cmp    (%rsi,%rdx,4),%ecx
jg     1122 <less_vec+0x22>
add    $0x1,%rdx
cmp    %rdx,%r8
jne    1110 <less_vec+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @less_vec(i32* nocapture %0, i32* nocapture %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %17
5: ; preds = %3
%6 = zext i32 %2 to i64
br label %9
7: ; preds = %9
%8 = icmp eq i64 %16, %6
br i1 %8, label %17, label %9
9: ; preds = %5, %7
%10 = phi i64 [ 0, %5 ], [ %16, %7 ]
%11 = getelementptr inbounds i32, i32* %0, i64 %10
%12 = load i32, i32* %11
%13 = getelementptr inbounds i32, i32* %1, i64 %10
%14 = load i32, i32* %13
%15 = icmp sgt i32 %12, %14
%16 = add nuw nsw i64 %10, 1
br i1 %15, label %17, label %7
17: ; preds = %9, %7, %3
%18 = phi i32 [ 1, %3 ], [ 1, %7 ], [ 0, %9 ]
ret i32 %18
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void USBEndpointDMAChannel(uint32_t ui32Base, uint32_t ui32Endpoint,
                           uint32_t ui32Channel) {
  uint32_t ui32Mask;
  ;

  ;
  ;
  ui32Mask = 0xf << (ui32Channel * 4);
  ui32Mask =
      (*((volatile unsigned long *)(ui32Base + 0x00000450))) & (~ui32Mask);
  ui32Mask |= (((ui32Endpoint) >> 4)) << (ui32Channel * 4);
  (*((volatile unsigned long *)(ui32Base + 0x00000450))) = ui32Mask;
}


x86 assembly (clang, -O0):
<USBEndpointDMAChannel>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
shl    $0x2,%ecx
mov    $0xf,%eax
shl    %cl,%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
add    $0x450,%eax
cltq
mov    (%rax),%rax
mov    -0x10(%rbp),%ecx
xor    $0xffffffff,%ecx
movslq %ecx,%rcx
and    %rcx,%rax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
sar    $0x4,%eax
mov    -0xc(%rbp),%ecx
shl    $0x2,%ecx
shl    %cl,%eax
or     -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
movslq -0x10(%rbp),%rcx
mov    -0x4(%rbp),%eax
add    $0x450,%eax
cltq
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<USBEndpointDMAChannel>:
lea    0x0(,%rdx,4),%ecx
mov    $0xf,%eax
shl    %cl,%eax
movslq %edi,%rdx
mov    0x450(%rdx),%rdi
not    %eax
sar    $0x4,%esi
shl    %cl,%esi
and    %eax,%edi
or     %edi,%esi
movslq %esi,%rax
mov    %rax,0x450(%rdx)
ret

LLVM IR (-O0):
define void @USBEndpointDMAChannel(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
%8 = load i32, i32* %6
%9 = mul nsw i32 %8, 4
%10 = shl i32 15, %9
store i32 %10, i32* %7
%11 = load i32, i32* %4
%12 = add nsw i32 %11, 1104
%13 = sext i32 %12 to i64
%14 = inttoptr i64 %13 to i64*
%15 = load volatile i64, i64* %14
%16 = load i32, i32* %7
%17 = xor i32 %16, -1
%18 = sext i32 %17 to i64
%19 = and i64 %15, %18
%20 = trunc i64 %19 to i32
store i32 %20, i32* %7
%21 = load i32, i32* %5
%22 = ashr i32 %21, 4
%23 = load i32, i32* %6
%24 = mul nsw i32 %23, 4
%25 = shl i32 %22, %24
%26 = load i32, i32* %7
%27 = or i32 %26, %25
store i32 %27, i32* %7
%28 = load i32, i32* %7
%29 = sext i32 %28 to i64
%30 = load i32, i32* %4
%31 = add nsw i32 %30, 1104
%32 = sext i32 %31 to i64
%33 = inttoptr i64 %32 to i64*
store volatile i64 %29, i64* %33
ret void
}

LLVM IR (-O2):
define void @USBEndpointDMAChannel(i32 %0, i32 %1, i32 %2) {
%4 = shl nsw i32 %2, 2
%5 = shl i32 15, %4
%6 = add nsw i32 %0, 1104
%7 = sext i32 %6 to i64
%8 = inttoptr i64 %7 to i64*
%9 = load volatile i64, i64* %8
%10 = xor i32 %5, -1
%11 = trunc i64 %9 to i32
%12 = and i32 %11, %10
%13 = ashr i32 %1, 4
%14 = shl i32 %13, %4
%15 = or i32 %12, %14
%16 = sext i32 %15 to i64
store volatile i64 %16, i64* %8
ret void
}
int main(int argc, char *argv[]) {
  float x[argc];
  float y[argc];
  return 0 == __builtin_memcpy(y, x, argc * sizeof(*x));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x18(%rbp)
lea    0xf(,%rax,4),%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rsi
sub    %rcx,%rsi
mov    %rsi,%rsp
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%eax
lea    0xf(,%rax,4),%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,%rsp
mov    %rax,-0x28(%rbp)
mov    %rdi,-0x30(%rbp)
movslq -0x8(%rbp),%rdx
shl    $0x2,%rdx
call   1030 <memcpy@plt>
mov    -0x30(%rbp),%rcx
xor    %eax,%eax
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = load i32, i32* %4
%10 = zext i32 %9 to i64
%11 = call i8* @llvm.stacksave()
store i8* %11, i8** %6
%12 = alloca float, i64 %10
store i64 %10, i64* %7
%13 = load i32, i32* %4
%14 = zext i32 %13 to i64
%15 = alloca float, i64 %14
store i64 %14, i64* %8
%16 = bitcast float* %15 to i8*
%17 = bitcast float* %12 to i8*
%18 = load i32, i32* %4
%19 = sext i32 %18 to i64
%20 = mul i64 %19, 4
%21 = icmp eq i8* null, %16
%22 = zext i1 %21 to i32
store i32 %22, i32* %3
%23 = load i8*, i8** %6
%24 = load i32, i32* %3
ret i32 %24
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
/* Type definitions */
struct error {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ diag_get();
struct error *diag_last_error(int /*<<< orphan*/);
int /*<<< orphan*/ error_raise(struct error *);
void diag_raise(void) {
  struct error *e = diag_last_error(diag_get());
  if (e)
    error_raise(e);
}


x86 assembly (clang, -O0):
<diag_raise>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <diag_get@plt>
mov    %eax,%edi
call   1030 <diag_last_error@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     115e <diag_raise+0x2e>
mov    -0x8(%rbp),%rdi
call   1040 <error_raise@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<diag_raise>:
push   %rax
xor    %eax,%eax
call   1050 <diag_get@plt>
mov    %eax,%edi
call   1030 <diag_last_error@plt>
test   %rax,%rax
je     114d <diag_raise+0x1d>
mov    %rax,%rdi
pop    %rax
jmp    1040 <error_raise@plt>
pop    %rax
ret

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

LLVM IR (-O2):
%struct.error = type { i32 }
define void @diag_raise() {
%1 = tail call i32 (...) @diag_get()
%2 = tail call %struct.error* @diag_last_error(i32 %1)
%3 = icmp eq %struct.error* %2, null
br i1 %3, label %6, label %4
4: ; preds = %0
%5 = tail call i32 @error_raise(%struct.error* %2)
br label %6
6: ; preds = %4, %0
ret void
}
int check_error4(char *input, int *error) {
  int count = 0, i;
  for (i = 0; i < 5; i++) {
    if (error[i] == 1)
      count++;
  }
  if (count > 1)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<check_error4>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
cmpl   $0x5,-0x20(%rbp)
jge    1152 <check_error4+0x52>
mov    -0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
cmpl   $0x1,(%rax,%rcx,4)
jne    113f <check_error4+0x3f>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1144 <check_error4+0x44>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    111a <check_error4+0x1a>
cmpl   $0x1,-0x1c(%rbp)
jle    1168 <check_error4+0x68>
movl   $0x1,-0x4(%rbp)
jmp    116f <check_error4+0x6f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_error4>:
xor    %eax,%eax
cmpl   $0x1,0x10(%rsi)
movdqu (%rsi),%xmm0
sete   %al
pcmpeqd 0xeeb(%rip),%xmm0
movmskps %xmm0,%ecx
mov    %ecx,%edx
shr    %dl
and    $0x5,%dl
sub    %dl,%cl
mov    %ecx,%edx
and    $0x33,%dl
shr    $0x2,%cl
and    $0x33,%cl
add    %dl,%cl
mov    %ecx,%edx
shr    $0x4,%dl
add    %cl,%dl
and    $0xf,%dl
movzbl %dl,%ecx
add    %eax,%ecx
xor    %eax,%eax
cmp    $0x2,%ecx
setae  %al
ret

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

LLVM IR (-O2):
define i32 @check_error4(i8* nocapture readnone %0, i32* nocapture %1) {
%3 = bitcast i32* %1 to <4 x i32>*
%4 = load <4 x i32>, <4 x i32>* %3
%5 = icmp eq <4 x i32> %4, <i32 1, i32 1, i32 1, i32 1>
%6 = getelementptr inbounds i32, i32* %1, i64 4
%7 = load i32, i32* %6
%8 = icmp eq i32 %7, 1
%9 = zext i1 %8 to i32
%10 = bitcast <4 x i1> %5 to i4
%11 = call i4 @llvm.ctpop.i4(i4 %10)
%12 = zext i4 %11 to i32
%13 = add nuw nsw i32 %12, %9
%14 = icmp ugt i32 %13, 1
%15 = zext i1 %14 to i32
ret i32 %15
}
void load_from_eeprom(void) {}


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

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

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

LLVM IR (-O2):
define void @load_from_eeprom() {
ret void
}
/* Variables and functions */
int mvprintw(int, int, char const *, short);
int i2_mvprintw(int y, int x, const char *fmt, short i) {
  return (mvprintw(y, x, fmt, i));
}


x86 assembly (clang, -O0):
<i2_mvprintw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %cx,%ax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %ax,-0x12(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
movswl -0x12(%rbp),%ecx
call   1030 <mvprintw@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i2_mvprintw>:
jmp    1030 <mvprintw@plt>

LLVM IR (-O0):
define i32 @i2_mvprintw(i32 %0, i32 %1, i8* %2, i16 signext %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i16
store i32 %0, i32* %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i16 %3, i16* %8
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = load i8*, i8** %7
%12 = load i16, i16* %8
%13 = call i32 @mvprintw(i32 %9, i32 %10, i8* %11, i16 signext %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @i2_mvprintw(i32 %0, i32 %1, i8* %2, i16 signext %3) {
%5 = tail call i32 @mvprintw(i32 %0, i32 %1, i8* %2, i16 signext %3)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ DisplayAvailableArchTypesEx(int);
void DisplayAvailableArchTypes(void) { DisplayAvailableArchTypesEx((1)); }


x86 assembly (clang, -O0):
<DisplayAvailableArchTypes>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <DisplayAvailableArchTypesEx@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<DisplayAvailableArchTypes>:
mov    $0x1,%edi
jmp    1030 <DisplayAvailableArchTypesEx@plt>

LLVM IR (-O0):
define void @DisplayAvailableArchTypes() {
%1 = call i32 @DisplayAvailableArchTypesEx(i32 1)
ret void
}

LLVM IR (-O2):
define void @DisplayAvailableArchTypes() {
%1 = tail call i32 @DisplayAvailableArchTypesEx(i32 1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
char *ctime(int /*<<< orphan*/ *);
int strlen(char *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
const char *_get_current_time() {
  time_t now;
  time(&now);
  char *current_time = ctime(&now);
  current_time[strlen(current_time) - 1] = '\0';
  return current_time;
}


x86 assembly (clang, -O0):
<_get_current_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x4(%rbp),%rdi
call   1050 <time@plt>
lea    -0x4(%rbp),%rdi
call   1030 <ctime@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_get_current_time>:
push   %rbx
sub    $0x10,%rsp
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
call   1050 <time@plt>
mov    %rbx,%rdi
call   1030 <ctime@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <strlen@plt>
cltq
movb   $0x0,-0x1(%rax,%rbx,1)
mov    %rbx,%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i8* @_get_current_time() {
%1 = alloca i32
%2 = alloca i8*
%3 = call i32 @time(i32* %1)
%4 = call i8* @ctime(i32* %1)
store i8* %4, i8** %2
%5 = load i8*, i8** %2
%6 = load i8*, i8** %2
%7 = call i32 @strlen(i8* %6)
%8 = sub nsw i32 %7, 1
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i8, i8* %5, i64 %9
store i8 0, i8* %10
%11 = load i8*, i8** %2
ret i8* %11
}

LLVM IR (-O2):
define i8* @_get_current_time() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @time(i32* %1)
%4 = call i8* @ctime(i32* %1)
%5 = call i32 @strlen(i8* %4)
%6 = add nsw i32 %5, -1
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %4, i64 %7
store i8 0, i8* %8
ret i8* %4
}
/* Variables and functions */
scalar_t__ erfc(double);
long double erfcl(long double x) { return (long double)erfc((double)x); }


x86 assembly (clang, -O0):
<erfcl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
fstpl  -0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
call   1030 <erfc@plt>
mov    %rax,-0x18(%rbp)
fildll -0x18(%rbp)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<erfcl>:
sub    $0x18,%rsp
fldt   0x20(%rsp)
fstpl  0x8(%rsp)
movsd  0x8(%rsp),%xmm0
call   1030 <erfc@plt>
mov    %rax,0x10(%rsp)
fildll 0x10(%rsp)
add    $0x18,%rsp
ret

LLVM IR (-O0):
define x86_fp80 @erfcl(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = fptrunc x86_fp80 %3 to double
%5 = call i64 @erfc(double %4)
%6 = sitofp i64 %5 to x86_fp80
ret x86_fp80 %6
}

LLVM IR (-O2):
define x86_fp80 @erfcl(x86_fp80 %0) {
%2 = fptrunc x86_fp80 %0 to double
%3 = tail call i64 @erfc(double %2)
%4 = sitofp i64 %3 to x86_fp80
ret x86_fp80 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
char getc(int /*<<< orphan*/ *);
void read_line(FILE *file, char *c, char *buffert) {
  while ((*c = getc(file)) != '\n') {
    *buffert = *c;
    ++buffert;
  }
  *buffert = '\n';
  ++buffert;
  *buffert = '\0';
}


x86 assembly (clang, -O0):
<read_line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <getc@plt>
mov    -0x10(%rbp),%rcx
mov    %al,(%rcx)
movsbl %al,%eax
cmp    $0xa,%eax
je     115c <read_line+0x4c>
mov    -0x10(%rbp),%rax
mov    (%rax),%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1124 <read_line+0x14>
mov    -0x18(%rbp),%rax
movb   $0xa,(%rax)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movb   $0x0,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_line>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%rbx
mov    %rsi,%r14
mov    %rdi,%r15
xchg   %ax,%ax
call   1030 <getc@plt>
mov    %al,(%r14)
cmp    $0xa,%al
je     1137 <read_line+0x27>
mov    %al,(%rbx)
add    $0x1,%rbx
mov    %r15,%rdi
jmp    1120 <read_line+0x10>
movw   $0xa,(%rbx)
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @read_line(i32* nocapture %0, i8* nocapture writeonly %1, i8* nocapture writeonly %2) {
%4 = tail call signext i8 @getc(i32* %0)
store i8 %4, i8* %1
%5 = icmp eq i8 %4, 10
br i1 %5, label %12, label %6
6: ; preds = %3, %6
%7 = phi i8 [ %10, %6 ], [ %4, %3 ]
%8 = phi i8* [ %9, %6 ], [ %2, %3 ]
store i8 %7, i8* %8
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = tail call signext i8 @getc(i32* %0)
store i8 %10, i8* %1
%11 = icmp eq i8 %10, 10
br i1 %11, label %12, label %6
12: ; preds = %6, %3
%13 = phi i8* [ %2, %3 ], [ %9, %6 ]
store i8 10, i8* %13
%14 = getelementptr inbounds i8, i8* %13, i64 1
store i8 0, i8* %14
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void reset_bg_color() { printf("%c[m", 0x1B); }


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

x86 assembly (clang, -O2):
<reset_bg_color>:
lea    0xee9(%rip),%rdi
mov    $0x1b,%esi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"%c[m\00"
define void @reset_bg_color() {
%1 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 27)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"%c[m\00"
define void @reset_bg_color() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 27)
ret void
}
/* Variables and functions */
int f200(int *);
int f201(int *p) { return f200(p); }


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

x86 assembly (clang, -O2):
<f201>:
jmp    1030 <f200@plt>

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

LLVM IR (-O2):
define i32 @f201(i32* %0) {
%2 = tail call i32 @f200(i32* %0)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ siginfo_t;

/* Variables and functions */
int /*<<< orphan*/ _exit(int);
void sigaction_SIGSEGV(int _, siginfo_t *__, void *___) { _exit(1); }


x86 assembly (clang, -O0):
<sigaction_SIGSEGV>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0x1,%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<sigaction_SIGSEGV>:
push   %rax
mov    $0x1,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
define void @sigaction_SIGSEGV(i32 %0, i32* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i8*
store i32 %0, i32* %4
store i32* %1, i32** %5
store i8* %2, i8** %6
%7 = call i32 @_exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @sigaction_SIGSEGV(i32 %0, i32* nocapture readnone %1, i8* nocapture readnone %2) {
%4 = tail call i32 @_exit(i32 1)
unreachable
}
void f() { "hello"; }


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"hello\00"
define void @f() {
ret void
}

LLVM IR (-O2):
define void @f() {
ret void
}
int kvmppc_reset_htab(int shift_hint) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @kvmppc_reset_htab(i32 %0) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ function_which_gives_up(int *);
scalar_t__ malloc(int);
void coverage5(int *x) {
  for (int i = 0; i < 7; ++i)
    function_which_gives_up(x);
  char *m = (char *)malloc(12);
}


x86 assembly (clang, -O0):
<coverage5>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x7,-0xc(%rbp)
jge    1154 <coverage5+0x34>
mov    -0x8(%rbp),%rdi
call   1030 <function_which_gives_up@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1133 <coverage5+0x13>
mov    $0xc,%edi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<coverage5>:
push   %rbx
mov    %rdi,%rbx
call   1030 <function_which_gives_up@plt>
mov    %rbx,%rdi
call   1030 <function_which_gives_up@plt>
mov    %rbx,%rdi
call   1030 <function_which_gives_up@plt>
mov    %rbx,%rdi
call   1030 <function_which_gives_up@plt>
mov    %rbx,%rdi
call   1030 <function_which_gives_up@plt>
mov    %rbx,%rdi
call   1030 <function_which_gives_up@plt>
mov    %rbx,%rdi
call   1030 <function_which_gives_up@plt>
mov    $0xc,%edi
pop    %rbx
jmp    1040 <malloc@plt>

LLVM IR (-O0):
define void @coverage5(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i8*
store i32* %0, i32** %2
store i32 0, i32* %3
br label %5
5: ; preds = %11, %1
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 7
br i1 %7, label %8, label %14
8: ; preds = %5
%9 = load i32*, i32** %2
%10 = call i32 @function_which_gives_up(i32* %9)
br label %11
11: ; preds = %8
%12 = load i32, i32* %3
%13 = add nsw i32 %12, 1
store i32 %13, i32* %3
br label %5
14: ; preds = %5
%15 = call i64 @malloc(i32 12)
%16 = inttoptr i64 %15 to i8*
store i8* %16, i8** %4
ret void
}

LLVM IR (-O2):
define void @coverage5(i32* %0) {
%2 = tail call i32 @function_which_gives_up(i32* %0)
%3 = tail call i32 @function_which_gives_up(i32* %0)
%4 = tail call i32 @function_which_gives_up(i32* %0)
%5 = tail call i32 @function_which_gives_up(i32* %0)
%6 = tail call i32 @function_which_gives_up(i32* %0)
%7 = tail call i32 @function_which_gives_up(i32* %0)
%8 = tail call i32 @function_which_gives_up(i32* %0)
%9 = tail call i64 @malloc(i32 12)
ret void
}
/* Variables and functions */
int EXIT_FAILURE;
int EXIT_SUCCESS;
int main(int argc, char **argv) {
  if (!(1 == 1)) {
    return EXIT_FAILURE;
  }
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ec7(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%eax
ret

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

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
@EXIT_FAILURE = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @EXIT_SUCCESS
ret i32 %3
}
void foo(void) { return; }


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

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

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

LLVM IR (-O2):
define void @foo() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_error();
int fibo(int);
int main() {
  int x = 7;
  int result = fibo(x);
  if (result == 13) {
    __VERIFIER_error();
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x7,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <fibo@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0xd,-0xc(%rbp)
jne    1152 <main+0x32>
mov    $0x0,%al
call   1030 <__VERIFIER_error@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x7,%edi
call   1040 <fibo@plt>
cmp    $0xd,%eax
jne    1137 <main+0x17>
xor    %eax,%eax
call   1030 <__VERIFIER_error@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 7, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @fibo(i32 %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp eq i32 %6, 13
br i1 %7, label %8, label %10
8: ; preds = %0
%9 = call i32 (...) @__VERIFIER_error()
br label %10
10: ; preds = %8, %0
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @fibo(i32 7)
%2 = icmp eq i32 %1, 13
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 (...) @__VERIFIER_error()
br label %5
5: ; preds = %3, %0
ret i32 0
}
void CK_FinishCacheBox() {}


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

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

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

LLVM IR (-O2):
define void @CK_FinishCacheBox() {
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int uint16_t;

/* Variables and functions */
void udp_set_dstport(uint8_t *p_udp, uint16_t port) {
  p_udp[2] = (port & 0xff00) >> 8;
  p_udp[3] = (port & 0xff);
}


x86 assembly (clang, -O0):
<udp_set_dstport>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
and    $0xff00,%ecx
sar    $0x8,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x8(%rax)
mov    -0xc(%rbp),%ecx
and    $0xff,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0xc(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<udp_set_dstport>:
mov    %esi,%eax
movzbl %ah,%ecx
mov    %ecx,0x8(%rdi)
movzbl %al,%eax
mov    %eax,0xc(%rdi)
ret

LLVM IR (-O0):
define void @udp_set_dstport(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = and i32 %5, 65280
%7 = ashr i32 %6, 8
%8 = load i32*, i32** %3
%9 = getelementptr inbounds i32, i32* %8, i64 2
store i32 %7, i32* %9
%10 = load i32, i32* %4
%11 = and i32 %10, 255
%12 = load i32*, i32** %3
%13 = getelementptr inbounds i32, i32* %12, i64 3
store i32 %11, i32* %13
ret void
}

LLVM IR (-O2):
define void @udp_set_dstport(i32* nocapture writeonly %0, i32 %1) {
%3 = lshr i32 %1, 8
%4 = and i32 %3, 255
%5 = getelementptr inbounds i32, i32* %0, i64 2
store i32 %4, i32* %5
%6 = and i32 %1, 255
%7 = getelementptr inbounds i32, i32* %0, i64 3
store i32 %6, i32* %7
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ReloadGame(int);
void LoadPrevGameProc() { ReloadGame(-1); }


x86 assembly (clang, -O0):
<LoadPrevGameProc>:
push   %rbp
mov    %rsp,%rbp
mov    $0xffffffff,%edi
call   1030 <ReloadGame@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<LoadPrevGameProc>:
mov    $0xffffffff,%edi
jmp    1030 <ReloadGame@plt>

LLVM IR (-O0):
define void @LoadPrevGameProc() {
%1 = call i32 @ReloadGame(i32 -1)
ret void
}

LLVM IR (-O2):
define void @LoadPrevGameProc() {
%1 = tail call i32 @ReloadGame(i32 -1)
ret void
}
void foo_1_2_2_1_1_1_2_1_1() {}


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

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

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

LLVM IR (-O2):
define void @foo_1_2_2_1_1_1_2_1_1() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ PRINT_setQueryFreeVariables();
void QUERY_setQueryFreeVariables() { PRINT_setQueryFreeVariables(); }


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

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

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

LLVM IR (-O2):
define void @QUERY_setQueryFreeVariables() {
%1 = tail call i32 (...) @PRINT_setQueryFreeVariables()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __yield();
void check__yield(void) { __yield(); }


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

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

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

LLVM IR (-O2):
define void @check__yield() {
%1 = tail call i32 (...) @__yield()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double volatile);
double sqrt(double volatile);
int main() {
  volatile double x, y;
  x = 3;
  y = sqrt(x + 1);
  printf("%e\n", y);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xed1(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xeb7(%rip),%xmm1
addsd  %xmm1,%xmm0
call   1040 <sqrt@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movabs $0x4008000000000000,%rax
mov    %rax,0x10(%rsp)
movsd  0x10(%rsp),%xmm0
addsd  0xebf(%rip),%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1151 <main+0x31>
sqrtsd %xmm0,%xmm0
jmp    1156 <main+0x36>
call   1040 <sqrt@plt>
movsd  %xmm0,0x8(%rsp)
movsd  0x8(%rsp),%xmm0
lea    0xe9f(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%e\0A\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = bitcast double* %1 to i8*
%4 = bitcast double* %2 to i8*
store volatile double 3.000000e+00, double* %1
%5 = load volatile double, double* %1
%6 = fadd double %5, 1.000000e+00
%7 = tail call double @sqrt(double %6)
store volatile double %7, double* %2
%8 = load volatile double, double* %2
%9 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %8)
ret i32 0
}
char *spoji(char *s1, char *s2) {
  char *temp = s1;
  while (*s1++)
    ;
  s1--;
  while (*s1++ = *s2++)
    ;
  return temp;
}


x86 assembly (clang, -O0):
<spoji>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
cmpb   $0x0,(%rax)
je     1131 <spoji+0x31>
jmp    1114 <spoji+0x14>
mov    -0x8(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %al,(%rcx)
cmp    $0x0,%al
je     116c <spoji+0x6c>
jmp    113d <spoji+0x3d>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<spoji>:
mov    %rdi,%rax
mov    %rdi,%rcx
cs nopw 0x0(%rax,%rax,1)
cmpb   $0x0,(%rcx)
lea    0x1(%rcx),%rcx
jne    1110 <spoji+0x10>
xor    %edx,%edx
nopl   0x0(%rax,%rax,1)
movzbl (%rsi,%rdx,1),%edi
mov    %dil,-0x1(%rcx,%rdx,1)
add    $0x1,%rdx
test   %dil,%dil
jne    1120 <spoji+0x20>
ret

LLVM IR (-O0):
define i8* @spoji(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
store i8* %6, i8** %5
br label %7
7: ; preds = %12, %2
%8 = load i8*, i8** %3
%9 = getelementptr inbounds i8, i8* %8, i32 1
store i8* %9, i8** %3
%10 = load i8, i8* %8
%11 = icmp ne i8 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %7
br label %7
13: ; preds = %7
%14 = load i8*, i8** %3
%15 = getelementptr inbounds i8, i8* %14, i32 -1
store i8* %15, i8** %3
br label %16
16: ; preds = %23, %13
%17 = load i8*, i8** %4
%18 = getelementptr inbounds i8, i8* %17, i32 1
store i8* %18, i8** %4
%19 = load i8, i8* %17
%20 = load i8*, i8** %3
%21 = getelementptr inbounds i8, i8* %20, i32 1
store i8* %21, i8** %3
store i8 %19, i8* %20
%22 = icmp ne i8 %19, 0
br i1 %22, label %23, label %24
23: ; preds = %16
br label %16
24: ; preds = %16
%25 = load i8*, i8** %5
ret i8* %25
}

LLVM IR (-O2):
define i8* @spoji(i8* returned %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %5, %3 ]
%5 = getelementptr inbounds i8, i8* %4, i64 1
%6 = load i8, i8* %4
%7 = icmp eq i8 %6, 0
br i1 %7, label %8, label %3
8: ; preds = %3, %8
%9 = phi i8* [ %11, %8 ], [ %1, %3 ]
%10 = phi i8* [ %13, %8 ], [ %4, %3 ]
%11 = getelementptr inbounds i8, i8* %9, i64 1
%12 = load i8, i8* %9
%13 = getelementptr inbounds i8, i8* %10, i64 1
store i8 %12, i8* %10
%14 = icmp eq i8 %12, 0
br i1 %14, label %15, label %8
15: ; preds = %8
ret i8* %0
}
int oscPadSize(int len) {
  int area = (len + 3) / 4;
  area *= 4;
  return area - len;
}


x86 assembly (clang, -O0):
<oscPadSize>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x3,%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x2,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<oscPadSize>:
lea    0x3(%rdi),%ecx
lea    0x6(%rdi),%eax
test   %ecx,%ecx
cmovns %ecx,%eax
and    $0xfffffffc,%eax
sub    %edi,%eax
ret

LLVM IR (-O0):
define i32 @oscPadSize(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = add nsw i32 %4, 3
%6 = sdiv i32 %5, 4
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = mul nsw i32 %7, 4
store i32 %8, i32* %3
%9 = load i32, i32* %3
%10 = load i32, i32* %2
%11 = sub nsw i32 %9, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @oscPadSize(i32 %0) {
%2 = add nsw i32 %0, 3
%3 = sdiv i32 %2, 4
%4 = shl nsw i32 %3, 2
%5 = sub nsw i32 %4, %0
ret i32 %5
}
/* Type definitions */
typedef int __v4hi;
typedef scalar_t__ __m64;

/* Variables and functions */
__m64 __attribute__((__always___, __nodebug__))
_mm_mullo_pi16(__m64 __m1, __m64 __m2) {
  return (__m64)((__v4hi)__m1 * (__v4hi)__m2);
}


x86 assembly (clang, -O0):
<_mm_mullo_pi16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
imul   %ecx,%eax
cltq
pop    %rbp
ret

x86 assembly (clang, -O2):
<_mm_mullo_pi16>:
imul   %esi,%edi
movslq %edi,%rax
ret

LLVM IR (-O0):
define i64 @_mm_mullo_pi16(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 = trunc i64 %5 to i32
%7 = load i64, i64* %4
%8 = trunc i64 %7 to i32
%9 = mul nsw i32 %6, %8
%10 = sext i32 %9 to i64
ret i64 %10
}

LLVM IR (-O2):
define i64 @_mm_mullo_pi16(i64 %0, i64 %1) {
%3 = shl i64 %0, 32
%4 = mul i64 %3, %1
%5 = ashr exact i64 %4, 32
ret i64 %5
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *argv0) {
  fprintf(
      stderr,
      "Usage: %s [-F [hex|ascii|rtcp|short|payload|dump|header] [-t minutes] "
      "[-o outputfile] [-f inputfile] [-x bytes] [multicast]/port > file\n",
      argv0);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [137 x i8] c"Usage: %s [-F [hex|ascii|rtcp|short|payload|dump|header] [-t minutes] [-o outputfile] [-f inputfile] [-x bytes] [multicast]/port > file\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([137 x i8], [137 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [137 x i8] c"Usage: %s [-F [hex|ascii|rtcp|short|payload|dump|header] [-t minutes] [-o outputfile] [-f inputfile] [-x bytes] [multicast]/port > file\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([137 x i8], [137 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void encrypt(char *message) {
  char c;
  while (*message) {
    *message = *message ^ 31;
    message++;
  }
}


x86 assembly (clang, -O0):
<encrypt>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1138 <encrypt+0x38>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
xor    $0x1f,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <encrypt+0x8>
pop    %rbp
ret

x86 assembly (clang, -O2):
<encrypt>:
mov    (%rdi),%al
test   %al,%al
je     1120 <encrypt+0x20>
add    $0x1,%rdi
nopw   0x0(%rax,%rax,1)
xor    $0x1f,%al
mov    %al,-0x1(%rdi)
movzbl (%rdi),%eax
add    $0x1,%rdi
test   %al,%al
jne    1110 <encrypt+0x10>
ret

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

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


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

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

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

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

/* Variables and functions */
int cocks_master_keygen(struct ibe_master_keypair *, size_t);
int ag_master_keygen(struct ibe_master_keypair *keypair, size_t len) {
  return cocks_master_keygen(keypair, len);
}


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

x86 assembly (clang, -O2):
<ag_master_keygen>:
jmp    1030 <cocks_master_keygen@plt>

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

LLVM IR (-O2):
%struct.ibe_master_keypair = type { i32 }
define i32 @ag_master_keygen(%struct.ibe_master_keypair* %0, i64 %1) {
%3 = tail call i32 @cocks_master_keygen(%struct.ibe_master_keypair* %0, i64 %1)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ fpos_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SEEK_END;
int /*<<< orphan*/ fgetpos(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ fseeko(int /*<<< orphan*/ *, int /*<<< orphan*/,
                          int /*<<< orphan*/);
int /*<<< orphan*/ fsetpos(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
size_t get_filesize(FILE *fp) {
  size_t file_size;
  fpos_t pos, pos_curr;
  fgetpos(fp, &pos_curr);
  fseeko(fp, 0, SEEK_END);
  fgetpos(fp, &pos);
  file_size = *(size_t *)&pos;
  fsetpos(fp, &pos_curr);
  return file_size;
}


x86 assembly (clang, -O0):
<get_filesize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <fgetpos@plt>
mov    -0x8(%rbp),%rdi
mov    0x2e94(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1040 <fseeko@plt>
mov    -0x8(%rbp),%rdi
lea    -0x14(%rbp),%rsi
call   1030 <fgetpos@plt>
mov    -0x14(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1050 <fsetpos@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_filesize>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
lea    0xc(%rsp),%r14
mov    %r14,%rsi
call   1030 <fgetpos@plt>
mov    0x2e98(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1040 <fseeko@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1030 <fgetpos@plt>
mov    0x8(%rsp),%r15
mov    %rbx,%rdi
mov    %r14,%rsi
call   1050 <fsetpos@plt>
mov    %r15,%rax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@SEEK_END = global i32 0
define i64 @get_filesize(i32* %0) {
%2 = alloca i32*
%3 = alloca i64
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %2
%6 = load i32*, i32** %2
%7 = call i32 @fgetpos(i32* %6, i32* %5)
%8 = load i32*, i32** %2
%9 = load i32, i32* @SEEK_END
%10 = call i32 @fseeko(i32* %8, i32 0, i32 %9)
%11 = load i32*, i32** %2
%12 = call i32 @fgetpos(i32* %11, i32* %4)
%13 = bitcast i32* %4 to i64*
%14 = load i64, i64* %13
store i64 %14, i64* %3
%15 = load i32*, i32** %2
%16 = call i32 @fsetpos(i32* %15, i32* %5)
%17 = load i64, i64* %3
ret i64 %17
}

LLVM IR (-O2):
@SEEK_END = global i32 0
define i64 @get_filesize(i32* nocapture %0) {
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %2 to i8*
%5 = bitcast i32* %3 to i8*
%6 = call i32 @fgetpos(i32* %0, i32* %3)
%7 = load i32, i32* @SEEK_END
%8 = tail call i32 @fseeko(i32* %0, i32 0, i32 %7)
%9 = call i32 @fgetpos(i32* %0, i32* %2)
%10 = bitcast i32* %2 to i64*
%11 = load i64, i64* %10
%12 = call i32 @fsetpos(i32* %0, i32* %3)
ret i64 %11
}
/* Variables and functions */
unsigned long GET_BITS(unsigned long, int, int);
unsigned long __vaddr_bounds_table_index(void *vaddr) {
  return GET_BITS((unsigned long)vaddr, 3, 19);
}


x86 assembly (clang, -O0):
<__vaddr_bounds_table_index>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x3,%esi
mov    $0x13,%edx
call   1030 <GET_BITS@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__vaddr_bounds_table_index>:
mov    $0x3,%esi
mov    $0x13,%edx
jmp    1030 <GET_BITS@plt>

LLVM IR (-O0):
define i64 @__vaddr_bounds_table_index(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = ptrtoint i8* %3 to i64
%5 = call i64 @GET_BITS(i64 %4, i32 3, i32 19)
ret i64 %5
}

LLVM IR (-O2):
define i64 @__vaddr_bounds_table_index(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = tail call i64 @GET_BITS(i64 %2, i32 3, i32 19)
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ i2cmaster_ClearARLoss(int /*<<< orphan*/);
void i2c0master_ClearARLoss(void) { i2cmaster_ClearARLoss(0); }


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

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

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

LLVM IR (-O2):
define void @i2c0master_ClearARLoss() {
%1 = tail call i32 @i2cmaster_ClearARLoss(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ foo(int, int, int, int, int, int /*<<< orphan*/);
int main(int argc, char **argv) {
  foo(5, 4, 3, 2, 1, 0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x5,%edi
mov    $0x4,%esi
mov    $0x3,%edx
mov    $0x2,%ecx
mov    $0x1,%r8d
xor    %r9d,%r9d
call   1030 <foo@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x5,%edi
mov    $0x4,%esi
mov    $0x3,%edx
mov    $0x2,%ecx
mov    $0x1,%r8d
xor    %r9d,%r9d
call   1030 <foo@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @foo(i32 5, i32 4, i32 3, i32 2, i32 1, i32 0)
ret i32 0
}