// File: /workspace/github_c_makefile_star2_O0/mohuangrui[P]ArtraCFD/stl.c
// Function: ReadStlFile
void ReadStlFile(const char *fname, Polyhedron *poly)
{
    StlStr header = {'\0'};
    StlLint facetN = 0;
    StlInt attribute = 0;
    StlReal facetData = 0.0;
    FILE *fp = Fopen(fname, "rb");
    Fread(header, sizeof(StlStr), 1, fp);
    Fread(&facetN, sizeof(StlLint), 1, fp);
    poly->faceN = facetN;
    poly->facet = AssignStorage(poly->faceN * sizeof(*poly->facet));
    for (StlLint n = 0; n < facetN; ++n) {
        Fread(&facetData, sizeof(StlReal), 1, fp);
        poly->facet[n].N[X] = facetData;
        Fread(&facetData, sizeof(StlReal), 1, fp);
        poly->facet[n].N[Y] = facetData;
        Fread(&facetData, sizeof(StlReal), 1, fp);
        poly->facet[n].N[Z] = facetData;
        Fread(&facetData, sizeof(StlReal), 1, fp);
        poly->facet[n].v0[X] = facetData;
        Fread(&facetData, sizeof(StlReal), 1, fp);
        poly->facet[n].v0[Y] = facetData;
        Fread(&facetData, sizeof(StlReal), 1, fp);
        poly->facet[n].v0[Z] = facetData;
        Fread(&facetData, sizeof(StlReal), 1, fp);
        poly->facet[n].v1[X] = facetData;
        Fread(&facetData, sizeof(StlReal), 1, fp);
        poly->facet[n].v1[Y] = facetData;
        Fread(&facetData, sizeof(StlReal), 1, fp);
        poly->facet[n].v1[Z] = facetData;
        Fread(&facetData, sizeof(StlReal), 1, fp);
        poly->facet[n].v2[X] = facetData;
        Fread(&facetData, sizeof(StlReal), 1, fp);
        poly->facet[n].v2[Y] = facetData;
        Fread(&facetData, sizeof(StlReal), 1, fp);
        poly->facet[n].v2[Z] = facetData;
        Fread(&attribute, sizeof(StlInt), 1, fp);
    }
    fclose(fp);
    return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x60(%rbp), %rdi
xorl %esi, %esi
movl $0x50, %edx
callq 0x20d0
movl $0x0, -0x64(%rbp)
movw $0x0, -0x66(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0x6c(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x5877(%rip), %rsi      # 0x2852a
callq 0xbf90
movq %rax, -0x78(%rbp)
leaq -0x60(%rbp), %rdi
movq -0x78(%rbp), %rcx
movl $0x50, %esi
movl $0x1, %edx
callq 0xbfe0
movq -0x78(%rbp), %rcx
leaq -0x64(%rbp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0xbfe0
movl -0x64(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
movslq (%rax), %rax
imulq $0x60, %rax, %rdi
callq 0xbdd0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x230(%rax)
movl $0x0, -0x7c(%rbp)
movl -0x7c(%rbp), %eax
cmpl -0x64(%rbp), %eax
jae 0x23000
movq -0x78(%rbp), %rcx
leaq -0x6c(%rbp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0xbfe0
movss -0x6c(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movq -0x10(%rbp), %rax
movq 0x230(%rax), %rax
movl -0x7c(%rbp), %ecx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movsd %xmm0, (%rax)
movq -0x78(%rbp), %rcx
leaq -0x6c(%rbp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0xbfe0
movss -0x6c(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movq -0x10(%rbp), %rax
movq 0x230(%rax), %rax
movl -0x7c(%rbp), %ecx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movsd %xmm0, 0x8(%rax)
movq -0x78(%rbp), %rcx
leaq -0x6c(%rbp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0xbfe0
movss -0x6c(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movq -0x10(%rbp), %rax
movq 0x230(%rax), %rax
movl -0x7c(%rbp), %ecx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movsd %xmm0, 0x10(%rax)
movq -0x78(%rbp), %rcx
leaq -0x6c(%rbp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0xbfe0
movss -0x6c(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movq -0x10(%rbp), %rax
movq 0x230(%rax), %rax
movl -0x7c(%rbp), %ecx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movsd %xmm0, 0x18(%rax)
movq -0x78(%rbp), %rcx
leaq -0x6c(%rbp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0xbfe0
movss -0x6c(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movq -0x10(%rbp), %rax
movq 0x230(%rax), %rax
movl -0x7c(%rbp), %ecx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movsd %xmm0, 0x20(%rax)
movq -0x78(%rbp), %rcx
leaq -0x6c(%rbp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0xbfe0
movss -0x6c(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movq -0x10(%rbp), %rax
movq 0x230(%rax), %rax
movl -0x7c(%rbp), %ecx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movsd %xmm0, 0x28(%rax)
movq -0x78(%rbp), %rcx
leaq -0x6c(%rbp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0xbfe0
movss -0x6c(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movq -0x10(%rbp), %rax
movq 0x230(%rax), %rax
movl -0x7c(%rbp), %ecx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movsd %xmm0, 0x30(%rax)
movq -0x78(%rbp), %rcx
leaq -0x6c(%rbp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0xbfe0
movss -0x6c(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movq -0x10(%rbp), %rax
movq 0x230(%rax), %rax
movl -0x7c(%rbp), %ecx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movsd %xmm0, 0x38(%rax)
movq -0x78(%rbp), %rcx
leaq -0x6c(%rbp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0xbfe0
movss -0x6c(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movq -0x10(%rbp), %rax
movq 0x230(%rax), %rax
movl -0x7c(%rbp), %ecx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movsd %xmm0, 0x40(%rax)
movq -0x78(%rbp), %rcx
leaq -0x6c(%rbp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0xbfe0
movss -0x6c(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movq -0x10(%rbp), %rax
movq 0x230(%rax), %rax
movl -0x7c(%rbp), %ecx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movsd %xmm0, 0x48(%rax)
movq -0x78(%rbp), %rcx
leaq -0x6c(%rbp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0xbfe0
movss -0x6c(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movq -0x10(%rbp), %rax
movq 0x230(%rax), %rax
movl -0x7c(%rbp), %ecx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movsd %xmm0, 0x50(%rax)
movq -0x78(%rbp), %rcx
leaq -0x6c(%rbp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0xbfe0
movss -0x6c(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movq -0x10(%rbp), %rax
movq 0x230(%rax), %rax
movl -0x7c(%rbp), %ecx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movsd %xmm0, 0x58(%rax)
movq -0x78(%rbp), %rcx
leaq -0x66(%rbp), %rdi
movl $0x2, %esi
movl $0x1, %edx
callq 0xbfe0
movl -0x7c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x7c(%rbp)
jmp 0x22d18
movq -0x78(%rbp), %rdi
callq 0x2080
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)