user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<calculate_sunrise>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0xc8,%rsp
  mov    %edi,-0xa4(%rbp)
  mov    %esi,-0xa8(%rbp)
  mov    %edx,-0xac(%rbp)
  mov    %ecx,-0xb0(%rbp)
  movsd  %xmm0,-0xb8(%rbp)
  movsd  %xmm1,-0xc0(%rbp)
  movsd  %xmm2,-0xc8(%rbp)
  mov    -0xb0(%rbp),%edx
  mov    -0xac(%rbp),%ecx
  mov    -0xa8(%rbp),%eax
  mov    %ecx,%esi
  mov    %eax,%edi
  call   <calculate_day_of_year@plt>
  mov    %eax,-0x94(%rbp)
  movsd  D31(%rip),%xmm0
  movsd  %xmm0,-0x80(%rbp)
  movsd  -0xc0(%rbp),%xmm0
  movsd  D94(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x78(%rbp)
  cmpl   $0x0,-0xa4(%rbp)
  je     L63
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x94(%rbp),%xmm1
  movsd  D69(%rip),%xmm0
  subsd  -0x78(%rbp),%xmm0
  movsd  D117(%rip),%xmm2
  divsd  %xmm2,%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x90(%rbp)
  jmp    L29
L63:
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x94(%rbp),%xmm1
  movsd  D100(%rip),%xmm0
  subsd  -0x78(%rbp),%xmm0
  movsd  D117(%rip),%xmm2
  divsd  %xmm2,%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x90(%rbp)
L29:
  movsd  -0x90(%rbp),%xmm1
  movsd  D206(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  D67(%rip),%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x70(%rbp)
  mov    -0x70(%rbp),%rax
  movq   %rax,%xmm0
  call   <to_radian@plt>
  mov    %eax,%edi
  call   <sin@plt>
  movsd  D223(%rip),%xmm1
  mulsd  %xmm1,%xmm0
  addsd  -0x70(%rbp),%xmm0
  movsd  %xmm0,-0xd0(%rbp)
  movsd  -0x70(%rbp),%xmm0
  movapd %xmm0,%xmm4
  addsd  %xmm0,%xmm4
  movq   %xmm4,%rax
  movq   %rax,%xmm0
  call   <to_radian@plt>
  mov    %eax,%edi
  call   <sin@plt>
  movsd  D78(%rip),%xmm1
  mulsd  %xmm1,%xmm0
  movsd  -0xd0(%rbp),%xmm1
  addsd  %xmm0,%xmm1
  movsd  D11(%rip),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x68(%rbp)
  mov    -0x68(%rbp),%rax
  mov    $0x168,%esi
  mov    $0x0,%edi
  movq   %rax,%xmm0
  call   <adjust_to_range@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x68(%rbp)
  mov    -0x68(%rbp),%rax
  movq   %rax,%xmm0
  call   <to_radian@plt>
  mov    %eax,%edi
  call   <tan@plt>
  movsd  D20(%rip),%xmm1
  mulsd  %xmm1,%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  call   <atan@plt>
  mov    %eax,%edi
  call   <to_degree@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  %xmm0,-0x60(%rbp)
  mov    -0x60(%rbp),%rax
  mov    $0x168,%esi
  mov    $0x0,%edi
  movq   %rax,%xmm0
  call   <adjust_to_range@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x60(%rbp)
  movsd  -0x68(%rbp),%xmm0
  movsd  D135(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  call   <floor@plt>
  imul   $0x5a,%eax,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  %xmm0,-0x58(%rbp)
  movsd  -0x60(%rbp),%xmm0
  movsd  D135(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  call   <floor@plt>
  imul   $0x5a,%eax,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  %xmm0,-0x50(%rbp)
  movsd  -0x58(%rbp),%xmm0
  subsd  -0x50(%rbp),%xmm0
  movsd  -0x60(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x60(%rbp)
  movsd  -0x60(%rbp),%xmm0
  movsd  D94(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x60(%rbp)
  mov    -0x68(%rbp),%rax
  movq   %rax,%xmm0
  call   <to_radian@plt>
  mov    %eax,%edi
  call   <sin@plt>
  movsd  D54(%rip),%xmm1
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x48(%rbp)
  mov    -0x48(%rbp),%rax
  movq   %rax,%xmm0
  call   <asin@plt>
  mov    %eax,%edi
  call   <cos@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x40(%rbp)
  mov    -0x80(%rbp),%rax
  movq   %rax,%xmm0
  call   <to_radian@plt>
  mov    %eax,%edi
  call   <cos@plt>
  movq   %xmm0,%rbx
  mov    -0xb8(%rbp),%rax
  movq   %rax,%xmm0
  call   <to_radian@plt>
  mov    %eax,%edi
  call   <sin@plt>
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  mulsd  -0x48(%rbp),%xmm0
  movq   %rbx,%xmm3
  subsd  %xmm0,%xmm3
  movsd  %xmm3,-0xd0(%rbp)
  mov    -0xb8(%rbp),%rax
  movq   %rax,%xmm0
  call   <to_radian@plt>
  mov    %eax,%edi
  call   <cos@plt>
  movq   %xmm0,%rax
  movq   %rax,%xmm1
  mulsd  -0x40(%rbp),%xmm1
  movsd  -0xd0(%rbp),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x38(%rbp)
  movsd  -0x38(%rbp),%xmm0
  movsd  D57(%rip),%xmm1
  comisd %xmm1,%xmm0
  jbe    L9
  cmpl   $0x0,-0xa4(%rbp)
  je     L9
  mov    $0x0,%eax
  jmp    L42
L9:
  movsd  D5(%rip),%xmm0
  comisd -0x38(%rbp),%xmm0
  jbe    L11
  cmpl   $0x0,-0xa4(%rbp)
  jne    L11
  mov    $0x0,%eax
  jmp    L42
L11:
  cmpl   $0x0,-0xa4(%rbp)
  je     L41
  mov    -0x38(%rbp),%rax
  movq   %rax,%xmm0
  call   <acos@plt>
  mov    %eax,%edi
  call   <to_degree@plt>
  mov    $0x168,%edx
  sub    %eax,%edx
  pxor   %xmm0,%xmm0
  cvtsi2sd %edx,%xmm0
  movsd  %xmm0,-0x88(%rbp)
  jmp    L48
L41:
  mov    -0x38(%rbp),%rax
  movq   %rax,%xmm0
  call   <acos@plt>
  mov    %eax,%edi
  call   <to_degree@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  %xmm0,-0x88(%rbp)
L48:
  movsd  -0x88(%rbp),%xmm0
  movsd  D94(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x88(%rbp)
  movsd  -0x88(%rbp),%xmm0
  addsd  -0x60(%rbp),%xmm0
  movsd  -0x90(%rbp),%xmm2
  movsd  D66(%rip),%xmm1
  mulsd  %xmm2,%xmm1
  subsd  %xmm1,%xmm0
  movsd  D174(%rip),%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x30(%rbp)
  movsd  -0x30(%rbp),%xmm0
  subsd  -0x78(%rbp),%xmm0
  movsd  %xmm0,-0x28(%rbp)
  mov    -0x28(%rbp),%rax
  mov    $0x18,%esi
  mov    $0x0,%edi
  movq   %rax,%xmm0
  call   <adjust_to_range@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x28(%rbp)
  movsd  -0x28(%rbp),%xmm0
  addsd  -0xc8(%rbp),%xmm0
  movsd  %xmm0,-0x20(%rbp)
  mov    $0x18,%esi
  mov    $0x1,%edi
  call   <calloc@plt>
  mov    %rax,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  mov    -0xa8(%rbp),%edx
  mov    %edx,(%rax)
  mov    -0xac(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    -0x18(%rbp),%rax
  mov    %edx,0x4(%rax)
  mov    -0xb0(%rbp),%eax
  lea    -0x76c(%rax),%edx
  mov    -0x18(%rbp),%rax
  mov    %edx,0x8(%rax)
  mov    -0x20(%rbp),%rax
  movq   %rax,%xmm0
  call   <floor@plt>
  mov    -0x18(%rbp),%rdx
  mov    %eax,0xc(%rdx)
  mov    -0x18(%rbp),%rax
  mov    0xc(%rax),%eax
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  movsd  -0x20(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movsd  -0x20(%rbp),%xmm1
  movsd  D2(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  mov    -0x20(%rbp),%rax
  movq   %rax,%xmm0
  call   <floor@plt>
  mov    -0x18(%rbp),%rdx
  mov    %eax,0x10(%rdx)
  mov    -0x18(%rbp),%rax
  mov    0x10(%rax),%eax
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  movsd  -0x20(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movsd  -0x20(%rbp),%xmm1
  movsd  D2(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  mov    -0x20(%rbp),%rax
  movq   %rax,%xmm0
  call   <floor@plt>
  mov    -0x18(%rbp),%rdx
  mov    %eax,0x14(%rdx)
  mov    -0x18(%rbp),%rax
L42:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

tool_calls: name: unpack_data
arguments: data_label: D31
type: f64
name: unpack_data
arguments: data_label: D94
type: f64
name: unpack_data
arguments: data_label: D69
type: byte[8]
name: unpack_data
arguments: data_label: D117
type: byte[8]
name: unpack_data
arguments: data_label: D100
type: byte[8]
name: unpack_data
arguments: data_label: D206
type: f64
name: unpack_data
arguments: data_label: D67
type: f64
name: unpack_data
arguments: data_label: D223
type: f64
name: unpack_data
arguments: data_label: D78
type: f64
name: unpack_data
arguments: data_label: D11
type: f64
name: unpack_data
arguments: data_label: D20
type: f64
name: unpack_data
arguments: data_label: D135
type: f64
name: unpack_data
arguments: data_label: D54
type: f64
name: unpack_data
arguments: data_label: D57
type: byte[8]
name: unpack_data
arguments: data_label: D5
type: byte[8]
name: unpack_data
arguments: data_label: D66
type: f64
name: unpack_data
arguments: data_label: D174
type: f64
name: unpack_data
arguments: data_label: D2
type: byte[8]

tool: D31: 90.83333333333333

tool: D94: 15

tool: {"D69": [0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x40]}

tool: {"D117": [0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x40]}

tool: {"D100": [0x00,0x00,0x00,0x00,0x00,0x00,0x32,0x40]}

tool: D206: 0.9856

tool: D67: 3.289

tool: D223: 1.916

tool: D78: 0.02

tool: D11: 282.634

tool: D20: 0.91764

tool: D135: 90

tool: D54: 0.39782

tool: {"D57": [0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x3f]}

tool: {"D5": [0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xbf]}

tool: D66: 0.06571

tool: D174: 6.622

tool: {"D2": [0x00,0x00,0x00,0x00,0x00,0x00,0x4e,0x40]}

assistant: ```c
struct tm *calculate_sunrise(bool sunrise, int day, int month, int year, double latitude, double longitude, double local_offset) {
  int day_of_year = calculate_day_of_year(day, month, year);
  double zenith = 90.83333333333333;
  double lngHour = longitude / 15;
  double t;
  if (sunrise) {
    t = day_of_year + ((6 - lngHour) / 24);
  } else {
    t = day_of_year + ((18 - lngHour) / 24);
  }
  double M = (0.9856 * t) - 3.289;
  double L = M + (1.916 * sin(to_radian(M))) + (0.020 * sin(to_radian(2 * M))) + 282.634;
  L = adjust_to_range(L, 0, 360);
  double RA = to_degree(atan(0.91764 * tan(to_radian(L))));
  RA = adjust_to_range(RA, 0, 360);
  double Lquadrant = (floor(L / 90)) * 90;
  double RAquadrant = (floor(RA / 90)) * 90;
  RA = RA + (Lquadrant - RAquadrant);
  RA = RA / 15;
  double sinDec = 0.39782 * sin(to_radian(L));
  double cosDec = cos(asin(sinDec));
  double cosH = (cos(to_radian(zenith)) - (sinDec * sin(to_radian(latitude)))) / (cosDec * cos(to_radian(latitude)));
  if ((cosH > 1) && sunrise) {
    return NULL;
  } else if ((cosH < -1) && !sunrise) {
    return NULL;
  }
  double H;
  if (sunrise) {
    H = 360 - to_degree(acos(cosH));
  } else {
    H = to_degree(acos(cosH));
  }
  H = H / 15;
  double T = H + RA - (0.06571 * t) - 6.622;
  double UTC = T - lngHour;
  UTC = adjust_to_range(UTC, 0, 24);
  double localT = UTC + local_offset;
  struct tm *time = calloc(1, sizeof(struct tm));
  time->tm_mday = day;
  time->tm_mon = month - 1;
  time->tm_year = year - 1900;
  time->tm_hour = floor(localT);
  localT -= time->tm_hour;
  localT *= 60;
  time->tm_min = floor(localT);
  localT -= time->tm_min;
  localT *= 60;
  time->tm_sec = floor(localT);
  return time;
}
```