// File: /workspace/github_c_makefile_star2_O3/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 0x1317d
cmpl $0x0, 0x120(%r14)
jne 0x1317d
movq 0x48(%r14), %rax
leaq 0x5(%rax), %rcx
cmpq 0x40(%r14), %rcx
jb 0x1316b
movq %r14, %rdi
callq 0x2190
testl %eax, %eax
je 0x133eb
movq 0x48(%r14), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x48(%r14)
movb $0x20, (%rax)
incl 0x11c(%r14)
testq %rbx, %rbx
je 0x133d9
addq %r15, %rbx
movl $0x30, %ebp
movb (%r15), %al
leal -0x30(%rax), %ecx
cmpb $0xa, %cl
jb 0x131c9
movl %eax, %ecx
andb $-0x21, %cl
addb $-0x41, %cl
cmpb $0x1a, %cl
jb 0x131c9
movzbl %al, %ecx
leal -0x24(%rcx), %edx
cmpl $0x3b, %edx
ja 0x132bd
movabsq $0xa8000001ac00ffd, %rsi # imm = 0xA8000001AC00FFD
btq %rdx, %rsi
jae 0x132bd
movq 0x48(%r14), %rcx
addq $0x5, %rcx
cmpq 0x40(%r14), %rcx
jb 0x131ea
movq %r14, %rdi
callq 0x2190
testl %eax, %eax
je 0x133eb
movb (%r15), %al
testb %al, %al
js 0x131f6
incq %r15
jmp 0x1329a
movzbl %al, %ecx
movl %ecx, %edx
andl $-0x20, %edx
cmpl $0xc0, %edx
jne 0x1321e
movq 0x48(%r14), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x48(%r14)
movb %al, (%rcx)
movb 0x1(%r15), %al
addq $0x2, %r15
jmp 0x1329a
movl %ecx, %edx
andl $-0x10, %edx
cmpl $0xe0, %edx
jne 0x13255
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 0x1329a
andl $-0x8, %ecx
cmpl $0xf0, %ecx
jne 0x132a8
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 0x1318e
jmp 0x133d9
cmpl $0x7e, %ecx
je 0x131c9
movl $0x1, %r13d
testb %al, %al
jns 0x13305
movl %ecx, %eax
andl $-0x20, %eax
movl $0x2, %r13d
cmpl $0xc0, %eax
je 0x13305
movl %ecx, %eax
andl $-0x10, %eax
movl $0x3, %r13d
cmpl $0xe0, %eax
je 0x13305
andl $-0x8, %ecx
movl $0x4, %r13d
cmpl $0xf0, %ecx
jne 0x132af
movb (%r15), %r12b
movq 0x48(%r14), %rax
leaq 0x5(%rax), %rcx
cmpq 0x40(%r14), %rcx
jb 0x1332a
movq %r14, %rdi
callq 0x2190
testl %eax, %eax
je 0x133eb
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 0x1335e
movq %r14, %rdi
callq 0x2190
testl %eax, %eax
je 0x133eb
movq 0x48(%r14), %rax
movl %r12d, %ecx
shrb $0x4, %cl
cmpb $-0x60, %r12b
movl $0x37, %edx
cmovbl %ebp, %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 0x133a1
movq %r14, %rdi
callq 0x2190
testl %eax, %eax
je 0x133eb
movq 0x48(%r14), %rax
decl %r13d
incq %r15
andb $0xf, %r12b
cmpb $0xa, %r12b
movl $0x37, %ecx
cmovbl %ebp, %ecx
addb %r12b, %cl
leaq 0x1(%rax), %rdx
movq %rdx, 0x48(%r14)
movb %cl, (%rax)
incl 0x11c(%r14)
testl %r13d, %r13d
jne 0x13305
jmp 0x132af
movq $0x0, 0x120(%r14)
movl $0x1, %eax
jmp 0x133ed
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq