// File: /workspace/github_c_makefile_star2_O1/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 0x2d8e
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 0x4f0(%rip), %r15       # 0x3053
leaq -0x40(%rbx), %r13
movq %r13, %rdi
movq %r15, %rsi
callq 0x11e0
testl %eax, %eax
je 0x2c14
movq %r13, %rdi
leaq 0x4e7(%rip), %rsi       # 0x306b
callq 0x11e0
testl %eax, %eax
je 0x2c59
movq %r13, %rdi
leaq 0x50f(%rip), %rsi       # 0x30aa
callq 0x11e0
testl %eax, %eax
je 0x2cb0
movq %r13, %rdi
leaq 0x50f(%rip), %rsi       # 0x30c1
callq 0x11e0
testl %eax, %eax
je 0x2d01
movq %r13, %rdi
leaq 0x507(%rip), %rsi       # 0x30d0
callq 0x11e0
testl %eax, %eax
je 0x2d36
movq %r13, %rdi
leaq 0x4a3(%rip), %rsi       # 0x3083
callq 0x11e0
testl %eax, %eax
je 0x2d81
movq %r13, %rdi
leaq 0x4f1(%rip), %rsi       # 0x30e8
callq 0x11e0
testl %eax, %eax
jne 0x2da5
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1745
jmp 0x2d6b
movq %rbx, %rdi
callq 0x11b0
movl %eax, %r13d
leal -0x3e9(%r13), %ecx
movl $0x186a7, %eax          # imm = 0x186A7
cmpl $0xfffff82f, %ecx       # imm = 0xFFFFF82F
jb 0x2d6b
movq %r14, %rsi
callq 0x137c
movq 0x264a(%rip), %rcx      # 0x5290
cltq
imulq $0x10a8, %rax, %rax     # imm = 0x10A8
movl %r13d, 0x34(%rcx,%rax)
jmp 0x2d69
movq %rbx, %rdi
callq 0x1110
xorps %xmm1, %xmm1
cvtsd2ss %xmm0, %xmm1
movaps %xmm1, %xmm0
andps 0x39e(%rip), %xmm0      # 0x3010
movl $0x186a7, %eax          # imm = 0x186A7
ucomiss 0x3b2(%rip), %xmm0      # 0x3030
ja 0x2d6b
movq %r14, %rsi
movaps %xmm1, -0x40(%rbp)
callq 0x137c
movq 0x25f9(%rip), %rcx      # 0x5290
cltq
imulq $0x10a8, %rax, %rax     # imm = 0x10A8
movapd -0x40(%rbp), %xmm0
movss %xmm0, 0x3c(%rcx,%rax)
jmp 0x2d69
movq %rbx, %rdi
callq 0x1110
movapd %xmm0, %xmm1
andpd 0x35c(%rip), %xmm1      # 0x3020
movl $0x186a7, %eax          # imm = 0x186A7
ucomisd 0x367(%rip), %xmm1      # 0x3038
ja 0x2d6b
movq %r14, %rsi
movapd %xmm0, -0x40(%rbp)
callq 0x137c
movq 0x25a5(%rip), %rcx      # 0x5290
cltq
imulq $0x10a8, %rax, %rax     # imm = 0x10A8
movapd -0x40(%rbp), %xmm0
movsd %xmm0, 0x48(%rcx,%rax)
jmp 0x2d69
movq %rbx, %rdi
callq 0x11b0
movl %eax, %r13d
movl $0x186a7, %eax          # imm = 0x186A7
cmpl $0x4, %r13d
ja 0x2d6b
movq %r14, %rsi
callq 0x137c
movq 0x256a(%rip), %rcx      # 0x5290
cltq
imulq $0x10a8, %rax, %rax     # imm = 0x10A8
movl %r13d, 0x58(%rcx,%rax)
jmp 0x2d69
movq %rbx, %rdi
callq 0x11b0
movl %eax, %r13d
movl $0x186a7, %eax          # imm = 0x186A7
cmpl $0x1, %r13d
ja 0x2d6b
movq %r14, %rsi
callq 0x137c
movq 0x2535(%rip), %rcx      # 0x5290
cltq
imulq $0x10a8, %rax, %rax     # imm = 0x10A8
movb %r13b, 0x60(%rcx,%rax)
xorl %eax, %eax
testl %eax, %eax
jne 0x2d96
addq $0x844, %rbx            # imm = 0x844
decq %r12
jne 0x2b63
jmp 0x2d94
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1676
jmp 0x2d6b
movl $0x186a0, %eax          # imm = 0x186A0
retq
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x404(%rip), %rdi       # 0x31b0
movq %rbx, %rsi
xorl %eax, %eax
callq 0x1030
movl $0x1a9ca, %eax          # imm = 0x1A9CA
jmp 0x2d96