// File: /workspace/github_cpp_makefile_star2_O3/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, 0x323fc(%rip)     # 0x3995c
je 0x75de
movq %rdi, %rbx
leaq 0x100(%rsp), %rdi
movl $0x400, %edx            # imm = 0x400
xorl %esi, %esi
callq 0x2140
cmpl $0x1, 0x31db8(%rip)     # 0x39338
jg 0x75e8
cmpb $0x1, 0x3289c(%rip)     # 0x39e25
jne 0x7599
leaq 0x2af98(%rip), %rdi     # 0x3252a
xorl %eax, %eax
callq 0x2040
leaq 0x29813(%rip), %rsi     # 0x30db3
leaq 0x323b5(%rip), %rdx     # 0x3995c
leaq 0x80(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x2050
leaq 0x2b470(%rip), %rsi     # 0x32a30
movq %r14, %rdi
callq 0x20a0
movq %rax, %rdx
movq %rax, 0x34926(%rip)     # 0x3bef8
movl $0x2, 0x31d5c(%rip)     # 0x39338
jmp 0x75ef
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jmp 0x76c5
movq 0x34909(%rip), %rdx     # 0x3bef8
testq %rdx, %rdx
je 0x7693
leaq 0x100(%rsp), %rdi
movl $0x400, %esi            # imm = 0x400
callq 0x2440
testq %rax, %rax
je 0x7693
leaq 0x100(%rsp), %r14
leaq 0x60(%rsp), %rax
movq %rax, (%rsp)
movq %r14, %rdi
leaq 0x297b8(%rip), %rsi     # 0x30de6
leaq 0x10(%rsp), %rdx
leaq 0x24(%rsp), %rcx
leaq 0x38(%rsp), %r8
leaq 0x4c(%rsp), %r9
xorl %eax, %eax
callq 0x2280
movl %eax, %ebp
testl %eax, %eax
jle 0x7678
movl %ebp, %r13d
leaq 0x10(%rsp), %r15
xorl %r12d, %r12d
movq %r15, %rdi
callq 0x2310
cvtsd2ss %xmm0, %xmm0
movss %xmm0, (%rbx,%r12,4)
incq %r12
addq $0x14, %r15
cmpq %r12, %r13
jne 0x765a
movq 0x34879(%rip), %rdx     # 0x3bef8
movq %r14, %rdi
movl $0x400, %esi            # imm = 0x400
callq 0x2440
testq %rax, %rax
jne 0x761b
jmp 0x7693
movq 0x3485e(%rip), %rdi     # 0x3bef8
testq %rdi, %rdi
je 0x76a4
callq 0x23a0
cmpb $0x1, 0x3277a(%rip)     # 0x39e25
jne 0x76bb
leaq 0x2ae7a(%rip), %rdi     # 0x3252e
xorl %eax, %eax
callq 0x2040
movl $0x0, 0x31c73(%rip)     # 0x39338
movl %ebp, %eax
addq $0x508, %rsp            # imm = 0x508
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq