// File: /workspace/github_cpp_makefile_star2_O1/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, 0x3244b(%rip)     # 0x3995c
je 0x7672
movq %rdi, %rbx
leaq 0x100(%rsp), %rdi
movl $0x400, %edx            # imm = 0x400
xorl %esi, %esi
callq 0x2140
cmpl $0x1, 0x31e03(%rip)     # 0x39338
jg 0x758e
cmpb $0x1, 0x328e7(%rip)     # 0x39e25
jne 0x754e
leaq 0x2afdb(%rip), %rdi     # 0x32522
xorl %eax, %eax
callq 0x2040
leaq 0x2985a(%rip), %rsi     # 0x30daf
leaq 0x32400(%rip), %rdx     # 0x3995c
leaq 0x80(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x2050
leaq 0x2b4b3(%rip), %rsi     # 0x32a28
movq %r14, %rdi
callq 0x20a0
movq %rax, 0x34974(%rip)     # 0x3bef8
movl $0x2, 0x31daa(%rip)     # 0x39338
cmpq $0x0, 0x34962(%rip)     # 0x3bef8
je 0x763e
movq 0x34955(%rip), %rdx     # 0x3bef8
leaq 0x100(%rsp), %rdi
movl $0x400, %esi            # imm = 0x400
callq 0x2440
testq %rax, %rax
je 0x763e
leaq 0x100(%rsp), %r14
leaq 0x60(%rsp), %rax
movq %rax, (%rsp)
movq %r14, %rdi
leaq 0x29809(%rip), %rsi     # 0x30de2
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 0x7623
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 0x7605
movq 0x348ce(%rip), %rdx     # 0x3bef8
movq %r14, %rdi
movl $0x400, %esi            # imm = 0x400
callq 0x2440
testq %rax, %rax
jne 0x75c6
jmp 0x763e
movq 0x348b3(%rip), %rdi     # 0x3bef8
testq %rdi, %rdi
je 0x764f
callq 0x23a0
cmpb $0x1, 0x327cf(%rip)     # 0x39e25
jne 0x7666
leaq 0x2aec7(%rip), %rdi     # 0x32526
xorl %eax, %eax
callq 0x2040
movl $0x0, 0x31cc8(%rip)     # 0x39338
jmp 0x7677
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, %eax
addq $0x508, %rsp            # imm = 0x508
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq