LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/rurban[P]dgnlib/cpl_string.cpp
// Function: CPLSPrintf
const char *CPLSPrintf(char *fmt, ...)
{
    va_list args;

    va_start(args, fmt);
#if defined(HAVE_VSNPRINTF)
    vsnprintf(gszCPLSPrintfBuffer[gnCPLSPrintfBuffer], CPLSPrintf_BUF_SIZE-1,
              fmt, args);
#else
    vsprintf(gszCPLSPrintfBuffer[gnCPLSPrintfBuffer], fmt, args);
#endif
    va_end(args);
    
   int nCurrent = gnCPLSPrintfBuffer;

    if (++gnCPLSPrintfBuffer == CPLSPrintf_BUF_Count)
      gnCPLSPrintfBuffer = 0;

    return gszCPLSPrintfBuffer[nCurrent];
}

// Assembly:
pushq %rbx
subq $0xd0, %rsp
movq %rdi, %r10
leaq 0x20(%rsp), %rdi
movq %rsi, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %al, %al
je 0x5ec9
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rsp, %rcx
movq %rdi, 0x10(%rcx)
leaq 0xe0(%rsp), %rax
movq %rax, 0x8(%rcx)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rcx)
movslq 0x22d30(%rip), %rax     # 0x28c20
imulq $0x1f40, %rax, %rdi     # imm = 0x1F40
leaq 0xf4a2(%rip), %rbx      # 0x153a0
addq %rbx, %rdi
movl $0x1f3f, %esi           # imm = 0x1F3F
movq %r10, %rdx
callq 0x2190
movslq 0x22d0b(%rip), %rax     # 0x28c20
leal 0x1(%rax), %ecx
xorl %edx, %edx
cmpl $0xa, %ecx
cmovnel %ecx, %edx
movl %edx, 0x22cfa(%rip)     # 0x28c20
imulq $0x1f40, %rax, %rax     # imm = 0x1F40
addq %rbx, %rax
addq $0xd0, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/rurban[P]dgnlib/cpl_string.cpp
// Function: CSLAppendPrintf
char **CSLAppendPrintf(char **papszStrList, char *fmt, ...)
{
    va_list args;

    va_start(args, fmt);
#if defined(HAVE_VSNPRINTF)
    vsnprintf(gszCPLSPrintfBuffer[gnCPLSPrintfBuffer], CPLSPrintf_BUF_SIZE-1,
              fmt, args);
#else
    vsprintf(gszCPLSPrintfBuffer[gnCPLSPrintfBuffer], fmt, args);
#endif
    va_end(args);

    int nCurrent = gnCPLSPrintfBuffer;

    if (++gnCPLSPrintfBuffer == CPLSPrintf_BUF_Count)
      gnCPLSPrintfBuffer = 0;

    return CSLAddString(papszStrList, gszCPLSPrintfBuffer[nCurrent]);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xd8, %rsp
movq %rsi, %r10
movq %rdi, %rbx
leaq 0x20(%rsp), %rsi
movq %rdx, 0x10(%rsi)
movq %rcx, 0x18(%rsi)
movq %r8, 0x20(%rsi)
movq %r9, 0x28(%rsi)
testb %al, %al
je 0x5f99
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rsp, %rcx
movq %rsi, 0x10(%rcx)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%rcx)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%rcx)
movslq 0x22c60(%rip), %rax     # 0x28c20
imulq $0x1f40, %rax, %rdi     # imm = 0x1F40
leaq 0xf3d2(%rip), %r14      # 0x153a0
addq %r14, %rdi
movl $0x1f3f, %esi           # imm = 0x1F3F
movq %r10, %rdx
callq 0x2190
movslq 0x22c3b(%rip), %rax     # 0x28c20
leal 0x1(%rax), %ecx
xorl %edx, %edx
cmpl $0xa, %ecx
cmovnel %ecx, %edx
movl %edx, 0x22c2a(%rip)     # 0x28c20
imulq $0x1f40, %rax, %rsi     # imm = 0x1F40
addq %r14, %rsi
movq %rbx, %rdi
callq 0x54dc
addq $0xd8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/rurban[P]dgnlib/cpl_string.cpp
// Function: CSLTestBoolean
int CSLTestBoolean( const char *pszValue )
{
    if( EQUAL(pszValue,"NO")
        || EQUAL(pszValue,"FALSE") 
        || EQUAL(pszValue,"OFF") 
        || EQUAL(pszValue,"0") )
        return FALSE;
    else
        return TRUE;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x868f(%rip), %rsi      # 0xe6b0
callq 0x22e0
xorl %ebx, %ebx
testl %eax, %eax
je 0x6068
leaq 0x8680(%rip), %rsi      # 0xe6b3
movq %r14, %rdi
callq 0x22e0
testl %eax, %eax
je 0x6068
leaq 0x854c(%rip), %rsi      # 0xe592
movq %r14, %rdi
callq 0x22e0
testl %eax, %eax
je 0x6068
leaq 0x8660(%rip), %rsi      # 0xe6b9
movq %r14, %rdi
callq 0x22e0
xorl %ebx, %ebx
testl %eax, %eax
setne %bl
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/rurban[P]dgnlib/cpl_string.cpp
// Function: CSLFetchBoolean
int CSLFetchBoolean( char **papszStrList, const char *pszKey, int bDefault )

{
    const char *pszValue;

    if( CSLFindString( papszStrList, pszKey ) != -1 )
        return TRUE;

    pszValue = CSLFetchNameValue(papszStrList, pszKey );
    if( pszValue == NULL )
        return bDefault;
    else 
        return CSLTestBoolean( pszValue );
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
callq 0x5b6c
cmpl $-0x1, %eax
je 0x6094
pushq $0x1
popq %rbx
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
movq %r15, %rdi
movq %r14, %rsi
callq 0x60b1
testq %rax, %rax
je 0x608c
movq %rax, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x6013
// File: /workspace/github_cpp_makefile_star2_O2/rurban[P]dgnlib/cpl_string.cpp
// Function: CSLFetchNameValue
const char *CSLFetchNameValue(char **papszStrList, const char *pszName)
{
    int nLen;

    if (papszStrList == NULL || pszName == NULL)
        return NULL;

    nLen = strlen(pszName);
    while(*papszStrList != NULL)
    {
        if (EQUALN(*papszStrList, pszName, nLen)
            && ( (*papszStrList)[nLen] == '=' || 
                 (*papszStrList)[nLen] == ':' ) )
        {
            return (*papszStrList)+nLen+1;
        }
        papszStrList++;
    }
    return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
je 0x60cf
xorl %r15d, %r15d
jmp 0x611a
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x2120
movslq %eax, %r12
xorl %r15d, %r15d
movq (%r14), %r13
testq %r13, %r13
je 0x611a
movq %r13, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x23b0
testl %eax, %eax
jne 0x610d
movzbl (%r13,%r12), %eax
cmpl $0x3d, %eax
je 0x6113
cmpl $0x3a, %eax
je 0x6113
addq $0x8, %r14
jmp 0x60e3
leaq (%r12,%r13), %r15
incq %r15
movq %r15, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/rurban[P]dgnlib/cpl_string.cpp
// Function: CSLFetchNameValueMultiple
char **CSLFetchNameValueMultiple(char **papszStrList, const char *pszName)
{
    int nLen;
    char **papszValues = NULL;

    if (papszStrList == NULL || pszName == NULL)
        return NULL;

    nLen = strlen(pszName);
    while(*papszStrList != NULL)
    {
        if (EQUALN(*papszStrList, pszName, nLen)
            && ( (*papszStrList)[nLen] == '=' || 
                 (*papszStrList)[nLen] == ':' ) )
        {
            papszValues = CSLAddString(papszValues, 
                                          (*papszStrList)+nLen+1);
        }
        papszStrList++;
    }

    return papszValues;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
je 0x6150
xorl %r15d, %r15d
movq %r15, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x2120
movslq %eax, %r12
xorl %r15d, %r15d
movq (%r14), %r13
testq %r13, %r13
je 0x6143
movq %r13, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x23b0
testl %eax, %eax
jne 0x61a2
movzbl (%r13,%r12), %eax
cmpl $0x3d, %eax
je 0x618e
cmpl $0x3a, %eax
jne 0x61a2
addq %r12, %r13
incq %r13
movq %r15, %rdi
movq %r13, %rsi
callq 0x54dc
movq %rax, %r15
addq $0x8, %r14
jmp 0x6164
// File: /workspace/github_cpp_makefile_star2_O2/rurban[P]dgnlib/cpl_string.cpp
// Function: CSLAddNameValue
char **CSLAddNameValue(char **papszStrList, 
                    const char *pszName, const char *pszValue)
{
    char *pszLine;

    if (pszName == NULL || pszValue==NULL)
        return papszStrList;

    pszLine = (char *) CPLMalloc(strlen(pszName)+strlen(pszValue)+2);
    sprintf( pszLine, "%s=%s", pszName, pszValue );
    papszStrList = CSLAddString(papszStrList, pszLine);
    CPLFree( pszLine );

    return papszStrList;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %rsi, %rsi
sete %al
testq %rdx, %rdx
sete %cl
orb %al, %cl
jne 0x6219
movq %rdx, %r14
movq %rsi, %r15
movq %rsi, %rdi
callq 0x2120
movq %rax, %r12
movq %r14, %rdi
callq 0x2120
leaq (%r12,%rax), %rdi
addq $0x2, %rdi
callq 0x2cb3
movq %rax, %r12
leaq 0x84c8(%rip), %rsi      # 0xe6bb
movq %rax, %rdi
movq %r15, %rdx
movq %r14, %rcx
xorl %eax, %eax
callq 0x20a0
movq %rbx, %rdi
movq %r12, %rsi
callq 0x54dc
movq %rax, %rbx
movq %r12, %rdi
callq 0x6a49
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/rurban[P]dgnlib/cpl_string.cpp
// Function: CSLSetNameValueSeparator
void CSLSetNameValueSeparator( char ** papszList, const char *pszSeparator )

{
    int         nLines = CSLCount(papszList), iLine;

    for( iLine = 0; iLine < nLines; iLine++ )
    {
        char        *pszKey = NULL;
        const char  *pszValue;
        char        *pszNewLine;

        pszValue = CPLParseNameValue( papszList[iLine], &pszKey );
        
        pszNewLine = (char *) CPLMalloc( strlen(pszValue) + strlen(pszKey)
                                         + strlen(pszSeparator) + 1 );
        strcpy( pszNewLine, pszKey );
        strcat( pszNewLine, pszSeparator );
        strcat( pszNewLine, pszValue );
        CPLFree( papszList[iLine] );
        papszList[iLine] = pszNewLine;
        CPLFree( pszKey );
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
callq 0x553e
xorl %r15d, %r15d
testl %eax, %eax
cmovlel %r15d, %eax
movq %rax, 0x10(%rsp)
cmpq %r15, 0x10(%rsp)
je 0x62e5
andq $0x0, 0x8(%rsp)
movq (%r14,%r15,8), %rdi
leaq 0x8(%rsp), %rsi
callq 0x5688
movq %rax, %r13
movq %rax, %rdi
callq 0x2120
movq %rax, %rbp
movq 0x8(%rsp), %rdi
callq 0x2120
movq %rax, %r12
movq %rbx, %rdi
callq 0x2120
addq %rbp, %r12
leaq (%rax,%r12), %rdi
incq %rdi
callq 0x2cb3
movq %rax, %r12
movq 0x8(%rsp), %rsi
movq %rax, %rdi
callq 0x22a0
movq %r12, %rdi
movq %rbx, %rsi
callq 0x2510
movq %r12, %rdi
movq %r13, %rsi
callq 0x2510
movq (%r14,%r15,8), %rdi
callq 0x6a49
movq %r12, (%r14,%r15,8)
movq 0x8(%rsp), %rdi
callq 0x6a49
incq %r15
jmp 0x624f
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/rurban[P]dgnlib/cpl_string.cpp
// Function: CPLBinaryToHex
char *CPLBinaryToHex( int nBytes, const GByte *pabyData )

{
    char *pszHex = (char *) CPLMalloc(nBytes * 2 + 1 );
    int i;
    static const char achHex[] = "0123456789ABCDEF";

    pszHex[nBytes*2] = '\0';

    for( i = 0; i < nBytes; i++ )
    {
        int nLow = pabyData[i] & 0x0f;
        int nHigh = (pabyData[i] & 0xf0) >> 4;

        pszHex[i*2] = achHex[nHigh];
        pszHex[i*2+1] = achHex[nLow];
    }

    return pszHex;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movslq %edi, %r14
leaq (%r14,%r14), %rax
incl %eax
movslq %eax, %rdi
callq 0x2cb3
movb $0x0, (%rax,%r14,2)
xorl %ecx, %ecx
testl %r14d, %r14d
cmovlel %ecx, %r14d
leaq 0x7f2b(%rip), %rdx      # 0xe770
cmpq %rcx, %r14
je 0x686c
movzbl (%rbx,%rcx), %esi
movl %esi, %edi
andl $0xf, %edi
shrl $0x4, %esi
movb (%rsi,%rdx), %sil
movb %sil, (%rax,%rcx,2)
movb (%rdi,%rdx), %sil
movb %sil, 0x1(%rax,%rcx,2)
incq %rcx
jmp 0x6845
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/rurban[P]dgnlib/cpl_string.cpp
// Function: CPLHexToBinary
GByte *CPLHexToBinary( const char *pszHex, int *pnBytes )

{
    int iSrc = 0, iDst = 0, nHexLen = strlen(pszHex);

    GByte *pabyWKB;

    pabyWKB = (GByte *) CPLMalloc(nHexLen / 2 + 2);

    while( pszHex[iSrc] != '\0' )
    {
        if( pszHex[iSrc] >= '0' && pszHex[iSrc] <= '9' )
            pabyWKB[iDst] = pszHex[iSrc] - '0';
        else if( pszHex[iSrc] >= 'A' && pszHex[iSrc] <= 'F' )
            pabyWKB[iDst] = pszHex[iSrc] - 'A' + 10;
        else if( pszHex[iSrc] >= 'a' && pszHex[iSrc] <= 'f' )
            pabyWKB[iDst] = pszHex[iSrc] - 'a' + 10;
        else 
            break;

        pabyWKB[iDst] *= 16;

        iSrc++;

        if( pszHex[iSrc] >= '0' && pszHex[iSrc] <= '9' )
            pabyWKB[iDst] += pszHex[iSrc] - '0';
        else if( pszHex[iSrc] >= 'A' && pszHex[iSrc] <= 'F' )
            pabyWKB[iDst] += pszHex[iSrc] - 'A' + 10;
        else if( pszHex[iSrc] >= 'a' && pszHex[iSrc] <= 'f' )
            pabyWKB[iDst] += pszHex[iSrc] - 'a' + 10;
        else
            break;

        iSrc++;
        iDst++;
    }
    
    pabyWKB[iDst] = 0;
    *pnBytes = iDst;

    return pabyWKB;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x2120
pushq $0x2
popq %rcx
cltd
idivl %ecx
addl $0x2, %eax
movslq %eax, %rdi
callq 0x2cb3
xorl %ecx, %ecx
movb (%r14,%rcx,2), %sil
testb %sil, %sil
je 0x6909
leal -0x30(%rsi), %edx
cmpb $0xa, %dl
jb 0x68c3
leal -0x41(%rsi), %edx
cmpb $0x5, %dl
ja 0x68b5
addb $-0x37, %sil
jmp 0x68c1
leal -0x61(%rsi), %edx
cmpb $0x5, %dl
ja 0x6909
addb $-0x57, %sil
movl %esi, %edx
shlb $0x4, %dl
movb %dl, (%rax,%rcx)
movb 0x1(%r14,%rcx,2), %sil
leal -0x30(%rsi), %edi
cmpb $0x9, %dil
ja 0x68dc
orb %dl, %dil
jmp 0x6900
leal -0x41(%rsi), %edi
cmpb $0x5, %dil
ja 0x68ee
addb %dl, %sil
addb $-0x37, %sil
jmp 0x68fe
leal -0x61(%rsi), %edi
cmpb $0x5, %dil
ja 0x6909
addb %dl, %sil
addb $-0x57, %sil
movl %esi, %edi
movb %dil, (%rax,%rcx)
incq %rcx
jmp 0x6896
movl %ecx, %edx
movb $0x0, (%rax,%rdx)
movl %ecx, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O2/rurban[P]dgnlib/dgnhelp.cpp
// Function: DGNGetShapeFillInfo
int DGNGetShapeFillInfo( DGNHandle hDGN, DGNElemCore *psElem, int *pnColor )

{
    int iLink;
    
    for( iLink = 0; TRUE; iLink++ )
    {
        int nLinkType, nLinkSize;
        unsigned char *pabyData;

        pabyData = DGNGetLinkage( hDGN, psElem, iLink, &nLinkType, 
                                  NULL, NULL, &nLinkSize );
        if( pabyData == NULL )
            return FALSE;

        if( nLinkType == DGNLT_SHAPE_FILL && nLinkSize >= 7 )
        {
            *pnColor = pabyData[8];
            return TRUE;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, 0x10(%rsp)
movq %rsi, %r15
movq %rdi, %r12
xorl %ebx, %ebx
leaq 0x8(%rsp), %r14
leaq 0xc(%rsp), %r13
xorl %ebp, %ebp
movq %r14, (%rsp)
movq %r12, %rdi
movq %r15, %rsi
movl %ebp, %edx
movq %r13, %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x6d35
testq %rax, %rax
je 0x6d24
cmpl $0x41, 0xc(%rsp)
jne 0x6d12
cmpl $0x7, 0x8(%rsp)
jge 0x6d16
incl %ebp
jmp 0x6ce5
movzbl 0x8(%rax), %eax
movq 0x10(%rsp), %rcx
movl %eax, (%rcx)
pushq $0x1
popq %rbx
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/rurban[P]dgnlib/dgnhelp.cpp
// Function: DGNGetAssocID
int DGNGetAssocID( DGNHandle hDGN, DGNElemCore *psElem )

{
    int iLink;
    
    for( iLink = 0; TRUE; iLink++ )
    {
        int nLinkType, nLinkSize;
        unsigned char *pabyData;

        pabyData = DGNGetLinkage( hDGN, psElem, iLink, &nLinkType, 
                                  NULL, NULL, &nLinkSize );
        if( pabyData == NULL )
            return -1;

        if( nLinkType == DGNLT_ASSOC_ID && nLinkSize >= 8 )
        {
            return pabyData[4] 
                + pabyData[5] * 256 
                + pabyData[6]*256*256
                + pabyData[7] * 256*256*256;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %r15
xorl %r12d, %r12d
leaq 0x10(%rsp), %rbp
leaq 0x14(%rsp), %r13
pushq $-0x1
popq %rbx
movq %rbp, (%rsp)
movq %r15, %rdi
movq %r14, %rsi
movl %r12d, %edx
movq %r13, %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x6d35
testq %rax, %rax
je 0x6e4c
cmpl $0x7d2f, 0x14(%rsp)     # imm = 0x7D2F
jne 0x6e44
cmpl $0x8, 0x10(%rsp)
jge 0x6e49
incl %r12d
jmp 0x6e13
movl 0x4(%rax), %ebx
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/rurban[P]dgnlib/dgnhelp.cpp
// Function: DGNRad50ToAscii(unsigned short, char*)
void DGNRad50ToAscii(unsigned short sRad50, char *str )
{
    unsigned short sValue;
    char           ch = '\0';
    unsigned short saQuots[3] = {1600,40,1};
    int i;

    for ( i=0; i<3; i++)
    {
        sValue = sRad50;
        sValue /= saQuots[i];
        /* Map 0..39 to ASCII */
        if (sValue==0)                     
            ch = ' ';          /* space */
        else if (sValue >= 1 && sValue <= 26) 
            ch = (char) (sValue-1+'A');/* printable alpha A..Z */
        else if (sValue == 27)             
            ch = '$';          /* dollar */
        else if (sValue == 28)             
            ch = '.';          /* period */
        else if (sValue == 29)             
            ch = ' ';          /* unused char, emit a space instead */
        else if (sValue >= 30 && sValue <= 39)
            ch = (char) (sValue-30+'0');   /* digit 0..9 */
        *str = ch;
        str++;

        sRad50-=(sValue*saQuots[i]);
    }

    /* Do zero-terminate */
    *str = '\0';
}

// Assembly:
leaq 0x7dac(%rip), %r8       # 0xec10
xorl %r9d, %r9d
xorl %r10d, %r10d
cmpq $0x6, %r9
je 0x6ecb
movzwl (%r9,%r8), %ecx
movl %edi, %eax
xorl %edx, %edx
divw %cx
movb $0x20, %r11b
cmpw %di, %cx
ja 0x6eba
cmpw $0x1a, %ax
ja 0x6e91
orb $0x40, %al
movl %eax, %r11d
jmp 0x6eba
leal -0x1b(%rax), %ecx
cmpw $0x3, %cx
jae 0x6ea8
shll $0x3, %ecx
movl $0x202e24, %r11d        # imm = 0x202E24
shrl %cl, %r11d
jmp 0x6eba
movl %eax, %ecx
addl $-0x1e, %ecx
movl %r10d, %r11d
cmpw $0x9, %cx
ja 0x6eba
leal 0x12(%rax), %r11d
movb %r11b, (%rsi)
incq %rsi
addq $0x2, %r9
movl %edx, %edi
movl %r11d, %r10d
jmp 0x6e6a
movb $0x0, (%rsi)
retq
// File: /workspace/github_cpp_makefile_star2_O2/rurban[P]dgnlib/dgnhelp.cpp
// Function: DGNAsciiToRad50(char const*, unsigned short*)
void DGNAsciiToRad50( const char *str, unsigned short *pRad50 )

{
    unsigned short rad50 = 0;
    int  i;

    for( i = 0; i < 3; i++ )
    {
        unsigned short value;

        if( i >= (int) strlen(str) )
        {
            rad50 = rad50 * 40;
            continue;
        }

        if( str[i] == '$' )
            value = 27;
        else if( str[i] == '.' )
            value = 28;
        else if( str[i] == ' ' )
            value = 29;
        else if( str[i] >= '0' && str[i] <= '9' )
            value = str[i] - '0' + 30;
        else if( str[i] >= 'a' && str[i] <= 'z' )
            value = str[i] - 'a' + 1;
        else if( str[i] >= 'A' && str[i] <= 'Z' )
            value = str[i] - 'A' + 1;
        else
            value = 0;

        rad50 = rad50 * 40 + value;
    }

    *pRad50 = rad50;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x2120
cltq
xorl %ecx, %ecx
xorl %edx, %edx
cmpq $0x3, %rcx
je 0x6f5c
cmpq %rax, %rcx
jge 0x6f09
movzbl (%r14,%rcx), %esi
cmpl $0x20, %esi
je 0x6f14
cmpl $0x24, %esi
je 0x6f0e
cmpl $0x2e, %esi
jne 0x6f1a
movw $0x1c, %si
jmp 0x6f4f
imull $0x28, %edx, %edx
jmp 0x6f57
movw $0x1b, %si
jmp 0x6f4f
movw $0x1d, %si
jmp 0x6f4f
leal -0x30(%rsi), %edi
cmpb $0x9, %dil
ja 0x6f2b
movzwl %si, %esi
addl $-0x12, %esi
jmp 0x6f4f
leal -0x61(%rsi), %edi
cmpb $0x19, %dil
ja 0x6f3c
movzwl %si, %esi
addl $-0x60, %esi
jmp 0x6f4f
leal -0x41(%rsi), %edi
cmpb $0x19, %dil
ja 0x6f4d
movzwl %si, %esi
addl $-0x40, %esi
jmp 0x6f4f
xorl %esi, %esi
imull $0x28, %edx, %edi
movswl %si, %edx
addl %edi, %edx
incq %rcx
jmp 0x6ee4
movw %dx, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/rurban[P]dgnlib/dgnhelp.cpp
// Function: DGNRotationToQuaternion
void DGNRotationToQuaternion( double dfRotation, int *panQuaternion )

{
    double dfRadianRot = (dfRotation / 180.0)  * PI;

    panQuaternion[0] = (int) (cos(-dfRadianRot/2.0) * 2147483647);
    panQuaternion[1] = 0;
    panQuaternion[2] = 0;
    panQuaternion[3] = (int) (sin(-dfRadianRot/2.0) * 2147483647);
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
divsd 0x6cd8(%rip), %xmm0     # 0xec18
mulsd 0x6cd8(%rip), %xmm0     # 0xec20
mulsd 0x66f8(%rip), %xmm0     # 0xe648
movsd %xmm0, 0x8(%rsp)
callq 0x2550
mulsd 0x6cc5(%rip), %xmm0     # 0xec28
cvttsd2si %xmm0, %eax
movl %eax, (%rbx)
andq $0x0, 0x4(%rbx)
movsd 0x8(%rsp), %xmm0
callq 0x20b0
mulsd 0x6ca7(%rip), %xmm0     # 0xec28
cvttsd2si %xmm0, %eax
movl %eax, 0xc(%rbx)
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/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), %xmm0
movsd 0x6c95(%rip), %xmm1     # 0xec30
cvtsi2sdl (%rdi), %xmm2
mulsd %xmm1, %xmm0
cvtdq2pd 0x8(%rdi), %xmm7
mulsd %xmm1, %xmm2
mulpd 0x6c8c(%rip), %xmm7     # 0xec40
movapd %xmm0, %xmm3
movapd %xmm7, %xmm1
movapd 0x628c(%rip), %xmm5     # 0xe250
movapd %xmm0, %xmm9
mulsd %xmm7, %xmm9
movapd %xmm0, %xmm6
unpcklpd %xmm0, %xmm6            # xmm6 = xmm6[0],xmm0[0]
movapd %xmm0, %xmm4
xorpd %xmm5, %xmm4
movapd %xmm7, %xmm8
unpcklpd %xmm4, %xmm8            # xmm8 = xmm8[0],xmm4[0]
mulsd %xmm0, %xmm4
movapd %xmm7, %xmm10
movapd %xmm0, %xmm11
mulpd %xmm7, %xmm6
unpcklpd %xmm7, %xmm0            # xmm0 = xmm0[0],xmm7[0]
mulsd %xmm7, %xmm7
mulsd %xmm3, %xmm3
subsd %xmm7, %xmm3
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
movapd %xmm1, %xmm12
xorpd %xmm5, %xmm12
movapd %xmm2, %xmm13
mulsd %xmm12, %xmm13
mulsd %xmm1, %xmm12
addsd %xmm12, %xmm3
movapd %xmm1, %xmm14
mulsd %xmm2, %xmm14
addsd %xmm9, %xmm14
movapd %xmm2, %xmm9
mulsd %xmm2, %xmm9
addsd %xmm9, %xmm3
addsd %xmm14, %xmm14
unpcklpd %xmm14, %xmm3           # xmm3 = xmm3[0],xmm14[0]
movapd %xmm4, %xmm14
addsd %xmm7, %xmm14
addsd %xmm12, %xmm14
addsd %xmm9, %xmm14
mulsd %xmm1, %xmm10
mulsd %xmm2, %xmm11
addsd %xmm10, %xmm11
addsd %xmm11, %xmm11
unpcklpd %xmm11, %xmm14          # xmm14 = xmm14[0],xmm11[0]
unpcklpd %xmm2, %xmm2            # xmm2 = xmm2[0,0]
mulpd %xmm8, %xmm2
xorpd %xmm2, %xmm5
unpcklpd %xmm5, %xmm13           # xmm13 = xmm13[0],xmm5[0]
addpd %xmm13, %xmm6
addpd %xmm6, %xmm6
shufpd $0x1, %xmm6, %xmm6      # xmm6 = xmm6[1,0]
cvtpd2ps %xmm3, %xmm3
cvtpd2ps %xmm6, %xmm5
unpcklpd %xmm5, %xmm3            # xmm3 = xmm3[0],xmm5[0]
movupd %xmm3, (%rsi)
mulpd %xmm1, %xmm0
addpd %xmm2, %xmm0
cvtpd2ps %xmm14, %xmm2
addpd %xmm0, %xmm0
cvtpd2ps %xmm0, %xmm0
unpcklpd %xmm0, %xmm2            # xmm2 = xmm2[0],xmm0[0]
movupd %xmm2, 0x10(%rsi)
subsd %xmm7, %xmm4
mulsd %xmm1, %xmm1
addsd %xmm4, %xmm1
addsd %xmm9, %xmm1
cvtsd2ss %xmm1, %xmm0
movss %xmm0, 0x20(%rsi)
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x8142
xorl %r14d, %r14d
testl %ebp, %ebp
js 0x813a
cmpl %ebp, 0x20044(%rbx)
jle 0x813a
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 0x697a
testl %eax, %eax
jne 0x813a
movl %ebp, 0x8(%rbx)
andl $0x0, 0x20384(%rbx)
pushq $0x1
popq %r14
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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, %r12
movq %rsi, %r14
movq %rdi, %r15
leaq 0x10(%rdi), %rdi
movq (%r15), %rcx
pushq $0x1
popq %rsi
pushq $0x4
popq %rdx
callq 0x6989
xorl %ebp, %ebp
cmpq $0x4, %rax
jne 0x84d9
movzbl 0x10(%r15), %r13d
movb 0x11(%r15), %bl
movl %r13d, %eax
andb %bl, %al
cmpb $-0x1, %al
je 0x84d9
movq %r12, (%rsp)
movzwl 0x12(%r15), %r12d
leaq 0x14(%r15), %rdi
movq (%r15), %rcx
pushq $0x2
popq %rsi
movq %r12, %rdx
callq 0x6989
cmpl %eax, %r12d
jne 0x84d9
leal 0x4(,%r12,2), %eax
movl %eax, 0xc(%r15)
incl 0x8(%r15)
testq %r14, %r14
je 0x84c6
movzbl %bl, %eax
andl $0x7f, %eax
movl %eax, (%r14)
pushq $0x1
popq %rbp
movq (%rsp), %rax
testq %rax, %rax
je 0x84d9
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_O2/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 0x86f5
movl $0x9afd8d8, %edx        # imm = 0x9AFD8D8
btl %esi, %edx
jae 0x86f5
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 0x86a1
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)
pushq $0x1
popq %rax
testq %rdx, %rdx
je 0x86f5
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_O2/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 %rbx
movq %rsi, %rbx
movq 0x38(%rsi), %rdi
testq %rdi, %rdi
je 0xa2d3
callq 0x6a49
movq 0x48(%rbx), %rdi
testq %rdi, %rdi
je 0xa2e1
callq 0x6a49
movl 0xc(%rbx), %eax
cmpl $0x9, %eax
je 0xa340
cmpl $0xa, %eax
jne 0xa34f
movq 0x60(%rbx), %rdi
callq 0x6a49
xorl %r14d, %r14d
xorl %r15d, %r15d
movslq 0x50(%rbx), %rax
movq 0x68(%rbx), %rdi
cmpq %rax, %r15
jge 0xa34a
movq (%rdi,%r14), %rdi
callq 0x6a49
movq 0x68(%rbx), %rax
movq 0x10(%rax,%r14), %rdi
callq 0x6a49
movq 0x68(%rbx), %rax
cmpl $0x1, 0x18(%rax,%r14)
jne 0xa337
movq 0x20(%rax,%r14), %rdi
callq 0x6a49
incq %r15
addq $0x28, %r14
jmp 0xa2fd
cmpl $0x1, 0x50(%rbx)
jne 0xa34f
movq 0x60(%rbx), %rdi
callq 0x6a49
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x6a49
// File: /workspace/github_cpp_makefile_star2_O2/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 0x10(%rsi), %xmm0
addsd 0x20038(%rdi), %xmm0
movsd 0x20020(%rdi), %xmm1
divsd %xmm1, %xmm0
movupd (%rsi), %xmm2
movupd 0x20028(%rdi), %xmm3
addpd %xmm2, %xmm3
unpcklpd %xmm1, %xmm1            # xmm1 = xmm1[0,0]
divpd %xmm1, %xmm3
movapd 0x5372(%rip), %xmm1     # 0xf720
movapd %xmm1, %xmm2
cmpnltpd %xmm3, %xmm2
movapd 0x5371(%rip), %xmm4     # 0xf730
movapd %xmm3, %xmm5
cmpltpd %xmm4, %xmm5
andpd %xmm5, %xmm2
andpd %xmm2, %xmm4
andnpd %xmm1, %xmm2
cmpltpd %xmm3, %xmm1
orpd %xmm1, %xmm5
orpd %xmm4, %xmm2
andpd %xmm5, %xmm2
andnpd %xmm3, %xmm5
orpd %xmm2, %xmm5
movupd %xmm5, (%rsi)
movsd 0x482f(%rip), %xmm3     # 0xec28
ucomisd %xmm3, %xmm0
movapd %xmm3, %xmm4
cmpltsd %xmm0, %xmm4
movapd %xmm4, %xmm1
andpd %xmm3, %xmm1
movsd 0x52b2(%rip), %xmm2     # 0xf6c8
andnpd %xmm2, %xmm4
orpd %xmm1, %xmm4
movapd %xmm0, %xmm1
cmpltsd %xmm2, %xmm1
andpd %xmm1, %xmm4
andnpd %xmm3, %xmm1
orpd %xmm4, %xmm1
movapd %xmm1, %xmm3
ja 0xa43d
movapd %xmm0, %xmm3
ucomisd %xmm0, %xmm2
ja 0xa447
movapd %xmm3, %xmm1
movsd %xmm1, 0x10(%rsi)
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x20020(%rdi), %xmm0
movupd (%rsi), %xmm1
movupd 0x20028(%rdi), %xmm2
addpd %xmm1, %xmm2
movapd %xmm0, %xmm1
unpcklpd %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0]
divpd %xmm1, %xmm2
movapd %xmm2, -0x18(%rsp)
movsd 0x10(%rsi), %xmm1
addsd 0x20038(%rdi), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, -0x8(%rsp)
xorl %eax, %eax
movsd 0x4790(%rip), %xmm0     # 0xec28
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movsd 0x5223(%rip), %xmm1     # 0xf6c8
movslq 0x20018(%rdi), %rsi
cmpq %rsi, %rax
jge 0xa4ff
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
jmp 0xa4a5
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
pushq %rax
pushq $0x1
popq %rbx
cmpl $0x0, 0x20014(%rdi)
jne 0xa54d
movq %rdi, %r14
xorl %eax, %eax
testl %eax, %eax
jne 0xa54d
movq %r14, %rdi
callq 0x8731
testq %rax, %rax
je 0xa537
movq %rax, %rsi
callq 0xa2bd
movl 0x20014(%r14), %eax
jmp 0xa515
leaq 0x53c2(%rip), %rdx      # 0xf900
xorl %ebx, %ebx
pushq $0x3
popq %rdi
pushq $0x1
popq %rsi
xorl %eax, %eax
callq 0x439c
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x8142
testq %r14, %r14
je 0xa574
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_O2/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 %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rsi, %rbx
movq %rdi, %r14
callq 0x8142
cmpl $0x0, 0x2035c(%r14)
je 0xa67b
movsd 0x20360(%r14), %xmm0
xorpd %xmm1, %xmm1
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x5133(%rip), %xmm1     # 0xf6f0
orpd %xmm1, %xmm0
subpd %xmm1, %xmm0
addpd 0x5133(%rip), %xmm0     # 0xf700
leaq 0x20(%rsp), %r15
movapd %xmm0, (%r15)
movl 0x20368(%r14), %eax
cvtsi2sd %rax, %xmm0
addsd 0x50b5(%rip), %xmm0     # 0xf6a0
movsd %xmm0, 0x10(%r15)
movq %r14, %rdi
movq %r15, %rsi
callq 0x86f6
movaps (%r15), %xmm0
movups %xmm0, (%rbx)
movsd 0x10(%r15), %xmm0
movsd %xmm0, 0x10(%rbx)
movsd 0x2036c(%r14), %xmm0
unpcklps 0x5122(%rip), %xmm0     # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
movapd 0x50ca(%rip), %xmm1     # 0xf6f0
orpd %xmm1, %xmm0
subpd %xmm1, %xmm0
addpd 0x50ca(%rip), %xmm0     # 0xf700
movq %rsp, %r15
movapd %xmm0, (%r15)
movl 0x20374(%r14), %eax
cvtsi2sd %rax, %xmm0
addsd 0x504e(%rip), %xmm0     # 0xf6a0
movsd %xmm0, 0x10(%r15)
movq %r14, %rdi
movq %r15, %rsi
callq 0x86f6
movaps (%r15), %xmm0
movups %xmm0, 0x18(%rbx)
movsd 0x10(%r15), %xmm0
movsd %xmm0, 0x28(%rbx)
pushq $0x1
popq %rax
jmp 0xa67d
xorl %eax, %eax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq $0x1
popq %rsi
movl $0x358, %edi            # imm = 0x358
callq 0x2c6c
movq %rax, %r14
movl $0x3, 0xc(%rax)
movq %rbx, %rdi
movq %rax, %rsi
callq 0xa1c3
movzwl 0x34(%rbx), %eax
movl %eax, 0x50(%r14)
leaq 0x54(%r14), %r15
movzwl 0x36(%rbx), %eax
movw %ax, 0x351(%r14)
movb 0x38(%rbx), %al
movb %al, 0x353(%r14)
leaq 0x39(%rbx), %rsi
movl $0x2fd, %edx            # imm = 0x2FD
movq %r15, %rdi
callq 0x2230
leaq 0x2005c(%rbx), %rdi
movl $0x300, %edx            # imm = 0x300
movq %r15, %rsi
callq 0x2230
movl $0x1, 0x20058(%rbx)
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %ebp
pushq $0x1
popq %r15
movl $0x358, %edi            # imm = 0x358
movq %r15, %rsi
callq 0x2c6c
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)
orl $-0x1, (%rax)
movaps 0x33c9(%rip), %xmm0     # 0xfa10
movups %xmm0, 0x8(%rax)
movl %ebp, 0x50(%rax)
leaq 0x54(%rax), %rdi
movl $0x300, %edx            # imm = 0x300
movq %rbx, %rsi
callq 0x2230
movl $0x326, 0x40(%r14)      # imm = 0x326
movl $0x326, %edi            # imm = 0x326
movq %r15, %rsi
callq 0x2c6c
movq %rax, 0x48(%r14)
movb %bpl, 0x24(%rax)
movl $0x100, %ecx            # imm = 0x100
movl %ebp, %eax
cltd
idivl %ecx
movq 0x48(%r14), %rcx
movb %al, 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 0x2230
movq %r14, %rsi
callq 0xb380
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
movups (%rsi), %xmm0
movaps %xmm0, (%rsp)
movsd 0x10(%rsi), %xmm0
movsd %xmm0, 0x10(%rsp)
andq $0x0, 0x18(%rsp)
movl 0x20018(%rdi), %esi
cmpl $0x2, %esi
jg 0xd0dc
xorl %eax, %eax
movsd 0x1bb9(%rip), %xmm0     # 0xec28
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movsd 0x264c(%rip), %xmm1     # 0xf6c8
movslq %esi, %rsi
cmpq %rsi, %rax
jge 0xd0d7
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
movl 0x20018(%rdi), %esi
jmp 0xd07c
addq $0x28, %rsp
retq
leaq 0x2c33(%rip), %rdi      # 0xfd16
leaq 0x2c41(%rip), %rsi      # 0xfd2b
leaq 0x2c47(%rip), %rcx      # 0xfd38
movl $0x8a7, %edx            # imm = 0x8A7
callq 0x21b0
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbp
pushq %rbx
subq $0x28, %rsp
testl %edx, %edx
je 0xd38e
movl %edx, %r10d
movw $0x1007, (%rsp)         # imm = 0x1007
movb %r10b, 0x2(%rsp)
movl $0x100, %r11d           # imm = 0x100
movl %ecx, %eax
cltd
idivl %r11d
movl %eax, %r9d
movb %r8b, 0x8(%rsp)
movl %r8d, %eax
cltd
idivl %r11d
movb %al, 0x9(%rsp)
movl $0x10000, %r11d         # imm = 0x10000
movl %r8d, %eax
cltd
idivl %r11d
movb %al, 0xa(%rsp)
movl $0x1000000, %r11d       # imm = 0x1000000
movl %r8d, %eax
cltd
idivl %r11d
movb %al, 0xb(%rsp)
andl $0x0, 0xc(%rsp)
pushq $0x10
popq %rbx
movb $0xf, %r11b
movb $-0x7f, %r8b
jmp 0xd3bf
andw $0x0, (%rsp)
movb %cl, 0x2(%rsp)
movl $0x100, %r9d            # imm = 0x100
movl %r8d, %eax
cltd
idivl %r9d
movl %eax, %r11d
movl $0x10000, %r9d          # imm = 0x10000
movl %r8d, %eax
cltd
idivl %r9d
pushq $0x8
popq %rbx
movb $0x1, %r9b
movl %ecx, %r10d
movl %eax, %ecx
movl $0x100, %ebp            # imm = 0x100
movl %r10d, %eax
cltd
idivl %ebp
movq %rsp, %r10
movb %al, 0x3(%r10)
movb %r8b, 0x4(%r10)
movb %r11b, 0x5(%r10)
movb %cl, 0x6(%r10)
movb %r9b, 0x7(%r10)
movl %ebx, %edx
movq %r10, %rcx
callq 0xc7b3
addq $0x28, %rsp
popq %rbx
popq %rbp
retq