// File: /workspace/github_cpp_makefile_star2_O2/snesic[P]stochastic_thin_films/initial_conditions.cpp
// Function: call_initial(double*, double*, int, double, double, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
int call_initial( double *h, double *old_sol, int  L, double dx, double b, int t0, string dir)
{  string file_name;                        // from were the init cond is called
    stringstream sim_name;
    
    if(t0==0)
    { initial_condition_sin(h,L,dx,b); initial_condition_sin(old_sol,L,dx,b);}
    else {  sim_name.str(""); sim_name<<t0;          // Read initial position from a file!!!
        file_name= dir +"/droplet_at_" + sim_name.str()+ ".txt";
        if(read_position(h,L,file_name)==1)
        {cout<< "No initial condition file, simulation aborted!" <<endl;
            return 1;}
        read_position(old_sol,L,file_name);
    }
    
return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x278, %rsp            # imm = 0x278
movq %r8, %r12
movl %ecx, %ebp
movsd %xmm0, 0x8(%rsp)
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x60(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0xf0(%rsp), %rdi
callq 0x2110
testl %ebp, %ebp
je 0x3c17
leaq 0x41fd(%rip), %rsi      # 0x7ce9
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x2a0a
leaq 0x108(%rsp), %r13
leaq 0x10(%rsp), %rsi
movq %r13, %rdi
callq 0x2270
leaq 0x10(%rsp), %rdi
callq 0x2090
leaq 0x100(%rsp), %rdi
movl %ebp, %esi
callq 0x22e0
leaq 0x3fe8(%rip), %rdx      # 0x7b18
leaq 0xd0(%rsp), %rdi
movq %r12, %rsi
callq 0x3dcc
leaq 0xb0(%rsp), %rdi
movq %r13, %rsi
callq 0x22a0
leaq 0x30(%rsp), %rdi
leaq 0xd0(%rsp), %rsi
leaq 0xb0(%rsp), %rdx
callq 0x3d65
leaq 0x4160(%rip), %rdx      # 0x7cd1
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x3d46
leaq 0x50(%rsp), %r12
leaq 0x10(%rsp), %r13
movq %r12, %rdi
movq %r13, %rsi
callq 0x21f0
movq %r13, %rdi
callq 0x2090
leaq 0x30(%rsp), %rdi
callq 0x2090
leaq 0xb0(%rsp), %rdi
callq 0x2090
leaq 0xd0(%rsp), %rdi
callq 0x2090
leaq 0x90(%rsp), %rdi
movq %r12, %rsi
callq 0x2240
leaq 0x90(%rsp), %rdx
movq %r15, %rdi
movl %ebx, %esi
callq 0x5296
movl %eax, %ebp
leaq 0x90(%rsp), %rdi
callq 0x2090
cmpl $0x1, %ebp
jne 0x3c39
movq 0x63da(%rip), %rdi      # 0x9fd8
leaq 0x3f20(%rip), %rsi      # 0x7b25
callq 0x21b0
movq %rax, %rdi
callq 0x20a0
pushq $0x1
popq %rbx
jmp 0x3c63
movq %r15, %rdi
movl %ebx, %esi
movsd 0x8(%rsp), %xmm0
callq 0x3a34
movq %r14, %rdi
movl %ebx, %esi
movsd 0x8(%rsp), %xmm0
callq 0x3a34
jmp 0x3c61
leaq 0x70(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x2240
leaq 0x70(%rsp), %rdx
movq %r14, %rdi
movl %ebx, %esi
callq 0x5296
leaq 0x70(%rsp), %rdi
callq 0x2090
xorl %ebx, %ebx
leaq 0xf0(%rsp), %rdi
callq 0x2130
leaq 0x50(%rsp), %rdi
callq 0x2090
movl %ebx, %eax
addq $0x278, %rsp            # imm = 0x278
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
jmp 0x3cdd
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
jmp 0x3cdd
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x2090
jmp 0x3cb7
movq %rax, %rbx
leaq 0xb0(%rsp), %rdi
callq 0x2090
jmp 0x3cc9
movq %rax, %rbx
leaq 0xd0(%rsp), %rdi
jmp 0x3cdd
jmp 0x3ceb
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2090
jmp 0x3cee
jmp 0x3ceb
movq %rax, %rbx
jmp 0x3cfb
movq %rax, %rbx
leaq 0xf0(%rsp), %rdi
callq 0x2130
leaq 0x50(%rsp), %rdi
callq 0x2090
movq %rbx, %rdi
callq 0x2300