// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/htmshell.c
// Function: htmStartWithHead
void _htmStartWithHead(FILE *f, char *head, char *title, boolean printDocType, int dirDepth)
/* Write out bits of header that both stand-alone .htmls
 * and CGI returned .htmls need, including optional head info */
{
if (printDocType)
    {
//#define TOO_TIMID_FOR_CURRENT_HTML_STANDARDS
#ifdef TOO_TIMID_FOR_CURRENT_HTML_STANDARDS
    fputs("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 3.2//EN\">\n", f);
#else///ifndef TOO_TIMID_FOR_CURRENT_HTML_STANDARDS
    char *browserVersion;
    if (btIE == cgiClientBrowser(&browserVersion, NULL, NULL) && *browserVersion < '8')
        fputs("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 3.2//EN\">\n", f);
    else
        fputs("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" "
              "\"http://www.w3.org/TR/html4/loose.dtd\">\n",f);
    // Strict would be nice since it fixes atleast one IE problem (use of :hover CSS pseudoclass)
#endif///ndef TOO_TIMID_FOR_CURRENT_HTML_STANDARDS
    }
fputs("<HTML>\n", f);
fputs("<HEAD>\n", f);
// CSP header
generateCspMetaHeader(f);

fputs(head, f);
htmlFprintf(f,"<TITLE>%s</TITLE>\n", title); 
if (endsWith(title,"Login - UCSC Genome Browser")) 
    fprintf(f,"\t<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html;CHARSET=iso-8859-1\">\n");
fprintf(f, "\t<META http-equiv=\"Content-Script-Type\" content=\"text/javascript\">\n");
if (htmlStyle != NULL)
    fputs(htmlStyle, f);
if (htmlStyleSheet != NULL)
    fprintf(f,"<link href=\"%s\" rel=\"stylesheet\" type=\"text/css\">\n", htmlStyleSheet);
if (htmlStyleTheme != NULL)
    fputs(htmlStyleTheme, f);

fputs("</HEAD>\n\n",f);
printBodyTag(f);
htmlWarnBoxSetup(f);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
testl %ecx, %ecx
je 0x49105
movq %rsp, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x4457a
cmpl $0x2, %eax
jne 0x490f6
movq (%rsp), %rax
cmpb $0x38, (%rax)
jge 0x490f6
leaq 0x4e27d(%rip), %rdi     # 0x97371
jmp 0x490fd
leaq 0x4e2a7(%rip), %rdi     # 0x973a4
movq %rbx, %rsi
callq 0x6810
leaq 0x4e300(%rip), %rdi     # 0x9740c
movq %rbx, %rsi
callq 0x6810
leaq 0x4e2f9(%rip), %rdi     # 0x97414
movq %rbx, %rsi
callq 0x6810
callq 0x49046
movq %rax, %r12
movq %rax, %rdi
movq %rbx, %rsi
callq 0x6810
movq %r12, %rdi
callq 0x2e0a0
movq %r15, %rdi
movq %rbx, %rsi
callq 0x6810
leaq 0x4e2cc(%rip), %rsi     # 0x9741c
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x49212
leaq 0x4e2cb(%rip), %rsi     # 0x9742f
movq %r14, %rdi
callq 0x21e4c
testl %eax, %eax
je 0x49189
leaq 0x4e2d4(%rip), %rdi     # 0x9744b
movl $0x49, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x6e70
leaq 0x4e305(%rip), %rdi     # 0x97495
movl $0x43, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x6e70
movq 0x77b1f(%rip), %rdi     # 0xc0cc8
testq %rdi, %rdi
je 0x491b6
movq %rbx, %rsi
callq 0x6810
movq 0x8b47b(%rip), %rdx     # 0xd4638
testq %rdx, %rdx
je 0x491d3
leaq 0x4e310(%rip), %rsi     # 0x974d9
movq %rbx, %rdi
xorl %eax, %eax
callq 0x6a90
movq 0x8b46e(%rip), %rdi     # 0xd4648
testq %rdi, %rdi
je 0x491e7
movq %rbx, %rsi
callq 0x6810
leaq 0x4e3be(%rip), %rdi     # 0x975ac
movq %rbx, %rsi
callq 0x6810
movq %rbx, %rdi
callq 0x48c02
movq %rbx, %rdi
callq 0x489bb
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq