// File: /workspace/github_c_makefile_star2_O0/mruby-zest[P]osc-bridge/src/bridge.c
// Function: cache_set
static int cache_set(bridge_t *br, uri_t uri, char type, rtosc_arg_t val, int skip_debounce)
{
    param_cache_t *line = cache_get(br, uri);
    assert(line);
    line->pending = false;
    if(!line->valid || line->type != type || memcmp(&line->val, &val, sizeof(val)))
    {
        if(line->type == 'v')
            declone_vec_value(line->vec_type, line->vec_value);
        else
            declone_value(line->type, line->val);
        line->valid = true;
        line->type  = type;
        line->val   = clone_value(type, val);
        line->requests = 0;

        //check if cache line is currently debounced...
        int debounced = false;
        for(int i=0; i<br->debounce_len; ++i)
            if(!strcmp(br->bounce[i].path, line->path))
                debounced = true;

        if(!debounced || skip_debounce)
            run_callbacks(br, line);

        return true;
    }
    return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movb %dl, %al
movq %rcx, -0x18(%rbp)
movq %r8, -0x10(%rbp)
movq %rdi, -0x20(%rbp)
movq %rsi, -0x28(%rbp)
movb %al, -0x29(%rbp)
movl %r9d, -0x30(%rbp)
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x3580
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
je 0x372b
jmp 0x374a
leaq 0x8ce7(%rip), %rdi      # 0xc419
leaq 0x8ad6(%rip), %rsi      # 0xc20f
movl $0x77, %edx
leaq 0x8d18(%rip), %rcx      # 0xc45d
callq 0x2120
movq -0x38(%rbp), %rax
movb 0x8(%rax), %cl
andb $-0x3, %cl
orb $0x0, %cl
movb %cl, 0x8(%rax)
movq -0x38(%rbp), %rax
movb 0x8(%rax), %al
shlb $0x7, %al
sarb $0x7, %al
cmpb $0x0, %al
je 0x37a6
movq -0x38(%rbp), %rax
movsbl 0x9(%rax), %eax
movsbl -0x29(%rbp), %ecx
cmpl %ecx, %eax
jne 0x37a6
movq -0x38(%rbp), %rax
addq $0x20, %rax
movups (%rax), %xmm0
movups -0x18(%rbp), %xmm1
pcmpeqb %xmm1, %xmm0
pmovmskb %xmm0, %eax
subl $0xffff, %eax           # imm = 0xFFFF
setne %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x38c1
movq -0x38(%rbp), %rax
movsbl 0x9(%rax), %eax
cmpl $0x76, %eax
jne 0x37ca
movq -0x38(%rbp), %rax
movq 0x20(%rax), %rdi
movq -0x38(%rbp), %rax
movq 0x28(%rax), %rsi
callq 0x2d40
jmp 0x37e5
movq -0x38(%rbp), %rax
movb 0x9(%rax), %al
movq -0x38(%rbp), %rcx
movq 0x20(%rcx), %rsi
movq 0x28(%rcx), %rdx
movsbl %al, %edi
callq 0x2dc0
movq -0x38(%rbp), %rax
movb 0x8(%rax), %cl
andb $-0x2, %cl
orb $0x1, %cl
movb %cl, 0x8(%rax)
movb -0x29(%rbp), %cl
movq -0x38(%rbp), %rax
movb %cl, 0x9(%rax)
movq -0x38(%rbp), %rax
movq %rax, -0x58(%rbp)
movb -0x29(%rbp), %al
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rdx
movsbl %al, %edi
callq 0x4ff0
movq %rax, %rcx
movq -0x58(%rbp), %rax
movq %rcx, -0x48(%rbp)
movq %rdx, -0x40(%rbp)
movq -0x48(%rbp), %rcx
movq %rcx, 0x20(%rax)
movq -0x40(%rbp), %rcx
movq %rcx, 0x28(%rax)
movq -0x38(%rbp), %rax
movl $0x0, 0x18(%rax)
movl $0x0, -0x4c(%rbp)
movl $0x0, -0x50(%rbp)
movl -0x50(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl 0x124(%rcx), %eax
jge 0x389f
movq -0x20(%rbp), %rax
movq 0x108(%rax), %rax
movslq -0x50(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rdi
movq -0x38(%rbp), %rax
movq (%rax), %rsi
callq 0x21a0
cmpl $0x0, %eax
jne 0x3892
movl $0x1, -0x4c(%rbp)
jmp 0x3894
movl -0x50(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x50(%rbp)
jmp 0x3852
cmpl $0x0, -0x4c(%rbp)
je 0x38ab
cmpl $0x0, -0x30(%rbp)
je 0x38b8
movq -0x20(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x4ad0
movl $0x1, -0x4(%rbp)
jmp 0x38c8
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)