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

```asm
<zeta>:
  endbr64
  movapd %xmm0,%xmm2
  cmp    $0x2,%edi
  je     L40
  jg     L29
  test   %edi,%edi
  je     L47
  cmp    $0x1,%edi
  jne    L64
  movapd %xmm0,%xmm3
  subsd  D227(%rip),%xmm3
  movsd  D189(%rip),%xmm4
  divsd  %xmm4,%xmm3
  subsd  %xmm0,%xmm1
  movapd %xmm1,%xmm0
  divsd  %xmm4,%xmm0
  movapd %xmm0,%xmm1
  mulsd  D347(%rip),%xmm1
  movapd %xmm3,%xmm2
  mulsd  D18(%rip),%xmm2
  addsd  D297(%rip),%xmm2
  addsd  %xmm1,%xmm2
  mulsd  %xmm0,%xmm2
  movapd %xmm3,%xmm1
  mulsd  D395(%rip),%xmm1
  addsd  D229(%rip),%xmm1
  mulsd  %xmm3,%xmm1
  addsd  D20(%rip),%xmm1
  addsd  %xmm2,%xmm1
  mulsd  %xmm1,%xmm0
  jmp    L71
L29:
  cmp    $0x3,%edi
  jne    L64
  subsd  %xmm0,%xmm1
  movsd  D189(%rip),%xmm0
  divsd  %xmm0,%xmm1
  movapd %xmm1,%xmm4
  mulsd  D386(%rip),%xmm4
  subsd  D227(%rip),%xmm2
  divsd  %xmm0,%xmm2
  subsd  D238(%rip),%xmm2
  movapd %xmm2,%xmm3
  mulsd  D291(%rip),%xmm3
  addsd  D268(%rip),%xmm3
  addsd  %xmm4,%xmm3
  mulsd  %xmm1,%xmm3
  movapd %xmm2,%xmm0
  mulsd  D324(%rip),%xmm0
  addsd  D229(%rip),%xmm0
  mulsd  %xmm2,%xmm0
  addsd  D60(%rip),%xmm0
  addsd  %xmm3,%xmm0
  mulsd  %xmm1,%xmm0
  jmp    L71
L47:
  subsd  %xmm0,%xmm1
  movsd  D189(%rip),%xmm4
  divsd  %xmm4,%xmm1
  movapd %xmm1,%xmm3
  mulsd  D386(%rip),%xmm3
  addsd  D334(%rip),%xmm3
  mulsd  %xmm1,%xmm3
  subsd  D227(%rip),%xmm2
  movapd %xmm2,%xmm0
  divsd  %xmm4,%xmm0
  subsd  D238(%rip),%xmm0
  mulsd  D201(%rip),%xmm0
  addsd  D190(%rip),%xmm0
  addsd  %xmm3,%xmm0
  mulsd  %xmm1,%xmm0
L71:
  divsd  D296(%rip),%xmm0
  mulsd  D348(%rip),%xmm0
  ret
L40:
  movapd %xmm0,%xmm3
  subsd  D227(%rip),%xmm3
  movsd  D189(%rip),%xmm4
  divsd  %xmm4,%xmm3
  subsd  %xmm0,%xmm1
  movapd %xmm1,%xmm0
  divsd  %xmm4,%xmm0
  movapd %xmm0,%xmm1
  mulsd  D272(%rip),%xmm1
  movapd %xmm3,%xmm2
  mulsd  D370(%rip),%xmm2
  addsd  D363(%rip),%xmm2
  addsd  %xmm1,%xmm2
  mulsd  %xmm0,%xmm2
  movapd %xmm3,%xmm1
  mulsd  D402(%rip),%xmm1
  addsd  D229(%rip),%xmm1
  mulsd  %xmm3,%xmm1
  addsd  D139(%rip),%xmm1
  addsd  %xmm2,%xmm1
  mulsd  %xmm1,%xmm0
  jmp    L71
L64:
  movapd %xmm2,%xmm3
  subsd  D151(%rip),%xmm3
  movsd  D233(%rip),%xmm4
  divsd  %xmm4,%xmm3
  subsd  %xmm2,%xmm1
  movapd %xmm1,%xmm0
  divsd  %xmm4,%xmm0
  movapd %xmm0,%xmm1
  mulsd  D187(%rip),%xmm1
  movapd %xmm3,%xmm2
  mulsd  D148(%rip),%xmm2
  addsd  D98(%rip),%xmm2
  addsd  %xmm1,%xmm2
  mulsd  %xmm0,%xmm2
  movapd %xmm3,%xmm1
  mulsd  D323(%rip),%xmm1
  addsd  D104(%rip),%xmm1
  mulsd  %xmm3,%xmm1
  addsd  D113(%rip),%xmm1
  addsd  %xmm2,%xmm1
  mulsd  %xmm1,%xmm0
  jmp    L71
```

tool_calls: name: read_data
arguments: data_tag: D227
type_infered: byte[8]
name: read_data
arguments: data_tag: D189
type_infered: f64
name: read_data
arguments: data_tag: D347
type_infered: f64
name: read_data
arguments: data_tag: D18
type_infered: byte[8]
name: read_data
arguments: data_tag: D297
type_infered: f64
name: read_data
arguments: data_tag: D395
type_infered: f64
name: read_data
arguments: data_tag: D229
type_infered: f64
name: read_data
arguments: data_tag: D20
type_infered: f64
name: read_data
arguments: data_tag: D386
type_infered: f64
name: read_data
arguments: data_tag: D238
type_infered: f64
name: read_data
arguments: data_tag: D291
type_infered: byte[8]
name: read_data
arguments: data_tag: D268
type_infered: f64
name: read_data
arguments: data_tag: D324
type_infered: f64
name: read_data
arguments: data_tag: D60
type_infered: f64
name: read_data
arguments: data_tag: D334
type_infered: f64
name: read_data
arguments: data_tag: D201
type_infered: f64
name: read_data
arguments: data_tag: D190
type_infered: f64
name: read_data
arguments: data_tag: D296
type_infered: f64
name: read_data
arguments: data_tag: D348
type_infered: byte[8]
name: read_data
arguments: data_tag: D272
type_infered: f64
name: read_data
arguments: data_tag: D370
type_infered: byte[8]
name: read_data
arguments: data_tag: D363
type_infered: f64
name: read_data
arguments: data_tag: D402
type_infered: f64
name: read_data
arguments: data_tag: D139
type_infered: f64
name: read_data
arguments: data_tag: D151
type_infered: f64
name: read_data
arguments: data_tag: D233
type_infered: f64
name: read_data
arguments: data_tag: D187
type_infered: f64
name: read_data
arguments: data_tag: D148
type_infered: byte[8]
name: read_data
arguments: data_tag: D98
type_infered: f64
name: read_data
arguments: data_tag: D323
type_infered: byte[8]
name: read_data
arguments: data_tag: D104
type_infered: f64
name: read_data
arguments: data_tag: D113
type_infered: f64

tool: {"D227": [0x2c,0xf0,0x0e,0x1a,0x2b,0x49,0x42,0x41]}

tool: D189: 36524.21987817305

tool: D347: 0.017995

tool: {"D18": [0x8b,0xe0,0x7f,0x2b,0xd9,0xb1,0x31,0xbf]}

tool: D297: 0.3024

tool: D395: 6e-05

tool: D229: 1.3972

tool: D20: 2303.5545

tool: D386: 0.018

tool: D238: 0.5

tool: {"D291": [0x97,0xe5,0xeb,0x32,0xfc,0xa7,0x2b,0xbf]}

tool: D268: 0.3023

tool: D324: 0.000125

tool: D60: 2304.253

tool: D334: 0.302

tool: D201: 1.396

tool: D190: 2304.25

tool: D296: 3600

tool: {"D348": [0x39,0x9d,0x52,0xa2,0x46,0xdf,0x91,0x3f]}

tool: D272: 0.017996

tool: {"D370": [0x9d,0x2a,0xdf,0x33,0x12,0xa1,0x31,0xbf]}

tool: D363: 0.30242

tool: D402: 5.9e-05

tool: D139: 2303.5548

tool: D151: 2451545

tool: D233: 36525

tool: D187: 0.017998

tool: {"D148": [0x36,0x77,0xf4,0xbf,0x5c,0x8b,0x36,0xbf]}

tool: D98: 0.30188

tool: {"D323": [0xf7,0x8f,0x85,0xe8,0x10,0x38,0x22,0xbf]}

tool: D104: 1.39656

tool: D113: 2306.2181

assistant: ```c
double zeta(double j1, double j2, int pflag) {
  double T;
  double t;
  double zeta;
  switch (pflag) {
  case (0):
    T = (j1 - ((2433282.42345905) + ((1850) - 1950.0) * ((36524.21987817305) / 100.0))) / (36524.21987817305);
    t = (j2 - j1) / (36524.21987817305);
    zeta = (0.018);
    zeta *= t;
    zeta += (0.302);
    zeta *= t;
    zeta += (2304.250 + ((T - 0.5) * (1.396)));
    zeta *= t;
    break;
  case (1):
    T = (j1 - ((2433282.42345905) + ((1850) - 1950.0) * ((36524.21987817305) / 100.0))) / (36524.21987817305);
    t = (j2 - j1) / (36524.21987817305);
    zeta = (0.017995);
    zeta *= t;
    zeta += (0.30240 + (T * (-0.000270)));
    zeta *= t;
    zeta += (2303.5545 + (T * (1.39720 + (T * (0.000060)))));
    zeta *= t;
    break;
  case (2):
    T = (j1 - ((2433282.42345905) + ((1850) - 1950.0) * ((36524.21987817305) / 100.0))) / (36524.21987817305);
    t = (j2 - j1) / (36524.21987817305);
    zeta = (0.017996);
    zeta *= t;
    zeta += (0.30242 + (T * (-0.000269)));
    zeta *= t;
    zeta += (2303.5548 + (T * (1.39720 + (T * (0.000059)))));
    zeta *= t;
    break;
  case (3):
    T = (j1 - ((2433282.42345905) + ((1850) - 1950.0) * ((36524.21987817305) / 100.0))) / (36524.21987817305);
    t = (j2 - j1) / (36524.21987817305);
    zeta = (0.0180);
    zeta *= t;
    zeta += (0.3023 + ((T - 0.5) * (-0.000211)));
    zeta *= t;
    zeta += (2304.253 + ((T - 0.5) * (1.3972 + ((T - 0.5) * (0.000125)))));
    zeta *= t;
    break;
  case (4):
  default:
    T = (j1 - (2451545.0)) / (36525.0);
    t = (j2 - j1) / (36525.0);
    zeta = (0.017998);
    zeta *= t;
    zeta += (0.30188 + (T * (-0.000344)));
    zeta *= t;
    zeta += (2306.2181 + (T * (1.39656 + (T * (-0.000139)))));
    zeta *= t;
    break;
  }
  zeta = (((((zeta) / 3600.0)) * ((3.14159265358979323846) / 180.0)));
  return (zeta);
}
```