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

```asm
<spec_boundary_val>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  mov    %edx,-0x20(%rbp)
  mov    %rcx,-0x28(%rbp)
  mov    %r8,-0x30(%rbp)
  movsd  %xmm0,-0x38(%rbp)
  movsd  %xmm1,-0x40(%rbp)
  mov    -0x18(%rbp),%rax
  lea    D0(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L1
  movl   $0x1,-0x4(%rbp)
  jmp    L21
L66:
  mov    -0x28(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x4(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  -0x38(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  movsd  -0x40(%rbp),%xmm0
  addsd  %xmm0,%xmm0
  mov    -0x30(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rdx
  mov    -0x4(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x30(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x4(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  subsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x4(%rbp)
L21:
  mov    -0x20(%rbp),%eax
  cmp    -0x4(%rbp),%eax
  jge    L66
  jmp    L30
L1:
  mov    -0x18(%rbp),%rax
  lea    D9(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L30
  movl   $0x1,-0x4(%rbp)
  jmp    L11
L51:
  mov    -0x28(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x4(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x30(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rdx
  mov    -0x4(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x30(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x4(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movq   D23(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x4(%rbp)
L11:
  mov    -0x20(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  cmp    %eax,-0x4(%rbp)
  jle    L51
  mov    -0x20(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  add    $0x1,%eax
  mov    %eax,-0x4(%rbp)
  jmp    L12
L72:
  mov    -0x28(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x4(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  -0x38(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  movsd  -0x40(%rbp),%xmm0
  addsd  %xmm0,%xmm0
  mov    -0x30(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rdx
  mov    -0x4(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x30(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x4(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  subsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x4(%rbp)
L12:
  mov    -0x20(%rbp),%eax
  cmp    -0x4(%rbp),%eax
  jge    L72
L30:
  nop
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D0
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D9
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D23
type_guessed: f32[2]

tool: D0: Karman_vortex

tool: D9: flow_over_a_step

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

assistant: ```c
void spec_boundary_val(const char *problem, int imax, int jmax, double **U, double **V, double UI, double VI) {
  int j;
  if (strcmp(problem, "Karman_vortex") == 0) {
    for (j = 1; j < jmax + 1; j++) {
      U[0][j] = UI;
      V[0][j] = 2 * VI - V[1][j];
    }
  } else if (strcmp(problem, "flow_over_a_step") == 0) {
    for (j = 1; j <= jmax / 2; j++) {
      U[0][j] = 0.0;
      V[0][j] = -V[1][j];
    }
    for (j = jmax / 2 + 1; j < jmax + 1; j++) {
      U[0][j] = UI;
      V[0][j] = 2 * VI - V[1][j];
    }
  }
}
```