// File: /workspace/github_c_makefile_star2_O2/mruby-zest[P]osc-bridge/src/schema.c
// Function: sm_get
schema_handle_t sm_get(schema_t sch, uri_t u)
{
    schema_handle_t invalid;
    memset(&invalid, 0, sizeof(invalid));
    invalid.flag = 0xdeadbeef;
    //printf("Getting a handle(%s)...\n", u);
    for(int i=0; i<sch.elements; ++i)
        if(match_path(u, sch.handles[i].pattern))
            return sch.handles[i];
    if(!(strstr(u, "VoicePar") && strstr(u, "Enabled")))
        printf("[WARNING:osc-bridge] Invalid Handle \"%s\"...\n", u);
    return invalid;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %rbx
movq %rdi, -0x38(%rbp)
movl 0x20(%rbp), %ecx
movq 0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
xorl %eax, %eax
testl %ecx, %ecx
cmovlel %eax, %ecx
movq %rcx, -0x58(%rbp)
movq %rsi, -0x48(%rbp)
cmpq -0x58(%rbp), %rax
je 0x5f9e
movq %rax, -0x60(%rbp)
imulq $0x58, %rax, %rcx
movq -0x40(%rbp), %rax
movq %rcx, -0x50(%rbp)
movq 0x10(%rax,%rcx), %r12
testq %r12, %r12
je 0x5f6a
movq -0x48(%rbp), %r13
movb (%r13), %r15b
testb %r15b, %r15b
je 0x5f7a
movzbl (%r12), %eax
cmpl $0x5b, %eax
je 0x5eb7
testl %eax, %eax
je 0x5f6a
cmpb %al, %r15b
jne 0x5f6a
incq %r13
jmp 0x5f62
callq 0x22f0
movq (%rax), %rbx
movsbq 0x1(%r12), %r14
testb $0x8, 0x1(%rbx,%r14,2)
je 0x6034
leaq 0x1(%r12), %rdi
callq 0x2280
addq $0x2, %r12
testb %r14b, %r14b
je 0x5ffe
movsbq %r14b, %rcx
testb $0x8, 0x1(%rbx,%rcx,2)
je 0x5efc
movb (%r12), %r14b
incq %r12
jmp 0x5edf
cmpb $0x2c, %r14b
jne 0x5ffe
movl %eax, %r14d
movq %r12, %rdi
callq 0x2280
movsbq (%r12), %rcx
testq %rcx, %rcx
je 0x6017
testb $0x8, 0x1(%rbx,%rcx,2)
je 0x5f2b
incq %r12
jmp 0x5f11
cmpb $0x5d, %cl
jne 0x6017
movl %eax, -0x2c(%rbp)
movq %r13, %rdi
callq 0x2280
testb %r15b, %r15b
je 0x5f58
movsbq %r15b, %rcx
testb $0x8, 0x1(%rbx,%rcx,2)
je 0x5f58
movb 0x1(%r13), %r15b
incq %r13
jmp 0x5f3f
cmpl %r14d, %eax
jl 0x5f6a
cmpl -0x2c(%rbp), %eax
jg 0x5f6a
incq %r12
jmp 0x5e87
movq -0x60(%rbp), %rax
incq %rax
movq -0x48(%rbp), %rbx
jmp 0x5e5b
movq -0x40(%rbp), %rsi
addq -0x50(%rbp), %rsi
pushq $0xb
popq %rcx
movq -0x38(%rbp), %rax
movq %rax, %rdi
rep  movsq (%rsi), %es:(%rdi)
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x286a(%rip), %rsi      # 0x880f
movq %rbx, %rdi
callq 0x22d0
testq %rax, %rax
je 0x5fc6
leaq 0x285f(%rip), %rsi      # 0x8818
movq %rbx, %rdi
callq 0x22d0
testq %rax, %rax
jne 0x5fd7
leaq 0x2853(%rip), %rdi      # 0x8820
movq %rbx, %rsi
xorl %eax, %eax
callq 0x20f0
movq -0x38(%rbp), %rax
movl $0xdeadbeef, (%rax)     # imm = 0xDEADBEEF
xorps %xmm0, %xmm0
movups %xmm0, 0x4(%rax)
movups %xmm0, 0x14(%rax)
movups %xmm0, 0x24(%rax)
movups %xmm0, 0x34(%rax)
movups %xmm0, 0x44(%rax)
andl $0x0, 0x54(%rax)
jmp 0x5f8f
leaq 0x2892(%rip), %rdi      # 0x8897
leaq 0x2853(%rip), %rsi      # 0x885f
leaq 0x2859(%rip), %rcx      # 0x886c
pushq $0x1d
jmp 0x602e
leaq 0x2889(%rip), %rdi      # 0x88a7
leaq 0x283a(%rip), %rsi      # 0x885f
leaq 0x2840(%rip), %rcx      # 0x886c
pushq $0x22
popq %rdx
callq 0x2130
leaq 0x2812(%rip), %rdi      # 0x884d
leaq 0x281d(%rip), %rsi      # 0x885f
leaq 0x2823(%rip), %rcx      # 0x886c
pushq $0x19
jmp 0x602e