// File: /workspace/github_cpp_makefile_star2_O3/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 0x3e26
leaq 0x60(%rbx), %rdi
addq %r15, %r14
movq %r15, %rsi
movq %r14, %rdx
callq 0x4be2
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 0x49d1
leaq 0x1(%rax), %rcx
leaq 0x4(%rax), %r15
andq $-0x4, %r15
cmpq %r15, %rcx
jae 0x482c
cmpb $0x0, (%rcx)
jne 0x49d1
leaq 0x2(%rax), %rsi
movq %rsi, %rcx
subq %r15, %rcx
movq %rsi, %rdx
testq %rcx, %rcx
je 0x4823
leaq 0x1(%rdx), %rsi
incq %rcx
cmpb $0x0, (%rdx)
je 0x480f
cmpq %r15, %rdx
jb 0x49d1
cmpb $0x2f, (%r14)
jne 0x49d1
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 0x49e0
leaq 0x1(%rax), %rcx
leaq 0x4(%rax), %r14
andq $-0x4, %r14
cmpq %r14, %rcx
jae 0x48bb
cmpb $0x0, (%rcx)
jne 0x49e0
leaq 0x2(%rax), %rsi
movq %rsi, %rcx
subq %r14, %rcx
movq %rsi, %rdx
testq %rcx, %rcx
je 0x48b2
leaq 0x1(%rdx), %rsi
incq %rcx
cmpb $0x0, (%rdx)
je 0x489e
cmpq %r14, %rdx
jb 0x49e0
cmpb $0x2c, (%r15)
jne 0x49e0
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 0x4a65
cmpl $0x0, 0x78(%rbx)
sete %al
movq 0x30(%rbx), %rcx
testq %rcx, %rcx
setne %dl
andb %al, %dl
cmpb $0x1, %dl
jne 0x49ef
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 0x4a46
movq 0x28(%rbx), %rax
movsbl (%rax,%rbp), %esi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x4a84
movq %rax, %r13
cmpl $0x0, 0x78(%rbx)
jne 0x49fc
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 0x49a0
movups 0x8(%rsp), %xmm0
movups %xmm0, (%rsi)
addq $0x10, 0x50(%rbx)
jmp 0x49ab
movq %r15, %rdi
movq %r12, %rdx
callq 0x40a2
addq $0x3, %r13
andq $-0x4, %r13
addq %r13, %r14
incq %rbp
cmpl $0x0, 0x78(%rbx)
sete %al
movq 0x30(%rbx), %rcx
jne 0x49f1
cmpq %rcx, %rbp
jb 0x4925
jmp 0x49f1
cmpl $0x0, 0x78(%rbx)
jne 0x4a37
movl $0x1, 0x78(%rbx)
jmp 0x4a37
cmpl $0x0, 0x78(%rbx)
jne 0x4a37
movl $0x2, 0x78(%rbx)
jmp 0x4a37
xorl %ebp, %ebp
cmpq %rcx, %rbp
jae 0x4a12
testb %al, %al
jne 0x4a30
jmp 0x4a37
incq %rbp
cmpq 0x30(%rbx), %rbp
jb 0x4a37
addq $0x3, %r13
andq $-0x4, %r13
addq %r13, %r14
xorl %eax, %eax
movq 0x60(%rbx), %rsi
movq 0x68(%rbx), %rcx
xorl %edx, %edx
subq %rsi, %rcx
cmovneq %rsi, %rdx
testb %al, %al
je 0x4a37
leaq (%rdx,%rcx), %rax
cmpq %rax, %r14
je 0x4a37
movl $0x3, 0x78(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x195d(%rip), %rdi      # 0x63aa
leaq 0x185d(%rip), %rsi      # 0x62b1
leaq 0x1964(%rip), %rcx      # 0x63bf
movl $0x17e, %edx            # imm = 0x17E
callq 0x2150
leaq 0x193e(%rip), %rdi      # 0x63aa
leaq 0x183e(%rip), %rsi      # 0x62b1
leaq 0x1945(%rip), %rcx      # 0x63bf
movl $0x17b, %edx            # imm = 0x17B
callq 0x2150