xunge/DecIR huggingface dataset:
char _is_number(const char n) {
  if ((n >= '0') && (n <= '9')) {
    return n;
  }
  return 0;
}


x86 assembly (clang, -O0):
<_is_number>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
cmp    $0x30,%eax
jl     112f <_is_number+0x2f>
movsbl -0x2(%rbp),%eax
cmp    $0x39,%eax
jg     112f <_is_number+0x2f>
mov    -0x2(%rbp),%al
mov    %al,-0x1(%rbp)
jmp    1133 <_is_number+0x33>
movb   $0x0,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_is_number>:
lea    -0x30(%rdi),%ecx
xor    %eax,%eax
cmp    $0xa,%cl
cmovb  %edi,%eax
ret

LLVM IR (-O0):
define signext i8 @_is_number(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 48
br i1 %6, label %7, label %13
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 57
br i1 %10, label %11, label %13
11: ; preds = %7
%12 = load i8, i8* %3
store i8 %12, i8* %2
br label %14
13: ; preds = %7, %1
store i8 0, i8* %2
br label %14
14: ; preds = %13, %11
%15 = load i8, i8* %2
ret i8 %15
}

LLVM IR (-O2):
define signext i8 @_is_number(i8 signext %0) {
%2 = add i8 %0, -48
%3 = icmp ult i8 %2, 10
%4 = select i1 %3, i8 %0, i8 0
ret i8 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  if (4 == 3) {
    printf("4 eh igual a 3");
  } else {
    printf("4 eh diferente de 3");
  }
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [20 x i8] c"4 eh diferente de 3\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"4 eh diferente de 3\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
#pragma xmp task on p0[0] nocomm
  { printf("Skipped\n"); }
}


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

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

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

LLVM IR (-O2):
@str = [8 x i8] c"Skipped\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int fsync(int);
int writeall(int, void const *, long long);
int writesync(int fd, const void *x, long long xlen) {
  if (writeall(fd, x, xlen) == -1)
    return -1;
  return fsync(fd);
}


x86 assembly (clang, -O0):
<writesync>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <writeall@plt>
cmp    $0xffffffff,%eax
jne    1158 <writesync+0x38>
movl   $0xffffffff,-0x4(%rbp)
jmp    1163 <writesync+0x43>
mov    -0x8(%rbp),%edi
call   1040 <fsync@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writesync>:
push   %rbx
mov    %edi,%ebx
call   1030 <writeall@plt>
cmp    $0xffffffff,%eax
je     1135 <writesync+0x15>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <fsync@plt>
mov    $0xffffffff,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @writesync(i32 %0, i8* %1, i64 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i64
store i32 %0, i32* %5
store i8* %1, i8** %6
store i64 %2, i64* %7
%8 = load i32, i32* %5
%9 = load i8*, i8** %6
%10 = load i64, i64* %7
%11 = call i32 @writeall(i32 %8, i8* %9, i64 %10)
%12 = icmp eq i32 %11, -1
br i1 %12, label %13, label %14
13: ; preds = %3
store i32 -1, i32* %4
br label %17
14: ; preds = %3
%15 = load i32, i32* %5
%16 = call i32 @fsync(i32 %15)
store i32 %16, i32* %4
br label %17
17: ; preds = %14, %13
%18 = load i32, i32* %4
ret i32 %18
}

LLVM IR (-O2):
define i32 @writesync(i32 %0, i8* %1, i64 %2) {
%4 = tail call i32 @writeall(i32 %0, i8* %1, i64 %2)
%5 = icmp eq i32 %4, -1
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @fsync(i32 %0)
br label %8
8: ; preds = %3, %6
%9 = phi i32 [ %7, %6 ], [ -1, %3 ]
ret i32 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ readidel(int);
uint32_t ide_read_sec_l(uint16_t addr, void *priv) { return readidel(1); }


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

x86 assembly (clang, -O2):
<ide_read_sec_l>:
mov    $0x1,%edi
jmp    1030 <readidel@plt>

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

LLVM IR (-O2):
define i32 @ide_read_sec_l(i32 %0, i8* nocapture readnone %1) {
%3 = tail call i32 @readidel(i32 1)
ret i32 %3
}
int charToHex(int c) {
  if (c >= '0' && c <= '9') {
    return c - '0';
  }
  if (c >= 'A' && c <= 'F') {
    return c - 'A' + 10;
  }
  if (c >= 'a' && c <= 'f') {
    return c - 'a' + 10;
  }
  return -1;
}


x86 assembly (clang, -O0):
<charToHex>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x30,-0x8(%rbp)
jl     1129 <charToHex+0x29>
cmpl   $0x39,-0x8(%rbp)
jg     1129 <charToHex+0x29>
mov    -0x8(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x4(%rbp)
jmp    117a <charToHex+0x7a>
cmpl   $0x41,-0x8(%rbp)
jl     114e <charToHex+0x4e>
cmpl   $0x46,-0x8(%rbp)
jg     114e <charToHex+0x4e>
mov    -0x8(%rbp),%eax
sub    $0x41,%eax
add    $0xa,%eax
mov    %eax,-0x4(%rbp)
jmp    117a <charToHex+0x7a>
cmpl   $0x61,-0x8(%rbp)
jl     1173 <charToHex+0x73>
cmpl   $0x66,-0x8(%rbp)
jg     1173 <charToHex+0x73>
mov    -0x8(%rbp),%eax
sub    $0x61,%eax
add    $0xa,%eax
mov    %eax,-0x4(%rbp)
jmp    117a <charToHex+0x7a>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<charToHex>:
lea    -0x30(%rdi),%eax
cmp    $0xa,%eax
jb     1127 <charToHex+0x27>
lea    -0x41(%rdi),%eax
cmp    $0x5,%eax
ja     1116 <charToHex+0x16>
add    $0xffffffc9,%edi
mov    %edi,%eax
ret
lea    -0x61(%rdi),%eax
add    $0xffffffa9,%edi
cmp    $0x6,%eax
mov    $0xffffffff,%eax
cmovb  %edi,%eax
ret

LLVM IR (-O0):
define i32 @charToHex(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sge i32 %4, 48
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sle i32 %7, 57
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = load i32, i32* %3
%11 = sub nsw i32 %10, 48
store i32 %11, i32* %2
br label %33
12: ; preds = %6, %1
%13 = load i32, i32* %3
%14 = icmp sge i32 %13, 65
br i1 %14, label %15, label %22
15: ; preds = %12
%16 = load i32, i32* %3
%17 = icmp sle i32 %16, 70
br i1 %17, label %18, label %22
18: ; preds = %15
%19 = load i32, i32* %3
%20 = sub nsw i32 %19, 65
%21 = add nsw i32 %20, 10
store i32 %21, i32* %2
br label %33
22: ; preds = %15, %12
%23 = load i32, i32* %3
%24 = icmp sge i32 %23, 97
br i1 %24, label %25, label %32
25: ; preds = %22
%26 = load i32, i32* %3
%27 = icmp sle i32 %26, 102
br i1 %27, label %28, label %32
28: ; preds = %25
%29 = load i32, i32* %3
%30 = sub nsw i32 %29, 97
%31 = add nsw i32 %30, 10
store i32 %31, i32* %2
br label %33
32: ; preds = %25, %22
store i32 -1, i32* %2
br label %33
33: ; preds = %32, %28, %18, %9
%34 = load i32, i32* %2
ret i32 %34
}

LLVM IR (-O2):
define i32 @charToHex(i32 %0) {
%2 = add i32 %0, -48
%3 = icmp ult i32 %2, 10
br i1 %3, label %14, label %4
4: ; preds = %1
%5 = add i32 %0, -65
%6 = icmp ult i32 %5, 6
br i1 %6, label %7, label %9
7: ; preds = %4
%8 = add nsw i32 %0, -55
br label %14
9: ; preds = %4
%10 = add i32 %0, -97
%11 = icmp ult i32 %10, 6
%12 = add nsw i32 %0, -87
%13 = select i1 %11, i32 %12, i32 -1
br label %14
14: ; preds = %1, %9, %7
%15 = phi i32 [ %8, %7 ], [ %13, %9 ], [ %2, %1 ]
ret i32 %15
}
/* Variables and functions */
double RAND_MAX;
double random();
double drnd() { return (random() + .5) / (RAND_MAX + 1.0); }


x86 assembly (clang, -O0):
<drnd>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <random@plt>
movsd  0xee5(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  0xed1(%rip),%xmm1
mov    0x2eb2(%rip),%rax
addsd  (%rax),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<drnd>:
push   %rax
xor    %eax,%eax
call   1030 <random@plt>
addsd  0xee0(%rip),%xmm0
mov    0x2ec1(%rip),%rax
movsd  (%rax),%xmm1
addsd  0xed5(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@RAND_MAX = global double 0.000000e+00
define double @drnd() {
%1 = call double (...) @random()
%2 = fadd double %1, 5.000000e-01
%3 = load double, double* @RAND_MAX
%4 = fadd double %3, 1.000000e+00
%5 = fdiv double %2, %4
ret double %5
}

LLVM IR (-O2):
@RAND_MAX = global double 0.000000e+00
define double @drnd() {
%1 = tail call double (...) @random()
%2 = fadd double %1, 5.000000e-01
%3 = load double, double* @RAND_MAX
%4 = fadd double %3, 1.000000e+00
%5 = fdiv double %2, %4
ret double %5
}
int __attribute__((target("arch=ivybridge"))) foo(void) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @foo() {
ret i32 1
}
/* Variables and functions */
int EOF;
int getchar();
int /*<<< orphan*/ putchar(int);
void getchar1() {
  int c;
  c = getchar();
  while (c != EOF) {
    putchar(c);
    c = getchar();
  }
}


x86 assembly (clang, -O0):
<getchar1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2eac(%rip),%rcx
cmp    (%rcx),%eax
je     115b <getchar1+0x3b>
mov    -0x4(%rbp),%edi
call   1030 <putchar@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x4(%rbp)
jmp    1132 <getchar1+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getchar1>:
push   %rbx
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2eb9(%rip),%rbx
cmp    (%rbx),%eax
je     1152 <getchar1+0x32>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %eax,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    (%rbx),%eax
jne    1140 <getchar1+0x20>
pop    %rbx
ret

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

LLVM IR (-O2):
@EOF = global i32 0
define void @getchar1() {
%1 = tail call i32 (...) @getchar()
%2 = load i32, i32* @EOF
%3 = icmp eq i32 %1, %2
br i1 %3, label %10, label %4
4: ; preds = %0, %4
%5 = phi i32 [ %7, %4 ], [ %1, %0 ]
%6 = tail call i32 @putchar(i32 %5)
%7 = tail call i32 (...) @getchar()
%8 = load i32, i32* @EOF
%9 = icmp eq i32 %7, %8
br i1 %9, label %10, label %4
10: ; preds = %4, %0
ret void
}
void free_list(char **name_list, int length) {
  for (int i = 0; i < length; i++)
    free(name_list[i]);
  free(name_list);
}


x86 assembly (clang, -O0):
<free_list>:
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    1151 <free_list+0x41>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <free_list+0x16>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_list>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
test   %esi,%esi
jle    1142 <free_list+0x32>
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <free_list+0x20>
mov    %r14,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @free_list(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 = %16, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %19
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
br label %16
16: ; preds = %10
%17 = load i32, i32* %5
%18 = add nsw i32 %17, 1
store i32 %18, i32* %5
br label %6
19: ; preds = %6
%20 = load i8**, i8*** %3
%21 = bitcast i8** %20 to i8*
ret void
}

LLVM IR (-O2):
define void @free_list(i8** nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %8
6: ; preds = %8, %2
%7 = bitcast i8** %0 to i8*
tail call void @free(i8* %7)
ret void
8: ; preds = %4, %8
%9 = phi i64 [ 0, %4 ], [ %12, %8 ]
%10 = getelementptr inbounds i8*, i8** %0, i64 %9
%11 = load i8*, i8** %10
tail call void @free(i8* %11)
%12 = add nuw nsw i64 %9, 1
%13 = icmp eq i64 %12, %5
br i1 %13, label %6, label %8
}
/* Type definitions */
struct stream {
  int dummy;
};

/* Variables and functions */
int decode_atom_format_5_1(unsigned char const *, struct stream *);
int decode_atom_format_5_2(const unsigned char *pkt, struct stream *stream) {
  return decode_atom_format_5_1(pkt, stream);
}


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

x86 assembly (clang, -O2):
<decode_atom_format_5_2>:
jmp    1030 <decode_atom_format_5_1@plt>

LLVM IR (-O0):
%struct.stream = type { i32 }
define i32 @decode_atom_format_5_2(i8* %0, %struct.stream* %1) {
%3 = alloca i8*
%4 = alloca %struct.stream*
store i8* %0, i8** %3
store %struct.stream* %1, %struct.stream** %4
%5 = load i8*, i8** %3
%6 = load %struct.stream*, %struct.stream** %4
%7 = call i32 @decode_atom_format_5_1(i8* %5, %struct.stream* %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.stream = type { i32 }
define i32 @decode_atom_format_5_2(i8* %0, %struct.stream* %1) {
%3 = tail call i32 @decode_atom_format_5_1(i8* %0, %struct.stream* %1)
ret i32 %3
}
/* Type definitions */
typedef int pid_t;

/* Variables and functions */
int /*<<< orphan*/ WNOHANG;
int /*<<< orphan*/ printf(char *, int);
int waitpid(int, int *, int /*<<< orphan*/);
void sig_chld(int signo) {
  pid_t pid;
  int stat;
  while ((pid = waitpid(-1, &stat, WNOHANG)) > 0) {
    printf("child %d terminated\n", pid);
  }
  return;
}


x86 assembly (clang, -O0):
<sig_chld>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eb6(%rip),%rax
mov    (%rax),%edx
mov    $0xffffffff,%edi
lea    -0xc(%rbp),%rsi
call   1040 <waitpid@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jle    1162 <sig_chld+0x42>
mov    -0x8(%rbp),%esi
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
jmp    112b <sig_chld+0xb>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sig_chld>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    0x2eb8(%rip),%r15
mov    (%r15),%edx
lea    0xc(%rsp),%rsi
mov    $0xffffffff,%edi
call   1040 <waitpid@plt>
test   %eax,%eax
jle    117e <sig_chld+0x5e>
lea    0xeb3(%rip),%r14
lea    0xc(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r14,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    (%r15),%edx
mov    $0xffffffff,%edi
mov    %rbx,%rsi
call   1040 <waitpid@plt>
test   %eax,%eax
jg     1160 <sig_chld+0x40>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@WNOHANG = global i32 0
@.str = [21 x i8] c"child %d terminated\0A\00"
define void @sig_chld(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
br label %5
5: ; preds = %9, %1
%6 = load i32, i32* @WNOHANG
%7 = call i32 @waitpid(i32 -1, i32* %4, i32 %6)
store i32 %7, i32* %3
%8 = icmp sgt i32 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %5
%10 = load i32, i32* %3
%11 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %10)
br label %5
12: ; preds = %5
ret void
}

LLVM IR (-O2):
@WNOHANG = global i32 0
@.str = [21 x i8] c"child %d terminated\0A\00"
define void @sig_chld(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = load i32, i32* @WNOHANG
%5 = call i32 @waitpid(i32 -1, i32* %2, i32 %4)
%6 = icmp sgt i32 %5, 0
br i1 %6, label %7, label %13
7: ; preds = %1, %7
%8 = phi i32 [ %11, %7 ], [ %5, %1 ]
%9 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = load i32, i32* @WNOHANG
%11 = call i32 @waitpid(i32 -1, i32* %2, i32 %10)
%12 = icmp sgt i32 %11, 0
br i1 %12, label %7, label %13
13: ; preds = %7, %1
ret void
}
int prefix_underscores_count(const char *str) {
  const char *tail = str;
  while (*tail == '_')
    tail++;
  return tail - str;
}


x86 assembly (clang, -O0):
<prefix_underscores_count>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5f,%eax
jne    1131 <prefix_underscores_count+0x31>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <prefix_underscores_count+0x10>
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<prefix_underscores_count>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpb   $0x5f,(%rdi)
lea    0x1(%rdi),%rdi
je     1110 <prefix_underscores_count+0x10>
ret

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

LLVM IR (-O2):
define i32 @prefix_underscores_count(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %6, %2 ]
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 95
%6 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %5, label %2, label %7
7: ; preds = %2
%8 = ptrtoint i8* %3 to i64
%9 = ptrtoint i8* %0 to i64
%10 = sub i64 %8, %9
%11 = trunc i64 %10 to i32
ret i32 %11
}
void AzthAddPlg() {}


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

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

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

LLVM IR (-O2):
define void @AzthAddPlg() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ iothub_devicemethod_sample_run();
int main(void) {
  iothub_devicemethod_sample_run();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @iothub_devicemethod_sample_run()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *);
void printUsage(char *programName) {
  printf("\n Usage: %s [String: Name of the file] [Integer: 0 < # of times to "
         "retry accessing the file] [Integer: 0 < Sleep Time] \n\n",
         programName);
  exit(1);
}


x86 assembly (clang, -O0):
<printUsage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<printUsage>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [122 x i8] c"\0A Usage: %s [String: Name of the file] [Integer: 0 < # of times to retry accessing the file] [Integer: 0 < Sleep Time] \0A\0A\00"
define void @printUsage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([122 x i8], [122 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [122 x i8] c"\0A Usage: %s [String: Name of the file] [Integer: 0 < # of times to retry accessing the file] [Integer: 0 < Sleep Time] \0A\0A\00"
define void @printUsage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([122 x i8], [122 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
vowel(int i) {
  switch (i) {
  case 'a':
  case 'A':
  case 'e':
  case 'E':
  case 'i':
  case 'I':
  case 'o':
  case 'O':
  case 'u':
  case 'U':
  case 'y':
  case 'Y':
    return (1);
  default:
    return (0);
  }
}


x86 assembly (clang, -O0):
<vowel>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x41,%eax
je     11d6 <vowel+0xd6>
jmp    111b <vowel+0x1b>
mov    -0xc(%rbp),%eax
sub    $0x45,%eax
je     11d6 <vowel+0xd6>
jmp    112c <vowel+0x2c>
mov    -0xc(%rbp),%eax
sub    $0x49,%eax
je     11d6 <vowel+0xd6>
jmp    113d <vowel+0x3d>
mov    -0xc(%rbp),%eax
sub    $0x4f,%eax
je     11d6 <vowel+0xd6>
jmp    114e <vowel+0x4e>
mov    -0xc(%rbp),%eax
sub    $0x55,%eax
je     11d6 <vowel+0xd6>
jmp    115f <vowel+0x5f>
mov    -0xc(%rbp),%eax
sub    $0x59,%eax
je     11d6 <vowel+0xd6>
jmp    1170 <vowel+0x70>
mov    -0xc(%rbp),%eax
sub    $0x61,%eax
je     11d6 <vowel+0xd6>
jmp    1181 <vowel+0x81>
mov    -0xc(%rbp),%eax
sub    $0x65,%eax
je     11d6 <vowel+0xd6>
jmp    1192 <vowel+0x92>
mov    -0xc(%rbp),%eax
sub    $0x69,%eax
je     11d6 <vowel+0xd6>
jmp    11a3 <vowel+0xa3>
mov    -0xc(%rbp),%eax
sub    $0x6f,%eax
je     11d6 <vowel+0xd6>
jmp    11b4 <vowel+0xb4>
mov    -0xc(%rbp),%eax
sub    $0x75,%eax
je     11d6 <vowel+0xd6>
jmp    11c5 <vowel+0xc5>
mov    -0xc(%rbp),%eax
sub    $0x79,%eax
jne    11e2 <vowel+0xe2>
jmp    11d6 <vowel+0xd6>
movl   $0x1,-0x4(%rbp)
jmp    11e9 <vowel+0xe9>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<vowel>:
add    $0xffffffbf,%edi
ror    %edi
xor    %eax,%eax
cmp    $0x1c,%edi
ja     1119 <vowel+0x19>
movslq %edi,%rax
lea    0xeea(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @vowel(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %6 [
i32 97, label %5
i32 65, label %5
i32 101, label %5
i32 69, label %5
i32 105, label %5
i32 73, label %5
i32 111, label %5
i32 79, label %5
i32 117, label %5
i32 85, label %5
i32 121, label %5
i32 89, label %5
]
5: ; preds = %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1
store i32 1, i32* %2
br label %7
6: ; preds = %1
store i32 0, i32* %2
br label %7
7: ; preds = %6, %5
%8 = load i32, i32* %2
ret i32 %8
}

LLVM IR (-O2):
@switch.table.vowel = [29 x i32] [i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1]
define i32 @vowel(i32 %0) {
%2 = add i32 %0, -65
%3 = tail call i32 @llvm.fshl.i32(i32 %2, i32 %2, i32 31)
%4 = icmp ult i32 %3, 29
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = sext i32 %3 to i64
%7 = getelementptr inbounds [29 x i32], [29 x i32]* @switch.table.vowel, i64 0, i64 %6
%8 = load i32, i32* %7
br label %9
9: ; preds = %1, %5
%10 = phi i32 [ %8, %5 ], [ 0, %1 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ iscntrl(int);
void t_iscntrl_0x45() {
  Assert_real((iscntrl(69) == 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_iscntrl.c",
              350, ("iscntrl should be 0 for E"));
}


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

x86 assembly (clang, -O2):
<t_iscntrl_0x45>:
push   %rax
mov    $0x45,%edi
call   1030 <iscntrl@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x15e,%edx
pop    %rax
jmp    1040 <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_iscntrl.c\00"
@.str.1 = [26 x i8] c"iscntrl should be 0 for E\00"
define void @t_iscntrl_0x45() {
%1 = call i64 @iscntrl(i32 69)
%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 350, i8* getelementptr inbounds ([26 x i8], [26 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_iscntrl.c\00"
@.str.1 = [26 x i8] c"iscntrl should be 0 for E\00"
define void @t_iscntrl_0x45() {
%1 = tail call i64 @iscntrl(i32 69)
%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 350, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
long double hex(qx)
long double qx;
{
  long double f;
  long z;
  long double floorl();
  f = floorl(qx);
  z = f;
  printf("0%lo  0x%lx  %ld.\n", z, z, z);
  return (qx);
}


x86 assembly (clang, -O0):
<hex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1040 <floorl@plt>
fstpt  -0x20(%rbp)
fldt   -0x20(%rbp)
fnstcw -0x32(%rbp)
movzwl -0x32(%rbp),%eax
or     $0xc00,%eax
mov    %ax,-0x34(%rbp)
fldcw  -0x34(%rbp)
fistpll -0x30(%rbp)
fldcw  -0x32(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rcx
lea    0xe93(%rip),%rdi
xor    %eax,%eax
mov    %rcx,%rsi
mov    %rcx,%rdx
call   1030 <printf@plt>
fldt   -0x10(%rbp)
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hex>:
sub    $0x38,%rsp
fldt   0x40(%rsp)
fld    %st(0)
fstpt  0x2c(%rsp)
fstpt  (%rsp)
call   1040 <floorl@plt>
fnstcw 0x1c(%rsp)
movzwl 0x1c(%rsp),%eax
or     $0xc00,%eax
mov    %ax,0x1e(%rsp)
fldcw  0x1e(%rsp)
fistpll 0x20(%rsp)
fldcw  0x1c(%rsp)
mov    0x20(%rsp),%rcx
lea    0xe9f(%rip),%rdi
mov    %rcx,%rsi
mov    %rcx,%rdx
xor    %eax,%eax
call   1030 <printf@plt>
fldt   0x2c(%rsp)
add    $0x38,%rsp
ret

LLVM IR (-O0):
@.str = [19 x i8] c"0%lo 0x%lx %ld.\0A\00"
define x86_fp80 @hex(x86_fp80 %0) {
%2 = alloca x86_fp80
%3 = alloca x86_fp80
%4 = alloca i64
store x86_fp80 %0, x86_fp80* %2
%5 = load x86_fp80, x86_fp80* %2
%6 = call x86_fp80 @llvm.floor.f80(x86_fp80 %5)
store x86_fp80 %6, x86_fp80* %3
%7 = load x86_fp80, x86_fp80* %3
%8 = fptosi x86_fp80 %7 to i64
store i64 %8, i64* %4
%9 = load i64, i64* %4
%10 = load i64, i64* %4
%11 = load i64, i64* %4
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i64 %9, i64 %10, i64 %11)
%13 = load x86_fp80, x86_fp80* %2
ret x86_fp80 %13
}

LLVM IR (-O2):
@.str = [19 x i8] c"0%lo 0x%lx %ld.\0A\00"
define x86_fp80 @hex(x86_fp80 returned %0) {
%2 = tail call x86_fp80 @llvm.floor.f80(x86_fp80 %0)
%3 = fptosi x86_fp80 %2 to i64
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i64 %3, i64 %3, i64 %3)
ret x86_fp80 %0
}
/* Variables and functions */
int /*<<< orphan*/ neo430_uart_putc(char);
void neo430_uart_print(char *s) {
  char c = 0;
  while ((c = *s++)) {
    neo430_uart_putc(c);
  }
}


x86 assembly (clang, -O0):
<neo430_uart_print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movb   $0x0,-0x9(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%al
mov    %al,-0x9(%rbp)
cmp    $0x0,%al
je     114a <neo430_uart_print+0x3a>
movsbl -0x9(%rbp),%edi
call   1030 <neo430_uart_putc@plt>
jmp    1120 <neo430_uart_print+0x10>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<neo430_uart_print>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <neo430_uart_print+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <neo430_uart_putc@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <neo430_uart_print+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @neo430_uart_print(i8* %0) {
%2 = alloca i8*
%3 = alloca i8
store i8* %0, i8** %2
store i8 0, i8* %3
br label %4
4: ; preds = %9, %1
%5 = load i8*, i8** %2
%6 = getelementptr inbounds i8, i8* %5, i32 1
store i8* %6, i8** %2
%7 = load i8, i8* %5
store i8 %7, i8* %3
%8 = icmp ne i8 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %4
%10 = load i8, i8* %3
%11 = call i32 @neo430_uart_putc(i8 signext %10)
br label %4
12: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @neo430_uart_print(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %9, %4 ], [ %2, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = tail call i32 @neo430_uart_putc(i8 signext %5)
%9 = load i8, i8* %7
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t eit_next_table_id(uint8_t table_id) {
  if (table_id == 0)
    return 0x4E;
  if (table_id == 0x4E)
    return 0x50;
  if (table_id == 0x5F)
    return 0x4E;
  return table_id + 1;
}


x86 assembly (clang, -O0):
<eit_next_table_id>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    111d <eit_next_table_id+0x1d>
movl   $0x4e,-0x4(%rbp)
jmp    1152 <eit_next_table_id+0x52>
cmpl   $0x4e,-0x8(%rbp)
jne    1133 <eit_next_table_id+0x33>
movl   $0x50,-0x4(%rbp)
jmp    1152 <eit_next_table_id+0x52>
cmpl   $0x5f,-0x8(%rbp)
jne    1149 <eit_next_table_id+0x49>
movl   $0x4e,-0x4(%rbp)
jmp    1152 <eit_next_table_id+0x52>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<eit_next_table_id>:
mov    $0x4e,%eax
test   %edi,%edi
je     111e <eit_next_table_id+0x1e>
cmp    $0x5f,%edi
je     111e <eit_next_table_id+0x1e>
cmp    $0x4e,%edi
jne    1119 <eit_next_table_id+0x19>
mov    $0x50,%eax
ret
add    $0x1,%edi
mov    %edi,%eax
ret

LLVM IR (-O0):
define i32 @eit_next_table_id(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 78, i32* %2
br label %18
7: ; preds = %1
%8 = load i32, i32* %3
%9 = icmp eq i32 %8, 78
br i1 %9, label %10, label %11
10: ; preds = %7
store i32 80, i32* %2
br label %18
11: ; preds = %7
%12 = load i32, i32* %3
%13 = icmp eq i32 %12, 95
br i1 %13, label %14, label %15
14: ; preds = %11
store i32 78, i32* %2
br label %18
15: ; preds = %11
%16 = load i32, i32* %3
%17 = add nsw i32 %16, 1
store i32 %17, i32* %2
br label %18
18: ; preds = %15, %14, %10, %6
%19 = load i32, i32* %2
ret i32 %19
}

LLVM IR (-O2):
define i32 @eit_next_table_id(i32 %0) {
switch i32 %0, label %3 [
i32 0, label %5
i32 78, label %2
i32 95, label %5
]
2: ; preds = %1
br label %5
3: ; preds = %1
%4 = add nsw i32 %0, 1
br label %5
5: ; preds = %1, %1, %3, %2
%6 = phi i32 [ 80, %2 ], [ %4, %3 ], [ 78, %1 ], [ 78, %1 ]
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
int _halt_usage(void) {
  fputs("Usage: "
        "halt"
        "\n",
        stderr);
  return 1;
}


x86 assembly (clang, -O0):
<_halt_usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%esi
lea    0xedc(%rip),%rdi
call   1030 <fputs@plt>
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_halt_usage>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%esi
lea    0xedf(%rip),%rdi
call   1030 <fputs@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"Usage: halt\0A\00"
@stderr = global i32 0
define i32 @_halt_usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fputs(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 1
}

LLVM IR (-O2):
@.str = [13 x i8] c"Usage: halt\0A\00"
@stderr = global i32 0
define i32 @_halt_usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 1
}
unsigned int fnet_get_lowdata(unsigned int data) { return data & 0xFFFF; }


x86 assembly (clang, -O0):
<fnet_get_lowdata>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fnet_get_lowdata>:
movzwl %di,%eax
ret

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

LLVM IR (-O2):
define i32 @fnet_get_lowdata(i32 %0) {
%2 = and i32 %0, 65535
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int);
void sigbus_handler(int sig) {
  printf("SIGBUS(%d) recieved.\n", sig);
  exit(0);
}


x86 assembly (clang, -O0):
<sigbus_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<sigbus_handler>:
push   %rax
mov    %edi,%esi
lea    0xed6(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
@.str = [22 x i8] c"SIGBUS(%d) recieved.\0A\00"
define void @sigbus_handler(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ hash(int);
void test() {
  int c1, c2;
  int i, j;
  for (c1 = 3; c1 <= 100; c1 += 3) {
    if (c1 == 27) {
      {
        hash(1);
        hash(27);
      };
    }
    {
      hash(2);
      hash(c1);
      hash(c1 / 3);
    };
  }
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x3,-0x4(%rbp)
cmpl   $0x64,-0x4(%rbp)
jg     1179 <test+0x69>
cmpl   $0x1b,-0x4(%rbp)
jne    1147 <test+0x37>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    $0x1b,%edi
call   1030 <hash@plt>
mov    $0x2,%edi
call   1030 <hash@plt>
mov    -0x4(%rbp),%edi
call   1030 <hash@plt>
mov    -0x4(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1030 <hash@plt>
mov    -0x4(%rbp),%eax
add    $0x3,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <test+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rbp
push   %rbx
push   %rax
xor    %ebp,%ebp
mov    $0x1,%ebx
jmp    1140 <test+0x30>
nopl   0x0(%rax)
mov    $0x2,%edi
call   1030 <hash@plt>
mov    %ebp,%edi
call   1030 <hash@plt>
mov    %ebx,%edi
call   1030 <hash@plt>
add    $0x1,%ebx
cmp    $0x62,%ebp
jae    1160 <test+0x50>
mov    %ebp,%eax
lea    0x3(%rax),%ebp
cmp    $0x18,%eax
jne    1120 <test+0x10>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    $0x1b,%edi
call   1030 <hash@plt>
jmp    1120 <test+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define void @test() {
br label %1
1: ; preds = %0, %7
%2 = phi i32 [ 3, %0 ], [ %14, %7 ]
%3 = icmp eq i32 %2, 27
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 @hash(i32 1)
%6 = tail call i32 @hash(i32 27)
br label %7
7: ; preds = %4, %1
%8 = tail call i32 @hash(i32 2)
%9 = tail call i32 @hash(i32 %2)
%10 = trunc i32 %2 to i8
%11 = udiv i8 %10, 3
%12 = zext i8 %11 to i32
%13 = tail call i32 @hash(i32 %12)
%14 = add nuw nsw i32 %2, 3
%15 = icmp ult i32 %2, 98
br i1 %15, label %1, label %16
16: ; preds = %7
ret void
}
/* Variables and functions */
size_t size_min(size_t a, size_t b) { return (a < b) ? a : b; }


x86 assembly (clang, -O0):
<size_min>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1127 <size_min+0x27>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    112f <size_min+0x2f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<size_min>:
mov    %rsi,%rax
cmp    %rsi,%rdi
cmovb  %rdi,%rax
ret

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

LLVM IR (-O2):
define i64 @size_min(i64 %0, i64 %1) {
%3 = icmp ult i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
unsigned char _mm_aesenc128kl_u8(int /*<<< orphan*/ *, int /*<<< orphan*/,
                                 void const *);
unsigned char test_mm_aesenc128kl_u8(__m128i *odata, __m128i idata,
                                     const void *h) {
  return _mm_aesenc128kl_u8(odata, idata, h);
}


x86 assembly (clang, -O0):
<test_mm_aesenc128kl_u8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
call   1030 <_mm_aesenc128kl_u8@plt>
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_mm_aesenc128kl_u8>:
jmp    1030 <_mm_aesenc128kl_u8@plt>

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

LLVM IR (-O2):
define zeroext i8 @test_mm_aesenc128kl_u8(i32* %0, i32 %1, i8* %2) {
%4 = tail call zeroext i8 @_mm_aesenc128kl_u8(i32* %0, i32 %1, i8* %2)
ret i8 %4
}
/* Variables and functions */
int /*<<< orphan*/ hex_chunk(char *, int /*<<< orphan*/);
scalar_t__ strcmp(char *, char *);
char *hex_chunk_01a() {
  char chunk[4 + 1];
  hex_chunk(chunk, 0);
  do {
    if (!(strcmp(chunk, "0000") == 0))
      return "return '0000' for integer 0'";
  } while (0);
  return 0;
}


x86 assembly (clang, -O0):
<hex_chunk_01a>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0xd(%rbp),%rdi
xor    %esi,%esi
call   1030 <hex_chunk@plt>
lea    -0xd(%rbp),%rdi
lea    0xec2(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
je     115d <hex_chunk_01a+0x3d>
lea    0xeb1(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    116a <hex_chunk_01a+0x4a>
jmp    1162 <hex_chunk_01a+0x42>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hex_chunk_01a>:
push   %rbx
sub    $0x10,%rsp
lea    0xb(%rsp),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <hex_chunk@plt>
lea    0xec5(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %rax,%rax
lea    0xeb8(%rip),%rcx
cmovne %rcx,%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"0000\00"
@.str.1 = [29 x i8] c"return '0000' for integer 0'\00"
define i8* @hex_chunk_01a() {
%1 = alloca i8*
%2 = alloca [5 x i8]
%3 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 0
%4 = call i32 @hex_chunk(i8* %3, i32 0)
br label %5
5: ; preds = %0
%6 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 0
%7 = call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%8 = icmp eq i64 %7, 0
br i1 %8, label %10, label %9
9: ; preds = %5
store i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8** %1
br label %12
10: ; preds = %5
br label %11
11: ; preds = %10
store i8* null, i8** %1
br label %12
12: ; preds = %11, %9
%13 = load i8*, i8** %1
ret i8* %13
}

LLVM IR (-O2):
@.str = [5 x i8] c"0000\00"
@.str.1 = [29 x i8] c"return '0000' for integer 0'\00"
define i8* @hex_chunk_01a() {
%1 = alloca [5 x i8]
%2 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 0
%3 = call i32 @hex_chunk(i8* %2, i32 0)
%4 = call i64 @strcmp(i8* %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i64 %4, 0
%6 = select i1 %5, i8* null, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0)
ret i8* %6
}
char *hash_plugin_summary(void) {
  return ("pdf \t\tPDF documents password plugin");
}


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

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

LLVM IR (-O0):
@.str = [36 x i8] c"pdf \09\09PDF documents password plugin\00"
define i8* @hash_plugin_summary() {
ret i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [36 x i8] c"pdf \09\09PDF documents password plugin\00"
define i8* @hash_plugin_summary() {
ret i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ fgets(char *, size_t, int /*<<< orphan*/);
int /*<<< orphan*/ message(char *, char *);
int /*<<< orphan*/ stdin;
size_t strcspn(char *, char *);
void message_read_line(char *string, size_t length) {
  message("0P", "");
  fgets(string, length, stdin);
  string[strcspn(string, "\r\n")] = '\0';
}


x86 assembly (clang, -O0):
<message_read_line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeb9(%rip),%rdi
lea    0xeb7(%rip),%rsi
call   1030 <message@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    0x2e86(%rip),%rax
mov    (%rax),%edx
call   1050 <fgets@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe87(%rip),%rsi
call   1040 <strcspn@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
movb   $0x0,(%rax,%rcx,1)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<message_read_line>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xebf(%rip),%rdi
lea    0xebd(%rip),%rsi
call   1030 <message@plt>
mov    0x2e94(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1050 <fgets@plt>
lea    0xe9b(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcspn@plt>
movb   $0x0,(%rbx,%rax,1)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"0P\00"
@.str.1 = [1 x i8] zeroinitializer
@stdin = global i32 0
@.str.2 = [3 x i8] c"\0D\0A\00"
define void @message_read_line(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = call i32 @message(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = load i32, i32* @stdin
%9 = call i32 @fgets(i8* %6, i64 %7, i32 %8)
%10 = load i8*, i8** %3
%11 = load i8*, i8** %3
%12 = call i64 @strcspn(i8* %11, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%13 = getelementptr inbounds i8, i8* %10, i64 %12
store i8 0, i8* %13
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"0P\00"
@.str.1 = [1 x i8] zeroinitializer
@stdin = global i32 0
@.str.2 = [3 x i8] c"\0D\0A\00"
define void @message_read_line(i8* %0, i64 %1) {
%3 = tail call i32 @message(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%4 = load i32, i32* @stdin
%5 = tail call i32 @fgets(i8* %0, i64 %1, i32 %4)
%6 = tail call i64 @strcspn(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%7 = getelementptr inbounds i8, i8* %0, i64 %6
store i8 0, i8* %7
ret void
}
int libntfs_version() { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @libntfs_version() {
ret i32 1
}
void RTFileSetTimes(void) {}


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

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

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

LLVM IR (-O2):
define void @RTFileSetTimes() {
ret void
}
unsigned long long hashtwo64(unsigned long long a, unsigned long long b) {
  return 123369937ull * a + 4443739543 * b + 346961;
}


x86 assembly (clang, -O0):
<hashtwo64>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
imul   $0x75a79d1,-0x8(%rbp),%rax
07
movabs $0x108de1597,%rcx
imul   -0x10(%rbp),%rcx
add    %rcx,%rax
add    $0x54b51,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hashtwo64>:
imul   $0x75a79d1,%rdi,%rax
movabs $0x108de1597,%rcx
imul   %rsi,%rcx
add    %rcx,%rax
add    $0x54b51,%rax
ret

LLVM IR (-O0):
define i64 @hashtwo64(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = mul i64 123369937, %5
%7 = load i64, i64* %4
%8 = mul i64 4443739543, %7
%9 = add i64 %6, %8
%10 = add i64 %9, 346961
ret i64 %10
}

LLVM IR (-O2):
define i64 @hashtwo64(i64 %0, i64 %1) {
%3 = mul i64 %0, 123369937
%4 = mul i64 %1, 4443739543
%5 = add i64 %3, 346961
%6 = add i64 %5, %4
ret i64 %6
}