// File: /workspace/github_c_makefile_star2_O3/back1127[P]linkedge-thing-access-websocket_client_sdk/sdk/test/linux/simulated_device.c
// Function: cb_set_property
static int cb_set_property(const char *pk, const char *dn,
                                       const leda_device_data_t properties[], 
                                       int properties_count, 
                                       void *usr_data)
{
    int ret = LE_ERROR_UNKNOWN, i;

    for (i = 0; i < properties_count; i++) {
        if (strcmp(properties[i].key, PROPERTY_INT32_RW) == 0) {
            ret = set_dev_int32_rw(pk, dn, atoi(properties[i].value));
        } else if (strcmp(properties[i].key, PROPERTY_FLOAT_RW) == 0) {
            ret = set_dev_float_rw(pk, dn, atof(properties[i].value));
        }else if (strcmp(properties[i].key, PROPERTY_DOUBLE_RW) == 0) {
            ret = set_dev_double_rw(pk, dn, atof(properties[i].value));
        } else if (strcmp(properties[i].key, PROPERTY_ENUM_RW) == 0) {
            ret = set_dev_enum_rw(pk, dn, atoi(properties[i].value));
        } else if (strcmp(properties[i].key, PROPERTY_BOOL_RW) == 0) {
            ret = set_dev_bool_rw(pk, dn, atoi(properties[i].value));
        } else if (strcmp(properties[i].key, PROPERTY_STRING_RW) == 0) {
            ret = set_dev_string_rw(pk, dn, properties[i].value);
        } else if (strcmp(properties[i].key, PROPERTY_DATE_RW) == 0) {
            ret = set_dev_date_rw(pk, dn, properties[i].value);
        } else {
            printf("property %s is not exist!\n", properties[i].value);
            return LEDA_ERROR_PROPERTY_NOT_EXIST;
        }
        if (ret != LE_SUCCESS) {
            break;
        }
    }
    if (ret == LE_SUCCESS) {
        //send_signal_property_changed(pk, dn);
    }
    return ret;
}

// Assembly:
testl %ecx, %ecx
jle 0x2d67
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movl %ecx, %r12d
addq $0x44, %rbx
leaq 0x4f9(%rip), %r15       # 0x3053
leaq -0x40(%rbx), %r13
movq %r13, %rdi
movq %r15, %rsi
callq 0x11d0
testl %eax, %eax
je 0x2c0b
movq %r13, %rdi
leaq 0x4f0(%rip), %rsi       # 0x306b
callq 0x11d0
testl %eax, %eax
je 0x2c4a
movq %r13, %rdi
leaq 0x518(%rip), %rsi       # 0x30aa
callq 0x11d0
testl %eax, %eax
je 0x2c9b
movq %r13, %rdi
leaq 0x518(%rip), %rsi       # 0x30c1
callq 0x11d0
testl %eax, %eax
je 0x2ce6
movq %r13, %rdi
leaq 0x510(%rip), %rsi       # 0x30d0
callq 0x11d0
testl %eax, %eax
je 0x2d15
movq %r13, %rdi
leaq 0x4ac(%rip), %rsi       # 0x3083
callq 0x11d0
testl %eax, %eax
je 0x2d44
movq %r13, %rdi
leaq 0x4fa(%rip), %rsi       # 0x30e8
callq 0x11d0
testl %eax, %eax
jne 0x2d81
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1745
jmp 0x2d4f
movq %rbx, %rdi
callq 0x11a0
movl %eax, %r13d
leal -0x3e9(%r13), %eax
cmpl $0xfffff82f, %eax       # imm = 0xFFFFF82F
jb 0x2d6d
movq %r14, %rsi
callq 0x137c
movq 0x2659(%rip), %rcx      # 0x5290
cltq
imulq $0x10a8, %rax, %rax     # imm = 0x10A8
movl %r13d, 0x34(%rcx,%rax)
jmp 0x2d53
movq %rbx, %rdi
callq 0x1100
xorps %xmm1, %xmm1
cvtsd2ss %xmm0, %xmm1
movaps %xmm1, %xmm0
andps 0x3ad(%rip), %xmm0      # 0x3010
ucomiss 0x3c6(%rip), %xmm0      # 0x3030
ja 0x2d6d
movq %r14, %rsi
movaps %xmm1, -0x40(%rbp)
callq 0x137c
movq 0x260d(%rip), %rcx      # 0x5290
cltq
imulq $0x10a8, %rax, %rax     # imm = 0x10A8
movaps -0x40(%rbp), %xmm0
movss %xmm0, 0x3c(%rcx,%rax)
jmp 0x2d53
movq %rbx, %rdi
callq 0x1100
movapd %xmm0, %xmm1
andpd 0x371(%rip), %xmm1      # 0x3020
ucomisd 0x381(%rip), %xmm1      # 0x3038
ja 0x2d6d
movq %r14, %rsi
movapd %xmm0, -0x40(%rbp)
callq 0x137c
movq 0x25bf(%rip), %rcx      # 0x5290
cltq
imulq $0x10a8, %rax, %rax     # imm = 0x10A8
movaps -0x40(%rbp), %xmm0
movsd %xmm0, 0x48(%rcx,%rax)
jmp 0x2d53
movq %rbx, %rdi
callq 0x11a0
cmpl $0x4, %eax
ja 0x2d6d
movl %eax, %r13d
movq %r14, %rsi
callq 0x137c
movq 0x258b(%rip), %rcx      # 0x5290
cltq
imulq $0x10a8, %rax, %rax     # imm = 0x10A8
movl %r13d, 0x58(%rcx,%rax)
jmp 0x2d53
movq %rbx, %rdi
callq 0x11a0
cmpl $0x1, %eax
ja 0x2d6d
movl %eax, %r13d
movq %r14, %rsi
callq 0x137c
movq 0x255c(%rip), %rcx      # 0x5290
cltq
imulq $0x10a8, %rax, %rax     # imm = 0x10A8
movb %r13b, 0x60(%rcx,%rax)
jmp 0x2d53
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1676
testl %eax, %eax
jne 0x2d72
addq $0x844, %rbx            # imm = 0x844
decq %r12
jne 0x2b5a
xorl %eax, %eax
jmp 0x2d72
movl $0x186a0, %eax          # imm = 0x186A0
retq
movl $0x186a7, %eax          # imm = 0x186A7
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x428(%rip), %rdi       # 0x31b0
movq %rbx, %rsi
xorl %eax, %eax
callq 0x1030
movl $0x1a9ca, %eax          # imm = 0x1A9CA
jmp 0x2d72