// File: /workspace/github_cpp_makefile_star2_O3/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, %r15
movl %ecx, %r13d
movsd %xmm0, 0x8(%rsp)
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x80(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0xf0(%rsp), %rdi
callq 0x2120
testl %r13d, %r13d
je 0x3eef
leaq 0x20(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x4e7a(%rip), %rdx      # 0x8c79
leaq 0x10(%rsp), %rdi
movq %rdx, %rsi
callq 0x2c5a
leaq 0x108(%rsp), %r12
leaq 0x10(%rsp), %rsi
movq %r12, %rdi
callq 0x2280
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x3e3d
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x21e0
leaq 0x100(%rsp), %rdi
movl %r13d, %esi
callq 0x22f0
leaq 0x40(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq 0x30(%rsp), %rdi
callq 0x4418
leaq 0x4c3f(%rip), %rsi      # 0x8ab0
leaq 0x30(%rsp), %rdi
callq 0x2370
leaq 0x90(%rsp), %rdi
movq %r12, %rsi
callq 0x22c0
movq 0x30(%rsp), %rcx
movq 0x38(%rsp), %r8
movq 0x98(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %edi
cmpq %r13, %rcx
je 0x3eb0
movq 0x40(%rsp), %rdi
movq 0x90(%rsp), %rsi
cmpq %rdi, %rax
jbe 0x3ee0
leaq 0xa0(%rsp), %r9
movl $0xf, %edi
cmpq %r9, %rsi
je 0x3ed7
movq 0xa0(%rsp), %rdi
cmpq %rdi, %rax
jbe 0x3fc0
leaq 0x30(%rsp), %rdi
callq 0x2080
jmp 0x3fd1
testl %ebp, %ebp
jle 0x41f4
movl %ebp, %r15d
xorl %r12d, %r12d
movsd 0x4b6b(%rip), %xmm1     # 0x8a70
movsd 0x4b6b(%rip), %xmm2     # 0x8a78
movsd 0x8(%rsp), %xmm3
xorps %xmm0, %xmm0
cvtsi2sd %r12d, %xmm0
mulsd %xmm1, %xmm0
mulsd %xmm3, %xmm0
divsd %xmm2, %xmm0
callq 0x2360
movsd 0x30dc(%rip), %xmm3     # 0x7010
movsd 0x4b3c(%rip), %xmm2     # 0x8a78
movsd 0x4b2c(%rip), %xmm1     # 0x8a70
mulsd %xmm3, %xmm0
movsd 0x4b30(%rip), %xmm3     # 0x8a80
addsd %xmm3, %xmm0
movsd 0x8(%rsp), %xmm3
movsd %xmm0, (%r14,%r12,8)
incq %r12
cmpq %r12, %r15
jne 0x3f13
xorl %r14d, %r14d
xorl %r12d, %r12d
xorps %xmm0, %xmm0
cvtsi2sd %r12d, %xmm0
mulsd %xmm1, %xmm0
mulsd %xmm3, %xmm0
divsd %xmm2, %xmm0
callq 0x2360
movsd 0x8(%rsp), %xmm3
movsd 0x4ae3(%rip), %xmm2     # 0x8a78
movsd 0x4ad3(%rip), %xmm1     # 0x8a70
mulsd 0x306b(%rip), %xmm0     # 0x7010
addsd 0x4ad3(%rip), %xmm0     # 0x8a80
movsd %xmm0, (%rbx,%r12,8)
incq %r12
cmpq %r12, %r15
jne 0x3f6e
jmp 0x41f7
leaq 0x90(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x21f0
leaq 0x60(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x3ff5
movq %rsi, 0x50(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x60(%rsp)
jmp 0x3ffd
movupd (%rcx), %xmm0
movupd %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x58(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x4c40(%rip), %rsi      # 0x8c61
leaq 0x50(%rsp), %rdi
callq 0x2370
leaq 0x20(%rsp), %r12
movq %r12, 0x10(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x4053
movq %rdx, 0x10(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x20(%rsp)
jmp 0x405d
movupd (%rcx), %xmm0
movupd %xmm0, (%r12)
movq 0x8(%rax), %rdx
leaq 0x10(%rsp), %r15
movq %rdx, 0x8(%r15)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x70(%rsp), %rdi
movq %r15, %rsi
callq 0x2220
movq (%r15), %rdi
cmpq %r12, %rdi
je 0x409b
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x21e0
leaq 0x60(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x40b6
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x21e0
leaq 0xa0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x40d7
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x21e0
movq 0x30(%rsp), %rdi
cmpq %r13, %rdi
je 0x40ee
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x21e0
leaq 0xe0(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
addq %rsi, %rdx
leaq 0xd0(%rsp), %rdi
callq 0x4418
leaq 0xd0(%rsp), %rdx
movq %r14, %rdi
movl %ebp, %esi
callq 0x5fd9
movl %eax, %r14d
movq 0xd0(%rsp), %rdi
cmpq %r15, %rdi
je 0x4146
movq 0xe0(%rsp), %rsi
incq %rsi
callq 0x21e0
cmpl $0x1, %r14d
jne 0x419a
movq 0x6e85(%rip), %rbx      # 0xafd8
leaq 0x4963(%rip), %rsi      # 0x8abd
movl $0x2e, %edx
movq %rbx, %rdi
callq 0x2200
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x21c0
movsbl %al, %esi
movq 0x6e53(%rip), %rdi      # 0xafd8
callq 0x2040
movl $0x1, %r14d
movq %rax, %rdi
callq 0x2110
jmp 0x41f7
leaq 0xc0(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
addq %rsi, %rdx
leaq 0xb0(%rsp), %rdi
callq 0x4418
leaq 0xb0(%rsp), %rdx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x5fd9
movq 0xb0(%rsp), %rdi
xorl %r14d, %r14d
cmpq %r15, %rdi
je 0x41f7
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x21e0
jmp 0x41f7
xorl %r14d, %r14d
movq 0x6dba(%rip), %rsi      # 0xafb8
leaq 0xf0(%rsp), %rdi
callq 0x2140
leaq 0x170(%rsp), %rdi
callq 0x2090
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x423a
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x21e0
movl %r14d, %eax
addq $0x278, %rsp            # imm = 0x278
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0xb0(%rsp), %rdi
cmpq %r15, %rdi
je 0x4317
movq 0xc0(%rsp), %rsi
jmp 0x4303
movq %rax, %rbx
movq 0xd0(%rsp), %rdi
cmpq %r15, %rdi
je 0x4317
movq 0xe0(%rsp), %rsi
jmp 0x4303
movq %rax, %rbx
leaq 0x60(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x42b1
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x21e0
jmp 0x42b1
movq %rax, %rbx
leaq 0xa0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x42d9
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x21e0
jmp 0x42d9
jmp 0x42d6
movq %rax, %rbx
movq 0x30(%rsp), %rdi
cmpq %r13, %rdi
je 0x4317
movq 0x40(%rsp), %rsi
jmp 0x4303
jmp 0x4314
movq %rax, %rbx
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x4317
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x21e0
jmp 0x4317
jmp 0x4314
movq %rax, %rbx
jmp 0x4338
movq %rax, %rbx
movq 0x6c9a(%rip), %rsi      # 0xafb8
leaq 0xf0(%rsp), %rdi
callq 0x2140
leaq 0x170(%rsp), %rdi
callq 0x2090
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x435a
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x21e0
movq %rbx, %rdi
callq 0x2310