xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ at_cmd(int /*<<< orphan*/ *, int /*<<< orphan*/ *, char *);
void at_disable_echo(FILE *fp) { at_cmd(fp, NULL, "E0"); }


x86 assembly (clang, -O0):
<at_disable_echo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
lea    0xed5(%rip),%rdx
call   1030 <at_cmd@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<at_disable_echo>:
lea    0xee9(%rip),%rdx
xor    %esi,%esi
jmp    1030 <at_cmd@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"E0\00"
define void @at_disable_echo(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @at_cmd(i32* %3, i32* null, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"E0\00"
define void @at_disable_echo(i32* %0) {
%2 = tail call i32 @at_cmd(i32* %0, i32* null, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ f3_cmp(long double, long double);
int __eqtf2(long double a, long double b) { return !!f3_cmp(a, b); }


x86 assembly (clang, -O0):
<__eqtf2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fstpt  -0x20(%rbp)
fldt   -0x10(%rbp)
fldt   -0x20(%rbp)
mov    %rsp,%rax
fstpt  0x10(%rax)
fstpt  (%rax)
call   1030 <f3_cmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__eqtf2>:
sub    $0x28,%rsp
fldt   0x30(%rsp)
fldt   0x40(%rsp)
fstpt  0x10(%rsp)
fstpt  (%rsp)
call   1030 <f3_cmp@plt>
xor    %ecx,%ecx
test   %eax,%eax
setne  %cl
mov    %ecx,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
define i32 @__eqtf2(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* %4
%7 = call i32 @f3_cmp(x86_fp80 %5, x86_fp80 %6)
%8 = icmp ne i32 %7, 0
%9 = xor i1 %8, true
%10 = xor i1 %9, true
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @__eqtf2(x86_fp80 %0, x86_fp80 %1) {
%3 = tail call i32 @f3_cmp(x86_fp80 %0, x86_fp80 %1)
%4 = icmp ne i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int a();
scalar_t__ b();
scalar_t__ c();
f() { return a() & (b() == c()); }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <a@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <b@plt>
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1040 <c@plt>
mov    -0x10(%rbp),%rcx
mov    %rax,%rdx
mov    -0x4(%rbp),%eax
cmp    %rdx,%rcx
sete   %cl
and    $0x1,%cl
movzbl %cl,%ecx
and    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1050 <a@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1030 <b@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1040 <c@plt>
xor    %ecx,%ecx
cmp    %rax,%rbx
sete   %cl
and    %ebp,%ecx
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @f() {
%1 = call i32 (...) @a()
%2 = call i64 (...) @b()
%3 = call i64 (...) @c()
%4 = icmp eq i64 %2, %3
%5 = zext i1 %4 to i32
%6 = and i32 %1, %5
ret i32 %6
}

LLVM IR (-O2):
define i32 @f() {
%1 = tail call i32 (...) @a()
%2 = tail call i64 (...) @b()
%3 = tail call i64 (...) @c()
%4 = icmp eq i64 %2, %3
%5 = zext i1 %4 to i32
%6 = and i32 %1, %5
ret i32 %6
}
void csExec(char *file) {}


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

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

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

LLVM IR (-O2):
define void @csExec(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ kernel_print_character(char const);
void print_string(const char *string) {
  while (*string) {
    kernel_print_character(*string);
    string++;
  }
}


x86 assembly (clang, -O0):
<print_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1146 <print_string+0x36>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <kernel_print_character@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <print_string+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_string>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <print_string+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <kernel_print_character@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <print_string+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @print_string(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 = tail call i32 @kernel_print_character(i8 signext %5)
%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 gtk_text_iter_forward_sentence_end() {}


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

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

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

LLVM IR (-O2):
define void @gtk_text_iter_forward_sentence_end() {
ret void
}
/* Type definitions */
typedef int u_int;
typedef int u_char;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ die_file_eof(int /*<<< orphan*/ *);
int fread(int *, int, int, int /*<<< orphan*/ *);
u_int read_u16b(FILE *fp) {
  u_char b[2];
  if (fread(b, 2, 1, fp) != 1)
    die_file_eof(fp);
  return b[1] + (b[0] << 8);
}


x86 assembly (clang, -O0):
<read_u16b>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rcx
mov    $0x2,%esi
mov    $0x1,%edx
call   1030 <fread@plt>
cmp    $0x1,%eax
je     1155 <read_u16b+0x35>
mov    -0x8(%rbp),%rdi
call   1040 <die_file_eof@plt>
mov    -0xc(%rbp),%eax
mov    -0x10(%rbp),%ecx
shl    $0x8,%ecx
add    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_u16b>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
lea    0x8(%rsp),%rdi
mov    $0x2,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1030 <fread@plt>
cmp    $0x1,%eax
je     114c <read_u16b+0x2c>
mov    %rbx,%rdi
call   1040 <die_file_eof@plt>
mov    0x8(%rsp),%eax
shl    $0x8,%eax
add    0xc(%rsp),%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @read_u16b(i32* %0) {
%2 = alloca i32*
%3 = alloca [2 x i32]
store i32* %0, i32** %2
%4 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 0
%5 = load i32*, i32** %2
%6 = call i32 @fread(i32* %4, i32 2, i32 1, i32* %5)
%7 = icmp ne i32 %6, 1
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i32*, i32** %2
%10 = call i32 @die_file_eof(i32* %9)
br label %11
11: ; preds = %8, %1
%12 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 1
%13 = load i32, i32* %12
%14 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 0
%15 = load i32, i32* %14
%16 = shl i32 %15, 8
%17 = add nsw i32 %13, %16
ret i32 %17
}

LLVM IR (-O2):
define i32 @read_u16b(i32* %0) {
%2 = alloca [2 x i32]
%3 = bitcast [2 x i32]* %2 to i8*
%4 = getelementptr inbounds [2 x i32], [2 x i32]* %2, i64 0, i64 0
%5 = call i32 @fread(i32* %4, i32 2, i32 1, i32* %0)
%6 = icmp eq i32 %5, 1
br i1 %6, label %9, label %7
7: ; preds = %1
%8 = tail call i32 @die_file_eof(i32* %0)
br label %9
9: ; preds = %7, %1
%10 = getelementptr inbounds [2 x i32], [2 x i32]* %2, i64 0, i64 1
%11 = load i32, i32* %10
%12 = load i32, i32* %4
%13 = shl i32 %12, 8
%14 = add nsw i32 %13, %11
ret i32 %14
}
void ScaleARGBRowDown2Linear_Any_SSE2() {}


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

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

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

LLVM IR (-O2):
define void @ScaleARGBRowDown2Linear_Any_SSE2() {
ret void
}
void GPMCECCResultRegSelect(unsigned int baseAddr, unsigned int eccResReg) {
  (*((volatile unsigned int *)(baseAddr + (0x1F8)))) &= ~(0x0000000Fu);
  (*((volatile unsigned int *)(baseAddr + (0x1F8)))) |=
      ((eccResReg << (0x00000000u)) & (0x0000000Fu));
}


x86 assembly (clang, -O0):
<GPMCECCResultRegSelect>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1f8,%eax
mov    %eax,%eax
mov    (%rax),%ecx
and    $0xfffffff0,%ecx
mov    %ecx,(%rax)
mov    -0x8(%rbp),%edx
shl    $0x0,%edx
and    $0xf,%edx
mov    -0x4(%rbp),%eax
add    $0x1f8,%eax
mov    %eax,%eax
mov    (%rax),%ecx
or     %edx,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<GPMCECCResultRegSelect>:
add    $0x1f8,%edi
andl   $0xfffffff0,(%rdi)
and    $0xf,%esi
or     %esi,(%rdi)
ret

LLVM IR (-O0):
define void @GPMCECCResultRegSelect(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = add i32 %5, 504
%7 = zext i32 %6 to i64
%8 = inttoptr i64 %7 to i32*
%9 = load volatile i32, i32* %8
%10 = and i32 %9, -16
store volatile i32 %10, i32* %8
%11 = load i32, i32* %4
%12 = shl i32 %11, 0
%13 = and i32 %12, 15
%14 = load i32, i32* %3
%15 = add i32 %14, 504
%16 = zext i32 %15 to i64
%17 = inttoptr i64 %16 to i32*
%18 = load volatile i32, i32* %17
%19 = or i32 %18, %13
store volatile i32 %19, i32* %17
ret void
}

LLVM IR (-O2):
define void @GPMCECCResultRegSelect(i32 %0, i32 %1) {
%3 = add i32 %0, 504
%4 = zext i32 %3 to i64
%5 = inttoptr i64 %4 to i32*
%6 = load volatile i32, i32* %5
%7 = and i32 %6, -16
store volatile i32 %7, i32* %5
%8 = and i32 %1, 15
%9 = load volatile i32, i32* %5
%10 = or i32 %9, %8
store volatile i32 %10, i32* %5
ret void
}
/* Variables and functions */
unsigned short htons(unsigned short);
long strtol(char const *, int /*<<< orphan*/ *, int /*<<< orphan*/);
int parse_port_number(const char *input, unsigned short *output) {
  long tmp;
  tmp = strtol(input, NULL, 0);
  if (tmp < 1024 || tmp > 49151) {
    return -1;
  }
  *output = htons((unsigned short)tmp);
  return 0;
}


x86 assembly (clang, -O0):
<parse_port_number>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
xor    %edx,%edx
call   1040 <strtol@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x400,-0x20(%rbp)
jl     115f <parse_port_number+0x3f>
cmpq   $0xbfff,-0x20(%rbp)
jle    116b <parse_port_number+0x4b>
movl   $0xffffffff,-0x4(%rbp)
jmp    1188 <parse_port_number+0x68>
mov    -0x20(%rbp),%rax
movzwl %ax,%edi
call   1030 <htons@plt>
mov    %ax,%cx
mov    -0x18(%rbp),%rax
mov    %cx,(%rax)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_port_number>:
push   %rbx
mov    %rsi,%rbx
xor    %esi,%esi
xor    %edx,%edx
call   1040 <strtol@plt>
lea    -0xc000(%rax),%rdx
mov    $0xffffffff,%ecx
cmp    $0xffffffffffff4400,%rdx
jb     114f <parse_port_number+0x2f>
movzwl %ax,%edi
call   1030 <htons@plt>
mov    %ax,(%rbx)
xor    %ecx,%ecx
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @parse_port_number(i8* %0, i16* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i16*
%6 = alloca i64
store i8* %0, i8** %4
store i16* %1, i16** %5
%7 = load i8*, i8** %4
%8 = call i64 @strtol(i8* %7, i32* null, i32 0)
store i64 %8, i64* %6
%9 = load i64, i64* %6
%10 = icmp slt i64 %9, 1024
br i1 %10, label %14, label %11
11: ; preds = %2
%12 = load i64, i64* %6
%13 = icmp sgt i64 %12, 49151
br i1 %13, label %14, label %15
14: ; preds = %11, %2
store i32 -1, i32* %3
br label %20
15: ; preds = %11
%16 = load i64, i64* %6
%17 = trunc i64 %16 to i16
%18 = call zeroext i16 @htons(i16 zeroext %17)
%19 = load i16*, i16** %5
store i16 %18, i16* %19
store i32 0, i32* %3
br label %20
20: ; preds = %15, %14
%21 = load i32, i32* %3
ret i32 %21
}

LLVM IR (-O2):
define i32 @parse_port_number(i8* nocapture %0, i16* nocapture writeonly %1) {
%3 = tail call i64 @strtol(i8* nocapture %0, i32* null, i32 0)
%4 = add i64 %3, -49152
%5 = icmp ult i64 %4, -48128
br i1 %5, label %9, label %6
6: ; preds = %2
%7 = trunc i64 %3 to i16
%8 = tail call zeroext i16 @htons(i16 zeroext %7)
store i16 %8, i16* %1
br label %9
9: ; preds = %2, %6
%10 = phi i32 [ 0, %6 ], [ -1, %2 ]
ret i32 %10
}
void gtk_cell_layout_clear_attributes() {}


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

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

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

LLVM IR (-O2):
define void @gtk_cell_layout_clear_attributes() {
ret void
}
unsigned xrop3_193_1_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  unsigned stk3;
  unsigned stk4;
  stk4 = ~S;
  stk3 = D & stk4;
  stk2 = T | stk3;
  stk1 = S ^ stk2;
  stk1 = ~stk1;
  return (stk1 & (~S)) | (D & S);
}


x86 assembly (clang, -O0):
<xrop3_193_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x20(%rbp)
mov    -0x8(%rbp),%eax
and    -0x20(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%eax
or     -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
xor    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_193_1_0>:
mov    %edi,%ecx
shl    $0x8,%ecx
or     %edi,%ecx
mov    %esi,%edx
shl    $0x8,%edx
or     %esi,%edx
mov    %edi,%eax
xor    $0xff,%eax
or     %ecx,%eax
or     %edx,%eax
not    %eax
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_193_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%12 = load i8, i8* %3
%13 = zext i8 %12 to i32
%14 = shl i32 %13, 8
%15 = load i8, i8* %3
%16 = zext i8 %15 to i32
%17 = or i32 %14, %16
store i32 %17, i32* %6
%18 = load i8, i8* %4
%19 = zext i8 %18 to i32
%20 = shl i32 %19, 8
%21 = load i8, i8* %4
%22 = zext i8 %21 to i32
%23 = or i32 %20, %22
store i32 %23, i32* %7
%24 = load i32, i32* %6
%25 = xor i32 %24, -1
store i32 %25, i32* %11
%26 = load i32, i32* %5
%27 = load i32, i32* %11
%28 = and i32 %26, %27
store i32 %28, i32* %10
%29 = load i32, i32* %7
%30 = load i32, i32* %10
%31 = or i32 %29, %30
store i32 %31, i32* %9
%32 = load i32, i32* %6
%33 = load i32, i32* %9
%34 = xor i32 %32, %33
store i32 %34, i32* %8
%35 = load i32, i32* %8
%36 = xor i32 %35, -1
store i32 %36, i32* %8
%37 = load i32, i32* %8
%38 = load i32, i32* %6
%39 = xor i32 %38, -1
%40 = and i32 %37, %39
%41 = load i32, i32* %5
%42 = load i32, i32* %6
%43 = and i32 %41, %42
%44 = or i32 %40, %43
ret i32 %44
}

LLVM IR (-O2):
define i32 @xrop3_193_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = xor i32 %3, 255
%8 = or i32 %4, %7
%9 = or i32 %8, %6
%10 = xor i32 %9, -1
%11 = or i32 %10, %3
ret i32 %11
}
/* Variables and functions */
int func_inline_caller(int);
int func_extern_caller(int x) { return func_inline_caller(x); }


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

x86 assembly (clang, -O2):
<func_extern_caller>:
jmp    1030 <func_inline_caller@plt>

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

LLVM IR (-O2):
define i32 @func_extern_caller(i32 %0) {
%2 = tail call i32 @func_inline_caller(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ win_flush();
void glk_exit() {
  win_flush();
  close(0);
  close(1);
  exit(0);
}


x86 assembly (clang, -O0):
<glk_exit>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <win_flush@plt>
xor    %edi,%edi
call   1040 <close@plt>
mov    $0x1,%edi
call   1040 <close@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<glk_exit>:
push   %rax
xor    %eax,%eax
call   1030 <win_flush@plt>
xor    %edi,%edi
call   1040 <close@plt>
mov    $0x1,%edi
call   1040 <close@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
define void @glk_exit() {
%1 = call i32 (...) @win_flush()
%2 = call i32 @close(i32 0)
%3 = call i32 @close(i32 1)
%4 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @glk_exit() {
%1 = tail call i32 (...) @win_flush()
%2 = tail call i32 @close(i32 0)
%3 = tail call i32 @close(i32 1)
%4 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
double sinh_cosh(double, int /*<<< orphan*/);
double sinh(double x) { return sinh_cosh(x, 0); }


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

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

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

LLVM IR (-O2):
define double @sinh(double %0) {
%2 = tail call double @sinh_cosh(double %0, i32 0)
ret double %2
}
int hwlist_lcd_chip(const char *value) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @hwlist_lcd_chip(i8* nocapture readnone %0) {
ret i32 0
}
void isr() {}


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

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

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

LLVM IR (-O2):
define void @isr() {
ret void
}
int test_imm_BFint8_mem(signed char *val) {
  return ((*val) & (0xBF << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_BFint8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%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_BFint8_mem>:
testb  $0xbf,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_BFint8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = sext i8 %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_BFint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -65
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int Rand();
int Crt_GetRandomPercent(unsigned long p) {
  return (((100 * Rand()) >> 15) < p);
}


x86 assembly (clang, -O0):
<Crt_GetRandomPercent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <Rand@plt>
imul   $0x64,%eax,%eax
sar    $0xf,%eax
cltq
cmp    -0x8(%rbp),%rax
setb   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Crt_GetRandomPercent>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <Rand@plt>
imul   $0x64,%eax,%eax
sar    $0xf,%eax
movslq %eax,%rcx
xor    %eax,%eax
cmp    %rbx,%rcx
setb   %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @Crt_GetRandomPercent(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = call i32 (...) @Rand()
%4 = mul nsw i32 100, %3
%5 = ashr i32 %4, 15
%6 = sext i32 %5 to i64
%7 = load i64, i64* %2
%8 = icmp ult i64 %6, %7
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @Crt_GetRandomPercent(i64 %0) {
%2 = tail call i32 (...) @Rand()
%3 = mul nsw i32 %2, 100
%4 = ashr i32 %3, 15
%5 = sext i32 %4 to i64
%6 = icmp ult i64 %5, %0
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
int32_t ev3_font_get_size(int32_t font, int32_t *pwidth, int32_t *pheight) {
  switch (font) {
  case 0:
    *pwidth = 6;
    *pheight = 8;
    break;
  case 1:
  default:
    *pwidth = 10;
    *pheight = 16;
    break;
  }
  return 0;
}


x86 assembly (clang, -O0):
<ev3_font_get_size>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x1c(%rbp)
test   %eax,%eax
je     1133 <ev3_font_get_size+0x33>
jmp    1122 <ev3_font_get_size+0x22>
mov    -0x1c(%rbp),%eax
sub    $0x1,%eax
je     114c <ev3_font_get_size+0x4c>
jmp    1151 <ev3_font_get_size+0x51>
mov    -0x10(%rbp),%rax
movl   $0x6,(%rax)
mov    -0x18(%rbp),%rax
movl   $0x8,(%rax)
jmp    1165 <ev3_font_get_size+0x65>
jmp    1151 <ev3_font_get_size+0x51>
mov    -0x10(%rbp),%rax
movl   $0xa,(%rax)
mov    -0x18(%rbp),%rax
movl   $0x10,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ev3_font_get_size>:
xor    %eax,%eax
test   %edi,%edi
setne  %al
lea    0x6(,%rax,4),%ecx
lea    0x8(,%rax,8),%eax
mov    %ecx,(%rsi)
mov    %eax,(%rdx)
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @ev3_font_get_size(i32 %0, i32* %1, i32* %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32*
store i32 %0, i32* %4
store i32* %1, i32** %5
store i32* %2, i32** %6
%7 = load i32, i32* %4
switch i32 %7, label %12 [
i32 0, label %8
i32 1, label %11
]
8: ; preds = %3
%9 = load i32*, i32** %5
store i32 6, i32* %9
%10 = load i32*, i32** %6
store i32 8, i32* %10
br label %15
11: ; preds = %3
br label %12
12: ; preds = %3, %11
%13 = load i32*, i32** %5
store i32 10, i32* %13
%14 = load i32*, i32** %6
store i32 16, i32* %14
br label %15
15: ; preds = %12, %8
ret i32 0
}

LLVM IR (-O2):
define i32 @ev3_font_get_size(i32 %0, i32* nocapture writeonly %1, i32* nocapture writeonly %2) {
%4 = icmp eq i32 %0, 0
%5 = select i1 %4, i32 6, i32 10
%6 = select i1 %4, i32 8, i32 16
store i32 %5, i32* %1
store i32 %6, i32* %2
ret i32 0
}
void g_cclosure_new_swap() {}


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

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

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

LLVM IR (-O2):
define void @g_cclosure_new_swap() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ init();
int /*<<< orphan*/ initProgram(char const *);
int /*<<< orphan*/ introduce();
int /*<<< orphan*/ run();
int main(int argc, char const *argv[]) {
  introduce();
  initProgram(argv[1]);
  init();
  run();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1050 <introduce@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <initProgram@plt>
mov    $0x0,%al
call   1060 <init@plt>
mov    $0x0,%al
call   1040 <run@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %rsi,%rbx
xor    %eax,%eax
call   1050 <introduce@plt>
mov    0x8(%rbx),%rdi
call   1030 <initProgram@plt>
xor    %eax,%eax
call   1060 <init@plt>
xor    %eax,%eax
call   1040 <run@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 (...) @introduce()
%6 = load i8**, i8*** %4
%7 = getelementptr inbounds i8*, i8** %6, i64 1
%8 = load i8*, i8** %7
%9 = call i32 @initProgram(i8* %8)
%10 = call i32 (...) @init()
%11 = call i32 (...) @run()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = tail call i32 (...) @introduce()
%4 = getelementptr inbounds i8*, i8** %1, i64 1
%5 = load i8*, i8** %4
%6 = tail call i32 @initProgram(i8* %5)
%7 = tail call i32 (...) @init()
%8 = tail call i32 (...) @run()
ret i32 0
}
float *mat2_assign(float *result, float *m) {
  result[0] = m[0];
  result[1] = m[1];
  result[2] = m[2];
  result[3] = m[3];
  return result;
}


x86 assembly (clang, -O0):
<mat2_assign>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x4(%rax)
mov    -0x10(%rbp),%rax
movss  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x8(%rax)
mov    -0x10(%rbp),%rax
movss  0xc(%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0xc(%rax)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mat2_assign>:
mov    %rdi,%rax
movss  (%rsi),%xmm0
movss  %xmm0,(%rdi)
movss  0x4(%rsi),%xmm0
movss  %xmm0,0x4(%rdi)
movss  0x8(%rsi),%xmm0
movss  %xmm0,0x8(%rdi)
movss  0xc(%rsi),%xmm0
movss  %xmm0,0xc(%rdi)
ret

LLVM IR (-O0):
define float* @mat2_assign(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
store float* %0, float** %3
store float* %1, float** %4
%5 = load float*, float** %4
%6 = getelementptr inbounds float, float* %5, i64 0
%7 = load float, float* %6
%8 = load float*, float** %3
%9 = getelementptr inbounds float, float* %8, i64 0
store float %7, float* %9
%10 = load float*, float** %4
%11 = getelementptr inbounds float, float* %10, i64 1
%12 = load float, float* %11
%13 = load float*, float** %3
%14 = getelementptr inbounds float, float* %13, i64 1
store float %12, float* %14
%15 = load float*, float** %4
%16 = getelementptr inbounds float, float* %15, i64 2
%17 = load float, float* %16
%18 = load float*, float** %3
%19 = getelementptr inbounds float, float* %18, i64 2
store float %17, float* %19
%20 = load float*, float** %4
%21 = getelementptr inbounds float, float* %20, i64 3
%22 = load float, float* %21
%23 = load float*, float** %3
%24 = getelementptr inbounds float, float* %23, i64 3
store float %22, float* %24
%25 = load float*, float** %3
ret float* %25
}

LLVM IR (-O2):
define float* @mat2_assign(float* returned writeonly %0, float* nocapture %1) {
%3 = load float, float* %1
store float %3, float* %0
%4 = getelementptr inbounds float, float* %1, i64 1
%5 = load float, float* %4
%6 = getelementptr inbounds float, float* %0, i64 1
store float %5, float* %6
%7 = getelementptr inbounds float, float* %1, i64 2
%8 = load float, float* %7
%9 = getelementptr inbounds float, float* %0, i64 2
store float %8, float* %9
%10 = getelementptr inbounds float, float* %1, i64 3
%11 = load float, float* %10
%12 = getelementptr inbounds float, float* %0, i64 3
store float %11, float* %12
ret float* %0
}
void flush(void *p) { asm volatile("clflush 0(%0)\n" : : "c"(p) : "rax"); }


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

x86 assembly (clang, -O2):
<flush>:
mov    %rdi,%rcx
clflush (%rcx)
ret

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

LLVM IR (-O2):
define void @flush(i8* %0) {
tail call void asm sideeffect "clflush 0($0)\0A", "{cx},~{rax},~{dirflag},~{fpsr},~{flags}"(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ FlightTelemetryStatsHandle();
int /*<<< orphan*/ UAVObjUpdated(int /*<<< orphan*/);
void FlightTelemetryStatsUpdated() {
  UAVObjUpdated(FlightTelemetryStatsHandle());
}


x86 assembly (clang, -O0):
<FlightTelemetryStatsUpdated>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <FlightTelemetryStatsHandle@plt>
mov    %eax,%edi
call   1040 <UAVObjUpdated@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @FlightTelemetryStatsUpdated() {
%1 = call i32 (...) @FlightTelemetryStatsHandle()
%2 = call i32 @UAVObjUpdated(i32 %1)
ret void
}

LLVM IR (-O2):
define void @FlightTelemetryStatsUpdated() {
%1 = tail call i32 (...) @FlightTelemetryStatsHandle()
%2 = tail call i32 @UAVObjUpdated(i32 %1)
ret void
}
/* Variables and functions */
scalar_t__ malloc(int);
int /*<<< orphan*/ memcpy(char *, char *, int);
int main() {
  char *foo;
  char *bar;
  foo = (char *)malloc(10);
  bar = (char *)malloc(15);
  memcpy(foo, bar, 11);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0xa,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    $0xf,%edi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0xb,%edx
call   1030 <memcpy@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0xa,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    $0xf,%edi
call   1040 <malloc@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
mov    $0xb,%edx
call   1030 <memcpy@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i8*
store i32 0, i32* %1
%4 = call i64 @malloc(i32 10)
%5 = inttoptr i64 %4 to i8*
store i8* %5, i8** %2
%6 = call i64 @malloc(i32 15)
%7 = inttoptr i64 %6 to i8*
store i8* %7, i8** %3
%8 = load i8*, i8** %2
%9 = load i8*, i8** %3
%10 = call i32 @memcpy(i8* %8, i8* %9, i32 11)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 @malloc(i32 10)
%2 = inttoptr i64 %1 to i8*
%3 = tail call i64 @malloc(i32 15)
%4 = inttoptr i64 %3 to i8*
%5 = tail call i32 @memcpy(i8* %2, i8* %4, i32 11)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ l_message(int /*<<< orphan*/ *, char *);
void print_version(void) {
  l_message(NULL, "Lua 5.1.1"
                  "  "
                  "Copyright (C) 1994-2006 Lua.org, PUC-Rio");
}


x86 assembly (clang, -O0):
<print_version>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    %eax,%edi
lea    0xee1(%rip),%rsi
call   1030 <l_message@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_version>:
lea    0xee9(%rip),%rsi
xor    %edi,%edi
jmp    1030 <l_message@plt>

LLVM IR (-O0):
@.str = [52 x i8] c"Lua 5.1.1 Copyright (C) 1994-2006 Lua.org, PUC-Rio\00"
define void @print_version() {
%1 = call i32 @l_message(i32* null, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [52 x i8] c"Lua 5.1.1 Copyright (C) 1994-2006 Lua.org, PUC-Rio\00"
define void @print_version() {
%1 = tail call i32 @l_message(i32* null, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct timeval {
  int tv_sec;
  int tv_usec;
};

/* Variables and functions */
int time_ms_diff(struct timeval *tv1, struct timeval *tv2) {
  return (tv2->tv_sec - tv1->tv_sec) * 1000 +
         (tv2->tv_usec - tv1->tv_usec) / 1000;
}


x86 assembly (clang, -O0):
<time_ms_diff>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x8(%rbp),%rcx
sub    (%rcx),%eax
imul   $0x3e8,%eax,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%eax
mov    -0x8(%rbp),%rcx
sub    0x4(%rcx),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<time_ms_diff>:
mov    (%rsi),%eax
mov    0x4(%rsi),%ecx
sub    (%rdi),%eax
imul   $0x3e8,%eax,%edx
sub    0x4(%rdi),%ecx
movslq %ecx,%rax
imul   $0x10624dd3,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x26,%rax
add    %ecx,%eax
add    %edx,%eax
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i32 }
define i32 @time_ms_diff(%struct.timeval* %0, %struct.timeval* %1) {
%3 = alloca %struct.timeval*
%4 = alloca %struct.timeval*
store %struct.timeval* %0, %struct.timeval** %3
store %struct.timeval* %1, %struct.timeval** %4
%5 = load %struct.timeval*, %struct.timeval** %4
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %5, i32 0, i32 0
%7 = load i32, i32* %6
%8 = load %struct.timeval*, %struct.timeval** %3
%9 = getelementptr inbounds %struct.timeval, %struct.timeval* %8, i32 0, i32 0
%10 = load i32, i32* %9
%11 = sub nsw i32 %7, %10
%12 = mul nsw i32 %11, 1000
%13 = load %struct.timeval*, %struct.timeval** %4
%14 = getelementptr inbounds %struct.timeval, %struct.timeval* %13, i32 0, i32 1
%15 = load i32, i32* %14
%16 = load %struct.timeval*, %struct.timeval** %3
%17 = getelementptr inbounds %struct.timeval, %struct.timeval* %16, i32 0, i32 1
%18 = load i32, i32* %17
%19 = sub nsw i32 %15, %18
%20 = sdiv i32 %19, 1000
%21 = add nsw i32 %12, %20
ret i32 %21
}

LLVM IR (-O2):
%struct.timeval = type { i32, i32 }
define i32 @time_ms_diff(%struct.timeval* nocapture %0, %struct.timeval* nocapture %1) {
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%4 = load i32, i32* %3
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %0, i64 0, i32 0
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
%8 = mul nsw i32 %7, 1000
%9 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%10 = load i32, i32* %9
%11 = getelementptr inbounds %struct.timeval, %struct.timeval* %0, i64 0, i32 1
%12 = load i32, i32* %11
%13 = sub nsw i32 %10, %12
%14 = sdiv i32 %13, 1000
%15 = add nsw i32 %14, %8
ret i32 %15
}
int f() {
  if (1)
    return 100;
  else
    return 200;
}


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

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

LLVM IR (-O0):
define i32 @f() {
ret i32 100
}

LLVM IR (-O2):
define i32 @f() {
ret i32 100
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void *tfn(void *arg) {
  while (1) {
    if ((*(int *)arg) % 2 == 0) {
      printf("%d\n", *(int *)(arg));
      (*(int *)(arg))++;
    }
  }
}


x86 assembly (clang, -O0):
<tfn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1150 <tfn+0x40>
mov    -0x8(%rbp),%rax
mov    (%rax),%esi
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
jmp    111c <tfn+0xc>

x86 assembly (clang, -O2):
<tfn>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    (%rdi),%esi
lea    0xee0(%rip),%r14
test   $0x1,%sil
jne    1120 <tfn+0x10>
mov    %r14,%rdi
call   1030 <printf@plt>
mov    (%rbx),%esi
add    $0x1,%esi
mov    %esi,(%rbx)
jmp    1120 <tfn+0x10>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define noalias i8* @tfn(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
br label %4
4: ; preds = %9, %1
%5 = phi i32 [ %12, %9 ], [ %3, %1 ]
%6 = and i32 %5, 1
%7 = icmp eq i32 %6, 0
br label %8
8: ; preds = %4, %8
br i1 %7, label %9, label %8
9: ; preds = %8
%10 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
%11 = load i32, i32* %2
%12 = add nsw i32 %11, 1
store i32 %12, i32* %2
br label %4
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t _HibernateIntNumberGet(void) {
  uint32_t ui32Int;
  if ((((*((volatile uint32_t *)(0x400FE000))) & (0x70000000 | 0x00FF0000)) ==
       (0x10000000 | 0x000A0000))) {
    ui32Int = 57;
  } else {
    ui32Int = 59;
  }
  return (ui32Int);
}


x86 assembly (clang, -O0):
<_HibernateIntNumberGet>:
push   %rbp
mov    %rsp,%rbp
mov    $0x400fe000,%eax
mov    (%rax),%eax
and    $0x70ff0000,%eax
cmp    $0x100a0000,%eax
jne    1127 <_HibernateIntNumberGet+0x27>
movl   $0x39,-0x4(%rbp)
jmp    112e <_HibernateIntNumberGet+0x2e>
movl   $0x3b,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_HibernateIntNumberGet>:
mov    $0x70ff0000,%eax
and    0x400fe000,%eax
xor    %ecx,%ecx
cmp    $0x100a0000,%eax
setne  %cl
lea    (%rcx,%rcx,1),%eax
add    $0x39,%eax
ret

LLVM IR (-O0):
define i32 @_HibernateIntNumberGet() {
%1 = alloca i32
%2 = load volatile i32, i32* inttoptr (i64 1074782208 to i32*)
%3 = and i32 %2, 1895759872
%4 = icmp eq i32 %3, 269090816
br i1 %4, label %5, label %6
5: ; preds = %0
store i32 57, i32* %1
br label %7
6: ; preds = %0
store i32 59, i32* %1
br label %7
7: ; preds = %6, %5
%8 = load i32, i32* %1
ret i32 %8
}

LLVM IR (-O2):
define i32 @_HibernateIntNumberGet() {
%1 = load volatile i32, i32* inttoptr (i64 1074782208 to i32*)
%2 = and i32 %1, 1895759872
%3 = icmp eq i32 %2, 269090816
%4 = select i1 %3, i32 57, i32 59
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ main_sub();
int main() {
  main_sub();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @main_sub()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ asm_test(char *, char *);
int /*<<< orphan*/ asm_test_avx(char *, char *);
int /*<<< orphan*/ asm_test_i1680(char *);
void asm_test_C(void) {
  char undef[256];
  char def[256] = {
      0,
  };
  asm_test(undef, def);
  asm_test_avx(undef, def);
  asm_test_i1680(def);
}


x86 assembly (clang, -O0):
<asm_test_C>:
push   %rbp
mov    %rsp,%rbp
sub    $0x200,%rsp
lea    -0x200(%rbp),%rdi
xor    %esi,%esi
mov    $0x100,%edx
call   1040 <memset@plt>
lea    -0x100(%rbp),%rdi
lea    -0x200(%rbp),%rsi
call   1050 <asm_test@plt>
lea    -0x100(%rbp),%rdi
lea    -0x200(%rbp),%rsi
call   1060 <asm_test_avx@plt>
lea    -0x200(%rbp),%rdi
call   1030 <asm_test_i1680@plt>
add    $0x200,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<asm_test_C>:
push   %r14
push   %rbx
sub    $0x208,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0xf0(%rsp)
movaps %xmm0,0xe0(%rsp)
movaps %xmm0,0xd0(%rsp)
movaps %xmm0,0xc0(%rsp)
movaps %xmm0,0xb0(%rsp)
movaps %xmm0,0xa0(%rsp)
movaps %xmm0,0x90(%rsp)
movaps %xmm0,0x80(%rsp)
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
lea    0x100(%rsp),%r14
mov    %rsp,%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <asm_test@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <asm_test_avx@plt>
mov    %rbx,%rdi
call   1030 <asm_test_i1680@plt>
add    $0x208,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @asm_test_C() {
%1 = alloca [256 x i8]
%2 = alloca [256 x i8]
%3 = bitcast [256 x i8]* %2 to i8*
%4 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%5 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
%6 = call i32 @asm_test(i8* %4, i8* %5)
%7 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%8 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
%9 = call i32 @asm_test_avx(i8* %7, i8* %8)
%10 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
%11 = call i32 @asm_test_i1680(i8* %10)
ret void
}

LLVM IR (-O2):
define void @asm_test_C() {
%1 = alloca [256 x i8]
%2 = alloca [256 x i8]
%3 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
%5 = call i32 @asm_test(i8* %3, i8* %4)
%6 = call i32 @asm_test_avx(i8* %3, i8* %4)
%7 = call i32 @asm_test_i1680(i8* %4)
ret void
}
long double test_nextafterl(long double x, long double y) {
  return __builtin_nextafterl(x, y);
}


x86 assembly (clang, -O0):
<test_nextafterl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fstpt  -0x20(%rbp)
fldt   -0x10(%rbp)
fldt   -0x20(%rbp)
mov    %rsp,%rax
fstpt  0x10(%rax)
fstpt  (%rax)
call   1030 <nextafterl@plt>
fld    %st(0)
fstp   %st(0)
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_nextafterl>:
jmp    1030 <nextafterl@plt>

LLVM IR (-O0):
define x86_fp80 @test_nextafterl(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* %4
%7 = call x86_fp80 @nextafterl(x86_fp80 %5, x86_fp80 %6)
ret x86_fp80 %7
}

LLVM IR (-O2):
define x86_fp80 @test_nextafterl(x86_fp80 %0, x86_fp80 %1) {
%3 = tail call x86_fp80 @nextafterl(x86_fp80 %0, x86_fp80 %1)
ret x86_fp80 %3
}
void hdoip_usbip_monitor_help(void) {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @wx11px() {
ret void
}
int indexVecTable(int ns, int dims, int q, int c) {
  return (c * ns + q) * dims;
}


x86 assembly (clang, -O0):
<indexVecTable>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x10(%rbp),%eax
imul   -0x4(%rbp),%eax
add    -0xc(%rbp),%eax
imul   -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<indexVecTable>:
imul   %ecx,%edi
lea    (%rdi,%rdx,1),%eax
imul   %esi,%eax
ret

LLVM IR (-O0):
define i32 @indexVecTable(i32 %0, i32 %1, i32 %2, i32 %3) {
%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 %3, i32* %8
%9 = load i32, i32* %8
%10 = load i32, i32* %5
%11 = mul nsw i32 %9, %10
%12 = load i32, i32* %7
%13 = add nsw i32 %11, %12
%14 = load i32, i32* %6
%15 = mul nsw i32 %13, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @indexVecTable(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = mul nsw i32 %3, %0
%6 = add nsw i32 %5, %2
%7 = mul nsw i32 %6, %1
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ ArgText();
char *TextOf(int /*<<< orphan*/);
int unlink(char *);
int Cnd_Delete() {
  char *x = TextOf(ArgText());
  if (unlink(x) == -1)
    return (0);
  return (1);
}


x86 assembly (clang, -O0):
<Cnd_Delete>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <ArgText@plt>
mov    %eax,%edi
call   1050 <TextOf@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <unlink@plt>
cmp    $0xffffffff,%eax
jne    1168 <Cnd_Delete+0x38>
movl   $0x0,-0x4(%rbp)
jmp    116f <Cnd_Delete+0x3f>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cnd_Delete>:
push   %rax
xor    %eax,%eax
call   1040 <ArgText@plt>
mov    %eax,%edi
call   1050 <TextOf@plt>
mov    %rax,%rdi
call   1030 <unlink@plt>
xor    %ecx,%ecx
cmp    $0xffffffff,%eax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @Cnd_Delete() {
%1 = tail call i32 (...) @ArgText()
%2 = tail call i8* @TextOf(i32 %1)
%3 = tail call i32 @unlink(i8* %2)
%4 = icmp ne i32 %3, -1
%5 = zext i1 %4 to i32
ret i32 %5
}
unsigned long getNextAmplitudeSaw(unsigned long currentAmplitude,
                                  unsigned long currentTime,
                                  unsigned long currentFrequency) {}


x86 assembly (clang, -O0):
<getNextAmplitudeSaw>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i64 @getNextAmplitudeSaw(i64 %0, i64 %1, i64 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
store i64 %0, i64* %5
store i64 %1, i64* %6
store i64 %2, i64* %7
%8 = load i64, i64* %4
ret i64 %8
}

LLVM IR (-O2):
define i64 @getNextAmplitudeSaw(i64 %0, i64 %1, i64 %2) {
ret i64 undef
}
/* Variables and functions */
int fsetxattr(int fd, const char *name, const char *value, size_t size,
              int flags) {
  return 0;
}


x86 assembly (clang, -O0):
<fsetxattr>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @fsetxattr(i32 %0, i8* %1, i8* %2, i64 %3, i32 %4) {
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i64
%10 = alloca i32
store i32 %0, i32* %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i64 %3, i64* %9
store i32 %4, i32* %10
ret i32 0
}

LLVM IR (-O2):
define i32 @fsetxattr(i32 %0, i8* nocapture readnone %1, i8* nocapture readnone %2, i64 %3, i32 %4) {
ret i32 0
}