user: Converte this assembly snippet into its equivalent C code:

```asm
<pieCalCheckResultGMSP>:
  endbr64
  pxor   %xmm0,%xmm0
  sub    $0x18,%rsp
  movsd  D89(%rip),%xmm3
  cvtsi2sd %edi,%xmm0
  movapd %xmm3,%xmm7
  divsd  %xmm0,%xmm7
  cvtsd2ss %xmm7,%xmm7
  test   %edi,%edi
  jle    L31
  pxor   %xmm8,%xmm8
  pxor   %xmm6,%xmm6
  add    $0x1,%edi
  mov    $0x1,%eax
  movsd  D80(%rip),%xmm5
  movsd  D0(%rip),%xmm4
  movaps %xmm8,%xmm1
  cvtss2sd %xmm7,%xmm6
  nopl   (%rax)
L47:
  pxor   %xmm0,%xmm0
  movapd %xmm4,%xmm2
  cvtss2sd %xmm1,%xmm1
  cvtsi2sd %eax,%xmm0
  add    $0x1,%eax
  addsd  %xmm5,%xmm0
  mulsd  %xmm6,%xmm0
  cvtsd2ss %xmm0,%xmm0
  mulss  %xmm0,%xmm0
  cvtss2sd %xmm0,%xmm0
  addsd  %xmm3,%xmm0
  divsd  %xmm0,%xmm2
  addsd  %xmm2,%xmm1
  cvtsd2ss %xmm1,%xmm1
  cmp    %edi,%eax
  jne    L47
L6:
  mulss  %xmm1,%xmm7
  mov    $0x1,%edx
  movaps %xmm7,%xmm1
  subss  (%rsi),%xmm1
  divss  %xmm7,%xmm1
  ucomiss %xmm8,%xmm1
  setp   %al
  cmovne %edx,%eax
  test   %al,%al
  je     L17
  comiss D84(%rip),%xmm1
  ja     L27
L17:
  lea    D37(%rip),%rdi
  call   <puts@plt>
  xor    %eax,%eax
  add    $0x18,%rsp
  ret
  nopl   0x0(%rax)
L27:
  comiss %xmm8,%xmm1
  movss  %xmm1,0xc(%rsp)
  jbe    L17
  lea    D4(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  movsd  D72(%rip),%xmm0
  mov    $0x1,%eax
  lea    D87(%rip),%rdi
  call   <printf@plt>
  movss  0xc(%rsp),%xmm1
  pxor   %xmm0,%xmm0
  lea    D83(%rip),%rdi
  mov    $0x1,%eax
  cvtss2sd %xmm1,%xmm0
  call   <printf@plt>
  xor    %eax,%eax
  add    $0x18,%rsp
  ret
  nopl   0x0(%rax)
L31:
  pxor   %xmm8,%xmm8
  movaps %xmm8,%xmm1
  jmp    L6
```

tool_calls: name: parse_data
arguments: data_label: D89
type_infered: f64
name: parse_data
arguments: data_label: D80
type_infered: f64
name: parse_data
arguments: data_label: D0
type_infered: f64
name: parse_data
arguments: data_label: D84
type_infered: byte[4]
name: parse_data
arguments: data_label: D37
type_infered: string
name: parse_data
arguments: data_label: D4
type_infered: string
name: parse_data
arguments: data_label: D72
type_infered: byte[8]
name: parse_data
arguments: data_label: D87
type_infered: string
name: parse_data
arguments: data_label: D83
type_infered: string

tool: D89: 1

tool: D80: 0.5

tool: D0: 4

tool: {"D84": [0x77,0xcc,0x2b,0x32]}

tool: D37: 
		 Result Verification success


tool: D4:  
 Results verfication : Failed

tool: {"D72": [0x00,0x00,0x00,0xe0,0x8e,0x79,0x45,0x3e]}

tool: D87:  
 Considered machine precision : %e

tool: D83:  
 Relative Error                  : %e

assistant: ```c
int pieCalCheckResultGMSP(int noOfIntervals, float *finalPieValue) {
  float totalsum = 0.0f, x = 0.0f;
  float h = 1.0 / noOfIntervals;
  int i;
  float errorNorm = 0.0f;
  float eps = 1.0e-8f;
  float relativeError = 0.0f;
  int flag = 0;
  for (i = 1; i < noOfIntervals + 1; i = i + 1) {
    x = h * (i + 0.5);
    totalsum = totalsum + 4.0 / (1.0 + x * x);
  }
  totalsum = totalsum * h;
  relativeError = ((totalsum - ((*finalPieValue))) / totalsum);
  if (relativeError > eps && relativeError != 0.0e+00) {
    if (errorNorm < relativeError) {
      errorNorm = relativeError;
      flag = 1;
    }
  }
  if (flag == 1) {
    printf(" \n Results verfication : Failed");
    printf(" \n Considered machine precision : %e", eps);
    printf(" \n Relative Error                  : %e", errorNorm);
  }
  if (flag == 0) {
    printf("\n\t\t Result Verification success\n\n");
  }
  return 0;
}
```