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

    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       faceList;\n";
    currentFile << "    location    \"constant/polyMesh\";\n";
    currentFile << "    object      faces;\n";
    currentFile << "}\n";
    currentFile << "// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //\n";
    currentFile << "\n";
    currentFile << "\n";

    ostringstream convert;
    convert << nFaces << "\n(\n";

    vector<int> points;
    vector<Points> faces;
    int size;

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

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

    countFaces = 0;
    for (int i=0; i<nExternalFaces; i++)
    {
        points = pointsOfExternalFace(i, Nx, Ny, Nz);
        convert << "4(" <<  points[0] << " " << points[1] << " " << points[2] << " " << points[3] << ")\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 $0x570, %rsp            # imm = 0x570
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 0x6b09(%rip), %rsi      # 0x942f
leaq -0x218(%rbp), %rdi
movq %rdi, -0x4d0(%rbp)
movl $0x10, %edx
callq 0x2210
movq -0x4d0(%rbp), %rdi
leaq 0x66d3(%rip), %rsi      # 0x901f
callq 0x21b0
jmp 0x2953
leaq 0x6716(%rip), %rsi      # 0x9070
leaq -0x218(%rbp), %rdi
callq 0x21b0
jmp 0x2968
leaq 0x6752(%rip), %rsi      # 0x90c1
leaq -0x218(%rbp), %rdi
callq 0x21b0
jmp 0x297d
leaq 0x678e(%rip), %rsi      # 0x9112
leaq -0x218(%rbp), %rdi
callq 0x21b0
jmp 0x2992
leaq 0x67ca(%rip), %rsi      # 0x9163
leaq -0x218(%rbp), %rdi
callq 0x21b0
jmp 0x29a7
leaq 0x6806(%rip), %rsi      # 0x91b4
leaq -0x218(%rbp), %rdi
callq 0x21b0
jmp 0x29bc
leaq 0x6842(%rip), %rsi      # 0x9205
leaq -0x218(%rbp), %rdi
callq 0x21b0
jmp 0x29d1
leaq 0x687e(%rip), %rsi      # 0x9256
leaq -0x218(%rbp), %rdi
callq 0x21b0
jmp 0x29e6
leaq 0x696f(%rip), %rsi      # 0x935c
leaq -0x218(%rbp), %rdi
callq 0x21b0
jmp 0x29fb
leaq 0x685e(%rip), %rsi      # 0x9260
leaq -0x218(%rbp), %rdi
callq 0x21b0
jmp 0x2a10
leaq 0x685f(%rip), %rsi      # 0x9276
leaq -0x218(%rbp), %rdi
callq 0x21b0
jmp 0x2a25
leaq 0x6a1b(%rip), %rsi      # 0x9447
leaq -0x218(%rbp), %rdi
callq 0x21b0
jmp 0x2a3a
leaq 0x6870(%rip), %rsi      # 0x92b1
leaq -0x218(%rbp), %rdi
callq 0x21b0
jmp 0x2a4f
leaq 0x6a0c(%rip), %rsi      # 0x9462
leaq -0x218(%rbp), %rdi
callq 0x21b0
jmp 0x2a64
leaq 0x696d(%rip), %rsi      # 0x93d8
leaq -0x218(%rbp), %rdi
callq 0x21b0
jmp 0x2a79
leaq 0x6872(%rip), %rsi      # 0x92f2
leaq -0x218(%rbp), %rdi
callq 0x21b0
jmp 0x2a8e
leaq 0x69e7(%rip), %rsi      # 0x947c
leaq -0x218(%rbp), %rdi
callq 0x21b0
jmp 0x2aa3
leaq 0x69d2(%rip), %rsi      # 0x947c
leaq -0x218(%rbp), %rdi
callq 0x21b0
jmp 0x2ab8
leaq -0x3a0(%rbp), %rdi
callq 0x2260
jmp 0x2ac6
movl -0x8(%rbp), %esi
leaq -0x3a0(%rbp), %rdi
callq 0x2360
movq %rax, -0x4d8(%rbp)
jmp 0x2ade
movq -0x4d8(%rbp), %rdi
leaq 0x698e(%rip), %rsi      # 0x947a
callq 0x21b0
jmp 0x2af3
leaq -0x3b8(%rbp), %rdi
callq 0x5e30
leaq -0x3d0(%rbp), %rdi
callq 0x5e50
movl $0x0, -0x3d8(%rbp)
movl $0x0, -0x3dc(%rbp)
movl -0x3dc(%rbp), %eax
cmpl -0x4(%rbp), %eax
jge 0x2ea7
movl -0x3dc(%rbp), %esi
movl -0x10(%rbp), %edx
movl -0x14(%rbp), %ecx
movl -0x18(%rbp), %r8d
leaq -0x3f8(%rbp), %rdi
callq 0x32c0
jmp 0x2b4c
leaq -0x3d0(%rbp), %rdi
leaq -0x3f8(%rbp), %rsi
callq 0x5e70
leaq -0x3f8(%rbp), %rdi
callq 0x5ea0
leaq -0x3d0(%rbp), %rdi
callq 0x5f00
movl %eax, -0x3d4(%rbp)
movl $0x0, -0x3fc(%rbp)
movl -0x3fc(%rbp), %eax
cmpl -0x3d4(%rbp), %eax
jge 0x2d61
leaq 0x68de(%rip), %rsi      # 0x947e
leaq -0x3a0(%rbp), %rdi
callq 0x21b0
movq %rax, -0x4e0(%rbp)
jmp 0x2bb5
movslq -0x3fc(%rbp), %rsi
leaq -0x3d0(%rbp), %rdi
callq 0x5f30
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x5f50
movq -0x4e0(%rbp), %rdi
movl (%rax), %esi
callq 0x2360
movq %rax, -0x4e8(%rbp)
jmp 0x2beb
movq -0x4e8(%rbp), %rdi
leaq 0x67c0(%rip), %rsi      # 0x93b9
callq 0x21b0
movq %rax, -0x4f0(%rbp)
jmp 0x2c07
movslq -0x3fc(%rbp), %rsi
leaq -0x3d0(%rbp), %rdi
callq 0x5f30
movq %rax, %rdi
movl $0x1, %esi
callq 0x5f50
movq -0x4f0(%rbp), %rdi
movl (%rax), %esi
callq 0x2360
movq %rax, -0x4f8(%rbp)
jmp 0x2c3e
movq -0x4f8(%rbp), %rdi
leaq 0x676d(%rip), %rsi      # 0x93b9
callq 0x21b0
movq %rax, -0x500(%rbp)
jmp 0x2c5a
movslq -0x3fc(%rbp), %rsi
leaq -0x3d0(%rbp), %rdi
callq 0x5f30
movq %rax, %rdi
movl $0x2, %esi
callq 0x5f50
movq -0x500(%rbp), %rdi
movl (%rax), %esi
callq 0x2360
movq %rax, -0x508(%rbp)
jmp 0x2c91
movq -0x508(%rbp), %rdi
leaq 0x671a(%rip), %rsi      # 0x93b9
callq 0x21b0
movq %rax, -0x510(%rbp)
jmp 0x2cad
movslq -0x3fc(%rbp), %rsi
leaq -0x3d0(%rbp), %rdi
callq 0x5f30
movq %rax, %rdi
movl $0x3, %esi
callq 0x5f50
movq -0x510(%rbp), %rdi
movl (%rax), %esi
callq 0x2360
movq %rax, -0x518(%rbp)
jmp 0x2ce4
movq -0x518(%rbp), %rdi
leaq 0x66e9(%rip), %rsi      # 0x93db
callq 0x21b0
jmp 0x2cf9
movl -0x3d8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3d8(%rbp)
movl -0x3fc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3fc(%rbp)
jmp 0x2b87
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
jmp 0x329a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
jmp 0x328e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
jmp 0x3276
cmpl $0xf4240, -0x3d8(%rbp)  # imm = 0xF4240
jle 0x2e91
movl $0x0, -0x3d8(%rbp)
leaq -0x420(%rbp), %rdi
leaq -0x3a0(%rbp), %rsi
callq 0x21e0
jmp 0x2d90
leaq -0x218(%rbp), %rdi
leaq -0x420(%rbp), %rsi
callq 0x2190
jmp 0x2da5
leaq -0x420(%rbp), %rdi
callq 0x2100
movq -0x3a0(%rbp), %rax
movq -0x18(%rax), %rax
leaq -0x3a0(%rbp,%rax), %rdi
xorl %esi, %esi
callq 0x2330
jmp 0x2dcd
leaq -0x441(%rbp), %rdi
movq %rdi, -0x520(%rbp)
callq 0x2380
movq -0x520(%rbp), %rdx
leaq 0x668f(%rip), %rsi      # 0x947d
leaq -0x440(%rbp), %rdi
callq 0x5f70
jmp 0x2dfc
leaq -0x3a0(%rbp), %rdi
leaq -0x440(%rbp), %rsi
callq 0x20c0
jmp 0x2e11
leaq -0x440(%rbp), %rdi
callq 0x2100
leaq -0x441(%rbp), %rdi
callq 0x2200
jmp 0x2e91
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
leaq -0x420(%rbp), %rdi
callq 0x2100
jmp 0x3276
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
jmp 0x2e80
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
leaq -0x440(%rbp), %rdi
callq 0x2100
leaq -0x441(%rbp), %rdi
callq 0x2200
jmp 0x3276
jmp 0x2e93
movl -0x3dc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3dc(%rbp)
jmp 0x2b1f
movl $0x0, -0x3d8(%rbp)
movl $0x0, -0x448(%rbp)
movl -0x448(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x3187
movl -0x448(%rbp), %esi
movl -0x10(%rbp), %edx
movl -0x14(%rbp), %ecx
movl -0x18(%rbp), %r8d
leaq -0x460(%rbp), %rdi
callq 0x35d0
jmp 0x2ee8
leaq -0x3b8(%rbp), %rdi
leaq -0x460(%rbp), %rsi
movq %rsi, -0x530(%rbp)
callq 0x6020
movq -0x530(%rbp), %rdi
callq 0x6050
leaq 0x6569(%rip), %rsi      # 0x947e
leaq -0x3a0(%rbp), %rdi
callq 0x21b0
movq %rax, -0x528(%rbp)
jmp 0x2f2a
xorl %eax, %eax
movl %eax, %esi
leaq -0x3b8(%rbp), %rdi
callq 0x5f50
movq -0x528(%rbp), %rdi
movl (%rax), %esi
callq 0x2360
movq %rax, -0x538(%rbp)
jmp 0x2f51
movq -0x538(%rbp), %rdi
leaq 0x645a(%rip), %rsi      # 0x93b9
callq 0x21b0
movq %rax, -0x540(%rbp)
jmp 0x2f6d
leaq -0x3b8(%rbp), %rdi
movl $0x1, %esi
callq 0x5f50
movq -0x540(%rbp), %rdi
movl (%rax), %esi
callq 0x2360
movq %rax, -0x548(%rbp)
jmp 0x2f95
movq -0x548(%rbp), %rdi
leaq 0x6416(%rip), %rsi      # 0x93b9
callq 0x21b0
movq %rax, -0x550(%rbp)
jmp 0x2fb1
leaq -0x3b8(%rbp), %rdi
movl $0x2, %esi
callq 0x5f50
movq -0x550(%rbp), %rdi
movl (%rax), %esi
callq 0x2360
movq %rax, -0x558(%rbp)
jmp 0x2fd9
movq -0x558(%rbp), %rdi
leaq 0x63d2(%rip), %rsi      # 0x93b9
callq 0x21b0
movq %rax, -0x560(%rbp)
jmp 0x2ff5
leaq -0x3b8(%rbp), %rdi
movl $0x3, %esi
callq 0x5f50
movq -0x560(%rbp), %rdi
movl (%rax), %esi
callq 0x2360
movq %rax, -0x568(%rbp)
jmp 0x301d
movq -0x568(%rbp), %rdi
leaq 0x63b0(%rip), %rsi      # 0x93db
callq 0x21b0
jmp 0x3032
movl -0x3d8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3d8(%rbp)
cmpl $0xf4240, -0x3d8(%rbp)  # imm = 0xF4240
jle 0x3171
movl $0x0, -0x3d8(%rbp)
leaq -0x480(%rbp), %rdi
leaq -0x3a0(%rbp), %rsi
callq 0x21e0
jmp 0x3070
leaq -0x218(%rbp), %rdi
leaq -0x480(%rbp), %rsi
callq 0x2190
jmp 0x3085
leaq -0x480(%rbp), %rdi
callq 0x2100
movq -0x3a0(%rbp), %rax
movq -0x18(%rax), %rax
leaq -0x3a0(%rbp,%rax), %rdi
xorl %esi, %esi
callq 0x2330
jmp 0x30ad
leaq -0x4a1(%rbp), %rdi
movq %rdi, -0x570(%rbp)
callq 0x2380
movq -0x570(%rbp), %rdx
leaq 0x63af(%rip), %rsi      # 0x947d
leaq -0x4a0(%rbp), %rdi
callq 0x5f70
jmp 0x30dc
leaq -0x3a0(%rbp), %rdi
leaq -0x4a0(%rbp), %rsi
callq 0x20c0
jmp 0x30f1
leaq -0x4a0(%rbp), %rdi
callq 0x2100
leaq -0x4a1(%rbp), %rdi
callq 0x2200
jmp 0x3171
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
leaq -0x480(%rbp), %rdi
callq 0x2100
jmp 0x3276
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
jmp 0x3160
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
leaq -0x4a0(%rbp), %rdi
callq 0x2100
leaq -0x4a1(%rbp), %rdi
callq 0x2200
jmp 0x3276
jmp 0x3173
movl -0x448(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x448(%rbp)
jmp 0x2ebb
leaq -0x4c8(%rbp), %rdi
leaq -0x3a0(%rbp), %rsi
callq 0x21e0
jmp 0x319c
leaq -0x218(%rbp), %rdi
leaq -0x4c8(%rbp), %rsi
callq 0x2190
jmp 0x31b1
leaq -0x4c8(%rbp), %rdi
callq 0x2100
leaq 0x6217(%rip), %rsi      # 0x93db
leaq -0x218(%rbp), %rdi
callq 0x21b0
jmp 0x31d2
leaq 0x62a3(%rip), %rsi      # 0x947c
leaq -0x218(%rbp), %rdi
callq 0x21b0
jmp 0x31e7
leaq 0x628e(%rip), %rsi      # 0x947c
leaq -0x218(%rbp), %rdi
callq 0x21b0
jmp 0x31fc
leaq 0x61db(%rip), %rsi      # 0x93de
leaq -0x218(%rbp), %rdi
callq 0x21b0
jmp 0x3211
leaq -0x218(%rbp), %rdi
callq 0x2290
jmp 0x321f
leaq -0x3d0(%rbp), %rdi
callq 0x5ea0
leaq -0x3b8(%rbp), %rdi
callq 0x6050
leaq -0x3a0(%rbp), %rdi
callq 0x2050
leaq -0x218(%rbp), %rdi
callq 0x22c0
addq $0x570, %rsp            # imm = 0x570
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
leaq -0x4c8(%rbp), %rdi
callq 0x2100
leaq -0x3d0(%rbp), %rdi
callq 0x5ea0
leaq -0x3b8(%rbp), %rdi
callq 0x6050
leaq -0x3a0(%rbp), %rdi
callq 0x2050
leaq -0x218(%rbp), %rdi
callq 0x22c0
movq -0x220(%rbp), %rdi
callq 0x2370
nopw %cs:(%rax,%rax)