xunge/DecIR huggingface dataset:
unsigned int _hrt_exp2i(unsigned int x) { return 1 << x; }


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

x86 assembly (clang, -O2):
<_hrt_exp2i>:
mov    %edi,%ecx
mov    $0x1,%eax
shl    %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @_hrt_exp2i(i32 %0) {
%2 = shl nuw i32 1, %0
ret i32 %2
}
PUTCHAR(c) { (void)c; }


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

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

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

LLVM IR (-O2):
define i32 @PUTCHAR(i32 %0) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ make_filename(long, char *, char *);
long umfpack_dl_save_numeric(void *, char *);
void umf4snum_(void **Numeric, long *filenum, long *status) {
  char filename[200];
  make_filename(*filenum, "n", filename);
  *status = umfpack_dl_save_numeric(*Numeric, filename);
}


x86 assembly (clang, -O0):
<umf4snum_>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    -0xe0(%rbp),%rdx
lea    0xeb4(%rip),%rsi
call   1040 <make_filename@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
lea    -0xe0(%rbp),%rsi
call   1030 <umfpack_dl_save_numeric@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<umf4snum_>:
push   %r15
push   %r14
push   %rbx
sub    $0xd0,%rsp
mov    %rdx,%r14
mov    %rdi,%rbx
mov    (%rsi),%rdi
lea    0xec4(%rip),%rsi
mov    %rsp,%r15
mov    %r15,%rdx
call   1040 <make_filename@plt>
mov    (%rbx),%rdi
mov    %r15,%rsi
call   1030 <umfpack_dl_save_numeric@plt>
mov    %rax,(%r14)
add    $0xd0,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [2 x i8] c"n\00"
define void @umf4snum_(i8** %0, i64* %1, i64* %2) {
%4 = alloca i8**
%5 = alloca i64*
%6 = alloca i64*
%7 = alloca [200 x i8]
store i8** %0, i8*** %4
store i64* %1, i64** %5
store i64* %2, i64** %6
%8 = load i64*, i64** %5
%9 = load i64, i64* %8
%10 = getelementptr inbounds [200 x i8], [200 x i8]* %7, i64 0, i64 0
%11 = call i32 @make_filename(i64 %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* %10)
%12 = load i8**, i8*** %4
%13 = load i8*, i8** %12
%14 = getelementptr inbounds [200 x i8], [200 x i8]* %7, i64 0, i64 0
%15 = call i64 @umfpack_dl_save_numeric(i8* %13, i8* %14)
%16 = load i64*, i64** %6
store i64 %15, i64* %16
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"n\00"
define void @umf4snum_(i8** nocapture %0, i64* nocapture %1, i64* nocapture writeonly %2) {
%4 = alloca [200 x i8]
%5 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 0
%6 = load i64, i64* %1
%7 = call i32 @make_filename(i64 %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* %5)
%8 = load i8*, i8** %0
%9 = call i64 @umfpack_dl_save_numeric(i8* %8, i8* %5)
store i64 %9, i64* %2
ret void
}
char *strcpy5(char *dest, const char *src) {
  char *rval = dest;
  while (*src != 0)
    *dest++ = *src++;
  *dest = 0;
  return rval;
}


x86 assembly (clang, -O0):
<strcpy5>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     114b <strcpy5+0x4b>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
jmp    1114 <strcpy5+0x14>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcpy5>:
mov    %rdi,%rax
mov    (%rsi),%cl
mov    %rdi,%rdx
test   %cl,%cl
je     1131 <strcpy5+0x31>
add    $0x1,%rsi
mov    %rax,%rdx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %cl,(%rdx)
add    $0x1,%rdx
movzbl (%rsi),%ecx
add    $0x1,%rsi
test   %cl,%cl
jne    1120 <strcpy5+0x20>
movb   $0x0,(%rdx)
ret

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

LLVM IR (-O2):
define i8* @strcpy5(i8* returned writeonly %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %11, %5 ], [ %3, %2 ]
%7 = phi i8* [ %10, %5 ], [ %0, %2 ]
%8 = phi i8* [ %9, %5 ], [ %1, %2 ]
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = getelementptr inbounds i8, i8* %7, i64 1
store i8 %6, i8* %7
%11 = load i8, i8* %9
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5, %2
%14 = phi i8* [ %0, %2 ], [ %10, %5 ]
store i8 0, i8* %14
ret i8* %0
}
/* Type definitions */
typedef scalar_t__ pid_t;

/* Variables and functions */
scalar_t__ fork();
int /*<<< orphan*/ usleep(int);
int main(int argc, char **argv) {
  pid_t child = fork();
  if (child < 0)
    return 1;
  else if (child == 0) {
    char *ptr = NULL;
    *ptr = 42;
    return 0;
  } else {
    usleep(100000);
    return 0;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <fork@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jge    1158 <main+0x38>
movl   $0x1,-0x4(%rbp)
jmp    118f <main+0x6f>
cmpq   $0x0,-0x18(%rbp)
jne    117e <main+0x5e>
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movb   $0x2a,(%rax)
movl   $0x0,-0x4(%rbp)
jmp    118f <main+0x6f>
mov    $0x186a0,%edi
call   1040 <usleep@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %ebx,%ebx
xor    %eax,%eax
call   1030 <fork@plt>
test   %rax,%rax
js     113b <main+0x1b>
mov    $0x186a0,%edi
call   1040 <usleep@plt>
jmp    1140 <main+0x20>
mov    $0x1,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i64
%7 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = call i64 (...) @fork()
store i64 %8, i64* %6
%9 = load i64, i64* %6
%10 = icmp slt i64 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %2
store i32 1, i32* %3
br label %19
12: ; preds = %2
%13 = load i64, i64* %6
%14 = icmp eq i64 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %12
store i8* null, i8** %7
%16 = load i8*, i8** %7
store i8 42, i8* %16
store i32 0, i32* %3
br label %19
17: ; preds = %12
%18 = call i32 @usleep(i32 100000)
store i32 0, i32* %3
br label %19
19: ; preds = %17, %15, %11
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i64 (...) @fork()
%4 = icmp slt i64 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = icmp ne i64 %3, 0
tail call void @llvm.assume(i1 %6)
%7 = tail call i32 @usleep(i32 100000)
br label %8
8: ; preds = %2, %5
%9 = phi i32 [ 0, %5 ], [ 1, %2 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
void DriveTeslaModelX(double speed) {
  printf("Driving a Model X with %f km/h\n", speed);
}


x86 assembly (clang, -O0):
<DriveTeslaModelX>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
lea    0xed7(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [32 x i8] c"Driving a Model X with %f km/h\0A\00"
define void @DriveTeslaModelX(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), double %3)
ret void
}

LLVM IR (-O2):
@.str = [32 x i8] c"Driving a Model X with %f km/h\0A\00"
define void @DriveTeslaModelX(double %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), double %0)
ret void
}
void NOR_SPI_SaveConfig(void) {}


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

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

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

LLVM IR (-O2):
define void @NOR_SPI_SaveConfig() {
ret void
}
int test_imm_5Fint64_highword_mem(long long *val) {
  return ((*val >> 32) & (0x5F << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_5Fint64_highword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
sar    $0x20,%rdx
and    $0x5f,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_5Fint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 408021893120
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned long black_pixel;
};
typedef TYPE_1__ Screen;

/* Variables and functions */
void set_Screen_black_pixel(void *_p, unsigned long _v) {
  ((Screen *)_p)->black_pixel = (unsigned long)_v;
}


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

x86 assembly (clang, -O2):
<set_Screen_black_pixel>:
mov    %rsi,(%rdi)
ret

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

LLVM IR (-O2):
define void @set_Screen_black_pixel(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
int isSpace(char c) {
  return (c == ' ' || c == '\t' || c == '\n' || c == '\12');
}


x86 assembly (clang, -O0):
<isSpace>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x2(%rbp)
je     114d <isSpace+0x4d>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x9,%ecx
mov    %al,-0x2(%rbp)
je     114d <isSpace+0x4d>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0xa,%ecx
mov    %al,-0x2(%rbp)
je     114d <isSpace+0x4d>
movsbl -0x1(%rbp),%eax
cmp    $0xa,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isSpace>:
cmp    $0x20,%dil
sete   %al
add    $0xf7,%dil
cmp    $0x2,%dil
setb   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @isSpace(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 32
br i1 %5, label %18, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 9
br i1 %9, label %18, label %10
10: ; preds = %6
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 10
br i1 %13, label %18, label %14
14: ; preds = %10
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp eq i32 %16, 10
br label %18
18: ; preds = %14, %10, %6, %1
%19 = phi i1 [ true, %10 ], [ true, %6 ], [ true, %1 ], [ %17, %14 ]
%20 = zext i1 %19 to i32
ret i32 %20
}

LLVM IR (-O2):
define i32 @isSpace(i8 signext %0) {
%2 = icmp eq i8 %0, 32
%3 = add i8 %0, -9
%4 = icmp ult i8 %3, 2
%5 = or i1 %2, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
const char *vde_chain_nm6_name_out(int i) {
  switch (i) {
  case 0:
    return "o0";
  case 1:
    return "o1";
  case 2:
    return "o2";
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<vde_chain_nm6_name_out>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
test   %eax,%eax
je     113c <vde_chain_nm6_name_out+0x3c>
jmp    111a <vde_chain_nm6_name_out+0x1a>
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
je     114c <vde_chain_nm6_name_out+0x4c>
jmp    112b <vde_chain_nm6_name_out+0x2b>
mov    -0x10(%rbp),%eax
sub    $0x2,%eax
je     115c <vde_chain_nm6_name_out+0x5c>
jmp    116c <vde_chain_nm6_name_out+0x6c>
lea    0xebd(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1174 <vde_chain_nm6_name_out+0x74>
lea    0xeb0(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1174 <vde_chain_nm6_name_out+0x74>
lea    0xea3(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1174 <vde_chain_nm6_name_out+0x74>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<vde_chain_nm6_name_out>:
cmp    $0x2,%edi
ja     1117 <vde_chain_nm6_name_out+0x17>
movslq %edi,%rax
lea    0xefd(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
@.str = [3 x i8] c"o0\00"
@.str.1 = [3 x i8] c"o1\00"
@.str.2 = [3 x i8] c"o2\00"
define i8* @vde_chain_nm6_name_out(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %8 [
i32 0, label %5
i32 1, label %6
i32 2, label %7
]
5: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %2
br label %9
6: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %9
7: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %9
8: ; preds = %1
store i8* null, i8** %2
br label %9
9: ; preds = %8, %7, %6, %5
%10 = load i8*, i8** %2
ret i8* %10
}

LLVM IR (-O2):
@.str = [3 x i8] c"o0\00"
@.str.1 = [3 x i8] c"o1\00"
@.str.2 = [3 x i8] c"o2\00"
@reltable.vde_chain_nm6_name_out = [3 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str to i64), i64 ptrtoint ([3 x i32]* @reltable.vde_chain_nm6_name_out to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str.1 to i64), i64 ptrtoint ([3 x i32]* @reltable.vde_chain_nm6_name_out to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str.2 to i64), i64 ptrtoint ([3 x i32]* @reltable.vde_chain_nm6_name_out to i64)) to i32)]
define i8* @vde_chain_nm6_name_out(i32 %0) {
%2 = icmp ult i32 %0, 3
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = sext i32 %0 to i64
%5 = shl i64 %4, 2
%6 = call i8* @llvm.load.relative.i64(i8* bitcast ([3 x i32]* @reltable.vde_chain_nm6_name_out to i8*), i64 %5)
br label %7
7: ; preds = %1, %3
%8 = phi i8* [ %6, %3 ], [ null, %1 ]
ret i8* %8
}
unsigned xrop3_42_0_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk2 = T & S;
  stk2 = ~stk2;
  stk1 = D & stk2;
  return stk1;
}


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

x86 assembly (clang, -O2):
<xrop3_42_0_0>:
and    %esi,%edi
not    %dil
movzbl %dil,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_42_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%10 = load i8, i8* %3
%11 = zext i8 %10 to i32
%12 = shl i32 %11, 8
%13 = load i8, i8* %3
%14 = zext i8 %13 to i32
%15 = or i32 %12, %14
store i32 %15, i32* %6
%16 = load i8, i8* %4
%17 = zext i8 %16 to i32
%18 = shl i32 %17, 8
%19 = load i8, i8* %4
%20 = zext i8 %19 to i32
%21 = or i32 %18, %20
store i32 %21, i32* %7
%22 = load i32, i32* %7
%23 = load i32, i32* %6
%24 = and i32 %22, %23
store i32 %24, i32* %9
%25 = load i32, i32* %9
%26 = xor i32 %25, -1
store i32 %26, i32* %9
%27 = load i32, i32* %5
%28 = load i32, i32* %9
%29 = and i32 %27, %28
store i32 %29, i32* %8
%30 = load i32, i32* %8
ret i32 %30
}

LLVM IR (-O2):
define i32 @xrop3_42_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = and i8 %1, %0
%4 = xor i8 %3, -1
%5 = zext i8 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ ENOMEM;
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ error(int /*<<< orphan*/, int /*<<< orphan*/, char *);
void *check_ptr(void *p) {
  if (!p)
    error(EXIT_FAILURE, ENOMEM, "NULL pointer");
  return p;
}


x86 assembly (clang, -O0):
<check_ptr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1145 <check_ptr+0x35>
mov    0x2eaa(%rip),%rax
mov    (%rax),%edi
mov    0x2ea9(%rip),%rax
mov    (%rax),%esi
lea    0xec0(%rip),%rdx
call   1030 <error@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_ptr>:
push   %rbx
mov    %rdi,%rbx
test   %rdi,%rdi
jne    1137 <check_ptr+0x27>
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
mov    0x2eb7(%rip),%rax
mov    (%rax),%esi
lea    0xece(%rip),%rdx
call   1030 <error@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
@ENOMEM = global i32 0
@.str = [13 x i8] c"NULL pointer\00"
define i8* @check_ptr(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %9, label %5
5: ; preds = %1
%6 = load i32, i32* @EXIT_FAILURE
%7 = load i32, i32* @ENOMEM
%8 = call i32 @error(i32 %6, i32 %7, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %5, %1
%10 = load i8*, i8** %2
ret i8* %10
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
@ENOMEM = global i32 0
@.str = [13 x i8] c"NULL pointer\00"
define i8* @check_ptr(i8* readnone returned %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = load i32, i32* @EXIT_FAILURE
%5 = load i32, i32* @ENOMEM
%6 = tail call i32 @error(i32 %4, i32 %5, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %3, %1
ret i8* %0
}
int test_imm_10uint8_reg(unsigned char val) {
  return ((val) & (-0x10 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_10uint8_reg>:
cmp    $0x10,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmovb  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_10uint8_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, -16
%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_10uint8_reg(i8 zeroext %0) {
%2 = icmp ult i8 %0, 16
%3 = select i1 %2, i32 -40, i32 -20
ret i32 %3
}
/* Variables and functions */
int fn(int /*<<< orphan*/);
int /*<<< orphan*/ foo(char *);
int __attribute__((no)) baz(long i) {
  if (i)
    return fn(0);
  else {
    char s[4096];
    s[0] = 'a';
    s[4096 - 1] = 'b';
    foo(s);
    foo(s);
    return fn(0);
  }
}


x86 assembly (clang, -O0):
<baz>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1010,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1149 <baz+0x29>
xor    %edi,%edi
call   1030 <fn@plt>
mov    %eax,-0x4(%rbp)
jmp    1176 <baz+0x56>
movb   $0x61,-0x1010(%rbp)
movb   $0x62,-0x11(%rbp)
lea    -0x1010(%rbp),%rdi
call   1040 <foo@plt>
lea    -0x1010(%rbp),%rdi
call   1040 <foo@plt>
xor    %edi,%edi
call   1030 <fn@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1010,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<baz>:
test   %rdi,%rdi
je     112c <baz+0xc>
xor    %edi,%edi
jmp    1030 <fn@plt>
push   %rbx
sub    $0x1000,%rsp
movb   $0x61,(%rsp)
movb   $0x62,0xfff(%rsp)
62
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <foo@plt>
mov    %rbx,%rdi
call   1040 <foo@plt>
xor    %edi,%edi
call   1030 <fn@plt>
add    $0x1000,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @baz(i64 %0) {
%2 = alloca i32
%3 = alloca i64
%4 = alloca [4096 x i8]
store i64 %0, i64* %3
%5 = load i64, i64* %3
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 @fn(i32 0)
store i32 %8, i32* %2
br label %17
9: ; preds = %1
%10 = getelementptr inbounds [4096 x i8], [4096 x i8]* %4, i64 0, i64 0
store i8 97, i8* %10
%11 = getelementptr inbounds [4096 x i8], [4096 x i8]* %4, i64 0, i64 4095
store i8 98, i8* %11
%12 = getelementptr inbounds [4096 x i8], [4096 x i8]* %4, i64 0, i64 0
%13 = call i32 @foo(i8* %12)
%14 = getelementptr inbounds [4096 x i8], [4096 x i8]* %4, i64 0, i64 0
%15 = call i32 @foo(i8* %14)
%16 = call i32 @fn(i32 0)
store i32 %16, i32* %2
br label %17
17: ; preds = %9, %7
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @baz(i64 %0) {
%2 = alloca [4096 x i8]
%3 = icmp eq i64 %0, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @fn(i32 0)
br label %12
6: ; preds = %1
%7 = getelementptr inbounds [4096 x i8], [4096 x i8]* %2, i64 0, i64 0
store i8 97, i8* %7
%8 = getelementptr inbounds [4096 x i8], [4096 x i8]* %2, i64 0, i64 4095
store i8 98, i8* %8
%9 = call i32 @foo(i8* %7)
%10 = call i32 @foo(i8* %7)
%11 = call i32 @fn(i32 0)
br label %12
12: ; preds = %6, %4
%13 = phi i32 [ %5, %4 ], [ %11, %6 ]
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void help_show_mini_usage(void) {
  printf("Usage : "
         "scrot"
         " [OPTIONS]... FILE\n"
         "Use "
         "scrot"
         " --help for detailed usage information\n");
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<help_show_mini_usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<help_show_mini_usage>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [81 x i8] c"Usage : scrot [OPTIONS]... FILE\0AUse scrot --help for detailed usage information\0A\00"
@EXIT_SUCCESS = global i32 0
define void @help_show_mini_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @EXIT_SUCCESS
%3 = call i32 @exit(i32 %2)
unreachable
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
@str = [80 x i8] c"Usage : scrot [OPTIONS]... FILE\0AUse scrot --help for detailed usage information\00"
define void @help_show_mini_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([80 x i8], [80 x i8]* @str, i64 0, i64 0))
%2 = load i32, i32* @EXIT_SUCCESS
%3 = tail call i32 @exit(i32 %2)
unreachable
}
/* Variables and functions */
double _erfc(double);
double erfc(double x) { return _erfc(x); }


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

x86 assembly (clang, -O2):
<erfc>:
jmp    1030 <_erfc@plt>

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

LLVM IR (-O2):
define double @erfc(double %0) {
%2 = tail call double @_erfc(double %0)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ ft_putchar(char);
int main(void) {
  ft_putchar('A');
  return (0);
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @ft_putchar(i8 signext 65)
ret i32 0
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
__attribute__((always_)) uint8_t gf256_add(uint8_t x, uint8_t y) {
  return x ^ y;
}


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

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

LLVM IR (-O0):
define i32 @gf256_add(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 = xor i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @gf256_add(i32 %0, i32 %1) {
%3 = xor i32 %1, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ pubrealloc(void *, int /*<<< orphan*/, char *);
void free(void *ptr) { pubrealloc(ptr, 0, " in free():"); }


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

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

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

LLVM IR (-O2):
@.str = [12 x i8] c" in free():\00"
define void @free(i8* %0) {
%2 = tail call i32 @pubrealloc(i8* %0, i32 0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}
void completed(void *ctx_) { (void)ctx_; }


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

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

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

LLVM IR (-O2):
define void @completed(i8* nocapture %0) {
ret void
}
int doubledecreasing(const void *a, const void *b) {
  double ta = *(double *)a;
  double tb = *(double *)b;
  return (tb > ta) - (tb < ta);
}


x86 assembly (clang, -O0):
<doubledecreasing>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
ucomisd -0x18(%rbp),%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
movsd  -0x20(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
ucomisd %xmm1,%xmm0
seta   %cl
and    $0x1,%cl
movzbl %cl,%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<doubledecreasing>:
movsd  (%rdi),%xmm0
movsd  (%rsi),%xmm1
xor    %eax,%eax
ucomisd %xmm0,%xmm1
seta   %al
xor    %ecx,%ecx
ucomisd %xmm1,%xmm0
seta   %cl
sub    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @doubledecreasing(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca double
%6 = alloca double
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to double*
%9 = load double, double* %8
store double %9, double* %5
%10 = load i8*, i8** %4
%11 = bitcast i8* %10 to double*
%12 = load double, double* %11
store double %12, double* %6
%13 = load double, double* %6
%14 = load double, double* %5
%15 = fcmp ogt double %13, %14
%16 = zext i1 %15 to i32
%17 = load double, double* %6
%18 = load double, double* %5
%19 = fcmp olt double %17, %18
%20 = zext i1 %19 to i32
%21 = sub nsw i32 %16, %20
ret i32 %21
}

LLVM IR (-O2):
define i32 @doubledecreasing(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to double*
%4 = load double, double* %3
%5 = bitcast i8* %1 to double*
%6 = load double, double* %5
%7 = fcmp ogt double %6, %4
%8 = zext i1 %7 to i32
%9 = fcmp olt double %6, %4
%10 = sext i1 %9 to i32
%11 = add nsw i32 %10, %8
ret i32 %11
}
__attribute__((always_)) void lock_vector_lock(void) {}


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

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

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

LLVM IR (-O2):
define void @lock_vector_lock() {
ret void
}
void xfs_qm_cleanup_procfs(void) {}


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

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

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

LLVM IR (-O2):
define void @xfs_qm_cleanup_procfs() {
ret void
}
/* Variables and functions */
int strcmp(char const *, char const *);
int CString_strcmp(const char *a, const char *b) { return strcmp(a, b); }


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

x86 assembly (clang, -O2):
<CString_strcmp>:
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
define i32 @CString_strcmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i32 @strcmp(i8* %5, i8* %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @CString_strcmp(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ Inst_Printf(char *, char *, char *);
void Pl_Jump(char *label) { Inst_Printf("jmp", "%s", label); }


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

x86 assembly (clang, -O2):
<Pl_Jump>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rdi
lea    0xee3(%rip),%rsi
jmp    1030 <Inst_Printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"jmp\00"
@.str.1 = [3 x i8] c"%s\00"
define void @Pl_Jump(i8* %0) {
%2 = tail call i32 @Inst_Printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
scalar_t__ is_little_endian();
int /*<<< orphan*/ printf(char *);
int main(void) {
  if (is_little_endian()) {
    printf("this is a little endian machine.\n");
  } else {
    printf("this is a big endian machine.\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <is_little_endian@plt>
cmp    $0x0,%rax
je     1151 <main+0x31>
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
jmp    115d <main+0x3d>
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [34 x i8] c"this is a little endian machine.\0A\00"
@.str.1 = [31 x i8] c"this is a big endian machine.\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 (...) @is_little_endian()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
br label %8
6: ; preds = %0
%7 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
br label %8
8: ; preds = %6, %4
ret i32 0
}

LLVM IR (-O2):
@str = [30 x i8] c"this is a big endian machine.\00"
@str.2 = [33 x i8] c"this is a little endian machine.\00"
define i32 @main() {
%1 = tail call i64 (...) @is_little_endian()
%2 = icmp eq i64 %1, 0
%3 = select i1 %2, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0), i8* getelementptr inbounds ([33 x i8], [33 x i8]* @str.2, i64 0, i64 0)
%4 = tail call i32 @puts(i8* dereferenceable(1) %3)
ret i32 0
}
void H422ToABGR() {}


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

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

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

LLVM IR (-O2):
define void @H422ToABGR() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void f(void) {
  assert(0);
  printf("hello, this is \"f\"\n");
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1040 <assert@plt>
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %rax
xor    %edi,%edi
call   1040 <assert@plt>
lea    0xed1(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"hello, this is \22f\22\0A\00"
define void @f() {
%1 = call i32 @assert(i32 0)
%2 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [19 x i8] c"hello, this is \22f\22\00"
define void @f() {
%1 = tail call i32 @assert(i32 0)
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
ret void
}
void add_source_master_rec_noise_cu_(long *Mesh_pointer, int *it_f,
                                     int *irec_master_noise_f,
                                     int *islice_selected_rec) {}


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

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

LLVM IR (-O0):
define void @add_source_master_rec_noise_cu_(i64* %0, i32* %1, i32* %2, i32* %3) {
%5 = alloca i64*
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32*
store i64* %0, i64** %5
store i32* %1, i32** %6
store i32* %2, i32** %7
store i32* %3, i32** %8
ret void
}

LLVM IR (-O2):
define void @add_source_master_rec_noise_cu_(i64* nocapture %0, i32* nocapture %1, i32* nocapture %2, i32* nocapture %3) {
ret void
}
int int_sub(char a, short b) { return a - b; }


x86 assembly (clang, -O0):
<int_sub>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %ax,-0x4(%rbp)
movsbl -0x1(%rbp),%eax
movswl -0x4(%rbp),%ecx
sub    %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @int_sub(i8 signext %0, i16 signext %1) {
%3 = alloca i8
%4 = alloca i16
store i8 %0, i8* %3
store i16 %1, i16* %4
%5 = load i8, i8* %3
%6 = sext i8 %5 to i32
%7 = load i16, i16* %4
%8 = sext i16 %7 to i32
%9 = sub nsw i32 %6, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @int_sub(i8 signext %0, i16 signext %1) {
%3 = sext i8 %0 to i32
%4 = sext i16 %1 to i32
%5 = sub nsw i32 %3, %4
ret i32 %5
}
/* Variables and functions */
float GCI_gamma(float);
float GCI_incomplete_gamma(float, float);
float GCI_gammap(float a, float x) {
  return GCI_incomplete_gamma(a, x) / GCI_gamma(a);
}


x86 assembly (clang, -O0):
<GCI_gammap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
call   1030 <GCI_incomplete_gamma@plt>
movss  %xmm0,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
call   1040 <GCI_gamma@plt>
movaps %xmm0,%xmm1
movss  -0xc(%rbp),%xmm0
divss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GCI_gammap>:
push   %rax
movss  %xmm0,(%rsp)
call   1030 <GCI_incomplete_gamma@plt>
movss  %xmm0,0x4(%rsp)
movss  (%rsp),%xmm0
call   1040 <GCI_gamma@plt>
movss  0x4(%rsp),%xmm1
divss  %xmm0,%xmm1
movaps %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @GCI_gammap(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = call float @GCI_incomplete_gamma(float %5, float %6)
%8 = load float, float* %3
%9 = call float @GCI_gamma(float %8)
%10 = fdiv float %7, %9
ret float %10
}

LLVM IR (-O2):
define float @GCI_gammap(float %0, float %1) {
%3 = tail call float @GCI_incomplete_gamma(float %0, float %1)
%4 = tail call float @GCI_gamma(float %0)
%5 = fdiv float %3, %4
ret float %5
}
unsigned long long __attribute__((__always___, __gnu___, __artificial__))
rdtsc(void) {
  unsigned a, d;
  asm volatile("cpuid");
  asm volatile("rdtsc" : "=a"(a), "=d"(d));
  return (((unsigned long long)a) | (((unsigned long long)d) << 32));
}


x86 assembly (clang, -O0):
<rdtsc>:
push   %rbp
mov    %rsp,%rbp
cpuid
rdtsc
mov    %eax,-0x4(%rbp)
mov    %edx,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    $0x20,%rcx
or     %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rdtsc>:
cpuid
rdtsc
mov    %eax,%eax
shl    $0x20,%rdx
or     %rdx,%rax
ret

LLVM IR (-O0):
define i64 @rdtsc() {
%1 = alloca i32
%2 = alloca i32
%3 = call { i32, i32 } asm sideeffect "rdtsc", "={ax},={dx},~{dirflag},~{fpsr},~{flags}"()
%4 = extractvalue { i32, i32 } %3, 0
%5 = extractvalue { i32, i32 } %3, 1
store i32 %4, i32* %1
store i32 %5, i32* %2
%6 = load i32, i32* %1
%7 = zext i32 %6 to i64
%8 = load i32, i32* %2
%9 = zext i32 %8 to i64
%10 = shl i64 %9, 32
%11 = or i64 %7, %10
ret i64 %11
}

LLVM IR (-O2):
define i64 @rdtsc() {
tail call void asm sideeffect "cpuid", "~{dirflag},~{fpsr},~{flags}"()
%1 = tail call { i32, i32 } asm sideeffect "rdtsc", "={ax},={dx},~{dirflag},~{fpsr},~{flags}"()
%2 = extractvalue { i32, i32 } %1, 0
%3 = extractvalue { i32, i32 } %1, 1
%4 = zext i32 %2 to i64
%5 = zext i32 %3 to i64
%6 = shl nuw i64 %5, 32
%7 = or i64 %6, %4
ret i64 %7
}
const char *eat_whitespace_no_nl(const char *s) {
  while (*s == ' ' || *s == '\t' || *s == '\r')
    ++s;
  return s;
}


x86 assembly (clang, -O0):
<eat_whitespace_no_nl>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x9(%rbp)
je     1142 <eat_whitespace_no_nl+0x42>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x9,%ecx
mov    %al,-0x9(%rbp)
je     1142 <eat_whitespace_no_nl+0x42>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xd,%eax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1152 <eat_whitespace_no_nl+0x52>
jmp    1163 <eat_whitespace_no_nl+0x63>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <eat_whitespace_no_nl+0x8>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<eat_whitespace_no_nl>:
mov    %rdi,%rax
movabs $0x100002200,%rcx
nopl   (%rax)
movzbl (%rax),%edx
cmp    $0x20,%rdx
ja     1125 <eat_whitespace_no_nl+0x25>
bt     %rdx,%rcx
jae    1125 <eat_whitespace_no_nl+0x25>
add    $0x1,%rax
jmp    1110 <eat_whitespace_no_nl+0x10>
ret

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

LLVM IR (-O2):
define i8* @eat_whitespace_no_nl(i8* %0) {
br label %2
2: ; preds = %5, %1
%3 = phi i8* [ %0, %1 ], [ %6, %5 ]
%4 = load i8, i8* %3
switch i8 %4, label %7 [
i8 32, label %5
i8 9, label %5
i8 13, label %5
]
5: ; preds = %2, %2, %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
7: ; preds = %2
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void disp_result(int result) {
  switch (result) {
  case 0:
    puts("Draw.");
    break;
  case 1:
    puts("Lose.");
    break;
  case 2:
    puts("Win.");
    break;
  }
}


x86 assembly (clang, -O0):
<disp_result>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
test   %eax,%eax
je     1150 <disp_result+0x40>
jmp    112e <disp_result+0x1e>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
je     1161 <disp_result+0x51>
jmp    113f <disp_result+0x2f>
mov    -0x8(%rbp),%eax
sub    $0x2,%eax
je     1172 <disp_result+0x62>
jmp    117e <disp_result+0x6e>
lea    0xea9(%rip),%rdi
call   1030 <puts@plt>
jmp    117e <disp_result+0x6e>
lea    0xe9e(%rip),%rdi
call   1030 <puts@plt>
jmp    117e <disp_result+0x6e>
lea    0xe93(%rip),%rdi
call   1030 <puts@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<disp_result>:
cmp    $0x2,%edi
ja     112b <disp_result+0x1b>
movslq %edi,%rax
lea    0xef5(%rip),%rcx
movslq (%rcx,%rax,4),%rdi
add    %rcx,%rdi
jmp    1030 <puts@plt>
ret

LLVM IR (-O0):
@.str = [6 x i8] c"Draw.\00"
@.str.1 = [6 x i8] c"Lose.\00"
@.str.2 = [5 x i8] c"Win.\00"
define void @disp_result(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %10 [
i32 0, label %4
i32 1, label %6
i32 2, label %8
]
4: ; preds = %1
%5 = call i32 @puts(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %10
6: ; preds = %1
%7 = call i32 @puts(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
br label %10
8: ; preds = %1
%9 = call i32 @puts(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %10
10: ; preds = %1, %8, %6, %4
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"Draw.\00"
@.str.1 = [6 x i8] c"Lose.\00"
@.str.2 = [5 x i8] c"Win.\00"
@reltable.disp_result = [3 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @.str to i64), i64 ptrtoint ([3 x i32]* @reltable.disp_result to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @.str.1 to i64), i64 ptrtoint ([3 x i32]* @reltable.disp_result to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @.str.2 to i64), i64 ptrtoint ([3 x i32]* @reltable.disp_result to i64)) to i32)]
define void @disp_result(i32 %0) {
%2 = icmp ult i32 %0, 3
br i1 %2, label %3, label %8
3: ; preds = %1
%4 = sext i32 %0 to i64
%5 = shl i64 %4, 2
%6 = call i8* @llvm.load.relative.i64(i8* bitcast ([3 x i32]* @reltable.disp_result to i8*), i64 %5)
%7 = tail call i32 @puts(i8* dereferenceable(1) %6)
br label %8
8: ; preds = %1, %3
ret void
}
void gensltu() {}


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

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

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

LLVM IR (-O2):
define void @gensltu() {
ret void
}
unsigned int buildWord(unsigned char byte0, unsigned char byte1,
                       unsigned char byte2, unsigned char byte3) {
  unsigned int num = byte3;
  num = num << 8;
  num += byte2;
  num = num << 8;
  num += byte1;
  num = num << 8;
  num += byte0;
  return num;
}


x86 assembly (clang, -O0):
<buildWord>:
push   %rbp
mov    %rsp,%rbp
mov    %cl,%al
mov    %dl,%cl
mov    %sil,%dl
mov    %dil,%sil
mov    %sil,-0x1(%rbp)
mov    %dl,-0x2(%rbp)
mov    %cl,-0x3(%rbp)
mov    %al,-0x4(%rbp)
movzbl -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x8,%eax
mov    %eax,-0x8(%rbp)
movzbl -0x3(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x8,%eax
mov    %eax,-0x8(%rbp)
movzbl -0x2(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x8,%eax
mov    %eax,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<buildWord>:
shl    $0x10,%ecx
shl    $0x8,%edx
lea    (%rdx,%rcx,1),%eax
or     %esi,%eax
shl    $0x8,%eax
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @buildWord(i8 zeroext %0, i8 zeroext %1, i8 zeroext %2, i8 zeroext %3) {
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca i32
store i8 %0, i8* %5
store i8 %1, i8* %6
store i8 %2, i8* %7
store i8 %3, i8* %8
%10 = load i8, i8* %8
%11 = zext i8 %10 to i32
store i32 %11, i32* %9
%12 = load i32, i32* %9
%13 = shl i32 %12, 8
store i32 %13, i32* %9
%14 = load i8, i8* %7
%15 = zext i8 %14 to i32
%16 = load i32, i32* %9
%17 = add i32 %16, %15
store i32 %17, i32* %9
%18 = load i32, i32* %9
%19 = shl i32 %18, 8
store i32 %19, i32* %9
%20 = load i8, i8* %6
%21 = zext i8 %20 to i32
%22 = load i32, i32* %9
%23 = add i32 %22, %21
store i32 %23, i32* %9
%24 = load i32, i32* %9
%25 = shl i32 %24, 8
store i32 %25, i32* %9
%26 = load i8, i8* %5
%27 = zext i8 %26 to i32
%28 = load i32, i32* %9
%29 = add i32 %28, %27
store i32 %29, i32* %9
%30 = load i32, i32* %9
ret i32 %30
}

LLVM IR (-O2):
define i32 @buildWord(i8 zeroext %0, i8 zeroext %1, i8 zeroext %2, i8 zeroext %3) {
%5 = zext i8 %3 to i32
%6 = zext i8 %2 to i32
%7 = shl nuw nsw i32 %5, 16
%8 = shl nuw nsw i32 %6, 8
%9 = or i32 %7, %8
%10 = zext i8 %1 to i32
%11 = or i32 %9, %10
%12 = shl nuw i32 %11, 8
%13 = zext i8 %0 to i32
%14 = or i32 %12, %13
ret i32 %14
}