xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char const *);
void error(const char *msg, int x) {
  perror(msg);
  exit(x);
}


x86 assembly (clang, -O0):
<error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <perror@plt>
mov    -0xc(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<error>:
push   %rbx
mov    %esi,%ebx
call   1030 <perror@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @error(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = call i32 @perror(i8* %5)
%7 = load i32, i32* %4
%8 = call i32 @exit(i32 %7)
unreachable
}

LLVM IR (-O2):
define void @error(i8* nocapture %0, i32 %1) {
%3 = tail call i32 @perror(i8* %0)
%4 = tail call i32 @exit(i32 %1)
unreachable
}
/* Variables and functions */
scalar_t__ trunc(float);
float truncf(float x) { return (float)trunc(x); }


x86 assembly (clang, -O0):
<truncf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <trunc@plt>
cvtsi2ss %rax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<truncf>:
push   %rax
call   1030 <trunc@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @truncf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call i64 @trunc(float %3)
%5 = sitofp i64 %4 to float
ret float %5
}

LLVM IR (-O2):
define float @truncf(float %0) {
%2 = tail call i64 @trunc(float %0)
%3 = sitofp i64 %2 to float
ret float %3
}
/* Variables and functions */
int inmain();
int main(void) { return inmain(); }


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @inmain()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ fputc(char, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void padding(size_t len, size_t width) {
  for (; len <= width; len++)
    fputc(' ', stdout);
}


x86 assembly (clang, -O0):
<padding>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
ja     1152 <padding+0x42>
mov    0x2eab(%rip),%rax
mov    (%rax),%esi
mov    $0x20,%edi
call   1030 <fputc@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1120 <padding+0x10>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<padding>:
push   %r15
push   %r14
push   %rbx
cmp    %rsi,%rdi
ja     1146 <padding+0x36>
mov    %rsi,%r14
mov    %rdi,%rbx
mov    0x2eb9(%rip),%r15
nopw   0x0(%rax,%rax,1)
mov    (%r15),%esi
mov    $0x20,%edi
call   1030 <fputc@plt>
add    $0x1,%rbx
cmp    %r14,%rbx
jbe    1130 <padding+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@stdout = global i32 0
define void @padding(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
br label %5
5: ; preds = %12, %2
%6 = load i64, i64* %3
%7 = load i64, i64* %4
%8 = icmp ule i64 %6, %7
br i1 %8, label %9, label %15
9: ; preds = %5
%10 = load i32, i32* @stdout
%11 = call i32 @fputc(i8 signext 32, i32 %10)
br label %12
12: ; preds = %9
%13 = load i64, i64* %3
%14 = add i64 %13, 1
store i64 %14, i64* %3
br label %5
15: ; preds = %5
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
define void @padding(i64 %0, i64 %1) {
%3 = icmp ugt i64 %0, %1
br i1 %3, label %10, label %4
4: ; preds = %2, %4
%5 = phi i64 [ %8, %4 ], [ %0, %2 ]
%6 = load i32, i32* @stdout
%7 = tail call i32 @fputc(i8 signext 32, i32 %6)
%8 = add i64 %5, 1
%9 = icmp ugt i64 %8, %1
br i1 %9, label %10, label %4
10: ; preds = %4, %2
ret void
}
int gfx_set_tv_defaults(int format) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @gfx_set_tv_defaults(i32 %0) {
ret i32 0
}
void VMMGetCpu(void) {}


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

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

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

LLVM IR (-O2):
define void @VMMGetCpu() {
ret void
}
void gtk_dialog_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gtk_dialog_get_type() {
ret void
}
/* Variables and functions */
short get_expression(char *, int);
unsigned short get_address(char *str) {
  short v;
  unsigned short a;
  v = get_expression(str, 1);
  a = (unsigned short)v;
  a = a & 0xffff;
  return a;
}


x86 assembly (clang, -O0):
<get_address>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
call   1030 <get_expression@plt>
mov    %ax,-0xa(%rbp)
mov    -0xa(%rbp),%ax
mov    %ax,-0xc(%rbp)
movzwl -0xc(%rbp),%eax
and    $0xffff,%eax
mov    %ax,-0xc(%rbp)
movzwl -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_address>:
push   %rax
mov    $0x1,%esi
call   1030 <get_expression@plt>
pop    %rcx
ret

LLVM IR (-O0):
define zeroext i16 @get_address(i8* %0) {
%2 = alloca i8*
%3 = alloca i16
%4 = alloca i16
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call signext i16 @get_expression(i8* %5, i32 1)
store i16 %6, i16* %3
%7 = load i16, i16* %3
store i16 %7, i16* %4
%8 = load i16, i16* %4
%9 = zext i16 %8 to i32
%10 = and i32 %9, 65535
%11 = trunc i32 %10 to i16
store i16 %11, i16* %4
%12 = load i16, i16* %4
ret i16 %12
}

LLVM IR (-O2):
define zeroext i16 @get_address(i8* %0) {
%2 = tail call signext i16 @get_expression(i8* %0, i32 1)
ret i16 %2
}
/* Variables and functions */
int /*<<< orphan*/ PredicateParse_errorDetected(char const *);
void Soliderror(const char *s) { PredicateParse_errorDetected(s); }


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

x86 assembly (clang, -O2):
<Soliderror>:
jmp    1030 <PredicateParse_errorDetected@plt>

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

LLVM IR (-O2):
define void @Soliderror(i8* %0) {
%2 = tail call i32 @PredicateParse_errorDetected(i8* %0)
ret void
}
/* Variables and functions */
int sign_extend(unsigned int, int);
int extract_22(unsigned word) {
  return sign_extend(
      ((word) >> (31 - (28)) & ((1 << ((28) - (19) + 1)) - 1)) |
          ((word) >> (31 - (29)) & ((1 << ((29) - (29) + 1)) - 1)) << 10 |
          ((word) >> (31 - (15)) & ((1 << ((15) - (11) + 1)) - 1)) << 11 |
          ((word) >> (31 - (10)) & ((1 << ((10) - (6) + 1)) - 1)) << 16 |
          (word & 0x1) << 21,
      22);
}


x86 assembly (clang, -O0):
<extract_22>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
shr    $0x3,%edi
and    $0x3ff,%edi
mov    -0x4(%rbp),%eax
shr    $0x2,%eax
and    $0x1,%eax
shl    $0xa,%eax
or     %eax,%edi
mov    -0x4(%rbp),%eax
shr    $0x10,%eax
and    $0x1f,%eax
shl    $0xb,%eax
or     %eax,%edi
mov    -0x4(%rbp),%eax
shr    $0x15,%eax
and    $0x1f,%eax
shl    $0x10,%eax
or     %eax,%edi
mov    -0x4(%rbp),%eax
and    $0x1,%eax
shl    $0x15,%eax
or     %eax,%edi
mov    $0x16,%esi
call   1030 <sign_extend@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<extract_22>:
mov    %edi,%eax
shr    $0x3,%eax
and    $0x3ff,%eax
mov    %edi,%ecx
and    $0x4,%ecx
shl    $0x8,%ecx
or     %eax,%ecx
mov    %edi,%eax
shr    $0x5,%eax
mov    %eax,%edx
and    $0xf800,%edx
or     %ecx,%edx
and    $0x1f0000,%eax
or     %edx,%eax
and    $0x1,%edi
shl    $0x15,%edi
or     %eax,%edi
mov    $0x16,%esi
jmp    1030 <sign_extend@plt>

LLVM IR (-O0):
define i32 @extract_22(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = lshr i32 %3, 3
%5 = and i32 %4, 1023
%6 = load i32, i32* %2
%7 = lshr i32 %6, 2
%8 = and i32 %7, 1
%9 = shl i32 %8, 10
%10 = or i32 %5, %9
%11 = load i32, i32* %2
%12 = lshr i32 %11, 16
%13 = and i32 %12, 31
%14 = shl i32 %13, 11
%15 = or i32 %10, %14
%16 = load i32, i32* %2
%17 = lshr i32 %16, 21
%18 = and i32 %17, 31
%19 = shl i32 %18, 16
%20 = or i32 %15, %19
%21 = load i32, i32* %2
%22 = and i32 %21, 1
%23 = shl i32 %22, 21
%24 = or i32 %20, %23
%25 = call i32 @sign_extend(i32 %24, i32 22)
ret i32 %25
}

LLVM IR (-O2):
define i32 @extract_22(i32 %0) {
%2 = lshr i32 %0, 3
%3 = and i32 %2, 1023
%4 = shl i32 %0, 8
%5 = and i32 %4, 1024
%6 = or i32 %3, %5
%7 = lshr i32 %0, 5
%8 = and i32 %7, 63488
%9 = or i32 %6, %8
%10 = and i32 %7, 2031616
%11 = or i32 %9, %10
%12 = shl i32 %0, 21
%13 = and i32 %12, 2097152
%14 = or i32 %11, %13
%15 = tail call i32 @sign_extend(i32 %14, i32 22)
ret i32 %15
}
/* Variables and functions */
scalar_t__ parse_S(char **);
int parse_misc(char **xml) {
  if (parse_S(xml))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<parse_misc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <parse_S@plt>
cmp    $0x0,%rax
je     113b <parse_misc+0x2b>
movl   $0x1,-0x4(%rbp)
jmp    1142 <parse_misc+0x32>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @parse_misc(i8** %0) {
%2 = alloca i32
%3 = alloca i8**
store i8** %0, i8*** %3
%4 = load i8**, i8*** %3
%5 = call i64 @parse_S(i8** %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 1, i32* %2
br label %9
8: ; preds = %1
store i32 0, i32* %2
br label %9
9: ; preds = %8, %7
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
define i32 @parse_misc(i8** %0) {
%2 = tail call i64 @parse_S(i8** %0)
%3 = icmp ne i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ link_error();
void f4(unsigned int a, unsigned int b) {
  if ((b & 3) / ((a & 0xff) + 1) == 5)
    link_error();
}


x86 assembly (clang, -O0):
<f4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0x3,%eax
mov    -0x4(%rbp),%ecx
and    $0xff,%ecx
add    $0x1,%ecx
xor    %edx,%edx
div    %ecx
cmp    $0x5,%eax
jne    1144 <f4+0x34>
mov    $0x0,%al
call   1030 <link_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @f4(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, 3
%7 = load i32, i32* %3
%8 = and i32 %7, 255
%9 = add i32 %8, 1
%10 = udiv i32 %6, %9
%11 = icmp eq i32 %10, 5
br i1 %11, label %12, label %14
12: ; preds = %2
%13 = call i32 (...) @link_error()
br label %14
14: ; preds = %12, %2
ret void
}

LLVM IR (-O2):
define void @f4(i32 %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ file_unique_name(char *, char *);
char *mime_to_extension(char const *);
int /*<<< orphan*/ sprintf(char *, char *, char const *, char const *);
void name_from_pattern(char const basename[], char const mime_type[],
                       char name[]) {
  char const *extension = mime_to_extension(mime_type);
  char pattern[256];
  sprintf(pattern, "%s-%%04d.%s", basename, extension);
  file_unique_name(name, pattern);
}


x86 assembly (clang, -O0):
<name_from_pattern>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <mime_to_extension@plt>
mov    %rax,-0x20(%rbp)
lea    -0x120(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    -0x20(%rbp),%rcx
lea    0xe96(%rip),%rsi
call   1050 <sprintf@plt>
mov    -0x18(%rbp),%rdi
lea    -0x120(%rbp),%rsi
call   1030 <file_unique_name@plt>
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<name_from_pattern>:
push   %r15
push   %r14
push   %rbx
sub    $0x100,%rsp
mov    %rdx,%r14
mov    %rdi,%rbx
mov    %rsi,%rdi
call   1040 <mime_to_extension@plt>
lea    0xeaf(%rip),%rsi
mov    %rsp,%r15
mov    %r15,%rdi
mov    %rbx,%rdx
mov    %rax,%rcx
call   1050 <sprintf@plt>
mov    %r14,%rdi
mov    %r15,%rsi
call   1030 <file_unique_name@plt>
add    $0x100,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [12 x i8] c"%s-%%04d.%s\00"
define void @name_from_pattern(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca [256 x i8]
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%9 = load i8*, i8** %5
%10 = call i8* @mime_to_extension(i8* %9)
store i8* %10, i8** %7
%11 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
%12 = load i8*, i8** %4
%13 = load i8*, i8** %7
%14 = call i32 @sprintf(i8* %11, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %12, i8* %13)
%15 = load i8*, i8** %6
%16 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
%17 = call i32 @file_unique_name(i8* %15, i8* %16)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"%s-%%04d.%s\00"
define void @name_from_pattern(i8* %0, i8* %1, i8* %2) {
%4 = alloca [256 x i8]
%5 = tail call i8* @mime_to_extension(i8* %1)
%6 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 0
%7 = call i32 @sprintf(i8* %6, i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %5)
%8 = call i32 @file_unique_name(i8* %2, i8* %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int inet_pton(int, void const *, void *);
int /*<<< orphan*/ perror(char *);
int std_inet_pton(int af, const void *src, void *dst) {
  int ret;
  if ((ret = inet_pton(af, src, dst)) <= 0) {
    perror("inet_pton");
    exit(1);
  }
  return ret;
}


x86 assembly (clang, -O0):
<std_inet_pton>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <inet_pton@plt>
mov    %eax,-0x1c(%rbp)
cmp    $0x0,%eax
jg     1175 <std_inet_pton+0x45>
lea    0xe9a(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<std_inet_pton>:
push   %rax
call   1030 <inet_pton@plt>
test   %eax,%eax
jle    113c <std_inet_pton+0xc>
pop    %rcx
ret
lea    0xebd(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"inet_pton\00"
define i32 @std_inet_pton(i32 %0, i8* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%8 = load i32, i32* %4
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = call i32 @inet_pton(i32 %8, i8* %9, i8* %10)
store i32 %11, i32* %7
%12 = icmp sle i32 %11, 0
br i1 %12, label %13, label %16
13: ; preds = %3
%14 = call i32 @perror(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%15 = call i32 @exit(i32 1)
unreachable
16: ; preds = %3
%17 = load i32, i32* %7
ret i32 %17
}

LLVM IR (-O2):
@.str = [10 x i8] c"inet_pton\00"
define i32 @std_inet_pton(i32 %0, i8* %1, i8* %2) {
%4 = tail call i32 @inet_pton(i32 %0, i8* %1, i8* %2)
%5 = icmp slt i32 %4, 1
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = tail call i32 @perror(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 @exit(i32 1)
unreachable
9: ; preds = %3
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ _setnetdnsent(int);
int /*<<< orphan*/ _setnethtent(int);
void setnetent(int stayopen) {
  _setnethtent(stayopen);
  _setnetdnsent(stayopen);
}


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

x86 assembly (clang, -O2):
<setnetent>:
push   %rbx
mov    %edi,%ebx
call   1030 <_setnethtent@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <_setnetdnsent@plt>

LLVM IR (-O0):
define void @setnetent(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @_setnethtent(i32 %3)
%5 = load i32, i32* %2
%6 = call i32 @_setnetdnsent(i32 %5)
ret void
}

LLVM IR (-O2):
define void @setnetent(i32 %0) {
%2 = tail call i32 @_setnethtent(i32 %0)
%3 = tail call i32 @_setnetdnsent(i32 %0)
ret void
}
main(c, v, e) int c;
char **v, **e;
{
  close(0);
  execv(v[1], v + 1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
xor    %edi,%edi
mov    $0x0,%al
call   1030 <close@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0x10(%rbp),%rsi
add    $0x8,%rsi
mov    $0x0,%al
call   1040 <execv@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %rsi,%rbx
xor    %edi,%edi
xor    %eax,%eax
call   1030 <close@plt>
mov    0x8(%rbx),%rdi
add    $0x8,%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <execv@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1, i8** nocapture readnone %2) {
%4 = tail call i32 (i32, ...) bitcast (i32 (...)* @close to i32 (i32, ...)*)(i32 0)
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 (i8*, i8**, ...) bitcast (i32 (...)* @execv to i32 (i8*, i8**, ...)*)(i8* %6, i8** %5)
ret i32 0
}
void __attribute__((__swiftcall__)) f(void) {}


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

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

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

LLVM IR (-O2):
define swiftcc void @f() {
ret void
}
/* Variables and functions */
int write_key(char const *, char const *, char const *, int);
int textfile_caseput(const char *pathname, const char *key, const char *value) {
  return write_key(pathname, key, value, 1);
}


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

x86 assembly (clang, -O2):
<textfile_caseput>:
mov    $0x1,%ecx
jmp    1030 <write_key@plt>

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

LLVM IR (-O2):
define i32 @textfile_caseput(i8* %0, i8* %1, i8* %2) {
%4 = tail call i32 @write_key(i8* %0, i8* %1, i8* %2, i32 1)
ret i32 %4
}
/* Type definitions */
struct target {
  int dummy;
};

/* Variables and functions */
char *malloc(int);
int /*<<< orphan*/ snprintf(char *, int, char *);
char *dump_sys_getegid16(int depth, struct target *target) {
  char *param_str = malloc(5);
  snprintf(param_str, 5, "void");
  return param_str;
}


x86 assembly (clang, -O0):
<dump_sys_getegid16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x5,%edi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    $0x5,%esi
lea    0xeb3(%rip),%rdx
call   1030 <snprintf@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dump_sys_getegid16>:
push   %rbx
mov    $0x5,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
lea    0xecb(%rip),%rdx
mov    %rax,%rdi
mov    $0x5,%esi
call   1030 <snprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.target = type { i32 }
@.str = [5 x i8] c"void\00"
define i8* @dump_sys_getegid16(i32 %0, %struct.target* %1) {
%3 = alloca i32
%4 = alloca %struct.target*
%5 = alloca i8*
store i32 %0, i32* %3
store %struct.target* %1, %struct.target** %4
%6 = call i8* @malloc(i32 5)
store i8* %6, i8** %5
%7 = load i8*, i8** %5
%8 = call i32 @snprintf(i8* %7, i32 5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%9 = load i8*, i8** %5
ret i8* %9
}

LLVM IR (-O2):
%struct.target = type { i32 }
@.str = [5 x i8] c"void\00"
define i8* @dump_sys_getegid16(i32 %0, %struct.target* nocapture readnone %1) {
%3 = tail call dereferenceable_or_null(5) i8* @malloc(i32 5)
%4 = tail call i32 @snprintf(i8* %3, i32 5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) { printf("hello world of PI\n"); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%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 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"hello world of PI\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [18 x i8] c"hello world of PI\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
long get_num(char *, char *);
char *long2str(char *, long);
char *macsub(char *arg) {
  long a, b;
  b = get_num("sub", arg);
  a = get_num("sub", arg);
  return (long2str(arg, a - b));
}


x86 assembly (clang, -O0):
<macsub>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <get_num@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xeb5(%rip),%rdi
call   1030 <get_num@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
sub    -0x18(%rbp),%rsi
call   1040 <long2str@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<macsub>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%rbx
lea    0xed1(%rip),%r14
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <get_num@plt>
mov    %rax,%r15
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <get_num@plt>
sub    %r15,%rax
mov    %rbx,%rdi
mov    %rax,%rsi
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <long2str@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"sub\00"
define i8* @macsub(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = alloca i64
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i64 @get_num(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %5)
store i64 %6, i64* %4
%7 = load i8*, i8** %2
%8 = call i64 @get_num(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %7)
store i64 %8, i64* %3
%9 = load i8*, i8** %2
%10 = load i64, i64* %3
%11 = load i64, i64* %4
%12 = sub nsw i64 %10, %11
%13 = call i8* @long2str(i8* %9, i64 %12)
ret i8* %13
}

LLVM IR (-O2):
@.str = [4 x i8] c"sub\00"
define i8* @macsub(i8* %0) {
%2 = tail call i64 @get_num(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i64 @get_num(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = sub nsw i64 %3, %2
%5 = tail call i8* @long2str(i8* %0, i64 %4)
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ Msp430UartP__0__Counter__overflow();
int /*<<< orphan*/ TransformCounterC__0__CounterFrom__overflow();
void Msp430CounterC__0__Counter__overflow(void) {
  TransformCounterC__0__CounterFrom__overflow();
  Msp430UartP__0__Counter__overflow();
}


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

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

LLVM IR (-O0):
define void @Msp430CounterC__0__Counter__overflow() {
%1 = call i32 (...) @TransformCounterC__0__CounterFrom__overflow()
%2 = call i32 (...) @Msp430UartP__0__Counter__overflow()
ret void
}

LLVM IR (-O2):
define void @Msp430CounterC__0__Counter__overflow() {
%1 = tail call i32 (...) @TransformCounterC__0__CounterFrom__overflow()
%2 = tail call i32 (...) @Msp430UartP__0__Counter__overflow()
ret void
}
int func5() {
#pragma critTer : 18 :../../ test / resources / functionNumber.c:
  return 0;
#pragma critTer : 19 :../../ test / resources / functionNumber.c:
}


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

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

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

LLVM IR (-O2):
define i32 @func5() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ outbyte(int);
col() { outbyte(58); }


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

x86 assembly (clang, -O2):
<col>:
mov    $0x3a,%edi
jmp    1030 <outbyte@plt>

LLVM IR (-O0):
define i32 @col() {
%1 = alloca i32
%2 = call i32 @outbyte(i32 58)
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @col() {
%1 = tail call i32 @outbyte(i32 58)
ret i32 undef
}
/* Variables and functions */
int proc_true();
int proc_true_context(void *context) { return proc_true(); }


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

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

LLVM IR (-O0):
define i32 @proc_true_context(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @proc_true()
ret i32 %3
}

LLVM IR (-O2):
define i32 @proc_true_context(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @proc_true()
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void die(const char *message) {
  ;
  fprintf(stderr, "ERROR: %s\n", message);
  exit(1);
}


x86 assembly (clang, -O0):
<die>:
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    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [11 x i8] c"ERROR: %s\0A\00"
define void @die(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 ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [11 x i8] c"ERROR: %s\0A\00"
define void @die(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ set_io_bit(int, int /*<<< orphan*/);
void TOSH_SET_YELLOW_LED_PIN() { set_io_bit(0x34, 0); }


x86 assembly (clang, -O0):
<TOSH_SET_YELLOW_LED_PIN>:
push   %rbp
mov    %rsp,%rbp
mov    $0x34,%edi
xor    %esi,%esi
call   1030 <set_io_bit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<TOSH_SET_YELLOW_LED_PIN>:
mov    $0x34,%edi
xor    %esi,%esi
jmp    1030 <set_io_bit@plt>

LLVM IR (-O0):
define void @TOSH_SET_YELLOW_LED_PIN() {
%1 = call i32 @set_io_bit(i32 52, i32 0)
ret void
}

LLVM IR (-O2):
define void @TOSH_SET_YELLOW_LED_PIN() {
%1 = tail call i32 @set_io_bit(i32 52, i32 0)
ret void
}
int main(int argc, const char *argv[]) {
  char dir[] = {"test"};
  if (mkdir(dir, 0755))
    perror("mkdir");
  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)
mov    0xec4(%rip),%eax
mov    %eax,-0x15(%rbp)
mov    0xebf(%rip),%al
mov    %al,-0x11(%rbp)
lea    -0x15(%rbp),%rdi
mov    $0x1ed,%esi
mov    $0x0,%al
call   1030 <mkdir@plt>
cmp    $0x0,%eax
je     116f <main+0x4f>
lea    0xe9d(%rip),%rdi
mov    $0x0,%al
call   1040 <perror@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movb   $0x0,0x4(%rsp)
movl   $0x74736574,(%rsp)
mov    %rsp,%rdi
mov    $0x1ed,%esi
xor    %eax,%eax
call   1030 <mkdir@plt>
test   %eax,%eax
je     114e <main+0x2e>
lea    0xebe(%rip),%rdi
xor    %eax,%eax
call   1040 <perror@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@__const.main.dir = [5 x i8] c"test\00"
@.str = [6 x i8] c"mkdir\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [5 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = bitcast [5 x i8]* %6 to i8*
%8 = getelementptr inbounds [5 x i8], [5 x i8]* %6, i64 0, i64 0
%9 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @mkdir to i32 (i8*, i32, ...)*)(i8* %8, i32 493)
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = call i32 (i8*, ...) bitcast (i32 (...)* @perror to i32 (i8*, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %13
13: ; preds = %11, %2
ret i32 0
}

LLVM IR (-O2):
@__const.main.dir = [5 x i8] c"test\00"
@.str = [6 x i8] c"mkdir\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [5 x i8]
%4 = getelementptr inbounds [5 x i8], [5 x i8]* %3, i64 0, i64 0
%5 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @mkdir to i32 (i8*, i32, ...)*)(i8* %4, i32 493)
%6 = icmp eq i32 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %2
%8 = call i32 (i8*, ...) bitcast (i32 (...)* @perror to i32 (i8*, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %2
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ O_WRONLY;
int /*<<< orphan*/ close(int);
int dup(int);
int /*<<< orphan*/ dup2(int, int);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int open(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
int disable_stdout() {
  int original, quiet;
  fflush(stdout);
  original = dup(1);
  quiet = open("/dev/null", O_WRONLY);
  dup2(quiet, 1);
  close(quiet);
  return original;
}


x86 assembly (clang, -O0):
<disable_stdout>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2e81(%rip),%rax
mov    (%rax),%edi
call   1060 <fflush@plt>
mov    $0x1,%edi
call   1040 <dup@plt>
mov    %eax,-0x4(%rbp)
mov    0x2e56(%rip),%rax
mov    (%rax),%esi
lea    0xe7d(%rip),%rdi
call   1070 <open@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    $0x1,%esi
call   1030 <dup2@plt>
mov    -0x8(%rbp),%edi
call   1050 <close@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<disable_stdout>:
push   %rbp
push   %rbx
push   %rax
mov    0x2e86(%rip),%rax
mov    (%rax),%edi
call   1060 <fflush@plt>
mov    $0x1,%edi
call   1040 <dup@plt>
mov    %eax,%ebx
mov    0x2e5c(%rip),%rax
mov    (%rax),%esi
lea    0xe83(%rip),%rdi
call   1070 <open@plt>
mov    %eax,%ebp
mov    %eax,%edi
mov    $0x1,%esi
call   1030 <dup2@plt>
mov    %ebp,%edi
call   1050 <close@plt>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [10 x i8] c"/dev/null\00"
@O_WRONLY = global i32 0
define i32 @disable_stdout() {
%1 = alloca i32
%2 = alloca i32
%3 = load i32, i32* @stdout
%4 = call i32 @fflush(i32 %3)
%5 = call i32 @dup(i32 1)
store i32 %5, i32* %1
%6 = load i32, i32* @O_WRONLY
%7 = call i32 @open(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %6)
store i32 %7, i32* %2
%8 = load i32, i32* %2
%9 = call i32 @dup2(i32 %8, i32 1)
%10 = load i32, i32* %2
%11 = call i32 @close(i32 %10)
%12 = load i32, i32* %1
ret i32 %12
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [10 x i8] c"/dev/null\00"
@O_WRONLY = global i32 0
define i32 @disable_stdout() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fflush(i32 %1)
%3 = tail call i32 @dup(i32 1)
%4 = load i32, i32* @O_WRONLY
%5 = tail call i32 @open(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = tail call i32 @dup2(i32 %5, i32 1)
%7 = tail call i32 @close(i32 %5)
ret i32 %3
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t read_32_le(unsigned char bytes[4]) {
  uint32_t result = 0;
  for (int i = 4 - 1; i >= 0; i--)
    result = (result << 8) | bytes[i];
  return result;
}


x86 assembly (clang, -O0):
<read_32_le>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x3,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jl     1145 <read_32_le+0x45>
mov    -0xc(%rbp),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
movslq -0x10(%rbp),%rdx
movzbl (%rcx,%rdx,1),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    1116 <read_32_le+0x16>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_32_le>:
mov    (%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @read_32_le(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 3
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = getelementptr inbounds i8, i8* %0, i64 2
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
%8 = shl nuw nsw i32 %4, 16
%9 = shl nuw nsw i32 %7, 8
%10 = or i32 %8, %9
%11 = getelementptr inbounds i8, i8* %0, i64 1
%12 = load i8, i8* %11
%13 = zext i8 %12 to i32
%14 = or i32 %10, %13
%15 = shl nuw i32 %14, 8
%16 = load i8, i8* %0
%17 = zext i8 %16 to i32
%18 = or i32 %15, %17
ret i32 %18
}
void DebugInit(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void version(FILE *fp) {
  fprintf(fp, "romcc "
              "0"
              "."
              "73"
              " released "
              "08 May 2013"
              "\n");
}


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

x86 assembly (clang, -O2):
<version>:
mov    %rdi,%rcx
lea    0xee6(%rip),%rdi
mov    $0x20,%esi
mov    $0x1,%edx
jmp    1030 <fwrite@plt>

LLVM IR (-O0):
@.str = [33 x i8] c"romcc 0.73 released 08 May 2013\0A\00"
define void @version(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [33 x i8] c"romcc 0.73 released 08 May 2013\0A\00"
define void @version(i32* nocapture %0) {
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i64 32, i64 1, i32* %0)
ret void
}
void RTAvloGCPtrGet(void) {}


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

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

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

LLVM IR (-O2):
define void @RTAvloGCPtrGet() {
ret void
}
unsigned int _check_times(unsigned x, unsigned y) {
  unsigned long long whole_ans =
      ((unsigned long long)x) * ((unsigned long long)y);
  unsigned word_ans = (unsigned)whole_ans;
  if (word_ans < whole_ans || word_ans > (1 << 28))
    (_throw_badalloc_fn("/scratch/repos/new/home/jordi_armengol_estape/"
                        "c-scraper/outputs/2022-01-22/02-19-57/repos/FauxFaux/"
                        "cyclone/refs/heads/master/bin/genfiles/tcenv.c",
                        284));
  return word_ans;
}


x86 assembly (clang, -O0):
<_check_times>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
imul   %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%rax
jb     114d <_check_times+0x3d>
cmpl   $0x10000000,-0x14(%rbp)
jbe    1160 <_check_times+0x50>
lea    0xeac(%rip),%rdi
mov    $0x11c,%esi
mov    $0x0,%al
call   1030 <_throw_badalloc_fn@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_check_times>:
push   %rbx
mov    %edi,%eax
mul    %esi
mov    %eax,%ebx
jo     1121 <_check_times+0x11>
cmp    $0x10000001,%ebx
jb     1134 <_check_times+0x24>
lea    0xed8(%rip),%rdi
mov    $0x11c,%esi
xor    %eax,%eax
call   1030 <_throw_badalloc_fn@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [146 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/FauxFaux/cyclone/refs/heads/master/bin/genfiles/tcenv.c\00"
define i32 @_check_times(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i64
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = zext i32 %7 to i64
%9 = load i32, i32* %4
%10 = zext i32 %9 to i64
%11 = mul i64 %8, %10
store i64 %11, i64* %5
%12 = load i64, i64* %5
%13 = trunc i64 %12 to i32
store i32 %13, i32* %6
%14 = load i32, i32* %6
%15 = zext i32 %14 to i64
%16 = load i64, i64* %5
%17 = icmp ult i64 %15, %16
br i1 %17, label %21, label %18
18: ; preds = %2
%19 = load i32, i32* %6
%20 = icmp ugt i32 %19, 268435456
br i1 %20, label %21, label %23
21: ; preds = %18, %2
%22 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @_throw_badalloc_fn to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([146 x i8], [146 x i8]* @.str, i64 0, i64 0), i32 284)
br label %23
23: ; preds = %21, %18
%24 = load i32, i32* %6
ret i32 %24
}

LLVM IR (-O2):
@.str = [146 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/FauxFaux/cyclone/refs/heads/master/bin/genfiles/tcenv.c\00"
define i32 @_check_times(i32 %0, i32 %1) {
%3 = tail call { i32, i1 } @llvm.umul.with.overflow.i32(i32 %0, i32 %1)
%4 = extractvalue { i32, i1 } %3, 0
%5 = extractvalue { i32, i1 } %3, 1
%6 = icmp ugt i32 %4, 268435456
%7 = or i1 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @_throw_badalloc_fn to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([146 x i8], [146 x i8]* @.str, i64 0, i64 0), i32 284)
br label %10
10: ; preds = %2, %8
ret i32 %4
}
unsigned int enum_prune_get_level(unsigned int *order, unsigned int lev,
                                  unsigned int id) {
  unsigned int i;
  for (i = 0; i <= lev; i++) {
    if (order[i] == id)
      return i;
  }
  return i;
}


x86 assembly (clang, -O0):
<enum_prune_get_level>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x14(%rbp),%eax
ja     1152 <enum_prune_get_level+0x52>
mov    -0x10(%rbp),%rax
mov    -0x1c(%rbp),%ecx
mov    (%rax,%rcx,4),%eax
cmp    -0x18(%rbp),%eax
jne    113f <enum_prune_get_level+0x3f>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1158 <enum_prune_get_level+0x58>
jmp    1144 <enum_prune_get_level+0x44>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1115 <enum_prune_get_level+0x15>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<enum_prune_get_level>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %eax,%ecx
cmp    %edx,(%rdi,%rcx,4)
je     111e <enum_prune_get_level+0x1e>
add    $0x1,%eax
cmp    %esi,%eax
jbe    1110 <enum_prune_get_level+0x10>
ret

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

LLVM IR (-O2):
define i32 @enum_prune_get_level(i32* nocapture %0, i32 %1, i32 %2) {
br label %4
4: ; preds = %3, %10
%5 = phi i32 [ 0, %3 ], [ %11, %10 ]
%6 = zext i32 %5 to i64
%7 = getelementptr inbounds i32, i32* %0, i64 %6
%8 = load i32, i32* %7
%9 = icmp eq i32 %8, %2
br i1 %9, label %13, label %10
10: ; preds = %4
%11 = add i32 %5, 1
%12 = icmp ugt i32 %11, %1
br i1 %12, label %13, label %4
13: ; preds = %10, %4
%14 = phi i32 [ %11, %10 ], [ %5, %4 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ GPS_Diag(char *, int /*<<< orphan*/);
void Diag(void *buf, size_t sz) {
  unsigned char *cbuf = (unsigned char *)buf;
  while (sz--) {
    GPS_Diag("%02x ", *cbuf++);
  }
}


x86 assembly (clang, -O0):
<Diag>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x10(%rbp)
cmp    $0x0,%rax
je     1164 <Diag+0x54>
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x18(%rbp)
movzbl (%rax),%esi
lea    0xea6(%rip),%rdi
call   1030 <GPS_Diag@plt>
jmp    1128 <Diag+0x18>
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"%02x \00"
define void @Diag(i8* nocapture %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %13, label %4
4: ; preds = %2, %4
%5 = phi i8* [ %8, %4 ], [ %0, %2 ]
%6 = phi i64 [ %7, %4 ], [ %1, %2 ]
%7 = add i64 %6, -1
%8 = getelementptr inbounds i8, i8* %5, i64 1
%9 = load i8, i8* %5
%10 = zext i8 %9 to i32
%11 = tail call i32 @GPS_Diag(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = icmp eq i64 %7, 0
br i1 %12, label %13, label %4
13: ; preds = %4, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void worker() {
  printf("Worker starting up...\n");
  while (1)
    ;
  exit(0);
}


x86 assembly (clang, -O0):
<worker>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
jmp    1120 <worker+0x10>

x86 assembly (clang, -O2):
<worker>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
nopl   (%rax)
jmp    1120 <worker+0x10>

LLVM IR (-O0):
@.str = [23 x i8] c"Worker starting up...\0A\00"
define void @worker() {
%1 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %0, %2
br label %2
}

LLVM IR (-O2):
@str = [22 x i8] c"Worker starting up...\00"
define void @worker() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
br label %2
2: ; preds = %0, %2
br label %2
}
/* Type definitions */
typedef int /*<<< orphan*/ SHA256_CTX;

/* Variables and functions */
int SHA256_Update(int /*<<< orphan*/ *, void const *, size_t);
int SHA224_Update(SHA256_CTX *c, const void *data, size_t len) {
  return SHA256_Update(c, data, len);
}


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

x86 assembly (clang, -O2):
<SHA224_Update>:
jmp    1030 <SHA256_Update@plt>

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

LLVM IR (-O2):
define i32 @SHA224_Update(i32* %0, i8* %1, i64 %2) {
%4 = tail call i32 @SHA256_Update(i32* %0, i8* %1, i64 %2)
ret i32 %4
}