// File: /workspace/github_cpp_makefile_star2_O2/cqbqdd11519[P]DockerClient/rapidjson/include/rapidjson/internal/itoa.h
// Function: rapidjson::internal::u32toa(unsigned int, char*)
inline char* u32toa(uint32_t value, char* buffer) {
    RAPIDJSON_ASSERT(buffer != 0);

    const char* cDigitsLut = GetDigitsLut();

    if (value < 10000) {
        const uint32_t d1 = (value / 100) << 1;
        const uint32_t d2 = (value % 100) << 1;

        if (value >= 1000)
            *buffer++ = cDigitsLut[d1];
        if (value >= 100)
            *buffer++ = cDigitsLut[d1 + 1];
        if (value >= 10)
            *buffer++ = cDigitsLut[d2];
        *buffer++ = cDigitsLut[d2 + 1];
    }
    else if (value < 100000000) {
        // value = bbbbcccc
        const uint32_t b = value / 10000;
        const uint32_t c = value % 10000;

        const uint32_t d1 = (b / 100) << 1;
        const uint32_t d2 = (b % 100) << 1;

        const uint32_t d3 = (c / 100) << 1;
        const uint32_t d4 = (c % 100) << 1;

        if (value >= 10000000)
            *buffer++ = cDigitsLut[d1];
        if (value >= 1000000)
            *buffer++ = cDigitsLut[d1 + 1];
        if (value >= 100000)
            *buffer++ = cDigitsLut[d2];
        *buffer++ = cDigitsLut[d2 + 1];

        *buffer++ = cDigitsLut[d3];
        *buffer++ = cDigitsLut[d3 + 1];
        *buffer++ = cDigitsLut[d4];
        *buffer++ = cDigitsLut[d4 + 1];
    }
    else {
        // value = aabbbbcccc in decimal

        const uint32_t a = value / 100000000; // 1 to 42
        value %= 100000000;

        if (a >= 10) {
            const unsigned i = a << 1;
            *buffer++ = cDigitsLut[i];
            *buffer++ = cDigitsLut[i + 1];
        }
        else
            *buffer++ = static_cast<char>('0' + static_cast<char>(a));

        const uint32_t b = value / 10000; // 0 to 9999
        const uint32_t c = value % 10000; // 0 to 9999

        const uint32_t d1 = (b / 100) << 1;
        const uint32_t d2 = (b % 100) << 1;

        const uint32_t d3 = (c / 100) << 1;
        const uint32_t d4 = (c % 100) << 1;

        *buffer++ = cDigitsLut[d1];
        *buffer++ = cDigitsLut[d1 + 1];
        *buffer++ = cDigitsLut[d2];
        *buffer++ = cDigitsLut[d2 + 1];
        *buffer++ = cDigitsLut[d3];
        *buffer++ = cDigitsLut[d3 + 1];
        *buffer++ = cDigitsLut[d4];
        *buffer++ = cDigitsLut[d4 + 1];
    }
    return buffer;
}

// Assembly:
testq %rsi, %rsi
je 0xdc50
cmpl $0x270f, %edi           # imm = 0x270F
ja 0xda59
movw $0x64, %cx
movl %edi, %eax
xorl %edx, %edx
divw %cx
movzwl %ax, %ecx
addl %ecx, %ecx
movzwl %dx, %eax
addl %eax, %eax
cmpl $0x3e8, %edi            # imm = 0x3E8
jb 0xdad2
movq 0xb51c(%rip), %rdx      # 0x18f68
movb (%rdx,%rcx), %dl
movb %dl, (%rsi)
incq %rsi
jmp 0xdadb
cmpl $0x5f5e0ff, %edi        # imm = 0x5F5E0FF
ja 0xdb15
movl $0x2710, %ecx           # imm = 0x2710
movl %edi, %eax
xorl %edx, %edx
divl %ecx
movl %eax, %r8d
movl %edx, %r9d
movl $0xf4240, %ecx          # imm = 0xF4240
movl %edi, %eax
xorl %edx, %edx
divl %ecx
movl %eax, %ecx
movw $0x64, %r10w
movl %r8d, %eax
xorl %edx, %edx
divw %r10w
movl %edx, %r8d
movl %r9d, %eax
xorl %edx, %edx
divw %r10w
addl %ecx, %ecx
movzwl %r8w, %r8d
addl %r8d, %r8d
movzwl %ax, %eax
addl %eax, %eax
movzwl %dx, %edx
addl %edx, %edx
cmpl $0x989680, %edi         # imm = 0x989680
jb 0xdb50
movq 0xb4a5(%rip), %rdi      # 0x18f68
movb (%rdi,%rcx), %dil
movb %dil, (%rsi)
incq %rsi
jmp 0xdb5c
cmpl $0x64, %edi
jb 0xdbb8
movzwl %cx, %ecx
movq 0xb483(%rip), %rdx      # 0x18f68
movb 0x1(%rdx,%rcx), %cl
movb %cl, (%rsi)
incq %rsi
movq 0xb473(%rip), %rcx      # 0x18f68
movb (%rcx,%rax), %cl
movb %cl, (%rsi)
incq %rsi
movzwl %ax, %eax
movq 0xb461(%rip), %rcx      # 0x18f68
movb 0x1(%rcx,%rax), %al
movb %al, (%rsi)
incq %rsi
jmp 0xdc3b
movl $0x5f5e100, %ecx        # imm = 0x5F5E100
movl %edi, %eax
xorl %edx, %edx
divl %ecx
movl %edx, %ecx
cmpl $0x3b9aca00, %edi       # imm = 0x3B9ACA00
jb 0xdbc6
movl %eax, %eax
movq 0xb431(%rip), %rdx      # 0x18f68
movb (%rdx,%rax,2), %dil
addq %rax, %rax
movb %dil, (%rsi)
movl %eax, %eax
movb 0x1(%rdx,%rax), %al
movb %al, 0x1(%rsi)
addq $0x2, %rsi
jmp 0xdbcd
cmpl $0xf4240, %edi          # imm = 0xF4240
jb 0xdc3f
movl %ecx, %ecx
movq 0xb403(%rip), %rdi      # 0x18f68
movb 0x1(%rdi,%rcx), %cl
movb %cl, (%rsi)
incq %rsi
movq 0xb3f3(%rip), %rcx      # 0x18f68
movb (%rcx,%r8), %cl
movb %cl, (%rsi)
incq %rsi
movzwl %r8w, %ecx
movq 0xb3df(%rip), %rdi      # 0x18f68
movb 0x1(%rdi,%rcx), %cl
movb %cl, (%rsi)
movb (%rdi,%rax), %cl
movb %cl, 0x1(%rsi)
movzwl %ax, %eax
movb 0x1(%rdi,%rax), %al
movb %al, 0x2(%rsi)
movb (%rdi,%rdx), %al
movb %al, 0x3(%rsi)
movzwl %dx, %eax
movb 0x1(%rdi,%rax), %al
movb %al, 0x4(%rsi)
addq $0x5, %rsi
jmp 0xdc3b
cmpl $0xa, %edi
jae 0xdaee
jmp 0xdafd
orb $0x30, %al
movb %al, (%rsi)
incq %rsi
movl $0x2710, %edi           # imm = 0x2710
movl %ecx, %eax
xorl %edx, %edx
divl %edi
movl %eax, %edi
movl %edx, %r8d
movl $0xf4240, %r9d          # imm = 0xF4240
movl %ecx, %eax
xorl %edx, %edx
divl %r9d
movl %eax, %ecx
movw $0x64, %r9w
movl %edi, %eax
xorl %edx, %edx
divw %r9w
movl %edx, %edi
movl %r8d, %eax
xorl %edx, %edx
divw %r9w
movzwl %di, %edi
movzwl %ax, %eax
movzwl %dx, %edx
movq 0xb354(%rip), %r8       # 0x18f68
movzwl (%r8,%rcx,2), %ecx
movw %cx, (%rsi)
movzwl (%r8,%rdi,2), %ecx
movw %cx, 0x2(%rsi)
movzwl (%r8,%rax,2), %eax
movw %ax, 0x4(%rsi)
movzwl (%r8,%rdx,2), %eax
movw %ax, 0x6(%rsi)
addq $0x8, %rsi
movq %rsi, %rax
retq
cmpl $0x186a0, %edi          # imm = 0x186A0
jae 0xdb6e
jmp 0xdb7e
pushq %rbp
movq %rsp, %rbp
leaq 0x4490(%rip), %rdi      # 0x120eb
leaq 0x4495(%rip), %rsi      # 0x120f7
leaq 0x44ed(%rip), %rcx      # 0x12156
pushq $0x28
popq %rdx
callq 0x9380
nop