// File: /workspace/github_c_makefile_star2_O2/back1127[P]linkedge-thing-access-websocket_client_sdk/sdk/test/linux/simulated_device.c
// Function: cb_get_property
static int cb_get_property(const char *pk, const char *dn,
                                       leda_device_data_t properties[], 
                                       int properties_count, 
                                       void *usr_data)
{
    int i;
    for (i = 0; i < properties_count; i++) {
        if (strcmp(properties[i].key, PROPERTY_INT32_RW) == 0) {
            snprintf(properties[i].value, MAX_PARAM_VALUE_LENGTH, "%d", get_dev_int32_rw(pk, dn));
            properties[i].type = LEDA_TYPE_INT;
        } else if (strcmp(properties[i].key, PROPERTY_INT32_R) == 0) {
            snprintf(properties[i].value, MAX_PARAM_VALUE_LENGTH, "%d", get_dev_int32_r(pk, dn));
            properties[i].type = LEDA_TYPE_INT;
        } else if (strcmp(properties[i].key, PROPERTY_FLOAT_RW) == 0) {
            snprintf(properties[i].value, MAX_PARAM_VALUE_LENGTH, "%f", get_dev_float_rw(pk, dn));
            properties[i].type = LEDA_TYPE_FLOAT;
        } else if (strcmp(properties[i].key, PROPERTY_FLOAT_R) == 0) {
            snprintf(properties[i].value, MAX_PARAM_VALUE_LENGTH, "%f", get_dev_float_r(pk, dn));
            properties[i].type = LEDA_TYPE_FLOAT;
        } else if (strcmp(properties[i].key, PROPERTY_DOUBLE_RW) == 0) {
            snprintf(properties[i].value, MAX_PARAM_VALUE_LENGTH, "%lf", get_dev_double_rw(pk, dn));
            properties[i].type = LEDA_TYPE_DOUBLE;
        } else if (strcmp(properties[i].key, PROPERTY_DOUBLE_R) == 0) {
            snprintf(properties[i].value, MAX_PARAM_VALUE_LENGTH, "%lf", get_dev_double_r(pk, dn));
            properties[i].type = LEDA_TYPE_DOUBLE;
        } else if (strcmp(properties[i].key, PROPERTY_ENUM_RW) == 0) {
            snprintf(properties[i].value, MAX_PARAM_VALUE_LENGTH, "%d", get_dev_enum_rw(pk, dn));
            properties[i].type = LEDA_TYPE_ENUM;
        } else if (strcmp(properties[i].key, PROPERTY_ENUM_R) == 0) {
            snprintf(properties[i].value, MAX_PARAM_VALUE_LENGTH, "%d", get_dev_enum_r(pk, dn));
            properties[i].type = LEDA_TYPE_ENUM;
        }  else if (strcmp(properties[i].key, PROPERTY_BOOL_RW) == 0) {
            snprintf(properties[i].value, MAX_PARAM_VALUE_LENGTH, "%d", get_dev_bool_rw(pk, dn));
            properties[i].type = LEDA_TYPE_BOOL;
        } else if (strcmp(properties[i].key, PROPERTY_BOOL_R) == 0) {
            snprintf(properties[i].value, MAX_PARAM_VALUE_LENGTH, "%d", get_dev_bool_r(pk, dn));
            properties[i].type = LEDA_TYPE_BOOL;
        } else if (strcmp(properties[i].key, PROPERTY_STRING_RW) == 0) {
            snprintf(properties[i].value, MAX_PARAM_VALUE_LENGTH, "%s", get_dev_string_rw(pk, dn));
            properties[i].type = LEDA_TYPE_TEXT;
        } else if (strcmp(properties[i].key, PROPERTY_STRING_R) == 0) {
            snprintf(properties[i].value, MAX_PARAM_VALUE_LENGTH, "%s", get_dev_string_r(pk, dn));
            properties[i].type = LEDA_TYPE_TEXT;
        }  else if (strcmp(properties[i].key, PROPERTY_DATE_RW) == 0) {
            snprintf(properties[i].value, MAX_PARAM_VALUE_LENGTH, "%s", get_dev_date_rw(pk, dn));
            properties[i].type = LEDA_TYPE_DATE;
        }   else if (strcmp(properties[i].key, PROPERTY_DATE_R) == 0) {
            snprintf(properties[i].value, MAX_PARAM_VALUE_LENGTH, "%s", get_dev_date_r(pk, dn));
            properties[i].type = LEDA_TYPE_DATE;
        } else {
            return LEDA_ERROR_PROPERTY_NOT_EXIST;
        }
    }

    return LE_SUCCESS;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %r14d
movq %rdx, %r15
movq %rsi, %r12
xorl %eax, %eax
testl %ecx, %ecx
cmovlel %eax, %r14d
addq $0x44, %r15
leaq 0xb30(%rip), %r13       # 0x3053
subq $0x1, %r14
jb 0x27d2
leaq -0x40(%r15), %rbx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x11d0
testl %eax, %eax
je 0x267c
movq %rbx, %rdi
leaq 0xb4c(%rip), %rsi       # 0x309a
callq 0x11d0
testl %eax, %eax
je 0x2686
movq %rbx, %rdi
leaq 0xb06(%rip), %rsi       # 0x306b
callq 0x11d0
testl %eax, %eax
je 0x26ad
movq %rbx, %rdi
leaq 0xb26(%rip), %rsi       # 0x30a2
callq 0x11d0
testl %eax, %eax
je 0x26b7
movq %rbx, %rdi
leaq 0xb17(%rip), %rsi       # 0x30aa
callq 0x11d0
testl %eax, %eax
je 0x26e0
movq %rbx, %rdi
leaq 0xb0e(%rip), %rsi       # 0x30b8
callq 0x11d0
testl %eax, %eax
je 0x26ea
movq %rbx, %rdi
leaq 0xb00(%rip), %rsi       # 0x30c1
callq 0x11d0
testl %eax, %eax
je 0x270f
movq %rbx, %rdi
leaq 0xaf1(%rip), %rsi       # 0x30c9
callq 0x11d0
testl %eax, %eax
je 0x2719
movq %rbx, %rdi
leaq 0xae1(%rip), %rsi       # 0x30d0
callq 0x11d0
testl %eax, %eax
je 0x2740
movq %rbx, %rdi
leaq 0xad2(%rip), %rsi       # 0x30d8
callq 0x11d0
testl %eax, %eax
je 0x274a
movq %rbx, %rdi
leaq 0xa66(%rip), %rsi       # 0x3083
callq 0x11d0
testl %eax, %eax
je 0x276f
movq %rbx, %rdi
leaq 0xaab(%rip), %rsi       # 0x30df
callq 0x11d0
testl %eax, %eax
je 0x2779
movq %rbx, %rdi
leaq 0xa9d(%rip), %rsi       # 0x30e8
callq 0x11d0
testl %eax, %eax
je 0x279e
movq %rbx, %rdi
leaq 0xa8e(%rip), %rsi       # 0x30f0
callq 0x11d0
testl %eax, %eax
jne 0x27e3
movq %r12, %rsi
callq 0x17ad
jmp 0x27a6
movq %r12, %rsi
callq 0x13d2
jmp 0x268e
movq %r12, %rsi
callq 0x142e
xorl %ebx, %ebx
movl $0x800, %esi            # imm = 0x800
movq %r15, %rdi
leaq 0x9bd(%rip), %rdx       # 0x305c
movl %eax, %ecx
xorl %eax, %eax
callq 0x1050
jmp 0x27c2
movq %r12, %rsi
callq 0x144d
jmp 0x26bf
movq %r12, %rsi
callq 0x14b9
cvtss2sd %xmm0, %xmm0
movl $0x800, %esi            # imm = 0x800
movq %r15, %rdi
leaq 0x9a2(%rip), %rdx       # 0x3074
movb $0x1, %al
callq 0x1050
pushq $0x2
jmp 0x27c1
movq %r12, %rsi
callq 0x14da
jmp 0x26f2
movq %r12, %rsi
callq 0x154b
movl $0x800, %esi            # imm = 0x800
movq %r15, %rdi
leaq 0x9b3(%rip), %rdx       # 0x30b4
movb $0x1, %al
callq 0x1050
pushq $0x8
jmp 0x27c1
movq %r12, %rsi
callq 0x156c
jmp 0x2721
movq %r12, %rsi
callq 0x15bf
movl $0x800, %esi            # imm = 0x800
movq %r15, %rdi
leaq 0x92c(%rip), %rdx       # 0x305c
movl %eax, %ecx
xorl %eax, %eax
callq 0x1050
pushq $0x5
jmp 0x27c1
movq %r12, %rsi
callq 0x15de
jmp 0x2752
movq %r12, %rsi
callq 0x1631
movzbl %al, %ecx
movl $0x800, %esi            # imm = 0x800
movq %r15, %rdi
leaq 0x8f8(%rip), %rdx       # 0x305c
xorl %eax, %eax
callq 0x1050
pushq $0x1
jmp 0x27c1
movq %r12, %rsi
callq 0x1650
jmp 0x2781
movq %r12, %rsi
callq 0x16df
movl $0x800, %esi            # imm = 0x800
movq %r15, %rdi
leaq 0x8b0(%rip), %rdx       # 0x3040
movq %rax, %rcx
xorl %eax, %eax
callq 0x1050
pushq $0x3
jmp 0x27c1
movq %r12, %rsi
callq 0x171d
movl $0x800, %esi            # imm = 0x800
movq %r15, %rdi
leaq 0x88b(%rip), %rdx       # 0x3040
movq %rax, %rcx
xorl %eax, %eax
callq 0x1050
pushq $0x4
popq %rbx
movl %ebx, -0x44(%r15)
addq $0x844, %r15            # imm = 0x844
jmp 0x2523
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x1a9ca, %eax          # imm = 0x1A9CA
jmp 0x27d4