user: Please show me the C implementation that matches the assembly code listed below:

```asm
<test_fcmov>:
  endbr64
  push   %r15
  lea    D69(%rip),%r15
  push   %r14
  lea    D48(%rip),%r14
  push   %r13
  xor    %r13d,%r13d
  push   %r12
  lea    D20(%rip),%r12
  push   %rbp
  lea    D83(%rip),%rbp
  push   %rbx
  xor    %ebx,%ebx
  sub    $0x18,%rsp
L7:
  fldl   0xed7(%rip)        # 2030 <_fini+0xcd0>
  fld1
  mov    %r13,%rdx
  mov    %r15,%rsi
  push   %r13
  popf
  fcmovb %st(1),%st
  fstp   %st(1)
  fstpl  0x8(%rsp)
  mov    %r12,%rdi
  mov    $0x1,%eax
  add    $0x1,%rbx
  movsd  0x8(%rsp),%xmm0
  call   <printf@plt>
  mov    %r13,%rdx
  mov    %r14,%rsi
  mov    %r12,%rdi
  fldl   0xe9e(%rip)        # 2030 <_fini+0xcd0>
  fld1
  mov    $0x1,%eax
  push   %r13
  popf
  fcmove %st(1),%st
  fstp   %st(1)
  fstpl  0x8(%rsp)
  movsd  0x8(%rsp),%xmm0
  call   <printf@plt>
  mov    %r13,%rdx
  mov    %r12,%rdi
  mov    $0x1,%eax
  fldl   0xe70(%rip)        # 2030 <_fini+0xcd0>
  fld1
  lea    D64(%rip),%rsi
  push   %r13
  popf
  fcmovbe %st(1),%st
  fstp   %st(1)
  fstpl  0x8(%rsp)
  movsd  0x8(%rsp),%xmm0
  call   <printf@plt>
  mov    %r13,%rdx
  mov    %r12,%rdi
  mov    $0x1,%eax
  fldl   0xe40(%rip)        # 2030 <_fini+0xcd0>
  fld1
  lea    D15(%rip),%rsi
  push   %r13
  popf
  fcmovnb %st(1),%st
  fstp   %st(1)
  fstpl  0x8(%rsp)
  movsd  0x8(%rsp),%xmm0
  call   <printf@plt>
  mov    %r13,%rdx
  mov    %rbp,%rsi
  mov    %r12,%rdi
  fldl   0xe12(%rip)        # 2030 <_fini+0xcd0>
  fld1
  mov    $0x1,%eax
  push   %r13
  popf
  fcmovne %st(1),%st
  fstp   %st(1)
  fstpl  0x8(%rsp)
  movsd  0x8(%rsp),%xmm0
  call   <printf@plt>
  mov    %r13,%rdx
  mov    %r12,%rdi
  mov    $0x1,%eax
  fldl   0xde4(%rip)        # 2030 <_fini+0xcd0>
  fld1
  lea    D41(%rip),%rsi
  push   %r13
  popf
  fcmovnbe %st(1),%st
  fstp   %st(1)
  fstpl  0x8(%rsp)
  movsd  0x8(%rsp),%xmm0
  call   <printf@plt>
  cmp    $0x4,%rbx
  je     L18
  mov    %rbx,%r13
  and    $0x1,%r13d
  mov    %r13,%rax
  or     $0x40,%rax
  test   $0x2,%bl
  cmovne %rax,%r13
  jmp    L7
  nopl   0x0(%rax,%rax,1)
L18:
  lea    D89(%rip),%rbp
  fldl   0xd93(%rip)        # 2030 <_fini+0xcd0>
  fld1
  mov    %r12,%rdi
  xor    %edx,%edx
  mov    %rbp,%rsi
  mov    $0x1,%eax
  push   $0x0
  popf
  fcmovu %st(1),%st
  fstp   %st(1)
  fstpl  0x8(%rsp)
  movsd  0x8(%rsp),%xmm0
  call   <printf@plt>
  mov    %rbp,%rsi
  mov    %r12,%rdi
  mov    $0x4,%edx
  fldl   0xd5d(%rip)        # 2030 <_fini+0xcd0>
  fld1
  mov    $0x1,%eax
  lea    D40(%rip),%rbp
  push   $0x4
  popf
  fcmovu %st(1),%st
  fstp   %st(1)
  fstpl  0x8(%rsp)
  movsd  0x8(%rsp),%xmm0
  call   <printf@plt>
  mov    %rbp,%rsi
  mov    %r12,%rdi
  xor    %edx,%edx
  fldl   0xd2b(%rip)        # 2030 <_fini+0xcd0>
  fld1
  mov    $0x1,%eax
  push   $0x0
  popf
  fcmovnu %st(1),%st
  fstp   %st(1)
  fstpl  0x8(%rsp)
  movsd  0x8(%rsp),%xmm0
  call   <printf@plt>
  mov    %rbp,%rsi
  mov    %r12,%rdi
  mov    $0x4,%edx
  fldl   0xcfd(%rip)        # 2030 <_fini+0xcd0>
  fld1
  mov    $0x1,%eax
  push   $0x4
  popf
  fcmovnu %st(1),%st
  fstp   %st(1)
  fstpl  0x8(%rsp)
  movsd  0x8(%rsp),%xmm0
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1050 <printf@plt>
```

tool_calls: name: disassemble_data
arguments: tag: D69
type_infered: string
name: disassemble_data
arguments: tag: D48
type_infered: string
name: disassemble_data
arguments: tag: D20
type_infered: string
name: disassemble_data
arguments: tag: D83
type_infered: string
name: disassemble_data
arguments: tag: D64
type_infered: string
name: disassemble_data
arguments: tag: D15
type_infered: string
name: disassemble_data
arguments: tag: D41
type_infered: string
name: disassemble_data
arguments: tag: D89
type_infered: string
name: disassemble_data
arguments: tag: D40
type_infered: string

tool: D69: b

tool: D48: e

tool: D20: fcmov%s eflags=0x%04llx-> %f


tool: D83: ne

tool: D64: be

tool: D15: nb

tool: D41: nbe

tool: D89: u

tool: D40: nu

assistant: ```c
void test_fcmov(void) {
  double a, b;
  long long int eflags, i;
  a = 1.0;
  b = 2.0;
  for (i = 0; i < 4; i++) {
    eflags = 0;
    if (i & 1)
      eflags |= 0x0001;
    if (i & 2)
      eflags |= 0x0040;
    {
      double res;
      asm("pushq %3\n"
          "popfq\n"
          "fcmov"
          "b"
          " %2, %0\n"
          : "=t"(res)
          : "0"(a), "u"(b), "g"((long long int)eflags));
      printf("fcmov%s eflags=0x%04llx-> %f\n", "b", (long long int)eflags, res);
    };
    {
      double res;
      asm("pushq %3\n"
          "popfq\n"
          "fcmov"
          "e"
          " %2, %0\n"
          : "=t"(res)
          : "0"(a), "u"(b), "g"((long long int)eflags));
      printf("fcmov%s eflags=0x%04llx-> %f\n", "e", (long long int)eflags, res);
    };
    {
      double res;
      asm("pushq %3\n"
          "popfq\n"
          "fcmov"
          "be"
          " %2, %0\n"
          : "=t"(res)
          : "0"(a), "u"(b), "g"((long long int)eflags));
      printf("fcmov%s eflags=0x%04llx-> %f\n", "be", (long long int)eflags, res);
    };
    {
      double res;
      asm("pushq %3\n"
          "popfq\n"
          "fcmov"
          "nb"
          " %2, %0\n"
          : "=t"(res)
          : "0"(a), "u"(b), "g"((long long int)eflags));
      printf("fcmov%s eflags=0x%04llx-> %f\n", "nb", (long long int)eflags, res);
    };
    {
      double res;
      asm("pushq %3\n"
          "popfq\n"
          "fcmov"
          "ne"
          " %2, %0\n"
          : "=t"(res)
          : "0"(a), "u"(b), "g"((long long int)eflags));
      printf("fcmov%s eflags=0x%04llx-> %f\n", "ne", (long long int)eflags, res);
    };
    {
      double res;
      asm("pushq %3\n"
          "popfq\n"
          "fcmov"
          "nbe"
          " %2, %0\n"
          : "=t"(res)
          : "0"(a), "u"(b), "g"((long long int)eflags));
      printf("fcmov%s eflags=0x%04llx-> %f\n", "nbe", (long long int)eflags, res);
    };
  }
  {
    double res;
    asm("pushq %3\n"
        "popfq\n"
        "fcmov"
        "u"
        " %2, %0\n"
        : "=t"(res)
        : "0"(a), "u"(b), "g"((long long int)0));
    printf("fcmov%s eflags=0x%04llx-> %f\n", "u", (long long int)0, res);
  };
  {
    double res;
    asm("pushq %3\n"
        "popfq\n"
        "fcmov"
        "u"
        " %2, %0\n"
        : "=t"(res)
        : "0"(a), "u"(b), "g"((long long int)0x0004));
    printf("fcmov%s eflags=0x%04llx-> %f\n", "u", (long long int)0x0004, res);
  };
  {
    double res;
    asm("pushq %3\n"
        "popfq\n"
        "fcmov"
        "nu"
        " %2, %0\n"
        : "=t"(res)
        : "0"(a), "u"(b), "g"((long long int)0));
    printf("fcmov%s eflags=0x%04llx-> %f\n", "nu", (long long int)0, res);
  };
  {
    double res;
    asm("pushq %3\n"
        "popfq\n"
        "fcmov"
        "nu"
        " %2, %0\n"
        : "=t"(res)
        : "0"(a), "u"(b), "g"((long long int)0x0004));
    printf("fcmov%s eflags=0x%04llx-> %f\n", "nu", (long long int)0x0004, res);
  };
}
```