xunge/DecIR huggingface dataset:
int comlen(char *p, char *q) {
  int i = 0;
  while (*p && (*p++ == *q++))
    i++;
  return i;
}


x86 assembly (clang, -O0):
<comlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x15(%rbp)
je     1154 <comlen+0x54>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
mov    -0x10(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
movsbl (%rcx),%ecx
cmp    %ecx,%eax
sete   %al
mov    %al,-0x15(%rbp)
mov    -0x15(%rbp),%al
test   $0x1,%al
jne    1164 <comlen+0x64>
jmp    1172 <comlen+0x72>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1113 <comlen+0x13>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<comlen>:
mov    (%rdi),%cl
xor    %eax,%eax
test   %cl,%cl
je     1122 <comlen+0x22>
nopl   0x0(%rax,%rax,1)
cmp    (%rsi,%rax,1),%cl
jne    1122 <comlen+0x22>
movzbl 0x1(%rdi,%rax,1),%ecx
add    $0x1,%rax
test   %cl,%cl
jne    1110 <comlen+0x10>
ret

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

LLVM IR (-O2):
define i32 @comlen(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %18, label %5
5: ; preds = %2, %12
%6 = phi i8 [ %16, %12 ], [ %3, %2 ]
%7 = phi i32 [ %15, %12 ], [ 0, %2 ]
%8 = phi i8* [ %13, %12 ], [ %1, %2 ]
%9 = phi i8* [ %14, %12 ], [ %0, %2 ]
%10 = load i8, i8* %8
%11 = icmp eq i8 %6, %10
br i1 %11, label %12, label %18
12: ; preds = %5
%13 = getelementptr inbounds i8, i8* %8, i64 1
%14 = getelementptr inbounds i8, i8* %9, i64 1
%15 = add nuw nsw i32 %7, 1
%16 = load i8, i8* %14
%17 = icmp eq i8 %16, 0
br i1 %17, label %18, label %5
18: ; preds = %5, %12, %2
%19 = phi i32 [ 0, %2 ], [ %15, %12 ], [ %7, %5 ]
ret i32 %19
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int main() {
  for (int i = 0; i < 5000000; ++i) {
    for (int j = 0; j < 500; ++j) {
    }
  }
  printf("%s\n", ">>>>> I have been count until 5000000 <<<<<");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x4c4b40,-0x8(%rbp)
jge    116d <main+0x5d>
movl   $0x0,-0xc(%rbp)
cmpl   $0x1f4,-0xc(%rbp)
jge    115a <main+0x4a>
jmp    114c <main+0x3c>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    113a <main+0x2a>
jmp    115f <main+0x4f>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
lea    0xe8c(%rip),%rdi
lea    0xe89(%rip),%rsi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [44 x i8] c">>>>> I have been count until 5000000 <<<<<\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %4
4: ; preds = %16, %0
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 5000000
br i1 %6, label %7, label %19
7: ; preds = %4
store i32 0, i32* %3
br label %8
8: ; preds = %12, %7
%9 = load i32, i32* %3
%10 = icmp slt i32 %9, 500
br i1 %10, label %11, label %15
11: ; preds = %8
br label %12
12: ; preds = %11
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 1
store i32 %14, i32* %3
br label %8
15: ; preds = %8
br label %16
16: ; preds = %15
%17 = load i32, i32* %2
%18 = add nsw i32 %17, 1
store i32 %18, i32* %2
br label %4
19: ; preds = %4
%20 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.1, i64 0, i64 0))
%21 = load i32, i32* %1
ret i32 %21
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [44 x i8] c">>>>> I have been count until 5000000 <<<<<\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ *HadTu_hdr(void const *);
void HadTu_setHdrValue(const void *my, unsigned idx, uint32_t value) {
  uint32_t *hdr = HadTu_hdr(my);
  hdr[idx] = value;
}


x86 assembly (clang, -O0):
<HadTu_setHdrValue>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <HadTu_hdr@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%edx
mov    -0x18(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    %edx,(%rax,%rcx,4)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<HadTu_setHdrValue>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebx
mov    %esi,%ebp
call   1030 <HadTu_hdr@plt>
mov    %ebp,%ecx
mov    %ebx,(%rax,%rcx,4)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @HadTu_setHdrValue(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i8*, i8** %4
%9 = call i32* @HadTu_hdr(i8* %8)
store i32* %9, i32** %7
%10 = load i32, i32* %6
%11 = load i32*, i32** %7
%12 = load i32, i32* %5
%13 = zext i32 %12 to i64
%14 = getelementptr inbounds i32, i32* %11, i64 %13
store i32 %10, i32* %14
ret void
}

LLVM IR (-O2):
define void @HadTu_setHdrValue(i8* %0, i32 %1, i32 %2) {
%4 = tail call i32* @HadTu_hdr(i8* %0)
%5 = zext i32 %1 to i64
%6 = getelementptr inbounds i32, i32* %4, i64 %5
store i32 %2, i32* %6
ret void
}
/* Variables and functions */
int strtol(char const *, char **, int);
int itoa(const char *s) { return (strtol(s, (char **)0, 10)); }


x86 assembly (clang, -O0):
<itoa>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1030 <strtol@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<itoa>:
xor    %esi,%esi
mov    $0xa,%edx
jmp    1030 <strtol@plt>

LLVM IR (-O0):
define i32 @itoa(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @strtol(i8* %3, i8** null, i32 10)
ret i32 %4
}

LLVM IR (-O2):
define i32 @itoa(i8* nocapture %0) {
%2 = tail call i32 @strtol(i8* nocapture %0, i8** null, i32 10)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ brc(int, char);
void cht(int pn) { brc(pn, 'I'); }


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

x86 assembly (clang, -O2):
<cht>:
mov    $0x49,%esi
jmp    1030 <brc@plt>

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

LLVM IR (-O2):
define void @cht(i32 %0) {
%2 = tail call i32 @brc(i32 %0, i8 signext 73)
ret void
}
/* Variables and functions */
void f();
void g() { return f(); }


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

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

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

LLVM IR (-O2):
define void @g() {
tail call void (...) @f()
ret void
}
/* Type definitions */
struct ipr_ioa {
  int dummy;
};

/* Variables and functions */
int ipr_start_array(struct ipr_ioa *, char *, int, int, int /*<<< orphan*/);
int ipr_start_array_protection(struct ipr_ioa *ioa, int stripe_size,
                               int prot_level) {
  return ipr_start_array(ioa, "Start Array Protection", stripe_size, prot_level,
                         0);
}


x86 assembly (clang, -O0):
<ipr_start_array_protection>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
lea    0xecd(%rip),%rsi
xor    %r8d,%r8d
call   1030 <ipr_start_array@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ipr_start_array_protection>:
mov    %edx,%ecx
mov    %esi,%edx
lea    0xee5(%rip),%rsi
xor    %r8d,%r8d
jmp    1030 <ipr_start_array@plt>

LLVM IR (-O0):
%struct.ipr_ioa = type { i32 }
@.str = [23 x i8] c"Start Array Protection\00"
define i32 @ipr_start_array_protection(%struct.ipr_ioa* %0, i32 %1, i32 %2) {
%4 = alloca %struct.ipr_ioa*
%5 = alloca i32
%6 = alloca i32
store %struct.ipr_ioa* %0, %struct.ipr_ioa** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load %struct.ipr_ioa*, %struct.ipr_ioa** %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call i32 @ipr_start_array(%struct.ipr_ioa* %7, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %8, i32 %9, i32 0)
ret i32 %10
}

LLVM IR (-O2):
%struct.ipr_ioa = type { i32 }
@.str = [23 x i8] c"Start Array Protection\00"
define i32 @ipr_start_array_protection(%struct.ipr_ioa* %0, i32 %1, i32 %2) {
%4 = tail call i32 @ipr_start_array(%struct.ipr_ioa* %0, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %2, i32 0)
ret i32 %4
}
/* Variables and functions */
char *memchr(char *, char, int);
void replace_zeroes(char *restrict current_char,
                    char const *restrict char_end) {
  while (current_char != NULL) {
    current_char = memchr(current_char, '\0', char_end - current_char);
    if (current_char != NULL) {
      *current_char = '\x1a';
    }
  }
}


x86 assembly (clang, -O0):
<replace_zeroes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     115e <replace_zeroes+0x4e>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,%edx
xor    %esi,%esi
call   1030 <memchr@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1159 <replace_zeroes+0x49>
mov    -0x8(%rbp),%rax
movb   $0x1a,(%rax)
jmp    1120 <replace_zeroes+0x10>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<replace_zeroes>:
push   %rbx
test   %rdi,%rdi
je     1138 <replace_zeroes+0x28>
mov    %rsi,%rbx
mov    %ebx,%edx
sub    %edi,%edx
nopl   (%rax)
xor    %esi,%esi
call   1030 <memchr@plt>
test   %rax,%rax
je     1138 <replace_zeroes+0x28>
movb   $0x1a,(%rax)
mov    %ebx,%edx
sub    %eax,%edx
mov    %rax,%rdi
jmp    1120 <replace_zeroes+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @replace_zeroes(i8* noalias %0, i8* noalias %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
br label %5
5: ; preds = %21, %2
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %22
8: ; preds = %5
%9 = load i8*, i8** %3
%10 = load i8*, i8** %4
%11 = load i8*, i8** %3
%12 = ptrtoint i8* %10 to i64
%13 = ptrtoint i8* %11 to i64
%14 = sub i64 %12, %13
%15 = trunc i64 %14 to i32
%16 = call i8* @memchr(i8* %9, i8 signext 0, i32 %15)
store i8* %16, i8** %3
%17 = load i8*, i8** %3
%18 = icmp ne i8* %17, null
br i1 %18, label %19, label %21
19: ; preds = %8
%20 = load i8*, i8** %3
store i8 26, i8* %20
br label %21
21: ; preds = %19, %8
br label %5
22: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @replace_zeroes(i8* noalias %0, i8* noalias %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %18, label %4
4: ; preds = %2
%5 = ptrtoint i8* %1 to i64
%6 = ptrtoint i8* %0 to i64
%7 = sub i64 %5, %6
%8 = trunc i64 %7 to i32
%9 = tail call i8* @memchr(i8* %0, i8 signext 0, i32 %8)
%10 = icmp eq i8* %9, null
br i1 %10, label %18, label %11
11: ; preds = %4, %11
%12 = phi i8* [ %16, %11 ], [ %9, %4 ]
store i8 26, i8* %12
%13 = ptrtoint i8* %12 to i64
%14 = sub i64 %5, %13
%15 = trunc i64 %14 to i32
%16 = tail call i8* @memchr(i8* %12, i8 signext 0, i32 %15)
%17 = icmp eq i8* %16, null
br i1 %17, label %18, label %11
18: ; preds = %11, %4, %2
ret void
}
unsigned xrop3_80_1_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk2 = ~D;
  stk1 = T & stk2;
  return (stk1 & (~S) & (~T)) | (D & S) | (D & T);
}


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

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

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

LLVM IR (-O2):
define i32 @xrop3_80_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = or i8 %1, %0
%4 = zext i8 %3 to i32
ret i32 %4
}
__attribute__((always_)) void
unregister_timer_hook(int (*hook)(struct pt_regs *)) {
  return;
}


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

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

LLVM IR (-O0):
%struct.pt_regs = type opaque
define void @unregister_timer_hook(i32 (%struct.pt_regs*)* %0) {
%2 = alloca i32 (%struct.pt_regs*)*
store i32 (%struct.pt_regs*)* %0, i32 (%struct.pt_regs*)** %2
ret void
}

LLVM IR (-O2):
%struct.pt_regs = type opaque
define void @unregister_timer_hook(i32 (%struct.pt_regs*)* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(double *, double const *, int);
void glmCopyMatrix3d(const double source[9], double target[9]) {
  memcpy(target, source, 9 * sizeof(double));
}


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

x86 assembly (clang, -O2):
<glmCopyMatrix3d>:
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
mov    $0x48,%edx
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
define void @glmCopyMatrix3d(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
store double* %0, double** %3
store double* %1, double** %4
%5 = load double*, double** %4
%6 = load double*, double** %3
%7 = call i32 @memcpy(double* %5, double* %6, i32 72)
ret void
}

LLVM IR (-O2):
define void @glmCopyMatrix3d(double* %0, double* %1) {
%3 = tail call i32 @memcpy(double* %1, double* %0, i32 72)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ btea(int /*<<< orphan*/ *, int, int /*<<< orphan*/ *);
long btea_8bytes(char *data, int rounds, char *key) {
  btea((int32_t *)data, rounds, (int32_t *)key);
}


x86 assembly (clang, -O0):
<btea_8bytes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x20(%rbp),%rdx
call   1030 <btea@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<btea_8bytes>:
jmp    1030 <btea@plt>

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

LLVM IR (-O2):
define i64 @btea_8bytes(i8* %0, i32 %1, i8* %2) {
%4 = bitcast i8* %0 to i32*
%5 = bitcast i8* %2 to i32*
%6 = tail call i32 @btea(i32* %4, i32 %1, i32* %5)
ret i64 undef
}
unsigned int cvmx_coremask_numcores(unsigned int num_cores) {
  return (0xFFFFFFFFu >> ((32) - num_cores));
}


x86 assembly (clang, -O0):
<cvmx_coremask_numcores>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x20,%ecx
sub    -0x4(%rbp),%ecx
mov    $0xffffffff,%eax
shr    %cl,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cvmx_coremask_numcores>:
mov    %edi,%ecx
neg    %cl
mov    $0xffffffff,%eax
shr    %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @cvmx_coremask_numcores(i32 %0) {
%2 = sub i32 32, %0
%3 = lshr i32 -1, %2
ret i32 %3
}
/* Variables and functions */
int _usage();
int getopt(int, char **, char *);
int main(int argc, char *argv[]) {
  int o;
  while ((o = getopt(argc, argv, "")) != -1)
    switch (o) {
    default:
      return _usage();
    }
  return 2;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    0xebc(%rip),%rdx
call   1040 <getopt@plt>
mov    %eax,-0x14(%rbp)
cmp    $0xffffffff,%eax
je     1164 <main+0x44>
mov    $0x0,%al
call   1030 <_usage@plt>
mov    %eax,-0x4(%rbp)
jmp    116b <main+0x4b>
movl   $0x2,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdx
call   1040 <getopt@plt>
cmp    $0xffffffff,%eax
je     113a <main+0x1a>
xor    %eax,%eax
pop    %rcx
jmp    1030 <_usage@plt>
mov    $0x2,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
br label %7
7: ; preds = %2
%8 = load i32, i32* %4
%9 = load i8**, i8*** %5
%10 = call i32 @getopt(i32 %8, i8** %9, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
store i32 %10, i32* %6
%11 = icmp ne i32 %10, -1
br i1 %11, label %12, label %16
12: ; preds = %7
%13 = load i32, i32* %6
switch i32 %13, label %14 [
]
14: ; preds = %12
%15 = call i32 (...) @_usage()
store i32 %15, i32* %3
br label %17
16: ; preds = %7
store i32 2, i32* %3
br label %17
17: ; preds = %16, %14
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @getopt(i32 %0, i8** %1, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i32 %3, -1
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 (...) @_usage()
br label %7
7: ; preds = %2, %5
%8 = phi i32 [ %6, %5 ], [ 2, %2 ]
ret i32 %8
}
/* Variables and functions */
char getc(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ putc(char, int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ stdout;
int main() {
  char c;
  printf("Enter a char: ");
  c = getc(stdin);
  printf("char entered: ");
  putc(c, stdout);
  printf("\n\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    0x2e96(%rip),%rax
mov    (%rax),%edi
call   1050 <getc@plt>
mov    %al,-0x5(%rbp)
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
mov    -0x5(%rbp),%al
mov    0x2e66(%rip),%rcx
mov    (%rcx),%esi
movsbl %al,%edi
call   1040 <putc@plt>
lea    0xe9b(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xeb8(%rip),%rdi
call   1040 <printf@plt>
mov    0x2e94(%rip),%rax
mov    (%rax),%edi
call   1060 <getc@plt>
mov    %eax,%ebx
lea    0xeab(%rip),%rdi
call   1040 <printf@plt>
mov    0x2e68(%rip),%rax
mov    (%rax),%esi
movsbl %bl,%edi
call   1050 <putc@plt>
lea    0xe9d(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"Enter a char: \00"
@stdin = global i32 0
@.str.1 = [15 x i8] c"char entered: \00"
@stdout = global i32 0
@.str.2 = [3 x i8] c"\0A\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @stdin
%5 = call signext i8 @getc(i32 %4)
store i8 %5, i8* %2
%6 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%7 = load i8, i8* %2
%8 = load i32, i32* @stdout
%9 = call i32 @putc(i8 signext %7, i32 %8)
%10 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"Enter a char: \00"
@stdin = global i32 0
@.str.1 = [15 x i8] c"char entered: \00"
@stdout = global i32 0
@str = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @stdin
%3 = tail call signext i8 @getc(i32 %2)
%4 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* @stdout
%6 = tail call i32 @putc(i8 signext %3, i32 %5)
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ core3_swap(char *, int);
void U_EMRSETBKMODE_swap(char *record, int torev) { core3_swap(record, torev); }


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

x86 assembly (clang, -O2):
<U_EMRSETBKMODE_swap>:
jmp    1030 <core3_swap@plt>

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

LLVM IR (-O2):
define void @U_EMRSETBKMODE_swap(i8* %0, i32 %1) {
%3 = tail call i32 @core3_swap(i8* %0, i32 %1)
ret void
}
int gcd(int x, int y) {
  int r;
  if (x < y) {
    r = x;
    x = y;
    y = r;
  }
  r = x % y;
  while (r != 0) {
    x = y;
    y = r;
    r = x % y;
  }
  return y;
}


x86 assembly (clang, -O0):
<gcd>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1128 <gcd+0x28>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %edx,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1157 <gcd+0x57>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %edx,-0xc(%rbp)
jmp    1132 <gcd+0x32>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gcd>:
cmp    %esi,%edi
mov    %edi,%eax
cmovl  %esi,%eax
cmovl  %edi,%esi
cltd
idiv   %esi
test   %edx,%edx
je     1130 <gcd+0x30>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %edx,%ecx
mov    %esi,%eax
cltd
idiv   %ecx
mov    %ecx,%esi
test   %edx,%edx
jne    1120 <gcd+0x20>
mov    %ecx,%eax
ret
mov    %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @gcd(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %1, i32 %0
%5 = select i1 %3, i32 %0, i32 %1
%6 = srem i32 %4, %5
%7 = icmp eq i32 %6, 0
br i1 %7, label %13, label %8
8: ; preds = %2, %8
%9 = phi i32 [ %11, %8 ], [ %6, %2 ]
%10 = phi i32 [ %9, %8 ], [ %5, %2 ]
%11 = srem i32 %10, %9
%12 = icmp eq i32 %11, 0
br i1 %12, label %13, label %8
13: ; preds = %8, %2
%14 = phi i32 [ %5, %2 ], [ %9, %8 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ emit_bit(int);
void emit_gap() {
  int i;
  for (i = 0; i < 100; i++)
    emit_bit(1);
}


x86 assembly (clang, -O0):
<emit_gap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x64,-0x4(%rbp)
jge    1141 <emit_gap+0x31>
mov    $0x1,%edi
call   1030 <emit_bit@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <emit_gap+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<emit_gap>:
push   %rbx
mov    $0x64,%ebx
cs nopw 0x0(%rax,%rax,1)
mov    $0x1,%edi
call   1030 <emit_bit@plt>
add    $0xffffffff,%ebx
jne    1120 <emit_gap+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @emit_gap() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %7, %0
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 100
br i1 %4, label %5, label %10
5: ; preds = %2
%6 = call i32 @emit_bit(i32 1)
br label %7
7: ; preds = %5
%8 = load i32, i32* %1
%9 = add nsw i32 %8, 1
store i32 %9, i32* %1
br label %2
10: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @emit_gap() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %4, %1 ]
%3 = tail call i32 @emit_bit(i32 1)
%4 = add nuw nsw i32 %2, 1
%5 = icmp eq i32 %4, 100
br i1 %5, label %6, label %1
6: ; preds = %1
ret void
}
void g_main_context_acquire() {}


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

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

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

LLVM IR (-O2):
define void @g_main_context_acquire() {
ret void
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int syscon_multprec_size_limit(int k, int *szl) {
  int fail;
  double *c;
  fail = _ada_use_c2phc(603, &k, szl, c);
  return fail;
}


x86 assembly (clang, -O0):
<syscon_multprec_size_limit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x25b,%edi
lea    -0x4(%rbp),%rsi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<syscon_multprec_size_limit>:
push   %rax
mov    %rsi,%rdx
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x25b,%edi
call   1030 <_ada_use_c2phc@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @syscon_multprec_size_limit(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32
%6 = alloca double*
store i32 %0, i32* %3
store i32* %1, i32** %4
%7 = load i32*, i32** %4
%8 = load double*, double** %6
%9 = call i32 @_ada_use_c2phc(i32 603, i32* %3, i32* %7, double* %8)
store i32 %9, i32* %5
%10 = load i32, i32* %5
ret i32 %10
}

LLVM IR (-O2):
define i32 @syscon_multprec_size_limit(i32 %0, i32* %1) {
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 @_ada_use_c2phc(i32 603, i32* %3, i32* %1, double* undef)
ret i32 %4
}
I0AR1(r0, r1, x0, x1, p0, p1) unsigned short r0, r1;
unsigned short *p0, *p1;
{
  if (22 <= (p1[1111111 / 4]))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<I0AR1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %di,%si
mov    %si,-0x6(%rbp)
mov    %ax,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movzwl 0x87a22(%rax),%ecx
mov    $0x16,%eax
cmp    %ecx,%eax
jg     1143 <I0AR1+0x43>
movl   $0x1,-0x4(%rbp)
jmp    114a <I0AR1+0x4a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<I0AR1>:
xor    %eax,%eax
cmpw   $0x16,0x87a22(%r9)
setae  %al
ret

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

LLVM IR (-O2):
define i32 @I0AR1(i32 %0, i32 %1, i32 %2, i32 %3, i16* nocapture readnone %4, i16* nocapture %5) {
%7 = getelementptr inbounds i16, i16* %5, i64 277777
%8 = load i16, i16* %7
%9 = icmp ugt i16 %8, 21
%10 = zext i1 %9 to i32
ret i32 %10
}
void encryptstr(unsigned char *src, unsigned char *dest) {
  unsigned char last = 0;
  *dest = 0;
  dest++;
  while (*src) {
    *dest = *src ^ 0xA5 ^ last;
    last = *src;
    src++;
    dest++;
  }
  *dest = 0;
}


x86 assembly (clang, -O0):
<encryptstr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movb   $0x0,-0x11(%rbp)
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1170 <encryptstr+0x70>
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
xor    $0xa5,%eax
movzbl -0x11(%rbp),%ecx
xor    %ecx,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x11(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1123 <encryptstr+0x23>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<encryptstr>:
movb   $0x0,(%rsi)
add    $0x1,%rsi
mov    (%rdi),%al
test   %al,%al
je     1139 <encryptstr+0x39>
add    $0x1,%rdi
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
xor    %cl,%al
xor    $0xa5,%al
mov    %al,(%rsi)
movzbl -0x1(%rdi),%ecx
movzbl (%rdi),%eax
add    $0x1,%rsi
add    $0x1,%rdi
test   %al,%al
jne    1120 <encryptstr+0x20>
movb   $0x0,(%rsi)
ret

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

LLVM IR (-O2):
define void @encryptstr(i8* nocapture %0, i8* nocapture writeonly %1) {
store i8 0, i8* %1
%3 = getelementptr inbounds i8, i8* %1, i64 1
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %18, label %6
6: ; preds = %2, %6
%7 = phi i8 [ %16, %6 ], [ %4, %2 ]
%8 = phi i8* [ %15, %6 ], [ %3, %2 ]
%9 = phi i8 [ %13, %6 ], [ 0, %2 ]
%10 = phi i8* [ %14, %6 ], [ %0, %2 ]
%11 = xor i8 %9, %7
%12 = xor i8 %11, -91
store i8 %12, i8* %8
%13 = load i8, i8* %10
%14 = getelementptr inbounds i8, i8* %10, i64 1
%15 = getelementptr inbounds i8, i8* %8, i64 1
%16 = load i8, i8* %14
%17 = icmp eq i8 %16, 0
br i1 %17, label %18, label %6
18: ; preds = %6, %2
%19 = phi i8* [ %3, %2 ], [ %15, %6 ]
store i8 0, i8* %19
ret void
}
/* Type definitions */
struct mark5b_fix_statistics {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/
fprintmark5bfixstatistics(int /*<<< orphan*/,
                          struct mark5b_fix_statistics const *);
int /*<<< orphan*/ stdout;
void printmark5bfixstatistics(const struct mark5b_fix_statistics *stats) {
  fprintmark5bfixstatistics(stdout, stats);
}


x86 assembly (clang, -O0):
<printmark5bfixstatistics>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
call   1030 <fprintmark5bfixstatistics@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printmark5bfixstatistics>:
mov    %rdi,%rsi
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
jmp    1030 <fprintmark5bfixstatistics@plt>

LLVM IR (-O0):
%struct.mark5b_fix_statistics = type { i32 }
@stdout = global i32 0
define void @printmark5bfixstatistics(%struct.mark5b_fix_statistics* %0) {
%2 = alloca %struct.mark5b_fix_statistics*
store %struct.mark5b_fix_statistics* %0, %struct.mark5b_fix_statistics** %2
%3 = load i32, i32* @stdout
%4 = load %struct.mark5b_fix_statistics*, %struct.mark5b_fix_statistics** %2
%5 = call i32 @fprintmark5bfixstatistics(i32 %3, %struct.mark5b_fix_statistics* %4)
ret void
}

LLVM IR (-O2):
%struct.mark5b_fix_statistics = type { i32 }
@stdout = global i32 0
define void @printmark5bfixstatistics(%struct.mark5b_fix_statistics* %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @fprintmark5bfixstatistics(i32 %2, %struct.mark5b_fix_statistics* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;
typedef int /*<<< orphan*/ out;

/* Variables and functions */
int /*<<< orphan*/ swap_n(int /*<<< orphan*/ *, int /*<<< orphan*/ *, int);
uint64_t be64toh(uint64_t in) {
  uint64_t out;
  swap_n(&in, &out, sizeof(out));
  return out;
}


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

x86 assembly (clang, -O2):
<be64toh>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rdi
mov    %rsp,%rsi
mov    $0x4,%edx
call   1030 <swap_n@plt>
mov    (%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @be64toh(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = bitcast i32* %3 to i8*
%5 = call i32 @swap_n(i32* %2, i32* %3, i32 4)
%6 = load i32, i32* %3
ret i32 %6
}
/* Type definitions */
struct gdev_list {
  int dummy;
};

/* Variables and functions */
void gdev_list_add_prev(struct gdev_list *, struct gdev_list *);
void gdev_list_add_tail(struct gdev_list *entry, struct gdev_list *head) {
  return gdev_list_add_prev(entry, head);
}


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

x86 assembly (clang, -O2):
<gdev_list_add_tail>:
jmp    1030 <gdev_list_add_prev@plt>

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

LLVM IR (-O2):
%struct.gdev_list = type { i32 }
define void @gdev_list_add_tail(%struct.gdev_list* %0, %struct.gdev_list* %1) {
tail call void @gdev_list_add_prev(%struct.gdev_list* %0, %struct.gdev_list* %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128;

/* Variables and functions */
int /*<<< orphan*/ _mm_setr_ps(float, float, float, float);
__m128 test_mm_setr_ps(float A, float B, float C, float D) {
  return _mm_setr_ps(A, B, C, D);
}


x86 assembly (clang, -O0):
<test_mm_setr_ps>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm2
movss  -0x10(%rbp),%xmm3
call   1030 <_mm_setr_ps@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_mm_setr_ps>:
jmp    1030 <_mm_setr_ps@plt>

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

LLVM IR (-O2):
define i32 @test_mm_setr_ps(float %0, float %1, float %2, float %3) {
%5 = tail call i32 @_mm_setr_ps(float %0, float %1, float %2, float %3)
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ mpz_t;

/* Variables and functions */
int /*<<< orphan*/ mpz_init(int /*<<< orphan*/);
int main() {
  mpz_t n;
  mpz_init(n);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @mpz_init(i32 undef)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_socket_server_new_ipv4_any() {
  printf("NOT IMPLEMENTED:"
         "pa_socket_server_new_ipv4_any"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [47 x i8] c"NOT IMPLEMENTED:pa_socket_server_new_ipv4_any\0A\00"
define i32 @pa_socket_server_new_ipv4_any() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [46 x i8] c"NOT IMPLEMENTED:pa_socket_server_new_ipv4_any\00"
define i32 @pa_socket_server_new_ipv4_any() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int const uint16_t;

/* Variables and functions */
int /*<<< orphan*/ ndm_endian_is_le();
uint16_t ndm_endian_betoh16(const uint16_t x) {
  if (!ndm_endian_is_le()) {
    return x;
  }
  const uint8_t *p = (const uint8_t *)&x;
  return (uint16_t)(((uint16_t) * (p + 1)) << 0 | ((uint16_t) * (p + 0)) << 8);
}


x86 assembly (clang, -O0):
<ndm_endian_betoh16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <ndm_endian_is_le@plt>
cmp    $0x0,%eax
jne    1136 <ndm_endian_betoh16+0x26>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1158 <ndm_endian_betoh16+0x48>
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
shl    $0x0,%eax
mov    -0x10(%rbp),%rcx
mov    (%rcx),%rcx
shl    $0x8,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ndm_endian_betoh16>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <ndm_endian_is_le@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @ndm_endian_betoh16(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i64*
store i32 %0, i32* %3
%5 = call i32 (...) @ndm_endian_is_le()
%6 = icmp ne i32 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %1
%8 = load i32, i32* %3
store i32 %8, i32* %2
br label %22
9: ; preds = %1
%10 = bitcast i32* %3 to i64*
store i64* %10, i64** %4
%11 = load i64*, i64** %4
%12 = getelementptr inbounds i64, i64* %11, i64 1
%13 = load i64, i64* %12
%14 = trunc i64 %13 to i32
%15 = shl i32 %14, 0
%16 = load i64*, i64** %4
%17 = getelementptr inbounds i64, i64* %16, i64 0
%18 = load i64, i64* %17
%19 = trunc i64 %18 to i32
%20 = shl i32 %19, 8
%21 = or i32 %15, %20
store i32 %21, i32* %2
br label %22
22: ; preds = %9, %7
%23 = load i32, i32* %2
ret i32 %23
}

LLVM IR (-O2):
define i32 @ndm_endian_betoh16(i32 returned %0) {
%2 = tail call i32 (...) @ndm_endian_is_le()
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void foo(float x) {
  float xx = x * 0.01f;
  printf("%d\n", (int)(x * 0.01f));
  printf("%d\n", (int)xx);
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  0xedb(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xec9(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
cvttss2si %xmm0,%esi
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
cvttss2si -0x8(%rbp),%esi
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %r14
push   %rbx
push   %rax
mulss  0xee4(%rip),%xmm0
cvttss2si %xmm0,%ebx
lea    0xedd(%rip),%r14
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
mov    %r14,%rdi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define void @foo(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %2
%4 = load float, float* %2
%5 = fmul float %4, 0x3F847AE140000000
store float %5, float* %3
%6 = load float, float* %2
%7 = fmul float %6, 0x3F847AE140000000
%8 = fptosi float %7 to i32
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = load float, float* %3
%11 = fptosi float %10 to i32
%12 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %11)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @foo(float %0) {
%2 = fmul float %0, 0x3F847AE140000000
%3 = fptosi float %2 to i32
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}
/* Variables and functions */
int strlen(char *);
int /*<<< orphan*/ ungetch(char);
void ungetstr(char *str) {
  int i = strlen(str);
  while (i > 0) {
    ungetch(str[i - 1]);
    i--;
  }
}


x86 assembly (clang, -O0):
<ungetstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jle    1166 <ungetstr+0x46>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%edi
call   1040 <ungetch@plt>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    1138 <ungetstr+0x18>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ungetstr>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1030 <strlen@plt>
test   %eax,%eax
jle    1157 <ungetstr+0x37>
mov    %eax,%ebx
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
lea    -0x2(%rbx),%eax
movsbl (%r14,%rax,1),%edi
call   1040 <ungetch@plt>
add    $0xffffffffffffffff,%rbx
cmp    $0x1,%rbx
ja     1140 <ungetstr+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @ungetstr(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = icmp sgt i32 %2, 0
br i1 %3, label %4, label %14
4: ; preds = %1
%5 = zext i32 %2 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ %5, %4 ], [ %8, %6 ]
%8 = add nsw i64 %7, -1
%9 = and i64 %8, 4294967295
%10 = getelementptr inbounds i8, i8* %0, i64 %9
%11 = load i8, i8* %10
%12 = tail call i32 @ungetch(i8 signext %11)
%13 = icmp ugt i64 %7, 1
br i1 %13, label %6, label %14
14: ; preds = %6, %1
ret void
}
int HelpItem114(void) { return 0; }


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

x86 assembly (clang, -O2):
<HelpItem114>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @HelpItem114() {
ret i32 0
}

LLVM IR (-O2):
define i32 @HelpItem114() {
ret i32 0
}