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

```asm
<grace_get_x_tick_major_minor>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x8(%rbp)
  mov    %rsi,-0x10(%rbp)
  mov    %edx,-0x14(%rbp)
  cmpl   $0x1,-0x14(%rbp)
  jne    L6
  mov    -0x8(%rbp),%rax
  movsd  D12(%rip),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x10(%rbp),%rax
  movl   $0x5,(%rax)
  jmp    L277
L6:
  cmpl   $0x2,-0x14(%rbp)
  jne    L51
  mov    -0x8(%rbp),%rax
  movsd  D81(%rip),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x10(%rbp),%rax
  movl   $0xb,(%rax)
  jmp    L277
L51:
  cmpl   $0x3,-0x14(%rbp)
  jne    L220
  mov    -0x8(%rbp),%rax
  movsd  D61(%rip),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x10(%rbp),%rax
  movl   $0x5,(%rax)
  jmp    L277
L220:
  cmpl   $0x7,-0x14(%rbp)
  jg     L232
  mov    -0x8(%rbp),%rax
  movsd  D61(%rip),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x10(%rbp),%rax
  movl   $0x3,(%rax)
  jmp    L277
L232:
  cmpl   $0xe,-0x14(%rbp)
  jg     L25
  mov    -0x8(%rbp),%rax
  movsd  D120(%rip),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x10(%rbp),%rax
  movl   $0x1,(%rax)
  jmp    L277
L25:
  cmpl   $0x3e,-0x14(%rbp)
  jg     L183
  mov    -0x8(%rbp),%rax
  movsd  D24(%rip),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x10(%rbp),%rax
  movl   $0x6,(%rax)
  jmp    L277
L183:
  cmpl   $0x64,-0x14(%rbp)
  jg     L144
  mov    -0x8(%rbp),%rax
  movsd  D121(%rip),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x10(%rbp),%rax
  movl   $0x1,(%rax)
  jmp    L277
L144:
  cmpl   $0xb4,-0x14(%rbp)
  jg     L271
  mov    -0x8(%rbp),%rax
  movsd  D25(%rip),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x10(%rbp),%rax
  movl   $0x3,(%rax)
  jmp    L277
L271:
  cmpl   $0x16e,-0x14(%rbp)
  jg     L148
  mov    -0x8(%rbp),%rax
  movsd  D90(%rip),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x10(%rbp),%rax
  movl   $0x3,(%rax)
  jmp    L277
L148:
  cmpl   $0x2dc,-0x14(%rbp)
  jg     L124
  mov    -0x8(%rbp),%rax
  movsd  D96(%rip),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x10(%rbp),%rax
  movl   $0x4,(%rax)
  jmp    L277
L124:
  cmpl   $0x44a,-0x14(%rbp)
  jg     L221
  mov    -0x8(%rbp),%rax
  movsd  D40(%rip),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x10(%rbp),%rax
  movl   $0xb,(%rax)
  jmp    L277
L221:
  cmpl   $0xe4c,-0x14(%rbp)
  jg     L200
  mov    -0x8(%rbp),%rax
  movsd  D41(%rip),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x10(%rbp),%rax
  movl   $0x3,(%rax)
  jmp    L277
L200:
  cmpl   $0x1572,-0x14(%rbp)
  jg     L31
  mov    -0x8(%rbp),%rax
  movsd  D83(%rip),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x10(%rbp),%rax
  movl   $0x1,(%rax)
  jmp    L277
L31:
  cmpl   $0x1c98,-0x14(%rbp)
  jg     L257
  mov    -0x8(%rbp),%rax
  movsd  D83(%rip),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x10(%rbp),%rax
  movl   $0x1,(%rax)
  jmp    L277
L257:
  mov    -0x8(%rbp),%rax
  movsd  D77(%rip),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x10(%rbp),%rax
  movl   $0x3,(%rax)
L277:
  nop
  pop    %rbp
  ret
```

tool_calls: name: parse_data
arguments: tag: D12
data_type: f64
name: parse_data
arguments: tag: D81
data_type: f64
name: parse_data
arguments: tag: D61
data_type: f64
name: parse_data
arguments: tag: D120
data_type: f64
name: parse_data
arguments: tag: D24
data_type: f64
name: parse_data
arguments: tag: D121
data_type: f64
name: parse_data
arguments: tag: D25
data_type: f64
name: parse_data
arguments: tag: D90
data_type: f64
name: parse_data
arguments: tag: D96
data_type: f64
name: parse_data
arguments: tag: D40
data_type: f64
name: parse_data
arguments: tag: D41
data_type: f64
name: parse_data
arguments: tag: D83
data_type: byte[8]
name: parse_data
arguments: tag: D77
data_type: byte[8]

tool: D12: 0.25

tool: D81: 0.5

tool: D61: 1

tool: D120: 2

tool: D24: 7

tool: D121: 10

tool: D25: 15

tool: D90: 30

tool: D96: 90

tool: D40: 365

tool: D41: 365.25

tool: {"D83": [0x00,0x00,0x00,0x00,0x00,0xd0,0x86,0x40]}

tool: {"D77": [0x00,0x00,0x00,0x00,0x00,0xd0,0x96,0x40]}

assistant: ```c
void grace_get_x_tick_major_minor(double *x_tick_major, int *x_tick_minor, int number_of_days) {
  if (number_of_days == 1) {
    *x_tick_major = 0.25;
    *x_tick_minor = 5;
  } else if (number_of_days == 2) {
    *x_tick_major = 0.50;
    *x_tick_minor = 11;
  } else if (number_of_days == 3) {
    *x_tick_major = 1.0;
    *x_tick_minor = 5;
  } else if (number_of_days <= 7) {
    *x_tick_major = 1.0;
    *x_tick_minor = 3;
  } else if (number_of_days <= 14) {
    *x_tick_major = 2.0;
    *x_tick_minor = 1;
  } else if (number_of_days <= 62) {
    *x_tick_major = 7.0;
    *x_tick_minor = 6;
  } else if (number_of_days <= 100) {
    *x_tick_major = 10.0;
    *x_tick_minor = 1;
  } else if (number_of_days <= 180) {
    *x_tick_major = 15.0;
    *x_tick_minor = 3;
  } else if (number_of_days <= 366) {
    *x_tick_major = 30.0;
    *x_tick_minor = 3;
  } else if (number_of_days <= (366 * 2)) {
    *x_tick_major = 90.0;
    *x_tick_minor = 4;
  } else if (number_of_days <= (366 * 3)) {
    *x_tick_major = 365.0;
    *x_tick_minor = 11;
  } else if (number_of_days <= 366 * 10) {
    *x_tick_major = 365.25;
    *x_tick_minor = 3;
  } else if (number_of_days <= (366 * 15)) {
    *x_tick_major = (365.0 * 2);
    *x_tick_minor = 1;
  } else if (number_of_days <= (366 * 20)) {
    *x_tick_major = (365.0 * 2);
    *x_tick_minor = 1;
  } else {
    *x_tick_major = (365 * 4);
    *x_tick_minor = 3;
  }
}
```