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

```asm
<get_bounds>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x70,%rsp
  movsd  %xmm0,-0x28(%rbp)
  movsd  %xmm1,-0x30(%rbp)
  movsd  %xmm2,-0x38(%rbp)
  movsd  %xmm3,-0x40(%rbp)
  movsd  %xmm4,-0x48(%rbp)
  movsd  %xmm5,-0x50(%rbp)
  movsd  %xmm6,-0x58(%rbp)
  movsd  %xmm7,-0x60(%rbp)
  mov    %rdi,-0x68(%rbp)
  movsd  0x10(%rbp),%xmm0
  comisd D116(%rip),%xmm0
  jae    L13
  movsd  D27(%rip),%xmm0
  comisd 0x10(%rbp),%xmm0
  jb     L21
L13:
  movsd  -0x38(%rbp),%xmm0
  movq   D45(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movsd  -0x38(%rbp),%xmm0
  movq   D45(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movsd  -0x38(%rbp),%xmm0
  movsd  %xmm0,-0x10(%rbp)
  movsd  -0x38(%rbp),%xmm0
  movsd  %xmm0,-0x8(%rbp)
  jmp    L90
L21:
  movsd  -0x50(%rbp),%xmm0
  mov    -0x40(%rbp),%rax
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  call   <fmin@plt>
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  subsd  -0x28(%rbp),%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movsd  -0x58(%rbp),%xmm0
  mov    -0x48(%rbp),%rax
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  call   <fmin@plt>
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  subsd  -0x30(%rbp),%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movsd  -0x50(%rbp),%xmm0
  mov    -0x40(%rbp),%rax
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  call   <fmax@plt>
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  subsd  -0x28(%rbp),%xmm0
  movsd  %xmm0,-0x10(%rbp)
  movsd  -0x58(%rbp),%xmm0
  mov    -0x48(%rbp),%rax
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  call   <fmax@plt>
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  subsd  -0x30(%rbp),%xmm0
  movsd  %xmm0,-0x8(%rbp)
  mov    -0x60(%rbp),%rax
  pxor   %xmm2,%xmm2
  movsd  0x10(%rbp),%xmm1
  movq   %rax,%xmm0
  call   <contains_angle@plt>
  test   %rax,%rax
  je     L58
  movsd  -0x20(%rbp),%xmm0
  comisd -0x38(%rbp),%xmm0
  jbe    L71
  movsd  -0x38(%rbp),%xmm0
  movsd  %xmm0,-0x20(%rbp)
L71:
  movsd  -0x38(%rbp),%xmm0
  comisd -0x10(%rbp),%xmm0
  jbe    L58
  movsd  -0x38(%rbp),%xmm0
  movsd  %xmm0,-0x10(%rbp)
L58:
  movsd  D63(%rip),%xmm0
  mov    -0x60(%rbp),%rax
  movapd %xmm0,%xmm2
  movsd  0x10(%rbp),%xmm1
  movq   %rax,%xmm0
  call   <contains_angle@plt>
  test   %rax,%rax
  je     L136
  movsd  -0x18(%rbp),%xmm0
  comisd -0x38(%rbp),%xmm0
  jbe    L114
  movsd  -0x38(%rbp),%xmm0
  movsd  %xmm0,-0x18(%rbp)
L114:
  movsd  -0x38(%rbp),%xmm0
  comisd -0x8(%rbp),%xmm0
  jbe    L136
  movsd  -0x38(%rbp),%xmm0
  movsd  %xmm0,-0x8(%rbp)
L136:
  movsd  D17(%rip),%xmm0
  mov    -0x60(%rbp),%rax
  movapd %xmm0,%xmm2
  movsd  0x10(%rbp),%xmm1
  movq   %rax,%xmm0
  call   <contains_angle@plt>
  test   %rax,%rax
  je     L87
  movsd  -0x38(%rbp),%xmm0
  movq   D45(%rip),%xmm1
  xorpd  %xmm0,%xmm1
  movsd  -0x20(%rbp),%xmm0
  comisd %xmm1,%xmm0
  jbe    L126
  movsd  -0x38(%rbp),%xmm0
  movq   D45(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  movsd  %xmm0,-0x20(%rbp)
L126:
  movsd  -0x38(%rbp),%xmm0
  movq   D45(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  comisd -0x10(%rbp),%xmm0
  jbe    L87
  movsd  -0x38(%rbp),%xmm0
  movq   D45(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  movsd  %xmm0,-0x10(%rbp)
L87:
  movsd  D88(%rip),%xmm0
  mov    -0x60(%rbp),%rax
  movapd %xmm0,%xmm2
  movsd  0x10(%rbp),%xmm1
  movq   %rax,%xmm0
  call   <contains_angle@plt>
  test   %rax,%rax
  je     L90
  movsd  -0x38(%rbp),%xmm0
  movq   D45(%rip),%xmm1
  xorpd  %xmm0,%xmm1
  movsd  -0x18(%rbp),%xmm0
  comisd %xmm1,%xmm0
  jbe    L145
  movsd  -0x38(%rbp),%xmm0
  movq   D45(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
L145:
  movsd  -0x38(%rbp),%xmm0
  movq   D45(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  comisd -0x8(%rbp),%xmm0
  jbe    L90
  movsd  -0x38(%rbp),%xmm0
  movq   D45(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
L90:
  movsd  -0x28(%rbp),%xmm0
  addsd  -0x20(%rbp),%xmm0
  mov    -0x68(%rbp),%rax
  movsd  %xmm0,(%rax)
  mov    -0x68(%rbp),%rax
  add    $0x8,%rax
  movsd  -0x30(%rbp),%xmm0
  addsd  -0x18(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x68(%rbp),%rax
  movsd  (%rax),%xmm1
  movsd  -0x10(%rbp),%xmm0
  subsd  -0x20(%rbp),%xmm0
  mov    -0x68(%rbp),%rax
  add    $0x10,%rax
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x68(%rbp),%rax
  add    $0x8,%rax
  movsd  (%rax),%xmm1
  movsd  -0x8(%rbp),%xmm0
  subsd  -0x18(%rbp),%xmm0
  mov    -0x68(%rbp),%rax
  add    $0x18,%rax
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  nop
  leave
  ret
```

tool_calls: name: parse_data
arguments: data_label: D116
type: f64[2]
name: parse_data
arguments: data_label: D27
type: f32[2]
name: parse_data
arguments: data_label: D45
type: f32[2]
name: parse_data
arguments: data_label: D63
type: f64
name: parse_data
arguments: data_label: D17
type: f64
name: parse_data
arguments: data_label: D88
type: f64

tool: {"D116": [360.0,-360.0]}

tool: {"D27": [0.0,-3.8515625]}

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

tool: D63: 90

tool: D17: 180

tool: D88: 270

assistant: ```c
void get_bounds(double center_x, double center_y, double radius, double start_x, double start_y, double end_x, double end_y, double start_angle, double arc_angle, double *bounds) {
  double x_min;
  double y_min;
  double x_max;
  double y_max;
  if (arc_angle >= 360.0 || arc_angle <= -360.0) {
    x_min = -radius;
    y_min = -radius;
    x_max = radius;
    y_max = radius;
  } else {
    x_min = fmin(start_x, end_x) - center_x;
    y_min = fmin(start_y, end_y) - center_y;
    x_max = fmax(start_x, end_x) - center_x;
    y_max = fmax(start_y, end_y) - center_y;
    if (contains_angle(start_angle, arc_angle, 0.0)) {
      if (x_min > radius) {
        x_min = radius;
      }
      if (x_max < radius) {
        x_max = radius;
      }
    }
    if (contains_angle(start_angle, arc_angle, 90.0)) {
      if (y_min > radius) {
        y_min = radius;
      }
      if (y_max < radius) {
        y_max = radius;
      }
    }
    if (contains_angle(start_angle, arc_angle, 180.0)) {
      if (x_min > -radius) {
        x_min = -radius;
      }
      if (x_max < -radius) {
        x_max = -radius;
      }
    }
    if (contains_angle(start_angle, arc_angle, 270.0)) {
      if (y_min > -radius) {
        y_min = -radius;
      }
      if (y_max < -radius) {
        y_max = -radius;
      }
    }
  }
  bounds[0] = center_x + x_min;
  bounds[1] = center_y + y_min;
  bounds[2] = bounds[0] + (x_max - x_min);
  bounds[3] = bounds[1] + (y_max - y_min);
}
```