// File: /workspace/github_c_makefile_star2_O1/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 0x140c0
cmpl $0x0, 0x120(%r14)
jne 0x140c0
movq 0x48(%r14), %rax
addq $0x5, %rax
cmpq 0x40(%r14), %rax
jb 0x140aa
movq %r14, %rdi
callq 0x2190
testl %eax, %eax
je 0x1434e
movq 0x48(%r14), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x48(%r14)
movb $0x20, (%rax)
incl 0x11c(%r14)
testq %rbx, %rbx
je 0x14352
addq %r15, %rbx
movabsq $0xa8000001ac00ffd, %r12 # imm = 0xA8000001AC00FFD
movzbl (%r15), %eax
leal -0x30(%rax), %ecx
cmpb $0xa, %cl
jb 0x14105
movl %eax, %ecx
andb $-0x21, %cl
addb $-0x41, %cl
cmpb $0x1a, %cl
jb 0x14105
leal -0x24(%rax), %ecx
cmpl $0x3b, %ecx
ja 0x141f9
btq %rcx, %r12
jae 0x141f9
movq 0x48(%r14), %rax
addq $0x5, %rax
cmpq 0x40(%r14), %rax
jb 0x14123
movq %r14, %rdi
callq 0x2190
testl %eax, %eax
je 0x1434e
movb (%r15), %al
testb %al, %al
js 0x14132
incq %r15
jmp 0x141d6
movzbl %al, %ecx
movl %ecx, %edx
andl $-0x20, %edx
cmpl $0xc0, %edx
jne 0x1415a
movq 0x48(%r14), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x48(%r14)
movb %al, (%rcx)
movb 0x1(%r15), %al
addq $0x2, %r15
jmp 0x141d6
movl %ecx, %edx
andl $-0x10, %edx
cmpl $0xe0, %edx
jne 0x14191
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 0x141d6
andl $-0x8, %ecx
cmpl $0xf0, %ecx
jne 0x141e4
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)
cmpq %rbx, %r15
jne 0x140d6
jmp 0x14352
cmpl $0x7e, %eax
je 0x14105
movl $0x1, %r13d
testb %al, %al
jns 0x14245
movl %eax, %ecx
andl $-0x20, %ecx
movl $0x2, %r13d
cmpl $0xc0, %ecx
je 0x14245
movl %eax, %ecx
andl $-0x10, %ecx
movl $0x3, %r13d
cmpl $0xe0, %ecx
je 0x14245
andl $-0x8, %eax
xorl %r13d, %r13d
cmpl $0xf0, %eax
sete %r13b
shll $0x2, %r13d
testl %r13d, %r13d
sete %bpl
je 0x1433a
incq %r15
movq %r15, %rax
movq %rax, %r15
movb -0x1(%rax), %r12b
movq 0x48(%r14), %rax
addq $0x5, %rax
cmpq 0x40(%r14), %rax
jb 0x1427d
movq %r14, %rdi
callq 0x2190
testl %eax, %eax
je 0x1433a
movq 0x48(%r14), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x48(%r14)
movb $0x25, (%rax)
incl 0x11c(%r14)
movq 0x48(%r14), %rax
addq $0x5, %rax
cmpq 0x40(%r14), %rax
jb 0x142b1
movq %r14, %rdi
callq 0x2190
testl %eax, %eax
je 0x1433a
movl %r12d, %eax
shrb $0x4, %al
cmpb $-0x60, %r12b
movl $0x37, %ecx
movl $0x30, %edx
cmovbl %edx, %ecx
addb %al, %cl
movq 0x48(%r14), %rax
leaq 0x1(%rax), %rdx
movq %rdx, 0x48(%r14)
movb %cl, (%rax)
incl 0x11c(%r14)
movq 0x48(%r14), %rax
addq $0x5, %rax
cmpq 0x40(%r14), %rax
jb 0x142f9
movq %r14, %rdi
callq 0x2190
testl %eax, %eax
je 0x1433a
decl %r13d
andb $0xf, %r12b
cmpb $0xa, %r12b
movl $0x37, %eax
movl $0x30, %ecx
cmovbl %ecx, %eax
addb %r12b, %al
movq 0x48(%r14), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x48(%r14)
movb %al, (%rcx)
incl 0x11c(%r14)
leaq 0x1(%r15), %rax
testl %r13d, %r13d
sete %bpl
jne 0x14258
testb $0x1, %bpl
movabsq $0xa8000001ac00ffd, %r12 # imm = 0xA8000001AC00FFD
jne 0x141eb
xorl %eax, %eax
jmp 0x14362
movq $0x0, 0x120(%r14)
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq