// File: /workspace/github_cpp_makefile_star2_O1/jgeumlek[P]moltengamepadctl/source/oscpkt/oscpkt.hh
// Function: oscpkt::Message::buildFromRawData(void const*, unsigned long)
void buildFromRawData(const void *ptr, size_t sz) {
    clear();
    storage.assign((const char*)ptr, (const char*)ptr + sz);
    const char *address_beg = storage.begin();
    const char *address_end = (const char*)memchr(address_beg, 0, storage.end()-address_beg);
    if (!address_end || !isZeroPaddingCorrect(address_end+1) || address_beg[0] != '/') { 
      OSCPKT_SET_ERR(MALFORMED_ADDRESS_PATTERN); return; 
    } else address.assign(address_beg, address_end);

    const char *type_tags_beg = ceil4(address_end+1);
    const char *type_tags_end = (const char*)memchr(type_tags_beg, 0, storage.end()-type_tags_beg);
    if (!type_tags_end || !isZeroPaddingCorrect(type_tags_end+1) || type_tags_beg[0] != ',') { 
      OSCPKT_SET_ERR(MALFORMED_TYPE_TAGS); return; 
    } else type_tags.assign(type_tags_beg+1, type_tags_end); // we do not copy the initial ','

    const char *arg = ceil4(type_tags_end+1); assert(arg <= storage.end()); 
    size_t iarg = 0;
    while (isOk() && iarg < type_tags.size()) {
      assert(arg <= storage.end()); 
      size_t len = getArgSize(type_tags[iarg], arg);
      if (isOk()) arguments.push_back(std::make_pair(arg - storage.begin(), len));
      arg += ceil4(len); ++iarg;
    }
    if (iarg < type_tags.size() || arg != storage.end()) {
      OSCPKT_SET_ERR(MALFORMED_ARGUMENTS);
    }
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
callq 0x3e7a
leaq 0x60(%rbx), %rdi
addq %r15, %r14
movq %r15, %rsi
movq %r14, %rdx
callq 0x4c92
movq 0x60(%rbx), %rax
movq 0x68(%rbx), %rdx
xorl %r14d, %r14d
subq %rax, %rdx
cmovneq %rax, %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x2240
testq %rax, %rax
je 0x4a9e
leaq 0x1(%rax), %rcx
leaq 0x4(%rax), %r15
andq $-0x4, %r15
cmpq %r15, %rcx
setae %dl
jae 0x48e8
cmpb $0x0, (%rcx)
jne 0x4a9e
leaq 0x2(%rax), %rsi
movq %rsi, %rcx
subq %r15, %rcx
movq %rsi, %rdx
testq %rcx, %rcx
je 0x48e2
leaq 0x1(%rdx), %rsi
incq %rcx
cmpb $0x0, (%rdx)
je 0x48ce
cmpq %r15, %rdx
setae %dl
testb %dl, %dl
je 0x4a9e
cmpb $0x2f, (%r14)
jne 0x4a9e
leaq 0x8(%rbx), %rdi
movq 0x10(%rbx), %rdx
subq %r14, %rax
xorl %r12d, %r12d
xorl %esi, %esi
movq %r14, %rcx
movq %rax, %r8
callq 0x2250
movq 0x60(%rbx), %rax
movq 0x68(%rbx), %rcx
subq %rax, %rcx
cmoveq %r12, %rax
leaq (%rax,%rcx), %rdx
subq %r15, %rdx
movq %r15, %rdi
xorl %esi, %esi
callq 0x2240
testq %rax, %rax
je 0x4aba
leaq 0x1(%rax), %rcx
leaq 0x4(%rax), %r14
andq $-0x4, %r14
cmpq %r14, %rcx
setae %dl
jae 0x497f
cmpb $0x0, (%rcx)
jne 0x4aba
leaq 0x2(%rax), %rsi
movq %rsi, %rcx
subq %r14, %rcx
movq %rsi, %rdx
testq %rcx, %rcx
je 0x4979
leaq 0x1(%rdx), %rsi
incq %rcx
cmpb $0x0, (%rdx)
je 0x4965
cmpq %r14, %rdx
setae %dl
testb %dl, %dl
je 0x4aba
cmpb $0x2c, (%r15)
jne 0x4aba
leaq 0x28(%rbx), %rdi
incq %r15
movq 0x30(%rbx), %rdx
subq %r15, %rax
xorl %r12d, %r12d
xorl %esi, %esi
movq %r15, %rcx
movq %rax, %r8
callq 0x2250
movq 0x60(%rbx), %rax
movq 0x68(%rbx), %rcx
subq %rax, %rcx
cmoveq %r12, %rax
addq %rcx, %rax
cmpq %r14, %rax
jb 0x4b10
xorl %ebp, %ebp
cmpl $0x0, 0x78(%rbx)
sete %al
jne 0x4a92
cmpq $0x0, 0x30(%rbx)
je 0x4a92
leaq 0x48(%rbx), %r15
xorl %ebp, %ebp
leaq 0x8(%rsp), %r12
movq 0x60(%rbx), %rax
movq 0x68(%rbx), %rcx
subq %rax, %rcx
movl $0x0, %edx
cmovneq %rax, %rdx
leaq (%rdx,%rcx), %rax
cmpq %rax, %r14
ja 0x4af1
movq 0x28(%rbx), %rax
movsbl (%rax,%rbp), %esi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x4b30
movq %rax, %r13
cmpl $0x0, 0x78(%rbx)
jne 0x4a71
movq 0x60(%rbx), %rax
cmpq %rax, 0x68(%rbx)
movl $0x0, %ecx
cmovneq %rax, %rcx
movq %r14, %rax
subq %rcx, %rax
movq %rax, 0x8(%rsp)
movq %r13, 0x10(%rsp)
movq 0x50(%rbx), %rsi
cmpq 0x58(%rbx), %rsi
je 0x4a66
movups 0x8(%rsp), %xmm0
movups %xmm0, (%rsi)
addq $0x10, 0x50(%rbx)
jmp 0x4a71
movq %r15, %rdi
movq %r12, %rdx
callq 0x410c
addq $0x3, %r13
andq $-0x4, %r13
addq %r13, %r14
incq %rbp
cmpl $0x0, 0x78(%rbx)
sete %al
jne 0x4a92
cmpq 0x30(%rbx), %rbp
jb 0x49ef
cmpq 0x30(%rbx), %rbp
jae 0x4ac9
testb %al, %al
je 0x4aab
jmp 0x4ae8
cmpl $0x0, 0x78(%rbx)
jne 0x4aab
movl $0x1, 0x78(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x0, 0x78(%rbx)
jne 0x4aab
movl $0x2, 0x78(%rbx)
jmp 0x4aab
movq 0x60(%rbx), %rcx
movq 0x68(%rbx), %rdx
xorl %esi, %esi
subq %rcx, %rdx
cmovneq %rcx, %rsi
leaq (%rsi,%rdx), %rcx
cmpq %rcx, %r14
setne %cl
testb %cl, %al
je 0x4aab
movl $0x3, 0x78(%rbx)
jmp 0x4aab
leaq 0x18b2(%rip), %rdi      # 0x63aa
leaq 0x17b2(%rip), %rsi      # 0x62b1
leaq 0x18b9(%rip), %rcx      # 0x63bf
movl $0x17e, %edx            # imm = 0x17E
callq 0x2150
leaq 0x1893(%rip), %rdi      # 0x63aa
leaq 0x1793(%rip), %rsi      # 0x62b1
leaq 0x189a(%rip), %rcx      # 0x63bf
movl $0x17b, %edx            # imm = 0x17B
callq 0x2150
nop