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

    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      neighbour;\n";
    currentFile << "}\n";
    currentFile << "// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //\n";
    currentFile << "\n";
    currentFile << "\n";

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

    vector<int> neighbours;
    int size;

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

        size = neighbours.size();
        for (int j=0; j<size; j++)
        {
            convert << neighbours[j] << "\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 $0x500, %rsp            # imm = 0x500
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 0x5768(%rip), %rsi      # 0x9481
leaq -0x218(%rbp), %rdi
movq %rdi, -0x4a0(%rbp)
movl $0x10, %edx
callq 0x2210
movq -0x4a0(%rbp), %rdi
leaq 0x52e0(%rip), %rsi      # 0x901f
callq 0x21b0
jmp 0x3d46
leaq 0x5323(%rip), %rsi      # 0x9070
leaq -0x218(%rbp), %rdi
callq 0x21b0
jmp 0x3d5b
leaq 0x535f(%rip), %rsi      # 0x90c1
leaq -0x218(%rbp), %rdi
callq 0x21b0
jmp 0x3d70
leaq 0x539b(%rip), %rsi      # 0x9112
leaq -0x218(%rbp), %rdi
callq 0x21b0
jmp 0x3d85
leaq 0x53d7(%rip), %rsi      # 0x9163
leaq -0x218(%rbp), %rdi
callq 0x21b0
jmp 0x3d9a
leaq 0x5413(%rip), %rsi      # 0x91b4
leaq -0x218(%rbp), %rdi
callq 0x21b0
jmp 0x3daf
leaq 0x544f(%rip), %rsi      # 0x9205
leaq -0x218(%rbp), %rdi
callq 0x21b0
jmp 0x3dc4
leaq 0x548b(%rip), %rsi      # 0x9256
leaq -0x218(%rbp), %rdi
callq 0x21b0
jmp 0x3dd9
leaq 0x557c(%rip), %rsi      # 0x935c
leaq -0x218(%rbp), %rdi
callq 0x21b0
jmp 0x3dee
leaq 0x546b(%rip), %rsi      # 0x9260
leaq -0x218(%rbp), %rdi
callq 0x21b0
jmp 0x3e03
leaq 0x546c(%rip), %rsi      # 0x9276
leaq -0x218(%rbp), %rdi
callq 0x21b0
jmp 0x3e18
leaq 0x567e(%rip), %rsi      # 0x949d
leaq -0x218(%rbp), %rdi
callq 0x21b0
jmp 0x3e2d
leaq -0x3a0(%rbp), %rdi
callq 0x2260
jmp 0x3e3b
leaq 0x5677(%rip), %rsi      # 0x94b9
leaq -0x3a0(%rbp), %rdi
callq 0x21b0
movq %rax, -0x4a8(%rbp)
jmp 0x3e57
movq -0x4a8(%rbp), %rdi
movl -0x4(%rbp), %esi
callq 0x2360
movq %rax, -0x4b0(%rbp)
jmp 0x3e6f
movq -0x4b0(%rbp), %rdi
leaq 0x5657(%rip), %rsi      # 0x94d4
callq 0x21b0
movq %rax, -0x4b8(%rbp)
jmp 0x3e8b
movq -0x4b8(%rbp), %rdi
movl -0x8(%rbp), %esi
callq 0x2360
movq %rax, -0x4c0(%rbp)
jmp 0x3ea3
movq -0x4c0(%rbp), %rdi
leaq 0x562d(%rip), %rsi      # 0x94de
callq 0x21b0
movq %rax, -0x4c8(%rbp)
jmp 0x3ebf
movq -0x4c8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x2360
movq %rax, -0x4d0(%rbp)
jmp 0x3ed7
movq -0x4d0(%rbp), %rdi
leaq 0x5603(%rip), %rsi      # 0x94e8
callq 0x21b0
movq %rax, -0x4d8(%rbp)
jmp 0x3ef3
movq -0x4d8(%rbp), %rdi
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %eax
subl %eax, %esi
callq 0x2360
movq %rax, -0x4e0(%rbp)
jmp 0x3f10
movq -0x4e0(%rbp), %rdi
leaq 0x53b5(%rip), %rsi      # 0x92d3
callq 0x21b0
jmp 0x3f25
leaq -0x3c0(%rbp), %rdi
leaq -0x3a0(%rbp), %rsi
callq 0x21e0
jmp 0x3f3a
leaq -0x218(%rbp), %rdi
leaq -0x3c0(%rbp), %rsi
callq 0x2190
jmp 0x3f4f
leaq -0x3c0(%rbp), %rdi
callq 0x2100
leaq 0x534f(%rip), %rsi      # 0x92b1
leaq -0x218(%rbp), %rdi
callq 0x21b0
jmp 0x3f70
leaq 0x5583(%rip), %rsi      # 0x94fa
leaq -0x218(%rbp), %rdi
callq 0x21b0
jmp 0x3f85
leaq 0x544c(%rip), %rsi      # 0x93d8
leaq -0x218(%rbp), %rdi
callq 0x21b0
jmp 0x3f9a
leaq 0x5351(%rip), %rsi      # 0x92f2
leaq -0x218(%rbp), %rdi
callq 0x21b0
jmp 0x3faf
leaq 0x54c6(%rip), %rsi      # 0x947c
leaq -0x218(%rbp), %rdi
callq 0x21b0
jmp 0x3fc4
leaq 0x54b1(%rip), %rsi      # 0x947c
leaq -0x218(%rbp), %rdi
callq 0x21b0
jmp 0x3fd9
movq -0x3a0(%rbp), %rax
movq -0x18(%rax), %rax
leaq -0x3a0(%rbp,%rax), %rdi
xorl %esi, %esi
callq 0x2330
jmp 0x3ff5
leaq -0x3e1(%rbp), %rdi
movq %rdi, -0x4e8(%rbp)
callq 0x2380
movq -0x4e8(%rbp), %rdx
leaq 0x5467(%rip), %rsi      # 0x947d
leaq -0x3e0(%rbp), %rdi
callq 0x5f70
jmp 0x4024
leaq -0x3a0(%rbp), %rdi
leaq -0x3e0(%rbp), %rsi
callq 0x20c0
jmp 0x4039
leaq -0x3e0(%rbp), %rdi
callq 0x2100
leaq -0x3e1(%rbp), %rdi
callq 0x2200
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %eax
subl %eax, %esi
leaq -0x3a0(%rbp), %rdi
callq 0x2360
movq %rax, -0x4f0(%rbp)
jmp 0x406e
movq -0x4f0(%rbp), %rdi
leaq 0x53fe(%rip), %rsi      # 0x947a
callq 0x21b0
jmp 0x4083
leaq -0x400(%rbp), %rdi
callq 0x5e30
movl $0x0, -0x408(%rbp)
movl $0x0, -0x40c(%rbp)
movl -0x40c(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0x436d
movl -0x40c(%rbp), %esi
movl -0x14(%rbp), %edx
movl -0x18(%rbp), %ecx
movl 0x10(%rbp), %r8d
leaq -0x428(%rbp), %rdi
callq 0x4480
jmp 0x40d0
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 0x4227
movslq -0x42c(%rbp), %rsi
leaq -0x400(%rbp), %rdi
callq 0x5f50
movl (%rax), %esi
leaq -0x3a0(%rbp), %rdi
callq 0x2360
movq %rax, -0x4f8(%rbp)
jmp 0x4147
movq -0x4f8(%rbp), %rdi
leaq 0x5327(%rip), %rsi      # 0x947c
callq 0x21b0
jmp 0x415c
movl -0x408(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x408(%rbp)
movl -0x42c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x42c(%rbp)
jmp 0x410b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
jmp 0x4468
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
jmp 0x445c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
leaq -0x3c0(%rbp), %rdi
callq 0x2100
jmp 0x445c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
jmp 0x41ff
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 0x445c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
jmp 0x4450
cmpl $0xf4240, -0x408(%rbp)  # imm = 0xF4240
jle 0x4357
movl $0x0, -0x408(%rbp)
leaq -0x450(%rbp), %rdi
leaq -0x3a0(%rbp), %rsi
callq 0x21e0
jmp 0x4256
leaq -0x218(%rbp), %rdi
leaq -0x450(%rbp), %rsi
callq 0x2190
jmp 0x426b
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 0x4293
leaq -0x471(%rbp), %rdi
movq %rdi, -0x500(%rbp)
callq 0x2380
movq -0x500(%rbp), %rdx
leaq 0x51c9(%rip), %rsi      # 0x947d
leaq -0x470(%rbp), %rdi
callq 0x5f70
jmp 0x42c2
leaq -0x3a0(%rbp), %rdi
leaq -0x470(%rbp), %rsi
callq 0x20c0
jmp 0x42d7
leaq -0x470(%rbp), %rdi
callq 0x2100
leaq -0x471(%rbp), %rdi
callq 0x2200
jmp 0x4357
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
leaq -0x450(%rbp), %rdi
callq 0x2100
jmp 0x4450
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
jmp 0x4346
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 0x4450
jmp 0x4359
movl -0x40c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40c(%rbp)
jmp 0x40a3
leaq -0x498(%rbp), %rdi
leaq -0x3a0(%rbp), %rsi
callq 0x21e0
jmp 0x4382
leaq -0x218(%rbp), %rdi
leaq -0x498(%rbp), %rsi
callq 0x2190
jmp 0x4397
leaq -0x498(%rbp), %rdi
callq 0x2100
leaq 0x5031(%rip), %rsi      # 0x93db
leaq -0x218(%rbp), %rdi
callq 0x21b0
jmp 0x43b8
leaq 0x50bd(%rip), %rsi      # 0x947c
leaq -0x218(%rbp), %rdi
callq 0x21b0
jmp 0x43cd
leaq 0x50a8(%rip), %rsi      # 0x947c
leaq -0x218(%rbp), %rdi
callq 0x21b0
jmp 0x43e2
leaq 0x4ff5(%rip), %rsi      # 0x93de
leaq -0x218(%rbp), %rdi
callq 0x21b0
jmp 0x43f7
leaq -0x218(%rbp), %rdi
callq 0x2290
jmp 0x4405
leaq -0x400(%rbp), %rdi
callq 0x6050
leaq -0x3a0(%rbp), %rdi
callq 0x2050
leaq -0x218(%rbp), %rdi
callq 0x22c0
addq $0x500, %rsp            # imm = 0x500
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
leaq -0x498(%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