user: What would the C source look like for the assembly code provided here?

```asm
<change_basis_tricli>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x170,%rsp
  mov    %rdi,-0x158(%rbp)
  mov    %rsi,-0x160(%rbp)
  mov    %rdx,-0x168(%rbp)
  movsd  %xmm0,-0x170(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x148(%rbp)
  jmp    L57
L93:
  movl   $0x0,-0x144(%rbp)
  jmp    L87
L111:
  mov    -0x148(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  shl    $0x3,%rax
  mov    %rax,%rdx
  mov    -0x160(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x148(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %eax,%edx
  mov    -0x144(%rbp),%eax
  add    %eax,%edx
  mov    -0x144(%rbp),%eax
  cltq
  movsd  (%rcx,%rax,8),%xmm0
  movslq %edx,%rax
  movsd  %xmm0,-0x140(%rbp,%rax,8)
  addl   $0x1,-0x144(%rbp)
L87:
  cmpl   $0x2,-0x144(%rbp)
  jle    L111
  addl   $0x1,-0x148(%rbp)
L57:
  cmpl   $0x2,-0x148(%rbp)
  jle    L93
  movsd  -0x170(%rbp),%xmm0
  mulsd  %xmm0,%xmm0
  movq   %xmm0,%rdx
  lea    -0x140(%rbp),%rax
  movq   %rdx,%xmm0
  mov    %rax,%rdi
  call   <niggli_reduce@plt>
  test   %eax,%eax
  jne    L28
  mov    $0x0,%eax
  jmp    L34
L28:
  movl   $0x0,-0x148(%rbp)
  jmp    L118
L61:
  movl   $0x0,-0x144(%rbp)
  jmp    L148
L36:
  mov    -0x148(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %eax,%edx
  mov    -0x144(%rbp),%eax
  add    %edx,%eax
  cltq
  movsd  -0x140(%rbp,%rax,8),%xmm0
  mov    -0x144(%rbp),%eax
  movslq %eax,%rcx
  mov    -0x148(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  add    %rcx,%rax
  movsd  %xmm0,-0xf0(%rbp,%rax,8)
  addl   $0x1,-0x144(%rbp)
L148:
  cmpl   $0x2,-0x144(%rbp)
  jle    L36
  addl   $0x1,-0x148(%rbp)
L118:
  cmpl   $0x2,-0x148(%rbp)
  jle    L61
  lea    -0xf0(%rbp),%rax
  mov    %rax,%rdi
  call   <mat_get_determinant_d3@plt>
  test   %rax,%rax
  jns    L159
  movl   $0x0,-0x148(%rbp)
  jmp    L100
L103:
  movl   $0x0,-0x144(%rbp)
  jmp    L15
L64:
  mov    -0x144(%rbp),%eax
  movslq %eax,%rcx
  mov    -0x148(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  add    %rcx,%rax
  movsd  -0xf0(%rbp,%rax,8),%xmm0
  movq   D2(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  mov    -0x144(%rbp),%eax
  movslq %eax,%rcx
  mov    -0x148(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  add    %rcx,%rax
  movsd  %xmm0,-0xf0(%rbp,%rax,8)
  addl   $0x1,-0x144(%rbp)
L15:
  cmpl   $0x2,-0x144(%rbp)
  jle    L64
  addl   $0x1,-0x148(%rbp)
L100:
  cmpl   $0x2,-0x148(%rbp)
  jle    L103
L159:
  mov    -0x168(%rbp),%rcx
  lea    -0xa0(%rbp),%rax
  mov    $0x0,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <mat_inverse_matrix_d3@plt>
  lea    -0xf0(%rbp),%rdx
  lea    -0xa0(%rbp),%rcx
  lea    -0x50(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <mat_multiply_matrix_d3@plt>
  lea    -0x50(%rbp),%rdx
  mov    -0x158(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <mat_cast_matrix_3d_to_3i@plt>
  mov    $0x1,%eax
L34:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L74
  call   <__stack_chk_fail@plt>
L74:
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: label: D2
type_guessed: byte[8]

tool: {"D2": [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80]}

assistant: ```c
int change_basis_tricli(int int_transform_mat[3][3], double conv_lattice[3][3], double primitive_lattice[3][3], const double symprec) {
  int i, j;
  double niggli_cell[9];
  double smallest_lattice[3][3], inv_lattice[3][3], transform_mat[3][3];
  for (i = 0; i < 3; i++) {
    for (j = 0; j < 3; j++) {
      niggli_cell[i * 3 + j] = conv_lattice[i][j];
    }
  }
  if (!niggli_reduce(niggli_cell, symprec * symprec)) {
    return 0;
  }
  for (i = 0; i < 3; i++) {
    for (j = 0; j < 3; j++) {
      smallest_lattice[i][j] = niggli_cell[i * 3 + j];
    }
  }
  if (mat_get_determinant_d3(smallest_lattice) < 0) {
    for (i = 0; i < 3; i++) {
      for (j = 0; j < 3; j++) {
        smallest_lattice[i][j] = -smallest_lattice[i][j];
      }
    }
  }
  mat_inverse_matrix_d3(inv_lattice, primitive_lattice, 0);
  mat_multiply_matrix_d3(transform_mat, inv_lattice, smallest_lattice);
  mat_cast_matrix_3d_to_3i(int_transform_mat, transform_mat);
  return 1;
}
```