LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/mruby-zest[P]osc-bridge/src/bridge.c
// Function: br_refresh
void br_refresh(bridge_t *br, uri_t uri)
{
    param_cache_t *cline = cache_get(br, uri);

    uv_update_time(br->loop);
    double now = 1e-3*uv_now(br->loop);

    if(cline->request_time < now) {
        cline->request_time = now;
        osc_request(br, uri);
    } else {
        //printf("skipping refresh for %s at dt = %f\n", uri, cline->request_time-now);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x3171
movq %rax, %r15
movq (%r14), %rdi
callq 0x2290
movq (%r14), %rdi
callq 0x2170
movq %rax, %xmm1
punpckldq 0x5534(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x553c(%rip), %xmm1     # 0x9020
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
mulsd 0x5538(%rip), %xmm0     # 0x9030
ucomisd 0x10(%r15), %xmm0
jbe 0x3b1b
movsd %xmm0, 0x10(%r15)
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x3a5a
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/mruby-zest[P]osc-bridge/src/bridge.c
// Function: br_force_refresh
void br_force_refresh(bridge_t *br, uri_t uri)
{
    param_cache_t *cline = cache_get(br, uri);

    uv_update_time(br->loop);
    double now = 1e-3*uv_now(br->loop);

    if(cline->request_time < now) {
        cline->request_time = now;
        osc_request(br, uri);
        cline->force_refresh = 0;
    } else {
        cline->request_time = now;
        cline->force_refresh = 1;
        //printf("skipping refresh for %s at dt = %f\n", uri, cline->request_time-now);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x3171
movq %rax, %r15
movq (%r14), %rdi
callq 0x2290
movq (%r14), %rdi
callq 0x2170
movq %rax, %xmm0
punpckldq 0x54b5(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x54bd(%rip), %xmm0     # 0x9020
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
mulsd 0x54b9(%rip), %xmm1     # 0x9030
ucomisd 0x10(%r15), %xmm1
movsd %xmm1, 0x10(%r15)
jbe 0x3b97
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3a5a
andb $-0x9, 0x8(%r15)
jmp 0x3b9c
orb $0x8, 0x8(%r15)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/mruby-zest[P]osc-bridge/src/bridge.c
// Function: br_pending
int br_pending(bridge_t *br)
{
    int pending = 0;
    for(int i=0; i<br->cache_len; ++i)
        pending += !!(br->cache[i].pending);
    return pending;
}

// Assembly:
movslq 0x120(%rdi), %rax
testq %rax, %rax
jle 0x3c8a
pushq %rbp
movq %rsp, %rbp
movq 0x100(%rdi), %rcx
shlq $0x4, %rax
leaq (%rax,%rax,2), %rdx
xorl %esi, %esi
xorl %eax, %eax
btl $0x1, 0x8(%rcx,%rsi)
adcl $0x0, %eax
addq $0x30, %rsi
cmpq %rsi, %rdx
jne 0x3c76
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/mruby-zest[P]osc-bridge/src/bridge.c
// Function: print_stats
void print_stats(bridge_t *br, schema_t sch)
{
    printf("Bridge Statistics:\n");
    printf("    Total cache lines:          %d\n", br->cache_len);
    printf("    Total callbacks:            %d\n", br->callback_len);
    printf("Schema Statistics:\n");
    printf("    Known Parameters Patterns:  %d\n", sch.elements);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x5388(%rip), %rdi      # 0x94fc
callq 0x2080
movl 0x120(%rbx), %esi
leaq 0x5108(%rip), %rdi      # 0x928e
xorl %eax, %eax
callq 0x20f0
movl 0x128(%rbx), %esi
leaq 0x5118(%rip), %rdi      # 0x92b2
xorl %eax, %eax
callq 0x20f0
leaq 0x5367(%rip), %rdi      # 0x950f
callq 0x2080
movl 0x20(%rbp), %esi
leaq 0x511f(%rip), %rdi      # 0x92d6
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x20f0
// File: /workspace/github_c_makefile_star2_O3/mruby-zest[P]osc-bridge/src/bridge.c
// Function: clone_value
static rtosc_arg_t
clone_value(char type, rtosc_arg_t val)
{
    if(type == 'b') {
        char *data = (char*)val.b.data;
        val.b.data = malloc(val.b.len);
        memcpy(val.b.data, data, val.b.len);
    } else if(type == 's') {
        val.s = strdup(val.s);
    }
    return val;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
cmpl $0x73, %edi
je 0x4223
cmpl $0x62, %edi
jne 0x422e
movslq %r14d, %r15
movq %r15, %rdi
callq 0x2200
movq %rax, %r12
movq %rax, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x21e0
movq %r12, %rbx
jmp 0x422e
movq %r14, %rdi
callq 0x22c0
movq %rax, %r14
movq %r14, %rax
movq %rbx, %rdx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/mruby-zest[P]osc-bridge/src/mm_json.h
// Function: mm_json_stoi
static mm_json_number
mm_json_stoi(struct mm_json_token *tok)
{
    mm_json_number n = 0;
    mm_json_size i = 0;
    mm_json_size off;
    mm_json_size neg;
    if (!tok->str || !tok->len)
        return 0;

    off = (tok->str[0] == '-' || tok->str[0] == '+') ? 1 : 0;
    neg = (tok->str[0] == '-') ? 1 : 0;
    for (i = off; i < tok->len; i++) {
        if ((tok->str[i] >= '0') && (tok->str[i] <= '9'))
            n = (n * 10) + tok->str[i]  - '0';
    }
    return (neg) ? -n : n;
}

// Assembly:
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
xorpd %xmm0, %xmm0
jne 0x4738
movb (%rdi), %al
leal -0x2b(%rax), %edx
xorl %ecx, %ecx
testb $-0x3, %dl
sete %cl
cmpq %rsi, %rcx
jae 0x4727
xorpd %xmm3, %xmm3
movsd 0x4eb6(%rip), %xmm1     # 0x95a0
movsd 0x4eb6(%rip), %xmm2     # 0x95a8
movapd %xmm3, %xmm0
movsbl (%rdi,%rcx), %edx
leal -0x30(%rdx), %r8d
xorps %xmm4, %xmm4
cvtsi2sd %edx, %xmm4
mulsd %xmm1, %xmm0
addsd %xmm4, %xmm0
addsd %xmm2, %xmm0
cmpb $0xa, %r8b
jb 0x471b
movapd %xmm3, %xmm0
incq %rcx
movapd %xmm0, %xmm3
cmpq %rcx, %rsi
jne 0x46f6
cmpb $0x2d, %al
jne 0x4738
pushq %rbp
movq %rsp, %rbp
xorpd 0x4e39(%rip), %xmm0     # 0x9570
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/mruby-zest[P]osc-bridge/src/mm_json.h
// Function: mm_json_cmp
MM_JSON_API mm_json_int
mm_json_cmp(const struct mm_json_token* tok, const mm_json_char* str)
{
    mm_json_size i;
    MM_JSON_ASSERT(tok);
    MM_JSON_ASSERT(str);
    if (!tok || !str) return 1;
    for (i = 0; (i < tok->len && *str); i++, str++){
        if (tok->str[i] != *str)
            return 1;
    }
    return 0;
}

// Assembly:
testq %rdi, %rdi
sete %cl
testq %rsi, %rsi
sete %dl
movl $0x1, %eax
orb %cl, %dl
jne 0x47e1
movq 0x8(%rdi), %rcx
testq %rcx, %rcx
je 0x47df
pushq %rbp
movq %rsp, %rbp
xorl %edx, %edx
movb (%rsi,%rdx), %r8b
testb %r8b, %r8b
je 0x47db
movq (%rdi), %r9
cmpb %r8b, (%r9,%rdx)
jne 0x47dd
incq %rdx
cmpq %rdx, %rcx
jne 0x47c1
xorl %eax, %eax
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/mruby-zest[P]osc-bridge/src/mm_json.h
// Function: mm_json_begin
MM_JSON_API struct mm_json_iter
mm_json_begin(const mm_json_char *str, mm_json_size len)
{
    struct mm_json_iter iter = MM_JSON_ITER_NULL;
    mm_json_init();
    iter.src = str;
    iter.len = len;
    return iter;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
callq 0x4240
movq %r14, 0x10(%r15)
movq %rbx, 0x18(%r15)
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/mruby-zest[P]osc-bridge/src/mm_json.h
// Function: mm_json_type
static enum mm_json_token_type
mm_json_type(const struct mm_json_token *tok)
{
    if (!tok || !tok->str || !tok->len)
        return MM_JSON_NONE;
    if (tok->str[0] == '{')
        return MM_JSON_OBJECT;
    if (tok->str[0] == '[')
        return MM_JSON_ARRAY;
    if (tok->str[0] == '\"')
        return MM_JSON_STRING;
    if (tok->str[0] == 't')
        return MM_JSON_TRUE;
    if (tok->str[0] == 'f')
        return MM_JSON_FALSE;
    if (tok->str[0] == 'n')
        return MM_JSON_NULL;
    return MM_JSON_NUMBER;
}

// Assembly:
movq (%rdi), %rcx
xorl %eax, %eax
testq %rcx, %rcx
je 0x4c58
cmpq $0x0, 0x8(%rdi)
je 0x4c58
pushq %rbp
movq %rsp, %rbp
movzbl (%rcx), %ecx
cmpl $0x6d, %ecx
jg 0x4c22
cmpl $0x22, %ecx
je 0x4c3d
cmpl $0x5b, %ecx
je 0x4c4b
cmpl $0x66, %ecx
jne 0x4c36
movl $0x6, %eax
jmp 0x4c57
cmpl $0x6e, %ecx
je 0x4c44
cmpl $0x74, %ecx
je 0x4c52
movl $0x1, %eax
cmpl $0x7b, %ecx
je 0x4c57
movl $0x3, %eax
jmp 0x4c57
movl $0x4, %eax
jmp 0x4c57
movl $0x7, %eax
jmp 0x4c57
movl $0x2, %eax
jmp 0x4c57
movl $0x5, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/mruby-zest[P]osc-bridge/src/mm_json.h
// Function: mm_json_parse
MM_JSON_API struct mm_json_iter
mm_json_parse(struct mm_json_pair *p, const struct mm_json_iter* it)
{
    struct mm_json_iter next;
    MM_JSON_ASSERT(p);
    MM_JSON_ASSERT(it);
    next = mm_json_read(&p->name, it);
    if (next.err) return next;
    return mm_json_read(&p->value, &next);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x38(%rbp), %r15
movq %r15, %rdi
callq 0x4816
cmpl $0x0, (%r15)
je 0x4c8f
movups -0x38(%rbp), %xmm0
movups -0x28(%rbp), %xmm1
movups %xmm1, 0x10(%rbx)
movups %xmm0, (%rbx)
jmp 0x4ca2
addq $0x28, %r14
leaq -0x38(%rbp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4816
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/mruby-zest[P]osc-bridge/src/mm_json.h
// Function: mm_json_num
MM_JSON_API mm_json_size
mm_json_num(const mm_json_char *json, mm_json_size length)
{
    struct mm_json_iter iter;
    struct mm_json_token tok;
    mm_json_size count = 0;

    MM_JSON_ASSERT(json);
    MM_JSON_ASSERT(length);
    if (!json || !length)
        return 0;

    iter = mm_json_begin(json, length);
    iter = mm_json_read(&tok, &iter);
    while (!iter.err) {
        count += (1 + tok.sub);
        iter = mm_json_read(&tok, &iter);
    }
    return count;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x70, %rsp
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
jne 0x4d19
movq %rsi, %rbx
movq %rdi, %r14
xorps %xmm0, %xmm0
leaq -0x40(%rbp), %r15
movaps %xmm0, (%r15)
callq 0x4240
movq %r14, 0x10(%r15)
movq %rbx, 0x18(%r15)
leaq -0x60(%rbp), %rbx
leaq -0x88(%rbp), %rsi
movq %rbx, %rdi
movq %r15, %rdx
callq 0x4816
movups (%rbx), %xmm0
movups 0x10(%rbx), %xmm1
movaps %xmm1, 0x10(%r15)
movaps %xmm0, (%r15)
cmpl $0x0, (%r15)
je 0x4d2b
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x70, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
xorl %ebx, %ebx
leaq -0x60(%rbp), %r14
leaq -0x88(%rbp), %r15
leaq -0x40(%rbp), %r12
movq -0x70(%rbp), %rax
addq %rax, %rbx
incq %rbx
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x4816
movups -0x60(%rbp), %xmm0
movups -0x50(%rbp), %xmm1
movaps %xmm1, -0x30(%rbp)
movaps %xmm0, -0x40(%rbp)
cmpl $0x0, -0x40(%rbp)
je 0x4d3c
jmp 0x4d1b
// File: /workspace/github_c_makefile_star2_O3/mruby-zest[P]osc-bridge/src/mm_json.h
// Function: mm_json_path_parse_name
static const mm_json_char*
mm_json_path_parse_name(struct mm_json_token *tok, const mm_json_char *path,
    mm_json_char delimiter)
{
    const mm_json_char *del;
    const mm_json_char *begin, *end;
    if (!path || *path == '\0')
        return NULL;

    tok->str = path;
    del = mm_json_strchr(tok->str, delimiter, -1);
    begin = mm_json_strchr(tok->str, '[', -1);
    end = mm_json_strchr(tok->str, ']', -1);

    /* array part left */
    if (begin && end && begin == tok->str) {
        tok->len = (mm_json_size)((end - begin) + 1);
        if (*(end + 1) == '\0')
            return NULL;
        if (*(end + 1) == '.')
            return(end + 2);
        else return(end + 1);
    }

    /* only array after name */
    if (begin < del) {
        tok->len = (mm_json_size)(begin - tok->str);
        return begin;
    }

    if (!del) return NULL;
    if (*del == '\0') {
        tok->len = (mm_json_size)(del - tok->str);
        return NULL;
    }
    tok->len = (mm_json_size)(del - tok->str);
    return del+1;
}

// Assembly:
cmpb $0x0, (%rsi)
je 0x53a0
pushq %rbp
movq %rsp, %rbp
movq %rsi, (%rdi)
movb (%rsi), %r8b
movq %rsi, %r9
testb %r8b, %r8b
je 0x537f
movl %r8d, %eax
movq %rsi, %rcx
cmpb %dl, %al
je 0x5342
movb 0x1(%rcx), %al
incq %rcx
testb %al, %al
jne 0x5334
movl %r8d, %edx
movq %rsi, %rax
cmpb $0x5b, %dl
je 0x5357
movb 0x1(%rax), %dl
incq %rax
testb %dl, %dl
jne 0x5348
movq %rsi, %r9
cmpb $0x5d, %r8b
je 0x536c
movb 0x1(%r9), %r8b
incq %r9
testb %r8b, %r8b
jne 0x535a
movq %rax, %rdx
subq %rsi, %rdx
je 0x537f
cmpq %rcx, %rax
jae 0x53af
movq %rdx, 0x8(%rdi)
jmp 0x53c6
movq %r9, %rax
subq %rsi, %rax
incq %rax
movq %rax, 0x8(%rdi)
movzbl 0x1(%r9), %eax
testl %eax, %eax
je 0x53a3
cmpl $0x2e, %eax
jne 0x53a7
addq $0x2, %r9
jmp 0x53aa
xorl %eax, %eax
retq
xorl %eax, %eax
jmp 0x53c6
incq %r9
movq %r9, %rax
jmp 0x53c6
movq %rcx, %rdx
subq %rsi, %rdx
xorl %eax, %eax
cmpb $0x0, (%rcx)
leaq 0x1(%rcx), %rcx
movq %rdx, 0x8(%rdi)
cmovneq %rcx, %rax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/mruby-zest[P]osc-bridge/src/mm_json.h
// Function: mm_json_query_number_del
MM_JSON_API mm_json_int
mm_json_query_number_del(mm_json_number *num, struct mm_json_token *toks, mm_json_size count,
    const mm_json_char *path, mm_json_char del)
{
    struct mm_json_token *tok;
    MM_JSON_ASSERT(toks);
    MM_JSON_ASSERT(count);
    MM_JSON_ASSERT(num);
    MM_JSON_ASSERT(path);
    if (!toks || !count || !num || !path)
        return MM_JSON_NONE;

    tok = mm_json_query_del(toks, count, path, del);
    if (!tok) return MM_JSON_NONE;
    if (tok->type != MM_JSON_NUMBER)
        return tok->type;
    return mm_json_convert(num, tok);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
xorl %ebx, %ebx
testq %rcx, %rcx
je 0x5427
movq %rdi, %r14
testq %rdi, %rdi
je 0x5427
testq %rsi, %rsi
je 0x5427
testq %rdx, %rdx
je 0x5427
movsbl %r8b, %eax
movq %rsi, %rdi
movq %rdx, %rsi
movq %rcx, %rdx
movl %eax, %ecx
callq 0x4f08
testq %rax, %rax
je 0x5427
movl 0x20(%rax), %ebx
cmpl $0x3, %ebx
jne 0x5427
movq %r14, %rdi
movq %rax, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x4450
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/mruby-zest[P]osc-bridge/src/mm_json.h
// Function: mm_json_query_string_del
MM_JSON_API mm_json_int
mm_json_query_string_del(mm_json_char *buffer, mm_json_size max, mm_json_size *size,
    struct mm_json_token *toks, mm_json_size count, const mm_json_char *path, mm_json_char del)
{
    struct mm_json_token *tok;
    MM_JSON_ASSERT(toks);
    MM_JSON_ASSERT(count);
    MM_JSON_ASSERT(buffer);
    MM_JSON_ASSERT(size);
    MM_JSON_ASSERT(path);
    if (!toks || !count || !buffer || !size || !path)
        return MM_JSON_NONE;

    tok = mm_json_query_del(toks, count, path, del);
    if (!tok) return MM_JSON_NONE;
    if (tok->type != MM_JSON_STRING)
        return tok->type;
    *size = mm_json_cpy(buffer, max, tok);
    return tok->type;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
xorl %r12d, %r12d
testq %r9, %r9
je 0x54f0
movq %rdx, %rbx
testq %rdx, %rdx
je 0x54f0
movq %rdi, %r15
testq %rdi, %rdi
je 0x54f0
testq %rcx, %rcx
je 0x54f0
testq %r8, %r8
je 0x54f0
movq %rsi, %r14
movsbl 0x10(%rbp), %eax
movq %rcx, %rdi
movq %r8, %rsi
movq %r9, %rdx
movl %eax, %ecx
callq 0x4f08
testq %rax, %rax
je 0x54f0
movl 0x20(%rax), %r12d
cmpl $0x4, %r12d
jne 0x54f0
testq %r14, %r14
je 0x54e4
movq 0x8(%rax), %rdx
leaq 0x1(%rdx), %rsi
leaq -0x1(%r14), %rcx
cmpq %r14, %rsi
cmovbeq %rdx, %r14
cmovbeq %rdx, %rcx
testq %rcx, %rcx
je 0x54d9
movl $0x1, %edx
xorl %esi, %esi
movq (%rax), %rdi
movb (%rdi,%rsi), %dil
movb %dil, (%r15,%rsi)
movl %edx, %esi
incl %edx
cmpq %rsi, %rcx
ja 0x54c5
movb $0x0, (%r15,%rcx)
movl 0x20(%rax), %r12d
jmp 0x54ed
movl $0x4, %r12d
xorl %r14d, %r14d
movq %r14, (%rbx)
movl %r12d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/mruby-zest[P]osc-bridge/src/mm_json.h
// Function: mm_json_query_type_del
MM_JSON_API mm_json_int
mm_json_query_type_del(struct mm_json_token *toks, mm_json_size count, const mm_json_char *path,
    mm_json_char del)
{
    struct mm_json_token *tok;
    MM_JSON_ASSERT(toks);
    MM_JSON_ASSERT(count);
    MM_JSON_ASSERT(path);
    if (!toks || !count || !path)
        return MM_JSON_NONE;

    tok = mm_json_query_del(toks, count, path, del);
    if (!tok) return MM_JSON_NONE;
    return tok->type;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %r8b
orb %al, %r8b
testq %rdx, %rdx
sete %al
xorl %ebx, %ebx
orb %r8b, %al
jne 0x5549
movsbl %cl, %ecx
callq 0x4f08
testq %rax, %rax
je 0x5549
movl 0x20(%rax), %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/mruby-zest[P]osc-bridge/src/parse-schema.c
// Function: parse_range
void parse_range(schema_handle_t *handle, const char *str, int len)
{
    struct mm_json_iter array = mm_json_begin(str, len);
    struct mm_json_token tok;
    array = mm_json_read(&tok, &array);
    if(!array.src) {
        fprintf(stdout, "[WARNING] Unexpected range termination in parse_range()\n");
        return;
    }

    if(tok.type == MM_JSON_NUMBER)
        handle->value_min = atof(tok.str);
    else
        fprintf(stdout, "[WARNING] Unexpected Range Type %d For Min\n", tok.type);

    array = mm_json_read(&tok, &array);
    if(!array.src) {
        fprintf(stdout, "[WARNING] Unexpected range termination in parse_range() P2\n");
        return;
    }

    if(tok.type == MM_JSON_NUMBER)
        handle->value_max = atof(tok.str);
    else
        fprintf(stdout, "[WARNING] Unexpected Range Type %d For Max\n", tok.type);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x70, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movslq %edx, %r12
xorps %xmm0, %xmm0
leaq -0x70(%rbp), %r15
movaps %xmm0, (%r15)
callq 0x4240
movq %r14, 0x10(%r15)
movq %r12, 0x18(%r15)
leaq -0x90(%rbp), %r14
leaq -0x48(%rbp), %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x4816
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movaps %xmm1, 0x10(%r15)
movaps %xmm0, (%r15)
cmpq $0x0, 0x10(%r15)
je 0x593c
movl -0x28(%rbp), %edx
cmpl $0x3, %edx
jne 0x5954
movq -0x48(%rbp), %rdi
callq 0x20b0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x4c(%rbx)
jmp 0x596c
movq 0x7695(%rip), %rax      # 0xcfd8
movq (%rax), %rcx
leaq 0x3d37(%rip), %rdi      # 0x9684
movl $0x38, %esi
jmp 0x59c6
movq 0x767d(%rip), %rax      # 0xcfd8
movq (%rax), %rdi
leaq 0x3d58(%rip), %rsi      # 0x96bd
xorl %eax, %eax
callq 0x21b0
leaq -0x48(%rbp), %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x4816
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movaps %xmm1, 0x10(%r15)
movaps %xmm0, (%r15)
cmpq $0x0, 0x10(%r15)
je 0x59b0
movl -0x28(%rbp), %edx
cmpl $0x3, %edx
jne 0x59d2
movq -0x48(%rbp), %rdi
callq 0x20b0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x50(%rbx)
jmp 0x59ea
movq 0x7621(%rip), %rax      # 0xcfd8
movq (%rax), %rcx
leaq 0x3d28(%rip), %rdi      # 0x96e9
movl $0x3b, %esi
movl $0x1, %edx
callq 0x22b0
jmp 0x59ea
movq 0x75ff(%rip), %rax      # 0xcfd8
movq (%rax), %rdi
leaq 0x3d42(%rip), %rsi      # 0x9725
xorl %eax, %eax
callq 0x21b0
addq $0x70, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/mruby-zest[P]osc-bridge/src/schema.c
// Function: br_destroy_schema
void br_destroy_schema(schema_t sch)
{
    free(sch.json);
    for(int i=0; i<sch.elements; ++i) {
        if(sch.handles[i].opts) {
            free(sch.handles[i].opts->ids);
            for(size_t j=0; j<sch.handles[i].opts->num_opts; ++j)
                free((void*)sch.handles[i].opts->labels[j]);
            free(sch.handles[i].opts->labels);
        }
        free((void*)sch.handles[i].documentation);
        free((void*)sch.handles[i].name);
        free((void*)sch.handles[i].short_name);
        free((void*)sch.handles[i].pattern);
        free((void*)sch.handles[i].default_);
        free(sch.handles[i].opts);
    }
    free(sch.handles);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x10(%rbp), %rdi
callq 0x2030
movslq 0x20(%rbp), %rax
movq 0x18(%rbp), %rbx
movq %rax, -0x30(%rbp)
testq %rax, %rax
jle 0x6392
xorl %r15d, %r15d
imulq $0x58, %r15, %r13
leaq (%rbx,%r13), %r12
addq $0x8, %r12
movq (%r12), %rax
testq %rax, %rax
je 0x634a
movq (%rax), %rdi
callq 0x2030
movq (%r12), %rax
cmpl $0x0, 0x10(%rax)
je 0x6341
xorl %r14d, %r14d
movq 0x8(%rax), %rax
movq (%rax,%r14,8), %rdi
callq 0x2030
incq %r14
movq (%r12), %rax
movl 0x10(%rax), %ecx
cmpq %rcx, %r14
jb 0x6325
movq 0x8(%rax), %rdi
callq 0x2030
movq 0x30(%rbx,%r13), %rdi
callq 0x2030
movq 0x18(%rbx,%r13), %rdi
callq 0x2030
movq 0x20(%rbx,%r13), %rdi
callq 0x2030
movq 0x10(%rbx,%r13), %rdi
callq 0x2030
movq 0x40(%rbx,%r13), %rdi
callq 0x2030
movq (%r12), %rdi
callq 0x2030
incq %r15
cmpq -0x30(%rbp), %r15
jne 0x62fb
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2030
// File: /workspace/github_c_makefile_star2_O3/mruby-zest[P]osc-bridge/rtosc/rtosc.c
// Function: rtosc_argument_string
const char *rtosc_argument_string(const char *msg)
{
    assert(msg && *msg);
    while(*++msg); //skip pattern
    while(!*++msg);//skip null
    return msg+1;  //skip comma
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testq %rdi, %rdi
je 0x66a0
cmpb $0x0, (%rdi)
je 0x66a0
incq %rdi
cmpb $0x0, (%rdi)
leaq 0x1(%rdi), %rdi
jne 0x6689
cmpb $0x0, (%rdi)
leaq 0x1(%rdi), %rdi
je 0x6692
movq %rdi, %rax
popq %rbp
retq
leaq 0x3421(%rip), %rdi      # 0x9ac8
leaq 0x3426(%rip), %rsi      # 0x9ad4
leaq 0x342d(%rip), %rcx      # 0x9ae2
movl $0xd, %edx
callq 0x2130
// File: /workspace/github_c_makefile_star2_O3/mruby-zest[P]osc-bridge/rtosc/rtosc.c
// Function: rtosc_narguments
unsigned rtosc_narguments(const char *msg)
{
    const char *args = rtosc_argument_string(msg);
    int nargs = 0;
    while(*args++)
        nargs += (*args == ']' || *args == '[') ? 0 : 1;
    return nargs;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
callq 0x6678
cmpb $0x0, (%rax)
je 0x66eb
incq %rax
xorl %ecx, %ecx
movb (%rax), %dl
leal -0x5b(%rdx), %esi
andb $-0x3, %sil
cmpb $0x1, %sil
sbbl $-0x1, %ecx
incq %rax
testb %dl, %dl
jne 0x66d2
jmp 0x66ed
xorl %ecx, %ecx
movl %ecx, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/mruby-zest[P]osc-bridge/rtosc/rtosc.c
// Function: rtosc_type
char rtosc_type(const char *msg, unsigned nargument)
{
    assert(nargument < rtosc_narguments(msg));
    const char *arg = rtosc_argument_string(msg);
    while(1) {
        if(*arg == '[' || *arg == ']')
            ++arg;
        else if(!nargument || !*arg)
            return *arg;
        else
            ++arg, --nargument;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
callq 0x66bf
cmpl %ebx, %eax
jbe 0x6731
movq %r14, %rdi
callq 0x6678
movzbl (%rax), %ecx
cmpl $0x5b, %ecx
je 0x6725
cmpl $0x5d, %ecx
je 0x6725
testl %ebx, %ebx
je 0x672a
testb %cl, %cl
je 0x672a
decl %ebx
incq %rax
jmp 0x670e
movl %ecx, %eax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x33da(%rip), %rdi      # 0x9b12
leaq 0x3395(%rip), %rsi      # 0x9ad4
leaq 0x33ee(%rip), %rcx      # 0x9b34
movl $0x45, %edx
callq 0x2130
// File: /workspace/github_c_makefile_star2_O3/mruby-zest[P]osc-bridge/rtosc/rtosc.c
// Function: nreserved
static unsigned nreserved(const char *args)
{
    unsigned res = 0;
    for(;*args;++args)
        res += has_reserved(*args);

    return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
movabsq $0x708d70002000, %rcx   # imm = 0x708D70002000
movl $0xa04109, %edx         # imm = 0xA04109
movzbl (%rdi), %esi
leal -0x46(%rsi), %r9d
cmpl $0x2e, %r9d
ja 0x6ac9
movl $0x1, %r8d
btq %r9, %rcx
jb 0x6ac1
btq %r9, %rdx
jae 0x6ac9
xorl %r8d, %r8d
addl %r8d, %eax
incq %rdi
jmp 0x6a9f
testl %esi, %esi
jne 0x6abe
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/mruby-zest[P]osc-bridge/rtosc/rtosc.c
// Function: rtosc_itr_begin
rtosc_arg_itr_t rtosc_itr_begin(const char *msg)
{
    rtosc_arg_itr_t itr;
    itr.type_pos  = advance_past_dummy_args(rtosc_argument_string(msg));
    itr.value_pos = (uint8_t*)(msg+arg_start(msg));

    return itr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x6678
movq %rax, %r14
movzbl (%r14), %eax
cmpl $0x5d, %eax
je 0x6f34
cmpl $0x5b, %eax
jne 0x6f39
incq %r14
jmp 0x6f26
movq %rbx, %rdi
callq 0x6678
movq %rax, %rcx
subq %rbx, %rcx
addq $0x4, %rcx
movl $0x1, %edx
incq %rcx
cmpb $0x0, (%rax,%rdx)
leaq 0x1(%rdx), %rdx
jne 0x6f50
leal 0x3(%rdx), %eax
testq %rdx, %rdx
cmovnsl %edx, %eax
andl $-0x4, %eax
subl %edx, %eax
addl %eax, %ecx
addq %rcx, %rbx
movq %r14, %rax
movq %rbx, %rdx
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/mruby-zest[P]osc-bridge/rtosc/rtosc.c
// Function: rtosc_itr_next
rtosc_arg_val_t rtosc_itr_next(rtosc_arg_itr_t *itr)
{
    //current position provides the value
    rtosc_arg_val_t result = {0,{0}};
    result.type = *itr->type_pos;
    if(result.type)
        result.val = extract_arg(itr->value_pos, result.type);

    //advance
    itr->type_pos = advance_past_dummy_args(itr->type_pos+1);
    char type = result.type;
    int size  = arg_size(itr->value_pos, type);
    itr->value_pos += size;


    return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq (%rsi), %r12
movb (%r12), %al
movb %al, (%rdi)
movsbl %al, %r15d
testb %al, %al
je 0x6fbf
movq 0x8(%rbx), %rdi
movl %r15d, %esi
callq 0x6ff8
movq %rax, 0x8(%r14)
movq %rdx, 0x10(%r14)
incq %r12
movzbl (%r12), %eax
cmpl $0x5d, %eax
je 0x6fbf
cmpl $0x5b, %eax
je 0x6fbf
movq %r12, (%rbx)
movq 0x8(%rbx), %r12
movq %r12, %rdi
movl %r15d, %esi
callq 0x7113
cltq
addq %r12, %rax
movq %rax, 0x8(%rbx)
movq %r14, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/mruby-zest[P]osc-bridge/rtosc/rtosc.c
// Function: arg_size
static unsigned arg_size(const uint8_t *arg_mem, char type)
{
    if(!has_reserved(type))
        return 0;
    const uint8_t  *arg_pos=arg_mem;
    uint32_t blob_length = 0;
    switch(type)
    {
        case 'h':
        case 't':
        case 'd':
            return 8;
        case 'm':
        case 'r':
        case 'f':
        case 'c':
        case 'i':
            return 4;
        case 'S':
        case 's':
            while(*++arg_pos);
            arg_pos += 4-(arg_pos-arg_mem)%4;
            return arg_pos-arg_mem;
        case 'b':
            blob_length |= (*arg_pos++ << 24);
            blob_length |= (*arg_pos++ << 16);
            blob_length |= (*arg_pos++ << 8);
            blob_length |= (*arg_pos++);
            if(blob_length%4)
                blob_length += 4-blob_length%4;
            arg_pos += blob_length;
            return arg_pos-arg_mem;
        default:
            assert("Invalid Type");
    }
    return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
leal -0x53(%rsi), %ecx
cmpl $0x21, %ecx
ja 0x71ba
movabsq $0x3846b8001, %rdx      # imm = 0x3846B8001
btq %rcx, %rdx
jae 0x71ba
movsbl %sil, %ecx
leal -0x62(%rcx), %eax
cmpl $0x12, %eax
ja 0x7163
leaq 0x28e4(%rip), %rcx      # 0x9a30
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x4, %eax
jmp 0x71ba
movl $0x8, %eax
jmp 0x71ba
cmpl $0x53, %ecx
jne 0x7183
xorl %ecx, %ecx
cmpb $0x0, 0x1(%rdi,%rcx)
leaq 0x1(%rcx), %rcx
jne 0x716a
leal 0x3(%rcx), %eax
testq %rcx, %rcx
cmovnsl %ecx, %eax
andl $-0x4, %eax
jmp 0x71b7
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x71ba
movzbl (%rdi), %eax
shll $0x18, %eax
movzbl 0x1(%rdi), %ecx
shll $0x10, %ecx
orl %eax, %ecx
movzbl 0x2(%rdi), %edx
shll $0x8, %edx
orl %ecx, %edx
movzbl 0x3(%rdi), %ecx
orl %ecx, %edx
andl $0x3, %ecx
movl %edx, %eax
subl %ecx, %eax
addl $0x4, %eax
testl %ecx, %ecx
cmovel %edx, %eax
addl $0x4, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/mruby-zest[P]osc-bridge/rtosc/rtosc.c
// Function: bundle_ring_length
static size_t bundle_ring_length(ring_t *ring)
{
    unsigned pos = 8+8;//goto first length field
    uint32_t advance = 0;
    do {
        advance = deref(pos+0, ring) << (8*3) |
                  deref(pos+1, ring) << (8*2) |
                  deref(pos+2, ring) << (8*1) |
                  deref(pos+3, ring) << (8*0);
        if(advance)
            pos += 4+advance;
    } while(advance);

    return pos <= (ring[0].len+ring[1].len) ? pos : 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq 0x8(%rdi), %rcx
leaq 0x10(%rdi), %rax
movl $0x10, %esi
movl %esi, %edx
movq %rdx, %r10
movq %rdi, %r8
movq %rdx, %r9
subq %rcx, %r10
jb 0x77d0
xorl %esi, %esi
movq %rax, %r8
movq %r10, %r9
cmpq 0x18(%rdi), %r10
jae 0x77db
movq (%r8), %rsi
movzbl (%rsi,%r9), %esi
shll $0x18, %esi
leal 0x1(%rdx), %r9d
movq %r9, %r11
movq %rdi, %r10
subq %rcx, %r11
jb 0x77f9
xorl %r8d, %r8d
movq %rax, %r10
movq %r11, %r9
cmpq 0x18(%rdi), %r11
jae 0x7805
movq (%r10), %r8
movzbl (%r8,%r9), %r8d
shll $0x10, %r8d
leal 0x2(%rdx), %r10d
movq %r10, %rbx
movq %rdi, %r11
subq %rcx, %rbx
jb 0x7823
xorl %r9d, %r9d
movq %rax, %r11
movq %rbx, %r10
cmpq 0x18(%rdi), %rbx
jae 0x782f
movq (%r11), %r9
movzbl (%r9,%r10), %r9d
shll $0x8, %r9d
leal 0x3(%rdx), %r10d
movq %r10, %r14
movq %rdi, %rbx
subq %rcx, %r14
jb 0x784d
xorl %r11d, %r11d
movq %rax, %rbx
movq %r14, %r10
cmpq 0x18(%rdi), %r14
jae 0x7855
movq (%rbx), %r11
movzbl (%r11,%r10), %r11d
orl %esi, %r8d
orl %r9d, %r8d
orl %r11d, %r8d
leal 0x4(%rdx,%r8), %esi
jne 0x77b2
addq 0x18(%rdi), %rcx
xorl %eax, %eax
cmpq %rdx, %rcx
cmovaeq %rdx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/mruby-zest[P]osc-bridge/rtosc/rtosc.c
// Function: rtosc_valid_message_p
bool rtosc_valid_message_p(const char *msg, size_t len)
{
    //Validate Path Characters (assumes printable characters are sufficient)
    if(*msg != '/')
        return false;
    const char *tmp = msg;
    for(unsigned i=0; i<len; ++i) {
        if(*tmp == 0)
            break;
        if(!isprint(*tmp))
            return false;
        tmp++;
    }

    //tmp is now either pointing to a null or the end of the string
    const size_t offset1 = tmp-msg;
    size_t       offset2 = tmp-msg;
    for(; offset2<len; offset2++) {
        if(*tmp == ',')
            break;
        tmp++;
    }

    //Too many NULL bytes
    if(offset2-offset1 > 4)
        return false;

    if((offset2 % 4) != 0)
        return false;

    size_t observed_length = rtosc_message_length(msg, len);
    return observed_length == len;
}

// Assembly:
cmpb $0x2f, (%rdi)
jne 0x7952
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq %rdi, %rax
testq %rsi, %rsi
je 0x78f8
callq 0x22f0
movq (%rax), %rcx
movb $0x2f, %dl
movl $0x1, %esi
movsbq %dl, %rdx
testb $0x40, 0x1(%rcx,%rdx,2)
je 0x7955
movq %rsi, %rax
movl %eax, %edx
cmpq %rbx, %rdx
jae 0x78f5
movb (%r14,%rax), %dl
leaq 0x1(%rax), %rsi
testb %dl, %dl
jne 0x78d4
addq %r14, %rax
movq %rax, %rcx
subq %r14, %rcx
movq %rcx, %rdx
cmpq %rbx, %rcx
jae 0x791c
movq %rcx, %rdx
cmpb $0x2c, (%rax)
je 0x791c
incq %rax
incq %rdx
cmpq %rbx, %rdx
jb 0x7909
movq %rbx, %rdx
movq %rdx, %rax
subq %rcx, %rax
cmpq $0x5, %rax
setae %al
testb $0x3, %dl
setne %cl
orb %al, %cl
jne 0x7955
leaq -0x30(%rbp), %rdi
movq %r14, (%rdi)
movq %rbx, 0x8(%rdi)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rdi)
callq 0x72ba
cmpq %rbx, %rax
sete %al
jmp 0x7957
xorl %eax, %eax
retq
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/mruby-zest[P]osc-bridge/rtosc/rtosc.c
// Function: rtosc_bundle_elements
size_t rtosc_bundle_elements(const char *buffer, size_t len)
{
    const uint32_t *lengths = (const uint32_t*) (buffer+16);
    size_t elms = 0;
    while(POS < len && extract_uint32((const uint8_t*)lengths)) {
        lengths += extract_uint32((const uint8_t*)lengths)/4+1;

        if(POS > len)
            break;
        ++elms;
    }
    return elms;
}

// Assembly:
cmpq $0x11, %rsi
jb 0x7b02
pushq %rbp
movq %rsp, %rbp
leaq 0x10(%rdi), %rcx
xorl %eax, %eax
movl (%rcx), %edx
bswapl %edx
testl %edx, %edx
je 0x7b00
andl $-0x4, %edx
addq %rdx, %rcx
addq $0x4, %rcx
movq %rcx, %rdx
subq %rdi, %rdx
cmpq %rsi, %rdx
ja 0x7b00
incq %rax
cmpq %rsi, %rdx
jb 0x7adb
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/mruby-zest[P]osc-bridge/rtosc/rtosc.c
// Function: rtosc_bundle_fetch
const char *rtosc_bundle_fetch(const char *buffer, unsigned elm)
{
    const uint32_t *lengths = (const uint32_t*) (buffer+16);
    size_t elm_pos = 0;
    while(elm_pos!=elm && extract_uint32((const uint8_t*)lengths)) {
        ++elm_pos;
        lengths += extract_uint32((const uint8_t*)lengths)/4+1;
    }

    return (const char*) (elm==elm_pos?lengths+1:NULL);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, %rax
addq $0x10, %rax
testl %esi, %esi
je 0x7b2d
movl %esi, %ecx
movl (%rax), %edx
bswapl %edx
testl %edx, %edx
je 0x7b33
andl $-0x4, %edx
addq %rdx, %rax
addq $0x4, %rax
decq %rcx
jne 0x7b16
addq $0x4, %rax
jmp 0x7b35
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/mruby-zest[P]osc-bridge/rtosc/rtosc.c
// Function: rtosc_bundle_size
size_t rtosc_bundle_size(const char *buffer, unsigned elm)
{
    const uint32_t *lengths = (const uint32_t*) (buffer+16);
    size_t elm_pos = 0;
    size_t last_len = 0;
    while(elm_pos!=elm && extract_uint32((const uint8_t*)lengths)) {
        last_len = extract_uint32((const uint8_t*)lengths);
        ++elm_pos, lengths+=extract_uint32((const uint8_t*)lengths)/4+1;
    }

    return last_len;
}

// Assembly:
testl %esi, %esi
je 0x7b6d
movl 0x10(%rdi), %ecx
bswapl %ecx
testl %ecx, %ecx
je 0x7b6d
pushq %rbp
movq %rsp, %rbp
movl %esi, %eax
addq $0x10, %rdi
movl %ecx, %edx
decq %rax
je 0x7b69
movl %edx, %ecx
andl $-0x4, %ecx
addq %rcx, %rdi
addq $0x4, %rdi
movl (%rdi), %ecx
bswapl %ecx
testl %ecx, %ecx
jne 0x7b4e
movl %edx, %eax
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/mruby-zest[P]osc-bridge/test/common.h
// Function: assert_int_eq
int assert_int_eq(int a, int b, const char *testcase, int line)
{
    test_counter++;
    int err = a!=b;
    if(err) {
        printf("not ok %d - %s...\n", test_counter, testcase);
        printf("# Expected %d, but observed %d instead (line %d)\n", a, b, line);
        global_err++;
    } else
        printf("ok %d - %s...\n", test_counter, testcase);
    return err;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movl %edi, %r14d
movl 0x5c87(%rip), %esi      # 0xd834
incl %esi
movl %esi, 0x5c7f(%rip)      # 0xd834
cmpl %ebx, %edi
je 0x7be8
movl %ecx, %r15d
leaq 0x20ad(%rip), %rdi      # 0x9c70
xorl %eax, %eax
callq 0x20f0
leaq 0x20b2(%rip), %rdi      # 0x9c83
movl %r14d, %esi
movl %ebx, %edx
movl %r15d, %ecx
xorl %eax, %eax
callq 0x20f0
incl 0x5c4a(%rip)            # 0xd830
jmp 0x7bf6
leaq 0x2085(%rip), %rdi      # 0x9c74
xorl %eax, %eax
callq 0x20f0
xorl %eax, %eax
cmpl %ebx, %r14d
setne %al
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/mruby-zest[P]osc-bridge/test/common.h
// Function: assert_char_eq
int assert_char_eq(char a, char b, const char *testcase, int line)
{
    test_counter++;
    int err = a!=b;
    if(err) {
        printf("not ok %d - %s...\n", test_counter, testcase);
        printf("# Expected %c, but observed %c instead (line %d)\n", a, b, line);
        global_err++;
    } else
        printf("ok %d - %s...\n", test_counter, testcase);
    return err;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movl %edi, %r14d
movl 0x5c12(%rip), %esi      # 0xd834
incl %esi
movl %esi, 0x5c0a(%rip)      # 0xd834
cmpb %bl, %r14b
je 0x7c67
movl %ecx, %r15d
movsbl %bl, %r12d
movsbl %r14b, %r13d
leaq 0x202f(%rip), %rdi      # 0x9c70
xorl %eax, %eax
callq 0x20f0
leaq 0x2066(%rip), %rdi      # 0x9cb5
movl %r13d, %esi
movl %r12d, %edx
movl %r15d, %ecx
xorl %eax, %eax
callq 0x20f0
incl 0x5bcb(%rip)            # 0xd830
jmp 0x7c75
leaq 0x2006(%rip), %rdi      # 0x9c74
xorl %eax, %eax
callq 0x20f0
xorl %eax, %eax
cmpb %bl, %r14b
setne %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/mruby-zest[P]osc-bridge/test/common.h
// Function: assert_true
int assert_true(int a, const char *testcase, int line)
{
    test_counter++;
    int err = !a;
    if(err) {
        printf("not ok %d - %s...\n", test_counter, testcase);
        printf("# Failure on line %d\n", line);
        global_err++;
    } else
        printf("ok %d - %s...\n", test_counter, testcase);
    return err;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %edx, %r14d
movq %rsi, %rdx
movl %edi, %ebx
movl 0x5b93(%rip), %esi      # 0xd834
incl %esi
movl %esi, 0x5b8b(%rip)      # 0xd834
testl %edi, %edi
je 0x7cbd
leaq 0x1fc0(%rip), %rdi      # 0x9c74
xorl %eax, %eax
callq 0x20f0
jmp 0x7ce2
leaq 0x1fac(%rip), %rdi      # 0x9c70
xorl %eax, %eax
callq 0x20f0
leaq 0x2015(%rip), %rdi      # 0x9ce7
movl %r14d, %esi
xorl %eax, %eax
callq 0x20f0
incl 0x5b4e(%rip)            # 0xd830
xorl %eax, %eax
testl %ebx, %ebx
sete %al
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/mruby-zest[P]osc-bridge/test/common.h
// Function: assert_str_eq
int assert_str_eq(const char *a, const char *b, const char *testcase, int line)
{
    test_counter++;
    int err = strcmp(a,b);
    if(err) {
        printf("not ok %d - %s...\n", test_counter, testcase);
        printf("# Expected '%s', but observed '%s' instead (line %d)\n", a, b, line);
        global_err++;
    } else
        printf("ok %d - %s...\n", test_counter, testcase);
    return err;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, -0x2c(%rbp)
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
movl 0x5b12(%rip), %r14d     # 0xd834
incl %r14d
movl %r14d, 0x5b08(%rip)     # 0xd834
callq 0x21a0
movl %eax, %ebx
testl %eax, %eax
je 0x7d6a
leaq 0x1f32(%rip), %rdi      # 0x9c70
movl %r14d, %esi
movq %r15, %rdx
xorl %eax, %eax
callq 0x20f0
leaq 0x1fab(%rip), %rdi      # 0x9cfd
movq %r13, %rsi
movq %r12, %rdx
movl -0x2c(%rbp), %ecx
xorl %eax, %eax
callq 0x20f0
incl 0x5ac8(%rip)            # 0xd830
jmp 0x7d7e
leaq 0x1f03(%rip), %rdi      # 0x9c74
movl %r14d, %esi
movq %r15, %rdx
xorl %eax, %eax
callq 0x20f0
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/mruby-zest[P]osc-bridge/test/common.h
// Function: assert_non_null
int assert_non_null(const void *v, const char *testcase, int line)
{
    test_counter++;
    int err = !v;
    if(err) {
        printf("not ok %d - %s...\n", test_counter, testcase);
        printf("# Expected Non-NULL value, but observed NULL instead (line %d)\n", line);
        global_err++;
    } else
        printf("ok %d - %s...\n", test_counter, testcase);
    return err;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %edx, %r14d
movq %rsi, %rdx
movq %rdi, %rbx
movl 0x5a8f(%rip), %esi      # 0xd834
incl %esi
movl %esi, 0x5a87(%rip)      # 0xd834
testq %rdi, %rdi
je 0x7dc2
leaq 0x1ebb(%rip), %rdi      # 0x9c74
xorl %eax, %eax
callq 0x20f0
jmp 0x7de7
leaq 0x1ea7(%rip), %rdi      # 0x9c70
xorl %eax, %eax
callq 0x20f0
leaq 0x1f5c(%rip), %rdi      # 0x9d33
movl %r14d, %esi
xorl %eax, %eax
callq 0x20f0
incl 0x5a49(%rip)            # 0xd830
xorl %eax, %eax
testq %rbx, %rbx
sete %al
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/mruby-zest[P]osc-bridge/test/common.h
// Function: assert_f32_eq
int assert_f32_eq(float a, float b,const char *testcase, int line)
{
    test_counter++;
    int err = a!=b;
    if(err) {
        printf("not ok %d - %s...\n", test_counter, testcase);
        printf("# Expected %f, but observed %f instead (line %d)\n", a, b, line);
        global_err++;
    } else
        printf("ok %d - %s...\n", test_counter, testcase);
    return err;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %rdx
movl 0x5a2f(%rip), %esi      # 0xd834
incl %esi
movl %esi, 0x5a27(%rip)      # 0xd834
movss %xmm1, -0x10(%rbp)
movss %xmm0, -0xc(%rbp)
ucomiss %xmm1, %xmm0
jne 0x7e1e
jnp 0x7e54
leaq 0x1e4b(%rip), %rdi      # 0x9c70
xorl %eax, %eax
callq 0x20f0
xorps %xmm0, %xmm0
cvtss2sd -0xc(%rbp), %xmm0
xorps %xmm1, %xmm1
cvtss2sd -0x10(%rbp), %xmm1
leaq 0x1f30(%rip), %rdi      # 0x9d73
movl %ebx, %esi
movb $0x2, %al
callq 0x20f0
incl 0x59de(%rip)            # 0xd830
jmp 0x7e62
leaq 0x1e19(%rip), %rdi      # 0x9c74
xorl %eax, %eax
callq 0x20f0
movss -0xc(%rbp), %xmm0
cmpneqss -0x10(%rbp), %xmm0
movd %xmm0, %eax
andl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/mruby-zest[P]osc-bridge/test/common.h
// Function: assert_hex_eq
int assert_hex_eq(const char *a, const char *b, size_t size_a, size_t size_b,
                  const char *testcase, int line)
{
    test_counter++;
    int err = (size_a != size_b) || memcmp(a, b, size_a);
    if(err) {
        printf("not ok %d - %s...\n", test_counter, testcase);
        printf("# Error on line %d\n", line);
        //printf("# Expected '%s', but observed '%s' instead (line %d)\n", a, b, line);

        //create difference mask
        const int longer  = size_a > size_b ? size_a : size_b;
        const int shorter = size_a < size_b ? size_a : size_b;
        char mask[longer];
        memset(mask, 0, longer);
        for(int i=0; i<shorter; ++i)
            if(a[i] != b[i])
                mask[i] = 1;

        printf("#\n");
        printf("# Expected:\n");
        hexdump(a, mask, size_a);
        printf("#\n");
        printf("# Observed:\n");
        hexdump(b, mask, size_b);

        global_err++;
    } else
        printf("ok %d - %s...\n", test_counter, testcase);
    return err;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, -0x38(%rbp)
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %r12
movl 0x5803(%rip), %r13d     # 0xd834
incl %r13d
movl %r13d, 0x57f9(%rip)     # 0xd834
cmpq %rcx, %rdx
jne 0x805e
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %r8, -0x30(%rbp)
callq 0x2220
movq -0x30(%rbp), %r8
testl %eax, %eax
je 0x8149
leaq 0x1c0b(%rip), %rdi      # 0x9c70
movl %r13d, %esi
movq %r8, %rdx
xorl %eax, %eax
callq 0x20f0
leaq 0x1d46(%rip), %rdi      # 0x9dbf
movl -0x38(%rbp), %esi
xorl %eax, %eax
callq 0x20f0
cmpq %rbx, %r15
movq %rbx, %rax
cmovaq %r15, %rax
movq %rbx, -0x38(%rbp)
cmovbq %r15, %rbx
movq %rsp, -0x30(%rbp)
movl %eax, %ecx
addq $0xf, %rcx
andq $-0x10, %rcx
movq %rsp, %r13
subq %rcx, %r13
movq %r13, %rsp
movslq %eax, %rdx
movq %r13, %rdi
xorl %esi, %esi
callq 0x2140
testl %ebx, %ebx
jle 0x80dd
andl $0x7fffffff, %ebx       # imm = 0x7FFFFFFF
xorl %eax, %eax
movb (%r12,%rax), %cl
cmpb (%r14,%rax), %cl
je 0x80d5
movb $0x1, (%r13,%rax)
incq %rax
cmpq %rax, %rbx
jne 0x80c5
leaq 0x2002(%rip), %rbx      # 0xa0e6
movq %rbx, %rdi
callq 0x2080
leaq 0x1fe7(%rip), %rdi      # 0xa0da
callq 0x2080
movq %r12, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x7e7b
movq %rbx, %rdi
callq 0x2080
leaq 0x1fd3(%rip), %rdi      # 0xa0e8
callq 0x2080
movq %r14, %rdi
movq %r13, %rsi
movq -0x38(%rbp), %rdx
callq 0x7e7b
incl 0x5701(%rip)            # 0xd830
movl $0x1, %ebx
movq -0x30(%rbp), %rsp
movl %ebx, %eax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1b24(%rip), %rdi      # 0x9c74
xorl %ebx, %ebx
movl %r13d, %esi
movq %r8, %rdx
xorl %eax, %eax
callq 0x20f0
jmp 0x8138
// File: /workspace/github_c_makefile_star2_O3/mruby-zest[P]osc-bridge/test/basic-remote.c
// Function: print_response
void print_response(const char *osc, void *vv)
{
    char type = rtosc_type(osc, 0);
    //printf("[callback] got a message '%s':%c data=%p...\n", osc, type, v);

    rtosc_arg_t arg = rtosc_argument(osc, 0);

    if(!vv)
        return;
    void *v = *(void**)vv;


    if(type == 'i')
        *(int*)v = arg.i;
    else if(type == 'T')
        *(bool*)v = true;
    else if(type == 'F')
        *(bool*)v = false;
    else if(type == 'f')
        *(float*)v = arg.f;

    //if(type == 'i')
    //    printf("[callback] value = %d\n", arg.i);
    //else if(type == 'f')
    //    printf("[callback] value = %a\n", (double)arg.f);
    //else if(type == 'T')
    //    printf("[callback] value = true\n");
    //else if(type == 'F')
    //    printf("[callback] value = false\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r15
xorl %esi, %esi
callq 0x66f1
movl %eax, %r14d
movq %r15, %rdi
xorl %esi, %esi
callq 0x71d6
testq %rbx, %rbx
je 0x824a
movq (%rbx), %rcx
movzbl %r14b, %edx
cmpl $0x65, %edx
jg 0x8239
cmpl $0x46, %edx
je 0x8247
cmpl $0x54, %edx
jne 0x824a
movb $0x1, (%rcx)
jmp 0x824a
cmpl $0x66, %edx
je 0x8243
cmpl $0x69, %edx
jne 0x824a
movl %eax, (%rcx)
jmp 0x824a
movb $0x0, (%rcx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/mruby-zest[P]osc-bridge/test/basic-remote.c
// Function: test_lfo
void test_lfo(schema_t schema, bridge_t *bridge)
{
    for(unsigned i=0; i<sizeof(paths)/sizeof(paths[0]); ++i) {
        uri_t uri = paths[i];
        printf("#Testing address '%s'\n", uri);
        schema_handle_t handle = sm_get(schema, uri);

        assert_true(sm_valid(handle), "Verify Handle", __LINE__);

        //printf("(1#{%s} 2#{%s} 3#{%s} 4#{%s}\n",
        //sm_get_name(handle),    sm_get_short(handle),
        //sm_get_tooltip(handle), sm_get_units(handle));
        br_add_callback(bridge, uri, print_response, NULL);
        void **data = malloc(sizeof(void*));
        if(strstr(uri, "Pfreqrand")) {
            *data = &Pfreqrand;
            br_add_callback(bridge, uri, print_response, (void*)data);
        } else if(strstr(uri, "Pfreq")) {
            *data = &Pfreq;
            br_add_callback(bridge, uri, print_response, (void*)data);
        } else if(strstr(uri, "Pcontinous")) {
            *data = &Pcontinous;
            br_add_callback(bridge, uri, print_response, (void*)data);
        } else
            free(data);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rdi, %rbx
leaq -0x7e(%rip), %r14       # 0x81f5
xorl %r13d, %r13d
leaq 0x4f33(%rip), %rax      # 0xd1b0
movq (%r13,%rax), %r12
leaq 0x1d29(%rip), %rdi      # 0x9fb2
movq %r12, %rsi
xorl %eax, %eax
callq 0x20f0
leaq 0x10(%rbp), %rcx
movq 0x10(%rcx), %rax
movq %rax, 0x10(%rsp)
movups (%rcx), %xmm0
movups %xmm0, (%rsp)
leaq -0x80(%rbp), %r15
movq %r15, %rdi
movq %r12, %rsi
callq 0x63a8
movl $0xb, %ecx
movq %rsp, %rdi
movq %r15, %rsi
rep  movsq (%rsi), %es:(%rdi)
callq 0x6665
movl %eax, %edi
leaq 0x1cf7(%rip), %rsi      # 0x9fc9
movl $0x44, %edx
callq 0x7c8c
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0x34a7
movl $0x8, %edi
callq 0x2200
movq %rax, %r15
movq %r12, %rdi
leaq 0x1c1b(%rip), %rsi      # 0x9f1e
callq 0x22d0
testq %rax, %rax
je 0x8322
leaq 0x4e90(%rip), %rax      # 0xd1a4
movq %rax, (%r15)
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %rdx
jmp 0x836a
movq %r12, %rdi
leaq 0x1b07(%rip), %rsi      # 0x9e33
callq 0x22d0
testq %rax, %rax
je 0x833f
leaq 0x4e63(%rip), %rax      # 0xd1a0
jmp 0x835a
movq %r12, %rdi
leaq 0x1c30(%rip), %rsi      # 0x9f79
callq 0x22d0
testq %rax, %rax
je 0x8389
leaq 0x4e4e(%rip), %rax      # 0xd1a8
movq %rax, (%r15)
movq %rbx, %rdi
movq %r12, %rsi
leaq -0x175(%rip), %rdx      # 0x81f5
movq %r15, %rcx
callq 0x34a7
addq $0x8, %r13
cmpq $0x48, %r13
leaq -0x18c(%rip), %r14      # 0x81f5
jne 0x8276
jmp 0x8393
movq %r15, %rdi
callq 0x2030
jmp 0x8372
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq