// File: 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
movq %rsp, %rbp
subq $0x340, %rsp            # imm = 0x340
movq %r8, -0x2f0(%rbp)
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movsd %xmm0, -0x28(%rbp)
movsd %xmm1, -0x30(%rbp)
movl %ecx, -0x34(%rbp)
movq %r8, -0x40(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x3370
leaq -0x1e8(%rbp), %rdi
callq 0x31a0
jmp 0x6985
cmpl $0x0, -0x34(%rbp)
jne 0x69d3
movq -0x10(%rbp), %rdi
movl -0x1c(%rbp), %esi
movsd -0x28(%rbp), %xmm0
movsd -0x30(%rbp), %xmm1
callq 0x6890
movq -0x18(%rbp), %rdi
movl -0x1c(%rbp), %esi
movsd -0x28(%rbp), %xmm0
movsd -0x30(%rbp), %xmm1
callq 0x6890
jmp 0x6cf2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1f0(%rbp)
movl %eax, -0x1f4(%rbp)
jmp 0x6d30
leaq -0x219(%rbp), %rdi
movq %rdi, -0x2f8(%rbp)
callq 0x3430
movq -0x2f8(%rbp), %rdx
leaq 0x534d(%rip), %rsi      # 0xbd41
leaq -0x218(%rbp), %rdi
callq 0x3f80
jmp 0x6a02
leaq -0x1e8(%rbp), %rdi
leaq -0x218(%rbp), %rsi
callq 0x32e0
jmp 0x6a17
leaq -0x218(%rbp), %rdi
callq 0x3140
leaq -0x219(%rbp), %rdi
callq 0x32b0
leaq -0x1d8(%rbp), %rdi
movl -0x34(%rbp), %esi
callq 0x3400
jmp 0x6a40
movq -0x2f0(%rbp), %rsi
leaq 0x510a(%rip), %rdx      # 0xbb58
leaq -0x280(%rbp), %rdi
callq 0x6f20
jmp 0x6a5c
leaq -0x2a0(%rbp), %rdi
leaq -0x1e8(%rbp), %rsi
callq 0x3260
jmp 0x6a71
leaq -0x260(%rbp), %rdi
leaq -0x280(%rbp), %rsi
leaq -0x2a0(%rbp), %rdx
callq 0x6e50
jmp 0x6a8d
leaq 0x5295(%rip), %rdx      # 0xbd29
leaq -0x240(%rbp), %rdi
leaq -0x260(%rbp), %rsi
callq 0x6e00
jmp 0x6aa9
leaq -0x60(%rbp), %rdi
movq %rdi, -0x310(%rbp)
leaq -0x240(%rbp), %rsi
movq %rsi, -0x318(%rbp)
callq 0x3310
movq -0x318(%rbp), %rdi
callq 0x3140
leaq -0x260(%rbp), %rdi
callq 0x3140
leaq -0x2a0(%rbp), %rdi
callq 0x3140
leaq -0x280(%rbp), %rdi
callq 0x3140
movq -0x310(%rbp), %rsi
movq -0x10(%rbp), %rax
movq %rax, -0x308(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x2fc(%rbp)
leaq -0x2c0(%rbp), %rdi
callq 0x30e0
jmp 0x6b20
movl -0x2fc(%rbp), %esi
movq -0x308(%rbp), %rdi
leaq -0x2c0(%rbp), %rdx
callq 0x96c0
movl %eax, -0x31c(%rbp)
jmp 0x6b41
leaq -0x2c0(%rbp), %rdi
callq 0x3140
movl -0x31c(%rbp), %eax
cmpl $0x1, %eax
jne 0x6c83
movq 0x8475(%rip), %rdi      # 0xefd8
leaq 0x4ffb(%rip), %rsi      # 0xbb65
callq 0x3270
movq %rax, -0x328(%rbp)
jmp 0x6b78
movq -0x328(%rbp), %rdi
movq 0x8442(%rip), %rsi      # 0xefc8
callq 0x3290
jmp 0x6b8d
movl $0x1, -0x4(%rbp)
movl $0x1, -0x2c4(%rbp)
jmp 0x6d03
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1f0(%rbp)
movl %eax, -0x1f4(%rbp)
jmp 0x6bd5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1f0(%rbp)
movl %eax, -0x1f4(%rbp)
leaq -0x218(%rbp), %rdi
callq 0x3140
leaq -0x219(%rbp), %rdi
callq 0x32b0
jmp 0x6d24
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1f0(%rbp)
movl %eax, -0x1f4(%rbp)
jmp 0x6d24
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1f0(%rbp)
movl %eax, -0x1f4(%rbp)
jmp 0x6c4f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1f0(%rbp)
movl %eax, -0x1f4(%rbp)
jmp 0x6c43
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1f0(%rbp)
movl %eax, -0x1f4(%rbp)
leaq -0x260(%rbp), %rdi
callq 0x3140
leaq -0x2a0(%rbp), %rdi
callq 0x3140
leaq -0x280(%rbp), %rdi
callq 0x3140
jmp 0x6d24
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1f0(%rbp)
movl %eax, -0x1f4(%rbp)
leaq -0x2c0(%rbp), %rdi
callq 0x3140
jmp 0x6d24
movq -0x18(%rbp), %rax
movq %rax, -0x338(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x32c(%rbp)
leaq -0x2e8(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x30e0
jmp 0x6ca9
movl -0x32c(%rbp), %esi
movq -0x338(%rbp), %rdi
leaq -0x2e8(%rbp), %rdx
callq 0x96c0
jmp 0x6cc4
leaq -0x2e8(%rbp), %rdi
callq 0x3140
jmp 0x6cf2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1f0(%rbp)
movl %eax, -0x1f4(%rbp)
leaq -0x2e8(%rbp), %rdi
callq 0x3140
jmp 0x6d24
movl $0x0, -0x4(%rbp)
movl $0x1, -0x2c4(%rbp)
leaq -0x1e8(%rbp), %rdi
callq 0x31c0
leaq -0x60(%rbp), %rdi
callq 0x3140
movl -0x4(%rbp), %eax
addq $0x340, %rsp            # imm = 0x340
popq %rbp
retq
leaq -0x1e8(%rbp), %rdi
callq 0x31c0
leaq -0x60(%rbp), %rdi
callq 0x3140
movq -0x1f0(%rbp), %rdi
callq 0x3420
nopw %cs:(%rax,%rax)