// File: /workspace/github_cpp_makefile_star2_O2/snesic[P]stochastic_thin_films/read_write_msg.cpp
// Function: write_in_File(double*, int, double, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
int write_in_File(double *h, int L, double dx, int j_time, string dir) // write data into files.
{
    int i;
    ofstream dat;
    string file_name;                        // Were results will be written
    stringstream sim_name;
    
    
    sim_name.str("");
    sim_name << j_time;
    
    file_name= dir + "/droplet_at_" + sim_name.str()+ ".txt";
    dat.open(file_name.c_str(), ios::out);
	dat.precision(10);
	dat<< scientific;
    for(i=0;i<L;i++)
        dat << scientific << i*dx << "  " << scientific << h[i] << endl;
    dat.close();

return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x438, %rsp            # imm = 0x438
movq %rcx, %r15
movl %edx, %ebp
movsd %xmm0, 0x8(%rsp)
movl %esi, %ebx
movq %rdi, %r14
leaq 0xb0(%rsp), %rdi
callq 0x22d0
leaq 0xa0(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x2b0(%rsp), %rdi
callq 0x2110
leaq 0x2ca9(%rip), %rsi      # 0x7ce9
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x2a0a
leaq 0x2c8(%rsp), %r12
leaq 0x10(%rsp), %rsi
movq %r12, %rdi
callq 0x2270
leaq 0x10(%rsp), %rdi
callq 0x2090
leaq 0x2c0(%rsp), %rdi
movl %ebp, %esi
callq 0x22e0
leaq 0x2a94(%rip), %rdx      # 0x7b18
leaq 0x70(%rsp), %rdi
movq %r15, %rsi
callq 0x3dcc
leaq 0x50(%rsp), %rdi
movq %r12, %rsi
callq 0x22a0
leaq 0x30(%rsp), %rdi
leaq 0x70(%rsp), %rsi
leaq 0x50(%rsp), %rdx
callq 0x3d65
leaq 0x2c18(%rip), %rdx      # 0x7cd1
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x3d46
leaq 0x90(%rsp), %r15
leaq 0x10(%rsp), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x21f0
movq %r12, %rdi
callq 0x2090
leaq 0x30(%rsp), %rdi
callq 0x2090
leaq 0x50(%rsp), %rdi
callq 0x2090
leaq 0x70(%rsp), %rdi
callq 0x2090
movq (%r15), %rsi
leaq 0xb0(%rsp), %rdi
pushq $0x10
popq %rdx
callq 0x2040
leaq 0xb0(%rsp), %r15
movq (%r15), %rax
movq -0x18(%rax), %rcx
movq $0xa, 0xb8(%rsp,%rcx)
movq -0x18(%rax), %rax
movl $0xfffffefb, %ebp       # imm = 0xFFFFFEFB
movl 0xc8(%rsp,%rax), %ecx
andl %ebp, %ecx
orl $0x100, %ecx            # imm = 0x100
movl %ecx, 0xc8(%rsp,%rax)
xorl %r13d, %r13d
testl %ebx, %ebx
cmovlel %r13d, %ebx
leaq 0x2d1a(%rip), %r12      # 0x7e7d
cmpq %r13, %rbx
je 0x51da
movq 0xb0(%rsp), %rax
movq -0x18(%rax), %rax
movl 0xc8(%rsp,%rax), %ecx
andl %ebp, %ecx
orl $0x100, %ecx            # imm = 0x100
movl %ecx, 0xc8(%rsp,%rax)
cvtsi2sd %r13d, %xmm0
mulsd 0x8(%rsp), %xmm0
movq %r15, %rdi
callq 0x22c0
movq %rax, %rdi
movq %r12, %rsi
callq 0x21b0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl %ebp, %edx
orl $0x100, %edx            # imm = 0x100
movl %edx, 0x18(%rax,%rcx)
movsd (%r14,%r13,8), %xmm0
movq %rax, %rdi
callq 0x22c0
movq %rax, %rdi
callq 0x20a0
incq %r13
jmp 0x5163
leaq 0xb0(%rsp), %rdi
callq 0x2250
leaq 0x2b0(%rsp), %rdi
callq 0x2130
leaq 0x90(%rsp), %rdi
callq 0x2090
leaq 0xb0(%rsp), %rdi
callq 0x2260
xorl %eax, %eax
addq $0x438, %rsp            # imm = 0x438
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x2090
jmp 0x5234
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x2090
jmp 0x5243
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
jmp 0x5254
jmp 0x5264
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2090
jmp 0x5267
jmp 0x5264
movq %rax, %rbx
jmp 0x5274
jmp 0x5264
movq %rax, %rbx
leaq 0x2b0(%rsp), %rdi
callq 0x2130
leaq 0x90(%rsp), %rdi
callq 0x2090
leaq 0xb0(%rsp), %rdi
callq 0x2260
movq %rbx, %rdi
callq 0x2300