#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ analyse_param_ce(int, char **, int *, int *, char *, char *,
                                    char *, char *);
int /*<<< orphan*/ crossEntropy(char *, char *, char *, char *, int, int,
                                double *, double *);
int /*<<< orphan*/ print_head_snmf();
int main(int argc, char *argv[]) {
  char input_file_F[512] = "";
  char input_file_Q[512] = "";
  char input_file_I[512] = "";
  char input_file[512];
  int K = 0;
  double all_ce, missing_ce;
  int m = 2;
  print_head_snmf();
  analyse_param_ce(argc, argv, &m, &K, input_file, input_file_Q, input_file_F,
                   input_file_I);
  crossEntropy(input_file, input_file_I, input_file_Q, input_file_F, K, m,
               &all_ce, &missing_ce);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x840,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x210(%rbp),%rdi
xor    %esi,%esi
mov    $0x200,%edx
call   1040 <memset@plt>
lea    -0x410(%rbp),%rdi
xor    %esi,%esi
mov    $0x200,%edx
call   1040 <memset@plt>
lea    -0x610(%rbp),%rdi
xor    %esi,%esi
mov    $0x200,%edx
call   1040 <memset@plt>
movl   $0x0,-0x814(%rbp)
movl   $0x2,-0x82c(%rbp)
mov    $0x0,%al
call   1060 <print_head_snmf@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    -0x810(%rbp),%r8
lea    -0x410(%rbp),%r9
lea    -0x210(%rbp),%r10
lea    -0x610(%rbp),%rax
lea    -0x82c(%rbp),%rdx
lea    -0x814(%rbp),%rcx
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1050 <analyse_param_ce@plt>
lea    -0x810(%rbp),%rdi
lea    -0x610(%rbp),%rsi
lea    -0x410(%rbp),%rdx
lea    -0x210(%rbp),%rcx
mov    -0x814(%rbp),%r8d
mov    -0x82c(%rbp),%r9d
lea    -0x820(%rbp),%r10
lea    -0x828(%rbp),%rax
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1030 <crossEntropy@plt>
xor    %eax,%eax
add    $0x840,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x828,%rsp
mov    %rsi,%r12
mov    %edi,%ebp
lea    0x620(%rsp),%r14
mov    $0x200,%edx
mov    %r14,%rdi
xor    %esi,%esi
call   1040 <memset@plt>
lea    0x420(%rsp),%r15
mov    $0x200,%edx
mov    %r15,%rdi
xor    %esi,%esi
call   1040 <memset@plt>
lea    0x220(%rsp),%r13
mov    $0x200,%edx
mov    %r13,%rdi
xor    %esi,%esi
call   1040 <memset@plt>
movl   $0x0,0xc(%rsp)
movl   $0x2,0x8(%rsp)
xor    %eax,%eax
call   1060 <print_head_snmf@plt>
lea    0x8(%rsp),%rdx
lea    0xc(%rsp),%rcx
lea    0x20(%rsp),%rbx
mov    %ebp,%edi
mov    %r12,%rsi
mov    %rbx,%r8
mov    %r15,%r9
push   %r13
push   %r14
call   1050 <analyse_param_ce@plt>
add    $0x10,%rsp
mov    0xc(%rsp),%r8d
mov    0x8(%rsp),%r9d
lea    0x10(%rsp),%rax
lea    0x18(%rsp),%rbp
mov    %rbx,%rdi
mov    %r13,%rsi
mov    %r15,%rdx
mov    %r14,%rcx
push   %rax
push   %rbp
call   1030 <crossEntropy@plt>
add    $0x10,%rsp
xor    %eax,%eax
add    $0x828,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [512 x i8]
%7 = alloca [512 x i8]
%8 = alloca [512 x i8]
%9 = alloca [512 x i8]
%10 = alloca i32
%11 = alloca double
%12 = alloca double
%13 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%14 = bitcast [512 x i8]* %6 to i8*
%15 = bitcast [512 x i8]* %7 to i8*
%16 = bitcast [512 x i8]* %8 to i8*
store i32 0, i32* %10
store i32 2, i32* %13
%17 = call i32 (...) @print_head_snmf()
%18 = load i32, i32* %4
%19 = load i8**, i8*** %5
%20 = getelementptr inbounds [512 x i8], [512 x i8]* %9, i64 0, i64 0
%21 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 0
%22 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 0
%23 = getelementptr inbounds [512 x i8], [512 x i8]* %8, i64 0, i64 0
%24 = call i32 @analyse_param_ce(i32 %18, i8** %19, i32* %13, i32* %10, i8* %20, i8* %21, i8* %22, i8* %23)
%25 = getelementptr inbounds [512 x i8], [512 x i8]* %9, i64 0, i64 0
%26 = getelementptr inbounds [512 x i8], [512 x i8]* %8, i64 0, i64 0
%27 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 0
%28 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 0
%29 = load i32, i32* %10
%30 = load i32, i32* %13
%31 = call i32 @crossEntropy(i8* %25, i8* %26, i8* %27, i8* %28, i32 %29, i32 %30, double* %11, double* %12)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca [512 x i8]
%4 = alloca [512 x i8]
%5 = alloca [512 x i8]
%6 = alloca [512 x i8]
%7 = alloca i32
%8 = alloca double
%9 = alloca double
%10 = alloca i32
%11 = getelementptr inbounds [512 x i8], [512 x i8]* %3, i64 0, i64 0
%12 = getelementptr inbounds [512 x i8], [512 x i8]* %4, i64 0, i64 0
%13 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%14 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 0
%15 = bitcast i32* %7 to i8*
store i32 0, i32* %7
%16 = bitcast double* %8 to i8*
%17 = bitcast double* %9 to i8*
%18 = bitcast i32* %10 to i8*
store i32 2, i32* %10
%19 = tail call i32 (...) @print_head_snmf()
%20 = call i32 @analyse_param_ce(i32 %0, i8** %1, i32* %10, i32* %7, i8* %14, i8* %12, i8* %11, i8* %13)
%21 = load i32, i32* %7
%22 = load i32, i32* %10
%23 = call i32 @crossEntropy(i8* %14, i8* %13, i8* %12, i8* %11, i32 %21, i32 %22, double* %8, double* %9)
ret i32 0
}