// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x408, %rsp            # imm = 0x408
movl %r9d, -0x74(%rbp)
movl %r8d, -0x70(%rbp)
movl %ecx, -0x6c(%rbp)
movl %edx, -0x68(%rbp)
movl %esi, %ebx
movl %edi, -0x64(%rbp)
leaq 0x3b80(%rip), %rsi      # 0x644b
leaq -0x2b0(%rbp), %r14
movq %r14, %rdi
movl $0x10, %edx
callq 0x2170
leaq 0x3755(%rip), %rsi      # 0x603b
movl $0x50, %edx
movq %r14, %rdi
callq 0x2180
leaq 0x3792(%rip), %rsi      # 0x608c
leaq -0x2b0(%rbp), %rdi
movl $0x50, %edx
callq 0x2180
leaq 0x37cb(%rip), %rsi      # 0x60dd
leaq -0x2b0(%rbp), %rdi
movl $0x50, %edx
callq 0x2180
leaq 0x3804(%rip), %rsi      # 0x612e
leaq -0x2b0(%rbp), %rdi
movl $0x50, %edx
callq 0x2180
leaq 0x383d(%rip), %rsi      # 0x617f
leaq -0x2b0(%rbp), %rdi
movl $0x50, %edx
callq 0x2180
leaq 0x3876(%rip), %rsi      # 0x61d0
leaq -0x2b0(%rbp), %rdi
movl $0x50, %edx
callq 0x2180
leaq 0x38af(%rip), %rsi      # 0x6221
leaq -0x2b0(%rbp), %rdi
movl $0x50, %edx
callq 0x2180
leaq 0x38e8(%rip), %rsi      # 0x6272
leaq -0x2b0(%rbp), %rdi
movl $0x9, %edx
callq 0x2180
leaq 0x39d6(%rip), %rsi      # 0x6378
leaq -0x2b0(%rbp), %rdi
movl $0x2, %edx
callq 0x2180
leaq 0x38c2(%rip), %rsi      # 0x627c
leaq -0x2b0(%rbp), %rdi
movl $0x15, %edx
callq 0x2180
leaq 0x38c0(%rip), %rsi      # 0x6292
leaq -0x2b0(%rbp), %rdi
movl $0x17, %edx
callq 0x2180
leaq 0x3a79(%rip), %rsi      # 0x6463
leaq -0x2b0(%rbp), %rdi
movl $0x1a, %edx
callq 0x2180
leaq 0x38cb(%rip), %rsi      # 0x62cd
leaq -0x2b0(%rbp), %rdi
movl $0x25, %edx
callq 0x2180
leaq 0x3a64(%rip), %rsi      # 0x647e
leaq -0x2b0(%rbp), %rdi
movl $0x17, %edx
callq 0x2180
leaq 0x39c2(%rip), %rsi      # 0x63f4
leaq -0x2b0(%rbp), %rdi
movl $0x2, %edx
callq 0x2180
leaq 0x38c4(%rip), %rsi      # 0x630e
leaq -0x2b0(%rbp), %rdi
movl $0x50, %edx
callq 0x2180
leaq 0x3a36(%rip), %rsi      # 0x6498
leaq -0x2b0(%rbp), %rdi
movl $0x1, %edx
callq 0x2180
leaq 0x3a1e(%rip), %rsi      # 0x6498
leaq -0x2b0(%rbp), %rdi
movl $0x1, %edx
callq 0x2180
leaq -0x428(%rbp), %rdi
callq 0x21a0
leaq -0x428(%rbp), %r13
movq %r13, %rdi
movl %ebx, %esi
callq 0x22a0
leaq 0x39e7(%rip), %rsi      # 0x6496
movl $0x3, %edx
movq %rax, %rdi
callq 0x2180
xorps %xmm0, %xmm0
movaps %xmm0, -0x90(%rbp)
movq $0x0, -0x80(%rbp)
cmpl $0x0, -0x64(%rbp)
jle 0x2d17
xorl %esi, %esi
leaq -0xb0(%rbp), %rbx
leaq -0x50(%rbp), %r12
leaq 0x38e9(%rip), %r14      # 0x63d5
movl $0x0, -0x58(%rbp)
movq %rbx, %rdi
movq %rsi, -0x60(%rbp)
movl -0x6c(%rbp), %edx
movl -0x70(%rbp), %ecx
movl -0x74(%rbp), %r8d
callq 0x313c
movaps -0x90(%rbp), %xmm0
movq -0x80(%rbp), %rax
movaps -0xb0(%rbp), %xmm1
movaps %xmm1, -0x90(%rbp)
movq -0xa0(%rbp), %rcx
movq %rcx, -0x80(%rbp)
movups %xmm0, -0x50(%rbp)
movq %rax, -0x40(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0xb0(%rbp)
movq $0x0, -0xa0(%rbp)
movq %r12, %rdi
callq 0x5588
movq %rbx, %rdi
callq 0x5588
movq -0x88(%rbp), %r15
subq -0x90(%rbp), %r15
sarq $0x3, %r15
movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %r15
testl %r15d, %r15d
jle 0x2d08
addl %r15d, -0x58(%rbp)
andl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
xorl %r12d, %r12d
movl $0x2, %edx
movq %r13, %rdi
leaq 0x38fa(%rip), %rsi      # 0x649a
callq 0x2180
movq -0x90(%rbp), %rax
movq (%rax,%r12), %rax
movl (%rax), %esi
movq %r13, %rdi
callq 0x22a0
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x2180
movq -0x90(%rbp), %rax
movq (%rax,%r12), %rax
movl 0x4(%rax), %esi
movq %rbx, %rdi
callq 0x22a0
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x2180
movq -0x90(%rbp), %rax
movq (%rax,%r12), %rax
movl 0x8(%rax), %esi
movq %rbx, %rdi
callq 0x22a0
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x2180
movq -0x90(%rbp), %rax
movq (%rax,%r12), %rax
movl 0xc(%rax), %esi
movq %rbx, %rdi
callq 0x22a0
movl $0x2, %edx
movq %rax, %rdi
leaq 0x37b3(%rip), %rsi      # 0x63f7
callq 0x2180
addq $0x18, %r12
decq %r15
jne 0x2b91
cmpl $0xf4240, -0x58(%rbp)   # imm = 0xF4240
leaq -0xb0(%rbp), %rbx
leaq -0x50(%rbp), %r12
jle 0x2d08
movq %r12, %rdi
leaq -0x420(%rbp), %rsi
callq 0x2240
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
leaq -0x2b0(%rbp), %rdi
callq 0x2180
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x2caa
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x2160
movq -0x428(%rbp), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
xorl %esi, %esi
callq 0x2280
leaq -0x40(%rbp), %rax
movq %rax, -0x50(%rbp)
movq %r12, %rdi
leaq 0x37c8(%rip), %rdx      # 0x6499
movq %rdx, %rsi
callq 0x56c6
leaq -0x420(%rbp), %rdi
movq %r12, %rsi
callq 0x21f0
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x2d01
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x2160
movl $0x0, -0x58(%rbp)
movq -0x60(%rbp), %rsi
incl %esi
cmpl -0x64(%rbp), %esi
jne 0x2af3
xorl %r14d, %r14d
cmpl $0x0, -0x68(%rbp)
jle 0x2ef2
movl $0x0, -0x60(%rbp)
xorl %ebx, %ebx
xorl %r12d, %r12d
leaq -0x50(%rbp), %rdi
movl %r14d, %esi
movl -0x6c(%rbp), %edx
movl -0x70(%rbp), %ecx
movl -0x74(%rbp), %r8d
callq 0x34d2
movq -0x50(%rbp), %r15
movq -0x40(%rbp), %rax
movq %rax, -0x58(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0x50(%rbp)
movq $0x0, -0x40(%rbp)
testq %rbx, %rbx
je 0x2d89
subq %rbx, %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2160
movq -0x50(%rbp), %rdi
testq %rdi, %rdi
je 0x2d89
movq -0x40(%rbp), %rsi
subq %rdi, %rsi
callq 0x2160
movl $0x2, %edx
movq %r13, %rdi
leaq 0x3702(%rip), %rsi      # 0x649a
movq -0x58(%rbp), %r12
callq 0x2180
movl (%r15), %esi
movq %r13, %rdi
callq 0x22a0
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
leaq 0x3617(%rip), %rsi      # 0x63d5
callq 0x2180
movl 0x4(%r15), %esi
movq %rbx, %rdi
callq 0x22a0
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
leaq 0x35f4(%rip), %rsi      # 0x63d5
callq 0x2180
movl 0x8(%r15), %esi
movq %rbx, %rdi
callq 0x22a0
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
leaq 0x35d1(%rip), %rsi      # 0x63d5
callq 0x2180
movl 0xc(%r15), %esi
movq %rbx, %rdi
callq 0x22a0
movl $0x2, %edx
movq %rax, %rdi
leaq 0x35d3(%rip), %rsi      # 0x63f7
callq 0x2180
movl -0x60(%rbp), %eax
cmpl $0xf4240, %eax          # imm = 0xF4240
jl 0x2ed8
leaq -0x50(%rbp), %rdi
leaq -0x420(%rbp), %rsi
callq 0x2240
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
leaq -0x2b0(%rbp), %rdi
callq 0x2180
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x2e74
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x2160
movq -0x428(%rbp), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
xorl %esi, %esi
callq 0x2280
leaq -0x40(%rbp), %rax
movq %rax, -0x50(%rbp)
leaq -0x50(%rbp), %rbx
movq %rbx, %rdi
leaq 0x35fa(%rip), %rdx      # 0x6499
movq %rdx, %rsi
callq 0x56c6
leaq -0x420(%rbp), %rdi
movq %rbx, %rsi
callq 0x21f0
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x2ecf
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x2160
movl $0x0, -0x60(%rbp)
jmp 0x2edd
incl %eax
movl %eax, -0x60(%rbp)
incl %r14d
movq %r15, %rbx
movq %r12, %rax
cmpl %r14d, -0x68(%rbp)
jne 0x2d30
jmp 0x2ef7
xorl %eax, %eax
xorl %r15d, %r15d
movq %rax, %rbx
leaq -0x420(%rbp), %rsi
leaq -0x50(%rbp), %rdi
callq 0x2240
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
leaq -0x2b0(%rbp), %rdi
movq %rbx, %r12
movq %r15, %r14
callq 0x2180
leaq -0x40(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2f3d
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x2160
leaq 0x34b3(%rip), %rsi      # 0x63f7
leaq -0x2b0(%rbp), %rdi
movl $0x2, %edx
callq 0x2180
leaq 0x353c(%rip), %rsi      # 0x6498
leaq -0x2b0(%rbp), %rdi
movl $0x1, %edx
callq 0x2180
leaq 0x3524(%rip), %rsi      # 0x6498
leaq -0x2b0(%rbp), %rdi
movl $0x1, %edx
callq 0x2180
leaq 0x346e(%rip), %rsi      # 0x63fa
leaq -0x2b0(%rbp), %rdi
movl $0x50, %edx
callq 0x2180
leaq -0x2b0(%rbp), %rdi
callq 0x21b0
leaq -0x90(%rbp), %rdi
callq 0x5588
testq %r14, %r14
je 0x2fc8
subq %r14, %r12
movq %r14, %rdi
movq %r12, %rsi
callq 0x2160
movq 0x5fe1(%rip), %rsi      # 0x8fb0
leaq -0x428(%rbp), %rdi
callq 0x20d0
leaq -0x3b8(%rbp), %rdi
callq 0x2070
movq 0x5fba(%rip), %rax      # 0x8fa8
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq -0x2a8(%rbp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, -0x2b0(%rbp,%rcx)
callq 0x2120
leaq -0x1b8(%rbp), %rdi
callq 0x2070
addq $0x408, %rsp            # imm = 0x408
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq -0x40(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3050
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x2160
jmp 0x3050
movq %rax, %r14
movq %rbx, %r12
jmp 0x30d9
jmp 0x30c7
movq %rax, %r14
jmp 0x3109
jmp 0x30d6
jmp 0x3070
jmp 0x30fa
jmp 0x30fa
movq %rax, %r14
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x30fd
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x2160
jmp 0x30fd
jmp 0x30fa
jmp 0x3099
jmp 0x3094
movq %rax, %r14
jmp 0x30b5
movq %rax, %r14
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x30b5
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x2160
leaq -0x90(%rbp), %rdi
callq 0x5588
movq -0x58(%rbp), %r12
jmp 0x30ea
movq %rax, %r14
jmp 0x3128
jmp 0x30fa
movq %rax, %r14
movq %rbx, %r15
jmp 0x30d9
movq %rax, %r14
leaq -0x90(%rbp), %rdi
callq 0x5588
testq %r15, %r15
je 0x3109
subq %r15, %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x2160
jmp 0x3109
movq %rax, %r14
leaq -0x90(%rbp), %rdi
callq 0x5588
movq 0x5ea0(%rip), %rsi      # 0x8fb0
leaq -0x428(%rbp), %rdi
callq 0x20d0
leaq -0x3b8(%rbp), %rdi
callq 0x2070
leaq -0x2b0(%rbp), %rdi
callq 0x21e0
movq %r14, %rdi
callq 0x22b0