// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/lib/htmshell.c
// Function: htmlTextStripJavascriptCssAndTags
char *htmlTextStripJavascriptCssAndTags(char *s)
/* Returns a cloned string with all inline javascript, css, and html tags stripped out */
{
if (s == NULL)
    return NULL;
char *scrubbed = needMem(strlen(s));
char *from=s;
char *to=scrubbed;
while (*from!='\0')
    {
    if (startsWithNoCase("<script", from))
        {
        from++;
        while (*from!='\0' && !startsWithNoCase("</script>", from))
            from++;
        if (*from == '\0')  // The last open tag was never closed!
            break;
        from += strlen("</script>");
        *to++ = ' ';
        }
    else if (startsWithNoCase("<style", from))
        {
        from++;
        while (*from!='\0' && !startsWithNoCase("</style>", from))
            from++;
        if (*from == '\0')  // The last open tag was never closed!
            break;
        from += strlen("</style>");
        *to++ = ' ';
        }
    else if (*from == '<')
        {
        from++;
        while (*from!='\0' && *from != '>')
            from++;
        if (*from == '\0')  // The last open tag was never closed!
            break;
        from++;
        *to++ = ' ';
        }
    else
        *to++ = *from++;
    }
return scrubbed;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x68830
movq $0x0, -0x8(%rbp)
jmp 0x68a4e
movq -0x10(%rbp), %rdi
callq 0x62c0
movq %rax, %rdi
callq 0x40c50
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x68a46
movq -0x20(%rbp), %rsi
leaq 0x78169(%rip), %rdi     # 0xe09d9
callq 0x2d440
cmpl $0x0, %eax
je 0x68901
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x29(%rbp)
je 0x688b6
movq -0x20(%rbp), %rsi
leaq 0x7813b(%rip), %rdi     # 0xe09e1
callq 0x2d440
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
movb %al, -0x29(%rbp)
movb -0x29(%rbp), %al
testb $0x1, %al
jne 0x688bf
jmp 0x688cd
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x6888a
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x688de
jmp 0x68a46
movq -0x20(%rbp), %rax
addq $0x9, %rax
movq %rax, -0x20(%rbp)
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x28(%rbp)
movb $0x20, (%rax)
jmp 0x68a41
movq -0x20(%rbp), %rsi
leaq 0x780df(%rip), %rdi     # 0xe09eb
callq 0x2d440
cmpl $0x0, %eax
je 0x6899d
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x2a(%rbp)
je 0x68952
movq -0x20(%rbp), %rsi
leaq 0x780b0(%rip), %rdi     # 0xe09f2
callq 0x2d440
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
movb %al, -0x2a(%rbp)
movb -0x2a(%rbp), %al
testb $0x1, %al
jne 0x6895b
jmp 0x68969
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x68926
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x6897a
jmp 0x68a46
movq -0x20(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x20(%rbp)
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x28(%rbp)
movb $0x20, (%rax)
jmp 0x68a3f
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3c, %eax
jne 0x68a1b
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x2b(%rbp)
je 0x689d6
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3e, %eax
setne %al
movb %al, -0x2b(%rbp)
movb -0x2b(%rbp), %al
testb $0x1, %al
jne 0x689df
jmp 0x689ed
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x689b5
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x689fb
jmp 0x68a46
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x28(%rbp)
movb $0x20, (%rax)
jmp 0x68a3d
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x20(%rbp)
movb (%rax), %cl
movq -0x28(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x28(%rbp)
movb %cl, (%rax)
jmp 0x68a3f
jmp 0x68a41
jmp 0x68855
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)