// File: /workspace/github_c_makefile_star2_O1/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 $0x3f8, %rsp            # imm = 0x3F8
movl %r9d, -0x6c(%rbp)
movl %r8d, -0x68(%rbp)
movl %ecx, -0x64(%rbp)
movl %edx, -0x60(%rbp)
movl %esi, %ebx
movl %edi, -0x5c(%rbp)
leaq 0x3b90(%rip), %rsi      # 0x644b
leaq -0x2a8(%rbp), %r14
movq %r14, %rdi
movl $0x10, %edx
callq 0x2170
leaq 0x3765(%rip), %rsi      # 0x603b
movl $0x50, %edx
movq %r14, %rdi
callq 0x2180
leaq 0x37a2(%rip), %rsi      # 0x608c
leaq -0x2a8(%rbp), %rdi
movl $0x50, %edx
callq 0x2180
leaq 0x37db(%rip), %rsi      # 0x60dd
leaq -0x2a8(%rbp), %rdi
movl $0x50, %edx
callq 0x2180
leaq 0x3814(%rip), %rsi      # 0x612e
leaq -0x2a8(%rbp), %rdi
movl $0x50, %edx
callq 0x2180
leaq 0x384d(%rip), %rsi      # 0x617f
leaq -0x2a8(%rbp), %rdi
movl $0x50, %edx
callq 0x2180
leaq 0x3886(%rip), %rsi      # 0x61d0
leaq -0x2a8(%rbp), %rdi
movl $0x50, %edx
callq 0x2180
leaq 0x38bf(%rip), %rsi      # 0x6221
leaq -0x2a8(%rbp), %rdi
movl $0x50, %edx
callq 0x2180
leaq 0x38f8(%rip), %rsi      # 0x6272
leaq -0x2a8(%rbp), %rdi
movl $0x9, %edx
callq 0x2180
leaq 0x39e6(%rip), %rsi      # 0x6378
leaq -0x2a8(%rbp), %rdi
movl $0x2, %edx
callq 0x2180
leaq 0x38d2(%rip), %rsi      # 0x627c
leaq -0x2a8(%rbp), %rdi
movl $0x15, %edx
callq 0x2180
leaq 0x38d0(%rip), %rsi      # 0x6292
leaq -0x2a8(%rbp), %rdi
movl $0x17, %edx
callq 0x2180
leaq 0x3a89(%rip), %rsi      # 0x6463
leaq -0x2a8(%rbp), %rdi
movl $0x1a, %edx
callq 0x2180
leaq 0x38db(%rip), %rsi      # 0x62cd
leaq -0x2a8(%rbp), %rdi
movl $0x25, %edx
callq 0x2180
leaq 0x3a74(%rip), %rsi      # 0x647e
leaq -0x2a8(%rbp), %rdi
movl $0x17, %edx
callq 0x2180
leaq 0x39d2(%rip), %rsi      # 0x63f4
leaq -0x2a8(%rbp), %rdi
movl $0x2, %edx
callq 0x2180
leaq 0x38d4(%rip), %rsi      # 0x630e
leaq -0x2a8(%rbp), %rdi
movl $0x50, %edx
callq 0x2180
leaq 0x3a46(%rip), %rsi      # 0x6498
leaq -0x2a8(%rbp), %rdi
movl $0x1, %edx
callq 0x2180
leaq 0x3a2e(%rip), %rsi      # 0x6498
leaq -0x2a8(%rbp), %rdi
movl $0x1, %edx
callq 0x2180
leaq -0x420(%rbp), %rdi
callq 0x21a0
leaq -0x420(%rbp), %r13
movq %r13, %rdi
movl %ebx, %esi
callq 0x22a0
leaq 0x39f7(%rip), %rsi      # 0x6496
movl $0x3, %edx
movq %rax, %rdi
callq 0x2180
xorps %xmm0, %xmm0
movaps %xmm0, -0x90(%rbp)
movq $0x0, -0x80(%rbp)
cmpl $0x0, -0x5c(%rbp)
jle 0x2d08
leaq -0x40(%rbp), %rbx
xorl %r14d, %r14d
leaq 0x38ff(%rip), %r12      # 0x63d5
movl $0x0, -0x2c(%rbp)
leaq -0xa8(%rbp), %r15
movq %r15, %rdi
movl %r14d, %esi
movl -0x64(%rbp), %edx
movl -0x68(%rbp), %ecx
movl -0x6c(%rbp), %r8d
callq 0x3114
xorps %xmm0, %xmm0
movaps %xmm0, -0x50(%rbp)
movaps -0x90(%rbp), %xmm0
movq -0x80(%rbp), %rax
movups -0xa8(%rbp), %xmm1
movaps %xmm1, -0x90(%rbp)
movq -0x98(%rbp), %rcx
movq %rcx, -0x80(%rbp)
movaps -0x50(%rbp), %xmm1
movaps %xmm0, -0x50(%rbp)
movq %rax, -0x40(%rbp)
movups %xmm1, -0xa8(%rbp)
movq $0x0, -0x98(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x550e
movq %r15, %rdi
callq 0x550e
movq -0x88(%rbp), %r15
subq -0x90(%rbp), %r15
sarq $0x3, %r15
movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %r15
testl %r15d, %r15d
jle 0x2c5b
movq %r14, -0x58(%rbp)
addl %r15d, -0x2c(%rbp)
andl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
xorl %r14d, %r14d
movl $0x2, %edx
movq %r13, %rdi
leaq 0x38fd(%rip), %rsi      # 0x649a
callq 0x2180
movq -0x90(%rbp), %rax
movq (%rax,%r14), %rax
movl (%rax), %esi
movq %r13, %rdi
callq 0x22a0
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x2180
movq -0x90(%rbp), %rax
movq (%rax,%r14), %rax
movl 0x4(%rax), %esi
movq %rbx, %rdi
callq 0x22a0
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x2180
movq -0x90(%rbp), %rax
movq (%rax,%r14), %rax
movl 0x8(%rax), %esi
movq %rbx, %rdi
callq 0x22a0
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x2180
movq -0x90(%rbp), %rax
movq (%rax,%r14), %rax
movl 0xc(%rax), %esi
movq %rbx, %rdi
callq 0x22a0
movl $0x2, %edx
movq %rax, %rdi
leaq 0x37b6(%rip), %rsi      # 0x63f7
callq 0x2180
addq $0x18, %r14
decq %r15
jne 0x2b8e
leaq -0x40(%rbp), %rbx
movq -0x58(%rbp), %r14
cmpl $0xf4240, -0x2c(%rbp)   # imm = 0xF4240
jle 0x2cfb
leaq -0x50(%rbp), %rdi
leaq -0x418(%rbp), %rsi
callq 0x2240
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
leaq -0x2a8(%rbp), %rdi
callq 0x2180
movq -0x50(%rbp), %rdi
cmpq %rbx, %rdi
je 0x2ca1
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x2160
movq -0x420(%rbp), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
xorl %esi, %esi
callq 0x2280
movq %rbx, -0x50(%rbp)
leaq -0x50(%rbp), %r15
movq %r15, %rdi
leaq 0x37d1(%rip), %rdx      # 0x6499
movq %rdx, %rsi
callq 0x5646
leaq -0x418(%rbp), %rdi
movq %r15, %rsi
callq 0x21f0
movq -0x50(%rbp), %rdi
cmpq %rbx, %rdi
je 0x2cf4
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x2160
movl $0x0, -0x2c(%rbp)
incl %r14d
cmpl -0x5c(%rbp), %r14d
jne 0x2add
xorl %r14d, %r14d
cmpl $0x0, -0x60(%rbp)
jle 0x2ee3
movl $0x0, -0x2c(%rbp)
xorl %ebx, %ebx
xorl %r12d, %r12d
leaq -0x50(%rbp), %rdi
movl %r14d, %esi
movl -0x64(%rbp), %edx
movl -0x68(%rbp), %ecx
movl -0x6c(%rbp), %r8d
callq 0x349b
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 0x2d65
subq %rbx, %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2160
movq -0x50(%rbp), %rdi
testq %rdi, %rdi
je 0x2d7a
movq -0x40(%rbp), %rsi
subq %rdi, %rsi
callq 0x2160
movl $0x2, %edx
movq %r13, %rdi
leaq 0x3711(%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 0x3626(%rip), %rsi      # 0x63d5
callq 0x2180
movl 0x4(%r15), %esi
movq %rbx, %rdi
callq 0x22a0
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
leaq 0x3603(%rip), %rsi      # 0x63d5
callq 0x2180
movl 0x8(%r15), %esi
movq %rbx, %rdi
callq 0x22a0
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
leaq 0x35e0(%rip), %rsi      # 0x63d5
callq 0x2180
movl 0xc(%r15), %esi
movq %rbx, %rdi
callq 0x22a0
movl $0x2, %edx
movq %rax, %rdi
leaq 0x35e2(%rip), %rsi      # 0x63f7
callq 0x2180
movl -0x2c(%rbp), %eax
cmpl $0xf4240, %eax          # imm = 0xF4240
jl 0x2ec9
leaq -0x50(%rbp), %rdi
leaq -0x418(%rbp), %rsi
callq 0x2240
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
leaq -0x2a8(%rbp), %rdi
callq 0x2180
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x2e65
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x2160
movq -0x420(%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 0x3609(%rip), %rdx      # 0x6499
movq %rdx, %rsi
callq 0x5646
leaq -0x418(%rbp), %rdi
movq %rbx, %rsi
callq 0x21f0
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x2ec0
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x2160
movl $0x0, -0x2c(%rbp)
jmp 0x2ece
incl %eax
movl %eax, -0x2c(%rbp)
incl %r14d
movq %r15, %rbx
movq %r12, %rax
cmpl %r14d, -0x60(%rbp)
jne 0x2d21
jmp 0x2ee8
xorl %eax, %eax
xorl %r15d, %r15d
movq %r15, %r13
movq %rax, %rbx
leaq -0x418(%rbp), %rsi
leaq -0x50(%rbp), %rdi
callq 0x2240
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
leaq -0x2a8(%rbp), %rdi
movq %rbx, %r12
movq %r13, %r15
callq 0x2180
leaq -0x40(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2f31
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x2160
leaq 0x34bf(%rip), %rsi      # 0x63f7
leaq -0x2a8(%rbp), %rdi
movl $0x2, %edx
callq 0x2180
leaq 0x3548(%rip), %rsi      # 0x6498
leaq -0x2a8(%rbp), %rdi
movl $0x1, %edx
callq 0x2180
leaq 0x3530(%rip), %rsi      # 0x6498
leaq -0x2a8(%rbp), %rdi
movl $0x1, %edx
callq 0x2180
leaq 0x347a(%rip), %rsi      # 0x63fa
leaq -0x2a8(%rbp), %rdi
movl $0x50, %edx
callq 0x2180
leaq -0x2a8(%rbp), %rdi
callq 0x21b0
leaq -0x90(%rbp), %rdi
callq 0x550e
testq %r15, %r15
je 0x2fbc
subq %r15, %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x2160
movq 0x5fed(%rip), %rsi      # 0x8fb0
leaq -0x420(%rbp), %rdi
callq 0x20d0
leaq -0x3b0(%rbp), %rdi
callq 0x2070
movq 0x5fc6(%rip), %rax      # 0x8fa8
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq -0x2a0(%rbp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, -0x2a8(%rbp,%rcx)
callq 0x2120
leaq -0x1b0(%rbp), %rdi
callq 0x2070
addq $0x3f8, %rsp            # imm = 0x3F8
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 0x3044
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x2160
jmp 0x3044
movq %rax, %r14
movq %rbx, %r12
movq %r13, %r15
jmp 0x30c2
jmp 0x30a5
movq %rax, %r14
jmp 0x30e1
jmp 0x30b4
jmp 0x30b9
jmp 0x30b9
jmp 0x305e
movq %rax, %r14
movq -0x50(%rbp), %rdi
cmpq %rbx, %rdi
je 0x30bc
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x2160
jmp 0x30bc
jmp 0x30b9
jmp 0x3083
jmp 0x307e
movq %rax, %r14
jmp 0x309f
movq %rax, %r14
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x309f
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x2160
movq -0x58(%rbp), %r12
jmp 0x30c2
movq %rax, %r14
jmp 0x3100
jmp 0x30b9
movq %rax, %r14
movq %rbx, %r15
jmp 0x30c2
movq %rax, %r14
jmp 0x30c2
movq %rax, %r14
xorl %r12d, %r12d
xorl %r15d, %r15d
leaq -0x90(%rbp), %rdi
callq 0x550e
testq %r15, %r15
je 0x30e1
subq %r15, %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x2160
movq 0x5ec8(%rip), %rsi      # 0x8fb0
leaq -0x420(%rbp), %rdi
callq 0x20d0
leaq -0x3b0(%rbp), %rdi
callq 0x2070
leaq -0x2a8(%rbp), %rdi
callq 0x21e0
movq %r14, %rdi
callq 0x22b0