// File: /workspace/github_c_makefile_star2_O0/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
subq $0x560, %rsp            # imm = 0x560
movl 0x10(%rbp), %eax
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
movl %ecx, -0x10(%rbp)
movl %r8d, -0x14(%rbp)
movl %r9d, -0x18(%rbp)
leaq 0x4f4d(%rip), %rsi      # 0x9516
leaq -0x218(%rbp), %rdi
movq %rdi, -0x4e8(%rbp)
movl $0x10, %edx
callq 0x2210
movq -0x4e8(%rbp), %rdi
leaq 0x4a30(%rip), %rsi      # 0x901f
callq 0x21b0
jmp 0x45f6
leaq 0x4a73(%rip), %rsi      # 0x9070
leaq -0x218(%rbp), %rdi
callq 0x21b0
jmp 0x460b
leaq 0x4aaf(%rip), %rsi      # 0x90c1
leaq -0x218(%rbp), %rdi
callq 0x21b0
jmp 0x4620
leaq 0x4aeb(%rip), %rsi      # 0x9112
leaq -0x218(%rbp), %rdi
callq 0x21b0
jmp 0x4635
leaq 0x4b27(%rip), %rsi      # 0x9163
leaq -0x218(%rbp), %rdi
callq 0x21b0
jmp 0x464a
leaq 0x4b63(%rip), %rsi      # 0x91b4
leaq -0x218(%rbp), %rdi
callq 0x21b0
jmp 0x465f
leaq 0x4b9f(%rip), %rsi      # 0x9205
leaq -0x218(%rbp), %rdi
callq 0x21b0
jmp 0x4674
leaq 0x4bdb(%rip), %rsi      # 0x9256
leaq -0x218(%rbp), %rdi
callq 0x21b0
jmp 0x4689
leaq 0x4ccc(%rip), %rsi      # 0x935c
leaq -0x218(%rbp), %rdi
callq 0x21b0
jmp 0x469e
leaq 0x4bbb(%rip), %rsi      # 0x9260
leaq -0x218(%rbp), %rdi
callq 0x21b0
jmp 0x46b3
leaq 0x4bbc(%rip), %rsi      # 0x9276
leaq -0x218(%rbp), %rdi
callq 0x21b0
jmp 0x46c8
leaq 0x4dce(%rip), %rsi      # 0x949d
leaq -0x218(%rbp), %rdi
callq 0x21b0
jmp 0x46dd
leaq -0x3a0(%rbp), %rdi
callq 0x2260
jmp 0x46eb
leaq 0x4dc7(%rip), %rsi      # 0x94b9
leaq -0x3a0(%rbp), %rdi
callq 0x21b0
movq %rax, -0x4f0(%rbp)
jmp 0x4707
movq -0x4f0(%rbp), %rdi
movl -0x4(%rbp), %esi
callq 0x2360
movq %rax, -0x4f8(%rbp)
jmp 0x471f
movq -0x4f8(%rbp), %rdi
leaq 0x4da7(%rip), %rsi      # 0x94d4
callq 0x21b0
movq %rax, -0x500(%rbp)
jmp 0x473b
movq -0x500(%rbp), %rdi
movl -0x8(%rbp), %esi
callq 0x2360
movq %rax, -0x508(%rbp)
jmp 0x4753
movq -0x508(%rbp), %rdi
leaq 0x4d7d(%rip), %rsi      # 0x94de
callq 0x21b0
movq %rax, -0x510(%rbp)
jmp 0x476f
movq -0x510(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x2360
movq %rax, -0x518(%rbp)
jmp 0x4787
movq -0x518(%rbp), %rdi
leaq 0x4d53(%rip), %rsi      # 0x94e8
callq 0x21b0
movq %rax, -0x520(%rbp)
jmp 0x47a3
movq -0x520(%rbp), %rdi
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %eax
subl %eax, %esi
callq 0x2360
movq %rax, -0x528(%rbp)
jmp 0x47c0
movq -0x528(%rbp), %rdi
leaq 0x4b05(%rip), %rsi      # 0x92d3
callq 0x21b0
jmp 0x47d5
leaq -0x3c0(%rbp), %rdi
leaq -0x3a0(%rbp), %rsi
callq 0x21e0
jmp 0x47ea
leaq -0x218(%rbp), %rdi
leaq -0x3c0(%rbp), %rsi
callq 0x2190
jmp 0x47ff
leaq -0x3c0(%rbp), %rdi
callq 0x2100
leaq 0x4a9f(%rip), %rsi      # 0x92b1
leaq -0x218(%rbp), %rdi
callq 0x21b0
jmp 0x4820
leaq 0x4d07(%rip), %rsi      # 0x952e
leaq -0x218(%rbp), %rdi
callq 0x21b0
jmp 0x4835
leaq 0x4b9c(%rip), %rsi      # 0x93d8
leaq -0x218(%rbp), %rdi
callq 0x21b0
jmp 0x484a
leaq 0x4aa1(%rip), %rsi      # 0x92f2
leaq -0x218(%rbp), %rdi
callq 0x21b0
jmp 0x485f
leaq 0x4c16(%rip), %rsi      # 0x947c
leaq -0x218(%rbp), %rdi
callq 0x21b0
jmp 0x4874
leaq 0x4c01(%rip), %rsi      # 0x947c
leaq -0x218(%rbp), %rdi
callq 0x21b0
jmp 0x4889
movq -0x3a0(%rbp), %rax
movq -0x18(%rax), %rax
leaq -0x3a0(%rbp,%rax), %rdi
xorl %esi, %esi
callq 0x2330
jmp 0x48a5
leaq -0x3e1(%rbp), %rdi
movq %rdi, -0x530(%rbp)
callq 0x2380
movq -0x530(%rbp), %rdx
leaq 0x4bb7(%rip), %rsi      # 0x947d
leaq -0x3e0(%rbp), %rdi
callq 0x5f70
jmp 0x48d4
leaq -0x3a0(%rbp), %rdi
leaq -0x3e0(%rbp), %rsi
callq 0x20c0
jmp 0x48e9
leaq -0x3e0(%rbp), %rdi
callq 0x2100
leaq -0x3e1(%rbp), %rdi
callq 0x2200
movl -0xc(%rbp), %esi
leaq -0x3a0(%rbp), %rdi
callq 0x2360
movq %rax, -0x538(%rbp)
jmp 0x4919
movq -0x538(%rbp), %rdi
leaq 0x4b53(%rip), %rsi      # 0x947a
callq 0x21b0
jmp 0x492e
leaq -0x400(%rbp), %rdi
callq 0x5e30
movl $0x0, -0x408(%rbp)
movl $0x0, -0x40c(%rbp)
movl -0x40c(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0x4c18
movl -0x40c(%rbp), %esi
movl -0x14(%rbp), %edx
movl -0x18(%rbp), %ecx
movl 0x10(%rbp), %r8d
leaq -0x428(%rbp), %rdi
callq 0x4ef0
jmp 0x497b
leaq -0x400(%rbp), %rdi
leaq -0x428(%rbp), %rsi
callq 0x6020
leaq -0x428(%rbp), %rdi
callq 0x6050
leaq -0x400(%rbp), %rdi
callq 0x60b0
movl %eax, -0x404(%rbp)
movl $0x0, -0x42c(%rbp)
movl -0x42c(%rbp), %eax
cmpl -0x404(%rbp), %eax
jge 0x4ad2
movslq -0x42c(%rbp), %rsi
leaq -0x400(%rbp), %rdi
callq 0x5f50
movl (%rax), %esi
leaq -0x3a0(%rbp), %rdi
callq 0x2360
movq %rax, -0x540(%rbp)
jmp 0x49f2
movq -0x540(%rbp), %rdi
leaq 0x4a7c(%rip), %rsi      # 0x947c
callq 0x21b0
jmp 0x4a07
movl -0x408(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x408(%rbp)
movl -0x42c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x42c(%rbp)
jmp 0x49b6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
jmp 0x4ed7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
jmp 0x4ecb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
leaq -0x3c0(%rbp), %rdi
callq 0x2100
jmp 0x4ecb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
jmp 0x4aaa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
leaq -0x3e0(%rbp), %rdi
callq 0x2100
leaq -0x3e1(%rbp), %rdi
callq 0x2200
jmp 0x4ecb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
jmp 0x4ebf
cmpl $0xf4240, -0x408(%rbp)  # imm = 0xF4240
jle 0x4c02
movl $0x0, -0x408(%rbp)
leaq -0x450(%rbp), %rdi
leaq -0x3a0(%rbp), %rsi
callq 0x21e0
jmp 0x4b01
leaq -0x218(%rbp), %rdi
leaq -0x450(%rbp), %rsi
callq 0x2190
jmp 0x4b16
leaq -0x450(%rbp), %rdi
callq 0x2100
movq -0x3a0(%rbp), %rax
movq -0x18(%rax), %rax
leaq -0x3a0(%rbp,%rax), %rdi
xorl %esi, %esi
callq 0x2330
jmp 0x4b3e
leaq -0x471(%rbp), %rdi
movq %rdi, -0x548(%rbp)
callq 0x2380
movq -0x548(%rbp), %rdx
leaq 0x491e(%rip), %rsi      # 0x947d
leaq -0x470(%rbp), %rdi
callq 0x5f70
jmp 0x4b6d
leaq -0x3a0(%rbp), %rdi
leaq -0x470(%rbp), %rsi
callq 0x20c0
jmp 0x4b82
leaq -0x470(%rbp), %rdi
callq 0x2100
leaq -0x471(%rbp), %rdi
callq 0x2200
jmp 0x4c02
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
leaq -0x450(%rbp), %rdi
callq 0x2100
jmp 0x4ebf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
jmp 0x4bf1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
leaq -0x470(%rbp), %rdi
callq 0x2100
leaq -0x471(%rbp), %rdi
callq 0x2200
jmp 0x4ebf
jmp 0x4c04
movl -0x40c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40c(%rbp)
jmp 0x494e
movl $0x0, -0x408(%rbp)
movl $0x0, -0x478(%rbp)
movl -0x478(%rbp), %eax
cmpl -0x10(%rbp), %eax
jge 0x4ddc
movl -0x478(%rbp), %edi
movl -0x14(%rbp), %esi
movl -0x18(%rbp), %edx
movl 0x10(%rbp), %ecx
callq 0x5000
movl %eax, -0x54c(%rbp)
jmp 0x4c57
movl -0x54c(%rbp), %esi
leaq -0x3a0(%rbp), %rdi
callq 0x2360
movq %rax, -0x558(%rbp)
jmp 0x4c72
movq -0x558(%rbp), %rdi
leaq 0x47fc(%rip), %rsi      # 0x947c
callq 0x21b0
jmp 0x4c87
movl -0x408(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x408(%rbp)
cmpl $0xf4240, -0x408(%rbp)  # imm = 0xF4240
jle 0x4dc6
movl $0x0, -0x408(%rbp)
leaq -0x498(%rbp), %rdi
leaq -0x3a0(%rbp), %rsi
callq 0x21e0
jmp 0x4cc5
leaq -0x218(%rbp), %rdi
leaq -0x498(%rbp), %rsi
callq 0x2190
jmp 0x4cda
leaq -0x498(%rbp), %rdi
callq 0x2100
movq -0x3a0(%rbp), %rax
movq -0x18(%rax), %rax
leaq -0x3a0(%rbp,%rax), %rdi
xorl %esi, %esi
callq 0x2330
jmp 0x4d02
leaq -0x4b9(%rbp), %rdi
movq %rdi, -0x560(%rbp)
callq 0x2380
movq -0x560(%rbp), %rdx
leaq 0x475a(%rip), %rsi      # 0x947d
leaq -0x4b8(%rbp), %rdi
callq 0x5f70
jmp 0x4d31
leaq -0x3a0(%rbp), %rdi
leaq -0x4b8(%rbp), %rsi
callq 0x20c0
jmp 0x4d46
leaq -0x4b8(%rbp), %rdi
callq 0x2100
leaq -0x4b9(%rbp), %rdi
callq 0x2200
jmp 0x4dc6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
leaq -0x498(%rbp), %rdi
callq 0x2100
jmp 0x4ebf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
jmp 0x4db5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
leaq -0x4b8(%rbp), %rdi
callq 0x2100
leaq -0x4b9(%rbp), %rdi
callq 0x2200
jmp 0x4ebf
jmp 0x4dc8
movl -0x478(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x478(%rbp)
jmp 0x4c2c
leaq -0x4e0(%rbp), %rdi
leaq -0x3a0(%rbp), %rsi
callq 0x21e0
jmp 0x4df1
leaq -0x218(%rbp), %rdi
leaq -0x4e0(%rbp), %rsi
callq 0x2190
jmp 0x4e06
leaq -0x4e0(%rbp), %rdi
callq 0x2100
leaq 0x45c2(%rip), %rsi      # 0x93db
leaq -0x218(%rbp), %rdi
callq 0x21b0
jmp 0x4e27
leaq 0x464e(%rip), %rsi      # 0x947c
leaq -0x218(%rbp), %rdi
callq 0x21b0
jmp 0x4e3c
leaq 0x4639(%rip), %rsi      # 0x947c
leaq -0x218(%rbp), %rdi
callq 0x21b0
jmp 0x4e51
leaq 0x4586(%rip), %rsi      # 0x93de
leaq -0x218(%rbp), %rdi
callq 0x21b0
jmp 0x4e66
leaq -0x218(%rbp), %rdi
callq 0x2290
jmp 0x4e74
leaq -0x400(%rbp), %rdi
callq 0x6050
leaq -0x3a0(%rbp), %rdi
callq 0x2050
leaq -0x218(%rbp), %rdi
callq 0x22c0
addq $0x560, %rsp            # imm = 0x560
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
leaq -0x4e0(%rbp), %rdi
callq 0x2100
leaq -0x400(%rbp), %rdi
callq 0x6050
leaq -0x3a0(%rbp), %rdi
callq 0x2050
leaq -0x218(%rbp), %rdi
callq 0x22c0
movq -0x220(%rbp), %rdi
callq 0x2370
nop