// File: /workspace/github_cpp_makefile_star2_O2/Eba-M[P]E3DC-Control/RscpExampleMain.cpp
// Function: MQTTE3DC(float*)
int MQTTE3DC(float f[3])
{
    //           Test zur Abfrage eines zweiten E3DC
    if (strcmp(e3dc_config.mqtt3_ip,"0.0.0.0")!=0)
    {
        
        char buf[127];
        static int WP_status = -1;
        int status;
        char path[1024];
        char var [5] [20];
        memset(path, 0x00, sizeof(path));

        if (WP_status < 2)
        {
            if (e3dc_config.debug) printf("W1");
            mfp == NULL;
            sprintf(buf,"mosquitto_sub -h %s -t E3DC-Control/Grid -W 1 -C 1",e3dc_config.mqtt3_ip);
            mfp = popen(buf, "r");
            //            int fd = fileno(mfp);
            //            int flags = fcntl(fd, F_GETFL, 0);
            //            flags |= O_NONBLOCK;
            //            fcntl(fd, F_SETFL, flags);
            WP_status = 2;
        }
        if (mfp != NULL)
            while (fgets(path, 1024, mfp) != NULL)
            {
                status = sscanf(path, "%s %s %s %s %s ", var[0], var[1], var[2], var[3], var[4]);
                for (int x1=0;x1<status;x1++)
                    f[x1]=atof(var[x1]);
            }
        //        if (WP_status < 2)
        if (mfp != NULL)
            pclose(mfp);
        if (e3dc_config.debug) printf("W2");
        WP_status = 0;
        return status;

    }
    return -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x508, %rsp            # imm = 0x508
movabsq $0x302e302e302e30, %rax # imm = 0x302E302E302E30
cmpq %rax, 0x2feb4(%rip)     # 0x3697c
je 0x6b46
movq %rdi, %rbx
leaq 0x100(%rsp), %rdi
movl $0x400, %edx            # imm = 0x400
xorl %esi, %esi
callq 0x2150
cmpl $0x1, 0x2f870(%rip)     # 0x36358
jg 0x6b4e
cmpb $0x1, 0x30354(%rip)     # 0x36e45
jne 0x6b01
leaq 0x26858(%rip), %rdi     # 0x2d352
xorl %eax, %eax
callq 0x2040
leaq 0x251db(%rip), %rsi     # 0x2bce3
leaq 0x2fe6d(%rip), %rdx     # 0x3697c
leaq 0x80(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x2050
leaq 0x26d30(%rip), %rsi     # 0x2d858
movq %r14, %rdi
callq 0x20a0
movq %rax, %rdx
movq %rax, 0x323de(%rip)     # 0x38f18
movl $0x2, 0x2f814(%rip)     # 0x36358
jmp 0x6b55
pushq $-0x1
popq %rbp
jmp 0x6c1f
movq 0x323c3(%rip), %rdx     # 0x38f18
testq %rdx, %rdx
je 0x6c01
leaq 0x100(%rsp), %r14
movq %r14, %rdi
movl $0x400, %esi            # imm = 0x400
callq 0x2470
testq %rax, %rax
je 0x6bee
leaq 0x60(%rsp), %rax
movq %rax, (%rsp)
movq %r14, %r12
movq %r14, %rdi
leaq 0x25188(%rip), %rsi     # 0x2bd16
leaq 0x10(%rsp), %r15
movq %r15, %rdx
leaq 0x24(%rsp), %rcx
leaq 0x38(%rsp), %r8
leaq 0x4c(%rsp), %r9
xorl %eax, %eax
callq 0x2280
movl %eax, %ebp
testl %eax, %eax
movl %eax, %r14d
movl $0x0, %eax
cmovlel %eax, %r14d
xorl %r13d, %r13d
cmpq %r13, %r14
je 0x6bdf
movq %r15, %rdi
callq 0x2320
cvtsd2ss %xmm0, %xmm0
movss %xmm0, (%rbx,%r13,4)
incq %r13
addq $0x14, %r15
jmp 0x6bbf
movq 0x32332(%rip), %rdx     # 0x38f18
movq %r12, %r14
jmp 0x6b66
movq 0x32323(%rip), %rdi     # 0x38f18
testq %rdi, %rdi
je 0x6c01
callq 0x23e0
jmp 0x6c01
cmpb $0x1, 0x3023d(%rip)     # 0x36e45
jne 0x6c18
leaq 0x26745(%rip), %rdi     # 0x2d356
xorl %eax, %eax
callq 0x2040
andl $0x0, 0x2f739(%rip)     # 0x36358
movl %ebp, %eax
addq $0x508, %rsp            # imm = 0x508
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq