// File: /workspace/github_c_makefile_star2_O0/connycommy[P]atCmdDevice/src/test/TestProductionCode.c
// Function: test_modem_SocketGetServStatus
void test_modem_SocketGetServStatus(){
    cmError_t retValue = CM_FAIL;
    cellModemConfig_t config =CELLMODEMCONFIG_INITIALIZER;
    socketData_t configSocket =SOCKETDATA_INITIALIZER;


    MockResponseExpected = CM_CMD_MOCK_QISTATE_RESPONSE;

    configSocket.connectId = config.connectId = 3;
    retValue = cellModem_SocketGetServStatus(&cmData,&configSocket);
    TEST_ASSERT_EQUAL_INT32(CM_OK,retValue);
    TEST_ASSERT_EQUAL_INT32(3, configSocket.connectId);
    TEST_ASSERT_EQUAL_STRING("10.106.6.155",configSocket.ipAddres);
    TEST_ASSERT_EQUAL_STRING("0",configSocket.remPort);
    TEST_ASSERT_EQUAL_STRING("5500",configSocket.locPort);
    TEST_ASSERT_EQUAL_INT(3,configSocket.state);

    configSocket.connectId = config.connectId = 11;
    MockResponseExpected = CM_CMD_MOCK_QISTATE_RESPONSE_INCOMING_CLIENT;
    retValue = cellModem_SocketGetServStatus(&cmData,&configSocket);
    TEST_ASSERT_EQUAL_INT32(CM_OK,retValue);
    TEST_ASSERT_EQUAL_INT32(11, configSocket.connectId);
    TEST_ASSERT_EQUAL_STRING("192.168.32.68",configSocket.ipAddres);
    TEST_ASSERT_EQUAL_STRING("54842",configSocket.remPort);
    TEST_ASSERT_EQUAL_STRING("5500",configSocket.locPort);
    TEST_ASSERT_EQUAL_INT(2,configSocket.state);
    
    configSocket.connectId = config.connectId = 11;
    MockResponseExpected = CM_CMD_MOCK_QISTATE_RESPONSE2_ECHO;
    retValue = cellModem_SocketGetServStatus(&cmData,&configSocket);
    TEST_ASSERT_EQUAL_INT32(CM_OK,retValue);
    TEST_ASSERT_EQUAL_INT32(3, configSocket.connectId);
    TEST_ASSERT_EQUAL_STRING("10.101.234.65",configSocket.ipAddres);
    TEST_ASSERT_EQUAL_STRING("0",configSocket.remPort);
    TEST_ASSERT_EQUAL_STRING("2020",configSocket.locPort);
    TEST_ASSERT_EQUAL_INT(4,configSocket.state);
    TEST_ASSERT_EQUAL_INT(0, cmIsAsyncEvent(&cmData));  

    memset(configSocket.locPort,0,8);
    configSocket.connectId = config.connectId = 3;
    MockResponseExpected = CM_CMD_MOCK_QISTATE_SERIAL_RESPONSE;
    retValue = cellModem_SocketGetServStatus(&cmData,&configSocket);
    TEST_ASSERT_EQUAL_INT32(CM_OK,retValue);
    TEST_ASSERT_EQUAL_INT32(3, configSocket.connectId);
    TEST_ASSERT_EQUAL_STRING("192.168.32.48",configSocket.ipAddres);
    TEST_ASSERT_EQUAL_STRING("6000",configSocket.remPort);
    TEST_ASSERT_EQUAL_STRING("0",configSocket.locPort);
    TEST_ASSERT_EQUAL_INT(1,configSocket.state);
    TEST_ASSERT_EQUAL_INT(0, cmIsAsyncEvent(&cmData));   

        configSocket.connectId = config.connectId = 11;
    MockResponseExpected = "AT+QISTATE=1,11\r\r\nOK\r\n";
    retValue = cellModem_SocketGetServStatus(&cmData,&configSocket);
    TEST_ASSERT_EQUAL_INT32(CM_OK,retValue);
    TEST_ASSERT_EQUAL_INT32(11, configSocket.connectId);
    TEST_ASSERT_EQUAL_STRING("",configSocket.ipAddres);
    TEST_ASSERT_EQUAL_STRING("\0",configSocket.remPort);
    TEST_ASSERT_EQUAL_STRING("\0",configSocket.locPort);
    TEST_ASSERT_EQUAL_INT(0,configSocket.state);
    TEST_ASSERT_EQUAL_INT(0,configSocket.serverId);
    TEST_ASSERT_EQUAL_INT(0, cmIsAsyncEvent(&cmData));  

    configSocket.connectId = config.connectId = 11;
    MockResponseExpected = "AT+QISTATE=1,11\r\r\n+QISTATE: 11,\"TCP INCOMING\",\"192.168.32.48\",54707,2020,4,1,3,0,\"uart1\"\r\n\r\nOK\r\n";
    retValue = cellModem_SocketGetServStatus(&cmData,&configSocket);

    TEST_ASSERT_EQUAL_INT32(CM_OK,retValue);
    TEST_ASSERT_EQUAL_INT32(11, configSocket.connectId);
    TEST_ASSERT_EQUAL_STRING("192.168.32.48",configSocket.ipAddres);
    TEST_ASSERT_EQUAL_STRING("54707",configSocket.remPort);
    TEST_ASSERT_EQUAL_STRING("2020",configSocket.locPort);
    TEST_ASSERT_EQUAL_INT(4,configSocket.state);
    TEST_ASSERT_EQUAL_INT(3,configSocket.serverId);
    TEST_ASSERT_EQUAL_INT(0, cmIsAsyncEvent(&cmData));

        configSocket.connectId = config.connectId = 11;
    MockResponseExpected = "AT+QISTATE=1,11\r\r\n+QISTATE: 11,\"TCP INCOMING\",\"192.168.32.48\",54707,2020,4,1,5,0,\"uart1\"\r\n\r\nOK\r\n";
    retValue = cellModem_SocketGetServStatus(&cmData,&configSocket);

    TEST_ASSERT_EQUAL_INT32(CM_OK,retValue);
    TEST_ASSERT_EQUAL_INT32(11, configSocket.connectId);
    TEST_ASSERT_EQUAL_STRING("192.168.32.48",configSocket.ipAddres);
    TEST_ASSERT_EQUAL_STRING("54707",configSocket.remPort);
    TEST_ASSERT_EQUAL_STRING("2020",configSocket.locPort);
    TEST_ASSERT_EQUAL_INT(4,configSocket.state);
    TEST_ASSERT_EQUAL_INT(5,configSocket.serverId);
    TEST_ASSERT_EQUAL_INT(0, cmIsAsyncEvent(&cmData));

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
leaq -0x40(%rbp), %rdi
xorl %esi, %esi
movl $0x38, %edx
callq 0x10a0
leaq -0xb0(%rbp), %rdi
xorl %esi, %esi
movl $0x70, %edx
callq 0x10a0
leaq 0x56dd(%rip), %rax      # 0xabe9
movq %rax, 0x9c7d(%rip)      # 0xf190
movl $0x3, -0x28(%rbp)
movl $0x3, -0x64(%rbp)
leaq 0x9bf8(%rip), %rdi      # 0xf120
leaq -0xb0(%rbp), %rsi
callq 0x33d0
movl %eax, -0x4(%rbp)
movslq -0x4(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
movl $0x168, %ecx            # imm = 0x168
movl $0x14, %r8d
movq %rdx, %rdi
callq 0x7460
movslq -0x64(%rbp), %rsi
movl $0x3, %edi
xorl %eax, %eax
movl %eax, %edx
movl $0x169, %ecx            # imm = 0x169
movl $0x14, %r8d
callq 0x7460
leaq -0xb0(%rbp), %rsi
addq $0x5c, %rsi
leaq 0x56b3(%rip), %rdi      # 0xac34
xorl %eax, %eax
movl %eax, %edx
movl $0x16a, %ecx            # imm = 0x16A
callq 0x8680
leaq -0xb0(%rbp), %rsi
addq $0x10, %rsi
leaq 0x57c9(%rip), %rdi      # 0xad6a
xorl %eax, %eax
movl %eax, %edx
movl $0x16b, %ecx            # imm = 0x16B
callq 0x8680
leaq -0xb0(%rbp), %rsi
addq $0x18, %rsi
leaq 0x5680(%rip), %rdi      # 0xac41
xorl %eax, %eax
movl %eax, %edx
movl $0x16c, %ecx            # imm = 0x16C
callq 0x8680
movslq -0x5c(%rbp), %rsi
movl $0x3, %edi
xorl %eax, %eax
movl %eax, %edx
movl $0x16d, %ecx            # imm = 0x16D
movl $0x14, %r8d
callq 0x7460
movl $0xb, -0x28(%rbp)
movl $0xb, -0x64(%rbp)
leaq 0x5645(%rip), %rax      # 0xac46
movq %rax, 0x9b88(%rip)      # 0xf190
leaq 0x9b11(%rip), %rdi      # 0xf120
leaq -0xb0(%rbp), %rsi
callq 0x33d0
movl %eax, -0x4(%rbp)
movslq -0x4(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
movl $0x172, %ecx            # imm = 0x172
movl $0x14, %r8d
movq %rdx, %rdi
callq 0x7460
movslq -0x64(%rbp), %rsi
movl $0xb, %edi
xorl %eax, %eax
movl %eax, %edx
movl $0x173, %ecx            # imm = 0x173
movl $0x14, %r8d
callq 0x7460
leaq -0xb0(%rbp), %rsi
addq $0x5c, %rsi
leaq 0x562f(%rip), %rdi      # 0xac97
xorl %eax, %eax
movl %eax, %edx
movl $0x174, %ecx            # imm = 0x174
callq 0x8680
leaq -0xb0(%rbp), %rsi
addq $0x10, %rsi
leaq 0x561d(%rip), %rdi      # 0xaca5
xorl %eax, %eax
movl %eax, %edx
movl $0x175, %ecx            # imm = 0x175
callq 0x8680
leaq -0xb0(%rbp), %rsi
addq $0x18, %rsi
leaq 0x5599(%rip), %rdi      # 0xac41
xorl %eax, %eax
movl %eax, %edx
movl $0x176, %ecx            # imm = 0x176
callq 0x8680
movslq -0x5c(%rbp), %rsi
movl $0x2, %edi
xorl %eax, %eax
movl %eax, %edx
movl $0x177, %ecx            # imm = 0x177
movl $0x14, %r8d
callq 0x7460
movl $0xb, -0x28(%rbp)
movl $0xb, -0x64(%rbp)
leaq 0x55c3(%rip), %rax      # 0xacab
movq %rax, 0x9aa1(%rip)      # 0xf190
leaq 0x9a2a(%rip), %rdi      # 0xf120
leaq -0xb0(%rbp), %rsi
callq 0x33d0
movl %eax, -0x4(%rbp)
movslq -0x4(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
movl $0x17c, %ecx            # imm = 0x17C
movl $0x14, %r8d
movq %rdx, %rdi
callq 0x7460
movslq -0x64(%rbp), %rsi
movl $0x3, %edi
xorl %eax, %eax
movl %eax, %edx
movl $0x17d, %ecx            # imm = 0x17D
movl $0x14, %r8d
callq 0x7460
leaq -0xb0(%rbp), %rsi
addq $0x5c, %rsi
leaq 0x543f(%rip), %rdi      # 0xab8e
xorl %eax, %eax
movl %eax, %edx
movl $0x17e, %ecx            # imm = 0x17E
callq 0x8680
leaq -0xb0(%rbp), %rsi
addq $0x10, %rsi
leaq 0x55fb(%rip), %rdi      # 0xad6a
xorl %eax, %eax
movl %eax, %edx
movl $0x17f, %ecx            # imm = 0x17F
callq 0x8680
leaq -0xb0(%rbp), %rsi
addq $0x18, %rsi
leaq 0x5455(%rip), %rdi      # 0xabe4
xorl %eax, %eax
movl %eax, %edx
movl $0x180, %ecx            # imm = 0x180
callq 0x8680
movslq -0x5c(%rbp), %rsi
movl $0x4, %edi
xorl %eax, %eax
movl %eax, %edx
movl $0x181, %ecx            # imm = 0x181
movl $0x14, %r8d
callq 0x7460
leaq 0x995f(%rip), %rdi      # 0xf120
callq 0x1900
movzbl %al, %eax
movl %eax, %esi
xorl %eax, %eax
movl %eax, %edx
movl $0x182, %ecx            # imm = 0x182
movl $0x14, %r8d
movq %rdx, %rdi
callq 0x7460
leaq -0xb0(%rbp), %rdi
addq $0x18, %rdi
xorl %esi, %esi
movl $0x8, %edx
callq 0x10a0
movl $0x3, -0x28(%rbp)
movl $0x3, -0x64(%rbp)
leaq 0x54f8(%rip), %rax      # 0xad06
movq %rax, 0x997b(%rip)      # 0xf190
leaq 0x9904(%rip), %rdi      # 0xf120
leaq -0xb0(%rbp), %rsi
callq 0x33d0
movl %eax, -0x4(%rbp)
movslq -0x4(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
movl $0x188, %ecx            # imm = 0x188
movl $0x14, %r8d
movq %rdx, %rdi
callq 0x7460
movslq -0x64(%rbp), %rsi
movl $0x3, %edi
xorl %eax, %eax
movl %eax, %edx
movl $0x189, %ecx            # imm = 0x189
movl $0x14, %r8d
callq 0x7460
leaq -0xb0(%rbp), %rsi
addq $0x5c, %rsi
leaq 0x54e4(%rip), %rdi      # 0xad59
xorl %eax, %eax
movl %eax, %edx
movl $0x18a, %ecx            # imm = 0x18A
callq 0x8680
leaq -0xb0(%rbp), %rsi
addq $0x10, %rsi
leaq 0x54d2(%rip), %rdi      # 0xad67
xorl %eax, %eax
movl %eax, %edx
movl $0x18b, %ecx            # imm = 0x18B
callq 0x8680
leaq -0xb0(%rbp), %rsi
addq $0x18, %rsi
leaq 0x54b5(%rip), %rdi      # 0xad6a
xorl %eax, %eax
movl %eax, %edx
movl $0x18c, %ecx            # imm = 0x18C
callq 0x8680
movslq -0x5c(%rbp), %rsi
movl $0x1, %edi
xorl %eax, %eax
movl %eax, %edx
movl $0x18d, %ecx            # imm = 0x18D
movl $0x14, %r8d
callq 0x7460
leaq 0x9839(%rip), %rdi      # 0xf120
callq 0x1900
movzbl %al, %eax
movl %eax, %esi
xorl %eax, %eax
movl %eax, %edx
movl $0x18e, %ecx            # imm = 0x18E
movl $0x14, %r8d
movq %rdx, %rdi
callq 0x7460
movl $0xb, -0x28(%rbp)
movl $0xb, -0x64(%rbp)
leaq 0x544f(%rip), %rax      # 0xad6c
movq %rax, 0x986c(%rip)      # 0xf190
leaq 0x97f5(%rip), %rdi      # 0xf120
leaq -0xb0(%rbp), %rsi
callq 0x33d0
movl %eax, -0x4(%rbp)
movslq -0x4(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
movl $0x193, %ecx            # imm = 0x193
movl $0x14, %r8d
movq %rdx, %rdi
callq 0x7460
movslq -0x64(%rbp), %rsi
movl $0xb, %edi
xorl %eax, %eax
movl %eax, %edx
movl $0x194, %ecx            # imm = 0x194
movl $0x14, %r8d
callq 0x7460
leaq -0xb0(%rbp), %rsi
addq $0x5c, %rsi
leaq 0x5859(%rip), %rdi      # 0xb1dd
xorl %eax, %eax
movl %eax, %edx
movl $0x195, %ecx            # imm = 0x195
callq 0x8680
leaq -0xb0(%rbp), %rsi
addq $0x10, %rsi
leaq 0x588c(%rip), %rdi      # 0xb230
xorl %eax, %eax
movl %eax, %edx
movl $0x196, %ecx            # imm = 0x196
callq 0x8680
leaq -0xb0(%rbp), %rsi
addq $0x18, %rsi
leaq 0x586c(%rip), %rdi      # 0xb230
xorl %eax, %eax
movl %eax, %edx
movl $0x197, %ecx            # imm = 0x197
callq 0x8680
movslq -0x5c(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
movl $0x198, %ecx            # imm = 0x198
movl $0x14, %r8d
movq %rdx, %rdi
callq 0x7460
movslq -0x58(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
movl $0x199, %ecx            # imm = 0x199
movl $0x14, %r8d
movq %rdx, %rdi
callq 0x7460
leaq 0x9711(%rip), %rdi      # 0xf120
callq 0x1900
movzbl %al, %eax
movl %eax, %esi
xorl %eax, %eax
movl %eax, %edx
movl $0x19a, %ecx            # imm = 0x19A
movl $0x14, %r8d
movq %rdx, %rdi
callq 0x7460
movl $0xb, -0x28(%rbp)
movl $0xb, -0x64(%rbp)
leaq 0x533e(%rip), %rax      # 0xad83
movq %rax, 0x9744(%rip)      # 0xf190
leaq 0x96cd(%rip), %rdi      # 0xf120
leaq -0xb0(%rbp), %rsi
callq 0x33d0
movl %eax, -0x4(%rbp)
movslq -0x4(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
movl $0x1a0, %ecx            # imm = 0x1A0
movl $0x14, %r8d
movq %rdx, %rdi
callq 0x7460
movslq -0x64(%rbp), %rsi
movl $0xb, %edi
xorl %eax, %eax
movl %eax, %edx
movl $0x1a1, %ecx            # imm = 0x1A1
movl $0x14, %r8d
callq 0x7460
leaq -0xb0(%rbp), %rsi
addq $0x5c, %rsi
leaq 0x52ad(%rip), %rdi      # 0xad59
xorl %eax, %eax
movl %eax, %edx
movl $0x1a2, %ecx            # imm = 0x1A2
callq 0x8680
leaq -0xb0(%rbp), %rsi
addq $0x10, %rsi
leaq 0x5318(%rip), %rdi      # 0xade4
xorl %eax, %eax
movl %eax, %edx
movl $0x1a3, %ecx            # imm = 0x1A3
callq 0x8680
leaq -0xb0(%rbp), %rsi
addq $0x18, %rsi
leaq 0x50f8(%rip), %rdi      # 0xabe4
xorl %eax, %eax
movl %eax, %edx
movl $0x1a4, %ecx            # imm = 0x1A4
callq 0x8680
movslq -0x5c(%rbp), %rsi
movl $0x4, %edi
xorl %eax, %eax
movl %eax, %edx
movl $0x1a5, %ecx            # imm = 0x1A5
movl $0x14, %r8d
callq 0x7460
movslq -0x58(%rbp), %rsi
movl $0x3, %edi
xorl %eax, %eax
movl %eax, %edx
movl $0x1a6, %ecx            # imm = 0x1A6
movl $0x14, %r8d
callq 0x7460
leaq 0x95e5(%rip), %rdi      # 0xf120
callq 0x1900
movzbl %al, %eax
movl %eax, %esi
xorl %eax, %eax
movl %eax, %edx
movl $0x1a7, %ecx            # imm = 0x1A7
movl $0x14, %r8d
movq %rdx, %rdi
callq 0x7460
movl $0xb, -0x28(%rbp)
movl $0xb, -0x64(%rbp)
leaq 0x5279(%rip), %rax      # 0xadea
movq %rax, 0x9618(%rip)      # 0xf190
leaq 0x95a1(%rip), %rdi      # 0xf120
leaq -0xb0(%rbp), %rsi
callq 0x33d0
movl %eax, -0x4(%rbp)
movslq -0x4(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
movl $0x1ad, %ecx            # imm = 0x1AD
movl $0x14, %r8d
movq %rdx, %rdi
callq 0x7460
movslq -0x64(%rbp), %rsi
movl $0xb, %edi
xorl %eax, %eax
movl %eax, %edx
movl $0x1ae, %ecx            # imm = 0x1AE
movl $0x14, %r8d
callq 0x7460
leaq -0xb0(%rbp), %rsi
addq $0x5c, %rsi
leaq 0x5181(%rip), %rdi      # 0xad59
xorl %eax, %eax
movl %eax, %edx
movl $0x1af, %ecx            # imm = 0x1AF
callq 0x8680
leaq -0xb0(%rbp), %rsi
addq $0x10, %rsi
leaq 0x51ec(%rip), %rdi      # 0xade4
xorl %eax, %eax
movl %eax, %edx
movl $0x1b0, %ecx            # imm = 0x1B0
callq 0x8680
leaq -0xb0(%rbp), %rsi
addq $0x18, %rsi
leaq 0x4fcc(%rip), %rdi      # 0xabe4
xorl %eax, %eax
movl %eax, %edx
movl $0x1b1, %ecx            # imm = 0x1B1
callq 0x8680
movslq -0x5c(%rbp), %rsi
movl $0x4, %edi
xorl %eax, %eax
movl %eax, %edx
movl $0x1b2, %ecx            # imm = 0x1B2
movl $0x14, %r8d
callq 0x7460
movslq -0x58(%rbp), %rsi
movl $0x5, %edi
xorl %eax, %eax
movl %eax, %edx
movl $0x1b3, %ecx            # imm = 0x1B3
movl $0x14, %r8d
callq 0x7460
leaq 0x94b9(%rip), %rdi      # 0xf120
callq 0x1900
movzbl %al, %eax
movl %eax, %esi
xorl %eax, %eax
movl %eax, %edx
movl $0x1b4, %ecx            # imm = 0x1B4
movl $0x14, %r8d
movq %rdx, %rdi
callq 0x7460
addq $0xb0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)