user: 请将以下的汇编代码转换成C语言代码：

```asm
<gauss_seidel>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdi,0x18(%rsp)
  mov    %rsi,%r15
  mov    %rdx,%rbp
  mov    %ecx,0x10(%rsp)
  mov    %r8d,0x14(%rsp)
  movsd  %xmm0,(%rsp)
  test   %ecx,%ecx
  jle    L43
  mov    %rdi,%r10
  mov    %ecx,%esi
  lea    0x0(,%rsi,8),%rcx
  mov    $0x0,%r9d
L34:
  mov    %r10,%r8
  mov    (%r10),%rax
  movsd  (%rax,%r9,1),%xmm1
  mov    $0x0,%eax
L197:
  mov    %rax,%rdx
  add    (%r8),%rdx
  movsd  (%rdx),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,(%rdx)
  add    $0x8,%rax
  cmp    %rcx,%rax
  jne    L197
  movsd  (%r15,%r9,1),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,(%r15,%r9,1)
  add    $0x8,%r10
  add    $0x8,%r9
  cmp    %rcx,%r9
  jne    L34
  mov    $0x0,%edx
  jmp    L55
L42:
  add    $0x1,%rax
  cmp    %rsi,%rax
  je     L85
L79:
  cmp    %edx,%eax
  je     L42
  mov    (%rdi),%rcx
  movsd  (%rcx,%rax,8),%xmm0
  mulsd  0x0(%rbp,%rax,8),%xmm0
  subsd  %xmm0,%xmm1
  jmp    L42
L85:
  movsd  %xmm1,0x0(%rbp,%rdx,8)
  add    $0x1,%rdx
  add    $0x8,%rdi
  cmp    %rsi,%rdx
  je     L43
L55:
  movsd  (%r15,%rdx,8),%xmm1
  mov    $0x0,%eax
  jmp    L79
L43:
  mov    $0x1,%r14d
  movl   $0x1,0xc(%rsp)
  jmp    L87
L107:
  add    $0x1,%rax
  cmp    %r12,%rax
  je     L76
L53:
  cmp    %eax,%ebx
  je     L107
  mov    0x0(%r13),%rdx
  movsd  (%rdx,%rax,8),%xmm0
  mulsd  0x0(%rbp,%rax,8),%xmm0
  subsd  %xmm0,%xmm1
  jmp    L107
L76:
  movapd %xmm2,%xmm0
  mulsd  D3(%rip),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,0x0(%rbp,%rbx,8)
  cmp    $0x1,%r14d
  je     L131
L175:
  ucomisd (%rsp),%xmm3
  mov    $0x0,%eax
  cmovae %eax,%r14d
  add    $0x1,%rbx
  add    $0x8,%r13
  cmp    %rbx,%r12
  je     L86
L25:
  movsd  0x0(%rbp,%rbx,8),%xmm2
  movsd  (%r15,%rbx,8),%xmm1
  mov    $0x0,%eax
  jmp    L53
L131:
  pxor   %xmm5,%xmm5
  ucomisd 0x0(%rbp),%xmm5
  jp     L140
  je     L175
L140:
  movapd %xmm0,%xmm1
  subsd  %xmm2,%xmm1
  divsd  %xmm0,%xmm1
  movapd %xmm1,%xmm0
  call   <fabs@plt>
  imul   $0x64,%eax,%eax
  pxor   %xmm3,%xmm3
  cvtsi2sd %eax,%xmm3
  jmp    L175
L86:
  addl   $0x1,0xc(%rsp)
  mov    0xc(%rsp),%eax
  test   %r14d,%r14d
  sete   %dl
  cmp    0x14(%rsp),%eax
  setle  %al
  mov    $0x0,%r14d
  test   %al,%dl
  je     L157
L87:
  mov    0x10(%rsp),%eax
  test   %eax,%eax
  jle    L86
  mov    0x18(%rsp),%r13
  mov    %eax,%r12d
  mov    $0x0,%ebx
  jmp    L25
L157:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: read_data
arguments: data_label: D3
type: byte[8]

tool: {"D3": [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]}

assistant: ```c
void gauss_seidel(double **m, double *r, double *s, int n, int imax, double es) {
  int i, j, iter, cent;
  double sum, dummy, ea, old, lambda = 1;
  for (i = 0; i <= n - 1; i++) {
    dummy = m[i][i];
    for (j = 0; j <= n - 1; j++) {
      m[i][j] = m[i][j] / dummy;
    }
    r[i] = r[i] / dummy;
  }
  for (i = 0; i <= n - 1; i++) {
    sum = r[i];
    for (j = 0; j <= n - 1; j++) {
      if (i != j)
        sum = sum - m[i][j] * s[j];
    }
    s[i] = sum;
  }
  iter = 1;
  cent = 1;
  do {
    for (i = 0; i <= n - 1; i++) {
      old = s[i];
      sum = r[i];
      for (j = 0; j <= n - 1; j++) {
        if (i != j)
          sum = sum - m[i][j] * s[j];
      }
      s[i] = lambda * sum + (1 - lambda) * old;
      if (cent == 1 && s[0] != 0)
        ea = fabs((s[i] - old) / s[i]) * 100;
      if (ea >= es)
        cent = 0;
    }
    iter += 1;
  } while (cent == 0 && iter <= imax);
}
```