xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ isalpha(int);
scalar_t__ isdigit(int);
int is_id_char(int c) { return c == '_' || isalpha(c) || isdigit(c); }


x86 assembly (clang, -O0):
<is_id_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x5f,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     1166 <is_id_char+0x46>
mov    -0x4(%rbp),%edi
call   1040 <isalpha@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
jne    1166 <is_id_char+0x46>
mov    -0x4(%rbp),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_id_char>:
push   %rbp
push   %rbx
push   %rax
mov    $0x1,%ebx
cmp    $0x5f,%edi
je     1148 <is_id_char+0x28>
mov    %edi,%ebp
call   1040 <isalpha@plt>
test   %rax,%rax
jne    1148 <is_id_char+0x28>
mov    %ebp,%edi
call   1030 <isdigit@plt>
xor    %ebx,%ebx
test   %rax,%rax
setne  %bl
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @is_id_char(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 95
br i1 %4, label %13, label %5
5: ; preds = %1
%6 = load i32, i32* %2
%7 = call i64 @isalpha(i32 %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %13, label %9
9: ; preds = %5
%10 = load i32, i32* %2
%11 = call i64 @isdigit(i32 %10)
%12 = icmp ne i64 %11, 0
br label %13
13: ; preds = %9, %5, %1
%14 = phi i1 [ true, %5 ], [ true, %1 ], [ %12, %9 ]
%15 = zext i1 %14 to i32
ret i32 %15
}

LLVM IR (-O2):
define i32 @is_id_char(i32 %0) {
%2 = icmp eq i32 %0, 95
br i1 %2, label %10, label %3
3: ; preds = %1
%4 = tail call i64 @isalpha(i32 %0)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %3
%7 = tail call i64 @isdigit(i32 %0)
%8 = icmp ne i64 %7, 0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %6, %3, %1
%11 = phi i32 [ 1, %3 ], [ 1, %1 ], [ %9, %6 ]
ret i32 %11
}
int pft_inode_set_xattr(struct dentry *dentry, const char *name) { return 0; }


x86 assembly (clang, -O0):
<pft_inode_set_xattr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.dentry = type opaque
define i32 @pft_inode_set_xattr(%struct.dentry* %0, i8* %1) {
%3 = alloca %struct.dentry*
%4 = alloca i8*
store %struct.dentry* %0, %struct.dentry** %3
store i8* %1, i8** %4
ret i32 0
}

LLVM IR (-O2):
%struct.dentry = type opaque
define i32 @pft_inode_set_xattr(%struct.dentry* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 0
}
void string_copy(char *f_dst_str, char *f_src_str) {
  while ((*f_dst_str++ = *f_src_str++))
    ;
  *f_dst_str = '\0';
}


x86 assembly (clang, -O0):
<string_copy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %al,(%rcx)
cmp    $0x0,%al
je     113b <string_copy+0x3b>
jmp    110c <string_copy+0xc>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_copy>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%rsi,%rax,1),%ecx
mov    %cl,(%rdi,%rax,1)
add    $0x1,%rax
test   %cl,%cl
jne    1110 <string_copy+0x10>
movb   $0x0,(%rdi,%rax,1)
ret

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

LLVM IR (-O2):
define void @string_copy(i8* nocapture writeonly %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %8, %3 ]
%5 = phi i8* [ %1, %2 ], [ %6, %3 ]
%6 = getelementptr inbounds i8, i8* %5, i64 1
%7 = load i8, i8* %5
%8 = getelementptr inbounds i8, i8* %4, i64 1
store i8 %7, i8* %4
%9 = icmp eq i8 %7, 0
br i1 %9, label %10, label %3
10: ; preds = %3
store i8 0, i8* %8
ret void
}
/* Variables and functions */
char *strsep_ne(char **, char *);
char *wsep(char **ref) { return strsep_ne(ref, " \t\n\v\f\r"); }


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

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

LLVM IR (-O0):
@.str = [7 x i8] c" \09\0A\0B\0C\0D\00"
define i8* @wsep(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = call i8* @strsep_ne(i8** %3, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret i8* %4
}

LLVM IR (-O2):
@.str = [7 x i8] c" \09\0A\0B\0C\0D\00"
define i8* @wsep(i8** %0) {
%2 = tail call i8* @strsep_ne(i8** %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret i8* %2
}
void Aig_InfoSetBit(unsigned *p, int i) { p[(i) >> 5] |= (1 << ((i)&31)); }


x86 assembly (clang, -O0):
<Aig_InfoSetBit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
and    $0x1f,%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sar    $0x5,%ecx
movslq %ecx,%rcx
or     (%rax,%rcx,4),%edx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<Aig_InfoSetBit>:
mov    %esi,%ecx
mov    $0x1,%eax
shl    %cl,%eax
sar    $0x5,%ecx
movslq %ecx,%rcx
or     %eax,(%rdi,%rcx,4)
ret

LLVM IR (-O0):
define void @Aig_InfoSetBit(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = and i32 %5, 31
%7 = shl i32 1, %6
%8 = load i32*, i32** %3
%9 = load i32, i32* %4
%10 = ashr i32 %9, 5
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i32, i32* %8, i64 %11
%13 = load i32, i32* %12
%14 = or i32 %13, %7
store i32 %14, i32* %12
ret void
}

LLVM IR (-O2):
define void @Aig_InfoSetBit(i32* nocapture %0, i32 %1) {
%3 = and i32 %1, 31
%4 = shl nuw i32 1, %3
%5 = ashr i32 %1, 5
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds i32, i32* %0, i64 %6
%8 = load i32, i32* %7
%9 = or i32 %8, %4
store i32 %9, i32* %7
ret void
}
short reverseBits_fun_short(short x) {
  short r = x;
  int i = 15;
  for (x = x >> 1 & 0x7fff; x; x >>= 1) {
    r = (r << 1) | (x & 1);
    --i;
  }
  return r << i;
}


x86 assembly (clang, -O0):
<reverseBits_fun_short>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    -0x2(%rbp),%ax
mov    %ax,-0x4(%rbp)
movl   $0xf,-0x8(%rbp)
movswl -0x2(%rbp),%eax
sar    $0x1,%eax
and    $0x7fff,%eax
mov    %ax,-0x2(%rbp)
cmpw   $0x0,-0x2(%rbp)
je     1162 <reverseBits_fun_short+0x62>
movswl -0x4(%rbp),%eax
shl    $0x1,%eax
movswl -0x2(%rbp),%ecx
and    $0x1,%ecx
or     %ecx,%eax
mov    %ax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
movswl -0x2(%rbp),%eax
sar    $0x1,%eax
mov    %ax,-0x2(%rbp)
jmp    112a <reverseBits_fun_short+0x2a>
movswl -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    %cl,%eax
cwtl
pop    %rbp
ret

x86 assembly (clang, -O2):
<reverseBits_fun_short>:
mov    $0xf,%ecx
cmp    $0x2,%di
jae    110f <reverseBits_fun_short+0xf>
mov    %edi,%eax
jmp    1138 <reverseBits_fun_short+0x38>
mov    $0xf,%ecx
mov    %edi,%eax
cs nopw 0x0(%rax,%rax,1)
movzwl %di,%edx
mov    %edx,%edi
shr    %edi
mov    %edi,%esi
and    $0x1,%esi
lea    (%rsi,%rax,2),%eax
add    $0xffffffff,%ecx
cmp    $0x3,%dx
ja     1120 <reverseBits_fun_short+0x20>
movzwl %ax,%eax
shl    %cl,%eax
ret

LLVM IR (-O0):
define signext i16 @reverseBits_fun_short(i16 signext %0) {
%2 = alloca i16
%3 = alloca i16
%4 = alloca i32
store i16 %0, i16* %2
%5 = load i16, i16* %2
store i16 %5, i16* %3
store i32 15, i32* %4
%6 = load i16, i16* %2
%7 = sext i16 %6 to i32
%8 = ashr i32 %7, 1
%9 = and i32 %8, 32767
%10 = trunc i32 %9 to i16
store i16 %10, i16* %2
br label %11
11: ; preds = %25, %1
%12 = load i16, i16* %2
%13 = icmp ne i16 %12, 0
br i1 %13, label %14, label %30
14: ; preds = %11
%15 = load i16, i16* %3
%16 = sext i16 %15 to i32
%17 = shl i32 %16, 1
%18 = load i16, i16* %2
%19 = sext i16 %18 to i32
%20 = and i32 %19, 1
%21 = or i32 %17, %20
%22 = trunc i32 %21 to i16
store i16 %22, i16* %3
%23 = load i32, i32* %4
%24 = add nsw i32 %23, -1
store i32 %24, i32* %4
br label %25
25: ; preds = %14
%26 = load i16, i16* %2
%27 = sext i16 %26 to i32
%28 = ashr i32 %27, 1
%29 = trunc i32 %28 to i16
store i16 %29, i16* %2
br label %11
30: ; preds = %11
%31 = load i16, i16* %3
%32 = sext i16 %31 to i32
%33 = load i32, i32* %4
%34 = shl i32 %32, %33
%35 = trunc i32 %34 to i16
ret i16 %35
}

LLVM IR (-O2):
define signext i16 @reverseBits_fun_short(i16 signext %0) {
%2 = icmp ult i16 %0, 2
br i1 %2, label %13, label %3
3: ; preds = %1, %3
%4 = phi i16 [ %7, %3 ], [ %0, %1 ]
%5 = phi i32 [ %11, %3 ], [ 15, %1 ]
%6 = phi i16 [ %10, %3 ], [ %0, %1 ]
%7 = lshr i16 %4, 1
%8 = shl i16 %6, 1
%9 = and i16 %7, 1
%10 = or i16 %8, %9
%11 = add nsw i32 %5, -1
%12 = icmp ult i16 %4, 4
br i1 %12, label %13, label %3
13: ; preds = %3, %1
%14 = phi i16 [ %0, %1 ], [ %10, %3 ]
%15 = phi i32 [ 15, %1 ], [ %11, %3 ]
%16 = zext i16 %14 to i32
%17 = shl i32 %16, %15
%18 = trunc i32 %17 to i16
ret i16 %18
}
void *rawmemchr(const void *s, int c) {
  register const unsigned char *r = s;
  while (*r != ((unsigned char)c))
    ++r;
  return (void *)r;
}


x86 assembly (clang, -O0):
<rawmemchr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movzbl (%rax),%eax
mov    -0xc(%rbp),%ecx
movzbl %cl,%ecx
cmp    %ecx,%eax
je     1139 <rawmemchr+0x39>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1113 <rawmemchr+0x13>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rawmemchr>:
mov    %rdi,%rax
add    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
mov    %rax,%rcx
add    $0x1,%rax
cmp    %sil,0x1(%rcx)
jne    1110 <rawmemchr+0x10>
ret

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

LLVM IR (-O2):
define i8* @rawmemchr(i8* %0, i32 %1) {
%3 = trunc i32 %1 to i8
br label %4
4: ; preds = %4, %2
%5 = phi i8* [ %0, %2 ], [ %8, %4 ]
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, %3
%8 = getelementptr inbounds i8, i8* %5, i64 1
br i1 %7, label %9, label %4
9: ; preds = %4
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int tab[] = {1, 3, 7, 8, 9}, i;
  for (i = 0; i <= 4; i++) {
    printf("%d \n", tab[i]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeda(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xed7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xed5(%rip),%eax
mov    %eax,-0x10(%rbp)
movl   $0x0,-0x24(%rbp)
cmpl   $0x4,-0x24(%rbp)
jg     1171 <main+0x61>
movslq -0x24(%rbp),%rax
mov    -0x20(%rbp,%rax,4),%esi
lea    0xeb6(%rip),%rdi
call   1030 <printf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1145 <main+0x35>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x7,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x9,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.tab = [5 x i32] [i32 1, i32 3, i32 7, i32 8, i32 9]
@.str = [5 x i8] c"%d \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x i32]
%3 = alloca i32
store i32 0, i32* %1
%4 = bitcast [5 x i32]* %2 to i8*
store i32 0, i32* %3
br label %5
5: ; preds = %14, %0
%6 = load i32, i32* %3
%7 = icmp sle i32 %6, 4
br i1 %7, label %8, label %17
8: ; preds = %5
%9 = load i32, i32* %3
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 %10
%12 = load i32, i32* %11
%13 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %12)
br label %14
14: ; preds = %8
%15 = load i32, i32* %3
%16 = add nsw i32 %15, 1
store i32 %16, i32* %3
br label %5
17: ; preds = %5
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"%d \0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 1)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 3)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 7)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 8)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 9)
ret i32 0
}
/* Variables and functions */
scalar_t__ isboundary(int);
int pow(int, int);
int isfluid(int flag) {
  if (isboundary(flag) == 0) {
    int ret = pow(2, 12);
    return ((flag & (3 * ret)) == ret);
  }
  return 0;
}


x86 assembly (clang, -O0):
<isfluid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <isboundary@plt>
cmp    $0x0,%rax
jne    116b <isfluid+0x4b>
mov    $0x2,%edi
mov    $0xc,%esi
call   1040 <pow@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
imul   $0x3,-0xc(%rbp),%ecx
and    %ecx,%eax
cmp    -0xc(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
jmp    1172 <isfluid+0x52>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isfluid>:
push   %rbx
mov    %edi,%ebx
call   1030 <isboundary@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
je     1134 <isfluid+0x14>
pop    %rbx
ret
mov    $0x2,%edi
mov    $0xc,%esi
call   1040 <pow@plt>
mov    %eax,%ecx
lea    (%rcx,%rcx,2),%edx
and    %ebx,%edx
xor    %eax,%eax
cmp    %ecx,%edx
sete   %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @isfluid(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = call i64 @isboundary(i32 %5)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %17
8: ; preds = %1
%9 = call i32 @pow(i32 2, i32 12)
store i32 %9, i32* %4
%10 = load i32, i32* %3
%11 = load i32, i32* %4
%12 = mul nsw i32 3, %11
%13 = and i32 %10, %12
%14 = load i32, i32* %4
%15 = icmp eq i32 %13, %14
%16 = zext i1 %15 to i32
store i32 %16, i32* %2
br label %18
17: ; preds = %1
store i32 0, i32* %2
br label %18
18: ; preds = %17, %8
%19 = load i32, i32* %2
ret i32 %19
}

LLVM IR (-O2):
define i32 @isfluid(i32 %0) {
%2 = tail call i64 @isboundary(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %10
4: ; preds = %1
%5 = tail call i32 @pow(i32 2, i32 12)
%6 = mul nsw i32 %5, 3
%7 = and i32 %6, %0
%8 = icmp eq i32 %7, %5
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %1, %4
%11 = phi i32 [ %9, %4 ], [ 0, %1 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ foo(int, int, int);
int main() {
  foo(1, 2, 3);
  foo(1, 2, 3);
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
call   1030 <foo@plt>
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
call   1030 <foo@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
call   1030 <foo@plt>
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
call   1030 <foo@plt>
xor    %edi,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foo(i32 1, i32 2, i32 3)
%2 = tail call i32 @foo(i32 1, i32 2, i32 3)
%3 = tail call i32 @exit(i32 0)
unreachable
}
int calculoMemoria(int *n) {
  int cociente = *n / 9;
  int resto = *n % 9;
  if (cociente && resto)
    return cociente + 1;
  else if (resto)
    return 1;
  return cociente;
}


x86 assembly (clang, -O0):
<calculoMemoria>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    $0x9,%ecx
cltd
idiv   %ecx
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    $0x9,%ecx
cltd
idiv   %ecx
mov    %edx,-0x18(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     114c <calculoMemoria+0x4c>
cmpl   $0x0,-0x18(%rbp)
je     114c <calculoMemoria+0x4c>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    116d <calculoMemoria+0x6d>
cmpl   $0x0,-0x18(%rbp)
je     1162 <calculoMemoria+0x62>
movl   $0x1,-0x4(%rbp)
jmp    116d <calculoMemoria+0x6d>
jmp    1167 <calculoMemoria+0x67>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<calculoMemoria>:
movslq (%rdi),%rcx
imul   $0x38e38e39,%rcx,%rax
mov    %rax,%rdx
shr    $0x3f,%rdx
sar    $0x21,%rax
lea    (%rax,%rdx,1),%esi
imul   $0x38e38e39,%ecx,%edi
add    $0xe38e38e,%edi
cmp    $0x1c71c71d,%edi
lea    0x1(%rax,%rdx,1),%eax
mov    $0x1,%edx
cmovb  %esi,%edx
cmovb  %edx,%eax
add    $0xfffffff7,%ecx
cmp    $0xffffffef,%ecx
cmovae %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @calculoMemoria(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = sdiv i32 %2, 9
%4 = srem i32 %2, 9
%5 = add i32 %2, -9
%6 = icmp ult i32 %5, -17
%7 = icmp ne i32 %4, 0
%8 = and i1 %6, %7
%9 = add nsw i32 %3, 1
%10 = select i1 %7, i32 1, i32 %3
%11 = select i1 %8, i32 %9, i32 %10
ret i32 %11
}
void ab4cdefghijklmnopqrstuvwxzy() {}


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

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

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

LLVM IR (-O2):
define void @ab4cdefghijklmnopqrstuvwxzy() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uid_t;
typedef int /*<<< orphan*/ gid_t;

/* Variables and functions */
int common_chown(char const *, int /*<<< orphan*/, int /*<<< orphan*/, int);
int virt_lchown(const char *path, uid_t owner, gid_t grp) {
  return common_chown(path, owner, grp, 0x00020000);
}


x86 assembly (clang, -O0):
<virt_lchown>:
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),%esi
mov    -0x10(%rbp),%edx
mov    $0x20000,%ecx
call   1030 <common_chown@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<virt_lchown>:
mov    $0x20000,%ecx
jmp    1030 <common_chown@plt>

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

LLVM IR (-O2):
define i32 @virt_lchown(i8* %0, i32 %1, i32 %2) {
%4 = tail call i32 @common_chown(i8* %0, i32 %1, i32 %2, i32 131072)
ret i32 %4
}
float check2(float x) { return __builtin_copysignf(1.0, x); }


x86 assembly (clang, -O0):
<check2>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movaps 0xeeb(%rip),%xmm1
pand   %xmm1,%xmm0
movaps 0xef0(%rip),%xmm1
por    %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<check2>:
andps  0xef9(%rip),%xmm0
orps   0xf02(%rip),%xmm0
ret

LLVM IR (-O0):
define float @check2(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @llvm.copysign.f32(float 1.000000e+00, float %3)
ret float %4
}

LLVM IR (-O2):
define float @check2(float %0) {
%2 = tail call float @llvm.copysign.f32(float 1.000000e+00, float %0)
ret float %2
}
/* Variables and functions */
int Parse_UART2_Received_Message(char *);
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  char *sSimulationTestingCmdMesg = "$FIN 0x02:12 STATe?!";
  int iResult = 0;
  iResult = Parse_UART2_Received_Message(sSimulationTestingCmdMesg);
  printf("Current result : %d\n", iResult);
  getchar();
  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)
lea    0xeb3(%rip),%rax
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x18(%rbp),%rdi
call   1050 <Parse_UART2_Received_Message@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%esi
lea    0xea7(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [21 x i8] c"$FIN 0x02:12 STATe?!\00"
@.str.1 = [21 x i8] c"Current result : %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8** %6
store i32 0, i32* %7
%8 = load i8*, i8** %6
%9 = call i32 @Parse_UART2_Received_Message(i8* %8)
store i32 %9, i32* %7
%10 = load i32, i32* %7
%11 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 %10)
%12 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
@.str = [21 x i8] c"$FIN 0x02:12 STATe?!\00"
@.str.1 = [21 x i8] c"Current result : %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @Parse_UART2_Received_Message(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%5 = tail call i32 (...) @getchar()
ret i32 0
}
/* Variables and functions */
int fork();
int forkme() {
  int pid;
  pid = fork();
  if (pid != 0)
    pid = fork();
  if (pid != 0)
    pid = fork();
  return pid;
}


x86 assembly (clang, -O0):
<forkme>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <fork@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1136 <forkme+0x26>
mov    $0x0,%al
call   1030 <fork@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     114a <forkme+0x3a>
mov    $0x0,%al
call   1030 <fork@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<forkme>:
push   %rax
xor    %eax,%eax
call   1030 <fork@plt>
test   %eax,%eax
je     112f <forkme+0x1f>
xor    %eax,%eax
call   1030 <fork@plt>
test   %eax,%eax
je     112f <forkme+0x1f>
xor    %eax,%eax
pop    %rcx
jmp    1030 <fork@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @forkme() {
%1 = alloca i32
%2 = call i32 (...) @fork()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 (...) @fork()
store i32 %6, i32* %1
br label %7
7: ; preds = %5, %0
%8 = load i32, i32* %1
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %7
%11 = call i32 (...) @fork()
store i32 %11, i32* %1
br label %12
12: ; preds = %10, %7
%13 = load i32, i32* %1
ret i32 %13
}

LLVM IR (-O2):
define i32 @forkme() {
%1 = tail call i32 (...) @fork()
%2 = icmp eq i32 %1, 0
br i1 %2, label %8, label %3
3: ; preds = %0
%4 = tail call i32 (...) @fork()
%5 = icmp eq i32 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 (...) @fork()
br label %8
8: ; preds = %0, %6, %3
%9 = phi i32 [ %7, %6 ], [ 0, %3 ], [ 0, %0 ]
ret i32 %9
}
int mach64_driver_irq_postinstall(struct drm_device *dev) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.drm_device = type opaque
define i32 @mach64_driver_irq_postinstall(%struct.drm_device* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *, char const *, size_t,
                          int /*<<< orphan*/);
int /*<<< orphan*/ x_strncmp(char const *, char const *, size_t);
void strncmp_test(const char *a, const char *b, size_t size) {
  printf("strncmp (%s, %s, %lu) = %d\n", a, b, size, x_strncmp(a, b, size));
}


x86 assembly (clang, -O0):
<strncmp_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <x_strncmp@plt>
mov    -0x30(%rbp),%rsi
mov    -0x28(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    %eax,%r8d
lea    0xe8d(%rip),%rdi
call   1030 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strncmp_test>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
call   1040 <x_strncmp@plt>
lea    0xec6(%rip),%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
mov    %r14,%rcx
mov    %eax,%r8d
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [28 x i8] c"strncmp (%s, %s, %lu) = %d\0A\00"
define void @strncmp_test(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 = load i8*, i8** %4
%11 = load i8*, i8** %5
%12 = load i64, i64* %6
%13 = call i32 @x_strncmp(i8* %10, i8* %11, i64 %12)
%14 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* %7, i8* %8, i64 %9, i32 %13)
ret void
}

LLVM IR (-O2):
@.str = [28 x i8] c"strncmp (%s, %s, %lu) = %d\0A\00"
define void @strncmp_test(i8* %0, i8* %1, i64 %2) {
%4 = tail call i32 @x_strncmp(i8* %0, i8* %1, i64 %2)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1, i64 %2, i32 %4)
ret void
}
unsigned float_twice(unsigned uf) {}


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

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

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

LLVM IR (-O2):
define i32 @float_twice(i32 %0) {
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ a;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void fun(char a[]) {
  int res = sizeof(a) / sizeof(a[0]);
  printf("%d", res);
}


x86 assembly (clang, -O0):
<fun>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x8,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun>:
lea    0xee9(%rip),%rdi
mov    $0x8,%esi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define void @fun(i8* nocapture readnone %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 8)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ do_send(int, char *);
void japi_shift_process(int sd) { do_send(sd, "SHIFTPROCESS\n"); }


x86 assembly (clang, -O0):
<japi_shift_process>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    0xedb(%rip),%rsi
call   1030 <do_send@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [14 x i8] c"SHIFTPROCESS\0A\00"
define void @japi_shift_process(i32 %0) {
%2 = tail call i32 @do_send(i32 %0, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ TCFLSH;
int __ioctl(int, int /*<<< orphan*/, int);
int tcflush(int fd, int queue_selector) {
  return __ioctl(fd, TCFLSH, queue_selector);
}


x86 assembly (clang, -O0):
<tcflush>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eb8(%rip),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%edx
call   1030 <__ioctl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tcflush>:
mov    %esi,%edx
mov    0x2ec7(%rip),%rax
mov    (%rax),%esi
jmp    1030 <__ioctl@plt>

LLVM IR (-O0):
@TCFLSH = global i32 0
define i32 @tcflush(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* @TCFLSH
%7 = load i32, i32* %4
%8 = call i32 @__ioctl(i32 %5, i32 %6, i32 %7)
ret i32 %8
}

LLVM IR (-O2):
@TCFLSH = global i32 0
define i32 @tcflush(i32 %0, i32 %1) {
%3 = load i32, i32* @TCFLSH
%4 = tail call i32 @__ioctl(i32 %0, i32 %3, i32 %1)
ret i32 %4
}
/* Variables and functions */
int strcmp(char *, char *);
int Strcmp(const void *pt1, const void *pt2) {
  return (strcmp(*((char **)pt1), *((char **)pt2)));
}


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

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

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
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i8**
%7 = load i8*, i8** %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i8**
%10 = load i8*, i8** %9
%11 = call i32 @strcmp(i8* %7, i8* %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @Strcmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = load i8*, i8** %3
%5 = bitcast i8* %1 to i8**
%6 = load i8*, i8** %5
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %4, i8* dereferenceable(1) %6)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ at_init();
int /*<<< orphan*/ headland_init();
int /*<<< orphan*/ ide_init();
void at_headland_init() {
  at_init();
  ide_init();
  headland_init();
}


x86 assembly (clang, -O0):
<at_headland_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <at_init@plt>
mov    $0x0,%al
call   1050 <ide_init@plt>
mov    $0x0,%al
call   1040 <headland_init@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<at_headland_init>:
push   %rax
xor    %eax,%eax
call   1030 <at_init@plt>
xor    %eax,%eax
call   1050 <ide_init@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <headland_init@plt>

LLVM IR (-O0):
define void @at_headland_init() {
%1 = call i32 (...) @at_init()
%2 = call i32 (...) @ide_init()
%3 = call i32 (...) @headland_init()
ret void
}

LLVM IR (-O2):
define void @at_headland_init() {
%1 = tail call i32 (...) @at_init()
%2 = tail call i32 (...) @ide_init()
%3 = tail call i32 (...) @headland_init()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ipdb_init();
void IPV4_Init(void) { ipdb_init(); }


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

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

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

LLVM IR (-O2):
define void @IPV4_Init() {
%1 = tail call i32 (...) @ipdb_init()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ read_eof(char *);
int main(int argc, char **argv) {
  if (argc < 2) {
    printf("You must pass a filename to the test \n");
    exit(1);
  }
  char *filename = argv[1];
  read_eof(filename);
  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)
cmpl   $0x2,-0x8(%rbp)
jge    1166 <main+0x36>
lea    0xea9(%rip),%rdi
call   1040 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <read_eof@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x1,%edi
jle    1143 <main+0x13>
mov    0x8(%rsi),%rdi
call   1040 <read_eof@plt>
xor    %eax,%eax
pop    %rcx
ret
lea    0xeb6(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [39 x i8] c"You must pass a filename to the test \0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = icmp slt i32 %7, 2
br i1 %8, label %9, label %12
9: ; preds = %2
%10 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @exit(i32 1)
unreachable
12: ; preds = %2
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i64 1
%15 = load i8*, i8** %14
store i8* %15, i8** %6
%16 = load i8*, i8** %6
%17 = call i32 @read_eof(i8* %16)
ret i32 0
}

LLVM IR (-O2):
@str = [38 x i8] c"You must pass a filename to the test \00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 @exit(i32 1)
unreachable
7: ; preds = %2
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = load i8*, i8** %8
%10 = tail call i32 @read_eof(i8* %9)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ mq_open_default(char *, int);
void set_up_mqs(void) {
  mq_open_default("/mq_build_histogram_in", (8 * 1024));
  mq_open_default("/mq_build_histogram_out", (8 * 1024));
}


x86 assembly (clang, -O0):
<set_up_mqs>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x2000,%esi
call   1030 <mq_open_default@plt>
lea    0xeeb(%rip),%rdi
mov    $0x2000,%esi
call   1030 <mq_open_default@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_up_mqs>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x2000,%esi
call   1030 <mq_open_default@plt>
lea    0xeee(%rip),%rdi
mov    $0x2000,%esi
pop    %rax
jmp    1030 <mq_open_default@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"/mq_build_histogram_in\00"
@.str.1 = [24 x i8] c"/mq_build_histogram_out\00"
define void @set_up_mqs() {
%1 = call i32 @mq_open_default(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 8192)
%2 = call i32 @mq_open_default(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i32 8192)
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"/mq_build_histogram_in\00"
@.str.1 = [24 x i8] c"/mq_build_histogram_out\00"
define void @set_up_mqs() {
%1 = tail call i32 @mq_open_default(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 8192)
%2 = tail call i32 @mq_open_default(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i32 8192)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void usage(void) {
  printf("spincpu v.%s - Glen Wiley <gwiley@verisign.com>\n"
         "\n"
         "USAGE: spincpu [-n <nthreads>] [-v]\n"
         "-n <nthreads>  number of threads to start, default is 1\n"
         "-v             be verbose\n"
         "\n",
         "1.0");
  return;
}


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

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

LLVM IR (-O0):
@.str = [169 x i8] c"spincpu v.%s - Glen Wiley <gwiley@verisign.com>\0A\0AUSAGE: spincpu [-n <nthreads>] [-v]\0A-n <nthreads> number of threads to start, default is 1\0A-v be verbose\0A\0A\00"
@.str.1 = [4 x i8] c"1.0\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 x i8] c"spincpu v.%s - Glen Wiley <gwiley@verisign.com>\0A\0AUSAGE: spincpu [-n <nthreads>] [-v]\0A-n <nthreads> number of threads to start, default is 1\0A-v be verbose\0A\0A\00"
@.str.1 = [4 x i8] c"1.0\00"
define void @usage() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void bail(char *text) {
  fprintf(stderr, "[ERROR] %s\n", text);
  exit(-1);
}


x86 assembly (clang, -O0):
<bail>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<bail>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [12 x i8] c"[ERROR] %s\0A\00"
define void @bail(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [12 x i8] c"[ERROR] %s\0A\00"
define void @bail(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 -1)
unreachable
}
void gdk_draw_trapezoids() {}


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

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

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

LLVM IR (-O2):
define void @gdk_draw_trapezoids() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isgraph(int);
void t_isgraph_0xb8() {
  Assert_real((isgraph(184) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isgraph.c",
              925, ("isgraph should be 0 for 0xb8"));
}


x86 assembly (clang, -O0):
<t_isgraph_0xb8>:
push   %rbp
mov    %rsp,%rbp
mov    $0xb8,%edi
call   1040 <isgraph@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x39d,%edx
lea    0xf5b(%rip),%rcx
call   1030 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isgraph_0xb8>:
push   %rax
mov    $0xb8,%edi
call   1040 <isgraph@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x39d,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0xb8\00"
define void @t_isgraph_0xb8() {
%1 = call i64 @isgraph(i32 184)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 925, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0xb8\00"
define void @t_isgraph_0xb8() {
%1 = tail call i64 @isgraph(i32 184)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 925, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cng_put_pixel(int, int);
int Affiche6(int x, int y) { cng_put_pixel(-y, -x); }


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

x86 assembly (clang, -O2):
<Affiche6>:
mov    %edi,%eax
neg    %esi
neg    %eax
mov    %esi,%edi
mov    %eax,%esi
jmp    1030 <cng_put_pixel@plt>

LLVM IR (-O0):
define i32 @Affiche6(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %5
%7 = sub nsw i32 0, %6
%8 = load i32, i32* %4
%9 = sub nsw i32 0, %8
%10 = call i32 @cng_put_pixel(i32 %7, i32 %9)
%11 = load i32, i32* %3
ret i32 %11
}

LLVM IR (-O2):
define i32 @Affiche6(i32 %0, i32 %1) {
%3 = sub nsw i32 0, %1
%4 = sub nsw i32 0, %0
%5 = tail call i32 @cng_put_pixel(i32 %3, i32 %4)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ sys_die(char *, char const *);
scalar_t__ unlink(char const *);
extern void sys_remove(const char *path) {
  if (unlink(path) < 0)
    sys_die("sys: cannot remove %s\n", path);
}


x86 assembly (clang, -O0):
<sys_remove>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <unlink@plt>
cmp    $0x0,%rax
jge    114f <sys_remove+0x2f>
mov    -0x8(%rbp),%rsi
lea    0xeb6(%rip),%rdi
call   1040 <sys_die@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys_remove>:
push   %rbx
mov    %rdi,%rbx
call   1030 <unlink@plt>
test   %rax,%rax
js     1130 <sys_remove+0x10>
pop    %rbx
ret
lea    0xec9(%rip),%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1040 <sys_die@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"sys: cannot remove %s\0A\00"
define void @sys_remove(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @unlink(i8* %3)
%5 = icmp slt i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = call i32 @sys_die(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %7)
br label %9
9: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"sys: cannot remove %s\0A\00"
define void @sys_remove(i8* %0) {
%2 = tail call i64 @unlink(i8* %0)
%3 = icmp slt i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @sys_die(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %6
6: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
void afficher_messageS(char *message, int lg) {
  int i;
  for (i = 0; i < lg; i++)
    printf("%c", message[i]);
}


x86 assembly (clang, -O0):
<afficher_messageS>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1158 <afficher_messageS+0x48>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
lea    0xebf(%rip),%rdi
movsbl (%rax,%rcx,1),%esi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <afficher_messageS+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<afficher_messageS>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1146 <afficher_messageS+0x36>
mov    %rdi,%r15
mov    %esi,%r12d
xor    %ebx,%ebx
lea    0xed5(%rip),%r14
nopl   0x0(%rax,%rax,1)
movsbl (%r15,%rbx,1),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <afficher_messageS+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define void @afficher_messageS(i8* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
%10 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
ret void
}