xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char *);
char *ltrim(char *buf) {
  char *tmp = buf;
  while ((*tmp == ' ') || (*tmp == '\t'))
    tmp++;
  strcpy(buf, tmp);
  return buf;
}


x86 assembly (clang, -O0):
<ltrim>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x11(%rbp)
je     1149 <ltrim+0x39>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
sete   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1159 <ltrim+0x49>
jmp    116a <ltrim+0x5a>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1124 <ltrim+0x14>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ltrim>:
push   %rbx
mov    %rdi,%rbx
mov    %rdi,%rsi
jmp    1124 <ltrim+0x14>
nopl   0x0(%rax)
add    $0x1,%rsi
movzbl (%rsi),%eax
cmp    $0x20,%al
je     1120 <ltrim+0x10>
cmp    $0x9,%al
je     1120 <ltrim+0x10>
mov    %rbx,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @ltrim(i8* returned %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
]
5: ; preds = %2, %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
7: ; preds = %2
%8 = tail call i32 @strcpy(i8* %0, i8* %3)
ret i8* %0
}
/* Type definitions */
struct vmallocator {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ memset(int /*<<< orphan*/, int /*<<< orphan*/, size_t);
size_t vmallocator_alloc(struct vmallocator *, size_t);
int /*<<< orphan*/ vmallocator_ofs2mem(struct vmallocator *, size_t);
size_t vmallocator_alloczero(struct vmallocator *v, size_t s) {
  size_t ofs = vmallocator_alloc(v, s);
  memset(vmallocator_ofs2mem(v, ofs), 0, s);
  return ofs;
}


x86 assembly (clang, -O0):
<vmallocator_alloczero>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <vmallocator_alloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <vmallocator_ofs2mem@plt>
mov    %eax,%edi
mov    -0x10(%rbp),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vmallocator_alloczero>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
call   1050 <vmallocator_alloc@plt>
mov    %rax,%r15
mov    %rbx,%rdi
mov    %rax,%rsi
call   1040 <vmallocator_ofs2mem@plt>
mov    %eax,%edi
xor    %esi,%esi
mov    %r14,%rdx
call   1030 <memset@plt>
mov    %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.vmallocator = type { i32 }
define i64 @vmallocator_alloczero(%struct.vmallocator* %0, i64 %1) {
%3 = alloca %struct.vmallocator*
%4 = alloca i64
%5 = alloca i64
store %struct.vmallocator* %0, %struct.vmallocator** %3
store i64 %1, i64* %4
%6 = load %struct.vmallocator*, %struct.vmallocator** %3
%7 = load i64, i64* %4
%8 = call i64 @vmallocator_alloc(%struct.vmallocator* %6, i64 %7)
store i64 %8, i64* %5
%9 = load %struct.vmallocator*, %struct.vmallocator** %3
%10 = load i64, i64* %5
%11 = call i32 @vmallocator_ofs2mem(%struct.vmallocator* %9, i64 %10)
%12 = load i64, i64* %4
%13 = call i32 @memset(i32 %11, i32 0, i64 %12)
%14 = load i64, i64* %5
ret i64 %14
}

LLVM IR (-O2):
%struct.vmallocator = type { i32 }
define i64 @vmallocator_alloczero(%struct.vmallocator* %0, i64 %1) {
%3 = tail call i64 @vmallocator_alloc(%struct.vmallocator* %0, i64 %1)
%4 = tail call i32 @vmallocator_ofs2mem(%struct.vmallocator* %0, i64 %3)
%5 = tail call i32 @memset(i32 %4, i32 0, i64 %1)
ret i64 %3
}
void rop3_178_1_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk2 = S ^ T;
  stk3 = *D ^ S;
  stk2 = stk2 | stk3;
  stk1 = S ^ stk2;
  *D = (stk1 & (~S)) | (*D & S);
}


x86 assembly (clang, -O0):
<rop3_178_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xa(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0x9(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xd(%rbp)
movzbl -0xc(%rbp),%eax
movzbl -0xd(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xc(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_178_1_0>:
xor    %esi,%edx
mov    (%rdi),%al
mov    %eax,%ecx
xor    %sil,%cl
or     %dl,%cl
xor    %cl,%al
and    %sil,%al
xor    %cl,%al
mov    %al,(%rdi)
ret

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

LLVM IR (-O2):
define void @rop3_178_1_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = xor i8 %2, %1
%5 = load i8, i8* %0
%6 = xor i8 %5, %1
%7 = or i8 %6, %4
%8 = xor i8 %1, -1
%9 = and i8 %7, %8
%10 = and i8 %5, %1
%11 = or i8 %9, %10
store i8 %11, i8* %0
ret void
}
unsigned int bswap_32(unsigned int v) {
  return ((v >> 24) & 0x000000ff) | ((v << 8) & 0x00ff0000) |
         ((v >> 8) & 0x0000ff00) | ((v << 24) & 0xff000000);
}


x86 assembly (clang, -O0):
<bswap_32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x18,%eax
and    $0xff,%eax
mov    -0x4(%rbp),%ecx
shl    $0x8,%ecx
and    $0xff0000,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
shr    $0x8,%ecx
and    $0xff00,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
shl    $0x18,%ecx
and    $0xff000000,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bswap_32>:
mov    %edi,%eax
bswap  %eax
ret

LLVM IR (-O0):
define i32 @bswap_32(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = lshr i32 %3, 24
%5 = and i32 %4, 255
%6 = load i32, i32* %2
%7 = shl i32 %6, 8
%8 = and i32 %7, 16711680
%9 = or i32 %5, %8
%10 = load i32, i32* %2
%11 = lshr i32 %10, 8
%12 = and i32 %11, 65280
%13 = or i32 %9, %12
%14 = load i32, i32* %2
%15 = shl i32 %14, 24
%16 = and i32 %15, -16777216
%17 = or i32 %13, %16
ret i32 %17
}

LLVM IR (-O2):
define i32 @bswap_32(i32 %0) {
%2 = tail call i32 @llvm.bswap.i32(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ memcmp(void const *, void const *, size_t);
bool cutils_cdar_DynamicArray_unsigned_short_compare(const void *p1,
                                                     const void *p2, size_t s) {
  return !memcmp(p1, p2, s);
}


x86 assembly (clang, -O0):
<cutils_cdar_DynamicArray_unsigned_short_compare>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <memcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cutils_cdar_DynamicArray_unsigned_short_compare>:
push   %rax
call   1030 <bcmp@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @cutils_cdar_DynamicArray_unsigned_short_compare(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
%10 = call i32 @memcmp(i8* %7, i8* %8, i64 %9)
%11 = icmp ne i32 %10, 0
%12 = xor i1 %11, true
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @cutils_cdar_DynamicArray_unsigned_short_compare(i8* nocapture %0, i8* nocapture %1, i64 %2) {
%4 = tail call i32 @bcmp(i8* %0, i8* %1, i64 %2)
%5 = icmp eq i32 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
void alarm(void) {}


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

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

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

LLVM IR (-O2):
define void @alarm() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ LCD_DrawWindowedImageFromFile(int, int, char *, int, int,
                                                 int, int);
void _gui_draw_background(int x, int y, int w, int h) {
  LCD_DrawWindowedImageFromFile(x, y, "media/devo8.bmp", w, h, x, y);
}


x86 assembly (clang, -O0):
<_gui_draw_background>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%ecx
mov    -0x10(%rbp),%r8d
mov    -0x4(%rbp),%r9d
mov    -0x8(%rbp),%eax
lea    0xec1(%rip),%rdx
mov    %eax,(%rsp)
call   1030 <LCD_DrawWindowedImageFromFile@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_gui_draw_background>:
push   %rax
mov    %ecx,%r8d
mov    %edx,%ecx
mov    %esi,(%rsp)
lea    0xee0(%rip),%rdx
mov    %edi,%r9d
call   1030 <LCD_DrawWindowedImageFromFile@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [16 x i8] c"media/devo8.bmp\00"
define void @_gui_draw_background(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 = load i32, i32* %6
%11 = load i32, i32* %7
%12 = load i32, i32* %8
%13 = load i32, i32* %5
%14 = load i32, i32* %6
%15 = call i32 @LCD_DrawWindowedImageFromFile(i32 %9, i32 %10, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %11, i32 %12, i32 %13, i32 %14)
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"media/devo8.bmp\00"
define void @_gui_draw_background(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @LCD_DrawWindowedImageFromFile(i32 %0, i32 %1, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %3, i32 %0, i32 %1)
ret void
}
void tsdl_nop(void) { return; }


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

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

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

LLVM IR (-O2):
define void @tsdl_nop() {
ret void
}
/* Variables and functions */
int CLOCKS_PER_SEC;
int /*<<< orphan*/ _SC_CLK_TCK;
int /*<<< orphan*/ printf(char *, int, int);
int sysconf(int /*<<< orphan*/);
int main(void) {
  printf("%d %d\n", sysconf(_SC_CLK_TCK), CLOCKS_PER_SEC);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
call   1040 <sysconf@plt>
mov    0x2eb2(%rip),%rcx
mov    (%rcx),%edx
lea    0xec1(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"%d %d\0A\00"
@_SC_CLK_TCK = global i32 0
@CLOCKS_PER_SEC = global i32 0
define i32 @main() {
%1 = load i32, i32* @_SC_CLK_TCK
%2 = tail call i32 @sysconf(i32 %1)
%3 = load i32, i32* @CLOCKS_PER_SEC
%4 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %3)
ret i32 0
}
void cpuid(int *eax, int *ebx, int *ecx, int *edx) {
  asm("cpuid"
      : "=a"(*eax), "=b"(*ebx), "=c"(*ecx), "=d"(*edx)
      : "0"(*eax), "2"(*ecx));
}


x86 assembly (clang, -O0):
<cpuid>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x10(%rbp),%r8
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x20(%rbp),%rcx
mov    (%rcx),%ecx
cpuid
mov    %eax,%r9d
mov    -0x38(%rbp),%rax
mov    %ecx,%esi
mov    -0x30(%rbp),%rcx
mov    %r9d,(%r8)
mov    %ebx,(%rdi)
mov    %esi,(%rcx)
mov    %edx,(%rax)
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpuid>:
push   %rbx
mov    %rcx,%r8
mov    %rdx,%r9
mov    (%rdi),%eax
mov    (%rdx),%ecx
cpuid
mov    %eax,(%rdi)
mov    %ebx,(%rsi)
mov    %ecx,(%r9)
mov    %edx,(%r8)
pop    %rbx
ret

LLVM IR (-O0):
define void @cpuid(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 = load i32*, i32** %6
%11 = load i32*, i32** %7
%12 = load i32*, i32** %8
%13 = load i32*, i32** %5
%14 = load i32, i32* %13
%15 = load i32*, i32** %7
%16 = load i32, i32* %15
%17 = call { i32, i32, i32, i32 } asm "cpuid", "={ax},={bx},={cx},={dx},0,2,~{dirflag},~{fpsr},~{flags}"(i32 %14, i32 %16)
%18 = extractvalue { i32, i32, i32, i32 } %17, 0
%19 = extractvalue { i32, i32, i32, i32 } %17, 1
%20 = extractvalue { i32, i32, i32, i32 } %17, 2
%21 = extractvalue { i32, i32, i32, i32 } %17, 3
store i32 %18, i32* %9
store i32 %19, i32* %10
store i32 %20, i32* %11
store i32 %21, i32* %12
ret void
}

LLVM IR (-O2):
define void @cpuid(i32* nocapture %0, i32* nocapture writeonly %1, i32* nocapture %2, i32* nocapture writeonly %3) {
%5 = load i32, i32* %0
%6 = load i32, i32* %2
%7 = tail call { i32, i32, i32, i32 } asm "cpuid", "={ax},={bx},={cx},={dx},0,2,~{dirflag},~{fpsr},~{flags}"(i32 %5, i32 %6)
%8 = extractvalue { i32, i32, i32, i32 } %7, 0
%9 = extractvalue { i32, i32, i32, i32 } %7, 1
%10 = extractvalue { i32, i32, i32, i32 } %7, 2
%11 = extractvalue { i32, i32, i32, i32 } %7, 3
store i32 %8, i32* %0
store i32 %9, i32* %1
store i32 %10, i32* %2
store i32 %11, i32* %3
ret void
}
/* Variables and functions */
int strcmp(char *, char *);
int compareString(void *v, void *w) { return (strcmp((char *)v, ((char *)w))); }


x86 assembly (clang, -O0):
<compareString>:
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):
<compareString>:
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
define i32 @compareString(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 @compareString(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*/ endwin();
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ move_to(int, int /*<<< orphan*/);
int /*<<< orphan*/ stdscr;
int /*<<< orphan*/ wrefresh(int /*<<< orphan*/);
void cleanup(int ignored) {
  move_to(23, 0);
  wrefresh(stdscr);
  endwin();
  exit(1);
}


x86 assembly (clang, -O0):
<cleanup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x17,%edi
xor    %esi,%esi
call   1030 <move_to@plt>
mov    0x2e8a(%rip),%rax
mov    (%rax),%edi
call   1040 <wrefresh@plt>
mov    $0x0,%al
call   1050 <endwin@plt>
mov    $0x1,%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<cleanup>:
push   %rax
mov    $0x17,%edi
xor    %esi,%esi
call   1030 <move_to@plt>
mov    0x2e94(%rip),%rax
mov    (%rax),%edi
call   1040 <wrefresh@plt>
xor    %eax,%eax
call   1050 <endwin@plt>
mov    $0x1,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@stdscr = global i32 0
define void @cleanup(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @move_to(i32 23, i32 0)
%4 = load i32, i32* @stdscr
%5 = call i32 @wrefresh(i32 %4)
%6 = call i32 (...) @endwin()
%7 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stdscr = global i32 0
define void @cleanup(i32 %0) {
%2 = tail call i32 @move_to(i32 23, i32 0)
%3 = load i32, i32* @stdscr
%4 = tail call i32 @wrefresh(i32 %3)
%5 = tail call i32 (...) @endwin()
%6 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ f(int *, int *);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int e, a;
  scanf("%i", &e);
  f(&e, &a);
  printf("%d", a);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xec4(%rip),%rdi
lea    0xc(%rsp),%rbx
mov    %rbx,%rsi
call   1050 <scanf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1030 <f@plt>
mov    0x8(%rsp),%esi
lea    0xea2(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%i\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%6 = call i32 @f(i32* %1, i32* %2)
%7 = load i32, i32* %2
%8 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %7)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ fbi_htonll(int /*<<< orphan*/);
uint64_t fbi_test_htonll(uint64_t u64) { return fbi_htonll(u64); }


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

x86 assembly (clang, -O2):
<fbi_test_htonll>:
jmp    1030 <fbi_htonll@plt>

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

LLVM IR (-O2):
define i32 @fbi_test_htonll(i32 %0) {
%2 = tail call i32 @fbi_htonll(i32 %0)
ret i32 %2
}
int main(int argc, char *argv[]) {
  char *a;
  a[1024 * 64] = 'A';
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x18(%rbp),%rax
movb   $0x41,0x10000(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i8*
store i32 %0, i32* %3
store i8** %1, i8*** %4
%6 = load i8*, i8** %5
%7 = getelementptr inbounds i8, i8* %6, i64 65536
store i8 65, i8* %7
ret i32 0
}

LLVM IR (-O2):
const char *decQuadVersion(void) { return "decNumber 3.68"; }


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

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

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

LLVM IR (-O2):
@.str = [15 x i8] c"decNumber 3.68\00"
define i8* @decQuadVersion() {
ret i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
scalar_t__ realloc(void *, int);
int strlen(char *);
void add_sign_to_string(char *str, char sign) {
  int size = strlen(str);
  str = (char *)realloc((void *)str, (size + 1) * sizeof(char));
  str[size] = sign;
  printf("Func: out\n");
}


x86 assembly (clang, -O0):
<add_sign_to_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%eax
add    $0x1,%eax
cltq
shl    $0x0,%rax
mov    %eax,%esi
call   1050 <realloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x9(%rbp),%dl
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
lea    0xe82(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_sign_to_string>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%r14d
mov    %rdi,%rbx
call   1040 <strlen@plt>
mov    %eax,%ebp
lea    0x1(%rbp),%esi
mov    %rbx,%rdi
call   1050 <realloc@plt>
movslq %ebp,%rcx
mov    %r14b,(%rax,%rcx,1)
lea    0xea6(%rip),%rdi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"Func: out\0A\00"
define void @add_sign_to_string(i8* %0, i8 signext %1) {
%3 = alloca i8*
%4 = alloca i8
%5 = alloca i32
store i8* %0, i8** %3
store i8 %1, i8* %4
%6 = load i8*, i8** %3
%7 = call i32 @strlen(i8* %6)
store i32 %7, i32* %5
%8 = load i8*, i8** %3
%9 = load i32, i32* %5
%10 = add nsw i32 %9, 1
%11 = sext i32 %10 to i64
%12 = mul i64 %11, 1
%13 = trunc i64 %12 to i32
%14 = call i64 @realloc(i8* %8, i32 %13)
%15 = inttoptr i64 %14 to i8*
store i8* %15, i8** %3
%16 = load i8, i8* %4
%17 = load i8*, i8** %3
%18 = load i32, i32* %5
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i8, i8* %17, i64 %19
store i8 %16, i8* %20
%21 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [10 x i8] c"Func: out\00"
define void @add_sign_to_string(i8* %0, i8 signext %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = add nsw i32 %3, 1
%5 = tail call i64 @realloc(i8* %0, i32 %4)
%6 = inttoptr i64 %5 to i8*
%7 = sext i32 %3 to i64
%8 = getelementptr inbounds i8, i8* %6, i64 %7
store i8 %1, i8* %8
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ op_write1(int);
void op_enc_dec_b(void) { op_write1(0x05); }


x86 assembly (clang, -O0):
<op_enc_dec_b>:
push   %rbp
mov    %rsp,%rbp
mov    $0x5,%edi
call   1030 <op_write1@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<op_enc_dec_b>:
mov    $0x5,%edi
jmp    1030 <op_write1@plt>

LLVM IR (-O0):
define void @op_enc_dec_b() {
%1 = call i32 @op_write1(i32 5)
ret void
}

LLVM IR (-O2):
define void @op_enc_dec_b() {
%1 = tail call i32 @op_write1(i32 5)
ret void
}
int EcrireNombre(unsigned char *mem, int taille, int valeur) {}


x86 assembly (clang, -O0):
<EcrireNombre>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @EcrireNombre(i8* nocapture readnone %0, i32 %1, i32 %2) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ logln(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void error(char *msg) {
  logln(stderr, msg);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
call   1030 <logln@plt>
mov    0x2e93(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<error>:
push   %rax
mov    %rdi,%rsi
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
call   1030 <logln@plt>
mov    0x2e9f(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@EXIT_FAILURE = global i32 0
define void @error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @logln(i32 %3, i8* %4)
%6 = load i32, i32* @EXIT_FAILURE
%7 = call i32 @exit(i32 %6)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@EXIT_FAILURE = global i32 0
define void @error(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @logln(i32 %2, i8* %0)
%4 = load i32, i32* @EXIT_FAILURE
%5 = tail call i32 @exit(i32 %4)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ f();
main() {
  f();
  f();
  f();
  f();
  f();
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @f()
%2 = call i32 (...) @f()
%3 = call i32 (...) @f()
%4 = call i32 (...) @f()
%5 = call i32 (...) @f()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @f()
%2 = tail call i32 (...) @f()
%3 = tail call i32 (...) @f()
%4 = tail call i32 (...) @f()
%5 = tail call i32 (...) @f()
ret i32 0
}
/* Variables and functions */
int test_if3(void) {
  if (1) {
    return 'c';
  } else {
    return 0;
  }
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @test_if3() {
ret i32 99
}

LLVM IR (-O2):
define i32 @test_if3() {
ret i32 99
}
int test_imm_F9int32_reg(int val) { return ((val) & (0xF9 << 0)) ? -20 : -40; }


x86 assembly (clang, -O0):
<test_imm_F9int32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0xf9,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_F9int32_reg(i32 %0) {
%2 = and i32 %0, 249
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int strcmp(const char *src1, const char *src2) {
  while (*src1 == *src2 && *src1) {
    src1++;
    src2++;
  }
  return *(unsigned char *)src1 - *(unsigned char *)src2;
}


x86 assembly (clang, -O0):
<strcmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
mov    -0x10(%rbp),%rax
movsbl (%rax),%edx
xor    %eax,%eax
cmp    %edx,%ecx
mov    %al,-0x11(%rbp)
jne    1137 <strcmp+0x37>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1147 <strcmp+0x47>
jmp    1164 <strcmp+0x64>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    110c <strcmp+0xc>
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
mov    -0x10(%rbp),%rcx
movzbl (%rcx),%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcmp>:
mov    (%rdi),%al
mov    (%rsi),%cl
test   %al,%al
je     1134 <strcmp+0x34>
cmp    %cl,%al
jne    1134 <strcmp+0x34>
mov    $0x1,%edx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movzbl (%rdi,%rdx,1),%eax
movzbl (%rsi,%rdx,1),%ecx
test   %al,%al
je     1134 <strcmp+0x34>
add    $0x1,%rdx
cmp    %cl,%al
je     1120 <strcmp+0x20>
movzbl %al,%eax
movzbl %cl,%ecx
sub    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @strcmp(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = load i8, i8* %1
%5 = icmp ne i8 %3, %4
%6 = icmp eq i8 %3, 0
%7 = or i1 %6, %5
br i1 %7, label %18, label %8
8: ; preds = %2, %8
%9 = phi i8* [ %12, %8 ], [ %1, %2 ]
%10 = phi i8* [ %11, %8 ], [ %0, %2 ]
%11 = getelementptr inbounds i8, i8* %10, i64 1
%12 = getelementptr inbounds i8, i8* %9, i64 1
%13 = load i8, i8* %11
%14 = load i8, i8* %12
%15 = icmp ne i8 %13, %14
%16 = icmp eq i8 %13, 0
%17 = or i1 %16, %15
br i1 %17, label %18, label %8
18: ; preds = %8, %2
%19 = phi i8 [ %3, %2 ], [ %13, %8 ]
%20 = phi i8 [ %4, %2 ], [ %14, %8 ]
%21 = zext i8 %19 to i32
%22 = zext i8 %20 to i32
%23 = sub nsw i32 %21, %22
ret i32 %23
}
void RTPipeClose(void) {}


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

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

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

LLVM IR (-O2):
define void @RTPipeClose() {
ret void
}
/* Variables and functions */
int facto(int);
int nCr(int n, int r) { return facto(n) / (facto(r) * facto(n - r)); }


x86 assembly (clang, -O0):
<nCr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <facto@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <facto@plt>
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
sub    -0x8(%rbp),%edi
call   1030 <facto@plt>
mov    -0x10(%rbp),%ecx
mov    %eax,%edx
mov    -0xc(%rbp),%eax
imul   %edx,%ecx
cltd
idiv   %ecx
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nCr>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
call   1030 <facto@plt>
mov    %eax,%r14d
mov    %ebx,%edi
call   1030 <facto@plt>
mov    %eax,%r15d
sub    %ebx,%ebp
mov    %ebp,%edi
call   1030 <facto@plt>
mov    %eax,%ecx
imul   %r15d,%ecx
mov    %r14d,%eax
cltd
idiv   %ecx
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @nCr(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 = call i32 @facto(i32 %5)
%7 = load i32, i32* %4
%8 = call i32 @facto(i32 %7)
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = sub nsw i32 %9, %10
%12 = call i32 @facto(i32 %11)
%13 = mul nsw i32 %8, %12
%14 = sdiv i32 %6, %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @nCr(i32 %0, i32 %1) {
%3 = tail call i32 @facto(i32 %0)
%4 = tail call i32 @facto(i32 %1)
%5 = sub nsw i32 %0, %1
%6 = tail call i32 @facto(i32 %5)
%7 = mul nsw i32 %6, %4
%8 = sdiv i32 %3, %7
ret i32 %8
}
void fc216(int n) {
  {
    typedef int(*b)[n];
    {
      typedef int(*c)[n];
      0;
    }
    {
      typedef int(*d)[n];
      0;
    };
    typedef int(*e)[n];
    0;
  };
  {
    typedef int(*f)[n];
    {
      typedef int(*g)[n];
      0;
    };
    {
      typedef int(*h)[n];
      0;
    };
    goto a;
  a:;
    typedef int(*i)[n];
    0;
  };
  ;
  typedef int(*j)[n];
  0;
}


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

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

LLVM IR (-O0):
define void @fc216(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = zext i32 %3 to i64
%5 = load i32, i32* %2
%6 = zext i32 %5 to i64
%7 = load i32, i32* %2
%8 = zext i32 %7 to i64
%9 = load i32, i32* %2
%10 = zext i32 %9 to i64
%11 = load i32, i32* %2
%12 = zext i32 %11 to i64
%13 = load i32, i32* %2
%14 = zext i32 %13 to i64
%15 = load i32, i32* %2
%16 = zext i32 %15 to i64
br label %17
17: ; preds = %1
%18 = load i32, i32* %2
%19 = zext i32 %18 to i64
%20 = load i32, i32* %2
%21 = zext i32 %20 to i64
ret void
}

LLVM IR (-O2):
define void @fc216(i32 %0) {
ret void
}
/* Type definitions */
struct lxc_epoll_descr {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ lxc_mainloop_close(struct lxc_epoll_descr *);
void __auto_lxc_mainloop_close__(struct lxc_epoll_descr **descr) {
  if (*descr)
    lxc_mainloop_close(*descr);
}


x86 assembly (clang, -O0):
<__auto_lxc_mainloop_close__>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     1136 <__auto_lxc_mainloop_close__+0x26>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <lxc_mainloop_close@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__auto_lxc_mainloop_close__>:
mov    (%rdi),%rdi
test   %rdi,%rdi
je     111d <__auto_lxc_mainloop_close__+0xd>
jmp    1030 <lxc_mainloop_close@plt>
ret

LLVM IR (-O0):
%struct.lxc_epoll_descr = type { i32 }
define void @__auto_lxc_mainloop_close__(%struct.lxc_epoll_descr** %0) {
%2 = alloca %struct.lxc_epoll_descr**
store %struct.lxc_epoll_descr** %0, %struct.lxc_epoll_descr*** %2
%3 = load %struct.lxc_epoll_descr**, %struct.lxc_epoll_descr*** %2
%4 = load %struct.lxc_epoll_descr*, %struct.lxc_epoll_descr** %3
%5 = icmp ne %struct.lxc_epoll_descr* %4, null
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load %struct.lxc_epoll_descr**, %struct.lxc_epoll_descr*** %2
%8 = load %struct.lxc_epoll_descr*, %struct.lxc_epoll_descr** %7
%9 = call i32 @lxc_mainloop_close(%struct.lxc_epoll_descr* %8)
br label %10
10: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
%struct.lxc_epoll_descr = type { i32 }
define void @__auto_lxc_mainloop_close__(%struct.lxc_epoll_descr** nocapture %0) {
%2 = load %struct.lxc_epoll_descr*, %struct.lxc_epoll_descr** %0
%3 = icmp eq %struct.lxc_epoll_descr* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @lxc_mainloop_close(%struct.lxc_epoll_descr* %2)
br label %6
6: ; preds = %4, %1
ret void
}
int f1(long x) { return ((short)x >= 0) ? x : 0; }


x86 assembly (clang, -O0):
<f1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cwtl
cmp    $0x0,%eax
jl     1123 <f1+0x23>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    112e <f1+0x2e>
xor    %eax,%eax
mov    %rax,-0x10(%rbp)
jmp    112e <f1+0x2e>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f1>:
xor    %eax,%eax
test   $0x8000,%edi
cmove  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @f1(i64 %0) {
%2 = and i64 %0, 32768
%3 = icmp eq i64 %2, 0
%4 = trunc i64 %0 to i32
%5 = select i1 %3, i32 %4, i32 0
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ IntAINTCInit();
int /*<<< orphan*/ IntMasterIRQDisable();
int /*<<< orphan*/ IntMasterIRQEnable();
void intr_reset() {
  IntMasterIRQDisable();
  IntMasterIRQEnable();
  IntAINTCInit();
}


x86 assembly (clang, -O0):
<intr_reset>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <IntMasterIRQDisable@plt>
mov    $0x0,%al
call   1040 <IntMasterIRQEnable@plt>
mov    $0x0,%al
call   1050 <IntAINTCInit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<intr_reset>:
push   %rax
xor    %eax,%eax
call   1030 <IntMasterIRQDisable@plt>
xor    %eax,%eax
call   1040 <IntMasterIRQEnable@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <IntAINTCInit@plt>

LLVM IR (-O0):
define void @intr_reset() {
%1 = call i32 (...) @IntMasterIRQDisable()
%2 = call i32 (...) @IntMasterIRQEnable()
%3 = call i32 (...) @IntAINTCInit()
ret void
}

LLVM IR (-O2):
define void @intr_reset() {
%1 = tail call i32 (...) @IntMasterIRQDisable()
%2 = tail call i32 (...) @IntMasterIRQEnable()
%3 = tail call i32 (...) @IntAINTCInit()
ret void
}
/* Type definitions */
typedef int uint16_t;
typedef int int32_t;

/* Variables and functions */
int32_t squ4(uint16_t phase) { return (phase > (1 << 12)) ? 22938 : -22938; }


x86 assembly (clang, -O0):
<squ4>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
mov    $0xffffa666,%eax
mov    $0x599a,%ecx
cmp    $0x1000,%edx
cmovg  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<squ4>:
cmp    $0x1001,%edi
mov    $0x599a,%ecx
mov    $0xffffa666,%eax
cmovge %ecx,%eax
ret

LLVM IR (-O0):
define i32 @squ4(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sgt i32 %3, 4096
%5 = zext i1 %4 to i64
%6 = select i1 %4, i32 22938, i32 -22938
ret i32 %6
}

LLVM IR (-O2):
define i32 @squ4(i32 %0) {
%2 = icmp sgt i32 %0, 4096
%3 = select i1 %2, i32 22938, i32 -22938
ret i32 %3
}
/* Variables and functions */
int aesni_supported();
int AES_support_hwaccel(void) { return aesni_supported(); }


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

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

LLVM IR (-O0):
define i32 @AES_support_hwaccel() {
%1 = call i32 (...) @aesni_supported()
ret i32 %1
}

LLVM IR (-O2):
define i32 @AES_support_hwaccel() {
%1 = tail call i32 (...) @aesni_supported()
ret i32 %1
}
/* Type definitions */
typedef int wchar_t;
struct _Locale_numeric {
  int dummy;
};

/* Variables and functions */
wchar_t _WLocale_thousands_sep(struct _Locale_numeric *lnum
                               __attribute__((__unused__))) {
  return L',';
}


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

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

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

LLVM IR (-O2):
%struct._Locale_numeric = type { i32 }
define i32 @_WLocale_thousands_sep(%struct._Locale_numeric* nocapture readnone %0) {
ret i32 44
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
extern int Bar2(int one, int two) {
  printf(" Hello from Bar2: one = %d, two = %d!\n ", one, two);
  return one + two;
}


x86 assembly (clang, -O0):
<Bar2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Bar2>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
lea    0xee2(%rip),%rdi
mov    %ebp,%esi
mov    %ebx,%edx
call   1030 <printf@plt>
add    %ebp,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [40 x i8] c" Hello from Bar2: one = %d, two = %d!\0A \00"
define i32 @Bar2(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 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = add nsw i32 %8, %9
ret i32 %10
}

LLVM IR (-O2):
@.str = [40 x i8] c" Hello from Bar2: one = %d, two = %d!\0A \00"
define i32 @Bar2(i32 %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
%4 = add nsw i32 %1, %0
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ recognizer_free(void *);
void headword_free(void *Dic) { recognizer_free(Dic); }


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

x86 assembly (clang, -O2):
<headword_free>:
jmp    1030 <recognizer_free@plt>

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

LLVM IR (-O2):
define void @headword_free(i8* %0) {
%2 = tail call i32 @recognizer_free(i8* %0)
ret void
}
int mintab(int consecutiveblanks) { return consecutiveblanks / 4; }


x86 assembly (clang, -O0):
<mintab>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
pop    %rbp
ret

x86 assembly (clang, -O2):
<mintab>:
lea    0x3(%rdi),%eax
test   %edi,%edi
cmovns %edi,%eax
sar    $0x2,%eax
ret

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

LLVM IR (-O2):
define i32 @mintab(i32 %0) {
%2 = sdiv i32 %0, 4
ret i32 %2
}
/* Variables and functions */
double my_random_float();
int /*<<< orphan*/ printf(char *, double);
int /*<<< orphan*/ srandom(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main(int argc, char *argv[]) {
  int i;
  double x;
  srandom(time(NULL));
  for (i = 0; i < 10000; i++) {
    x = my_random_float();
    printf("%lf\n", x);
  }
  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)
xor    %eax,%eax
mov    %eax,%edi
call   1060 <time@plt>
mov    %eax,%edi
call   1030 <srandom@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0x2710,-0x14(%rbp)
jge    11a5 <main+0x65>
mov    $0x0,%al
call   1050 <my_random_float@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
lea    0xe6e(%rip),%rdi
call   1040 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    116d <main+0x2d>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
xor    %edi,%edi
call   1060 <time@plt>
mov    %eax,%edi
call   1030 <srandom@plt>
mov    $0x2710,%ebp
lea    0xea3(%rip),%rbx
nopl   (%rax)
xor    %eax,%eax
call   1050 <my_random_float@plt>
mov    %rbx,%rdi
call   1040 <printf@plt>
add    $0xffffffff,%ebp
jne    1160 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%lf\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = call i32 @time(i32* null)
%9 = call i32 @srandom(i32 %8)
store i32 0, i32* %6
br label %10
10: ; preds = %17, %2
%11 = load i32, i32* %6
%12 = icmp slt i32 %11, 10000
br i1 %12, label %13, label %20
13: ; preds = %10
%14 = call double (...) @my_random_float()
store double %14, double* %7
%15 = load double, double* %7
%16 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), double %15)
br label %17
17: ; preds = %13
%18 = load i32, i32* %6
%19 = add nsw i32 %18, 1
store i32 %19, i32* %6
br label %10
20: ; preds = %10
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"%lf\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @time(i32* null)
%4 = tail call i32 @srandom(i32 %3)
br label %5
5: ; preds = %2, %5
%6 = phi i32 [ 0, %2 ], [ %9, %5 ]
%7 = tail call double (...) @my_random_float()
%8 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), double %7)
%9 = add nuw nsw i32 %6, 1
%10 = icmp eq i32 %9, 10000
br i1 %10, label %11, label %5
11: ; preds = %5
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ PowerManagerP__0__PowerDownCleanup__default__cleanup();
void PowerManagerP__0__PowerDownCleanup__cleanup(void) {
  PowerManagerP__0__PowerDownCleanup__default__cleanup();
}


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

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

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

LLVM IR (-O2):
define void @PowerManagerP__0__PowerDownCleanup__cleanup() {
%1 = tail call i32 (...) @PowerManagerP__0__PowerDownCleanup__default__cleanup()
ret void
}