// File: /workspace/github_c_makefile_star2_O0/vlenhart[P]q3bsp/vformat.cpp
// Function: VertexPool::SaveVRML(_IO_FILE*, bool)
void VertexPool::SaveVRML(FILE *fph,bool tex1)
{
  if ( 1 )
  {
    fprintf(fph,"  Coordinate3 {\npoint [\n");
    int count = mVtxs.size();
    for (int i=0; i<count; i++)
    {
      const LightMapVertex &vtx = mVtxs[i];
      if ( i == (count-1) )
        fprintf(fph,"  %f %f %f\n]\n",vtx.mPos.x,vtx.mPos.y,vtx.mPos.z);
      else
        fprintf(fph,"  %f %f %f,\n",vtx.mPos.x,vtx.mPos.y,vtx.mPos.z);
    }
    fprintf(fph,"   }\n");
  }
  if ( 1 )
  {
    fprintf(fph,"  TextureCoordinate2 {\npoint [\n");
    int count = mVtxs.size();

    for (int i=0; i<count; i++)
    {
      const LightMapVertex &vtx = mVtxs[i];

      if ( !tex1 ) // if saving second U/V channel.
      {
        if ( i == (count-1) )
          fprintf(fph,"  %f %f\n]\n",vtx.mTexel2.x,1.0f-vtx.mTexel2.y);
        else
          fprintf(fph,"  %f %f,\n",vtx.mTexel2.x,1.0f-vtx.mTexel2.y);
      }
      else
      {
        if ( i == (count-1) )
          fprintf(fph,"  %f %f\n]\n",vtx.mTexel1.x,1.0f-vtx.mTexel1.y);
        else
          fprintf(fph,"  %f %f,\n",vtx.mTexel1.x,1.0f-vtx.mTexel1.y);
      }
    }

    fprintf(fph,"   }\n");
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movb %dl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
andb $0x1, %al
movb %al, -0x11(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x6a8a(%rip), %rsi      # 0x2aa34
movb $0x0, %al
callq 0x3430
movq -0x40(%rbp), %rdi
addq $0x30, %rdi
callq 0x25090
movl %eax, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0x24078
movq -0x40(%rbp), %rdi
addq $0x30, %rdi
movslq -0x1c(%rbp), %rsi
callq 0x250c0
movq %rax, -0x28(%rbp)
movl -0x1c(%rbp), %eax
movl -0x18(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jne 0x24030
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rax
movss (%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movq -0x28(%rbp), %rax
movss 0x4(%rax), %xmm1
cvtss2sd %xmm1, %xmm1
movq -0x28(%rbp), %rax
movss 0x8(%rax), %xmm2
cvtss2sd %xmm2, %xmm2
leaq 0x6a26(%rip), %rsi      # 0x2aa4d
movb $0x3, %al
callq 0x3430
jmp 0x24068
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rax
movss (%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movq -0x28(%rbp), %rax
movss 0x4(%rax), %xmm1
cvtss2sd %xmm1, %xmm1
movq -0x28(%rbp), %rax
movss 0x8(%rax), %xmm2
cvtss2sd %xmm2, %xmm2
leaq 0x69fa(%rip), %rsi      # 0x2aa5b
movb $0x3, %al
callq 0x3430
jmp 0x2406a
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x23fc8
movq -0x10(%rbp), %rdi
leaq 0x69e5(%rip), %rsi      # 0x2aa68
movb $0x0, %al
callq 0x3430
movq -0x10(%rbp), %rdi
leaq 0x69d9(%rip), %rsi      # 0x2aa6e
movb $0x0, %al
callq 0x3430
movq -0x40(%rbp), %rdi
addq $0x30, %rdi
callq 0x25090
movl %eax, -0x2c(%rbp)
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jge 0x241dc
movq -0x40(%rbp), %rdi
addq $0x30, %rdi
movslq -0x30(%rbp), %rsi
callq 0x250c0
movq %rax, -0x38(%rbp)
testb $0x1, -0x11(%rbp)
jne 0x24153
movl -0x30(%rbp), %eax
movl -0x2c(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jne 0x2411d
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rax
movss 0x14(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movq -0x38(%rbp), %rax
movss 0x4f00(%rip), %xmm1     # 0x29004
subss 0x18(%rax), %xmm1
cvtss2sd %xmm1, %xmm1
leaq 0x697a(%rip), %rsi      # 0x2aa8e
movb $0x2, %al
callq 0x3430
jmp 0x24151
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rax
movss 0x14(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movq -0x38(%rbp), %rax
movss 0x4eca(%rip), %xmm1     # 0x29004
subss 0x18(%rax), %xmm1
cvtss2sd %xmm1, %xmm1
leaq 0x694f(%rip), %rsi      # 0x2aa99
movb $0x2, %al
callq 0x3430
jmp 0x241cc
movl -0x30(%rbp), %eax
movl -0x2c(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jne 0x24196
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rax
movss 0xc(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movq -0x38(%rbp), %rax
movss 0x4e87(%rip), %xmm1     # 0x29004
subss 0x10(%rax), %xmm1
cvtss2sd %xmm1, %xmm1
leaq 0x6901(%rip), %rsi      # 0x2aa8e
movb $0x2, %al
callq 0x3430
jmp 0x241ca
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rax
movss 0xc(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movq -0x38(%rbp), %rax
movss 0x4e51(%rip), %xmm1     # 0x29004
subss 0x10(%rax), %xmm1
cvtss2sd %xmm1, %xmm1
leaq 0x68d6(%rip), %rsi      # 0x2aa99
movb $0x2, %al
callq 0x3430
jmp 0x241cc
jmp 0x241ce
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x240b3
movq -0x10(%rbp), %rdi
leaq 0x6881(%rip), %rsi      # 0x2aa68
movb $0x0, %al
callq 0x3430
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)