xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ VIM_SIF_I2cReadByte(int, unsigned char *);
int /*<<< orphan*/ VIM_SIF_I2cWriteByte(int, unsigned char);
void SensorSetMirrorFlip_OV7660(unsigned char val) {
  unsigned char x;
  val = ~val;
  VIM_SIF_I2cReadByte(0x1e, &x);
  VIM_SIF_I2cWriteByte(0x1e, (x & 0xcf) | ((val & 0x03) << 4));
}


x86 assembly (clang, -O0):
<SensorSetMirrorFlip_OV7660>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0x1(%rbp)
mov    $0x1e,%edi
lea    -0x2(%rbp),%rsi
call   1030 <VIM_SIF_I2cReadByte@plt>
movzbl -0x2(%rbp),%eax
and    $0xcf,%eax
movzbl -0x1(%rbp),%ecx
and    $0x3,%ecx
shl    $0x4,%ecx
or     %ecx,%eax
mov    $0x1e,%edi
movzbl %al,%esi
call   1040 <VIM_SIF_I2cWriteByte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SensorSetMirrorFlip_OV7660>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
lea    0xf(%rsp),%rsi
mov    $0x1e,%edi
call   1030 <VIM_SIF_I2cReadByte@plt>
mov    0xf(%rsp),%al
and    $0xcf,%al
shl    $0x4,%bl
and    $0x30,%bl
or     %al,%bl
xor    $0x30,%bl
movzbl %bl,%esi
mov    $0x1e,%edi
call   1040 <VIM_SIF_I2cWriteByte@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @SensorSetMirrorFlip_OV7660(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %2
%4 = load i8, i8* %2
%5 = zext i8 %4 to i32
%6 = xor i32 %5, -1
%7 = trunc i32 %6 to i8
store i8 %7, i8* %2
%8 = call i32 @VIM_SIF_I2cReadByte(i32 30, i8* %3)
%9 = load i8, i8* %3
%10 = zext i8 %9 to i32
%11 = and i32 %10, 207
%12 = load i8, i8* %2
%13 = zext i8 %12 to i32
%14 = and i32 %13, 3
%15 = shl i32 %14, 4
%16 = or i32 %11, %15
%17 = trunc i32 %16 to i8
%18 = call i32 @VIM_SIF_I2cWriteByte(i32 30, i8 zeroext %17)
ret void
}

LLVM IR (-O2):
define void @SensorSetMirrorFlip_OV7660(i8 zeroext %0) {
%2 = alloca i8
%3 = call i32 @VIM_SIF_I2cReadByte(i32 30, i8* %2)
%4 = load i8, i8* %2
%5 = and i8 %4, -49
%6 = shl i8 %0, 4
%7 = and i8 %6, 48
%8 = or i8 %5, %7
%9 = xor i8 %8, 48
%10 = call i32 @VIM_SIF_I2cWriteByte(i32 30, i8 zeroext %9)
ret void
}
long char_length(string)
char string[];
{
  char *pstr;
  pstr = string;
  for (; *pstr != (char)'\0'; pstr++) {
  }
  return ((long)(pstr - string));
}


x86 assembly (clang, -O0):
<char_length>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1136 <char_length+0x36>
jmp    1125 <char_length+0x25>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <char_length+0x10>
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<char_length>:
mov    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <char_length+0x10>
ret

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

LLVM IR (-O2):
define i64 @char_length(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %6, %2 ]
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 0
%6 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %5, label %7, label %2
7: ; preds = %2
%8 = ptrtoint i8* %3 to i64
%9 = ptrtoint i8* %0 to i64
%10 = sub i64 %8, %9
ret i64 %10
}
/* Variables and functions */
scalar_t__ malloc(int);
int /*<<< orphan*/ sprintf(char *, char *, char *);
int strlen(char *);
char *create_strong(char *s) {
  char *_str, *format = "<strong>%s</strong>";
  _str = (char *)malloc(strlen(s) + strlen(format) - 2 + 1);
  sprintf(_str, format, s);
  return _str;
}


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

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

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

LLVM IR (-O2):
@.str = [20 x i8] c"<strong>%s</strong>\00"
define i8* @create_strong(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = tail call i32 @strlen(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%4 = add i32 %2, -1
%5 = add i32 %4, %3
%6 = tail call i64 @malloc(i32 %5)
%7 = inttoptr i64 %6 to i8*
%8 = tail call i32 @sprintf(i8* dereferenceable(1) %7, i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i8* %7
}
const char *mpc_get_version(void) { return "0.8.2"; }


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

x86 assembly (clang, -O2):
<mpc_get_version>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [6 x i8] c"0.8.2\00"
define i8* @mpc_get_version() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [6 x i8] c"0.8.2\00"
define i8* @mpc_get_version() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}
void gtk_expander_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gtk_expander_get_type() {
ret void
}
/* Variables and functions */
double dd_two_sum(double, double, double *);
void qd_three_sum2(double *a, double *b, double *c) {
  double t1, t2, t3;
  t1 = dd_two_sum(*a, *b, &t2);
  *a = dd_two_sum(*c, t1, &t3);
  *b = t2 + t3;
}


x86 assembly (clang, -O0):
<qd_three_sum2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm1
lea    -0x28(%rbp),%rdi
call   1030 <dd_two_sum@plt>
movsd  %xmm0,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
movsd  -0x20(%rbp),%xmm1
lea    -0x30(%rbp),%rdi
call   1030 <dd_two_sum@plt>
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x28(%rbp),%xmm0
addsd  -0x30(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<qd_three_sum2>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
movsd  (%rdi),%xmm0
movsd  (%rsi),%xmm1
lea    0x8(%rsp),%rdi
call   1030 <dd_two_sum@plt>
movaps %xmm0,%xmm1
movsd  (%r14),%xmm0
mov    %rsp,%rdi
call   1030 <dd_two_sum@plt>
movsd  %xmm0,(%rbx)
movsd  0x8(%rsp),%xmm0
addsd  (%rsp),%xmm0
movsd  %xmm0,(%r15)
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @qd_three_sum2(double* %0, double* %1, double* %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca double*
%7 = alloca double
%8 = alloca double
%9 = alloca double
store double* %0, double** %4
store double* %1, double** %5
store double* %2, double** %6
%10 = load double*, double** %4
%11 = load double, double* %10
%12 = load double*, double** %5
%13 = load double, double* %12
%14 = call double @dd_two_sum(double %11, double %13, double* %8)
store double %14, double* %7
%15 = load double*, double** %6
%16 = load double, double* %15
%17 = load double, double* %7
%18 = call double @dd_two_sum(double %16, double %17, double* %9)
%19 = load double*, double** %4
store double %18, double* %19
%20 = load double, double* %8
%21 = load double, double* %9
%22 = fadd double %20, %21
%23 = load double*, double** %5
store double %22, double* %23
ret void
}

LLVM IR (-O2):
define void @qd_three_sum2(double* nocapture %0, double* nocapture %1, double* nocapture %2) {
%4 = alloca double
%5 = alloca double
%6 = bitcast double* %4 to i8*
%7 = bitcast double* %5 to i8*
%8 = load double, double* %0
%9 = load double, double* %1
%10 = call double @dd_two_sum(double %8, double %9, double* %4)
%11 = load double, double* %2
%12 = call double @dd_two_sum(double %11, double %10, double* %5)
store double %12, double* %0
%13 = load double, double* %4
%14 = load double, double* %5
%15 = fadd double %13, %14
store double %15, double* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ check(int /*<<< orphan*/, char const *);
void *malloc(size_t const);
void *char_new_array(const size_t N, const char *error_msg) {
  void *ptr;
  ptr = malloc(N * sizeof(char));
  check(ptr != NULL, error_msg);
  return ptr;
}


x86 assembly (clang, -O0):
<char_new_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
shl    $0x0,%rdi
call   1030 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
mov    -0x10(%rbp),%rsi
call   1040 <check@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<char_new_array>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
call   1030 <malloc@plt>
mov    %rax,%rbx
xor    %edi,%edi
test   %rax,%rax
setne  %dil
mov    %r14,%rsi
call   1040 <check@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @char_new_array(i64 %0, i8* %1) {
%3 = alloca i64
%4 = alloca i8*
%5 = alloca i8*
store i64 %0, i64* %3
store i8* %1, i8** %4
%6 = load i64, i64* %3
%7 = mul i64 %6, 1
%8 = call i8* @malloc(i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp ne i8* %9, null
%11 = zext i1 %10 to i32
%12 = load i8*, i8** %4
%13 = call i32 @check(i32 %11, i8* %12)
%14 = load i8*, i8** %5
ret i8* %14
}

LLVM IR (-O2):
define noalias i8* @char_new_array(i64 %0, i8* %1) {
%3 = tail call i8* @malloc(i64 %0)
%4 = icmp ne i8* %3, null
%5 = zext i1 %4 to i32
%6 = tail call i32 @check(i32 %5, i8* %1)
ret i8* %3
}
/* Variables and functions */
int EOF;
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("EOF:\t%d\n", EOF);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [9 x i8] c"EOF:\09%d\0A\00"
@EOF = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @EOF
%3 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"EOF:\09%d\0A\00"
@EOF = global i32 0
define i32 @main() {
%1 = load i32, i32* @EOF
%2 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
size_t save_subheader_size() { return 2 * sizeof(uint32_t); }


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

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

LLVM IR (-O0):
define i64 @save_subheader_size() {
ret i64 8
}

LLVM IR (-O2):
define i64 @save_subheader_size() {
ret i64 8
}
/* Variables and functions */
int both_ftw(char const *, int /*<<< orphan*/ *,
             int (*)(char const *, struct stat const *, int, struct FTW *), int,
             int);
int nftw(const char *path,
         int (*fn)(const char *, const struct stat *, int, struct FTW *),
         int nfds, int ftwflags) {
  return both_ftw(path, NULL, fn, nfds, ftwflags);
}


x86 assembly (clang, -O0):
<nftw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    -0x18(%rbp),%r8d
xor    %eax,%eax
mov    %eax,%esi
call   1030 <both_ftw@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nftw>:
mov    %ecx,%r8d
mov    %edx,%ecx
mov    %rsi,%rdx
xor    %esi,%esi
jmp    1030 <both_ftw@plt>

LLVM IR (-O0):
%struct.stat = type opaque
%struct.FTW = type opaque
%struct.stat.0 = type opaque
%struct.FTW.1 = type opaque
define i32 @nftw(i8* %0, i32 (i8*, %struct.stat*, i32, %struct.FTW*)* %1, i32 %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i32 (i8*, %struct.stat*, i32, %struct.FTW*)*
%7 = alloca i32
%8 = alloca i32
store i8* %0, i8** %5
store i32 (i8*, %struct.stat*, i32, %struct.FTW*)* %1, i32 (i8*, %struct.stat*, i32, %struct.FTW*)** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i8*, i8** %5
%10 = load i32 (i8*, %struct.stat*, i32, %struct.FTW*)*, i32 (i8*, %struct.stat*, i32, %struct.FTW*)** %6
%11 = bitcast i32 (i8*, %struct.stat*, i32, %struct.FTW*)* %10 to i32 (i8*, %struct.stat.0*, i32, %struct.FTW.1*)*
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = call i32 @both_ftw(i8* %9, i32* null, i32 (i8*, %struct.stat.0*, i32, %struct.FTW.1*)* %11, i32 %12, i32 %13)
ret i32 %14
}

LLVM IR (-O2):
%struct.stat = type opaque
%struct.FTW = type opaque
%struct.stat.0 = type opaque
%struct.FTW.1 = type opaque
define i32 @nftw(i8* %0, i32 (i8*, %struct.stat*, i32, %struct.FTW*)* %1, i32 %2, i32 %3) {
%5 = bitcast i32 (i8*, %struct.stat*, i32, %struct.FTW*)* %1 to i32 (i8*, %struct.stat.0*, i32, %struct.FTW.1*)*
%6 = tail call i32 @both_ftw(i8* %0, i32* null, i32 (i8*, %struct.stat.0*, i32, %struct.FTW.1*)* %5, i32 %2, i32 %3)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ test_BottomUpCutRod();
int main() {
  test_BottomUpCutRod();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_BottomUpCutRod()
ret i32 0
}
int foo(int x) { return x + 92; }


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

x86 assembly (clang, -O2):
<foo>:
lea    0x5c(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @foo(i32 %0) {
%2 = add nsw i32 %0, 92
ret i32 %2
}
void foo487() {}


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

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

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

LLVM IR (-O2):
define void @foo487() {
ret void
}
/* Variables and functions */
double atof(char const *);
double strtofl(const char *str) { return atof(str); }


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

x86 assembly (clang, -O2):
<strtofl>:
jmp    1030 <atof@plt>

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

LLVM IR (-O2):
define double @strtofl(i8* nocapture %0) {
%2 = tail call double @atof(i8* %0)
ret double %2
}
/* Type definitions */
struct usb_endpoint_descriptor {
  int dummy;
};

/* Variables and functions */
scalar_t__ usb_endpoint_dir_in(struct usb_endpoint_descriptor const *);
scalar_t__ usb_endpoint_xfer_int(struct usb_endpoint_descriptor const *);
int usb_endpoint_is_int_in(const struct usb_endpoint_descriptor *epd) {
  return usb_endpoint_xfer_int(epd) && usb_endpoint_dir_in(epd);
}


x86 assembly (clang, -O0):
<usb_endpoint_is_int_in>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <usb_endpoint_xfer_int@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x9(%rbp)
je     115a <usb_endpoint_is_int_in+0x3a>
mov    -0x8(%rbp),%rdi
call   1030 <usb_endpoint_dir_in@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usb_endpoint_is_int_in>:
push   %rbx
mov    %rdi,%rbx
call   1040 <usb_endpoint_xfer_int@plt>
test   %rax,%rax
je     1143 <usb_endpoint_is_int_in+0x23>
mov    %rbx,%rdi
call   1030 <usb_endpoint_dir_in@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.usb_endpoint_descriptor = type { i32 }
define i32 @usb_endpoint_is_int_in(%struct.usb_endpoint_descriptor* %0) {
%2 = alloca %struct.usb_endpoint_descriptor*
store %struct.usb_endpoint_descriptor* %0, %struct.usb_endpoint_descriptor** %2
%3 = load %struct.usb_endpoint_descriptor*, %struct.usb_endpoint_descriptor** %2
%4 = call i64 @usb_endpoint_xfer_int(%struct.usb_endpoint_descriptor* %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load %struct.usb_endpoint_descriptor*, %struct.usb_endpoint_descriptor** %2
%8 = call i64 @usb_endpoint_dir_in(%struct.usb_endpoint_descriptor* %7)
%9 = icmp ne i64 %8, 0
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ false, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
%struct.usb_endpoint_descriptor = type { i32 }
define i32 @usb_endpoint_is_int_in(%struct.usb_endpoint_descriptor* %0) {
%2 = tail call i64 @usb_endpoint_xfer_int(%struct.usb_endpoint_descriptor* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i64 @usb_endpoint_dir_in(%struct.usb_endpoint_descriptor* %0)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 0, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Type definitions */
struct menu {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ show_help(struct menu *);
void handle_f2(int *key, struct menu *current_item) {
  show_help(current_item);
  return;
}


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

x86 assembly (clang, -O2):
<handle_f2>:
mov    %rsi,%rdi
jmp    1030 <show_help@plt>

LLVM IR (-O0):
%struct.menu = type { i32 }
define void @handle_f2(i32* %0, %struct.menu* %1) {
%3 = alloca i32*
%4 = alloca %struct.menu*
store i32* %0, i32** %3
store %struct.menu* %1, %struct.menu** %4
%5 = load %struct.menu*, %struct.menu** %4
%6 = call i32 @show_help(%struct.menu* %5)
ret void
}

LLVM IR (-O2):
%struct.menu = type { i32 }
define void @handle_f2(i32* nocapture readnone %0, %struct.menu* %1) {
%3 = tail call i32 @show_help(%struct.menu* %1)
ret void
}
void f(int x) {
  if (x) {
  }
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1116 <f+0x16>
jmp    1116 <f+0x16>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @f(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %1
br label %6
6: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @f(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_footer(void) {
  printf(" </body>\n"
         "</html>");
}


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

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

LLVM IR (-O0):
@.str = [17 x i8] c" </body>\0A</html>\00"
define void @print_footer() {
%1 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c" </body>\0A</html>\00"
define void @print_footer() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ idct_M128ASM_scalar(short *);
void Fast_IDCT(signed short int *block) { idct_M128ASM_scalar(block); }


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

x86 assembly (clang, -O2):
<Fast_IDCT>:
jmp    1030 <idct_M128ASM_scalar@plt>

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

LLVM IR (-O2):
define void @Fast_IDCT(i16* %0) {
%2 = tail call i32 @idct_M128ASM_scalar(i16* %0)
ret void
}
void dcc_defer_accept(int listen_fd __attribute__((unused))) {}


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

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

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

LLVM IR (-O2):
define void @dcc_defer_accept(i32 %0) {
ret void
}
/* Variables and functions */
unsigned char const *_sigs_find(unsigned char const *, unsigned char const *);
const unsigned char *sigs_field_end(const unsigned char *lp) {
  return _sigs_find(lp, (const unsigned char *)"$#/+@");
}


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"$#/+@\00"
define i8* @sigs_field_end(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* @_sigs_find(i8* %3, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i8* %4
}

LLVM IR (-O2):
@.str = [6 x i8] c"$#/+@\00"
define i8* @sigs_field_end(i8* %0) {
%2 = tail call i8* @_sigs_find(i8* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i8* %2
}
/* Variables and functions */
double exp(double);
double gaussian(double x) { return exp(-x * x); }


x86 assembly (clang, -O0):
<gaussian>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x8(%rbp),%xmm0
call   1030 <exp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gaussian>:
movapd 0xee8(%rip),%xmm1
xorpd  %xmm0,%xmm1
mulsd  %xmm1,%xmm0
jmp    1030 <exp@plt>

LLVM IR (-O0):
define double @gaussian(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fneg double %3
%5 = load double, double* %2
%6 = fmul double %4, %5
%7 = call double @exp(double %6)
ret double %7
}

LLVM IR (-O2):
define double @gaussian(double %0) {
%2 = fneg double %0
%3 = fmul double %2, %0
%4 = tail call double @exp(double %3)
ret double %4
}
void RTStrmClearError(void) {}


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

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

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

LLVM IR (-O2):
define void @RTStrmClearError() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gen(char *);
void cgclear(void) { gen("xorl\t%eax,%eax"); }


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

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

LLVM IR (-O0):
@.str = [15 x i8] c"xorl\09%eax,%eax\00"
define void @cgclear() {
%1 = call i32 @gen(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"xorl\09%eax,%eax\00"
define void @cgclear() {
%1 = tail call i32 @gen(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write_break();
int /*<<< orphan*/ write_line(char *);
int /*<<< orphan*/ write_nl();
void latex_enumerate(void) {
  write_break();
  write_line("\\begin{enumerate}");
  write_nl();
}


x86 assembly (clang, -O0):
<latex_enumerate>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <write_break@plt>
lea    0xebe(%rip),%rdi
call   1050 <write_line@plt>
mov    $0x0,%al
call   1030 <write_nl@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<latex_enumerate>:
push   %rax
xor    %eax,%eax
call   1040 <write_break@plt>
lea    0xec1(%rip),%rdi
call   1050 <write_line@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <write_nl@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"\\begin{enumerate}\00"
define void @latex_enumerate() {
%1 = call i32 (...) @write_break()
%2 = call i32 @write_line(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @write_nl()
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"\\begin{enumerate}\00"
define void @latex_enumerate() {
%1 = tail call i32 (...) @write_break()
%2 = tail call i32 @write_line(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (...) @write_nl()
ret void
}
int __attribute__((no, noclone)) foo(int i, int j) {
  j = i;
  i = 2;
  if (j)
    j++;
  j += i + 1;
  return j;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
movl   $0x2,-0x4(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     112a <foo+0x2a>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
lea    0x4(%rdi),%ecx
test   %edi,%edi
mov    $0x3,%eax
cmovne %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @foo(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 0
%4 = add i32 %0, 4
%5 = select i1 %3, i32 3, i32 %4
ret i32 %5
}
float foo() { return 0.0; }


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

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

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

LLVM IR (-O2):
define float @foo() {
ret float 0.000000e+00
}
int *f() {
  double y;
  return (int *)&y;
}


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

x86 assembly (clang, -O2):
<f>:
lea    -0x8(%rsp),%rax
ret

LLVM IR (-O0):
define i32* @f() {
%1 = alloca double
%2 = bitcast double* %1 to i32*
ret i32* %2
}

LLVM IR (-O2):
define noalias i32* @f() {
%1 = alloca double
%2 = bitcast double* %1 to i8*
%3 = bitcast double* %1 to i32*
ret i32* %3
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
scalar_t__ fflush(int /*<<< orphan*/ *);
int /*<<< orphan*/ *getfile(int);
int /*<<< orphan*/ luaL_argerror(int, char *);
scalar_t__ lua_lua2C(int);
int /*<<< orphan*/ pushresult(int);
void io_flush(void) {
  FILE *f = getfile(2);
  if (!(f || lua_lua2C(2) == 0))
    luaL_argerror(2, "invalid file handle");
  pushresult(fflush(f) == 0);
}


x86 assembly (clang, -O0):
<io_flush>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x2,%edi
call   1070 <getfile@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1196 <io_flush+0x46>
mov    $0x2,%edi
call   1060 <lua_lua2C@plt>
cmp    $0x0,%rax
je     1196 <io_flush+0x46>
mov    $0x2,%edi
lea    0xe6f(%rip),%rsi
call   1030 <luaL_argerror@plt>
mov    -0x8(%rbp),%rdi
call   1050 <fflush@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <pushresult@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<io_flush>:
push   %rbx
mov    $0x2,%edi
call   1070 <getfile@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1183 <io_flush+0x33>
mov    $0x2,%edi
call   1060 <lua_lua2C@plt>
test   %rax,%rax
je     1183 <io_flush+0x33>
lea    0xe87(%rip),%rsi
mov    $0x2,%edi
call   1030 <luaL_argerror@plt>
mov    %rbx,%rdi
call   1050 <fflush@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
pop    %rbx
jmp    1040 <pushresult@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"invalid file handle\00"
define void @io_flush() {
%1 = alloca i32*
%2 = call i32* @getfile(i32 2)
store i32* %2, i32** %1
%3 = load i32*, i32** %1
%4 = icmp ne i32* %3, null
br i1 %4, label %10, label %5
5: ; preds = %0
%6 = call i64 @lua_lua2C(i32 2)
%7 = icmp eq i64 %6, 0
br i1 %7, label %10, label %8
8: ; preds = %5
%9 = call i32 @luaL_argerror(i32 2, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %5, %0
%11 = load i32*, i32** %1
%12 = call i64 @fflush(i32* %11)
%13 = icmp eq i64 %12, 0
%14 = zext i1 %13 to i32
%15 = call i32 @pushresult(i32 %14)
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"invalid file handle\00"
define void @io_flush() {
%1 = tail call i32* @getfile(i32 2)
%2 = icmp eq i32* %1, null
br i1 %2, label %3, label %8
3: ; preds = %0
%4 = tail call i64 @lua_lua2C(i32 2)
%5 = icmp eq i64 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @luaL_argerror(i32 2, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %3, %0
%9 = tail call i64 @fflush(i32* %1)
%10 = icmp eq i64 %9, 0
%11 = zext i1 %10 to i32
%12 = tail call i32 @pushresult(i32 %11)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char const);
void putbyte(unsigned char b) {
  static const char hexarr[] = "0123456789abcdef";
  putchar(hexarr[(b & 0xf0) >> 4]);
  putchar(hexarr[b & 0x0f]);
}


x86 assembly (clang, -O0):
<putbyte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
and    $0xf0,%eax
sar    $0x4,%eax
movslq %eax,%rcx
lea    0xecc(%rip),%rax
movsbl (%rax,%rcx,1),%edi
call   1030 <putchar@plt>
movzbl -0x1(%rbp),%eax
and    $0xf,%eax
movslq %eax,%rcx
lea    0xeb2(%rip),%rax
movsbl (%rax,%rcx,1),%edi
call   1030 <putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putbyte>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
mov    %rbx,%rax
shr    $0x4,%rax
lea    0xedc(%rip),%r14
movsbl (%rax,%r14,1),%edi
call   1030 <putchar@plt>
and    $0xf,%ebx
movsbl (%rbx,%r14,1),%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@putbyte.hexarr = internal constant [17 x i8] c"0123456789abcdef\00"
define void @putbyte(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = and i32 %4, 240
%6 = ashr i32 %5, 4
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds [17 x i8], [17 x i8]* @putbyte.hexarr, i64 0, i64 %7
%9 = load i8, i8* %8
%10 = call i32 @putchar(i8 signext %9)
%11 = load i8, i8* %2
%12 = zext i8 %11 to i32
%13 = and i32 %12, 15
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds [17 x i8], [17 x i8]* @putbyte.hexarr, i64 0, i64 %14
%16 = load i8, i8* %15
%17 = call i32 @putchar(i8 signext %16)
ret void
}

LLVM IR (-O2):
@putbyte.hexarr = internal unnamed_addr constant [17 x i8] c"0123456789abcdef\00"
define void @putbyte(i8 zeroext %0) {
%2 = zext i8 %0 to i32
%3 = lshr i32 %2, 4
%4 = zext i32 %3 to i64
%5 = getelementptr inbounds [17 x i8], [17 x i8]* @putbyte.hexarr, i64 0, i64 %4
%6 = load i8, i8* %5
%7 = tail call i32 @putchar(i8 signext %6)
%8 = and i32 %2, 15
%9 = zext i32 %8 to i64
%10 = getelementptr inbounds [17 x i8], [17 x i8]* @putbyte.hexarr, i64 0, i64 %9
%11 = load i8, i8* %10
%12 = tail call i32 @putchar(i8 signext %11)
ret void
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ NRF24_Write_Reg(scalar_t__, int);
void NRF24_SetRX_Length(uint8_t pipe, uint32_t length) {
  NRF24_Write_Reg(0x11 + pipe, length > 32 ? 32 : length);
}


x86 assembly (clang, -O0):
<NRF24_SetRX_Length>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x11,%rax
mov    %rax,-0x18(%rbp)
cmpl   $0x20,-0xc(%rbp)
jle    1142 <NRF24_SetRX_Length+0x32>
mov    $0x20,%eax
mov    %eax,-0x1c(%rbp)
jmp    1148 <NRF24_SetRX_Length+0x38>
mov    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x1c(%rbp),%esi
call   1030 <NRF24_Write_Reg@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<NRF24_SetRX_Length>:
add    $0x11,%rdi
cmp    $0x20,%esi
mov    $0x20,%eax
cmovge %eax,%esi
jmp    1030 <NRF24_Write_Reg@plt>

LLVM IR (-O0):
define void @NRF24_SetRX_Length(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
store i64 %0, i64* %3
store i32 %1, i32* %4
%5 = load i64, i64* %3
%6 = add nsw i64 17, %5
%7 = load i32, i32* %4
%8 = icmp sgt i32 %7, 32
br i1 %8, label %9, label %10
9: ; preds = %2
br label %12
10: ; preds = %2
%11 = load i32, i32* %4
br label %12
12: ; preds = %10, %9
%13 = phi i32 [ 32, %9 ], [ %11, %10 ]
%14 = call i32 @NRF24_Write_Reg(i64 %6, i32 %13)
ret void
}

LLVM IR (-O2):
define void @NRF24_SetRX_Length(i64 %0, i32 %1) {
%3 = add nsw i64 %0, 17
%4 = icmp slt i32 %1, 32
%5 = select i1 %4, i32 %1, i32 32
%6 = tail call i32 @NRF24_Write_Reg(i64 %3, i32 %5)
ret void
}
char *filespectilde(char *filespec) { return filespec; }


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

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

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

LLVM IR (-O2):
define i8* @filespectilde(i8* readnone returned %0) {
ret i8* %0
}
void RTStrICmp(void) {}


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

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

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

LLVM IR (-O2):
define void @RTStrICmp() {
ret void
}
char *EnvGet(name)
char *name;
{
  char **p;
  return (findvar(name, &p));
}


x86 assembly (clang, -O0):
<EnvGet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1030 <findvar@plt>
cltq
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EnvGet>:
push   %rax
mov    %rsp,%rsi
xor    %eax,%eax
call   1030 <findvar@plt>
cltq
pop    %rcx
ret

LLVM IR (-O0):
define i8* @EnvGet(i8* %0) {
%2 = alloca i8*
%3 = alloca i8**
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 (i8*, i8***, ...) bitcast (i32 (...)* @findvar to i32 (i8*, i8***, ...)*)(i8* %4, i8*** %3)
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to i8*
ret i8* %7
}

LLVM IR (-O2):
define i8* @EnvGet(i8* %0) {
%2 = alloca i8**
%3 = bitcast i8*** %2 to i8*
%4 = call i32 (i8*, i8***, ...) bitcast (i32 (...)* @findvar to i32 (i8*, i8***, ...)*)(i8* %0, i8*** %2)
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i8*
ret i8* %6
}
/* Variables and functions */
int _min_(int /*<<< orphan*/, int);
int /*<<< orphan*/ add(int, int);
int mul(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int i = 1;
  int j = 10;
  printf("%d\n", mul(add(1, 2), add(3, 4)));
  printf("%d\n", _min_(i++, j));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0xa,-0xc(%rbp)
mov    $0x1,%edi
mov    $0x2,%esi
call   1030 <add@plt>
mov    %eax,-0x10(%rbp)
mov    $0x3,%edi
mov    $0x4,%esi
call   1030 <add@plt>
mov    -0x10(%rbp),%edi
mov    %eax,%esi
call   1050 <mul@plt>
mov    %eax,%esi
lea    0xe6f(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%edi
mov    %edi,%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%esi
call   1060 <_min_@plt>
mov    %eax,%esi
lea    0xe4e(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x1,%edi
mov    $0x2,%esi
call   1030 <add@plt>
mov    %eax,%ebx
mov    $0x3,%edi
mov    $0x4,%esi
call   1030 <add@plt>
mov    %ebx,%edi
mov    %eax,%esi
call   1050 <mul@plt>
lea    0xe8f(%rip),%rbx
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    $0x1,%edi
mov    $0xa,%esi
call   1060 <_min_@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
store i32 10, i32* %3
%4 = call i32 @add(i32 1, i32 2)
%5 = call i32 @add(i32 3, i32 4)
%6 = call i32 @mul(i32 %4, i32 %5)
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = load i32, i32* %2
%9 = add nsw i32 %8, 1
store i32 %9, i32* %2
%10 = load i32, i32* %3
%11 = call i32 @_min_(i32 %8, i32 %10)
%12 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @add(i32 1, i32 2)
%2 = tail call i32 @add(i32 3, i32 4)
%3 = tail call i32 @mul(i32 %1, i32 %2)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i32 @_min_(i32 1, i32 10)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Type definitions */
struct rtpp_pcache_obj {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct rtpp_pcache_obj *);
void rtpp_pcache_obj_dtor(struct rtpp_pcache_obj *self) { free(self); }


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

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

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

LLVM IR (-O2):
%struct.rtpp_pcache_obj = type { i32 }
define void @rtpp_pcache_obj_dtor(%struct.rtpp_pcache_obj* nocapture %0) {
%2 = tail call i32 @free(%struct.rtpp_pcache_obj* %0)
ret void
}
void test1_MoreArrays_targetInit__I() {}


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

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

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

LLVM IR (-O2):
define void @test1_MoreArrays_targetInit__I() {
ret void
}
int test_imm_6Fuint8_reg(unsigned char val) {
  return ((val) & (0x6F << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_6Fuint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edx
and    $0x6f,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_6Fuint8_reg>:
test   $0x6f,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_6Fuint8_reg(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = and i32 %4, 111
%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_6Fuint8_reg(i8 zeroext %0) {
%2 = and i8 %0, 111
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ infinity();
int /*<<< orphan*/ setLimit(int /*<<< orphan*/, int);
int main(int argc, char *argv[]) {
  setLimit(0, 5);
  setLimit(0, 0);
  infinity();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %edi,%edi
mov    $0x5,%esi
call   1040 <setLimit@plt>
xor    %esi,%esi
mov    %esi,%edi
call   1040 <setLimit@plt>
mov    $0x0,%al
call   1030 <infinity@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
mov    $0x5,%esi
call   1040 <setLimit@plt>
xor    %edi,%edi
xor    %esi,%esi
call   1040 <setLimit@plt>
xor    %eax,%eax
call   1030 <infinity@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @setLimit(i32 0, i32 5)
%4 = tail call i32 @setLimit(i32 0, i32 0)
%5 = tail call i32 (...) @infinity()
ret i32 0
}
void fixrec_(npix, nrast, wbox, hbox, ifpix, ifrast) int *npix, *nrast;
int *wbox, *hbox;
int *ifpix, *ifrast;
{ fixed_rectangle(*npix, *nrast, *wbox, *hbox, ifpix, ifrast); }


x86 assembly (clang, -O0):
<fixrec_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
mov    -0x18(%rbp),%rax
mov    (%rax),%edx
mov    -0x20(%rbp),%rax
mov    (%rax),%ecx
mov    -0x28(%rbp),%r8
mov    -0x30(%rbp),%r9
mov    $0x0,%al
call   1030 <fixed_rectangle@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fixrec_>:
mov    (%rdi),%edi
mov    (%rsi),%esi
mov    (%rdx),%edx
mov    (%rcx),%ecx
xor    %eax,%eax
jmp    1030 <fixed_rectangle@plt>

LLVM IR (-O0):
define void @fixrec_(i32* %0, i32* %1, i32* %2, i32* %3, i32* %4, i32* %5) {
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca i32*
%11 = alloca i32*
%12 = alloca i32*
store i32* %0, i32** %7
store i32* %1, i32** %8
store i32* %2, i32** %9
store i32* %3, i32** %10
store i32* %4, i32** %11
store i32* %5, i32** %12
%13 = load i32*, i32** %7
%14 = load i32, i32* %13
%15 = load i32*, i32** %8
%16 = load i32, i32* %15
%17 = load i32*, i32** %9
%18 = load i32, i32* %17
%19 = load i32*, i32** %10
%20 = load i32, i32* %19
%21 = load i32*, i32** %11
%22 = load i32*, i32** %12
%23 = call i32 (i32, i32, i32, i32, i32*, i32*, ...) bitcast (i32 (...)* @fixed_rectangle to i32 (i32, i32, i32, i32, i32*, i32*, ...)*)(i32 %14, i32 %16, i32 %18, i32 %20, i32* %21, i32* %22)
ret void
}

LLVM IR (-O2):
define void @fixrec_(i32* nocapture %0, i32* nocapture %1, i32* nocapture %2, i32* nocapture %3, i32* %4, i32* %5) {
%7 = load i32, i32* %0
%8 = load i32, i32* %1
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = tail call i32 (i32, i32, i32, i32, i32*, i32*, ...) bitcast (i32 (...)* @fixed_rectangle to i32 (i32, i32, i32, i32, i32*, i32*, ...)*)(i32 %7, i32 %8, i32 %9, i32 %10, i32* %4, i32* %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int OpenDB(int argc, char **argv) {
  printf("Calling from OpenDB\n");
  return 1;
}


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

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

LLVM IR (-O0):
@.str = [21 x i8] c"Calling from OpenDB\0A\00"
define i32 @OpenDB(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@str = [20 x i8] c"Calling from OpenDB\00"
define i32 @OpenDB(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret i32 1
}
int cmake_plus_one_c(int *arg) { return *arg + 1; }


x86 assembly (clang, -O0):
<cmake_plus_one_c>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
add    $0x1,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @cmake_plus_one_c(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = add nsw i32 %2, 1
ret i32 %3
}
int test_imm_79uint64_midword_reg(unsigned long long val) {
  return ((val >> 16) & (0x79 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_79uint64_midword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
shr    $0x10,%rdx
and    $0x79,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_79uint64_midword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = lshr i64 %3, 16
%5 = and i64 %4, 121
%6 = icmp ne i64 %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_79uint64_midword_reg(i64 %0) {
%2 = and i64 %0, 7929856
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}