xunge/DecIR huggingface dataset:
int pathconN_nm5_work(int *sz_arg, int *sz_res, int *sz_iw, int *sz_w) {
  if (sz_arg)
    *sz_arg = 1;
  if (sz_res)
    *sz_res = 2;
  if (sz_iw)
    *sz_iw = 0;
  if (sz_w)
    *sz_w = 0;
  return 0;
}


x86 assembly (clang, -O0):
<pathconN_nm5_work>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1129 <pathconN_nm5_work+0x29>
mov    -0x8(%rbp),%rax
movl   $0x1,(%rax)
cmpq   $0x0,-0x10(%rbp)
je     113e <pathconN_nm5_work+0x3e>
mov    -0x10(%rbp),%rax
movl   $0x2,(%rax)
cmpq   $0x0,-0x18(%rbp)
je     1153 <pathconN_nm5_work+0x53>
mov    -0x18(%rbp),%rax
movl   $0x0,(%rax)
cmpq   $0x0,-0x20(%rbp)
je     1168 <pathconN_nm5_work+0x68>
mov    -0x20(%rbp),%rax
movl   $0x0,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pathconN_nm5_work>:
test   %rdi,%rdi
je     110b <pathconN_nm5_work+0xb>
movl   $0x1,(%rdi)
test   %rsi,%rsi
je     1116 <pathconN_nm5_work+0x16>
movl   $0x2,(%rsi)
test   %rdx,%rdx
je     1121 <pathconN_nm5_work+0x21>
movl   $0x0,(%rdx)
test   %rcx,%rcx
je     112c <pathconN_nm5_work+0x2c>
movl   $0x0,(%rcx)
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @pathconN_nm5_work(i32* %0, i32* %1, i32* %2, i32* %3) {
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32*
store i32* %0, i32** %5
store i32* %1, i32** %6
store i32* %2, i32** %7
store i32* %3, i32** %8
%9 = load i32*, i32** %5
%10 = icmp ne i32* %9, null
br i1 %10, label %11, label %13
11: ; preds = %4
%12 = load i32*, i32** %5
store i32 1, i32* %12
br label %13
13: ; preds = %11, %4
%14 = load i32*, i32** %6
%15 = icmp ne i32* %14, null
br i1 %15, label %16, label %18
16: ; preds = %13
%17 = load i32*, i32** %6
store i32 2, i32* %17
br label %18
18: ; preds = %16, %13
%19 = load i32*, i32** %7
%20 = icmp ne i32* %19, null
br i1 %20, label %21, label %23
21: ; preds = %18
%22 = load i32*, i32** %7
store i32 0, i32* %22
br label %23
23: ; preds = %21, %18
%24 = load i32*, i32** %8
%25 = icmp ne i32* %24, null
br i1 %25, label %26, label %28
26: ; preds = %23
%27 = load i32*, i32** %8
store i32 0, i32* %27
br label %28
28: ; preds = %26, %23
ret i32 0
}

LLVM IR (-O2):
define i32 @pathconN_nm5_work(i32* writeonly %0, i32* writeonly %1, i32* writeonly %2, i32* writeonly %3) {
%5 = icmp eq i32* %0, null
br i1 %5, label %7, label %6
6: ; preds = %4
store i32 1, i32* %0
br label %7
7: ; preds = %6, %4
%8 = icmp eq i32* %1, null
br i1 %8, label %10, label %9
9: ; preds = %7
store i32 2, i32* %1
br label %10
10: ; preds = %9, %7
%11 = icmp eq i32* %2, null
br i1 %11, label %13, label %12
12: ; preds = %10
store i32 0, i32* %2
br label %13
13: ; preds = %12, %10
%14 = icmp eq i32* %3, null
br i1 %14, label %16, label %15
15: ; preds = %13
store i32 0, i32* %3
br label %16
16: ; preds = %15, %13
ret i32 0
}
int r(int a, int b) { return ~b; }


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

x86 assembly (clang, -O2):
<r>:
mov    %esi,%eax
not    %eax
ret

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

LLVM IR (-O2):
define i32 @r(i32 %0, i32 %1) {
%3 = xor i32 %1, -1
ret i32 %3
}
__attribute__((weak, section(".after_vectors"))) void MemManage_Handler(void) {
  while (1) {
  }
}


x86 assembly (clang, -O0):
<MemManage_Handler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <MemManage_Handler+0x9>
jmp    1109 <MemManage_Handler+0x9>

x86 assembly (clang, -O2):
<MemManage_Handler>:
jmp    1100 <MemManage_Handler>

LLVM IR (-O0):
define weak void @MemManage_Handler() section ".after_vectors" {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define weak void @MemManage_Handler() section ".after_vectors" {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ swap(int *, int *);
int main() {
  int one = 1, two = 2;
  swap(&one, &two);
  printf("one is %d\n", one);
  printf("two is %d\n", two);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x1,0x4(%rsp)
movl   $0x2,(%rsp)
lea    0x4(%rsp),%rdi
mov    %rsp,%rsi
call   1040 <swap@plt>
mov    0x4(%rsp),%esi
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
mov    (%rsp),%esi
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"one is %d\0A\00"
@.str.1 = [11 x i8] c"two is %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 2, i32* %3
%4 = call i32 @swap(i32* %2, i32* %3)
%5 = load i32, i32* %2
%6 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = load i32, i32* %3
%8 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"one is %d\0A\00"
@.str.1 = [11 x i8] c"two is %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
store i32 1, i32* %1
%4 = bitcast i32* %2 to i8*
store i32 2, i32* %2
%5 = call i32 @swap(i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = load i32, i32* %2
%9 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %8)
ret i32 0
}
/* Variables and functions */
int execvp(char const *, char *const *);
int ExecVp(const char *path, char *const argv[]) { return execvp(path, argv); }


x86 assembly (clang, -O0):
<ExecVp>:
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 <execvp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ExecVp>:
jmp    1030 <execvp@plt>

LLVM IR (-O0):
define i32 @ExecVp(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 @execvp(i8* %5, i8** %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @ExecVp(i8* %0, i8** %1) {
%3 = tail call i32 @execvp(i8* %0, i8** %1)
ret i32 %3
}
int cvtdouble(void) {
  double d;
  d = 32;
  return d;
}


x86 assembly (clang, -O0):
<cvtdouble>:
push   %rbp
mov    %rsp,%rbp
movsd  0xef4(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
cvttsd2si -0x8(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @cvtdouble() {
%1 = alloca double
store double 3.200000e+01, double* %1
%2 = load double, double* %1
%3 = fptosi double %2 to i32
ret i32 %3
}

LLVM IR (-O2):
define i32 @cvtdouble() {
ret i32 32
}
void f(void) {
  __attribute__((altivec(vector__))) float zero_float =
      (__attribute__((altivec(vector__))) float){0.0, 0.0, 0.0, 0.0};
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
xorps  %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @f() {
%1 = alloca float
%2 = alloca float
store float 0.000000e+00, float* %2
%3 = load float, float* %2
store float %3, float* %1
ret void
}

LLVM IR (-O2):
define void @f() {
ret void
}
unsigned short ldbs_peek2(unsigned char *src) {
  unsigned short u = src[1];
  u = (u << 8) | src[0];
  return u;
}


x86 assembly (clang, -O0):
<ldbs_peek2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl 0x1(%rax),%eax
mov    %ax,-0xa(%rbp)
movzwl -0xa(%rbp),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
or     %ecx,%eax
mov    %ax,-0xa(%rbp)
movzwl -0xa(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ldbs_peek2>:
movzwl (%rdi),%eax
ret

LLVM IR (-O0):
define zeroext i16 @ldbs_peek2(i8* %0) {
%2 = alloca i8*
%3 = alloca i16
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = getelementptr inbounds i8, i8* %4, i64 1
%6 = load i8, i8* %5
%7 = zext i8 %6 to i16
store i16 %7, i16* %3
%8 = load i16, i16* %3
%9 = zext i16 %8 to i32
%10 = shl i32 %9, 8
%11 = load i8*, i8** %2
%12 = getelementptr inbounds i8, i8* %11, i64 0
%13 = load i8, i8* %12
%14 = zext i8 %13 to i32
%15 = or i32 %10, %14
%16 = trunc i32 %15 to i16
store i16 %16, i16* %3
%17 = load i16, i16* %3
ret i16 %17
}

LLVM IR (-O2):
define zeroext i16 @ldbs_peek2(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 1
%3 = load i8, i8* %2
%4 = zext i8 %3 to i16
%5 = shl nuw i16 %4, 8
%6 = load i8, i8* %0
%7 = zext i8 %6 to i16
%8 = or i16 %5, %7
ret i16 %8
}
/* Type definitions */
typedef scalar_t__ uint64_t;
typedef int uint32_t;

/* Variables and functions */
int clz64(scalar_t__);
uint32_t num_leading_zeros(uint64_t x) { return (x == 0) ? 64 : clz64(x); }


x86 assembly (clang, -O0):
<num_leading_zeros>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1134 <num_leading_zeros+0x24>
mov    $0x40,%eax
mov    %eax,-0xc(%rbp)
jmp    1140 <num_leading_zeros+0x30>
mov    -0x8(%rbp),%rdi
call   1030 <clz64@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<num_leading_zeros>:
test   %rdi,%rdi
je     111a <num_leading_zeros+0xa>
jmp    1030 <clz64@plt>
mov    $0x40,%eax
ret

LLVM IR (-O0):
define i32 @num_leading_zeros(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %1
br label %9
6: ; preds = %1
%7 = load i64, i64* %2
%8 = call i32 @clz64(i64 %7)
br label %9
9: ; preds = %6, %5
%10 = phi i32 [ 64, %5 ], [ %8, %6 ]
ret i32 %10
}

LLVM IR (-O2):
define i32 @num_leading_zeros(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @clz64(i64 %0)
br label %5
5: ; preds = %1, %3
%6 = phi i32 [ %4, %3 ], [ 64, %1 ]
ret i32 %6
}
/* Variables and functions */
unsigned long pci_read_config32(int, int);
int cold_reset_detected(void) {
  unsigned long htic;
  htic = pci_read_config32(
      ((((0) & 0xFF) << 16) | (((0x18) & 0x1f) << 11) | (((0) & 0x7) << 8)),
      0x6c);
  return !(htic & (1 << 4));
}


x86 assembly (clang, -O0):
<cold_reset_detected>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xc000,%edi
mov    $0x6c,%esi
call   1030 <pci_read_config32@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
and    $0x10,%rax
cmp    $0x0,%rax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cold_reset_detected>:
push   %rax
mov    $0xc000,%edi
mov    $0x6c,%esi
call   1030 <pci_read_config32@plt>
xor    %ecx,%ecx
test   $0x10,%al
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @cold_reset_detected() {
%1 = alloca i64
%2 = call i64 @pci_read_config32(i32 49152, i32 108)
store i64 %2, i64* %1
%3 = load i64, i64* %1
%4 = and i64 %3, 16
%5 = icmp ne i64 %4, 0
%6 = xor i1 %5, true
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @cold_reset_detected() {
%1 = tail call i64 @pci_read_config32(i32 49152, i32 108)
%2 = trunc i64 %1 to i32
%3 = lshr i32 %2, 4
%4 = and i32 %3, 1
%5 = xor i32 %4, 1
ret i32 %5
}
/* Variables and functions */
int afrand(int);
double anfrand(int idx) { return afrand(idx) * 2 - 1; }


x86 assembly (clang, -O0):
<anfrand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <afrand@plt>
shl    $0x1,%eax
sub    $0x1,%eax
cvtsi2sd %eax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<anfrand>:
push   %rax
call   1030 <afrand@plt>
add    %eax,%eax
add    $0xffffffff,%eax
cvtsi2sd %eax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @anfrand(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @afrand(i32 %3)
%5 = mul nsw i32 %4, 2
%6 = sub nsw i32 %5, 1
%7 = sitofp i32 %6 to double
ret double %7
}

LLVM IR (-O2):
define double @anfrand(i32 %0) {
%2 = tail call i32 @afrand(i32 %0)
%3 = shl nsw i32 %2, 1
%4 = add nsw i32 %3, -1
%5 = sitofp i32 %4 to double
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ listnum(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int);
int main() {
  int n;
  printf("\nEnter an integer > ");
  scanf("&d", n);
  if (n != 0) {
    listnum(n);
  } else if (n == 0) {
    printf("\n0");
  }
  printf("\nThat's all, have a nice day!\n");
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
lea    0xec0(%rip),%rdi
call   1050 <scanf@plt>
cmpl   $0x0,-0x8(%rbp)
je     1171 <main+0x41>
mov    -0x8(%rbp),%edi
call   1040 <listnum@plt>
jmp    118c <main+0x5c>
cmpl   $0x0,-0x8(%rbp)
jne    1187 <main+0x57>
lea    0xe96(%rip),%rdi
call   1030 <printf@plt>
jmp    118c <main+0x5c>
lea    0xe88(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [21 x i8] c"\0AEnter an integer > \00"
@.str.1 = [3 x i8] c"&d\00"
@.str.2 = [3 x i8] c"\0A0\00"
@.str.3 = [31 x i8] c"\0AThat's all, have a nice day!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* %2
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %4)
%6 = load i32, i32* %2
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %0
%9 = load i32, i32* %2
%10 = call i32 @listnum(i32 %9)
br label %17
11: ; preds = %0
%12 = load i32, i32* %2
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %11
%15 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
br label %16
16: ; preds = %14, %11
br label %17
17: ; preds = %16, %8
%18 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [21 x i8] c"\0AEnter an integer > \00"
@.str.1 = [3 x i8] c"&d\00"
@str = [30 x i8] c"\0AThat's all, have a nice day!\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 undef)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ isalnum(int);
int /*<<< orphan*/ iscntrl(int);
ispunct(int c) { return (!iscntrl(c) && !isalnum(c)); }


x86 assembly (clang, -O0):
<ispunct>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <iscntrl@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x5(%rbp)
jne    1156 <ispunct+0x36>
mov    -0x4(%rbp),%edi
call   1040 <isalnum@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ispunct>:
push   %rbx
mov    %edi,%ebx
call   1030 <iscntrl@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
je     1132 <ispunct+0x12>
pop    %rbx
ret
mov    %ebx,%edi
call   1040 <isalnum@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
sete   %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @ispunct(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @iscntrl(i32 %3)
%5 = icmp ne i32 %4, 0
br i1 %5, label %11, label %6
6: ; preds = %1
%7 = load i32, i32* %2
%8 = call i32 @isalnum(i32 %7)
%9 = icmp ne i32 %8, 0
%10 = xor i1 %9, true
br label %11
11: ; preds = %6, %1
%12 = phi i1 [ false, %1 ], [ %10, %6 ]
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @ispunct(i32 %0) {
%2 = tail call i32 @iscntrl(i32 %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i32 @isalnum(i32 %0)
%6 = icmp eq i32 %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
}
void g_bit_nth_msf() {}


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

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

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

LLVM IR (-O2):
define void @g_bit_nth_msf() {
ret void
}
/* Variables and functions */
int close(int);
int /*<<< orphan*/ perror(char *);
void eclose(int fd) {
  if (close(fd) == -1)
    perror("close");
}


x86 assembly (clang, -O0):
<eclose>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <close@plt>
cmp    $0xffffffff,%eax
jne    1148 <eclose+0x28>
lea    0xebd(%rip),%rdi
call   1040 <perror@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eclose>:
push   %rax
call   1030 <close@plt>
cmp    $0xffffffff,%eax
je     112d <eclose+0xd>
pop    %rax
ret
lea    0xecc(%rip),%rdi
pop    %rax
jmp    1040 <perror@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"close\00"
define void @eclose(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @close(i32 %3)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"close\00"
define void @eclose(i32 %0) {
%2 = tail call i32 @close(i32 %0)
%3 = icmp eq i32 %2, -1
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret void
}
unsigned FSE_versionNumber(void) { return (0 * 100 * 100 + 9 * 100 + 0); }


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

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

LLVM IR (-O0):
define i32 @FSE_versionNumber() {
ret i32 900
}

LLVM IR (-O2):
define i32 @FSE_versionNumber() {
ret i32 900
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
scalar_t__ scanf(char *, char *);
int wmatch(char *);
int main() {
  char word[255];
  while (scanf("%s", word) > 0) {
    if (wmatch(word) == true)
      puts(word);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x110(%rbp),%rsi
lea    0xeb0(%rip),%rdi
call   1040 <scanf@plt>
cmp    $0x0,%rax
jle    1185 <main+0x55>
lea    -0x110(%rbp),%rdi
call   1050 <wmatch@plt>
cmp    $0x1,%eax
jne    1180 <main+0x50>
lea    -0x110(%rbp),%rdi
call   1030 <puts@plt>
jmp    1142 <main+0x12>
xor    %eax,%eax
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x108,%rsp
lea    0xebf(%rip),%rdi
mov    %rsp,%rsi
call   1040 <scanf@plt>
test   %rax,%rax
jle    1187 <main+0x57>
mov    %rsp,%rbx
lea    0xea8(%rip),%r14
jmp    1170 <main+0x40>
nopw   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
test   %rax,%rax
jle    1187 <main+0x57>
mov    %rbx,%rdi
call   1050 <wmatch@plt>
cmp    $0x1,%eax
jne    1160 <main+0x30>
mov    %rbx,%rdi
call   1030 <puts@plt>
jmp    1160 <main+0x30>
xor    %eax,%eax
add    $0x108,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [255 x i8]
store i32 0, i32* %1
br label %3
3: ; preds = %14, %0
%4 = getelementptr inbounds [255 x i8], [255 x i8]* %2, i64 0, i64 0
%5 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = icmp sgt i64 %5, 0
br i1 %6, label %7, label %15
7: ; preds = %3
%8 = getelementptr inbounds [255 x i8], [255 x i8]* %2, i64 0, i64 0
%9 = call i32 @wmatch(i8* %8)
%10 = icmp eq i32 %9, 1
br i1 %10, label %11, label %14
11: ; preds = %7
%12 = getelementptr inbounds [255 x i8], [255 x i8]* %2, i64 0, i64 0
%13 = call i32 @puts(i8* %12)
br label %14
14: ; preds = %11, %7
br label %3
15: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [255 x i8]
%2 = getelementptr inbounds [255 x i8], [255 x i8]* %1, i64 0, i64 0
%3 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = icmp sgt i64 %3, 0
br i1 %4, label %5, label %13
5: ; preds = %0, %10
%6 = call i32 @wmatch(i8* %2)
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = call i32 @puts(i8* %2)
br label %10
10: ; preds = %8, %5
%11 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%12 = icmp sgt i64 %11, 0
br i1 %12, label %5, label %13
13: ; preds = %10, %0
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ p32c8init(int /*<<< orphan*/ *, int /*<<< orphan*/,
                             int /*<<< orphan*/ *, int /*<<< orphan*/,
                             int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ ppuSetNameTblSingleLower();
void m7_init(uint8_t *prgROMin, uint32_t prgROMsizeIn, uint8_t *prgRAMin,
             uint32_t prgRAMsizeIn, uint8_t *chrROMin, uint32_t chrROMsizeIn) {
  p32c8init(prgROMin, prgROMsizeIn, prgRAMin, prgRAMsizeIn, chrROMin,
            chrROMsizeIn);
  ppuSetNameTblSingleLower();
}


x86 assembly (clang, -O0):
<m7_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x28(%rbp),%r8
mov    -0x2c(%rbp),%r9d
call   1030 <p32c8init@plt>
mov    $0x0,%al
call   1040 <ppuSetNameTblSingleLower@plt>
add    $0x30,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @m7_init(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* %8
%15 = load i32*, i32** %9
%16 = load i32, i32* %10
%17 = load i32*, i32** %11
%18 = load i32, i32* %12
%19 = call i32 @p32c8init(i32* %13, i32 %14, i32* %15, i32 %16, i32* %17, i32 %18)
%20 = call i32 (...) @ppuSetNameTblSingleLower()
ret void
}

LLVM IR (-O2):
define void @m7_init(i32* %0, i32 %1, i32* %2, i32 %3, i32* %4, i32 %5) {
%7 = tail call i32 @p32c8init(i32* %0, i32 %1, i32* %2, i32 %3, i32* %4, i32 %5)
%8 = tail call i32 (...) @ppuSetNameTblSingleLower()
ret void
}
int ceph_osd_op_type_pg(int op) { return (op & 0x0f00) == 0x0500; }


x86 assembly (clang, -O0):
<ceph_osd_op_type_pg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xf00,%eax
cmp    $0x500,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ceph_osd_op_type_pg>:
and    $0xf00,%edi
xor    %eax,%eax
cmp    $0x500,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @ceph_osd_op_type_pg(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 3840
%5 = icmp eq i32 %4, 1280
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @ceph_osd_op_type_pg(i32 %0) {
%2 = and i32 %0, 3840
%3 = icmp eq i32 %2, 1280
%4 = zext i1 %3 to i32
ret i32 %4
}
int f(int i, int *arr) {
  if (i < 0)
    return 0;
  if (i > 10)
    return arr[i];
  return f(i + 1, arr);
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    1135 <f+0x25>
movl   $0x0,-0x4(%rbp)
jmp    1164 <f+0x54>
cmpl   $0xa,-0x8(%rbp)
jle    1152 <f+0x42>
mov    -0x10(%rbp),%rax
movslq -0x8(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x4(%rbp)
jmp    1164 <f+0x54>
mov    -0x8(%rbp),%edi
add    $0x1,%edi
mov    -0x10(%rbp),%rsi
call   1030 <f@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
test   %edi,%edi
js     1113 <f+0x13>
cmp    $0xc,%edi
mov    $0xb,%eax
cmovae %edi,%eax
mov    (%rsi,%rax,4),%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @f(i32 %0, i32* nocapture %1) {
%3 = icmp slt i32 %0, 0
br i1 %3, label %9, label %4
4: ; preds = %2
%5 = call i32 @llvm.umax.i32(i32 %0, i32 11)
%6 = zext i32 %5 to i64
%7 = getelementptr inbounds i32, i32* %1, i64 %6
%8 = load i32, i32* %7
br label %9
9: ; preds = %2, %4
%10 = phi i32 [ %8, %4 ], [ 0, %2 ]
ret i32 %10
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ hd_part(int /*<<< orphan*/ *);
int /*<<< orphan*/ hd_psupp(int /*<<< orphan*/ *);
int hd_part_psupp(FILE *f) {
  hd_part(f);
  hd_psupp(f);
  return (0);
}


x86 assembly (clang, -O0):
<hd_part_psupp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <hd_part@plt>
mov    -0x8(%rbp),%rdi
call   1040 <hd_psupp@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hd_part_psupp>:
push   %rbx
mov    %rdi,%rbx
call   1030 <hd_part@plt>
mov    %rbx,%rdi
call   1040 <hd_psupp@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @hd_part_psupp(i32* %0) {
%2 = tail call i32 @hd_part(i32* %0)
%3 = tail call i32 @hd_psupp(i32* %0)
ret i32 0
}
double todeg(double x) { return x * 180 / 3.14159; }


x86 assembly (clang, -O0):
<todeg>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xef7(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  0xee2(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<todeg>:
mulsd  0xef8(%rip),%xmm0
divsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @todeg(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double %3, 1.800000e+02
%5 = fdiv double %4, 3.141590e+00
ret double %5
}

LLVM IR (-O2):
define double @todeg(double %0) {
%2 = fmul double %0, 1.800000e+02
%3 = fdiv double %2, 3.141590e+00
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ access(char *, int /*<<< orphan*/);
int main(void) { access("tata", 0); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
xor    %esi,%esi
call   1030 <access@plt>
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"tata\00"
define i32 @main() {
%1 = tail call i32 @access(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
int __fchdir(int fd) {
  __set_errno(ENOSYS);
  return -1;
}


x86 assembly (clang, -O0):
<__fchdir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__fchdir>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
define i32 @__fchdir(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @ENOSYS
%4 = call i32 @__set_errno(i32 %3)
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @__fchdir(i32 %0) {
%2 = load i32, i32* @ENOSYS
%3 = tail call i32 @__set_errno(i32 %2)
ret i32 -1
}
/* Variables and functions */
char bclr_b(char *, char *);
signed char intr_wrap_517(signed char p1, signed char p2) {
  return bclr_b(&p1, &p2);
}


x86 assembly (clang, -O0):
<intr_wrap_517>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
lea    -0x1(%rbp),%rdi
lea    -0x2(%rbp),%rsi
call   1030 <bclr_b@plt>
movsbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<intr_wrap_517>:
push   %rax
mov    %dil,0x7(%rsp)
mov    %sil,0x6(%rsp)
lea    0x7(%rsp),%rdi
lea    0x6(%rsp),%rsi
call   1030 <bclr_b@plt>
pop    %rcx
ret

LLVM IR (-O0):
define signext i8 @intr_wrap_517(i8 signext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = call signext i8 @bclr_b(i8* %3, i8* %4)
ret i8 %5
}

LLVM IR (-O2):
define signext i8 @intr_wrap_517(i8 signext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = call signext i8 @bclr_b(i8* %3, i8* %4)
ret i8 %5
}
int pq_parent(int child_index) {
  if (child_index == 1) {
    return -1;
  }
  return ((int)child_index / 2);
}


x86 assembly (clang, -O0):
<pq_parent>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    111d <pq_parent+0x1d>
movl   $0xffffffff,-0x4(%rbp)
jmp    112b <pq_parent+0x2b>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pq_parent>:
mov    $0xffffffff,%eax
cmp    $0x1,%edi
je     1113 <pq_parent+0x13>
mov    %edi,%eax
shr    $0x1f,%eax
add    %edi,%eax
sar    %eax
ret

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

LLVM IR (-O2):
define i32 @pq_parent(i32 %0) {
%2 = icmp eq i32 %0, 1
%3 = sdiv i32 %0, 2
%4 = select i1 %2, i32 -1, i32 %3
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
void getch(void) { system("read b"); }


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

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

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

LLVM IR (-O2):
@.str = [7 x i8] c"read b\00"
define void @getch() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}
char *strcat(char *destination, const char *source) {
  char *originalDestination = destination;
  while (*destination) {
    destination++;
  }
  while ((*destination++ = *source++)) {
  }
  return originalDestination;
}


x86 assembly (clang, -O0):
<strcat>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1132 <strcat+0x32>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1114 <strcat+0x14>
jmp    1137 <strcat+0x37>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %al,(%rcx)
cmp    $0x0,%al
je     1166 <strcat+0x66>
jmp    1137 <strcat+0x37>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

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

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

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


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_w_epel_h12_8_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ getlog();
void realtime(void) { getlog(); }


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

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

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

LLVM IR (-O2):
define void @realtime() {
%1 = tail call i32 (...) @getlog()
ret void
}
int test_09(unsigned char x, int y, int z) { return ((x << 3) & 111) == 0; }


x86 assembly (clang, -O0):
<test_09>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x3,%eax
and    $0x6f,%eax
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_09>:
xor    %eax,%eax
test   $0xd,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @test_09(i8 zeroext %0, i32 %1, i32 %2) {
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
store i8 %0, i8* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i8, i8* %4
%8 = zext i8 %7 to i32
%9 = shl i32 %8, 3
%10 = and i32 %9, 111
%11 = icmp eq i32 %10, 0
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @test_09(i8 zeroext %0, i32 %1, i32 %2) {
%4 = and i8 %0, 13
%5 = icmp eq i8 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
size_t fread_unlocked(void *, size_t, size_t, int /*<<< orphan*/ *);
__attribute__((__weak__, __always___)) size_t
softboundmpx_fread_unlocked(void *ptr, size_t size, size_t n, FILE *stream) {
  return fread_unlocked(ptr, size, n, stream);
}


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

x86 assembly (clang, -O2):
<softboundmpx_fread_unlocked>:
jmp    1030 <fread_unlocked@plt>

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

LLVM IR (-O2):
define weak i64 @softboundmpx_fread_unlocked(i8* %0, i64 %1, i64 %2, i32* %3) {
%5 = tail call i64 @fread_unlocked(i8* %0, i64 %1, i64 %2, i32* %3)
ret i64 %5
}
int jmc_check_endian() { return 1; }


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

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

LLVM IR (-O0):
define i32 @jmc_check_endian() {
ret i32 1
}

LLVM IR (-O2):
define i32 @jmc_check_endian() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ snprintf(char *, int, char *, char *, double);
int system(char *);
int update_rrd(char *rrdfilename, double pressure) {
  char buf[256];
  snprintf(buf, 256, "rrdtool update %s N:%g", rrdfilename, pressure);
  return system(buf);
}


x86 assembly (clang, -O0):
<update_rrd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
lea    -0x110(%rbp),%rdi
mov    -0x8(%rbp),%rcx
movsd  -0x10(%rbp),%xmm0
mov    $0x100,%esi
lea    0xeb0(%rip),%rdx
call   1040 <snprintf@plt>
lea    -0x110(%rbp),%rdi
call   1030 <system@plt>
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<update_rrd>:
push   %rbx
sub    $0x100,%rsp
mov    %rdi,%rcx
lea    0xece(%rip),%rdx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x100,%esi
call   1040 <snprintf@plt>
mov    %rbx,%rdi
call   1030 <system@plt>
add    $0x100,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [23 x i8] c"rrdtool update %s N:%g\00"
define i32 @update_rrd(i8* %0, double %1) {
%3 = alloca i8*
%4 = alloca double
%5 = alloca [256 x i8]
store i8* %0, i8** %3
store double %1, double* %4
%6 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%7 = load i8*, i8** %3
%8 = load double, double* %4
%9 = call i32 @snprintf(i8* %6, i32 256, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %7, double %8)
%10 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%11 = call i32 @system(i8* %10)
ret i32 %11
}

LLVM IR (-O2):
@.str = [23 x i8] c"rrdtool update %s N:%g\00"
define i32 @update_rrd(i8* %0, double %1) {
%3 = alloca [256 x i8]
%4 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%5 = call i32 @snprintf(i8* %4, i32 256, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %0, double %1)
%6 = call i32 @system(i8* %4)
ret i32 %6
}
/* Variables and functions */
char *strdup2(char *);
char *get_windows_drive_path() { return strdup2("/"); }


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

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

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

LLVM IR (-O2):
@.str = [2 x i8] c"/\00"
define i8* @get_windows_drive_path() {
%1 = tail call i8* @strdup2(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}
void av_tea_init() {}


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

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

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

LLVM IR (-O2):
define void @av_tea_init() {
ret void
}
/* Variables and functions */
unsigned int strlen(char *);
char *read_chars_mm(void **p, unsigned *rlen) {
  char *addr = *(char **)p;
  size_t len = *rlen = strlen(addr);
  *p = addr + len + 1;
  return addr;
}


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

x86 assembly (clang, -O2):
<read_chars_mm>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
mov    (%rdi),%rbx
mov    %rbx,%rdi
call   1030 <strlen@plt>
mov    %eax,(%r14)
mov    %eax,%eax
add    %rbx,%rax
add    $0x1,%rax
mov    %rax,(%r15)
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @read_chars_mm(i8** %0, i32* %1) {
%3 = alloca i8**
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i64
store i8** %0, i8*** %3
store i32* %1, i32** %4
%7 = load i8**, i8*** %3
%8 = load i8*, i8** %7
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = call i32 @strlen(i8* %9)
%11 = load i32*, i32** %4
store i32 %10, i32* %11
%12 = zext i32 %10 to i64
store i64 %12, i64* %6
%13 = load i8*, i8** %5
%14 = load i64, i64* %6
%15 = getelementptr inbounds i8, i8* %13, i64 %14
%16 = getelementptr inbounds i8, i8* %15, i64 1
%17 = load i8**, i8*** %3
store i8* %16, i8** %17
%18 = load i8*, i8** %5
ret i8* %18
}

LLVM IR (-O2):
define i8* @read_chars_mm(i8** nocapture %0, i32* nocapture writeonly %1) {
%3 = load i8*, i8** %0
%4 = tail call i32 @strlen(i8* %3)
store i32 %4, i32* %1
%5 = zext i32 %4 to i64
%6 = getelementptr inbounds i8, i8* %3, i64 %5
%7 = getelementptr inbounds i8, i8* %6, i64 1
store i8* %7, i8** %0
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ GL_COLOR_BUFFER_BIT;
int /*<<< orphan*/ createPolygonMtr();
int /*<<< orphan*/ glClear(int /*<<< orphan*/);
int /*<<< orphan*/ glColor3f(float, float, float);
int /*<<< orphan*/ glFlush();
void display() {
  glClear(GL_COLOR_BUFFER_BIT);
  glColor3f(0.0f, 0.0f, 0.0f);
  createPolygonMtr();
  glFlush();
}


x86 assembly (clang, -O0):
<display>:
push   %rbp
mov    %rsp,%rbp
mov    0x2e95(%rip),%rax
mov    (%rax),%edi
call   1030 <glClear@plt>
xorps  %xmm2,%xmm2
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
call   1050 <glColor3f@plt>
mov    $0x0,%al
call   1040 <createPolygonMtr@plt>
mov    $0x0,%al
call   1060 <glFlush@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<display>:
push   %rax
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
call   1030 <glClear@plt>
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
call   1050 <glColor3f@plt>
xor    %eax,%eax
call   1040 <createPolygonMtr@plt>
xor    %eax,%eax
pop    %rcx
jmp    1060 <glFlush@plt>

LLVM IR (-O0):
@GL_COLOR_BUFFER_BIT = global i32 0
define void @display() {
%1 = load i32, i32* @GL_COLOR_BUFFER_BIT
%2 = call i32 @glClear(i32 %1)
%3 = call i32 @glColor3f(float 0.000000e+00, float 0.000000e+00, float 0.000000e+00)
%4 = call i32 (...) @createPolygonMtr()
%5 = call i32 (...) @glFlush()
ret void
}

LLVM IR (-O2):
@GL_COLOR_BUFFER_BIT = global i32 0
define void @display() {
%1 = load i32, i32* @GL_COLOR_BUFFER_BIT
%2 = tail call i32 @glClear(i32 %1)
%3 = tail call i32 @glColor3f(float 0.000000e+00, float 0.000000e+00, float 0.000000e+00)
%4 = tail call i32 (...) @createPolygonMtr()
%5 = tail call i32 (...) @glFlush()
ret void
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
int32_t mask(int32_t a, int32_t b) { return -(a == b); }


x86 assembly (clang, -O0):
<mask>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%ecx
xor    %eax,%eax
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mask>:
xor    %eax,%eax
cmp    %esi,%edi
sete   %al
neg    %eax
ret

LLVM IR (-O0):
define i32 @mask(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = icmp eq i32 %5, %6
%8 = zext i1 %7 to i32
%9 = sub nsw i32 0, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @mask(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, %1
%4 = sext i1 %3 to i32
ret i32 %4
}
void f() {
  struct {
    int x;
    int y;
  } a;
  struct ABC {
    float foo;
    float bar;
    struct {
      int a;
      int b;
    } baz;
  };
  struct ABC b;
}


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

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

LLVM IR (-O0):
%struct.anon = type { i32, i32 }
%struct.ABC = type { float, float, %struct.anon.0 }
%struct.anon.0 = type { i32, i32 }
define void @f() {
%1 = alloca %struct.anon
%2 = alloca %struct.ABC
ret void
}

LLVM IR (-O2):
%struct.anon = type { i32, i32 }
%struct.ABC = type { float, float, %struct.anon.0 }
%struct.anon.0 = type { i32, i32 }
define void @f() {
ret void
}