// File: /workspace/github_c_makefile_star2_O1/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 0x48db2
movq %rsp, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x441e4
cmpl $0x2, %eax
jne 0x48da3
movq (%rsp), %rax
cmpb $0x38, (%rax)
jge 0x48da3
leaq 0x4e4f0(%rip), %rdi     # 0x97291
jmp 0x48daa
leaq 0x4e51a(%rip), %rdi     # 0x972c4
movq %rbx, %rsi
callq 0x6810
leaq 0x4e573(%rip), %rdi     # 0x9732c
movq %rbx, %rsi
callq 0x6810
leaq 0x4e56c(%rip), %rdi     # 0x97334
movq %rbx, %rsi
callq 0x6810
callq 0x48cf3
movq %rax, %r12
movq %rax, %rdi
movq %rbx, %rsi
callq 0x6810
movq %r12, %rdi
callq 0x2dd41
movq %r15, %rdi
movq %rbx, %rsi
callq 0x6810
leaq 0x4e53f(%rip), %rsi     # 0x9733c
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x48ebf
leaq 0x4e53e(%rip), %rsi     # 0x9734f
movq %r14, %rdi
callq 0x21aed
testl %eax, %eax
je 0x48e36
leaq 0x4e547(%rip), %rdi     # 0x9736b
movl $0x49, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x6e70
leaq 0x4e578(%rip), %rdi     # 0x973b5
movl $0x43, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x6e70
movq 0x77e72(%rip), %rdi     # 0xc0cc8
testq %rdi, %rdi
je 0x48e63
movq %rbx, %rsi
callq 0x6810
movq 0x8b7ce(%rip), %rdx     # 0xd4638
testq %rdx, %rdx
je 0x48e80
leaq 0x4e583(%rip), %rsi     # 0x973f9
movq %rbx, %rdi
xorl %eax, %eax
callq 0x6a90
movq 0x8b7c1(%rip), %rdi     # 0xd4648
testq %rdi, %rdi
je 0x48e94
movq %rbx, %rsi
callq 0x6810
leaq 0x4e631(%rip), %rdi     # 0x974cc
movq %rbx, %rsi
callq 0x6810
movq %rbx, %rdi
callq 0x488b7
movq %rbx, %rdi
callq 0x48679
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq