user: Please show me the C implementation that matches the assembly code listed below:

```asm
<spec_boundary_val>:
  endbr64
  push   %r13
  lea    D19(%rip),%rsi
  mov    %rdi,%r13
  push   %r12
  mov    %rcx,%r12
  push   %rbp
  mov    %r8,%rbp
  push   %rbx
  mov    %edx,%ebx
  sub    $0x18,%rsp
  movsd  %xmm0,(%rsp)
  movsd  %xmm1,0x8(%rsp)
  call   <strcmp@plt>
  movsd  (%rsp),%xmm2
  test   %rax,%rax
  jne    L31
  test   %ebx,%ebx
  jle    L156
  mov    (%r12),%rdx
  mov    0x0(%rbp),%rsi
  mov    0x8(%rbp),%rcx
  movsd  0x8(%rsp),%xmm0
  lea    0x8(%rsi),%rdi
  lea    0x10(%rdx),%rax
  cmp    %rax,%rdi
  lea    0x10(%rcx),%r8
  addsd  %xmm0,%xmm0
  setne  %al
  cmp    %r8,%rdi
  setne  %dil
  and    %edi,%eax
  lea    -0x1(%rbx),%edi
  cmp    $0x1,%edi
  seta   %dil
  test   %dil,%al
  je     L159
  lea    0x8(%rdx),%rdi
  lea    0x18(%rcx),%rax
  cmp    %rax,%rdi
  lea    0x8(%rcx),%r8
  lea    0x18(%rdx),%rdi
  setae  %al
  cmp    %rdi,%r8
  setae  %dil
  or     %dil,%al
  je     L159
  mov    %ebx,%eax
  movapd %xmm2,%xmm4
  movapd %xmm0,%xmm3
  shr    %eax
  unpcklpd %xmm4,%xmm4
  unpcklpd %xmm3,%xmm3
  lea    -0x1(%rax),%edi
  mov    $0x8,%eax
  shl    $0x4,%rdi
  add    $0x18,%rdi
  nopl   0x0(%rax)
L40:
  movups %xmm4,(%rdx,%rax,1)
  movupd (%rcx,%rax,1),%xmm5
  movapd %xmm3,%xmm1
  subpd  %xmm5,%xmm1
  movups %xmm1,(%rsi,%rax,1)
  add    $0x10,%rax
  cmp    %rdi,%rax
  jne    L40
  mov    %ebx,%eax
  or     $0x1,%eax
  and    $0x1,%ebx
  je     L156
  cltq
  movsd  %xmm2,(%rdx,%rax,8)
  subsd  (%rcx,%rax,8),%xmm0
  movsd  %xmm0,(%rsi,%rax,8)
L156:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopl   0x0(%rax)
L31:
  lea    D13(%rip),%rsi
  mov    %r13,%rdi
  movsd  %xmm2,(%rsp)
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L156
  mov    %ebx,%edx
  movsd  (%rsp),%xmm2
  shr    $0x1f,%edx
  add    %ebx,%edx
  sar    %edx
  cmp    $0x1,%ebx
  jle    L90
  mov    (%r12),%rcx
  mov    0x0(%rbp),%rdi
  mov    0x8(%rbp),%rsi
  lea    0x8(%rdi),%r8
  lea    0x10(%rcx),%rax
  cmp    %rax,%r8
  setne  %al
  cmp    $0x7,%ebx
  setg   %r9b
  and    %r9d,%eax
  lea    0x10(%rsi),%r9
  cmp    %r9,%r8
  setne  %r8b
  test   %r8b,%al
  je     L122
  lea    0x18(%rcx),%r8
  lea    0x8(%rsi),%rax
  cmp    %rax,%r8
  lea    0x18(%rsi),%r9
  lea    0x8(%rcx),%r8
  setbe  %al
  cmp    %r8,%r9
  setbe  %r8b
  or     %r8b,%al
  je     L122
  mov    %edx,%eax
  movapd D28(%rip),%xmm3
  pxor   %xmm1,%xmm1
  shr    %eax
  lea    -0x1(%rax),%r8d
  mov    $0x8,%eax
  shl    $0x4,%r8
  add    $0x18,%r8
  nop
L63:
  movups %xmm1,(%rcx,%rax,1)
  movupd (%rsi,%rax,1),%xmm0
  xorpd  %xmm3,%xmm0
  movups %xmm0,(%rdi,%rax,1)
  add    $0x10,%rax
  cmp    %r8,%rax
  jne    L63
  mov    %edx,%eax
  or     $0x1,%eax
  test   $0x1,%dl
  je     L90
  cltq
  movq   $0x0,(%rcx,%rax,8)
  movsd  (%rsi,%rax,8),%xmm0
  xorpd  D42(%rip),%xmm0
  movsd  %xmm0,(%rdi,%rax,8)
L90:
  lea    0x1(%rdx),%ecx
  cmp    %ecx,%ebx
  jl     L156
  mov    %ebx,%r10d
  mov    (%r12),%r8
  mov    0x8(%rbp),%rdi
  sub    %edx,%r10d
  movslq %edx,%rdx
  mov    0x0(%rbp),%r9
  movsd  0x8(%rsp),%xmm0
  lea    0x18(,%rdx,8),%rax
  add    $0x1,%rdx
  lea    -0x10(%rax),%rsi
  lea    -0x8(%rax),%r12
  lea    (%r8,%r12,1),%r13
  lea    (%rdi,%rsi,1),%r11
  lea    (%r8,%rsi,1),%rbp
  add    %r9,%rsi
  addsd  %xmm0,%xmm0
  cmp    %r13,%rsi
  setne  %r13b
  add    %rdi,%r12
  cmp    %r12,%rsi
  setne  %r12b
  and    %r13d,%r12d
  lea    -0x1(%r10),%r13d
  cmp    $0x1,%r13d
  seta   %r13b
  test   %r13b,%r12b
  je     L166
  lea    (%r8,%rax,1),%r12
  cmp    %r12,%r11
  setae  %r12b
  add    %rdi,%rax
  cmp    %rax,%rbp
  setae  %al
  or     %r12b,%al
  je     L166
  mov    %r10d,%edx
  movapd %xmm2,%xmm4
  movapd %xmm0,%xmm3
  xor    %eax,%eax
  shr    %edx
  unpcklpd %xmm4,%xmm4
  unpcklpd %xmm3,%xmm3
  shl    $0x4,%rdx
  nopw   0x0(%rax,%rax,1)
L28:
  movups %xmm4,0x0(%rbp,%rax,1)
  movupd (%r11,%rax,1),%xmm6
  movapd %xmm3,%xmm1
  subpd  %xmm6,%xmm1
  movups %xmm1,(%rsi,%rax,1)
  add    $0x10,%rax
  cmp    %rdx,%rax
  jne    L28
  mov    %r10d,%edx
  and    $0xfffffffe,%edx
  lea    (%rdx,%rcx,1),%eax
  cmp    %edx,%r10d
  je     L156
  cltq
  movsd  %xmm2,(%r8,%rax,8)
  subsd  (%rdi,%rax,8),%xmm0
  movsd  %xmm0,(%r9,%rax,8)
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L166:
  movsd  %xmm2,(%r8,%rdx,8)
  movapd %xmm0,%xmm1
  subsd  (%rdi,%rdx,8),%xmm1
  movsd  %xmm1,(%r9,%rdx,8)
  add    $0x1,%rdx
  cmp    %edx,%ebx
  jge    L166
  jmp    L156
  nopw   0x0(%rax,%rax,1)
L159:
  lea    0x1(%rbx),%edi
  mov    $0x1,%eax
L24:
  movsd  %xmm2,(%rdx,%rax,8)
  movapd %xmm0,%xmm1
  subsd  (%rcx,%rax,8),%xmm1
  movsd  %xmm1,(%rsi,%rax,8)
  add    $0x1,%rax
  cmp    %rax,%rdi
  jne    L24
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L122:
  movq   D42(%rip),%xmm1
  mov    $0x1,%eax
  nopl   0x0(%rax)
L139:
  movq   $0x0,(%rcx,%rax,8)
  movsd  (%rsi,%rax,8),%xmm0
  xorpd  %xmm1,%xmm0
  movsd  %xmm0,(%rdi,%rax,8)
  add    $0x1,%rax
  cmp    %eax,%edx
  jge    L139
  jmp    L90
```

tool_calls: name: unpack_data
arguments: tag: D19
data_type: string
name: unpack_data
arguments: tag: D13
data_type: string
name: unpack_data
arguments: tag: D28
data_type: f32[4]
name: unpack_data
arguments: tag: D42
data_type: f32[4]

tool: D19: Karman_vortex

tool: D13: flow_over_a_step

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

tool: {"D42": [0.0,-0.0,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];
    }
  }
}
```