// File: /workspace/github_c_makefile_star2_O0/mijallen[P]SimpleHTTPServer/lib/libyaml/src/reader.c
// Function: yaml_parser_determine_encoding
static int
yaml_parser_determine_encoding(yaml_parser_t *parser)
{
    /* Ensure that we had enough bytes in the raw buffer. */

    while (!parser->eof 
            && parser->raw_buffer.last - parser->raw_buffer.pointer < 3) {
        if (!yaml_parser_update_raw_buffer(parser)) {
            return 0;
        }
    }

    /* Determine the encoding. */

    if (parser->raw_buffer.last - parser->raw_buffer.pointer >= 2
            && !memcmp(parser->raw_buffer.pointer, BOM_UTF16LE, 2)) {
        parser->encoding = YAML_UTF16LE_ENCODING;
        parser->raw_buffer.pointer += 2;
        parser->offset += 2;
    }
    else if (parser->raw_buffer.last - parser->raw_buffer.pointer >= 2
            && !memcmp(parser->raw_buffer.pointer, BOM_UTF16BE, 2)) {
        parser->encoding = YAML_UTF16BE_ENCODING;
        parser->raw_buffer.pointer += 2;
        parser->offset += 2;
    }
    else if (parser->raw_buffer.last - parser->raw_buffer.pointer >= 3
            && !memcmp(parser->raw_buffer.pointer, BOM_UTF8, 3)) {
        parser->encoding = YAML_UTF8_ENCODING;
        parser->raw_buffer.pointer += 3;
        parser->offset += 3;
    }
    else {
        parser->encoding = YAML_UTF8_ENCODING;
    }

    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rcx
xorl %eax, %eax
cmpl $0x0, 0x80(%rcx)
movb %al, -0x11(%rbp)
jne 0x7221
movq -0x10(%rbp), %rax
movq 0xc8(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0xc0(%rcx), %rcx
subq %rcx, %rax
cmpq $0x3, %rax
setl %al
movb %al, -0x11(%rbp)
movb -0x11(%rbp), %al
testb $0x1, %al
jne 0x722a
jmp 0x7246
movq -0x10(%rbp), %rdi
callq 0x73e0
cmpl $0x0, %eax
jne 0x7244
movl $0x0, -0x4(%rbp)
jmp 0x73d1
jmp 0x71ec
movq -0x10(%rbp), %rax
movq 0xc8(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0xc0(%rcx), %rcx
subq %rcx, %rax
cmpq $0x2, %rax
jl 0x72c1
movq -0x10(%rbp), %rax
movq 0xc0(%rax), %rax
movw (%rax), %ax
subw $0xfeff, %ax            # imm = 0xFEFF
setne %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x72c1
movq -0x10(%rbp), %rax
movl $0x2, 0xd0(%rax)
movq -0x10(%rbp), %rax
movq 0xc0(%rax), %rcx
addq $0x2, %rcx
movq %rcx, 0xc0(%rax)
movq -0x10(%rbp), %rax
movq 0xd8(%rax), %rcx
addq $0x2, %rcx
movq %rcx, 0xd8(%rax)
jmp 0x73ca
movq -0x10(%rbp), %rax
movq 0xc8(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0xc0(%rcx), %rcx
subq %rcx, %rax
cmpq $0x2, %rax
jl 0x733c
movq -0x10(%rbp), %rax
movq 0xc0(%rax), %rax
movw (%rax), %ax
subw $-0x2, %ax
setne %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x733c
movq -0x10(%rbp), %rax
movl $0x3, 0xd0(%rax)
movq -0x10(%rbp), %rax
movq 0xc0(%rax), %rcx
addq $0x2, %rcx
movq %rcx, 0xc0(%rax)
movq -0x10(%rbp), %rax
movq 0xd8(%rax), %rcx
addq $0x2, %rcx
movq %rcx, 0xd8(%rax)
jmp 0x73c8
movq -0x10(%rbp), %rax
movq 0xc8(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0xc0(%rcx), %rcx
subq %rcx, %rax
cmpq $0x3, %rax
jl 0x73b8
movq -0x10(%rbp), %rax
movq 0xc0(%rax), %rdi
leaq 0x24be9(%rip), %rsi     # 0x2bf56
movl $0x3, %edx
callq 0x2150
cmpl $0x0, %eax
jne 0x73b8
movq -0x10(%rbp), %rax
movl $0x1, 0xd0(%rax)
movq -0x10(%rbp), %rax
movq 0xc0(%rax), %rcx
addq $0x3, %rcx
movq %rcx, 0xc0(%rax)
movq -0x10(%rbp), %rax
movq 0xd8(%rax), %rcx
addq $0x3, %rcx
movq %rcx, 0xd8(%rax)
jmp 0x73c6
movq -0x10(%rbp), %rax
movl $0x1, 0xd0(%rax)
jmp 0x73c8
jmp 0x73ca
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)