xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ test_001();
int /*<<< orphan*/ test_002();
int /*<<< orphan*/ test_003();
int /*<<< orphan*/ test_004();
int /*<<< orphan*/ test_005();
int /*<<< orphan*/ test_006();
int /*<<< orphan*/ test_007();
int /*<<< orphan*/ test_008();
int /*<<< orphan*/ test_009();
int main(int argc, char **argv) {
  test_001();
  test_002();
  test_003();
  test_004();
  test_005();
  test_006();
  test_007();
  test_008();
  test_009();
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <test_001@plt>
mov    $0x0,%al
call   1080 <test_002@plt>
mov    $0x0,%al
call   1040 <test_003@plt>
mov    $0x0,%al
call   1090 <test_004@plt>
mov    $0x0,%al
call   1050 <test_005@plt>
mov    $0x0,%al
call   10a0 <test_006@plt>
mov    $0x0,%al
call   1060 <test_007@plt>
mov    $0x0,%al
call   10b0 <test_008@plt>
mov    $0x0,%al
call   1070 <test_009@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <test_001@plt>
xor    %eax,%eax
call   1080 <test_002@plt>
xor    %eax,%eax
call   1040 <test_003@plt>
xor    %eax,%eax
call   1090 <test_004@plt>
xor    %eax,%eax
call   1050 <test_005@plt>
xor    %eax,%eax
call   10a0 <test_006@plt>
xor    %eax,%eax
call   1060 <test_007@plt>
xor    %eax,%eax
call   10b0 <test_008@plt>
xor    %eax,%eax
call   1070 <test_009@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @test_001()
%7 = call i32 (...) @test_002()
%8 = call i32 (...) @test_003()
%9 = call i32 (...) @test_004()
%10 = call i32 (...) @test_005()
%11 = call i32 (...) @test_006()
%12 = call i32 (...) @test_007()
%13 = call i32 (...) @test_008()
%14 = call i32 (...) @test_009()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @test_001()
%4 = tail call i32 (...) @test_002()
%5 = tail call i32 (...) @test_003()
%6 = tail call i32 (...) @test_004()
%7 = tail call i32 (...) @test_005()
%8 = tail call i32 (...) @test_006()
%9 = tail call i32 (...) @test_007()
%10 = tail call i32 (...) @test_008()
%11 = tail call i32 (...) @test_009()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ tab;

/* Variables and functions */
double s_measure(void *ud) {
  static const double tab[] = {
      1030, 989, 1017, 1009, 1013, 979, 1008, 1042, 1012, 1011,
  };
  static size_t i;
  double r;
  r = tab[i];
  i = (i + 1) % (sizeof(tab) / sizeof(tab[0]));
  (void)ud;
  return r;
}


x86 assembly (clang, -O0):
<s_measure>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    0x2f19(%rip),%rcx
lea    0xeea(%rip),%rax
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    0x2f01(%rip),%rax
add    $0x1,%rax
mov    $0xa,%ecx
xor    %edx,%edx
div    %rcx
mov    %rdx,0x2eec(%rip)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<s_measure>:
mov    0x2f21(%rip),%rcx
lea    0xef2(%rip),%rax
movsd  (%rax,%rcx,8),%xmm0
lea    0x1(%rcx),%rax
movabs $0xcccccccccccccccd,%rdx
cc cc cc
mul    %rdx
shr    $0x2,%rdx
and    $0xfffffffffffffffe,%rdx
lea    (%rdx,%rdx,4),%rax
neg    %rax
add    %rcx,%rax
add    $0x1,%rax
mov    %rax,0x2ee7(%rip)
ret

LLVM IR (-O0):
@s_measure.tab = internal constant [10 x double] [double 1.030000e+03, double 9.890000e+02, double 1.017000e+03, double 1.009000e+03, double 1.013000e+03, double 9.790000e+02, double 1.008000e+03, double 1.042000e+03, double 1.012000e+03, double 1.011000e+03]
@s_measure.i = internal global i64 0
define double @s_measure(i8* %0) {
%2 = alloca i8*
%3 = alloca double
store i8* %0, i8** %2
%4 = load i64, i64* @s_measure.i
%5 = getelementptr inbounds [10 x double], [10 x double]* @s_measure.tab, i64 0, i64 %4
%6 = load double, double* %5
store double %6, double* %3
%7 = load i64, i64* @s_measure.i
%8 = add i64 %7, 1
%9 = urem i64 %8, 10
store i64 %9, i64* @s_measure.i
%10 = load i8*, i8** %2
%11 = load double, double* %3
ret double %11
}

LLVM IR (-O2):
@s_measure.tab = internal unnamed_addr constant [10 x double] [double 1.030000e+03, double 9.890000e+02, double 1.017000e+03, double 1.009000e+03, double 1.013000e+03, double 9.790000e+02, double 1.008000e+03, double 1.042000e+03, double 1.012000e+03, double 1.011000e+03]
@s_measure.i = internal unnamed_addr global i64 0
define double @s_measure(i8* nocapture readnone %0) {
%2 = load i64, i64* @s_measure.i
%3 = getelementptr inbounds [10 x double], [10 x double]* @s_measure.tab, i64 0, i64 %2
%4 = load double, double* %3
%5 = add i64 %2, 1
%6 = urem i64 %5, 10
store i64 %6, i64* @s_measure.i
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ init(int);
int /*<<< orphan*/ print(int);
int /*<<< orphan*/ unite(int, int);
int main() {
  init(7);
  unite(0, 1);
  print(7);
  unite(0, 4);
  print(7);
  unite(5, 3);
  print(7);
  unite(3, 6);
  print(7);
  unite(5, 0);
  print(7);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x7,%edi
call   1040 <init@plt>
xor    %edi,%edi
mov    $0x1,%esi
call   1050 <unite@plt>
mov    $0x7,%edi
call   1030 <print@plt>
xor    %edi,%edi
mov    $0x4,%esi
call   1050 <unite@plt>
mov    $0x7,%edi
call   1030 <print@plt>
mov    $0x5,%edi
mov    $0x3,%esi
call   1050 <unite@plt>
mov    $0x7,%edi
call   1030 <print@plt>
mov    $0x3,%edi
mov    $0x6,%esi
call   1050 <unite@plt>
mov    $0x7,%edi
call   1030 <print@plt>
mov    $0x5,%edi
xor    %esi,%esi
call   1050 <unite@plt>
mov    $0x7,%edi
call   1030 <print@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x7,%edi
call   1040 <init@plt>
xor    %edi,%edi
mov    $0x1,%esi
call   1050 <unite@plt>
mov    $0x7,%edi
call   1030 <print@plt>
xor    %edi,%edi
mov    $0x4,%esi
call   1050 <unite@plt>
mov    $0x7,%edi
call   1030 <print@plt>
mov    $0x5,%edi
mov    $0x3,%esi
call   1050 <unite@plt>
mov    $0x7,%edi
call   1030 <print@plt>
mov    $0x3,%edi
mov    $0x6,%esi
call   1050 <unite@plt>
mov    $0x7,%edi
call   1030 <print@plt>
mov    $0x5,%edi
xor    %esi,%esi
call   1050 <unite@plt>
mov    $0x7,%edi
call   1030 <print@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @init(i32 7)
%3 = call i32 @unite(i32 0, i32 1)
%4 = call i32 @print(i32 7)
%5 = call i32 @unite(i32 0, i32 4)
%6 = call i32 @print(i32 7)
%7 = call i32 @unite(i32 5, i32 3)
%8 = call i32 @print(i32 7)
%9 = call i32 @unite(i32 3, i32 6)
%10 = call i32 @print(i32 7)
%11 = call i32 @unite(i32 5, i32 0)
%12 = call i32 @print(i32 7)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @init(i32 7)
%2 = tail call i32 @unite(i32 0, i32 1)
%3 = tail call i32 @print(i32 7)
%4 = tail call i32 @unite(i32 0, i32 4)
%5 = tail call i32 @print(i32 7)
%6 = tail call i32 @unite(i32 5, i32 3)
%7 = tail call i32 @print(i32 7)
%8 = tail call i32 @unite(i32 3, i32 6)
%9 = tail call i32 @print(i32 7)
%10 = tail call i32 @unite(i32 5, i32 0)
%11 = tail call i32 @print(i32 7)
ret i32 0
}
void ft_add_case(int *test, int nb, int is_prime) {
  test[0] = nb;
  test[1] = is_prime;
}


x86 assembly (clang, -O0):
<ft_add_case>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x4(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_add_case>:
mov    %esi,(%rdi)
mov    %edx,0x4(%rdi)
ret

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

LLVM IR (-O2):
define void @ft_add_case(i32* nocapture writeonly %0, i32 %1, i32 %2) {
store i32 %1, i32* %0
%4 = getelementptr inbounds i32, i32* %0, i64 1
store i32 %2, i32* %4
ret void
}
/* Variables and functions */
int chdir(char *);
int /*<<< orphan*/ perror(char *);
void execCD(char *path) {
  switch (chdir(path)) {
  case 0:
    break;
  default:
    perror("Error path");
  }
}


x86 assembly (clang, -O0):
<execCD>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <chdir@plt>
test   %eax,%eax
jne    1147 <execCD+0x27>
jmp    1142 <execCD+0x22>
jmp    1153 <execCD+0x33>
lea    0xeb2(%rip),%rdi
call   1040 <perror@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<execCD>:
push   %rax
call   1030 <chdir@plt>
test   %eax,%eax
jne    112c <execCD+0xc>
pop    %rax
ret
lea    0xecd(%rip),%rdi
pop    %rax
jmp    1040 <perror@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"Error path\00"
define void @execCD(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @chdir(i8* %3)
switch i32 %4, label %6 [
i32 0, label %5
]
5: ; preds = %1
br label %8
6: ; preds = %1
%7 = call i32 @perror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %5
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"Error path\00"
define void @execCD(i8* %0) {
%2 = tail call i32 @chdir(i8* %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @perror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %1, %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
void print_version() {
  printf("chown %s\n", "0.01");
  printf("Written by Constantinos Georgiades\n");
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<print_version>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xed8(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e92(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<print_version>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0xecb(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xec2(%rip),%rdi
call   1030 <puts@plt>
mov    0x2e87(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"chown %s\0A\00"
@.str.1 = [5 x i8] c"0.01\00"
@.str.2 = [36 x i8] c"Written by Constantinos Georgiades\0A\00"
@EXIT_SUCCESS = global i32 0
define void @print_version() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
%3 = load i32, i32* @EXIT_SUCCESS
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
@.str = [10 x i8] c"chown %s\0A\00"
@.str.1 = [5 x i8] c"0.01\00"
@EXIT_SUCCESS = global i32 0
@str = [35 x i8] c"Written by Constantinos Georgiades\00"
define void @print_version() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str, i64 0, i64 0))
%3 = load i32, i32* @EXIT_SUCCESS
%4 = tail call i32 @exit(i32 %3)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, void *);
int /*<<< orphan*/ stderr;
void rtpp_module_if_construct_fin(void *pub) {
  fprintf(stderr,
          "Method rtpp_module_if@%p::construct (rtpp_module_if_construct) is "
          "invoked after destruction\x0a",
          pub);
  abort();
}


x86 assembly (clang, -O0):
<rtpp_module_if_construct_fin>:
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   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<rtpp_module_if_construct_fin>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [93 x i8] c"Method rtpp_module_if@%p::construct (rtpp_module_if_construct) is invoked after destruction\0A\00"
define void @rtpp_module_if_construct_fin(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 ([93 x i8], [93 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [93 x i8] c"Method rtpp_module_if@%p::construct (rtpp_module_if_construct) is invoked after destruction\0A\00"
define void @rtpp_module_if_construct_fin(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([93 x i8], [93 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 (...) @abort()
unreachable
}
long test_lsucc(long l) { return (l + 1); }


x86 assembly (clang, -O0):
<test_lsucc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_lsucc>:
lea    0x1(%rdi),%rax
ret

LLVM IR (-O0):
define i64 @test_lsucc(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add nsw i64 %3, 1
ret i64 %4
}

LLVM IR (-O2):
define i64 @test_lsucc(i64 %0) {
%2 = add nsw i64 %0, 1
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, void *);
int /*<<< orphan*/ stderr;
void rtpp_stream_get_proto_fin(void *pub) {
  fprintf(stderr,
          "Method rtpp_stream@%p::get_proto (rtpp_stream_get_proto) is invoked "
          "after destruction\x0a",
          pub);
  abort();
}


x86 assembly (clang, -O0):
<rtpp_stream_get_proto_fin>:
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   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<rtpp_stream_get_proto_fin>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [87 x i8] c"Method rtpp_stream@%p::get_proto (rtpp_stream_get_proto) is invoked after destruction\0A\00"
define void @rtpp_stream_get_proto_fin(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 ([87 x i8], [87 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [87 x i8] c"Method rtpp_stream@%p::get_proto (rtpp_stream_get_proto) is invoked after destruction\0A\00"
define void @rtpp_stream_get_proto_fin(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([87 x i8], [87 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 (...) @abort()
unreachable
}
void *_glfwPlatformGetProcAddress(const char *procname) {
  return (void *)((void *)0);
}


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

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

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

LLVM IR (-O2):
define noalias i8* @_glfwPlatformGetProcAddress(i8* nocapture readnone %0) {
ret i8* null
}
/* Variables and functions */
char bset_b(char *, char *);
signed char intr_wrap_527(signed char p1, signed char p2) {
  return bset_b(&p1, &p2);
}


x86 assembly (clang, -O0):
<intr_wrap_527>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
lea    -0x1(%rbp),%rdi
lea    -0x2(%rbp),%rsi
call   1030 <bset_b@plt>
movsbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<intr_wrap_527>:
push   %rax
mov    %dil,0x7(%rsp)
mov    %sil,0x6(%rsp)
lea    0x7(%rsp),%rdi
lea    0x6(%rsp),%rsi
call   1030 <bset_b@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define signext i8 @intr_wrap_527(i8 signext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = call signext i8 @bset_b(i8* %3, i8* %4)
ret i8 %5
}
void resctrl_sched_in(void) {}


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

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

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

LLVM IR (-O2):
define void @resctrl_sched_in() {
ret void
}
int main(void) {
  printf("%s\n", __func__);
  baz();
  return 0;
}


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

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

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

LLVM IR (-O2):
@__func__.main = [5 x i8] c"main\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @__func__.main, i64 0, i64 0))
%2 = tail call i32 (...) @baz()
ret i32 0
}
void func_printf(char *format, ...) {}


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

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

LLVM IR (-O0):
define void @func_printf(i8* %0, ...) {
%2 = alloca i8*
store i8* %0, i8** %2
ret void
}

LLVM IR (-O2):
define void @func_printf(i8* nocapture %0, ...) {
ret void
}
void ABGRToUVRow_AVX2() {}


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

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

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

LLVM IR (-O2):
define void @ABGRToUVRow_AVX2() {
ret void
}
void ssleep(seconds) const unsigned seconds;
{ sleep(seconds); }


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

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

LLVM IR (-O0):
define void @ssleep(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 (i32, ...) bitcast (i32 (...)* @sleep to i32 (i32, ...)*)(i32 %3)
ret void
}

LLVM IR (-O2):
define void @ssleep(i32 %0) {
%2 = tail call i32 (i32, ...) bitcast (i32 (...)* @sleep to i32 (i32, ...)*)(i32 %0)
ret void
}
int scanf(const char *restrict fmt, ...) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @scanf(i8* noalias nocapture readnone %0, ...) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ setup_uart(int, int);
int /*<<< orphan*/ uart_puts(char *);
int main(int argc, char const *argv[]) {
  setup_uart(10, 1);
  uart_puts("Node started\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0xa,%edi
mov    $0x1,%esi
call   1030 <setup_uart@plt>
lea    0xebb(%rip),%rdi
call   1040 <uart_puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xa,%edi
mov    $0x1,%esi
call   1030 <setup_uart@plt>
lea    0xec9(%rip),%rdi
call   1040 <uart_puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"Node started\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 @setup_uart(i32 10, i32 1)
%6 = call i32 @uart_puts(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"Node started\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @setup_uart(i32 10, i32 1)
%4 = tail call i32 @uart_puts(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
extern const char *lua_version(void) { return "Lua 5.0.2"; }


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

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

LLVM IR (-O0):
@.str = [10 x i8] c"Lua 5.0.2\00"
define i8* @lua_version() {
ret i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [10 x i8] c"Lua 5.0.2\00"
define i8* @lua_version() {
ret i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0)
}
void plot_pixel(unsigned int x, unsigned int y, int p) { return; }


x86 assembly (clang, -O0):
<plot_pixel>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @plot_pixel(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
ret void
}

LLVM IR (-O2):
define void @plot_pixel(i32 %0, i32 %1, i32 %2) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(int *, int *, int);
void copy3(int *x, int *y) { memcpy(x, y, 3); }


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

x86 assembly (clang, -O2):
<copy3>:
mov    $0x3,%edx
jmp    1030 <memcpy@plt>

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

LLVM IR (-O2):
define void @copy3(i32* %0, i32* %1) {
%3 = tail call i32 @memcpy(i32* %0, i32* %1, i32 3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ repeat_ch(char, int);
void erase(int count) {
  if (count <= 0)
    return;
  repeat_ch('\b', count);
  repeat_ch(' ', count);
  repeat_ch('\b', count);
}


x86 assembly (clang, -O0):
<erase>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jg     112a <erase+0x1a>
jmp    1151 <erase+0x41>
mov    -0x4(%rbp),%esi
mov    $0x8,%edi
call   1030 <repeat_ch@plt>
mov    -0x4(%rbp),%esi
mov    $0x20,%edi
call   1030 <repeat_ch@plt>
mov    -0x4(%rbp),%esi
mov    $0x8,%edi
call   1030 <repeat_ch@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<erase>:
test   %edi,%edi
jle    113c <erase+0x2c>
push   %rbx
mov    %edi,%ebx
mov    $0x8,%edi
mov    %ebx,%esi
call   1030 <repeat_ch@plt>
mov    $0x20,%edi
mov    %ebx,%esi
call   1030 <repeat_ch@plt>
mov    $0x8,%edi
mov    %ebx,%esi
pop    %rbx
jmp    1030 <repeat_ch@plt>
ret

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

LLVM IR (-O2):
define void @erase(i32 %0) {
%2 = icmp slt i32 %0, 1
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = tail call i32 @repeat_ch(i8 signext 8, i32 %0)
%5 = tail call i32 @repeat_ch(i8 signext 32, i32 %0)
%6 = tail call i32 @repeat_ch(i8 signext 8, i32 %0)
br label %7
7: ; preds = %1, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isascii(int);
void t_isascii_0xc5() {
  Assert_real((isascii(197) == 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_isascii.c",
              990, ("isascii should be 0 for 0xc5"));
}


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

x86 assembly (clang, -O2):
<t_isascii_0xc5>:
push   %rax
mov    $0xc5,%edi
call   1030 <isascii@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x3de,%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_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 0 for 0xc5\00"
define void @t_isascii_0xc5() {
%1 = call i64 @isascii(i32 197)
%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 990, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 0 for 0xc5\00"
define void @t_isascii_0xc5() {
%1 = tail call i64 @isascii(i32 197)
%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 990, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ cs_path;

/* Variables and functions */
int cfg_source_file(char *);
int /*<<< orphan*/ get_cs_path(char const *, char *, int);
int source_cs(const char name[]) {
  char cs_path[4096];
  get_cs_path(name, cs_path, sizeof(cs_path));
  return cfg_source_file(cs_path);
}


x86 assembly (clang, -O0):
<source_cs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1010,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x1010(%rbp),%rsi
mov    $0x1000,%edx
call   1040 <get_cs_path@plt>
lea    -0x1010(%rbp),%rdi
call   1030 <cfg_source_file@plt>
add    $0x1010,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<source_cs>:
push   %rbx
sub    $0x1000,%rsp
mov    %rsp,%rbx
mov    %rbx,%rsi
mov    $0x1000,%edx
call   1040 <get_cs_path@plt>
mov    %rbx,%rdi
call   1030 <cfg_source_file@plt>
add    $0x1000,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @source_cs(i8* %0) {
%2 = alloca i8*
%3 = alloca [4096 x i8]
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = getelementptr inbounds [4096 x i8], [4096 x i8]* %3, i64 0, i64 0
%6 = call i32 @get_cs_path(i8* %4, i8* %5, i32 4096)
%7 = getelementptr inbounds [4096 x i8], [4096 x i8]* %3, i64 0, i64 0
%8 = call i32 @cfg_source_file(i8* %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @source_cs(i8* %0) {
%2 = alloca [4096 x i8]
%3 = getelementptr inbounds [4096 x i8], [4096 x i8]* %2, i64 0, i64 0
%4 = call i32 @get_cs_path(i8* %0, i8* %3, i32 4096)
%5 = call i32 @cfg_source_file(i8* %3)
ret i32 %5
}
void TIME_Create(void) {
  (*((volatile unsigned long *)0xE000400C)) =
      (12000000 * 5) / 1 / (1000000) - 1;
  (*((volatile unsigned long *)0xE0004008)) = 0;
  (*((volatile unsigned long *)0xE0004004)) = 1;
}


x86 assembly (clang, -O0):
<TIME_Create>:
push   %rbp
mov    %rsp,%rbp
mov    $0xe000400c,%eax
movq   $0x3b,(%rax)
mov    $0xe0004008,%eax
movq   $0x0,(%rax)
mov    $0xe0004004,%eax
movq   $0x1,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<TIME_Create>:
mov    $0xe0004004,%eax
movq   $0x3b,0x8(%rax)
movq   $0x0,0x4(%rax)
movq   $0x1,(%rax)
ret

LLVM IR (-O0):
define void @TIME_Create() {
store volatile i64 59, i64* inttoptr (i64 3758112780 to i64*)
store volatile i64 0, i64* inttoptr (i64 3758112776 to i64*)
store volatile i64 1, i64* inttoptr (i64 3758112772 to i64*)
ret void
}

LLVM IR (-O2):
define void @TIME_Create() {
store volatile i64 59, i64* inttoptr (i64 3758112780 to i64*)
store volatile i64 0, i64* inttoptr (i64 3758112776 to i64*)
store volatile i64 1, i64* inttoptr (i64 3758112772 to i64*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ DATA_pore();
int /*<<< orphan*/ LibraryHeader(char *, char *);
int /*<<< orphan*/ STARTUP_pore();
LIBRARY_pore() {
  LibraryHeader("pore", "Sat Feb  1 10:41:26 2014 ");
  DATA_pore();
  STARTUP_pore();
}


x86 assembly (clang, -O0):
<LIBRARY_pore>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
lea    0xebf(%rip),%rsi
call   1040 <LibraryHeader@plt>
mov    $0x0,%al
call   1050 <DATA_pore@plt>
mov    $0x0,%al
call   1030 <STARTUP_pore@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LIBRARY_pore>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0xec6(%rip),%rsi
call   1040 <LibraryHeader@plt>
xor    %eax,%eax
call   1050 <DATA_pore@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <STARTUP_pore@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"pore\00"
@.str.1 = [26 x i8] c"Sat Feb 1 10:41:26 2014 \00"
define i32 @LIBRARY_pore() {
%1 = alloca i32
%2 = call i32 @LibraryHeader(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 (...) @DATA_pore()
%4 = call i32 (...) @STARTUP_pore()
%5 = load i32, i32* %1
ret i32 %5
}

LLVM IR (-O2):
@.str = [5 x i8] c"pore\00"
@.str.1 = [26 x i8] c"Sat Feb 1 10:41:26 2014 \00"
define i32 @LIBRARY_pore() {
%1 = tail call i32 @LibraryHeader(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 (...) @DATA_pore()
%3 = tail call i32 (...) @STARTUP_pore()
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char *);
int resp_ok(char *response) {
  strcpy(response, "ok ");
  return 3;
}


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

x86 assembly (clang, -O2):
<resp_ok>:
push   %rax
lea    0xee8(%rip),%rsi
call   1030 <strcpy@plt>
mov    $0x3,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"ok \00"
define i32 @resp_ok(i8* %0) {
%2 = tail call i32 @strcpy(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret i32 3
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void PrintHelpPrompt(char *name) {
  fprintf(stderr, "Try '%s --help' for more information.\n", name);
}


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

x86 assembly (clang, -O2):
<PrintHelpPrompt>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [39 x i8] c"Try '%s --help' for more information.\0A\00"
define void @PrintHelpPrompt(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 ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [39 x i8] c"Try '%s --help' for more information.\0A\00"
define void @PrintHelpPrompt(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ prims(int **);
void main() {
  int graph[5][5] = {
      {0, 2, 0, 6, 0}, {2, 0, 3, 8, 5}, {0, 3, 0, 0, 7},
      {6, 8, 0, 0, 9}, {0, 5, 7, 9, 0},
  };
  prims(graph);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
lea    -0x70(%rbp),%rdi
lea    0xecd(%rip),%rsi
mov    $0x64,%edx
call   1030 <memcpy@plt>
lea    -0x70(%rbp),%rdi
call   1040 <prims@plt>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x68,%rsp
mov    0xf46(%rip),%eax
mov    %eax,0x60(%rsp)
movaps 0xf2b(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xf0f(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xef3(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xed7(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xebb(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xe9f(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
call   1030 <prims@plt>
add    $0x68,%rsp
ret

LLVM IR (-O0):
@__const.main.graph = [5 x [5 x i32]] [[5 x i32] [i32 0, i32 2, i32 0, i32 6, i32 0], [5 x i32] [i32 2, i32 0, i32 3, i32 8, i32 5], [5 x i32] [i32 0, i32 3, i32 0, i32 0, i32 7], [5 x i32] [i32 6, i32 8, i32 0, i32 0, i32 9], [5 x i32] [i32 0, i32 5, i32 7, i32 9, i32 0]]
define void @main() {
%1 = alloca [5 x [5 x i32]]
%2 = bitcast [5 x [5 x i32]]* %1 to i8*
%3 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %1, i64 0, i64 0
%4 = bitcast [5 x i32]* %3 to i32**
%5 = call i32 @prims(i32** %4)
ret void
}

LLVM IR (-O2):
@__const.main.graph = [5 x [5 x i32]] [[5 x i32] [i32 0, i32 2, i32 0, i32 6, i32 0], [5 x i32] [i32 2, i32 0, i32 3, i32 8, i32 5], [5 x i32] [i32 0, i32 3, i32 0, i32 0, i32 7], [5 x i32] [i32 6, i32 8, i32 0, i32 0, i32 9], [5 x i32] [i32 0, i32 5, i32 7, i32 9, i32 0]]
define void @main() {
%1 = alloca [5 x [5 x i32]]
%2 = bitcast [5 x [5 x i32]]* %1 to i8*
%3 = bitcast [5 x [5 x i32]]* %1 to i32**
%4 = call i32 @prims(i32** %3)
ret void
}
void kmemleak_free_recursive(const void *ptr, unsigned long flags) {}


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

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

LLVM IR (-O0):
define void @kmemleak_free_recursive(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
ret void
}

LLVM IR (-O2):
define void @kmemleak_free_recursive(i8* nocapture %0, i64 %1) {
ret void
}
int do_595() { return 595; }


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

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

LLVM IR (-O0):
define i32 @do_595() {
ret i32 595
}

LLVM IR (-O2):
define i32 @do_595() {
ret i32 595
}
/* Variables and functions */
int exp(double);
double sumWeigtedInputs(int const, double const *, double const *);
double _sigmoid(const int numInputs, const double *inputs,
                const double *connectionWeights) {
  double weightedInputSum;
  double out;
  weightedInputSum = sumWeigtedInputs(numInputs, inputs, connectionWeights);
  out = 1 / (1 + exp(-weightedInputSum));
  return out;
}


x86 assembly (clang, -O0):
<_sigmoid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%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 <sumWeigtedInputs@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
call   1040 <exp@plt>
mov    %eax,%ecx
add    $0x1,%ecx
mov    $0x1,%eax
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_sigmoid>:
push   %rax
call   1030 <sumWeigtedInputs@plt>
xorps  0xed3(%rip),%xmm0
call   1040 <exp@plt>
lea    0x1(%rax),%ecx
add    $0x2,%eax
xor    %edx,%edx
cmp    $0x3,%eax
cmovb  %ecx,%edx
xorps  %xmm0,%xmm0
cvtsi2sd %edx,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @_sigmoid(i32 %0, double* %1, double* %2) {
%4 = alloca i32
%5 = alloca double*
%6 = alloca double*
%7 = alloca double
%8 = alloca double
store i32 %0, i32* %4
store double* %1, double** %5
store double* %2, double** %6
%9 = load i32, i32* %4
%10 = load double*, double** %5
%11 = load double*, double** %6
%12 = call double @sumWeigtedInputs(i32 %9, double* %10, double* %11)
store double %12, double* %7
%13 = load double, double* %7
%14 = fneg double %13
%15 = call i32 @exp(double %14)
%16 = add nsw i32 1, %15
%17 = sdiv i32 1, %16
%18 = sitofp i32 %17 to double
store double %18, double* %8
%19 = load double, double* %8
ret double %19
}

LLVM IR (-O2):
define double @_sigmoid(i32 %0, double* %1, double* %2) {
%4 = tail call double @sumWeigtedInputs(i32 %0, double* %1, double* %2)
%5 = fneg double %4
%6 = tail call i32 @exp(double %5)
%7 = add nsw i32 %6, 1
%8 = add i32 %6, 2
%9 = icmp ult i32 %8, 3
%10 = select i1 %9, i32 %7, i32 0
%11 = sitofp i32 %10 to double
ret double %11
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fwrite(char *, int, int, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
int strlen(char *);
void ctr_print_error(char *error, int code) {
  fwrite(error, sizeof(char), strlen(error), stderr);
  fwrite("\n", sizeof(char), 1, stderr);
  if (code > -1) {
    exit(code);
  }
}


x86 assembly (clang, -O0):
<ctr_print_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%edx
mov    0x2e83(%rip),%rax
mov    (%rax),%ecx
mov    $0x1,%esi
call   1050 <fwrite@plt>
mov    0x2e70(%rip),%rax
mov    (%rax),%ecx
lea    0xe87(%rip),%rdi
mov    $0x1,%edx
mov    %edx,%esi
call   1050 <fwrite@plt>
cmpl   $0xffffffff,-0xc(%rbp)
jle    1197 <ctr_print_error+0x67>
mov    -0xc(%rbp),%edi
call   1040 <exit@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ctr_print_error>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%r14d
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    0x2e9a(%rip),%rbp
mov    0x0(%rbp),%ecx
mov    %rbx,%rdi
mov    $0x1,%esi
mov    %eax,%edx
call   1050 <fwrite@plt>
mov    0x0(%rbp),%ecx
lea    0xe9e(%rip),%rdi
mov    $0x1,%esi
mov    $0x1,%edx
call   1050 <fwrite@plt>
test   %r14d,%r14d
jns    117b <ctr_print_error+0x4b>
pop    %rbx
pop    %r14
pop    %rbp
ret
mov    %r14d,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [2 x i8] c"\0A\00"
define void @ctr_print_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 = load i8*, i8** %3
%7 = call i32 @strlen(i8* %6)
%8 = load i32, i32* @stderr
%9 = call i32 @fwrite(i8* %5, i32 1, i32 %7, i32 %8)
%10 = load i32, i32* @stderr
%11 = call i32 @fwrite(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1, i32 1, i32 %10)
%12 = load i32, i32* %4
%13 = icmp sgt i32 %12, -1
br i1 %13, label %14, label %17
14: ; preds = %2
%15 = load i32, i32* %4
%16 = call i32 @exit(i32 %15)
unreachable
17: ; preds = %2
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [2 x i8] c"\0A\00"
define void @ctr_print_error(i8* %0, i32 %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = load i32, i32* @stderr
%5 = tail call i32 @fwrite(i8* %0, i32 1, i32 %3, i32 %4)
%6 = load i32, i32* @stderr
%7 = tail call i32 @fwrite(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1, i32 1, i32 %6)
%8 = icmp sgt i32 %1, -1
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = tail call i32 @exit(i32 %1)
unreachable
11: ; preds = %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main(void) {
  int somma = 0, n;
  do {
    scanf("%d", &n);
    somma += n;
  } while (n != 0);
  printf("%d", somma);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
xor    %ebx,%ebx
lea    0xece(%rip),%r14
lea    0xc(%rsp),%r15
nopw   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %r15,%rsi
call   1040 <scanf@plt>
mov    0xc(%rsp),%eax
add    %eax,%ebx
test   %eax,%eax
jne    1140 <main+0x20>
lea    0xea4(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
br label %3
3: ; preds = %3, %0
%4 = phi i32 [ 0, %0 ], [ %7, %3 ]
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%6 = load i32, i32* %1
%7 = add nsw i32 %6, %4
%8 = icmp eq i32 %6, 0
br i1 %8, label %9, label %3
9: ; preds = %3
%10 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i32 0
}
signed char signedchar_ignoring_unsignedshortint(signed char x,
                                                 unsigned short int y) {
  return x;
}


x86 assembly (clang, -O0):
<signedchar_ignoring_unsignedshortint>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %ax,-0x4(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define signext i8 @signedchar_ignoring_unsignedshortint(i8 signext %0, i16 zeroext %1) {
%3 = alloca i8
%4 = alloca i16
store i8 %0, i8* %3
store i16 %1, i16* %4
%5 = load i8, i8* %3
ret i8 %5
}

LLVM IR (-O2):
define signext i8 @signedchar_ignoring_unsignedshortint(i8 returned signext %0, i16 zeroext %1) {
ret i8 %0
}
reg0reg1(r0, r1, x0, x1, p0, p1) unsigned int r0, r1;
unsigned int *p0, *p1;
{
  if (r0 <= r1)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<reg0reg1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
ja     1130 <reg0reg1+0x30>
movl   $0x1,-0x4(%rbp)
jmp    1137 <reg0reg1+0x37>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<reg0reg1>:
xor    %eax,%eax
cmp    %esi,%edi
setbe  %al
ret

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

LLVM IR (-O2):
define i32 @reg0reg1(i32 %0, i32 %1, i32 %2, i32 %3, i32* nocapture readnone %4, i32* nocapture readnone %5) {
%7 = icmp ule i32 %0, %1
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
float min_ff(int /*<<< orphan*/, float);
int /*<<< orphan*/ min_fff(float, float, float);
float min_ffff(float a, float b, float c, float d) {
  return min_ff(min_fff(a, b, c), d);
}


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

x86 assembly (clang, -O2):
<min_ffff>:
push   %rax
movss  %xmm3,0x4(%rsp)
call   1030 <min_fff@plt>
mov    %eax,%edi
movss  0x4(%rsp),%xmm0
pop    %rax
jmp    1040 <min_ff@plt>

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

LLVM IR (-O2):
define float @min_ffff(float %0, float %1, float %2, float %3) {
%5 = tail call i32 @min_fff(float %0, float %1, float %2)
%6 = tail call float @min_ff(i32 %5, float %3)
ret float %6
}