user: Translate the below assembly code into C programming language:

```asm
<translateRules>:
  endbr64
  push   %rbp
  mov    %rdi,%r9
  mov    %edx,%edi
  mov    %rsi,%r10
  mov    %rsp,%rbp
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x28(%rbp)
  xor    %eax,%eax
  movslq %edx,%rax
  mov    %rsp,%rcx
  lea    (%rax,%rax,8),%rax
  lea    0xf(,%rax,8),%rax
  mov    %rax,%rdx
  and    $0xfffffffffffff000,%rax
  sub    %rax,%rcx
  and    $0xfffffffffffffff0,%rdx
  cmp    %rcx,%rsp
  je     L66
L29:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rcx,%rsp
  jne    L29
L66:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  jne    L82
L127:
  lea    0x7(%rsp),%rsi
  movapd D9(%rip),%xmm1
  movapd D75(%rip),%xmm2
  mov    %rsi,%rax
  movapd D7(%rip),%xmm0
  and    $0xfffffffffffffff8,%rsi
  shr    $0x3,%rax
  movups %xmm1,0x10(,%rax,8)
  movapd D10(%rip),%xmm1
  movups %xmm2,0x130(,%rax,8)
  movq   D82(%rip),%xmm2
  movups %xmm1,0xa0(,%rax,8)
  movq   D39(%rip),%xmm1
  movups %xmm0,0x0(,%rax,8)
  movups %xmm1,0xd8(,%rax,8)
  movapd D65(%rip),%xmm1
  movups %xmm0,0x48(,%rax,8)
  movups %xmm1,0xe8(,%rax,8)
  movapd D1(%rip),%xmm1
  movups %xmm0,0x58(,%rax,8)
  movq   D17(%rip),%xmm0
  movups %xmm1,0xf8(,%rax,8)
  movsd  D103(%rip),%xmm1
  movups %xmm2,0x168(,%rax,8)
  movapd D107(%rip),%xmm2
  movups %xmm0,0x90(,%rax,8)
  movsd  %xmm1,0x108(,%rax,8)
  movups %xmm0,0x120(,%rax,8)
  movups %xmm2,0x178(,%rax,8)
  movups %xmm0,0x188(,%rax,8)
  movsd  %xmm1,0x198(,%rax,8)
  test   %edi,%edi
  jle    L83
  xor    %r11d,%r11d
  xor    %r8d,%r8d
  xor    %ecx,%ecx
  xor    %ebx,%ebx
  xor    %eax,%eax
  nopl   0x0(%rax)
L36:
  movslq %ebx,%r12
  lea    (%rax,%rax,8),%rdx
  add    $0x1,%ebx
  shl    $0x3,%rdx
  lea    (%r12,%r12,2),%r13
  lea    (%rdx,%r13,8),%rdx
  add    %rsi,%rdx
  movsd  0x8(%rdx),%xmm0
  ucomisd %xmm1,%xmm0
  jp     L115
  jne    L115
  cvttsd2si 0x10(%rdx),%edx
  movd   %ecx,%xmm0
  movd   %edx,%xmm3
  movslq %r8d,%rdx
  add    $0x1,%r8d
  punpckldq %xmm3,%xmm0
  movq   %xmm0,(%r10,%rdx,8)
  cmp    %edi,%ecx
  jge    L83
L56:
  movslq %ebx,%rdx
  lea    (%rdx,%rdx,2),%r12
  lea    (%rax,%rax,8),%rdx
  shl    $0x3,%rdx
  lea    (%rdx,%r12,8),%rdx
  ucomisd (%rsi,%rdx,1),%xmm1
  jp     L36
  jne    L36
  add    $0x1,%ecx
  cmp    %ecx,%edi
  jle    L83
  xor    %ebx,%ebx
  movslq %ecx,%rax
  jmp    L36
  nopw   0x0(%rax,%rax,1)
L115:
  movslq %r11d,%rdx
  lea    (%r12,%r12,2),%r12
  add    $0x1,%r11d
  lea    (%rdx,%rdx,2),%rdx
  lea    (%r9,%rdx,4),%r13
  cvttsd2si %xmm0,%edx
  movd   %ecx,%xmm0
  movd   %edx,%xmm4
  lea    (%rax,%rax,8),%rdx
  shl    $0x3,%rdx
  punpckldq %xmm4,%xmm0
  lea    (%rdx,%r12,8),%rdx
  movq   %xmm0,0x0(%r13)
  cvttsd2si 0x10(%rsi,%rdx,1),%edx
  mov    %edx,0x8(%r13)
  cmp    %edi,%ecx
  jl     L56
L83:
  mov    -0x28(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L121
  lea    -0x18(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %rbp
  ret
  nopl   (%rax)
L82:
  orq    $0x0,-0x8(%rsp,%rdx,1)
  jmp    L127
L121:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_label: D9
type: byte[16]
name: unpack_data
arguments: data_label: D75
type: byte[16]
name: unpack_data
arguments: data_label: D7
type: byte[16]
name: unpack_data
arguments: data_label: D10
type: byte[16]
name: unpack_data
arguments: data_label: D82
type: f64
name: unpack_data
arguments: data_label: D39
type: f64
name: unpack_data
arguments: data_label: D65
type: byte[16]
name: unpack_data
arguments: data_label: D1
type: byte[16]
name: unpack_data
arguments: data_label: D17
type: byte[8]
name: unpack_data
arguments: data_label: D103
type: byte[8]
name: unpack_data
arguments: data_label: D107
type: byte[16]

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

tool: {"D75": [0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xbf]}

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

tool: {"D10": [0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xbf]}

tool: D82: 0.7

tool: D39: 0.9

tool: {"D65": [0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x40,0x9a,0x99,0x99,0x99,0x99,0x99,0xb9,0x3f]}

tool: {"D1": [0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x40]}

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

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

tool: {"D107": [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x33,0x33,0x33,0x33,0x33,0x33,0xd3,0x3f]}

assistant: ```c
void translateRules(int nonRules[][3], int termRules[][2], int nonTerm) {
  int maxRuleCount = 2;
  double rules[nonTerm][maxRuleCount + 1][3];
  rules[0][0][0] = 1;
  rules[0][0][1] = -1;
  rules[0][0][2] = 0;
  rules[0][1][0] = -1;
  rules[1][0][0] = 1;
  rules[1][0][1] = -1;
  rules[1][0][2] = 1;
  rules[1][1][0] = -1;
  rules[2][0][0] = 1;
  rules[2][0][1] = 0;
  rules[2][0][2] = 3;
  rules[2][1][0] = -1;
  rules[3][0][0] = 0.9;
  rules[3][0][1] = 0;
  rules[3][0][2] = 4;
  rules[3][1][0] = 0.1;
  rules[3][1][1] = 1;
  rules[3][1][2] = 4;
  rules[3][2][0] = -1;
  rules[4][0][0] = 1;
  rules[4][0][1] = 0;
  rules[4][0][2] = 5;
  rules[4][1][0] = -1;
  rules[5][0][0] = 0.7;
  rules[5][0][1] = 0;
  rules[5][0][2] = 0;
  rules[5][1][0] = 0.3;
  rules[5][1][1] = 1;
  rules[5][1][2] = 0;
  rules[5][2][0] = -1;
  int termRuleOut = 0;
  int nonRule = 0;
  int nonTermNum = 0;
  int nonRuleOut = 0;
  while (nonTermNum < nonTerm) {
    if (rules[nonTermNum][nonRule][0] == -1) {
      nonTermNum++;
      nonRule = 0;
      if (nonTermNum >= nonTerm)
        break;
    }
    if (rules[nonTermNum][nonRule][1] == -1) {
      termRules[termRuleOut][0] = nonTermNum;
      termRules[termRuleOut][1] = rules[nonTermNum][nonRule][2];
      termRuleOut++;
      nonRule++;
    } else {
      nonRules[nonRuleOut][0] = nonTermNum;
      nonRules[nonRuleOut][1] = rules[nonTermNum][nonRule][1];
      nonRules[nonRuleOut][2] = rules[nonTermNum][nonRule][2];
      nonRuleOut++;
      nonRule++;
    }
  }
}
```