// File: /workspace/github_c_makefile_star2_O2/mijallen[P]SimpleHTTPServer/lib/libyaml/src/emitter.c
// Function: yaml_emitter_write_tag_content
static int
yaml_emitter_write_tag_content(yaml_emitter_t *emitter,
        yaml_char_t *value, size_t length,
        int need_whitespace)
{
    yaml_string_t string;
    STRING_ASSIGN(string, value, length);

    if (need_whitespace && !emitter->whitespace) {
        if (!PUT(emitter, ' ')) return 0;
    }

    while (string.pointer != string.end) {
        if (IS_ALPHA(string)
                || CHECK(string, ';') || CHECK(string, '/')
                || CHECK(string, '?') || CHECK(string, ':')
                || CHECK(string, '@') || CHECK(string, '&')
                || CHECK(string, '=') || CHECK(string, '+')
                || CHECK(string, '$') || CHECK(string, ',')
                || CHECK(string, '_') || CHECK(string, '.')
                || CHECK(string, '~') || CHECK(string, '*')
                || CHECK(string, '\'') || CHECK(string, '(')
                || CHECK(string, ')') || CHECK(string, '[')
                || CHECK(string, ']')) {
            if (!WRITE(emitter, string)) return 0;
        }
        else {
            int width = WIDTH(string);
            unsigned int value;
            while (width --) {
                value = *(string.pointer++);
                if (!PUT(emitter, '%')) return 0;
                if (!PUT(emitter, (value >> 4)
                            + ((value >> 4) < 10 ? '0' : 'A' - 10)))
                    return 0;
                if (!PUT(emitter, (value & 0x0F)
                            + ((value & 0x0F) < 10 ? '0' : 'A' - 10)))
                    return 0;
            }
        }
    }

    emitter->whitespace = 0;
    emitter->indention = 0;

    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
testl %ecx, %ecx
je 0x12528
cmpl $0x0, 0x120(%r14)
jne 0x12528
movq 0x48(%r14), %rax
leaq 0x5(%rax), %rcx
cmpq 0x40(%r14), %rcx
jb 0x12516
movq %r14, %rdi
callq 0x2190
testl %eax, %eax
je 0x127a1
movq 0x48(%r14), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x48(%r14)
movb $0x20, (%rax)
incl 0x11c(%r14)
addq %r15, %rbx
pushq $0x1
popq %rbp
pushq $0x30
popq %r12
pushq $0x37
popq %r13
cmpq %rbx, %r15
je 0x12794
movb (%r15), %al
leal -0x30(%rax), %ecx
cmpb $0xa, %cl
jb 0x1257a
movl %eax, %ecx
andb $-0x21, %cl
addb $-0x41, %cl
cmpb $0x1a, %cl
jb 0x1257a
movzbl %al, %ecx
leal -0x24(%rcx), %edx
cmpl $0x3b, %edx
ja 0x12665
movabsq $0xa8000001ac00ffd, %rsi # imm = 0xA8000001AC00FFD
btq %rdx, %rsi
jae 0x12665
movq 0x48(%r14), %rcx
addq $0x5, %rcx
cmpq 0x40(%r14), %rcx
jb 0x1259b
movq %r14, %rdi
callq 0x2190
testl %eax, %eax
je 0x127a1
movb (%r15), %al
testb %al, %al
js 0x125a7
incq %r15
jmp 0x1264b
movzbl %al, %ecx
movl %ecx, %edx
andl $-0x20, %edx
cmpl $0xc0, %edx
jne 0x125cf
movq 0x48(%r14), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x48(%r14)
movb %al, (%rcx)
movb 0x1(%r15), %al
addq $0x2, %r15
jmp 0x1264b
movl %ecx, %edx
andl $-0x10, %edx
cmpl $0xe0, %edx
jne 0x12606
movq 0x48(%r14), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x48(%r14)
movb %al, (%rcx)
movb 0x1(%r15), %al
movq 0x48(%r14), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x48(%r14)
movb %al, (%rcx)
movb 0x2(%r15), %al
addq $0x3, %r15
jmp 0x1264b
andl $-0x8, %ecx
cmpl $0xf0, %ecx
jne 0x12659
movq 0x48(%r14), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x48(%r14)
movb %al, (%rcx)
movb 0x1(%r15), %al
movq 0x48(%r14), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x48(%r14)
movb %al, (%rcx)
movb 0x2(%r15), %al
movq 0x48(%r14), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x48(%r14)
movb %al, (%rcx)
movb 0x3(%r15), %al
addq $0x4, %r15
movq 0x48(%r14), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x48(%r14)
movb %al, (%rcx)
incl 0x11c(%r14)
jmp 0x12536
cmpl $0x7e, %ecx
je 0x1257a
movq %rbx, (%rsp)
testb %al, %al
jns 0x126a6
movl %ecx, %eax
andl $-0x20, %eax
pushq $0x2
popq %rbp
cmpl $0xc0, %eax
je 0x126a6
movl %ecx, %eax
andl $-0x10, %eax
pushq $0x3
popq %rbp
cmpl $0xe0, %eax
je 0x126a6
andl $-0x8, %ecx
xorl %ebp, %ebp
cmpl $0xf0, %ecx
sete %bpl
shll $0x2, %ebp
subl $0x1, %ebp
jb 0x12788
movl %r13d, %ebx
movl %r12d, %r13d
movb (%r15), %r12b
movq 0x48(%r14), %rax
leaq 0x5(%rax), %rcx
cmpq 0x40(%r14), %rcx
jb 0x126da
movq %r14, %rdi
callq 0x2190
testl %eax, %eax
je 0x127a1
movq 0x48(%r14), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x48(%r14)
movb $0x25, (%rax)
incl 0x11c(%r14)
movq 0x48(%r14), %rax
leaq 0x5(%rax), %rcx
cmpq 0x40(%r14), %rcx
jb 0x1270e
movq %r14, %rdi
callq 0x2190
testl %eax, %eax
je 0x127a1
movq 0x48(%r14), %rax
movl %r12d, %ecx
shrb $0x4, %cl
cmpb $-0x60, %r12b
movl %ebx, %edi
movl %ebx, %edx
movl %r13d, %esi
cmovbl %r13d, %edx
addb %cl, %dl
leaq 0x1(%rax), %rcx
movq %rcx, 0x48(%r14)
movb %dl, (%rax)
incl 0x11c(%r14)
movq 0x48(%r14), %rax
leaq 0x5(%rax), %rcx
cmpq 0x40(%r14), %rcx
jb 0x12759
movq %r14, %rdi
callq 0x2190
testl %eax, %eax
je 0x127a1
movq 0x48(%r14), %rax
movl %r13d, %esi
movl %ebx, %edi
incq %r15
andb $0xf, %r12b
cmpb $0xa, %r12b
movl %edi, %ecx
cmovbl %esi, %ecx
addb %r12b, %cl
leaq 0x1(%rax), %rdx
movq %rdx, 0x48(%r14)
movb %cl, (%rax)
incl 0x11c(%r14)
movl %esi, %r12d
movl %edi, %r13d
jmp 0x126a6
pushq $0x1
popq %rbp
movq (%rsp), %rbx
jmp 0x12536
andq $0x0, 0x120(%r14)
pushq $0x1
popq %rax
jmp 0x127a3
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq