user: 请将以下的汇编代码转换成C语言代码：

```asm
<kOZ>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  movsd  %xmm0,-0x38(%rbp)
  movsd  %xmm1,-0x40(%rbp)
  movsd  %xmm2,-0x48(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  data16 lea 0x2e3b(%rip),%rdi        # 3fc0 <_DYNAMIC+0x1d0>
  data16 data16 rex.W call 1090 <__tls_get_addr@plt>
  movsd  (%rax),%xmm0
  ucomisd -0x38(%rbp),%xmm0
  jp     L1
  ucomisd -0x38(%rbp),%xmm0
  jne    L1
  data16 lea 0x2e29(%rip),%rdi        # 3fd0 <_DYNAMIC+0x1e0>
  data16 data16 rex.W call 1090 <__tls_get_addr@plt>
  movsd  (%rax),%xmm0
  ucomisd -0x40(%rbp),%xmm0
  jp     L1
  ucomisd -0x40(%rbp),%xmm0
  jne    L1
  data16 lea 0x2de7(%rip),%rdi        # 3fb0 <_DYNAMIC+0x1c0>
  data16 data16 rex.W call 1090 <__tls_get_addr@plt>
  movsd  (%rax),%xmm0
  jmp    L47
L1:
  data16 lea 0x2dde(%rip),%rdi        # 3fc0 <_DYNAMIC+0x1d0>
  data16 data16 rex.W call 1090 <__tls_get_addr@plt>
  movsd  -0x38(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  data16 lea 0x2dd5(%rip),%rdi        # 3fd0 <_DYNAMIC+0x1e0>
  data16 data16 rex.W call 1090 <__tls_get_addr@plt>
  movsd  -0x40(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  movsd  D60(%rip),%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movsd  -0x48(%rbp),%xmm1
  movsd  D54(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movsd  -0x40(%rbp),%xmm1
  movsd  D54(%rip),%xmm0
  mulsd  %xmm0,%xmm1
  movq   %xmm1,%rax
  movq   %rax,%xmm0
  call   <cos@plt>
  movq   %xmm0,%rax
  movq   %rax,%xmm3
  mulsd  -0x18(%rbp),%xmm3
  movsd  %xmm3,-0x50(%rbp)
  movsd  -0x18(%rbp),%xmm1
  movsd  D84(%rip),%xmm0
  movapd %xmm1,%xmm4
  mulsd  %xmm0,%xmm4
  movq   %xmm4,%rax
  movq   %rax,%xmm0
  call   <cos@plt>
  movsd  -0x50(%rbp),%xmm1
  subsd  %xmm0,%xmm1
  movsd  D170(%rip),%xmm0
  mulsd  %xmm0,%xmm1
  movsd  D84(%rip),%xmm0
  addsd  %xmm1,%xmm0
  mulsd  -0x20(%rbp),%xmm0
  movsd  D84(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  movsd  -0x38(%rbp),%xmm0
  movq   D176(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  movsd  D112(%rip),%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  pxor   %xmm0,%xmm0
  comisd -0x28(%rbp),%xmm0
  jbe    L6
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x28(%rbp)
L6:
  mov    -0x28(%rbp),%rax
  movq   %rax,%xmm0
  mov    $0x6,%edi
  mov    $0x1,%eax
  call   <mymin@plt>
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  movsd  D97(%rip),%xmm0
  mulsd  %xmm0,%xmm1
  movsd  D1(%rip),%xmm0
  subsd  %xmm1,%xmm0
  movsd  D1(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movsd  -0x10(%rbp),%xmm0
  mulsd  -0x8(%rbp),%xmm0
  movsd  %xmm0,-0x50(%rbp)
  data16 lea 0x2c5c(%rip),%rdi        # 3fb0 <_DYNAMIC+0x1c0>
  data16 data16 rex.W call 1090 <__tls_get_addr@plt>
  movsd  -0x50(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  data16 lea 0x2c43(%rip),%rdi        # 3fb0 <_DYNAMIC+0x1c0>
  data16 data16 rex.W call 1090 <__tls_get_addr@plt>
  movsd  (%rax),%xmm0
L47:
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: tag: D60
type: f64
name: retrieve_data
arguments: tag: D54
type: byte[8]
name: retrieve_data
arguments: tag: D84
type: f64
name: retrieve_data
arguments: tag: D170
type: f64
name: retrieve_data
arguments: tag: D176
type: f32[2]
name: retrieve_data
arguments: tag: D112
type: f32[2]
name: retrieve_data
arguments: tag: D97
type: f64
name: retrieve_data
arguments: tag: D1
type: f32[2]

tool: D60: 0.031

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

tool: D84: 3

tool: D170: 0.4

tool: {"D176": [0.0,-0.0]}

tool: {"D112": [0.0,2.625]}

tool: D97: 11.6

tool: {"D1": [0.0,3.390625]}

assistant: ```c
double kOZ(double AltS, double sunra, double Lat) {
  double CHANGEKO, OZ, LT, kOZret;
  static __thread double koz_last, alts_last, sunra_last;
  double altslim = 0;
  if (AltS == alts_last && sunra == sunra_last)
    return koz_last;
  alts_last = AltS;
  sunra_last = sunra;
  OZ = 0.031;
  LT = Lat * (3.14159265358979323846 / 180.0);
  kOZret = OZ * (3.0 + 0.4 * (LT * cos(sunra * (3.14159265358979323846 / 180.0)) - cos(3 * LT))) / 3.0;
  altslim = -AltS - 12;
  if (altslim < 0)
    altslim = 0;
  CHANGEKO = (100 - 11.6 * mymin(6, altslim)) / 100;
  if ((0)) {
    static int a = 0;
    if (a == 0)
      printf("bsk=%f %f\n", kOZret, AltS);
    a = 1;
  }
  koz_last = kOZret * CHANGEKO;
  return koz_last;
}
```