LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/rurban[P]dgnlib/dgnhelp.cpp
// Function: DGNQuaternionToMatrix
void DGNQuaternionToMatrix( int *quat, float *mat )
{
  double q[4];

  q[0] = 1.0 * quat[1] / (1<<31);
  q[1] = 1.0 * quat[2] / (1<<31);
  q[2] = 1.0 * quat[3] / (1<<31);
  q[3] = 1.0 * quat[0] / (1<<31);

  mat[0*3+0] = (float) (q[0]*q[0] - q[1]*q[1] - q[2]*q[2] + q[3]*q[3]);
  mat[0*3+1] = (float) (2 * (q[2]*q[3] + q[0]*q[1]));
  mat[0*3+2] = (float) (2 * (q[0]*q[2] - q[1]*q[3]));
  mat[1*3+0] = (float) (2 * (q[0]*q[1] - q[2]*q[3]));
  mat[1*3+1] = (float) (-q[0]*q[0] + q[1]*q[1] - q[2]*q[2] + q[3]*q[3]);
  mat[1*3+2] = (float) (2 * (q[0]*q[3] + q[1]*q[2]));
  mat[2*3+0] = (float) (2 * (q[0]*q[2] + q[1]*q[3])); 
  mat[2*3+1] = (float) (2 * (q[1]*q[2] - q[0]*q[3]));
  mat[2*3+2] = (float) (-q[0]*q[0] - q[1]*q[1] + q[2]*q[2] + q[3]*q[3]);
}

// Assembly:
cvtsi2sdl 0x4(%rdi), %xmm5
movsd 0x8576(%rip), %xmm2     # 0x10c10
mulsd %xmm2, %xmm5
cvtsi2sdl 0x8(%rdi), %xmm1
cvtsi2sdl 0xc(%rdi), %xmm0
mulsd %xmm2, %xmm1
mulsd %xmm2, %xmm0
cvtsi2sdl (%rdi), %xmm4
mulsd %xmm2, %xmm4
movapd %xmm1, %xmm2
mulsd %xmm1, %xmm2
movapd 0x7b98(%rip), %xmm3     # 0x10260
movapd %xmm0, %xmm6
xorpd %xmm3, %xmm6
movapd %xmm5, %xmm8
movapd %xmm5, %xmm7
xorpd %xmm5, %xmm3
mulsd %xmm5, %xmm3
movapd %xmm5, %xmm10
mulsd %xmm5, %xmm10
subsd %xmm2, %xmm10
mulsd %xmm0, %xmm6
addsd %xmm6, %xmm10
movapd %xmm4, %xmm9
mulsd %xmm4, %xmm9
addsd %xmm9, %xmm10
cvtsd2ss %xmm10, %xmm11
movapd %xmm0, %xmm12
mulsd %xmm4, %xmm12
movapd %xmm1, %xmm10
mulsd %xmm4, %xmm10
mulsd %xmm5, %xmm4
movss %xmm11, (%rsi)
mulsd %xmm1, %xmm8
movapd %xmm12, %xmm5
addsd %xmm8, %xmm5
addsd %xmm5, %xmm5
cvtsd2ss %xmm5, %xmm5
movss %xmm5, 0x4(%rsi)
mulsd %xmm0, %xmm7
movapd %xmm7, %xmm5
subsd %xmm10, %xmm5
addsd %xmm5, %xmm5
cvtsd2ss %xmm5, %xmm5
movss %xmm5, 0x8(%rsi)
subsd %xmm12, %xmm8
addsd %xmm8, %xmm8
xorps %xmm5, %xmm5
cvtsd2ss %xmm8, %xmm5
movss %xmm5, 0xc(%rsi)
movapd %xmm3, %xmm5
addsd %xmm2, %xmm5
addsd %xmm6, %xmm5
addsd %xmm9, %xmm5
cvtsd2ss %xmm5, %xmm5
movss %xmm5, 0x10(%rsi)
mulsd %xmm0, %xmm1
movapd %xmm4, %xmm5
addsd %xmm1, %xmm5
addsd %xmm5, %xmm5
cvtsd2ss %xmm5, %xmm5
movss %xmm5, 0x14(%rsi)
addsd %xmm10, %xmm7
addsd %xmm7, %xmm7
xorps %xmm5, %xmm5
cvtsd2ss %xmm7, %xmm5
movss %xmm5, 0x18(%rsi)
subsd %xmm4, %xmm1
addsd %xmm1, %xmm1
cvtsd2ss %xmm1, %xmm1
movss %xmm1, 0x1c(%rsi)
subsd %xmm2, %xmm3
mulsd %xmm0, %xmm0
addsd %xmm3, %xmm0
addsd %xmm9, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x20(%rsi)
retq
// File: /workspace/github_cpp_makefile_star2_O1/rurban[P]dgnlib/dgnread.cpp
// Function: DGNGotoElement
int DGNGotoElement( DGNHandle hDGN, int element_id )

{
    DGNInfo     *psDGN = (DGNInfo *) hDGN;

    DGNBuildIndex( psDGN );

    if( element_id < 0 || element_id >= psDGN->element_count )
        return FALSE;

    if( VSIFSeek( psDGN->fp, psDGN->element_index[element_id].offset, 
                  SEEK_SET ) != 0 )
        return FALSE;

    psDGN->next_element_id = element_id;
    psDGN->in_complex_group = FALSE;

    return TRUE;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
callq 0x8847
xorl %r14d, %r14d
testl %ebp, %ebp
js 0x883f
cmpl %ebp, 0x20044(%rbx)
jle 0x883f
movq (%rbx), %rdi
movq 0x20050(%rbx), %rax
movl %ebp, %ecx
shlq $0x4, %rcx
movq 0x8(%rax,%rcx), %rsi
xorl %r14d, %r14d
xorl %edx, %edx
callq 0x6f4e
testl %eax, %eax
jne 0x883f
movl %ebp, 0x8(%rbx)
movl $0x0, 0x20384(%rbx)
movl $0x1, %r14d
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/rurban[P]dgnlib/dgnread.cpp
// Function: DGNLoadRawElement(DGNInfo*, int*, int*)
int DGNLoadRawElement( DGNInfo *psDGN, int *pnType, int *pnLevel )

{
/* -------------------------------------------------------------------- */
/*      Read the first four bytes to get the level, type, and word      */
/*      count.                                                          */
/* -------------------------------------------------------------------- */
    int         nType, nWords, nLevel;

    if( VSIFRead( psDGN->abyElem, 1, 4, psDGN->fp ) != 4 )
        return FALSE;

    /* Is this an 0xFFFF endof file marker? */
    if( psDGN->abyElem[0] == 0xff && psDGN->abyElem[1] == 0xff )
        return FALSE;

    nWords = psDGN->abyElem[2] + psDGN->abyElem[3]*256;
    nType = psDGN->abyElem[1] & 0x7f;
    nLevel = psDGN->abyElem[0] & 0x3f;

/* -------------------------------------------------------------------- */
/*      Read the rest of the element data into the working buffer.      */
/* -------------------------------------------------------------------- */
    CPLAssert( nWords * 2 + 4 <= (int) sizeof(psDGN->abyElem) );

    if( (int) VSIFRead( psDGN->abyElem + 4, 2, nWords, psDGN->fp ) != nWords )
        return FALSE;

    psDGN->nElemBytes = nWords * 2 + 4;

    psDGN->next_element_id++;

/* -------------------------------------------------------------------- */
/*      Return requested info.                                          */
/* -------------------------------------------------------------------- */
    if( pnType != NULL )
        *pnType = nType;
    
    if( pnLevel != NULL )
        *pnLevel = nLevel;
    
    return TRUE;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x10(%rdi), %r12
movq (%rdi), %rcx
movl $0x1, %esi
movl $0x4, %edx
movq %r12, %rdi
callq 0x6f5d
xorl %ebp, %ebp
cmpq $0x4, %rax
jne 0x8c21
movzbl (%r12), %r13d
cmpl $0xff, %r13d
jne 0x8bca
cmpb $-0x1, 0x11(%r15)
je 0x8c21
movq %rbx, (%rsp)
movzwl 0x12(%r15), %r12d
movzbl 0x11(%r15), %ebx
leaq 0x14(%r15), %rdi
movq (%r15), %rcx
movl $0x2, %esi
movq %r12, %rdx
callq 0x6f5d
cmpl %eax, %r12d
jne 0x8c21
leal 0x4(,%r12,2), %eax
movl %eax, 0xc(%r15)
incl 0x8(%r15)
testq %r14, %r14
je 0x8c0c
andl $0x7f, %ebx
movl %ebx, (%r14)
movl $0x1, %ebp
movq (%rsp), %rax
testq %rax, %rax
je 0x8c21
andl $0x3f, %r13d
movl %r13d, (%rax)
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/rurban[P]dgnlib/dgnread.cpp
// Function: DGNGetRawExtents(DGNInfo*, int, unsigned char*, unsigned int*, unsigned int*, unsigned int*, unsigned int*, unsigned int*, unsigned int*)
static int 
DGNGetRawExtents( DGNInfo *psDGN, int nType, unsigned char *pabyRawData,
                  GUInt32 *pnXMin, GUInt32 *pnYMin, GUInt32 *pnZMin, 
                  GUInt32 *pnXMax, GUInt32 *pnYMax, GUInt32 *pnZMax )

{
    if( pabyRawData == NULL )
        pabyRawData = psDGN->abyElem + 0;

    switch( nType )
    {
      case DGNT_LINE:
      case DGNT_LINE_STRING:
      case DGNT_SHAPE:
      case DGNT_CURVE:
      case DGNT_BSPLINE_POLE:
      case DGNT_BSPLINE_SURFACE_HEADER:
      case DGNT_BSPLINE_CURVE_HEADER:
      case DGNT_ELLIPSE:
      case DGNT_ARC:
      case DGNT_TEXT:
      case DGNT_TEXT_NODE:
      case DGNT_COMPLEX_CHAIN_HEADER:
      case DGNT_COMPLEX_SHAPE_HEADER:
      case DGNT_CONE:
      case DGNT_3DSURFACE_HEADER:
      case DGNT_3DSOLID_HEADER:
        *pnXMin = DGN_INT32( pabyRawData + 4 );
        *pnYMin = DGN_INT32( pabyRawData + 8 );
        if( pnZMin != NULL )
            *pnZMin = DGN_INT32( pabyRawData + 12 );

        *pnXMax = DGN_INT32( pabyRawData + 16 );
        *pnYMax = DGN_INT32( pabyRawData + 20 );
        if( pnZMax != NULL )
            *pnZMax = DGN_INT32( pabyRawData + 24 );
        return TRUE;

      default:
        return FALSE;
    }
}

// Assembly:
addq $0x10, %rdi
testq %rdx, %rdx
cmovneq %rdx, %rdi
xorl %eax, %eax
cmpl $0x1b, %esi
ja 0x8ece
movl $0x9afd8d8, %edx        # imm = 0x9AFD8D8
btl %esi, %edx
jae 0x8ece
movq 0x18(%rsp), %rdx
movq 0x10(%rsp), %rax
movq 0x8(%rsp), %rsi
movzwl 0x6(%rdi), %r10d
movzbl 0x5(%rdi), %r11d
shll $0x18, %r11d
orl %r10d, %r11d
movzbl 0x4(%rdi), %r10d
shll $0x10, %r10d
orl %r11d, %r10d
movl %r10d, (%rcx)
movzwl 0xa(%rdi), %ecx
movzbl 0x9(%rdi), %r10d
shll $0x18, %r10d
orl %ecx, %r10d
movzbl 0x8(%rdi), %ecx
shll $0x10, %ecx
orl %r10d, %ecx
movl %ecx, (%r8)
testq %r9, %r9
je 0x8e78
movzwl 0xe(%rdi), %ecx
movzbl 0xd(%rdi), %r8d
shll $0x18, %r8d
orl %ecx, %r8d
movzbl 0xc(%rdi), %ecx
shll $0x10, %ecx
orl %r8d, %ecx
movl %ecx, (%r9)
movzwl 0x12(%rdi), %ecx
movzbl 0x11(%rdi), %r8d
shll $0x18, %r8d
orl %ecx, %r8d
movzbl 0x10(%rdi), %ecx
shll $0x10, %ecx
orl %r8d, %ecx
movl %ecx, (%rsi)
movzwl 0x16(%rdi), %ecx
movzbl 0x15(%rdi), %esi
shll $0x18, %esi
orl %ecx, %esi
movzbl 0x14(%rdi), %ecx
shll $0x10, %ecx
orl %esi, %ecx
movl %ecx, (%rax)
movl $0x1, %eax
testq %rdx, %rdx
je 0x8ece
movzwl 0x1a(%rdi), %ecx
movzbl 0x19(%rdi), %esi
shll $0x18, %esi
orl %ecx, %esi
movzbl 0x18(%rdi), %ecx
shll $0x10, %ecx
orl %esi, %ecx
movl %ecx, (%rdx)
retq
// File: /workspace/github_cpp_makefile_star2_O1/rurban[P]dgnlib/dgnread.cpp
// Function: DGNFreeElement
void DGNFreeElement( DGNHandle hDGN, DGNElemCore *psElement )

{
    if( psElement->attr_data != NULL )
        VSIFree( psElement->attr_data );

    if( psElement->raw_data != NULL )
        VSIFree( psElement->raw_data );

    if( psElement->stype == DGNST_TAG_SET )
    {
        int             iTag;

        DGNElemTagSet *psTagSet = (DGNElemTagSet *) psElement;
        CPLFree( psTagSet->tagSetName );

        for( iTag = 0; iTag < psTagSet->tagCount; iTag++ )
        {
            CPLFree( psTagSet->tagList[iTag].name );
            CPLFree( psTagSet->tagList[iTag].prompt );

            if( psTagSet->tagList[iTag].type == 1 )
                CPLFree( psTagSet->tagList[iTag].defaultValue.string );
        }
        CPLFree( psTagSet->tagList );
    }
    else if( psElement->stype == DGNST_TAG_VALUE )
    {
        if( ((DGNElemTagValue *) psElement)->tagType == 1 )
            CPLFree( ((DGNElemTagValue *) psElement)->tagValue.string );
    }

    CPLFree( psElement );
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq 0x38(%rsi), %rdi
testq %rdi, %rdi
je 0xb0c9
callq 0x701d
movq 0x48(%rbx), %rdi
testq %rdi, %rdi
je 0xb0d7
callq 0x701d
movl 0xc(%rbx), %eax
cmpl $0x9, %eax
je 0xb142
cmpl $0xa, %eax
jne 0xb157
movq 0x60(%rbx), %rdi
callq 0x701d
movl $0x68, %r14d
cmpl $0x0, 0x50(%rbx)
jle 0xb14e
xorl %r15d, %r15d
xorl %r12d, %r12d
movq 0x68(%rbx), %rax
movq (%rax,%r15), %rdi
callq 0x701d
movq 0x68(%rbx), %rax
movq 0x10(%rax,%r15), %rdi
callq 0x701d
movq 0x68(%rbx), %rax
cmpl $0x1, 0x18(%rax,%r15)
jne 0xb130
movq 0x20(%rax,%r15), %rdi
callq 0x701d
incq %r12
movslq 0x50(%rbx), %rax
addq $0x28, %r15
cmpq %rax, %r12
jl 0xb0ff
jmp 0xb14e
movl $0x60, %r14d
cmpl $0x1, 0x50(%rbx)
jne 0xb157
movq (%rbx,%r14), %rdi
callq 0x701d
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x701d
// File: /workspace/github_cpp_makefile_star2_O1/rurban[P]dgnlib/dgnread.cpp
// Function: DGNInverseTransformPoint(DGNInfo*, DGNPoint*)
void DGNInverseTransformPoint( DGNInfo *psDGN, DGNPoint *psPoint )

{
    psPoint->x = (psPoint->x + psDGN->origin_x) / psDGN->scale;
    psPoint->y = (psPoint->y + psDGN->origin_y) / psDGN->scale;
    psPoint->z = (psPoint->z + psDGN->origin_z) / psDGN->scale;

    psPoint->x = MAX(-2147483647,MIN(2147483647,psPoint->x));
    psPoint->y = MAX(-2147483647,MIN(2147483647,psPoint->y));
    psPoint->z = MAX(-2147483647,MIN(2147483647,psPoint->z));
}

// Assembly:
movsd (%rsi), %xmm5
addsd 0x20028(%rdi), %xmm5
movsd 0x8(%rsi), %xmm2
movsd 0x20020(%rdi), %xmm3
divsd %xmm3, %xmm5
movsd %xmm5, (%rsi)
addsd 0x20030(%rdi), %xmm2
divsd %xmm3, %xmm2
movsd %xmm2, 0x8(%rsi)
movsd 0x5a4b(%rip), %xmm1     # 0x10c08
ucomisd %xmm1, %xmm5
movapd %xmm1, %xmm4
cmpltsd %xmm5, %xmm4
movapd %xmm4, %xmm6
andpd %xmm1, %xmm6
movsd 0x64be(%rip), %xmm0     # 0x11698
andnpd %xmm0, %xmm4
orpd %xmm6, %xmm4
movapd %xmm5, %xmm6
cmpltsd %xmm0, %xmm6
andpd %xmm6, %xmm4
andnpd %xmm1, %xmm6
orpd %xmm4, %xmm6
movapd %xmm6, %xmm7
ja 0xb201
movapd %xmm5, %xmm7
movsd 0x10(%rsi), %xmm4
ucomisd %xmm5, %xmm0
ja 0xb210
movapd %xmm7, %xmm6
addsd 0x20038(%rdi), %xmm4
movsd %xmm6, (%rsi)
ucomisd %xmm1, %xmm2
movapd %xmm1, %xmm6
cmpltsd %xmm2, %xmm6
movapd %xmm6, %xmm5
andpd %xmm1, %xmm5
andnpd %xmm0, %xmm6
orpd %xmm5, %xmm6
movapd %xmm2, %xmm5
cmpltsd %xmm0, %xmm5
andpd %xmm5, %xmm6
andnpd %xmm1, %xmm5
orpd %xmm6, %xmm5
movapd %xmm5, %xmm6
ja 0xb258
movapd %xmm2, %xmm6
divsd %xmm3, %xmm4
ucomisd %xmm2, %xmm0
ja 0xb266
movapd %xmm6, %xmm5
movsd %xmm5, 0x8(%rsi)
ucomisd %xmm1, %xmm4
movapd %xmm1, %xmm3
cmpltsd %xmm4, %xmm3
movapd %xmm3, %xmm2
andpd %xmm1, %xmm2
andnpd %xmm0, %xmm3
orpd %xmm2, %xmm3
movapd %xmm4, %xmm2
cmpltsd %xmm0, %xmm2
andpd %xmm2, %xmm3
andnpd %xmm1, %xmm2
orpd %xmm3, %xmm2
movapd %xmm2, %xmm1
ja 0xb2a7
movapd %xmm4, %xmm1
ucomisd %xmm4, %xmm0
ja 0xb2b1
movapd %xmm1, %xmm2
movsd %xmm2, 0x10(%rsi)
retq
// File: /workspace/github_cpp_makefile_star2_O1/rurban[P]dgnlib/dgnread.cpp
// Function: DGNInverseTransformPointToInt(DGNInfo*, DGNPoint*, unsigned char*)
void DGNInverseTransformPointToInt( DGNInfo *psDGN, DGNPoint *psPoint,
                                    unsigned char *pabyTarget )

{
    double     adfCT[3];
    int        i;

    adfCT[0] = (psPoint->x + psDGN->origin_x) / psDGN->scale;
    adfCT[1] = (psPoint->y + psDGN->origin_y) / psDGN->scale;
    adfCT[2] = (psPoint->z + psDGN->origin_z) / psDGN->scale;

    for( i = 0; i < psDGN->dimension; i++ )
    {
        GInt32 nCTI;
        unsigned char *pabyCTI = (unsigned char *) &nCTI;

        nCTI = (GInt32) MAX(-2147483647,MIN(2147483647,adfCT[i]));
        
#ifdef WORDS_BIGENDIAN 
        pabyTarget[i*4+0] = pabyCTI[1];
        pabyTarget[i*4+1] = pabyCTI[0];
        pabyTarget[i*4+2] = pabyCTI[3];
        pabyTarget[i*4+3] = pabyCTI[2];
#else
        pabyTarget[i*4+3] = pabyCTI[1];
        pabyTarget[i*4+2] = pabyCTI[0];
        pabyTarget[i*4+1] = pabyCTI[3];
        pabyTarget[i*4+0] = pabyCTI[2];
#endif        
    }
}

// Assembly:
movsd (%rsi), %xmm0
addsd 0x20028(%rdi), %xmm0
movsd 0x20020(%rdi), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x18(%rsp)
movsd 0x8(%rsi), %xmm0
addsd 0x20030(%rdi), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, -0x10(%rsp)
movsd 0x10(%rsi), %xmm0
addsd 0x20038(%rdi), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, -0x8(%rsp)
cmpl $0x0, 0x20018(%rdi)
jle 0xb37b
xorl %eax, %eax
movsd 0x58f2(%rip), %xmm0     # 0x10c08
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movsd 0x6375(%rip), %xmm1     # 0x11698
movsd -0x18(%rsp,%rax,8), %xmm2
xorl %esi, %esi
ucomisd %xmm0, %xmm2
setbe %sil
addl %esi, %esi
addl %ecx, %esi
ucomisd %xmm2, %xmm1
cmovbel %ecx, %esi
ucomisd %xmm0, %xmm2
cvttsd2si %xmm2, %r8d
cmoval %esi, %r8d
ucomisd %xmm2, %xmm1
cmoval %esi, %r8d
movl %r8d, %esi
movw %r8w, 0x2(%rdx,%rax,4)
shrl $0x10, %r8d
shrl $0x18, %esi
movb %sil, 0x1(%rdx,%rax,4)
movb %r8b, (%rdx,%rax,4)
incq %rax
movslq 0x20018(%rdi), %rsi
cmpq %rsi, %rax
jl 0xb323
retq
// File: /workspace/github_cpp_makefile_star2_O1/rurban[P]dgnlib/dgnread.cpp
// Function: DGNLoadTCB
int DGNLoadTCB( DGNHandle hDGN )

{
    DGNInfo     *psDGN = (DGNInfo *) hDGN;

    if( psDGN->got_tcb )
        return TRUE;

    while( !psDGN->got_tcb )
    {
        DGNElemCore *psElem = DGNReadElement( hDGN );
        if( psElem == NULL )
        {
            CPLError( CE_Failure, CPLE_AppDefined, 
                      "DGNLoadTCB() - unable to find TCB in file." );
            return FALSE;
        }
        DGNFreeElement( hDGN, psElem );
    }

    return TRUE;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl $0x1, %ebx
cmpl $0x0, 0x20014(%rdi)
jne 0xb3db
movq %rdi, %r14
leaq 0x64bc(%rip), %r15      # 0x11858
cmpl $0x0, 0x20014(%r14)
jne 0xb3db
movq %r14, %rdi
callq 0x8f14
movq %rax, %r12
testq %rax, %rax
je 0xb3c0
movq %r12, %rsi
callq 0xb0b0
jmp 0xb3d4
movl $0x3, %edi
movl $0x1, %esi
movq %r15, %rdx
xorl %eax, %eax
callq 0x46dc
testq %r12, %r12
jne 0xb39c
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/rurban[P]dgnlib/dgnread.cpp
// Function: DGNGetElementIndex
const DGNElementInfo *DGNGetElementIndex( DGNHandle hDGN, int *pnElementCount )

{
    DGNInfo     *psDGN = (DGNInfo *) hDGN;

    DGNBuildIndex( psDGN );

    if( pnElementCount != NULL )
        *pnElementCount = psDGN->element_count;
    
    return psDGN->element_index;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x8847
testq %r14, %r14
je 0xb406
movl 0x20044(%rbx), %eax
movl %eax, (%r14)
movq 0x20050(%rbx), %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/rurban[P]dgnlib/dgnread.cpp
// Function: DGNGetExtents
int DGNGetExtents( DGNHandle hDGN, double * padfExtents )

{
    DGNInfo     *psDGN = (DGNInfo *) hDGN;
    DGNPoint    sMin, sMax;

    DGNBuildIndex( psDGN );

    if( !psDGN->got_bounds )
        return FALSE;

    sMin.x = psDGN->min_x - 2147483648.0;
    sMin.y = psDGN->min_y - 2147483648.0;
    sMin.z = psDGN->min_z - 2147483648.0;
    
    DGNTransformPoint( psDGN, &sMin );

    padfExtents[0] = sMin.x;
    padfExtents[1] = sMin.y;
    padfExtents[2] = sMin.z;
    
    sMax.x = psDGN->max_x - 2147483648.0;
    sMax.y = psDGN->max_y - 2147483648.0;
    sMax.z = psDGN->max_z - 2147483648.0;

    DGNTransformPoint( psDGN, &sMax );

    padfExtents[3] = sMax.x;
    padfExtents[4] = sMax.y;
    padfExtents[5] = sMax.z;

    return TRUE;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x8847
cmpl $0x0, 0x2035c(%r14)
je 0xb527
movl 0x20360(%r14), %eax
cvtsi2sd %rax, %xmm1
movsd 0x6222(%rip), %xmm0     # 0x11668
addsd %xmm0, %xmm1
movl 0x20364(%r14), %eax
cvtsi2sd %rax, %xmm2
addsd %xmm0, %xmm2
movl 0x20368(%r14), %eax
cvtsi2sd %rax, %xmm3
addsd %xmm0, %xmm3
movsd 0x20020(%r14), %xmm4
mulsd %xmm4, %xmm1
subsd 0x20028(%r14), %xmm1
mulsd %xmm4, %xmm2
subsd 0x20030(%r14), %xmm2
mulsd %xmm4, %xmm3
subsd 0x20038(%r14), %xmm3
movsd %xmm1, (%rbx)
movsd %xmm2, 0x8(%rbx)
movsd %xmm3, 0x10(%rbx)
movl 0x2036c(%r14), %eax
xorps %xmm1, %xmm1
cvtsi2sd %rax, %xmm1
movl 0x20370(%r14), %eax
xorps %xmm2, %xmm2
cvtsi2sd %rax, %xmm2
addsd %xmm0, %xmm1
movl 0x20374(%r14), %eax
xorps %xmm3, %xmm3
cvtsi2sd %rax, %xmm3
movsd 0x20020(%r14), %xmm4
mulsd %xmm4, %xmm1
subsd 0x20028(%r14), %xmm1
addsd %xmm0, %xmm2
mulsd %xmm4, %xmm2
subsd 0x20030(%r14), %xmm2
addsd %xmm0, %xmm3
mulsd %xmm4, %xmm3
subsd 0x20038(%r14), %xmm3
movsd %xmm1, 0x18(%rbx)
movsd %xmm2, 0x20(%rbx)
movsd %xmm3, 0x28(%rbx)
movl $0x1, %eax
jmp 0xb529
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/rurban[P]dgnlib/dgnread.cpp
// Function: DGNParseColorTable(DGNInfo*)
static DGNElemCore *DGNParseColorTable( DGNInfo * psDGN )

{
    DGNElemCore *psElement;
    DGNElemColorTable  *psColorTable;
            
    psColorTable = (DGNElemColorTable *) 
        CPLCalloc(sizeof(DGNElemColorTable),1);
    psElement = (DGNElemCore *) psColorTable;
    psElement->stype = DGNST_COLORTABLE;

    DGNParseCore( psDGN, psElement );

    psColorTable->screen_flag = 
        psDGN->abyElem[36] + psDGN->abyElem[37] * 256;

    memcpy( psColorTable->color_info[255], psDGN->abyElem+38, 3 );
    memcpy( psColorTable->color_info, psDGN->abyElem+41, 765 ); 

    // We used to only install a color table as the default color
    // table if it was the first in the file.  But apparently we should
    // really be using the last one.  This doesn't necessarily accomplish
    // that either if the elements are being read out of order but it will
    // usually do better at least. 
    memcpy( psDGN->color_table, psColorTable->color_info, 768 );
    psDGN->got_color_table = 1;
    
    return psElement;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x358, %edi            # imm = 0x358
movl $0x1, %esi
callq 0x2d54
movq %rax, %r14
movl $0x3, 0xc(%rax)
movq %rbx, %rdi
movq %rax, %rsi
callq 0xafa2
movzwl 0x34(%rbx), %eax
movl %eax, 0x50(%r14)
leaq 0x54(%r14), %r15
movb 0x38(%rbx), %al
movb %al, 0x353(%r14)
movzwl 0x36(%rbx), %eax
movw %ax, 0x351(%r14)
leaq 0x39(%rbx), %rsi
movl $0x2fd, %edx            # imm = 0x2FD
movq %r15, %rdi
callq 0x2240
leaq 0x2005c(%rbx), %rdi
movl $0x300, %edx            # imm = 0x300
movq %r15, %rsi
callq 0x2240
movl $0x1, 0x20058(%rbx)
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/rurban[P]dgnlib/dgnwrite.cpp
// Function: DGNWriteBounds(DGNInfo*, DGNElemCore*, DGNPoint*, DGNPoint*)
static void DGNWriteBounds( DGNInfo *psInfo, DGNElemCore *psElement,
                            DGNPoint *psMin, DGNPoint *psMax )

{
    CPLAssert( psElement->raw_bytes >= 28 );

    DGNInverseTransformPointToInt( psInfo, psMin, psElement->raw_data + 4 );
    DGNInverseTransformPointToInt( psInfo, psMax, psElement->raw_data + 16 );

    /* convert from twos complement to "binary offset" format. */

    psElement->raw_data[5] ^= 0x80;
    psElement->raw_data[9] ^= 0x80;
    psElement->raw_data[13] ^= 0x80;
    psElement->raw_data[17] ^= 0x80;
    psElement->raw_data[21] ^= 0x80;
    psElement->raw_data[25] ^= 0x80;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rcx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x48(%rsi), %rax
addq $0x4, %rax
movq %rdx, %rsi
movq %rax, %rdx
callq 0xb2b7
movq 0x48(%r14), %rdx
addq $0x10, %rdx
movq %r15, %rdi
movq %rbx, %rsi
callq 0xb2b7
movq 0x48(%r14), %rax
xorb $-0x80, 0x5(%rax)
movq 0x48(%r14), %rax
xorb $-0x80, 0x9(%rax)
movq 0x48(%r14), %rax
xorb $-0x80, 0xd(%rax)
movq 0x48(%r14), %rax
xorb $-0x80, 0x11(%rax)
movq 0x48(%r14), %rax
xorb $-0x80, 0x15(%rax)
movq 0x48(%r14), %rax
xorb $-0x80, 0x19(%rax)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/rurban[P]dgnlib/dgnwrite.cpp
// Function: DGNCreateColorTableElem
DGNElemCore *
DGNCreateColorTableElem( DGNHandle hDGN, int nScreenFlag, 
                         GByte abyColorInfo[256][3] )

{
    DGNElemColorTable *psCT;
    DGNElemCore *psCore;

/* -------------------------------------------------------------------- */
/*      Allocate element.                                               */
/* -------------------------------------------------------------------- */
    psCT = (DGNElemColorTable *) CPLCalloc( sizeof(DGNElemColorTable), 1 );
    psCore = &(psCT->core);

    DGNInitializeElemCore( hDGN, psCore );
    psCore->stype = DGNST_COLORTABLE;
    psCore->type = DGNT_GROUP_DATA;
    psCore->level = DGN_GDL_COLOR_TABLE;

/* -------------------------------------------------------------------- */
/*      Set colortable specific information in the structure.           */
/* -------------------------------------------------------------------- */
    psCT->screen_flag = nScreenFlag;
    memcpy( psCT->color_info, abyColorInfo, 768 );

/* -------------------------------------------------------------------- */
/*      Setup Raw data for the color table specific portion.            */
/* -------------------------------------------------------------------- */
    psCore->raw_bytes = 806;
    psCore->raw_data = (unsigned char*) CPLCalloc(psCore->raw_bytes,1);

    psCore->raw_data[36] = (unsigned char) (nScreenFlag % 256);
    psCore->raw_data[37] = (unsigned char) (nScreenFlag / 256);

    memcpy( psCore->raw_data + 38, abyColorInfo[255], 3 );
    memcpy( psCore->raw_data + 41, abyColorInfo, 783 );
    
/* -------------------------------------------------------------------- */
/*      Set the core raw data.                                          */
/* -------------------------------------------------------------------- */
    DGNUpdateElemCoreExtended( hDGN, psCore );
    
    return psCore;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movl %esi, %r15d
movl $0x358, %edi            # imm = 0x358
movl $0x1, %esi
callq 0x2d54
movq %rax, %r14
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movups %xmm0, 0x10(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x30(%rax)
movups %xmm0, 0x40(%rax)
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
movabsq $0x3ffffffff, %rax      # imm = 0x3FFFFFFFF
movq %rax, 0x8(%r14)
movabsq $0x500000001, %rax      # imm = 0x500000001
movq %rax, 0x10(%r14)
movl %r15d, 0x50(%r14)
leaq 0x54(%r14), %rdi
movl $0x300, %edx            # imm = 0x300
movq %rbx, %rsi
callq 0x2240
movl $0x326, 0x40(%r14)      # imm = 0x326
movl $0x326, %edi            # imm = 0x326
movl $0x1, %esi
callq 0x2d54
movq %rax, 0x48(%r14)
movb %r15b, 0x24(%rax)
leal 0xff(%r15), %eax
testl %r15d, %r15d
cmovnsl %r15d, %eax
movq 0x48(%r14), %rcx
movb %ah, 0x25(%rcx)
movq 0x48(%r14), %rax
movzwl 0x2fd(%rbx), %ecx
movw %cx, 0x26(%rax)
movb 0x2ff(%rbx), %cl
movb %cl, 0x28(%rax)
movq 0x48(%r14), %rdi
addq $0x29, %rdi
movl $0x30f, %edx            # imm = 0x30F
movq %rbx, %rsi
callq 0x2240
movq %r14, %rsi
callq 0xc46f
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/rurban[P]dgnlib/dgnwrite.cpp
// Function: DGNPointToInt(DGNInfo*, DGNPoint*, unsigned char*)
static void DGNPointToInt( DGNInfo *psDGN, DGNPoint *psPoint, 
                           unsigned char *pabyTarget )

{
    double     adfCT[4];
    int        i;

    adfCT[0] = psPoint->x;
    adfCT[1] = psPoint->y;
    adfCT[2] = psPoint->z;
    adfCT[3] = 0;
    assert(psDGN->dimension < 3);

    for( i = 0; i < psDGN->dimension; i++ )
    {
        GInt32 nCTI;
        unsigned char *pabyCTI = (unsigned char *) &nCTI;

        nCTI = (GInt32) MAX(-2147483647,MIN(2147483647,adfCT[i]));
        
#ifdef WORDS_BIGENDIAN 
        pabyTarget[i*4+0] = pabyCTI[1];
        pabyTarget[i*4+1] = pabyCTI[0];
        pabyTarget[i*4+2] = pabyCTI[3];
        pabyTarget[i*4+3] = pabyCTI[2];
#else
        pabyTarget[i*4+3] = pabyCTI[1];
        pabyTarget[i*4+2] = pabyCTI[0];
        pabyTarget[i*4+1] = pabyCTI[3];
        pabyTarget[i*4+0] = pabyCTI[2];
#endif        
    }
}

// Assembly:
subq $0x28, %rsp
movsd (%rsi), %xmm0
movsd %xmm0, (%rsp)
movsd 0x8(%rsi), %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x10(%rsi), %xmm0
movsd %xmm0, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
cmpl $0x2, 0x20018(%rdi)
jg 0xe55e
cmpl $0x0, 0x20018(%rdi)
jle 0xe559
xorl %eax, %eax
movsd 0x2713(%rip), %xmm0     # 0x10c08
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movsd 0x3196(%rip), %xmm1     # 0x11698
movsd (%rsp,%rax,8), %xmm2
xorl %esi, %esi
ucomisd %xmm0, %xmm2
setbe %sil
addl %esi, %esi
addl %ecx, %esi
ucomisd %xmm2, %xmm1
cmovbel %ecx, %esi
ucomisd %xmm0, %xmm2
cvttsd2si %xmm2, %r8d
cmoval %esi, %r8d
ucomisd %xmm2, %xmm1
cmoval %esi, %r8d
movl %r8d, %esi
movw %r8w, 0x2(%rdx,%rax,4)
shrl $0x10, %r8d
shrl $0x18, %esi
movb %sil, 0x1(%rdx,%rax,4)
movb %r8b, (%rdx,%rax,4)
incq %rax
movslq 0x20018(%rdi), %rsi
cmpq %rsi, %rax
jl 0xe502
addq $0x28, %rsp
retq
leaq 0x36f1(%rip), %rdi      # 0x11c56
leaq 0x36ff(%rip), %rsi      # 0x11c6b
leaq 0x3705(%rip), %rcx      # 0x11c78
movl $0x8a7, %edx            # imm = 0x8A7
callq 0x21c0
// File: /workspace/github_cpp_makefile_star2_O1/rurban[P]dgnlib/dgnwrite.cpp
// Function: DGNAddMSLink
int DGNAddMSLink( DGNHandle hDGN, DGNElemCore *psElement, 
                  int nLinkageType, int nEntityNum, int nMSLink )

{
    unsigned char abyLinkage[32];
    int           nLinkageSize;

    if( nLinkageType == DGNLT_DMRS )
    {
        nLinkageSize = 8;
        abyLinkage[0] = 0x00;
        abyLinkage[1] = 0x00;
        abyLinkage[2] = (GByte) (nEntityNum % 256);
        abyLinkage[3] = (GByte) (nEntityNum / 256);
        abyLinkage[4] = (GByte) (nMSLink % 256);
        abyLinkage[5] = (GByte) ((nMSLink / 256) % 256);
        abyLinkage[6] = (GByte) (nMSLink / 65536);
        abyLinkage[7] = 0x01;
    }
    else
    {
        nLinkageSize = 16;
        abyLinkage[0] = 0x07;
        abyLinkage[1] = 0x10;
        abyLinkage[2] = (GByte) (nLinkageType % 256);
        abyLinkage[3] = (GByte) (nLinkageType / 256);
        abyLinkage[4] = (GByte) (0x81);
        abyLinkage[5] = (GByte) (0x0F);
        abyLinkage[6] = (GByte) (nEntityNum % 256);
        abyLinkage[7] = (GByte) (nEntityNum / 256);
        abyLinkage[8] = (GByte) (nMSLink % 256);
        abyLinkage[9] = (GByte) ((nMSLink / 256) % 256);
        abyLinkage[10] = (GByte) ((nMSLink / 65536) % 256);
        abyLinkage[11] = (GByte) (nMSLink / 16777216);
        abyLinkage[12] = 0x00;
        abyLinkage[13] = 0x00;
        abyLinkage[14] = 0x00;
        abyLinkage[15] = 0x00;
    }

    return DGNAddRawAttrLink( hDGN, psElement, nLinkageSize, abyLinkage );
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
testl %edx, %edx
je 0xe843
movw $0x1007, (%rsp)         # imm = 0x1007
movb %dl, 0x2(%rsp)
movl $0xff, %eax
leal (%rdx,%rax), %ebx
testl %edx, %edx
cmovnsl %edx, %ebx
movb %bh, 0x3(%rsp)
movw $0xf81, 0x4(%rsp)       # imm = 0xF81
leal (%rcx,%rax), %edx
testl %ecx, %ecx
cmovnsl %ecx, %edx
movb %cl, 0x6(%rsp)
movb %dh, 0x7(%rsp)
movb %r8b, 0x8(%rsp)
addl %r8d, %eax
leal 0xffff(%r8), %ecx
testl %r8d, %r8d
cmovnsl %r8d, %eax
leal 0xffffff(%r8), %edx
movb %ah, 0x9(%rsp)
cmovnsl %r8d, %ecx
cmovnsl %r8d, %edx
shrl $0x10, %ecx
movb %cl, 0xa(%rsp)
shrl $0x18, %edx
movb %dl, 0xb(%rsp)
movl $0x0, 0xc(%rsp)
movl $0x10, %edx
jmp 0xe88d
movw $0x0, (%rsp)
movb %cl, 0x2(%rsp)
movl $0xff, %eax
leal (%rcx,%rax), %edx
testl %ecx, %ecx
cmovnsl %ecx, %edx
movb %dh, 0x3(%rsp)
movb %r8b, 0x4(%rsp)
addl %r8d, %eax
testl %r8d, %r8d
cmovnsl %r8d, %eax
leal 0xffff(%r8), %ecx
movb %ah, 0x5(%rsp)
cmovnsl %r8d, %ecx
shrl $0x10, %ecx
movb %cl, 0x6(%rsp)
movb $0x1, 0x7(%rsp)
movl $0x8, %edx
movq %rsp, %rcx
callq 0xdb97
addq $0x20, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/rurban[P]dgnlib/dgnopen.cpp
// Function: DGNTestOpen
int DGNTestOpen( GByte *pabyHeader, int nByteCount )

{
    if( nByteCount < 4 )
        return TRUE;

    // Is it a cell library?
    if( pabyHeader[0] == 0x08
        && pabyHeader[1] == 0x05
        && pabyHeader[2] == 0x17
        && pabyHeader[3] == 0x00 )
        return TRUE;

    // Is it not a regular 2D or 3D file?
    if( (pabyHeader[0] != 0x08 && pabyHeader[0] != 0xC8) 
        || pabyHeader[1] != 0x09
        || pabyHeader[2] != 0xFE || pabyHeader[3] != 0x02 )
        return FALSE;

    return TRUE;
}

// Assembly:
movl $0x1, %eax
cmpl $0x4, %esi
jge 0xe8cb
retq
movzbl (%rdi), %ecx
cmpl $0xc8, %ecx
je 0xe8fa
cmpl $0x8, %ecx
jne 0xe915
cmpb $0x5, 0x1(%rdi)
jne 0xe8ed
cmpb $0x17, 0x2(%rdi)
jne 0xe8ed
cmpb $0x0, 0x3(%rdi)
je 0xe8ca
cmpl $0xc8, %ecx
je 0xe8fa
cmpl $0x8, %ecx
jne 0xe915
cmpb $0x9, 0x1(%rdi)
jne 0xe915
cmpb $-0x2, 0x2(%rdi)
movl $0x0, %eax
jne 0xe8ca
xorl %eax, %eax
cmpb $0x2, 0x3(%rdi)
sete %al
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/rurban[P]dgnlib/dgnopen.cpp
// Function: DGNSpatialFilterToUOR(DGNInfo*)
void DGNSpatialFilterToUOR( DGNInfo *psDGN )

{
    DGNPoint    sMin, sMax;

    if( psDGN->sf_converted_to_uor 
        || !psDGN->has_spatial_filter 
        || !psDGN->got_tcb )
        return;

    sMin.x = psDGN->sf_min_x_geo;
    sMin.y = psDGN->sf_min_y_geo;
    sMin.z = 0;
    
    sMax.x = psDGN->sf_max_x_geo;
    sMax.y = psDGN->sf_max_y_geo;
    sMax.z = 0;

    DGNInverseTransformPoint( psDGN, &sMin );
    DGNInverseTransformPoint( psDGN, &sMax );

    psDGN->sf_min_x = (GUInt32) (sMin.x + 2147483648.0);
    psDGN->sf_min_y = (GUInt32) (sMin.y + 2147483648.0);
    psDGN->sf_max_x = (GUInt32) (sMax.x + 2147483648.0);
    psDGN->sf_max_y = (GUInt32) (sMax.y + 2147483648.0);

    psDGN->sf_converted_to_uor = TRUE;
}

// Assembly:
cmpl $0x0, 0x2037c(%rdi)
je 0xeab3
retq
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
cmpl $0x0, 0x20378(%rdi)
je 0xeb97
cmpl $0x0, 0x20014(%rbx)
je 0xeb97
movsd 0x20398(%rbx), %xmm0
leaq 0x18(%rsp), %r15
movsd %xmm0, (%r15)
movsd 0x203a0(%rbx), %xmm0
movsd %xmm0, 0x8(%r15)
xorl %eax, %eax
movq %rax, 0x10(%r15)
movsd 0x203a8(%rbx), %xmm0
movq %rsp, %r14
movsd %xmm0, (%r14)
movsd 0x203b0(%rbx), %xmm0
movsd %xmm0, 0x8(%r14)
movq %rax, 0x10(%r14)
movq %rbx, %rdi
movq %r15, %rsi
callq 0xb183
movq %rbx, %rdi
movq %r14, %rsi
callq 0xb183
movsd 0x3179(%rip), %xmm0     # 0x11cb8
movsd (%r15), %xmm1
addsd %xmm0, %xmm1
cvttsd2si %xmm1, %rax
movl %eax, 0x20388(%rbx)
movsd 0x8(%r15), %xmm1
addsd %xmm0, %xmm1
cvttsd2si %xmm1, %rax
movl %eax, 0x2038c(%rbx)
movsd (%r14), %xmm1
addsd %xmm0, %xmm1
cvttsd2si %xmm1, %rax
movl %eax, 0x20390(%rbx)
addsd 0x8(%r14), %xmm0
cvttsd2si %xmm0, %rax
movl %eax, 0x20394(%rbx)
movl $0x1, 0x2037c(%rbx)
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/yahoo[P]UDPing/src/options.cc
// Function: Options::Options(int, char**, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
Options::Options (int argc, char** argv, string optstring) {
    memset (options, 0, 256 * sizeof(char*));
    int opt;
    while (1) {
        optarg = 0;
        opt = getopt(argc, argv, optstring.c_str());
        if (opt < 0) {
            break;
        } else if (opt == '?') {
            exit(-1);
        }
        if (optarg) {
            options[opt] = new char[strlen(optarg) + 1];
            strcpy(options[opt], optarg);
        } else {
            options[opt] = (char*)1;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %r15
movl $0x800, %edx            # imm = 0x800
xorl %esi, %esi
callq 0x2190
movq 0x478b(%rip), %r12      # 0x7fc0
movq $0x0, (%r12)
movq (%rbx), %rdx
movl %ebp, %edi
movq %r14, %rsi
callq 0x20c0
testl %eax, %eax
js 0x3889
cmpl $0x3f, %eax
je 0x3898
movq (%r12), %rdi
movl %eax, %r13d
testq %rdi, %rdi
je 0x387f
callq 0x2140
leaq 0x1(%rax), %rdi
callq 0x2030
movq %rax, (%r15,%r13,8)
movq (%r12), %rsi
movq %rax, %rdi
callq 0x2270
jmp 0x3835
movq $0x1, (%r15,%r13,8)
jmp 0x3835
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x2310
// File: /workspace/github_cpp_makefile_star2_O1/yahoo[P]UDPing/src/options.cc
// Function: Options::parseIntOption(char, int, int, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
int Options::parseIntOption (char index, int required, int min, int max, string usage, string error) {
    int ret = 0;
    if (options[index]) {
        ret = atoi(options[index]);
        if ((ret < min) || (ret > max)) {
            cerr << usage << error;
            exit (-1);
        }
    } else {
        if (required) {
            cerr << usage << error;
            exit (-1);
        }
    }
    return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %r9, %r14
movq 0x30(%rsp), %rbx
movslq %esi, %rax
movq (%rdi,%rax,8), %rdi
testq %rdi, %rdi
je 0x38dc
movl %r8d, %ebp
movl %ecx, %r15d
callq 0x23a0
cmpl %r15d, %eax
jl 0x38e2
cmpl %ebp, %eax
jg 0x38e2
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
testl %edx, %edx
je 0x38d1
movq 0x4707(%rip), %rdi      # 0x7ff0
movq %r14, %rsi
callq 0x2230
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2230
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x2310
// File: /workspace/github_cpp_makefile_star2_O1/yahoo[P]UDPing/src/options.cc
// Function: Options::getStringOption(char, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
char* Options::getStringOption (char index, int required, string usage, string error) {
    char* ret = 0;
    if (options[index] > (char*)1) {
        ret = options[index];
    } else {
        if (required) {
            cerr << usage << error;
            exit (-1);
        }
    }
    return ret;
}

// Assembly:
movslq %esi, %rax
movq (%rdi,%rax,8), %rax
cmpq $0x1, %rax
ja 0x3919
testl %edx, %edx
jne 0x391a
xorl %eax, %eax
retq
pushq %rbx
movq %r8, %rbx
movq 0x46cb(%rip), %rdi      # 0x7ff0
movq %rcx, %rsi
callq 0x2230
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2230
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x2310
// File: /workspace/github_cpp_makefile_star2_O1/yahoo[P]UDPing/src/delay.cc
// Function: checkTimer(timespec*)
long checkTimer (struct timespec* timer) {
    struct timespec time2;
    clock_gettime(CLOCK_REALTIME, &time2);
    long elapsed = (1000000000L * (time2.tv_sec - (*timer).tv_sec)) + (time2.tv_nsec - (*timer).tv_nsec);
    return elapsed;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
xorl %edi, %edi
movq %r14, %rsi
callq 0x2250
movq (%r14), %rcx
movq 0x8(%r14), %rax
subq (%rbx), %rcx
imulq $0x3b9aca00, %rcx, %rcx # imm = 0x3B9ACA00
subq 0x8(%rbx), %rax
addq %rcx, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/yahoo[P]UDPing/src/delay.cc
// Function: doRandomPause(timespec*, int)
void doRandomPause (struct timespec* timer, int avgDelayMS) {
    double desiredTimeNS = log((double)rand()/RAND_MAX) * -(avgDelayMS * 1000000);
    desiredTimeNS -= checkTimer(timer);
    /* limit the delay */
    if (desiredTimeNS > ((long)avgDelayMS * 1000000 * 10)) {
        desiredTimeNS = ((long)avgDelayMS * 1000000 * 10);
    }
    if (desiredTimeNS <= 0) {
        return;
    }
    /*printf ("Sleeping for %f ns\n", desiredTimeNS);*/
    struct timespec delay;
    struct timespec remaining;
    delay.tv_sec = desiredTimeNS/1000000000l;
    delay.tv_nsec = (desiredTimeNS - (delay.tv_sec * 1000000000l));
    while (nanosleep(&delay, &remaining)) {
        if (errno == EINTR) {
            memcpy (&delay, &remaining, sizeof(delay));
        } else {
            warn ("Nanosleep error");
            break;
        }
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movl %esi, %ebx
movq %rdi, %r14
callq 0x20e0
cvtsi2sd %eax, %xmm0
divsd 0x1ca2(%rip), %xmm0     # 0x5680
callq 0x21e0
imull $0xfff0bdc0, %ebx, %eax # imm = 0xFFF0BDC0
cvtsi2sd %eax, %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, 0x18(%rsp)
movq %rsp, %r15
xorl %edi, %edi
movq %r15, %rsi
callq 0x2250
movq (%r15), %rax
subq (%r14), %rax
movq 0x8(%r15), %rcx
imulq $0x3b9aca00, %rax, %rax # imm = 0x3B9ACA00
subq 0x8(%r14), %rcx
addq %rax, %rcx
xorps %xmm0, %xmm0
cvtsi2sd %rcx, %xmm0
movsd 0x18(%rsp), %xmm1
subsd %xmm0, %xmm1
movslq %ebx, %rax
imulq $0x989680, %rax, %rax   # imm = 0x989680
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
minsd %xmm1, %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
jae 0x3ad2
movapd %xmm0, %xmm1
divsd 0x1c2a(%rip), %xmm1     # 0x5688
cvttsd2si %xmm1, %rax
movq %rsp, %rdi
movq %rax, (%rdi)
imulq $0x3b9aca00, %rax, %rax # imm = 0x3B9ACA00
xorps %xmm1, %xmm1
cvtsi2sd %rax, %xmm1
subsd %xmm1, %xmm0
cvttsd2si %xmm0, %rax
movq %rax, 0x8(%rdi)
leaq 0x20(%rsp), %rsi
callq 0x20f0
testl %eax, %eax
je 0x3ad2
callq 0x2050
movq %rax, %rbx
movq %rsp, %r14
leaq 0x20(%rsp), %r15
cmpl $0x4, (%rbx)
jne 0x3ac4
movupd 0x20(%rsp), %xmm0
movapd %xmm0, (%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x20f0
testl %eax, %eax
jne 0x3aa3
jmp 0x3ad2
leaq 0x1bc5(%rip), %rdi      # 0x5690
xorl %eax, %eax
callq 0x2100
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/yahoo[P]UDPing/src/delay.cc
// Function: setIntervalTimer(int, void (*)(int))
void setIntervalTimer (int keepalive, sighandler_t handler) {
    struct itimerval it;
    signal (SIGALRM, handler);
    memset (&it, 0, sizeof (struct itimerval));
    it.it_interval.tv_sec = keepalive;
    it.it_interval.tv_usec = 0;
    it.it_value.tv_sec = keepalive;
    it.it_value.tv_usec = 0;
    if (setitimer(ITIMER_REAL, &it, (struct itimerval*)0)) {
         err(1, "Setitimer failed");
    }
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movl %edi, %ebx
movl $0xe, %edi
callq 0x2300
xorps %xmm0, %xmm0
movq %rsp, %rsi
movaps %xmm0, (%rsi)
movaps %xmm0, 0x10(%rsi)
movslq %ebx, %rax
movq %rax, (%rsi)
xorl %ecx, %ecx
movq %rcx, 0x8(%rsi)
movq %rax, 0x10(%rsi)
movq %rcx, 0x18(%rsi)
xorl %edi, %edi
xorl %edx, %edx
callq 0x2380
testl %eax, %eax
jne 0x3b21
addq $0x20, %rsp
popq %rbx
retq
leaq 0x1b78(%rip), %rsi      # 0x56a0
movl $0x1, %edi
xorl %eax, %eax
callq 0x2240
// File: /workspace/github_cpp_makefile_star2_O1/yahoo[P]UDPing/src/protocol.cc
// Function: makeSocket(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int)
int makeSocket (string host, int port) {
    int fd;
    socklen_t length;
    struct addrinfo* addrinfo;
    int s;
    if ((fd = socket( PF_INET, SOCK_DGRAM, 0 )) < 0) {
        err(1, "Problem creating socket");
    }
    
    stringstream portString;
    portString << port;
    if (s = getaddrinfo (host.c_str(), portString.str().c_str(), NULL, &addrinfo)) {
        err(1, "getaddrinfo: %s\n", gai_strerror(s));
    }

    if (bind(fd, addrinfo->ai_addr, sizeof(struct sockaddr))<0) {
        err(1, "Problem binding");
    }
    
    return fd;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x1b0, %rsp            # imm = 0x1B0
movl %esi, %ebp
movq %rdi, %r14
movl $0x2, %edi
movl $0x2, %esi
xorl %edx, %edx
callq 0x20d0
testl %eax, %eax
js 0x3c33
movl %eax, %ebx
leaq 0x28(%rsp), %rdi
callq 0x21b0
leaq 0x38(%rsp), %rdi
movl %ebp, %esi
callq 0x23e0
movq (%r14), %r14
leaq 0x40(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x23b0
movq 0x8(%rsp), %rsi
movq %rsp, %rcx
movq %r14, %rdi
xorl %edx, %edx
callq 0x2330
movl %eax, %ebp
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3beb
callq 0x2280
testl %ebp, %ebp
jne 0x3c46
movq (%rsp), %rax
movq 0x18(%rax), %rsi
movl %ebx, %edi
movl $0x10, %edx
callq 0x2090
testl %eax, %eax
js 0x3c63
movq 0x43a2(%rip), %rsi      # 0x7fb0
leaq 0x28(%rsp), %rdi
callq 0x21d0
leaq 0xa8(%rsp), %rdi
callq 0x2110
movl %ebx, %eax
addq $0x1b0, %rsp            # imm = 0x1B0
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x1a8c(%rip), %rsi      # 0x56c6
movl $0x1, %edi
xorl %eax, %eax
callq 0x2240
movl %ebp, %edi
callq 0x2350
leaq 0x1a8a(%rip), %rsi      # 0x56de
movl $0x1, %edi
movq %rax, %rdx
xorl %eax, %eax
callq 0x2240
leaq 0x1a85(%rip), %rsi      # 0x56ef
movl $0x1, %edi
xorl %eax, %eax
callq 0x2240
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3c93
callq 0x2280
jmp 0x3c93
jmp 0x3c90
movq %rax, %rbx
movq 0x4316(%rip), %rsi      # 0x7fb0
leaq 0x28(%rsp), %rdi
callq 0x21d0
leaq 0xa8(%rsp), %rdi
callq 0x2110
movq %rbx, %rdi
callq 0x2400
// File: /workspace/github_cpp_makefile_star2_O1/yahoo[P]UDPing/src/protocol.cc
// Function: getSockAddr(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int)
struct sockaddr* getSockAddr (string host, int port) {
    int s;
    struct sockaddr* ret = 0;
    struct addrinfo hints;
    struct addrinfo* addrinfo;
    char portString[100];

    memset (&hints, 0, sizeof(struct addrinfo));
    hints.ai_family = AF_INET;
    hints.ai_socktype = SOCK_DGRAM;
    hints.ai_flags = AI_PASSIVE;

    snprintf (portString, 100, "%d", port);

    if (s = getaddrinfo (host.c_str(), portString, &hints, &addrinfo)) {
        err(1, "getaddrinfo: %s\n", gai_strerror(s));
    } else {
        ret = new struct sockaddr;
        memcpy (ret, addrinfo->ai_addr, sizeof(ret));
    }
    freeaddrinfo(addrinfo);
    return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xb0, %rsp
movl %esi, %ecx
movq %rdi, %rbx
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %r14
movaps %xmm0, (%r14)
movaps %xmm0, 0x10(%r14)
movaps %xmm0, 0x20(%r14)
movabsq $0x200000002, %rax      # imm = 0x200000002
movq %rax, 0x4(%r14)
movl $0x1, (%r14)
leaq 0x1a03(%rip), %rdx      # 0x56ff
leaq 0x40(%rsp), %r15
movl $0x64, %esi
movq %r15, %rdi
xorl %eax, %eax
callq 0x23c0
movq (%rbx), %rdi
leaq 0x8(%rsp), %rcx
movq %r15, %rsi
movq %r14, %rdx
callq 0x2330
testl %eax, %eax
jne 0x3d58
movl $0x10, %edi
callq 0x22d0
movq %rax, %rbx
movq 0x8(%rsp), %rdi
movq 0x18(%rdi), %rax
movq (%rax), %rax
movq %rax, (%rbx)
callq 0x2340
movq %rbx, %rax
addq $0xb0, %rsp
popq %rbx
popq %r14
popq %r15
retq
movl %eax, %edi
callq 0x2350
leaq 0x1978(%rip), %rsi      # 0x56de
movl $0x1, %edi
movq %rax, %rdx
xorl %eax, %eax
callq 0x2240
// File: /workspace/github_cpp_makefile_star2_O1/yahoo[P]UDPing/src/protocol.cc
// Function: sendMessage(int, int, unsigned char*, unsigned int, int, unsigned char*, unsigned int, int, char const*, int, int)
int sendMessage(
                int socketFD, 
                int ifIndex,
                uint8_t *srcMacHex,
                uint32_t srcIp,
                int srcPort,
                uint8_t *dstMacHex,
                uint32_t dstIp,
                int dstPort,
                const char* message,
                int datalen,
                int checksumLength) {
    struct sockaddr_ll device;
//    printf ("Sending message <<%s>>\n", message);
    struct frame outboundFrame;
    int frameLength;

    memset (&device, 0, sizeof (device));
    device.sll_ifindex = ifIndex;
    device.sll_family = AF_PACKET;
    memcpy (device.sll_addr, srcMacHex, 6);
    device.sll_halen = 6;

    frameLength = buildFrame(&outboundFrame, srcMacHex, dstMacHex, srcIp, dstIp, srcPort, dstPort, message, datalen, checksumLength);

    uint8_t* frameBuf = (uint8_t*) &outboundFrame;

//    printf ("Packet Dump:\n");
//    for (int ix = 0; ix < frameLength; ix ++) {
//        printf("%02x ", frameBuf[ix]);
//        if (!((ix + 1) % 4)) {
//            printf ("\n");
//        }
//    }
//    printf ("\n\n");

    int bytes = sendto(socketFD, frameBuf, frameLength, 0, (struct sockaddr *) &device, sizeof (device));
    if (bytes != frameLength) {
        perror ("sendto failed");
    }

//    printf ("sendto sent %d of %d bytes!\n", bytes, frameLength);
    return datalen;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10040, %rsp          # imm = 0x10040
movl %r8d, %eax
movl %edi, %ebp
movl 0x10088(%rsp), %ebx
movl 0x10070(%rsp), %r8d
movl 0x10078(%rsp), %r10d
movq 0x10080(%rsp), %r11
movl 0x10090(%rsp), %r12d
xorps %xmm0, %xmm0
movq %rsp, %r14
movaps %xmm0, (%r14)
movl $0x0, 0x10(%r14)
movl %esi, 0x4(%r14)
movw $0x11, (%r14)
movzwl 0x4(%rdx), %esi
movw %si, 0x10(%r14)
movl (%rdx), %esi
movl %esi, 0xc(%r14)
movb $0x6, 0xb(%r14)
leaq 0x17(%rsp), %r15
movq %r15, %rdi
movq %rdx, %rsi
movq %r9, %rdx
movl %eax, %r9d
pushq %r12
pushq %rbx
pushq %r11
pushq %r10
callq 0x3e41
addq $0x20, %rsp
movslq %eax, %r12
movl %ebp, %edi
movq %r15, %rsi
movq %r12, %rdx
xorl %ecx, %ecx
movq %r14, %r8
movl $0x14, %r9d
callq 0x2070
cmpl %eax, %r12d
jne 0x3e33
movl %ebx, %eax
addq $0x10040, %rsp          # imm = 0x10040
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x18c8(%rip), %rdi      # 0x5702
callq 0x2210
jmp 0x3e21
// File: /workspace/github_cpp_makefile_star2_O1/yahoo[P]UDPing/src/protocol.cc
// Function: checksum(unsigned short*, int)
uint16_t checksum (uint16_t *addr, int len)
{
  int count = len;
  register uint32_t sum = 0;
  uint16_t answer = 0;

  // Sum up 2-byte values until none or only one byte left.
  while (count > 1) {
    sum += *(addr++);
    count -= 2;
  }

  // Add left-over byte, if any.
  if (count > 0) {
    sum += *(uint8_t *) addr;
  }

  // Fold 32-bit sum into 16 bits; we lose information by doing this,
  // increasing the chances of a collision.
  // sum = (lower 16 bits) + (upper 16 bits shifted right 16 bits)
  while (sum >> 16) {
    sum = (sum & 0xffff) + (sum >> 16);
  }

  // Checksum is one's compliment of sum.
  answer = ~sum;

  return (answer);
}

// Assembly:
xorl %eax, %eax
cmpl $0x2, %esi
jl 0x3f85
xorl %eax, %eax
movzwl (%rdi), %ecx
addq $0x2, %rdi
addl %ecx, %eax
leal -0x2(%rsi), %ecx
cmpl $0x3, %esi
movl %ecx, %esi
jg 0x3f70
jmp 0x3f87
movl %esi, %ecx
cmpl $0x1, %ecx
jne 0x3f91
movzbl (%rdi), %ecx
addl %ecx, %eax
cmpl $0x10000, %eax          # imm = 0x10000
jb 0x3faa
movl $0xffff, %ecx           # imm = 0xFFFF
movl %eax, %edx
shrl $0x10, %edx
andl %ecx, %eax
addl %edx, %eax
cmpl %ecx, %eax
ja 0x3f9d
notl %eax
retq