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

```asm
<ROE_2D_solver>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x1b0,%rsp
  mov    %rdi,-0x158(%rbp)
  movsd  %xmm0,-0x160(%rbp)
  movsd  %xmm1,-0x168(%rbp)
  movsd  %xmm2,-0x170(%rbp)
  movsd  %xmm3,-0x178(%rbp)
  movsd  %xmm4,-0x180(%rbp)
  movsd  %xmm5,-0x188(%rbp)
  movsd  %xmm6,-0x190(%rbp)
  movsd  %xmm7,-0x198(%rbp)
  mov    %rsi,-0x1a0(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movsd  -0x160(%rbp),%xmm0
  movsd  D19(%rip),%xmm2
  movapd %xmm0,%xmm1
  subsd  %xmm2,%xmm1
  movsd  -0x160(%rbp),%xmm0
  divsd  %xmm1,%xmm0
  mulsd  -0x168(%rbp),%xmm0
  movapd %xmm0,%xmm1
  divsd  -0x170(%rbp),%xmm1
  movsd  -0x178(%rbp),%xmm0
  movapd %xmm0,%xmm2
  mulsd  %xmm0,%xmm2
  movsd  -0x180(%rbp),%xmm0
  mulsd  %xmm0,%xmm0
  addsd  %xmm0,%xmm2
  movsd  D32(%rip),%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x148(%rbp)
  movsd  -0x160(%rbp),%xmm0
  movsd  D19(%rip),%xmm2
  movapd %xmm0,%xmm1
  subsd  %xmm2,%xmm1
  movsd  -0x160(%rbp),%xmm0
  divsd  %xmm1,%xmm0
  mulsd  -0x198(%rbp),%xmm0
  movapd %xmm0,%xmm1
  divsd  0x10(%rbp),%xmm1
  movsd  0x18(%rbp),%xmm0
  movapd %xmm0,%xmm2
  mulsd  %xmm0,%xmm2
  movsd  0x20(%rbp),%xmm0
  mulsd  %xmm0,%xmm0
  addsd  %xmm0,%xmm2
  movsd  D32(%rip),%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x140(%rbp)
  movsd  -0x170(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x178(%rbp),%xmm1
  movsd  0x10(%rbp),%xmm0
  mulsd  0x18(%rbp),%xmm0
  addsd  %xmm0,%xmm1
  movsd  D32(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x188(%rbp),%xmm1
  movsd  -0x170(%rbp),%xmm0
  movapd %xmm0,%xmm2
  mulsd  -0x180(%rbp),%xmm2
  movsd  0x10(%rbp),%xmm0
  mulsd  0x20(%rbp),%xmm0
  addsd  %xmm0,%xmm2
  movsd  D32(%rip),%xmm0
  mulsd  %xmm2,%xmm0
  mulsd  -0x190(%rbp),%xmm0
  addsd  %xmm1,%xmm0
  mov    -0x158(%rbp),%rax
  movsd  %xmm0,(%rax)
  movsd  -0x170(%rbp),%xmm0
  mulsd  -0x178(%rbp),%xmm0
  mulsd  -0x178(%rbp),%xmm0
  movapd %xmm0,%xmm1
  addsd  -0x168(%rbp),%xmm1
  movsd  0x10(%rbp),%xmm0
  mulsd  0x18(%rbp),%xmm0
  mulsd  0x18(%rbp),%xmm0
  addsd  %xmm1,%xmm0
  movapd %xmm0,%xmm1
  addsd  -0x198(%rbp),%xmm1
  movsd  D32(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x188(%rbp),%xmm1
  movsd  -0x170(%rbp),%xmm0
  mulsd  -0x178(%rbp),%xmm0
  movapd %xmm0,%xmm2
  mulsd  -0x180(%rbp),%xmm2
  movsd  0x10(%rbp),%xmm0
  mulsd  0x18(%rbp),%xmm0
  mulsd  0x20(%rbp),%xmm0
  addsd  %xmm0,%xmm2
  movsd  D32(%rip),%xmm0
  mulsd  %xmm2,%xmm0
  mulsd  -0x190(%rbp),%xmm0
  mov    -0x158(%rbp),%rax
  add    $0x8,%rax
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  movsd  -0x170(%rbp),%xmm0
  mulsd  -0x178(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x180(%rbp),%xmm1
  movsd  0x10(%rbp),%xmm0
  mulsd  0x18(%rbp),%xmm0
  mulsd  0x20(%rbp),%xmm0
  addsd  %xmm0,%xmm1
  movsd  D32(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x188(%rbp),%xmm1
  movsd  -0x170(%rbp),%xmm0
  mulsd  -0x180(%rbp),%xmm0
  mulsd  -0x180(%rbp),%xmm0
  movapd %xmm0,%xmm2
  addsd  -0x168(%rbp),%xmm2
  movsd  0x10(%rbp),%xmm0
  mulsd  0x20(%rbp),%xmm0
  mulsd  0x20(%rbp),%xmm0
  addsd  %xmm2,%xmm0
  movapd %xmm0,%xmm2
  addsd  -0x198(%rbp),%xmm2
  movsd  D32(%rip),%xmm0
  mulsd  %xmm2,%xmm0
  mulsd  -0x190(%rbp),%xmm0
  mov    -0x158(%rbp),%rax
  add    $0x10,%rax
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  movsd  -0x170(%rbp),%xmm0
  mulsd  -0x178(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x148(%rbp),%xmm1
  movsd  0x10(%rbp),%xmm0
  mulsd  0x18(%rbp),%xmm0
  mulsd  -0x140(%rbp),%xmm0
  addsd  %xmm0,%xmm1
  movsd  D32(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x188(%rbp),%xmm1
  movsd  -0x170(%rbp),%xmm0
  mulsd  -0x180(%rbp),%xmm0
  movapd %xmm0,%xmm2
  mulsd  -0x148(%rbp),%xmm2
  movsd  0x10(%rbp),%xmm0
  mulsd  0x20(%rbp),%xmm0
  mulsd  -0x140(%rbp),%xmm0
  addsd  %xmm0,%xmm2
  movsd  D32(%rip),%xmm0
  mulsd  %xmm2,%xmm0
  mulsd  -0x190(%rbp),%xmm0
  mov    -0x158(%rbp),%rax
  add    $0x18,%rax
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  movsd  -0x170(%rbp),%xmm0
  mulsd  0x10(%rbp),%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  call   <sqrt@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x138(%rbp)
  mov    -0x170(%rbp),%rax
  movq   %rax,%xmm0
  call   <sqrt@plt>
  movq   %xmm0,%rax
  movq   %rax,%xmm4
  mulsd  -0x178(%rbp),%xmm4
  movsd  %xmm4,-0x1a8(%rbp)
  movsd  0x10(%rbp),%xmm0
  call   <sqrt@plt>
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  mulsd  0x18(%rbp),%xmm0
  addsd  -0x1a8(%rbp),%xmm0
  movsd  %xmm0,-0x1a8(%rbp)
  mov    -0x170(%rbp),%rax
  movq   %rax,%xmm0
  call   <sqrt@plt>
  movsd  %xmm0,-0x1b0(%rbp)
  movsd  0x10(%rbp),%xmm0
  call   <sqrt@plt>
  movsd  -0x1b0(%rbp),%xmm1
  addsd  %xmm0,%xmm1
  movsd  -0x1a8(%rbp),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x130(%rbp)
  mov    -0x170(%rbp),%rax
  movq   %rax,%xmm0
  call   <sqrt@plt>
  movq   %xmm0,%rax
  movq   %rax,%xmm5
  mulsd  -0x180(%rbp),%xmm5
  movsd  %xmm5,-0x1a8(%rbp)
  movsd  0x10(%rbp),%xmm0
  call   <sqrt@plt>
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  mulsd  0x20(%rbp),%xmm0
  addsd  -0x1a8(%rbp),%xmm0
  movsd  %xmm0,-0x1a8(%rbp)
  mov    -0x170(%rbp),%rax
  movq   %rax,%xmm0
  call   <sqrt@plt>
  movsd  %xmm0,-0x1b0(%rbp)
  movsd  0x10(%rbp),%xmm0
  call   <sqrt@plt>
  movsd  -0x1b0(%rbp),%xmm1
  addsd  %xmm0,%xmm1
  movsd  -0x1a8(%rbp),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x128(%rbp)
  mov    -0x170(%rbp),%rax
  movq   %rax,%xmm0
  call   <sqrt@plt>
  movq   %xmm0,%rax
  movq   %rax,%xmm6
  mulsd  -0x148(%rbp),%xmm6
  movsd  %xmm6,-0x1a8(%rbp)
  movsd  0x10(%rbp),%xmm0
  call   <sqrt@plt>
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  mulsd  -0x140(%rbp),%xmm0
  addsd  -0x1a8(%rbp),%xmm0
  movsd  %xmm0,-0x1a8(%rbp)
  mov    -0x170(%rbp),%rax
  movq   %rax,%xmm0
  call   <sqrt@plt>
  movsd  %xmm0,-0x1b0(%rbp)
  movsd  0x10(%rbp),%xmm0
  call   <sqrt@plt>
  movsd  -0x1b0(%rbp),%xmm1
  addsd  %xmm0,%xmm1
  movsd  -0x1a8(%rbp),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x120(%rbp)
  movsd  -0x160(%rbp),%xmm0
  movsd  D19(%rip),%xmm1
  movapd %xmm0,%xmm2
  subsd  %xmm1,%xmm2
  movsd  -0x130(%rbp),%xmm1
  movsd  D32(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x130(%rbp),%xmm1
  movsd  -0x120(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  movsd  -0x128(%rbp),%xmm3
  movsd  D32(%rip),%xmm1
  mulsd  %xmm3,%xmm1
  mulsd  -0x128(%rbp),%xmm1
  subsd  %xmm1,%xmm0
  mulsd  %xmm0,%xmm2
  movq   %xmm2,%rax
  movq   %rax,%xmm0
  call   <sqrt@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x118(%rbp)
  movsd  -0x130(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x188(%rbp),%xmm1
  movsd  -0x128(%rbp),%xmm0
  mulsd  -0x190(%rbp),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x110(%rbp)
  movsd  -0x130(%rbp),%xmm0
  movq   D316(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x190(%rbp),%xmm1
  movsd  -0x128(%rbp),%xmm0
  mulsd  -0x188(%rbp),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x108(%rbp)
  movsd  0x18(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x188(%rbp),%xmm1
  movsd  0x20(%rbp),%xmm0
  mulsd  -0x190(%rbp),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x100(%rbp)
  movsd  0x18(%rbp),%xmm0
  movq   D316(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x190(%rbp),%xmm1
  movsd  0x20(%rbp),%xmm0
  mulsd  -0x188(%rbp),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0xf8(%rbp)
  movsd  -0x178(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x188(%rbp),%xmm1
  movsd  -0x180(%rbp),%xmm0
  mulsd  -0x190(%rbp),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0xf0(%rbp)
  movsd  -0x178(%rbp),%xmm0
  movq   D316(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x190(%rbp),%xmm1
  movsd  -0x180(%rbp),%xmm0
  mulsd  -0x188(%rbp),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0xe8(%rbp)
  movsd  D19(%rip),%xmm0
  movsd  %xmm0,-0x90(%rbp)
  movsd  D19(%rip),%xmm0
  movsd  %xmm0,-0x88(%rbp)
  movsd  D19(%rip),%xmm0
  movsd  %xmm0,-0x80(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x78(%rbp)
  movsd  -0x118(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x188(%rbp),%xmm1
  movsd  -0x130(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x70(%rbp)
  movsd  -0x130(%rbp),%xmm0
  movsd  %xmm0,-0x68(%rbp)
  movsd  -0x118(%rbp),%xmm0
  mulsd  -0x188(%rbp),%xmm0
  addsd  -0x130(%rbp),%xmm0
  movsd  %xmm0,-0x60(%rbp)
  movsd  -0x190(%rbp),%xmm0
  movq   D316(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  movsd  %xmm0,-0x58(%rbp)
  movsd  -0x118(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x190(%rbp),%xmm1
  movsd  -0x128(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x50(%rbp)
  movsd  -0x128(%rbp),%xmm0
  movsd  %xmm0,-0x48(%rbp)
  movsd  -0x118(%rbp),%xmm0
  mulsd  -0x190(%rbp),%xmm0
  addsd  -0x128(%rbp),%xmm0
  movsd  %xmm0,-0x40(%rbp)
  movsd  -0x188(%rbp),%xmm0
  movsd  %xmm0,-0x38(%rbp)
  movsd  -0x110(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x118(%rbp),%xmm1
  movsd  -0x120(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x30(%rbp)
  movsd  -0x130(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  %xmm0,%xmm1
  movsd  -0x128(%rbp),%xmm0
  mulsd  %xmm0,%xmm0
  addsd  %xmm0,%xmm1
  movsd  D32(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  movsd  -0x110(%rbp),%xmm0
  mulsd  -0x118(%rbp),%xmm0
  addsd  -0x120(%rbp),%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movsd  -0x108(%rbp),%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movsd  -0x198(%rbp),%xmm0
  subsd  -0x168(%rbp),%xmm0
  movsd  -0x138(%rbp),%xmm1
  movapd %xmm1,%xmm2
  mulsd  -0x118(%rbp),%xmm2
  movsd  -0x100(%rbp),%xmm1
  subsd  -0xf0(%rbp),%xmm1
  mulsd  %xmm1,%xmm2
  movapd %xmm0,%xmm1
  subsd  %xmm2,%xmm1
  movsd  D32(%rip),%xmm0
  mulsd  %xmm0,%xmm1
  movsd  -0x118(%rbp),%xmm0
  movapd %xmm0,%xmm2
  mulsd  %xmm0,%xmm2
  divsd  %xmm2,%xmm1
  movapd %xmm1,%xmm0
  movsd  %xmm0,-0xb0(%rbp)
  movsd  0x10(%rbp),%xmm0
  movapd %xmm0,%xmm1
  subsd  -0x170(%rbp),%xmm1
  movsd  -0x198(%rbp),%xmm0
  movapd %xmm0,%xmm2
  subsd  -0x168(%rbp),%xmm2
  movsd  -0x118(%rbp),%xmm0
  mulsd  %xmm0,%xmm0
  divsd  %xmm0,%xmm2
  subsd  %xmm2,%xmm1
  movapd %xmm1,%xmm0
  movsd  %xmm0,-0xa8(%rbp)
  movsd  -0x198(%rbp),%xmm0
  movapd %xmm0,%xmm1
  subsd  -0x168(%rbp),%xmm1
  movsd  -0x138(%rbp),%xmm0
  movapd %xmm0,%xmm2
  mulsd  -0x118(%rbp),%xmm2
  movsd  -0x100(%rbp),%xmm0
  subsd  -0xf0(%rbp),%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm0,%xmm1
  movsd  D32(%rip),%xmm0
  mulsd  %xmm0,%xmm1
  movsd  -0x118(%rbp),%xmm0
  movapd %xmm0,%xmm2
  mulsd  %xmm0,%xmm2
  divsd  %xmm2,%xmm1
  movapd %xmm1,%xmm0
  movsd  %xmm0,-0xa0(%rbp)
  movsd  -0xf8(%rbp),%xmm0
  subsd  -0xe8(%rbp),%xmm0
  mulsd  -0x138(%rbp),%xmm0
  movsd  %xmm0,-0x98(%rbp)
  movsd  -0x110(%rbp),%xmm0
  subsd  -0x118(%rbp),%xmm0
  movq   D117(%rip),%xmm1
  andpd  %xmm1,%xmm0
  movsd  %xmm0,-0xd0(%rbp)
  movsd  -0x110(%rbp),%xmm0
  movq   D117(%rip),%xmm1
  andpd  %xmm1,%xmm0
  movsd  %xmm0,-0xc8(%rbp)
  movsd  -0x110(%rbp),%xmm0
  addsd  -0x118(%rbp),%xmm0
  movq   D117(%rip),%xmm1
  andpd  %xmm1,%xmm0
  movsd  %xmm0,-0xc0(%rbp)
  movsd  -0x110(%rbp),%xmm0
  movq   D117(%rip),%xmm1
  andpd  %xmm1,%xmm0
  movsd  %xmm0,-0xb8(%rbp)
  movsd  D286(%rip),%xmm0
  movsd  %xmm0,-0xe0(%rbp)
  movsd  D184(%rip),%xmm0
  movsd  %xmm0,-0xd8(%rbp)
  movsd  -0xd0(%rbp),%xmm1
  movsd  0x28(%rbp),%xmm0
  comisd %xmm1,%xmm0
  jbe    L62
  movsd  D32(%rip),%xmm0
  movapd %xmm0,%xmm1
  divsd  0x28(%rbp),%xmm1
  movsd  -0xd0(%rbp),%xmm2
  movsd  -0xd0(%rbp),%xmm0
  mulsd  %xmm0,%xmm2
  movsd  0x28(%rbp),%xmm0
  mulsd  %xmm0,%xmm0
  addsd  %xmm2,%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0xd0(%rbp)
L62:
  movsd  -0xc0(%rbp),%xmm1
  movsd  0x28(%rbp),%xmm0
  comisd %xmm1,%xmm0
  jbe    L47
  movsd  D32(%rip),%xmm0
  movapd %xmm0,%xmm1
  divsd  0x28(%rbp),%xmm1
  movsd  -0xc0(%rbp),%xmm2
  movsd  -0xc0(%rbp),%xmm0
  mulsd  %xmm0,%xmm2
  movsd  0x28(%rbp),%xmm0
  mulsd  %xmm0,%xmm0
  addsd  %xmm2,%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0xc0(%rbp)
L47:
  mov    -0x1a0(%rbp),%rax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,(%rax)
  movl   $0x0,-0x150(%rbp)
  jmp    L72
L80:
  mov    -0x1a0(%rbp),%rax
  movsd  (%rax),%xmm0
  mov    -0x150(%rbp),%eax
  cltq
  movsd  -0xd0(%rbp,%rax,8),%xmm1
  comisd %xmm1,%xmm0
  jbe    L52
  mov    -0x1a0(%rbp),%rax
  movsd  (%rax),%xmm0
  jmp    L88
L52:
  mov    -0x150(%rbp),%eax
  cltq
  movsd  -0xd0(%rbp,%rax,8),%xmm0
L88:
  mov    -0x1a0(%rbp),%rax
  movsd  %xmm0,(%rax)
  movl   $0x0,-0x14c(%rbp)
  jmp    L3
L14:
  mov    -0x150(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x158(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x14c(%rbp),%eax
  cltq
  movsd  -0xd0(%rbp,%rax,8),%xmm2
  movsd  D251(%rip),%xmm0
  mulsd  %xmm0,%xmm2
  mov    -0x14c(%rbp),%eax
  cltq
  movsd  -0xb0(%rbp,%rax,8),%xmm0
  mulsd  %xmm0,%xmm2
  mov    -0x14c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x150(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  movsd  -0x90(%rbp,%rax,8),%xmm0
  mulsd  %xmm2,%xmm0
  mov    -0x150(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x158(%rbp),%rax
  add    %rdx,%rax
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x14c(%rbp)
L3:
  cmpl   $0x3,-0x14c(%rbp)
  jle    L14
  addl   $0x1,-0x150(%rbp)
L72:
  cmpl   $0x3,-0x150(%rbp)
  jle    L80
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L49
  call   <__stack_chk_fail@plt>
L49:
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: data_label: D19
type_guessed: f64
name: retrieve_data
arguments: data_label: D32
type_guessed: f64
name: retrieve_data
arguments: data_label: D316
type_guessed: f32[2]
name: retrieve_data
arguments: data_label: D117
type_guessed: qword
name: retrieve_data
arguments: data_label: D286
type_guessed: f64
name: retrieve_data
arguments: data_label: D184
type_guessed: f64
name: retrieve_data
arguments: data_label: D251
type_guessed: f32[2]

tool: D19: 1

tool: D32: 0.5

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

tool: D117: 9223372036854775807

tool: D286: 0.01

tool: D184: 0.2

tool: {"D251": [0.0,-1.75]}

assistant: ```c
void ROE_2D_solver(double *F, double gamma, double P_L, double RHO_L, double U_L, double V_L, double n_x, double n_y, double P_R, double RHO_R, double U_R, double V_R, double *lambda_max, double delta) {
  double H_L, H_R;
  H_L = gamma / (gamma - 1.0) * P_L / RHO_L + 0.5 * (U_L * U_L + V_L * V_L);
  H_R = gamma / (gamma - 1.0) * P_R / RHO_R + 0.5 * (U_R * U_R + V_R * V_R);
  F[0] = 0.5 * (RHO_L * U_L + RHO_R * U_R) * n_x + 0.5 * (RHO_L * V_L + RHO_R * V_R) * n_y;
  F[1] = 0.5 * (RHO_L * U_L * U_L + P_L + RHO_R * U_R * U_R + P_R) * n_x + 0.5 * (RHO_L * U_L * V_L + RHO_R * U_R * V_R) * n_y;
  F[2] = 0.5 * (RHO_L * U_L * V_L + RHO_R * U_R * V_R) * n_x + 0.5 * (RHO_L * V_L * V_L + P_L + RHO_R * V_R * V_R + P_R) * n_y;
  F[3] = 0.5 * (RHO_L * U_L * H_L + RHO_R * U_R * H_R) * n_x + 0.5 * (RHO_L * V_L * H_L + RHO_R * V_R * H_R) * n_y;
  double RHO_S, U_S, V_S, H_S, C_S;
  RHO_S = sqrt(RHO_L * RHO_R);
  U_S = (U_L * sqrt(RHO_L) + U_R * sqrt(RHO_R)) / (sqrt(RHO_L) + sqrt(RHO_R));
  V_S = (V_L * sqrt(RHO_L) + V_R * sqrt(RHO_R)) / (sqrt(RHO_L) + sqrt(RHO_R));
  H_S = (H_L * sqrt(RHO_L) + H_R * sqrt(RHO_R)) / (sqrt(RHO_L) + sqrt(RHO_R));
  C_S = sqrt((gamma - 1.0) * (H_S - 0.5 * U_S * U_S - 0.5 * V_S * V_S));
  double qn_S, qt_S;
  qn_S = U_S * n_x + V_S * n_y;
  qt_S = -U_S * n_y + V_S * n_x;
  double qn_R, qt_R;
  qn_R = U_R * n_x + V_R * n_y;
  qt_R = -U_R * n_y + V_R * n_x;
  double qn_L, qt_L;
  qn_L = U_L * n_x + V_L * n_y;
  qt_L = -U_L * n_y + V_L * n_x;
  double R[4][4];
  double lambda[4], W[4];
  R[0][0] = 1.0;
  R[0][1] = 1.0;
  R[0][2] = 1.0;
  R[0][3] = 0.0;
  R[1][0] = U_S - C_S * n_x;
  R[1][1] = U_S;
  R[1][2] = U_S + C_S * n_x;
  R[1][3] = -n_y;
  R[2][0] = V_S - C_S * n_y;
  R[2][1] = V_S;
  R[2][2] = V_S + C_S * n_y;
  R[2][3] = n_x;
  R[3][0] = H_S - qn_S * C_S;
  R[3][1] = 0.5 * (U_S * U_S + V_S * V_S);
  R[3][2] = H_S + qn_S * C_S;
  R[3][3] = qt_S;
  int i, j;
  W[0] = 0.5 * ((P_R - P_L) - RHO_S * C_S * (qn_R - qn_L)) / (C_S * C_S);
  W[1] = (RHO_R - RHO_L) - (P_R - P_L) / (C_S * C_S);
  W[2] = 0.5 * ((P_R - P_L) + RHO_S * C_S * (qn_R - qn_L)) / (C_S * C_S);
  W[3] = RHO_S * (qt_R - qt_L);
  lambda[0] = fabs(qn_S - C_S);
  lambda[1] = fabs(qn_S);
  lambda[2] = fabs(qn_S + C_S);
  lambda[3] = fabs(qn_S);
  double delta_1 = 0.01;
  double delta_2 = 0.2;
  if (lambda[0] < delta)
    lambda[0] = 0.5 / delta * (lambda[0] * lambda[0] + delta * delta);
  if (lambda[2] < delta)
    lambda[2] = 0.5 / delta * (lambda[2] * lambda[2] + delta * delta);
  *lambda_max = 0;
  for (i = 0; i < 4; i++) {
    *lambda_max = (*lambda_max > lambda[i] ? *lambda_max : lambda[i]);
    for (j = 0; j < 4; j++) {
      F[i] += -0.5 * lambda[j] * W[j] * R[i][j];
    }
  }
}
```