user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<grace_get_y_tick_major_minor>:
  endbr64
  movsd  D18(%rip),%xmm3
  comisd %xmm0,%xmm3
  ja     L78
  movsd  D116(%rip),%xmm2
  divsd  D59(%rip),%xmm0
  comisd %xmm0,%xmm2
  jbe    L109
  movl   $0x1,(%rsi)
  movsd  D43(%rip),%xmm2
  movl   $0x2,(%rdx)
L115:
  pxor   %xmm0,%xmm0
  cvtsi2sd %ecx,%xmm0
  mulsd  %xmm2,%xmm0
  comisd %xmm1,%xmm0
  jae    L95
L21:
  movsd  %xmm0,(%rdi)
  ret
  nopl   0x0(%rax,%rax,1)
L109:
  movsd  D109(%rip),%xmm2
  comisd %xmm0,%xmm2
  ja     L97
  movsd  D45(%rip),%xmm2
  comisd %xmm0,%xmm2
  ja     L44
  comisd %xmm0,%xmm3
  ja     L57
  movsd  D113(%rip),%xmm2
  comisd %xmm0,%xmm2
  ja     L44
  movsd  D80(%rip),%xmm2
  comisd %xmm0,%xmm2
  ja     L44
  movsd  D48(%rip),%xmm2
  comisd %xmm0,%xmm2
  ja     L44
  cvttsd2si %xmm0,%eax
  pxor   %xmm2,%xmm2
  cvtsi2sd %eax,%xmm2
L44:
  pxor   %xmm0,%xmm0
  movl   $0x1,(%rsi)
  cvtsi2sd %ecx,%xmm0
  mulsd  %xmm2,%xmm0
  comisd %xmm1,%xmm0
  jb     L21
L95:
  mulsd  D45(%rip),%xmm1
  movsd  %xmm1,(%rdi)
  ret
  nopl   0x0(%rax)
L78:
  movl   $0x1,(%rsi)
  movsd  D50(%rip),%xmm2
  movl   $0x2,(%rdx)
  jmp    L115
  nopl   0x0(%rax)
L97:
  movl   $0x1,(%rsi)
  movsd  D79(%rip),%xmm2
  movl   $0x1,(%rdx)
  jmp    L115
  nopl   0x0(%rax)
L57:
  movl   $0x1,(%rsi)
  movapd %xmm3,%xmm2
  jmp    L115
```

tool_calls: name: parse_data
arguments: data_tag: D18
data_type: f64
name: parse_data
arguments: data_tag: D116
data_type: f64
name: parse_data
arguments: data_tag: D59
data_type: f64
name: parse_data
arguments: data_tag: D43
data_type: f64
name: parse_data
arguments: data_tag: D109
data_type: f64
name: parse_data
arguments: data_tag: D45
data_type: f64
name: parse_data
arguments: data_tag: D113
data_type: f64
name: parse_data
arguments: data_tag: D80
data_type: f64
name: parse_data
arguments: data_tag: D48
data_type: f64
name: parse_data
arguments: data_tag: D50
data_type: f64
name: parse_data
arguments: data_tag: D79
data_type: f64

tool: D18: 1

tool: D116: 0.01

tool: D59: 25

tool: D43: 0.02

tool: D109: 0.1

tool: D45: 0.5

tool: D113: 2

tool: D80: 3

tool: D48: 4

tool: D50: 0.05

tool: D79: 0.2

assistant: ```c
void grace_get_y_tick_major_minor(double *y_tick_major, int *y_tick_minor, int *yaxis_ticklabel_precision, double y_range, int graph_list_length, double world_max_y) {
  double range_div_twenty_five;
  range_div_twenty_five = y_range / 25.0;
  if (y_range < 1) {
    *y_tick_major = 0.05;
    *y_tick_minor = 1;
    *yaxis_ticklabel_precision = 2;
  } else if (range_div_twenty_five < 0.01) {
    *y_tick_major = 0.02;
    *y_tick_minor = 1;
    *yaxis_ticklabel_precision = 2;
  } else if (range_div_twenty_five < 0.1) {
    *y_tick_major = 0.2;
    *y_tick_minor = 1;
    *yaxis_ticklabel_precision = 1;
  } else if (range_div_twenty_five < 0.5) {
    *y_tick_major = 0.5;
    *y_tick_minor = 1;
  } else if (range_div_twenty_five < 1.0) {
    *y_tick_major = 1.0;
    *y_tick_minor = 1;
  } else if (range_div_twenty_five < 2.0) {
    *y_tick_major = 2.0;
    *y_tick_minor = 1;
  } else if (range_div_twenty_five < 3.0) {
    *y_tick_major = 3.0;
    *y_tick_minor = 1;
  } else if (range_div_twenty_five < 4.0) {
    *y_tick_major = 4.0;
    *y_tick_minor = 1;
  } else {
    *y_tick_major = (double)(int)range_div_twenty_five;
    *y_tick_minor = 1;
  }
  *y_tick_major *= (double)graph_list_length;
  if (*y_tick_major >= world_max_y)
    *y_tick_major = world_max_y / 2.0;
}
```