// File: /workspace/github_cpp_makefile_star2_O3/lega911[P]ijson/src/connect.cpp
// Function: Connect::read_header(Slice&)
void Connect::read_header(Slice &data) {
    if(data.starts_with_lc("content-length: ")) {
        data.remove(16);
        content_length = data.atoi();
    } else if(data.starts_with_lc("type: ")) {
        data.remove(6);
        _set_type(data);
    } else if(data.starts_with_lc("x-type: ")) {
        data.remove(8);
        _set_type(data);
    } else if(data.starts_with_lc("name: ")) {
        data.remove(6);
        name.set(data);
    } else if(data.starts_with_lc("id: ")) {
        data.remove(4);
        id.set(data);
    } else if(data.starts_with_lc("option: ")) {
        data.remove(8);
        header_option = data;
    } else if(data.starts_with_lc("priority: ")) {
        data.remove(10);
        priority = data.atoi();
    } else if(data.starts_with_lc("worker-id: ")) {
        data.remove(11);
        required_worker.set(data);
    } else if(data.starts_with_lc("set-id: ")) {
        data.remove(8);
        connection_id.set(data);
    } else if(data.starts_with_lc("timeout: ")) {
        data.remove(9);
        ping = data.atoi();
        ping_timeout = get_time_sec() + ping;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movl 0x8(%rsi), %edx
movq (%rsi), %rax
xorl %edi, %edi
testl %edx, %edx
movl $0x0, %ecx
cmovgl %edx, %ecx
cmpq $0x10, %rcx
movl $0x10, %r8d
cmovbq %rcx, %r8
leaq 0xd0e6(%rip), %r9       # 0x171cd
movb (%rdi,%r9), %r10b
cmpq %rdi, %r8
je 0xa116
movzbl (%rax,%rdi), %r11d
leal -0x41(%r11), %r14d
movl %r11d, %r15d
orb $0x20, %r15b
cmpb $0x1a, %r14b
movzbl %r15b, %r14d
cmovael %r11d, %r14d
incq %rdi
cmpb %r14b, %r10b
je 0xa0e7
jmp 0xa11f
testb %r10b, %r10b
je 0xa288
cmpq $0x6, %rcx
movl $0x6, %r8d
cmovbq %rcx, %r8
xorl %edi, %edi
leaq 0xd0aa(%rip), %r9       # 0x171e0
movb (%rdi,%r9), %r10b
cmpq %rdi, %r8
je 0xa165
movzbl (%rax,%rdi), %r11d
leal -0x41(%r11), %r14d
movl %r11d, %r15d
orb $0x20, %r15b
cmpb $0x1a, %r14b
movzbl %r15b, %r14d
cmovael %r11d, %r14d
incq %rdi
cmpb %r14b, %r10b
je 0xa136
jmp 0xa16e
testb %r10b, %r10b
je 0xa301
cmpq $0x8, %rcx
movl $0x8, %edi
cmovbq %rcx, %rdi
xorl %r9d, %r9d
leaq 0xd059(%rip), %r10      # 0x171de
movb (%r9,%r10), %r11b
cmpq %r9, %rdi
je 0xa1b4
movzbl (%rax,%r9), %r14d
leal -0x41(%r14), %r15d
movl %r14d, %r12d
orb $0x20, %r12b
cmpb $0x1a, %r15b
movzbl %r12b, %r15d
cmovael %r14d, %r15d
incq %r9
cmpb %r15b, %r11b
je 0xa185
jmp 0xa1bd
testb %r11b, %r11b
je 0xa35b
xorl %r9d, %r9d
leaq 0xd020(%rip), %r10      # 0x171e7
movb (%r9,%r10), %r11b
cmpq %r9, %r8
je 0xa1f6
movzbl (%rax,%r9), %r14d
leal -0x41(%r14), %r15d
movl %r14d, %r12d
orb $0x20, %r12b
cmpb $0x1a, %r15b
movzbl %r12b, %r15d
cmovael %r14d, %r15d
incq %r9
cmpb %r15b, %r11b
je 0xa1c7
jmp 0xa1ff
testb %r11b, %r11b
je 0xa3c6
cmpq $0x4, %rcx
movl $0x4, %r8d
cmovbq %rcx, %r8
xorl %r9d, %r9d
leaq 0xcff2(%rip), %r10      # 0x17209
movb (%r9,%r10), %r11b
cmpq %r9, %r8
je 0xa246
movzbl (%rax,%r9), %r14d
leal -0x41(%r14), %r15d
movl %r14d, %r12d
orb $0x20, %r12b
cmpb $0x1a, %r15b
movzbl %r12b, %r15d
cmovael %r14d, %r15d
incq %r9
cmpb %r15b, %r11b
je 0xa217
jmp 0xa24f
testb %r11b, %r11b
je 0xa446
xorl %r8d, %r8d
leaq 0xcf95(%rip), %r9       # 0x171ee
movb (%r8,%r9), %r10b
cmpq %r8, %rdi
je 0xa2b1
movzbl (%rax,%r8), %r11d
leal -0x41(%r11), %r14d
movl %r11d, %r15d
orb $0x20, %r15b
cmpb $0x1a, %r14b
movzbl %r15b, %r14d
cmovael %r11d, %r14d
incq %r8
cmpb %r14b, %r10b
je 0xa259
jmp 0xa2ba
cmpl $0x10, %edx
movl $0x10, %ecx
cmovll %edx, %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, (%rsi)
subl %ecx, %edx
movl %edx, 0x8(%rsi)
movq %rsi, %rdi
callq 0xc282
movl %eax, 0x7c(%rbx)
jmp 0xa507
testb %r10b, %r10b
je 0xa4b8
cmpq $0xa, %rcx
movl $0xa, %r8d
cmovbq %rcx, %r8
xorl %r9d, %r9d
leaq 0xcf25(%rip), %r10      # 0x171f7
movb (%r9,%r10), %r11b
cmpq %r9, %r8
je 0xa30b
movzbl (%rax,%r9), %r14d
leal -0x41(%r14), %r15d
movl %r14d, %r12d
orb $0x20, %r12b
cmpb $0x1a, %r15b
movzbl %r12b, %r15d
cmovael %r14d, %r15d
incq %r9
cmpb %r15b, %r11b
je 0xa2d2
jmp 0xa314
cmpl $0x6, %edx
movl $0x6, %ecx
jmp 0xa363
testb %r11b, %r11b
je 0xa4e0
cmpq $0xb, %rcx
movl $0xb, %r8d
cmovbq %rcx, %r8
xorl %r9d, %r9d
leaq 0xced6(%rip), %r10      # 0x17202
movb (%r9,%r10), %r11b
cmpq %r9, %r8
je 0xa384
movzbl (%rax,%r9), %r14d
leal -0x41(%r14), %r15d
movl %r14d, %r12d
orb $0x20, %r12b
cmpb $0x1a, %r15b
movzbl %r12b, %r15d
cmovael %r14d, %r15d
incq %r9
cmpb %r15b, %r11b
je 0xa32c
jmp 0xa38d
cmpl $0x8, %edx
movl $0x8, %ecx
cmovll %edx, %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, (%rsi)
subl %ecx, %edx
movl %edx, 0x8(%rsi)
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xa57a
testb %r11b, %r11b
je 0xa510
xorl %r8d, %r8d
leaq 0xce77(%rip), %r9       # 0x1720e
movb (%r8,%r9), %r10b
cmpq %r8, %rdi
je 0xa3f5
movzbl (%rax,%r8), %r11d
leal -0x41(%r11), %r14d
movl %r11d, %r15d
orb $0x20, %r15b
cmpb $0x1a, %r14b
movzbl %r15b, %r14d
cmovael %r11d, %r14d
incq %r8
cmpb %r14b, %r10b
je 0xa397
jmp 0xa3fe
cmpl $0x6, %edx
movl $0x6, %ecx
cmovll %edx, %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, (%rsi)
subl %ecx, %edx
movl %edx, 0x8(%rsi)
movl $0x0, 0xc0(%rbx)
addq $0xb8, %rbx
jmp 0xa566
testb %r10b, %r10b
je 0xa53c
cmpq $0x9, %rcx
movl $0x9, %edi
cmovbq %rcx, %rdi
xorl %ecx, %ecx
leaq 0xce03(%rip), %r8       # 0x17217
movb (%rcx,%r8), %r9b
cmpq %rcx, %rdi
je 0xa475
movzbl (%rax,%rcx), %r10d
leal -0x41(%r10), %r11d
movl %r10d, %r14d
orb $0x20, %r14b
cmpb $0x1a, %r11b
movzbl %r14b, %r11d
cmovael %r10d, %r11d
incq %rcx
cmpb %r11b, %r9b
je 0xa414
jmp 0xa507
cmpl $0x4, %edx
movl $0x4, %ecx
cmovll %edx, %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, (%rsi)
subl %ecx, %edx
movl %edx, 0x8(%rsi)
movl $0x0, 0xe8(%rbx)
addq $0xe0, %rbx
jmp 0xa566
testb %r9b, %r9b
jne 0xa507
cmpl $0x9, %edx
movl $0x9, %ecx
cmovll %edx, %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, (%rsi)
subl %ecx, %edx
movl %edx, 0x8(%rsi)
movq %rsi, %rdi
callq 0xc282
movl %eax, 0xf8(%rbx)
callq 0x163d5
addl 0xf8(%rbx), %eax
movl %eax, 0xfc(%rbx)
jmp 0xa507
cmpl $0x8, %edx
movl $0x8, %ecx
cmovll %edx, %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, (%rsi)
subl %ecx, %edx
movl %edx, 0x8(%rsi)
movl %edx, 0xb0(%rbx)
movq %rax, 0xa8(%rbx)
jmp 0xa507
cmpl $0xa, %edx
movl $0xa, %ecx
cmovll %edx, %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, (%rsi)
subl %ecx, %edx
movl %edx, 0x8(%rsi)
movq %rsi, %rdi
callq 0xc282
movl %eax, 0xf4(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
cmpl $0xb, %edx
movl $0xb, %ecx
cmovll %edx, %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, (%rsi)
subl %ecx, %edx
movl %edx, 0x8(%rsi)
movl $0x0, 0x118(%rbx)
addq $0x110, %rbx            # imm = 0x110
jmp 0xa566
cmpl $0x8, %edx
movl $0x8, %ecx
cmovll %edx, %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, (%rsi)
subl %ecx, %edx
movl %edx, 0x8(%rsi)
movl $0x0, 0x108(%rbx)
addq $0x100, %rbx            # imm = 0x100
movq %rbx, %rdi
movq %rax, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xc102
nop