// File: /workspace/github_c_makefile_star2_O1/ZmengXu[P]boxMesh/boxMesh.C
// Function: writeOwner(int, int, int, int, int, int, int)
void writeOwner(int nPoints, int nCells, int nFaces, int nExternalFaces, int Nx, int Ny, int Nz)
{
    ofstream currentFile("constant/polyMesh/owner");

    currentFile << "/*--------------------------------*- C++ -*----------------------------------*\\\n";
    currentFile << "| =========                 |                                                 |\n";
    currentFile << "| \\\\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |\n";
    currentFile << "|  \\\\    /   O peration     | Version:  2.3.0                                 |\n";
    currentFile << "|   \\\\  /    A nd           | Web:      www.OpenFOAM.org                      |\n";
    currentFile << "|    \\\\/     M anipulation  |                                                 |\n";
    currentFile << "\\*---------------------------------------------------------------------------*/\n";
    currentFile << "FoamFile\n";
    currentFile << "{\n";
    currentFile << "    version     2.0;\n";
    currentFile << "    format      ascii;\n";
    currentFile << "    class       labelList;\n";

    ostringstream convert;
    convert << "    note        \"nPoints: " << nPoints << " nCells: " << nCells << " nFaces: " << nFaces << " nInternalFaces: " << nFaces-nExternalFaces << "\";\n";
    currentFile << convert.str();

    currentFile << "    location    \"constant/polyMesh\";\n";
    currentFile << "    object      owner;\n";
    currentFile << "}\n";
    currentFile << "// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //\n";
    currentFile << "\n";
    currentFile << "\n";

    convert.clear();
    convert.str("");
    convert << nFaces << "\n(\n";

    vector<int> owners;
    int size;

    int countFaces = 0;
    for (int i=0; i<nCells; i++)
    {
        owners = ownersOfInternalFacesOfCell(i, Nx, Ny, Nz);

        size = owners.size();
        for (int j=0; j<size; j++)
        {
            convert << owners[j] << "\n";
            countFaces++;
        }
        if (countFaces>CLEAR_OSTRINGSTREAM)
        {
            countFaces = 0;
            currentFile << convert.str();
            convert.clear();
            convert.str("");
        }
    }

    countFaces = 0;
    for (int i=0; i<nExternalFaces; i++)
    {
        convert << ownerOfExternalFace(i, Nx, Ny, Nz)  << "\n";
        countFaces++;
        if (countFaces>CLEAR_OSTRINGSTREAM)
        {
            countFaces = 0;
            currentFile << convert.str();
            convert.clear();
            convert.str("");
        }
    }
    currentFile << convert.str();

    currentFile << ")\n";
    currentFile << "\n";
    currentFile << "\n";
    currentFile << "// ************************************************************************* //\n";
    currentFile.close();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3c8, %rsp            # imm = 0x3C8
movl %r9d, -0x70(%rbp)
movl %r8d, -0x6c(%rbp)
movl %ecx, -0x58(%rbp)
movl %edx, %r15d
movl %esi, -0x54(%rbp)
movl %edi, %r14d
leaq 0x23b5(%rip), %rsi      # 0x6532
leaq -0x278(%rbp), %rbx
movq %rbx, %rdi
movl $0x10, %edx
callq 0x2170
leaq 0x1ea3(%rip), %rsi      # 0x603b
movl $0x50, %edx
movq %rbx, %rdi
callq 0x2180
leaq 0x1ee0(%rip), %rsi      # 0x608c
leaq -0x278(%rbp), %rdi
movl $0x50, %edx
callq 0x2180
leaq 0x1f19(%rip), %rsi      # 0x60dd
leaq -0x278(%rbp), %rdi
movl $0x50, %edx
callq 0x2180
leaq 0x1f52(%rip), %rsi      # 0x612e
leaq -0x278(%rbp), %rdi
movl $0x50, %edx
callq 0x2180
leaq 0x1f8b(%rip), %rsi      # 0x617f
leaq -0x278(%rbp), %rdi
movl $0x50, %edx
callq 0x2180
leaq 0x1fc4(%rip), %rsi      # 0x61d0
leaq -0x278(%rbp), %rdi
movl $0x50, %edx
callq 0x2180
leaq 0x1ffd(%rip), %rsi      # 0x6221
leaq -0x278(%rbp), %rdi
movl $0x50, %edx
callq 0x2180
leaq 0x2036(%rip), %rsi      # 0x6272
leaq -0x278(%rbp), %rdi
movl $0x9, %edx
callq 0x2180
leaq 0x2124(%rip), %rsi      # 0x6378
leaq -0x278(%rbp), %rdi
movl $0x2, %edx
callq 0x2180
leaq 0x2010(%rip), %rsi      # 0x627c
leaq -0x278(%rbp), %rdi
movl $0x15, %edx
callq 0x2180
leaq 0x200e(%rip), %rsi      # 0x6292
leaq -0x278(%rbp), %rdi
movl $0x17, %edx
callq 0x2180
leaq 0x221d(%rip), %rsi      # 0x64b9
leaq -0x278(%rbp), %rdi
movl $0x1b, %edx
callq 0x2180
leaq -0x3f0(%rbp), %rdi
callq 0x21a0
leaq 0x2215(%rip), %rsi      # 0x64d5
leaq -0x3f0(%rbp), %rdi
movl $0x1a, %edx
callq 0x2180
leaq -0x3f0(%rbp), %rbx
movq %rbx, %rdi
movl %r14d, %esi
callq 0x22a0
movq %rax, %r14
leaq 0x2203(%rip), %rsi      # 0x64f0
movl $0x9, %edx
movq %rax, %rdi
callq 0x2180
movq %r14, %rdi
movl -0x54(%rbp), %esi
callq 0x22a0
movq %rax, %r14
leaq 0x21eb(%rip), %rsi      # 0x64fa
movl $0x9, %edx
movq %rax, %rdi
callq 0x2180
movq %r14, %rdi
movl %r15d, %esi
callq 0x22a0
movq %rax, %r14
leaq 0x21d3(%rip), %rsi      # 0x6504
movl $0x11, %edx
movq %rax, %rdi
callq 0x2180
movl %r15d, %esi
subl -0x58(%rbp), %esi
movq %r14, %rdi
callq 0x22a0
leaq 0x1f9c(%rip), %rsi      # 0x62ef
movl $0x3, %edx
movq %rax, %rdi
callq 0x2180
leaq -0x3e8(%rbp), %rsi
leaq -0x50(%rbp), %rdi
callq 0x2240
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
leaq -0x278(%rbp), %rdi
callq 0x2180
leaq -0x40(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x439d
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x2160
leaq 0x1f29(%rip), %rsi      # 0x62cd
leaq -0x278(%rbp), %rdi
movl $0x25, %edx
callq 0x2180
leaq 0x218e(%rip), %rsi      # 0x654a
leaq -0x278(%rbp), %rdi
movl $0x17, %edx
callq 0x2180
leaq 0x2020(%rip), %rsi      # 0x63f4
leaq -0x278(%rbp), %rdi
movl $0x2, %edx
callq 0x2180
leaq 0x1f22(%rip), %rsi      # 0x630e
leaq -0x278(%rbp), %rdi
movl $0x50, %edx
callq 0x2180
leaq 0x2094(%rip), %rsi      # 0x6498
leaq -0x278(%rbp), %rdi
movl $0x1, %edx
callq 0x2180
leaq 0x207c(%rip), %rsi      # 0x6498
leaq -0x278(%rbp), %rdi
movl $0x1, %edx
callq 0x2180
movq -0x3f0(%rbp), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2280
leaq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
movq %rax, (%rdi)
leaq 0x2045(%rip), %rdx      # 0x6499
movq %rdx, %rsi
callq 0x5646
leaq -0x50(%rbp), %rsi
leaq -0x3e8(%rbp), %rdi
callq 0x21f0
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x4485
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x2160
leaq -0x3f0(%rbp), %rdi
movl %r15d, %esi
callq 0x22a0
leaq 0x1ffb(%rip), %rsi      # 0x6496
movl $0x3, %edx
movq %rax, %rdi
callq 0x2180
xorl %r14d, %r14d
cmpl $0x0, -0x54(%rbp)
jle 0x4635
leaq 0x1fdc(%rip), %r13      # 0x6498
movl $0x0, -0x5c(%rbp)
xorl %r15d, %r15d
xorl %ebx, %ebx
leaq -0x50(%rbp), %rdi
movq %r14, -0x78(%rbp)
movl %r14d, %esi
movl -0x6c(%rbp), %edx
movl -0x70(%rbp), %ecx
movl 0x10(%rbp), %r8d
callq 0x4926
movq -0x50(%rbp), %r12
movq -0x48(%rbp), %r14
movq -0x40(%rbp), %rax
movq %rax, -0x68(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0x50(%rbp)
movq $0x0, -0x40(%rbp)
testq %r15, %r15
je 0x4514
subq %r15, %rbx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2160
movq -0x50(%rbp), %rdi
testq %rdi, %rdi
je 0x4529
movq -0x40(%rbp), %rsi
subq %rdi, %rsi
callq 0x2160
subq %r12, %r14
shrq $0x2, %r14
testl %r14d, %r14d
leaq -0x3f0(%rbp), %r15
jle 0x456d
addl %r14d, -0x5c(%rbp)
andl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
xorl %ebx, %ebx
movl (%r12,%rbx,4), %esi
movq %r15, %rdi
callq 0x22a0
movl $0x1, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x2180
incq %rbx
cmpq %rbx, %r14
jne 0x4549
cmpl $0xf4240, -0x5c(%rbp)   # imm = 0xF4240
movq -0x78(%rbp), %r14
jle 0x461c
leaq -0x50(%rbp), %rbx
movq %rbx, %rdi
leaq -0x3e8(%rbp), %rsi
callq 0x2240
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
leaq -0x278(%rbp), %rdi
callq 0x2180
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x45be
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x2160
movq -0x3f0(%rbp), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
xorl %esi, %esi
callq 0x2280
leaq -0x40(%rbp), %rax
movq %rax, -0x50(%rbp)
movq %rbx, %rdi
leaq 0x1eb4(%rip), %rdx      # 0x6499
movq %rdx, %rsi
callq 0x5646
leaq -0x3e8(%rbp), %rdi
movq %rbx, %rsi
callq 0x21f0
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x4615
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x2160
movl $0x0, -0x5c(%rbp)
incl %r14d
movq %r12, %r15
movq -0x68(%rbp), %rax
movq %rax, %rbx
cmpl -0x54(%rbp), %r14d
jne 0x44c8
jmp 0x463a
xorl %eax, %eax
xorl %r12d, %r12d
movq %rax, -0x68(%rbp)
cmpl $0x0, -0x58(%rbp)
jle 0x4740
xorl %ebx, %ebx
leaq -0x50(%rbp), %r13
leaq 0x1e44(%rip), %r14      # 0x6499
xorl %r15d, %r15d
movl %ebx, %edi
movl -0x6c(%rbp), %esi
movl -0x70(%rbp), %edx
movl 0x10(%rbp), %ecx
callq 0x4a33
leaq -0x3f0(%rbp), %rdi
movl %eax, %esi
callq 0x22a0
movl $0x1, %edx
movq %rax, %rdi
leaq 0x1e13(%rip), %rsi      # 0x6498
callq 0x2180
cmpl $0xf4240, %r15d         # imm = 0xF4240
jl 0x4732
movq %r13, %rdi
leaq -0x3e8(%rbp), %rsi
callq 0x2240
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
leaq -0x278(%rbp), %rdi
callq 0x2180
leaq -0x3f0(%rbp), %r15
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x46da
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x2160
movq -0x3f0(%rbp), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
xorl %esi, %esi
callq 0x2280
leaq -0x40(%rbp), %rax
movq %rax, -0x50(%rbp)
movq %r13, %rdi
movq %r14, %rsi
movq %r14, %rdx
callq 0x5646
leaq -0x3e8(%rbp), %rdi
movq %r13, %rsi
callq 0x21f0
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x472d
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x2160
xorl %r15d, %r15d
jmp 0x4735
incl %r15d
incl %ebx
cmpl %ebx, -0x58(%rbp)
jne 0x4658
leaq -0x50(%rbp), %rdi
leaq -0x3e8(%rbp), %rsi
callq 0x2240
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
leaq -0x278(%rbp), %rdi
callq 0x2180
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x477d
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x2160
leaq 0x1c73(%rip), %rsi      # 0x63f7
leaq -0x278(%rbp), %rdi
movl $0x2, %edx
callq 0x2180
leaq 0x1cfc(%rip), %rsi      # 0x6498
leaq -0x278(%rbp), %rdi
movl $0x1, %edx
callq 0x2180
leaq 0x1ce4(%rip), %rsi      # 0x6498
leaq -0x278(%rbp), %rdi
movl $0x1, %edx
callq 0x2180
leaq 0x1c2e(%rip), %rsi      # 0x63fa
leaq -0x278(%rbp), %rdi
movl $0x50, %edx
callq 0x2180
leaq -0x278(%rbp), %rdi
callq 0x21b0
testq %r12, %r12
je 0x47fd
movq -0x68(%rbp), %rsi
subq %r12, %rsi
movq %r12, %rdi
callq 0x2160
movq 0x47ac(%rip), %rsi      # 0x8fb0
leaq -0x3f0(%rbp), %rdi
callq 0x20d0
leaq -0x380(%rbp), %rdi
callq 0x2070
movq 0x4785(%rip), %rax      # 0x8fa8
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq -0x270(%rbp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, -0x278(%rbp,%rcx)
callq 0x2120
leaq -0x180(%rbp), %rdi
callq 0x2070
addq $0x3c8, %rsp            # imm = 0x3C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x48a6
jmp 0x48dc
movq %rax, %r14
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
jmp 0x4882
jmp 0x48c9
movq %rax, %r14
leaq -0x40(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x48f3
movq -0x40(%rbp), %rsi
incq %rsi
jmp 0x48ee
jmp 0x48c9
jmp 0x48c4
jmp 0x48dc
jmp 0x48a6
jmp 0x48dc
jmp 0x48dc
jmp 0x48dc
jmp 0x48a6
jmp 0x48a6
jmp 0x48dc
jmp 0x48dc
movq %rax, %r14
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x48df
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x2160
jmp 0x48df
movq %rax, %r14
jmp 0x4912
movq %rax, %r14
jmp 0x48f3
movq %rax, %r14
movq %rbx, -0x68(%rbp)
movq %r15, %r12
jmp 0x48df
jmp 0x48dc
movq %rax, %r14
testq %r12, %r12
je 0x48f3
movq -0x68(%rbp), %rsi
subq %r12, %rsi
movq %r12, %rdi
callq 0x2160
movq 0x46b6(%rip), %rsi      # 0x8fb0
leaq -0x3f0(%rbp), %rdi
callq 0x20d0
leaq -0x380(%rbp), %rdi
callq 0x2070
leaq -0x278(%rbp), %rdi
callq 0x21e0
movq %r14, %rdi
callq 0x22b0