xunge/DecIR huggingface dataset:
BOOST_AUTO_TEST_CASE(root) {
  TESTCASE1(root, 1, 1);
  TESTCASE1(root, 81, 9);
  TESTCASE1(root, 1 / 4, 0.5);
  TESTCASE1(root, 9 / 100, 0.3);
}


x86 assembly (clang, -O0):
<BOOST_AUTO_TEST_CASE>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    $0x1,%edx
mov    %edx,%esi
mov    $0x0,%al
call   1030 <TESTCASE1@plt>
mov    -0x8(%rbp),%edi
mov    $0x51,%esi
mov    $0x9,%edx
mov    $0x0,%al
call   1030 <TESTCASE1@plt>
mov    -0x8(%rbp),%edi
xor    %esi,%esi
movsd  0xebb(%rip),%xmm0
mov    $0x1,%al
call   1030 <TESTCASE1@plt>
mov    -0x8(%rbp),%edi
xor    %esi,%esi
movsd  0xe9f(%rip),%xmm0
mov    $0x1,%al
call   1030 <TESTCASE1@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BOOST_AUTO_TEST_CASE>:
push   %rbx
mov    %edi,%ebx
mov    $0x1,%esi
mov    $0x1,%edx
xor    %eax,%eax
call   1030 <TESTCASE1@plt>
mov    %ebx,%edi
mov    $0x51,%esi
mov    $0x9,%edx
xor    %eax,%eax
call   1030 <TESTCASE1@plt>
movsd  0xec1(%rip),%xmm0
mov    %ebx,%edi
xor    %esi,%esi
mov    $0x1,%al
call   1030 <TESTCASE1@plt>
movsd  0xeb6(%rip),%xmm0
mov    %ebx,%edi
xor    %esi,%esi
mov    $0x1,%al
pop    %rbx
jmp    1030 <TESTCASE1@plt>

LLVM IR (-O0):
define i32 @BOOST_AUTO_TEST_CASE(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @TESTCASE1 to i32 (i32, i32, i32, ...)*)(i32 %4, i32 1, i32 1)
%6 = load i32, i32* %3
%7 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @TESTCASE1 to i32 (i32, i32, i32, ...)*)(i32 %6, i32 81, i32 9)
%8 = load i32, i32* %3
%9 = call i32 (i32, i32, double, ...) bitcast (i32 (...)* @TESTCASE1 to i32 (i32, i32, double, ...)*)(i32 %8, i32 0, double 5.000000e-01)
%10 = load i32, i32* %3
%11 = call i32 (i32, i32, double, ...) bitcast (i32 (...)* @TESTCASE1 to i32 (i32, i32, double, ...)*)(i32 %10, i32 0, double 3.000000e-01)
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @BOOST_AUTO_TEST_CASE(i32 %0) {
%2 = tail call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @TESTCASE1 to i32 (i32, i32, i32, ...)*)(i32 %0, i32 1, i32 1)
%3 = tail call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @TESTCASE1 to i32 (i32, i32, i32, ...)*)(i32 %0, i32 81, i32 9)
%4 = tail call i32 (i32, i32, double, ...) bitcast (i32 (...)* @TESTCASE1 to i32 (i32, i32, double, ...)*)(i32 %0, i32 0, double 5.000000e-01)
%5 = tail call i32 (i32, i32, double, ...) bitcast (i32 (...)* @TESTCASE1 to i32 (i32, i32, double, ...)*)(i32 %0, i32 0, double 3.000000e-01)
ret i32 undef
}
int bar(int y) { return y * 2; }


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

x86 assembly (clang, -O2):
<bar>:
lea    (%rdi,%rdi,1),%eax
ret

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

LLVM IR (-O2):
define i32 @bar(i32 %0) {
%2 = shl nsw i32 %0, 1
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ test(char *);
int /*<<< orphan*/ test2(char *);
int /*<<< orphan*/ test3(char *);
int /*<<< orphan*/ tokenize(char *);
int main() {
  char *str = "select * from mytable where city = 'Auckland' ;";
  test(str);
  test2(str);
  test3(str);
  tokenize(str);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1060 <test@plt>
mov    -0x10(%rbp),%rdi
call   1050 <test2@plt>
mov    -0x10(%rbp),%rdi
call   1030 <test3@plt>
mov    -0x10(%rbp),%rdi
call   1040 <tokenize@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xeb8(%rip),%rbx
mov    %rbx,%rdi
call   1060 <test@plt>
mov    %rbx,%rdi
call   1050 <test2@plt>
mov    %rbx,%rdi
call   1030 <test3@plt>
mov    %rbx,%rdi
call   1040 <tokenize@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [48 x i8] c"select * from mytable where city = 'Auckland' ;\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
store i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @test(i8* %3)
%5 = load i8*, i8** %2
%6 = call i32 @test2(i8* %5)
%7 = load i8*, i8** %2
%8 = call i32 @test3(i8* %7)
%9 = load i8*, i8** %2
%10 = call i32 @tokenize(i8* %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [48 x i8] c"select * from mytable where city = 'Auckland' ;\00"
define i32 @main() {
%1 = tail call i32 @test(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @test2(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @test3(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @tokenize(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
int check_prime(int num) {
  int i = 2;
  for (i = 2; i <= num - 1; i++) {
    if (num % i == 0) {
      return 0;
    }
  }
  { return 1; }
}


x86 assembly (clang, -O0):
<check_prime>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
movl   $0x2,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     1155 <check_prime+0x55>
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
cmp    $0x0,%edx
jne    1142 <check_prime+0x42>
movl   $0x0,-0x4(%rbp)
jmp    115c <check_prime+0x5c>
jmp    1147 <check_prime+0x47>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1115 <check_prime+0x15>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_prime>:
mov    $0x1,%ecx
cmp    $0x3,%edi
jl     1120 <check_prime+0x20>
mov    $0x2,%esi
nop
mov    %edi,%eax
cltd
idiv   %esi
test   %edx,%edx
je     1123 <check_prime+0x23>
add    $0x1,%esi
cmp    %esi,%edi
jne    1110 <check_prime+0x10>
mov    %ecx,%eax
ret
xor    %ecx,%ecx
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @check_prime(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 2, i32* %4
store i32 2, i32* %4
br label %5
5: ; preds = %17, %1
%6 = load i32, i32* %4
%7 = load i32, i32* %3
%8 = sub nsw i32 %7, 1
%9 = icmp sle i32 %6, %8
br i1 %9, label %10, label %20
10: ; preds = %5
%11 = load i32, i32* %3
%12 = load i32, i32* %4
%13 = srem i32 %11, %12
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %10
store i32 0, i32* %2
br label %21
16: ; preds = %10
br label %17
17: ; preds = %16
%18 = load i32, i32* %4
%19 = add nsw i32 %18, 1
store i32 %19, i32* %4
br label %5
20: ; preds = %5
store i32 1, i32* %2
br label %21
21: ; preds = %20, %15
%22 = load i32, i32* %2
ret i32 %22
}

LLVM IR (-O2):
define i32 @check_prime(i32 %0) {
%2 = icmp sgt i32 %0, 2
br i1 %2, label %5, label %10
3: ; preds = %5
%4 = icmp eq i32 %9, %0
br i1 %4, label %10, label %5
5: ; preds = %1, %3
%6 = phi i32 [ %9, %3 ], [ 2, %1 ]
%7 = srem i32 %0, %6
%8 = icmp eq i32 %7, 0
%9 = add nuw nsw i32 %6, 1
br i1 %8, label %10, label %3
10: ; preds = %5, %3, %1
%11 = phi i32 [ 1, %1 ], [ 1, %3 ], [ 0, %5 ]
ret i32 %11
}
/* Variables and functions */
scalar_t__ xls_is_bigendian();
unsigned short xlsShortVal(short s) {
  unsigned char c1, c2;
  if (xls_is_bigendian()) {
    c1 = s & 255;
    c2 = (s >> 8) & 255;
    return (c1 << 8) + c2;
  } else {
    return s;
  }
}


x86 assembly (clang, -O0):
<xlsShortVal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <xls_is_bigendian@plt>
cmp    $0x0,%rax
je     1161 <xlsShortVal+0x51>
movswl -0x4(%rbp),%eax
and    $0xff,%eax
mov    %al,-0x5(%rbp)
movswl -0x4(%rbp),%eax
sar    $0x8,%eax
and    $0xff,%eax
mov    %al,-0x6(%rbp)
movzbl -0x5(%rbp),%eax
shl    $0x8,%eax
movzbl -0x6(%rbp),%ecx
add    %ecx,%eax
mov    %ax,-0x2(%rbp)
jmp    1169 <xlsShortVal+0x59>
mov    -0x4(%rbp),%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xlsShortVal>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <xls_is_bigendian@plt>
mov    %ebx,%ecx
rol    $0x8,%cx
test   %rax,%rax
cmove  %ebx,%ecx
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define zeroext i16 @xlsShortVal(i16 signext %0) {
%2 = alloca i16
%3 = alloca i16
%4 = alloca i8
%5 = alloca i8
store i16 %0, i16* %3
%6 = call i64 (...) @xls_is_bigendian()
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %25
8: ; preds = %1
%9 = load i16, i16* %3
%10 = sext i16 %9 to i32
%11 = and i32 %10, 255
%12 = trunc i32 %11 to i8
store i8 %12, i8* %4
%13 = load i16, i16* %3
%14 = sext i16 %13 to i32
%15 = ashr i32 %14, 8
%16 = and i32 %15, 255
%17 = trunc i32 %16 to i8
store i8 %17, i8* %5
%18 = load i8, i8* %4
%19 = zext i8 %18 to i32
%20 = shl i32 %19, 8
%21 = load i8, i8* %5
%22 = zext i8 %21 to i32
%23 = add nsw i32 %20, %22
%24 = trunc i32 %23 to i16
store i16 %24, i16* %2
br label %27
25: ; preds = %1
%26 = load i16, i16* %3
store i16 %26, i16* %2
br label %27
27: ; preds = %25, %8
%28 = load i16, i16* %2
ret i16 %28
}

LLVM IR (-O2):
define zeroext i16 @xlsShortVal(i16 signext %0) {
%2 = tail call i64 (...) @xls_is_bigendian()
%3 = icmp eq i64 %2, 0
%4 = tail call i16 @llvm.bswap.i16(i16 %0)
%5 = select i1 %3, i16 %0, i16 %4
ret i16 %5
}
/* Variables and functions */
int /*<<< orphan*/ VIM_SIF_I2cWriteByte(unsigned char, unsigned char);
void SensorSetReg_S5K83A(unsigned char uAddr, unsigned short uVal) {
  VIM_SIF_I2cWriteByte((unsigned char)uAddr, (unsigned char)uVal);
}


x86 assembly (clang, -O0):
<SensorSetReg_S5K83A>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %ax,-0x4(%rbp)
mov    -0x1(%rbp),%cl
mov    -0x4(%rbp),%ax
movzbl %cl,%edi
movzbl %al,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SensorSetReg_S5K83A>:
movzbl %sil,%esi
jmp    1030 <VIM_SIF_I2cWriteByte@plt>

LLVM IR (-O0):
define void @SensorSetReg_S5K83A(i8 zeroext %0, i16 zeroext %1) {
%3 = alloca i8
%4 = alloca i16
store i8 %0, i8* %3
store i16 %1, i16* %4
%5 = load i8, i8* %3
%6 = load i16, i16* %4
%7 = trunc i16 %6 to i8
%8 = call i32 @VIM_SIF_I2cWriteByte(i8 zeroext %5, i8 zeroext %7)
ret void
}

LLVM IR (-O2):
define void @SensorSetReg_S5K83A(i8 zeroext %0, i16 zeroext %1) {
%3 = trunc i16 %1 to i8
%4 = tail call i32 @VIM_SIF_I2cWriteByte(i8 zeroext %0, i8 zeroext %3)
ret void
}
int acia_dump(void *acia_context) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @acia_dump(i8* nocapture readnone %0) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void err_msg(const char *msg) {
  fprintf(stderr, "%s\n", msg);
  exit(EXIT_FAILURE);
}


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

x86 assembly (clang, -O2):
<err_msg>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
@EXIT_FAILURE = global i32 0
define void @err_msg(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 ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @EXIT_FAILURE
%7 = call i32 @exit(i32 %6)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
@EXIT_FAILURE = global i32 0
define void @err_msg(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @EXIT_FAILURE
%5 = tail call i32 @exit(i32 %4)
unreachable
}
/* Type definitions */
struct _Locale_numeric {
  int dummy;
};

/* Variables and functions */
char _Locale_decimal_point(struct _Locale_numeric *lnum) { return '.'; }


x86 assembly (clang, -O0):
<_Locale_decimal_point>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    $0x2e,%al
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_Locale_decimal_point>:
mov    $0x2e,%al
ret

LLVM IR (-O0):
%struct._Locale_numeric = type { i32 }
define signext i8 @_Locale_decimal_point(%struct._Locale_numeric* %0) {
%2 = alloca %struct._Locale_numeric*
store %struct._Locale_numeric* %0, %struct._Locale_numeric** %2
ret i8 46
}

LLVM IR (-O2):
%struct._Locale_numeric = type { i32 }
define signext i8 @_Locale_decimal_point(%struct._Locale_numeric* nocapture readnone %0) {
ret i8 46
}
/* Variables and functions */
int /*<<< orphan*/ O_RDONLY;
int /*<<< orphan*/ SEEK_END;
int /*<<< orphan*/ fild_Close(int);
int fild_Lseek(int, int /*<<< orphan*/, int /*<<< orphan*/);
int fild_Open(char const *, int /*<<< orphan*/, int /*<<< orphan*/);
int fild_GetFileSize(const char *pathname) {
  int size = -1, fd;
  fd = fild_Open(pathname, O_RDONLY, 0);
  if (fd != -1) {
    size = fild_Lseek(fd, 0, SEEK_END);
    fild_Close(fd);
  }
  return size;
}


x86 assembly (clang, -O0):
<fild_GetFileSize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0xffffffff,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2e92(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <fild_Open@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0xffffffff,-0x10(%rbp)
je     1182 <fild_GetFileSize+0x52>
mov    -0x10(%rbp),%edi
mov    0x2e7a(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1040 <fild_Lseek@plt>
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%edi
call   1050 <fild_Close@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fild_GetFileSize>:
push   %rbp
push   %rbx
push   %rax
mov    0x2ea6(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <fild_Open@plt>
cmp    $0xffffffff,%eax
je     1169 <fild_GetFileSize+0x39>
mov    %eax,%ebx
mov    0x2e97(%rip),%rax
mov    (%rax),%edx
mov    %ebx,%edi
xor    %esi,%esi
call   1040 <fild_Lseek@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1050 <fild_Close@plt>
mov    %ebp,%eax
jmp    116e <fild_GetFileSize+0x3e>
mov    $0xffffffff,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@O_RDONLY = global i32 0
@SEEK_END = global i32 0
define i32 @fild_GetFileSize(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
store i8* %0, i8** %2
store i32 -1, i32* %3
%5 = load i8*, i8** %2
%6 = load i32, i32* @O_RDONLY
%7 = call i32 @fild_Open(i8* %5, i32 %6, i32 0)
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = icmp ne i32 %8, -1
br i1 %9, label %10, label %16
10: ; preds = %1
%11 = load i32, i32* %4
%12 = load i32, i32* @SEEK_END
%13 = call i32 @fild_Lseek(i32 %11, i32 0, i32 %12)
store i32 %13, i32* %3
%14 = load i32, i32* %4
%15 = call i32 @fild_Close(i32 %14)
br label %16
16: ; preds = %10, %1
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
@O_RDONLY = global i32 0
@SEEK_END = global i32 0
define i32 @fild_GetFileSize(i8* %0) {
%2 = load i32, i32* @O_RDONLY
%3 = tail call i32 @fild_Open(i8* %0, i32 %2, i32 0)
%4 = icmp eq i32 %3, -1
br i1 %4, label %9, label %5
5: ; preds = %1
%6 = load i32, i32* @SEEK_END
%7 = tail call i32 @fild_Lseek(i32 %3, i32 0, i32 %6)
%8 = tail call i32 @fild_Close(i32 %3)
br label %9
9: ; preds = %5, %1
%10 = phi i32 [ %7, %5 ], [ -1, %1 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ cpuid(int, int *, int *, int *, int *);
int cpuidFeature() {
  int a, b, c, d;
  cpuid(1, &a, &b, &c, &d);
  return d;
}


x86 assembly (clang, -O0):
<cpuidFeature>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x1,%edi
lea    -0x4(%rbp),%rsi
lea    -0x8(%rbp),%rdx
lea    -0xc(%rbp),%rcx
lea    -0x10(%rbp),%r8
call   1030 <cpuid@plt>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpuidFeature>:
sub    $0x18,%rsp
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
lea    0x8(%rsp),%r8
mov    $0x1,%edi
call   1030 <cpuid@plt>
mov    0x8(%rsp),%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @cpuidFeature() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = call i32 @cpuid(i32 1, i32* %1, i32* %2, i32* %3, i32* %4)
%6 = load i32, i32* %4
ret i32 %6
}

LLVM IR (-O2):
define i32 @cpuidFeature() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %1 to i8*
%6 = bitcast i32* %2 to i8*
%7 = bitcast i32* %3 to i8*
%8 = bitcast i32* %4 to i8*
%9 = call i32 @cpuid(i32 1, i32* %1, i32* %2, i32* %3, i32* %4)
%10 = load i32, i32* %4
ret i32 %10
}
void Hal_hook_wr_sgndrecfield_recelemd(void) {}


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

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

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

LLVM IR (-O2):
define void @Hal_hook_wr_sgndrecfield_recelemd() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ nsblk_who(char *, int);
void nsblk_eggs_who(int id) { nsblk_who("eggs", id); }


x86 assembly (clang, -O0):
<nsblk_eggs_who>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xedb(%rip),%rdi
call   1030 <nsblk_who@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nsblk_eggs_who>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <nsblk_who@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c"eggs\00"
define void @nsblk_eggs_who(i32 %0) {
%2 = tail call i32 @nsblk_who(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ binit();
int /*<<< orphan*/ bsort();
int /*<<< orphan*/ print();
int main() {
  binit();
  print();
  bsort();
  print();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @binit()
%3 = call i32 (...) @print()
%4 = call i32 (...) @bsort()
%5 = call i32 (...) @print()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @binit()
%2 = tail call i32 (...) @print()
%3 = tail call i32 (...) @bsort()
%4 = tail call i32 (...) @print()
ret i32 0
}
void udp_event(void) {}


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

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

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

LLVM IR (-O2):
define void @udp_event() {
ret void
}
int convert(int a) {
  if ((a % 100 == 11) || (a % 100 == 12) || (a % 100 == 13))
    return (a / 100) * 100 + 10;
  else
    return a;
}


x86 assembly (clang, -O0):
<convert>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
cmp    $0xb,%edx
je     1143 <convert+0x43>
mov    -0x8(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
cmp    $0xc,%edx
je     1143 <convert+0x43>
mov    -0x8(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
cmp    $0xd,%edx
jne    115c <convert+0x5c>
mov    -0x8(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
imul   $0x64,%eax,%eax
add    $0xa,%eax
mov    %eax,-0x4(%rbp)
jmp    1162 <convert+0x62>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<convert>:
movslq %edi,%rcx
imul   $0x51eb851f,%rcx,%rax
mov    %rax,%rdx
shr    $0x3f,%rdx
sar    $0x25,%rax
add    %edx,%eax
imul   $0x64,%eax,%eax
mov    %ecx,%edx
sub    %eax,%edx
add    $0xfffffff5,%edx
add    $0xa,%eax
cmp    $0x3,%edx
cmovae %ecx,%eax
ret

LLVM IR (-O0):
define i32 @convert(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = srem i32 %4, 100
%6 = icmp eq i32 %5, 11
br i1 %6, label %15, label %7
7: ; preds = %1
%8 = load i32, i32* %3
%9 = srem i32 %8, 100
%10 = icmp eq i32 %9, 12
br i1 %10, label %15, label %11
11: ; preds = %7
%12 = load i32, i32* %3
%13 = srem i32 %12, 100
%14 = icmp eq i32 %13, 13
br i1 %14, label %15, label %20
15: ; preds = %11, %7, %1
%16 = load i32, i32* %3
%17 = sdiv i32 %16, 100
%18 = mul nsw i32 %17, 100
%19 = add nsw i32 %18, 10
store i32 %19, i32* %2
br label %22
20: ; preds = %11
%21 = load i32, i32* %3
store i32 %21, i32* %2
br label %22
22: ; preds = %20, %15
%23 = load i32, i32* %2
ret i32 %23
}

LLVM IR (-O2):
define i32 @convert(i32 %0) {
%2 = srem i32 %0, 100
%3 = add nsw i32 %2, -11
%4 = icmp ult i32 %3, 3
%5 = add i32 %0, 10
%6 = sub i32 %5, %2
%7 = select i1 %4, i32 %6, i32 %0
ret i32 %7
}
int kr_func2(a, b) { return a + b; }


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

x86 assembly (clang, -O2):
<kr_func2>:
lea    (%rdi,%rsi,1),%eax
ret

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

LLVM IR (-O2):
define i32 @kr_func2(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ parallel_clr_dav(int);
int /*<<< orphan*/ parallel_set_dav(int);
void parallel_drv3_set_dav(unsigned char val) {
  if (val) {
    parallel_set_dav(0x20);
  } else {
    parallel_clr_dav(~0x20);
  }
}


x86 assembly (clang, -O0):
<parallel_drv3_set_dav>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
cmpb   $0x0,-0x1(%rbp)
je     1147 <parallel_drv3_set_dav+0x27>
mov    $0x20,%edi
call   1040 <parallel_set_dav@plt>
jmp    1151 <parallel_drv3_set_dav+0x31>
mov    $0xffffffdf,%edi
call   1030 <parallel_clr_dav@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parallel_drv3_set_dav>:
test   %edi,%edi
je     112e <parallel_drv3_set_dav+0xe>
mov    $0x20,%edi
jmp    1040 <parallel_set_dav@plt>
mov    $0xffffffdf,%edi
jmp    1030 <parallel_clr_dav@plt>

LLVM IR (-O0):
define void @parallel_drv3_set_dav(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = icmp ne i8 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 @parallel_set_dav(i32 32)
br label %9
7: ; preds = %1
%8 = call i32 @parallel_clr_dav(i32 -33)
br label %9
9: ; preds = %7, %5
ret void
}

LLVM IR (-O2):
define void @parallel_drv3_set_dav(i8 zeroext %0) {
%2 = icmp eq i8 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @parallel_set_dav(i32 32)
br label %7
5: ; preds = %1
%6 = tail call i32 @parallel_clr_dav(i32 -33)
br label %7
7: ; preds = %5, %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int16_t;

/* Variables and functions */
int /*<<< orphan*/ od_filter_dering_direction_c(int /*<<< orphan*/ *, int,
                                                int /*<<< orphan*/ const *, int,
                                                int, int);
void od_filter_dering_direction_4x4_c(int16_t *y, int ystride,
                                      const int16_t *in, int threshold,
                                      int dir) {
  od_filter_dering_direction_c(y, ystride, in, 2, threshold, dir);
}


x86 assembly (clang, -O0):
<od_filter_dering_direction_4x4_c>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%r8d
mov    -0x20(%rbp),%r9d
mov    $0x2,%ecx
call   1030 <od_filter_dering_direction_c@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<od_filter_dering_direction_4x4_c>:
mov    %r8d,%r9d
mov    %ecx,%r8d
mov    $0x2,%ecx
jmp    1030 <od_filter_dering_direction_c@plt>

LLVM IR (-O0):
define void @od_filter_dering_direction_4x4_c(i32* %0, i32 %1, i32* %2, i32 %3, i32 %4) {
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32*
%9 = alloca i32
%10 = alloca i32
store i32* %0, i32** %6
store i32 %1, i32* %7
store i32* %2, i32** %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load i32*, i32** %6
%12 = load i32, i32* %7
%13 = load i32*, i32** %8
%14 = load i32, i32* %9
%15 = load i32, i32* %10
%16 = call i32 @od_filter_dering_direction_c(i32* %11, i32 %12, i32* %13, i32 2, i32 %14, i32 %15)
ret void
}

LLVM IR (-O2):
define void @od_filter_dering_direction_4x4_c(i32* %0, i32 %1, i32* %2, i32 %3, i32 %4) {
%6 = tail call i32 @od_filter_dering_direction_c(i32* %0, i32 %1, i32* %2, i32 2, i32 %3, i32 %4)
ret void
}
/* Variables and functions */
int tkNetMain(int, char **);
int main(int n, char **args) { return tkNetMain(n, args); }


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    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <tkNetMain@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
jmp    1030 <tkNetMain@plt>

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 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = call i32 @tkNetMain(i32 %6, i8** %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @tkNetMain(i32 %0, i8** %1)
ret i32 %3
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ y_root;
};
typedef TYPE_1__ XKeyReleasedEvent;

/* Variables and functions */
int get_XKeyReleasedEvent_y_root(void *_p) {
  return (int)((XKeyReleasedEvent *)_p)->y_root;
}


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

x86 assembly (clang, -O2):
<get_XKeyReleasedEvent_y_root>:
mov    (%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @get_XKeyReleasedEvent_y_root(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ msgIfgetenv(int *);
void msg_ifgetenv_(int *const STATUS) {
  int status;
  status = *STATUS;
  msgIfgetenv(&status);
  *STATUS = status;
}


x86 assembly (clang, -O0):
<msg_ifgetenv_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
lea    -0xc(%rbp),%rdi
call   1030 <msgIfgetenv@plt>
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<msg_ifgetenv_>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
mov    (%rdi),%eax
mov    %eax,0xc(%rsp)
lea    0xc(%rsp),%rdi
call   1030 <msgIfgetenv@plt>
mov    0xc(%rsp),%eax
mov    %eax,(%rbx)
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @msg_ifgetenv_(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = load i32, i32* %4
store i32 %5, i32* %3
%6 = call i32 @msgIfgetenv(i32* %3)
%7 = load i32, i32* %3
%8 = load i32*, i32** %2
store i32 %7, i32* %8
ret void
}

LLVM IR (-O2):
define void @msg_ifgetenv_(i32* nocapture %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = load i32, i32* %0
store i32 %4, i32* %2
%5 = call i32 @msgIfgetenv(i32* %2)
%6 = load i32, i32* %2
store i32 %6, i32* %0
ret void
}
void DebugMemCheckFree(void) {}


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

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

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

LLVM IR (-O2):
define void @DebugMemCheckFree() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ clear_video();
int /*<<< orphan*/ update_video();
void draw_final() {
  update_video();
  clear_video();
}


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

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

LLVM IR (-O0):
define void @draw_final() {
%1 = call i32 (...) @update_video()
%2 = call i32 (...) @clear_video()
ret void
}

LLVM IR (-O2):
define void @draw_final() {
%1 = tail call i32 (...) @update_video()
%2 = tail call i32 (...) @clear_video()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  switch (sizeof(long double)) {
  case 10:
  case 12:
    printf("cp x.ou1 x.out; cp xL.ou1 xL.out; cp Q.ou0 Q.out\n");
    break;
  case 16:
    printf("cp x.ou0 x.out; cp xL.ou0 xL.out; cp Q.ou1 Q.out\n");
    break;
  default:
    printf("cp x.ou0 x.out; cp xL.ou0 xL.out; cp Q.ou0 Q.out\n");
  }
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [50 x i8] c"cp x.ou0 x.out; cp xL.ou0 xL.out; cp Q.ou1 Q.out\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [49 x i8] c"cp x.ou0 x.out; cp xL.ou0 xL.out; cp Q.ou1 Q.out\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
scalar_t__ dcac_acl_ops(int, int, int, char const *, char const *);
int dcac_set_attr_acl(int afd, int ffd, const char *addacl,
                      const char *modacl) {
  return (int)dcac_acl_ops(24, afd, ffd, addacl, modacl);
}


x86 assembly (clang, -O0):
<dcac_set_attr_acl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8
mov    $0x18,%edi
call   1030 <dcac_acl_ops@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dcac_set_attr_acl>:
mov    %rcx,%r8
mov    %rdx,%rcx
mov    %esi,%edx
mov    %edi,%esi
mov    $0x18,%edi
jmp    1030 <dcac_acl_ops@plt>

LLVM IR (-O0):
define i32 @dcac_set_attr_acl(i32 %0, i32 %1, i8* %2, i8* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
store i32 %0, i32* %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = load i8*, i8** %7
%12 = load i8*, i8** %8
%13 = call i64 @dcac_acl_ops(i32 24, i32 %9, i32 %10, i8* %11, i8* %12)
%14 = trunc i64 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
define i32 @dcac_set_attr_acl(i32 %0, i32 %1, i8* %2, i8* %3) {
%5 = tail call i64 @dcac_acl_ops(i32 24, i32 %0, i32 %1, i8* %2, i8* %3)
%6 = trunc i64 %5 to i32
ret i32 %6
}
unsigned int m_max_uint(unsigned int left, unsigned int right) {
  return (left > right) ? left : right;
}


x86 assembly (clang, -O0):
<m_max_uint>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jbe    1121 <m_max_uint+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <m_max_uint+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<m_max_uint>:
mov    %esi,%eax
cmp    %esi,%edi
cmova  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @m_max_uint(i32 %0, i32 %1) {
%3 = icmp ugt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
void pthread_cond_destroy() {}


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

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

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

LLVM IR (-O2):
define void @pthread_cond_destroy() {
ret void
}
float test4f(float x) { return __builtin_expf(x); }


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

x86 assembly (clang, -O2):
<test4f>:
jmp    1030 <expf@plt>

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

LLVM IR (-O2):
define float @test4f(float %0) {
%2 = tail call float @expf(float %0)
ret float %2
}
void foo616(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo616(i32 %0) {
ret void
}
__attribute__((visibility("hidden"))) double conv_double_to_int_fast(double x) {
  return ((x + 6755399441055744.0) - 6755399441055744.0);
}


x86 assembly (clang, -O0):
<conv_double_to_int_fast>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
movsd  0xee2(%rip),%xmm1
subsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<conv_double_to_int_fast>:
addsd  0xef8(%rip),%xmm0
addsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define hidden double @conv_double_to_int_fast(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fadd double %3, 0x4338000000000000
%5 = fsub double %4, 0x4338000000000000
ret double %5
}

LLVM IR (-O2):
define hidden double @conv_double_to_int_fast(double %0) {
%2 = fadd double %0, 0x4338000000000000
%3 = fadd double %2, 0xC338000000000000
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ CALC_appendString(char *);
void CALC_addLPth() { CALC_appendString("("); }


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

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

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

LLVM IR (-O2):
@.str = [2 x i8] c"(\00"
define void @CALC_addLPth() {
%1 = tail call i32 @CALC_appendString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int facttail(int, int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int n = 4;
  int a = 1;
  printf("result is %d\n", facttail(n, a));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x4,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <facttail@plt>
mov    %eax,%esi
lea    0xeaf(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x4,%edi
mov    $0x1,%esi
call   1040 <facttail@plt>
lea    0xec9(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"result is %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 4, i32* %2
store i32 1, i32* %3
%4 = load i32, i32* %2
%5 = load i32, i32* %3
%6 = call i32 @facttail(i32 %4, i32 %5)
%7 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"result is %d\0A\00"
define i32 @main() {
%1 = tail call i32 @facttail(i32 4, i32 1)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
size_t fread(void *, int, size_t, int /*<<< orphan*/ *);
size_t MyReadFile(FILE *file, void *data, size_t size) {
  return fread(data, 1, size, file);
}


x86 assembly (clang, -O0):
<MyReadFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    -0x8(%rbp),%rcx
mov    $0x1,%esi
call   1030 <fread@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MyReadFile>:
mov    %rdi,%rcx
mov    %rsi,%rdi
mov    $0x1,%esi
jmp    1030 <fread@plt>

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

LLVM IR (-O2):
define i64 @MyReadFile(i32* nocapture %0, i8* nocapture %1, i64 %2) {
%4 = tail call i64 @fread(i8* %1, i32 1, i64 %2, i32* %0)
ret i64 %4
}
void init_des_cipher(void) {}


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

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

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

LLVM IR (-O2):
define void @init_des_cipher() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ middle();
void bottom() { middle(); }


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

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

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

LLVM IR (-O2):
define void @bottom() {
%1 = tail call i32 (...) @middle()
ret void
}
/* Variables and functions */
int read(int, char *, int);
int write(int, char *, int);
void cat_fd(int fd) {
  char buffer[0x100];
  int r;
  while (1) {
    r = read(fd, buffer, sizeof buffer);
    if (r <= 0)
      break;
    r = write(1, buffer, r);
    if (r <= 0)
      break;
  }
}


x86 assembly (clang, -O0):
<cat_fd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x110(%rbp),%rsi
mov    $0x100,%edx
call   1040 <read@plt>
mov    %eax,-0x114(%rbp)
cmpl   $0x0,-0x114(%rbp)
jg     115a <cat_fd+0x3a>
jmp    118e <cat_fd+0x6e>
lea    -0x110(%rbp),%rsi
mov    -0x114(%rbp),%edx
mov    $0x1,%edi
call   1030 <write@plt>
mov    %eax,-0x114(%rbp)
cmpl   $0x0,-0x114(%rbp)
jg     1189 <cat_fd+0x69>
jmp    118e <cat_fd+0x6e>
jmp    112e <cat_fd+0xe>
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cat_fd>:
push   %r14
push   %rbx
sub    $0x108,%rsp
mov    %edi,%ebx
mov    %rsp,%r14
nop
mov    %ebx,%edi
mov    %r14,%rsi
mov    $0x100,%edx
call   1040 <read@plt>
test   %eax,%eax
jle    1156 <cat_fd+0x36>
mov    $0x1,%edi
mov    %r14,%rsi
mov    %eax,%edx
call   1030 <write@plt>
test   %eax,%eax
jg     1130 <cat_fd+0x10>
add    $0x108,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @cat_fd(i32 %0) {
%2 = alloca i32
%3 = alloca [256 x i8]
%4 = alloca i32
store i32 %0, i32* %2
br label %5
5: ; preds = %1, %19
%6 = load i32, i32* %2
%7 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%8 = call i32 @read(i32 %6, i8* %7, i32 256)
store i32 %8, i32* %4
%9 = load i32, i32* %4
%10 = icmp sle i32 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %5
br label %20
12: ; preds = %5
%13 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%14 = load i32, i32* %4
%15 = call i32 @write(i32 1, i8* %13, i32 %14)
store i32 %15, i32* %4
%16 = load i32, i32* %4
%17 = icmp sle i32 %16, 0
br i1 %17, label %18, label %19
18: ; preds = %12
br label %20
19: ; preds = %12
br label %5
20: ; preds = %18, %11
ret void
}

LLVM IR (-O2):
define void @cat_fd(i32 %0) {
%2 = alloca [256 x i8]
%3 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
br label %4
4: ; preds = %7, %1
%5 = call i32 @read(i32 %0, i8* %3, i32 256)
%6 = icmp slt i32 %5, 1
br i1 %6, label %10, label %7
7: ; preds = %4
%8 = call i32 @write(i32 1, i8* %3, i32 %5)
%9 = icmp slt i32 %8, 1
br i1 %9, label %10, label %4
10: ; preds = %7, %4
ret void
}
int test_imm_C5int16_reg(short val) {
  return ((val) & (-0xC5 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_C5int16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%edx
and    $0xffffff3b,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_C5int16_reg>:
test   $0xff3b,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_C5int16_reg(i16 signext %0) {
%2 = and i16 %0, -197
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void mbc_mbc3_cleanup() {}


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

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

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

LLVM IR (-O2):
define void @mbc_mbc3_cleanup() {
ret void
}
void _M2_gdbif_finish(__attribute__((unused)) int argc,
                      __attribute__((unused)) char *argv[]) {}


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

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

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

LLVM IR (-O2):
define void @_M2_gdbif_finish(i32 %0, i8** nocapture %1) {
ret void
}
long long int longlongint_ignoring_unsignedlong(long long int x,
                                                unsigned long y) {
  return x;
}


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

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

LLVM IR (-O0):
define i64 @longlongint_ignoring_unsignedlong(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
ret i64 %5
}

LLVM IR (-O2):
define i64 @longlongint_ignoring_unsignedlong(i64 returned %0, i64 %1) {
ret i64 %0
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ MinHeapify(int *, int, int);
void MinHeapCreat(uint32_t *array, uint32_t heapSize) {
  int i = 0;
  for (i = heapSize / 2; i >= 0; i--) {
    MinHeapify(array, heapSize, i);
  }
}


x86 assembly (clang, -O0):
<MinHeapCreat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jl     115b <MinHeapCreat+0x4b>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <MinHeapify@plt>
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    1134 <MinHeapCreat+0x24>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MinHeapCreat>:
push   %rbp
push   %r14
push   %rbx
cmp    $0xffffffff,%esi
jl     1141 <MinHeapCreat+0x31>
mov    %esi,%ebx
mov    %rdi,%r14
mov    %esi,%ebp
shr    $0x1f,%ebp
add    %esi,%ebp
sar    %ebp
nopw   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %ebx,%esi
mov    %ebp,%edx
call   1030 <MinHeapify@plt>
add    $0xffffffff,%ebp
jb     1130 <MinHeapCreat+0x20>
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @MinHeapCreat(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
store i32 0, i32* %5
%6 = load i32, i32* %4
%7 = sdiv i32 %6, 2
store i32 %7, i32* %5
br label %8
8: ; preds = %16, %2
%9 = load i32, i32* %5
%10 = icmp sge i32 %9, 0
br i1 %10, label %11, label %19
11: ; preds = %8
%12 = load i32*, i32** %3
%13 = load i32, i32* %4
%14 = load i32, i32* %5
%15 = call i32 @MinHeapify(i32* %12, i32 %13, i32 %14)
br label %16
16: ; preds = %11
%17 = load i32, i32* %5
%18 = add nsw i32 %17, -1
store i32 %18, i32* %5
br label %8
19: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @MinHeapCreat(i32* %0, i32 %1) {
%3 = icmp sgt i32 %1, -2
br i1 %3, label %4, label %11
4: ; preds = %2
%5 = sdiv i32 %1, 2
br label %6
6: ; preds = %4, %6
%7 = phi i32 [ %9, %6 ], [ %5, %4 ]
%8 = tail call i32 @MinHeapify(i32* %0, i32 %1, i32 %7)
%9 = add nsw i32 %7, -1
%10 = icmp eq i32 %7, 0
br i1 %10, label %11, label %6
11: ; preds = %6, %2
ret void
}
double argInit_real_T_CalcuGainPattern(void) { return 0.0; }


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

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

LLVM IR (-O0):
define double @argInit_real_T_CalcuGainPattern() {
ret double 0.000000e+00
}

LLVM IR (-O2):
define double @argInit_real_T_CalcuGainPattern() {
ret double 0.000000e+00
}