user: 请从给定的汇编指令推导出C源代码：

```asm
<dual_simplex_method>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %rdi,%rbp
  mov    %esi,%ebx
  mov    %esi,0x4(%rsp)
  mov    %edx,%r15d
  mov    %rcx,0x10(%rsp)
  mov    %r8,0x8(%rsp)
  lea    0x1(%rsi),%r13d
  movslq %r13d,%r13
  lea    0x0(,%r13,8),%rax
  mov    %rax,0x18(%rsp)
  mov    %rax,%rdi
  call   <malloc@plt>
  mov    %rax,%r13
  test   %ebx,%ebx
  js     L49
  mov    %ebx,%eax
  lea    0x1(%r15),%r12d
  movslq %r12d,%r12
  shl    $0x3,%r12
  mov    %r13,%rbx
  lea    0x1(%rax),%eax
  lea    0x0(%r13,%rax,8),%r14
L175:
  mov    %r12,%rdi
  call   <malloc@plt>
  mov    %rax,(%rbx)
  add    $0x8,%rbx
  cmp    %r14,%rbx
  jne    L175
L49:
  mov    0x4(%rsp),%eax
  test   %eax,%eax
  jle    L116
  movslq %r15d,%rcx
  shl    $0x3,%rcx
  mov    %eax,%edi
  mov    $0x0,%eax
  movsd  D15(%rip),%xmm1
  mov    $0x0,%r9d
  mov    $0x0,%esi
  pxor   %xmm3,%xmm3
  mov    $0x1,%r8d
  jmp    L134
L193:
  add    $0x1,%rax
  cmp    %rdi,%rax
  je     L283
L134:
  mov    0x0(%rbp,%rax,8),%r10
  movsd  (%r10,%rcx,1),%xmm0
  comisd %xmm0,%xmm1
  jbe    L193
  movapd %xmm0,%xmm2
  cmpnltsd %xmm3,%xmm2
  andpd  %xmm2,%xmm1
  andnpd %xmm0,%xmm2
  orpd   %xmm2,%xmm1
  ucomisd %xmm0,%xmm3
  cmova  %eax,%r9d
  cmova  %r8d,%esi
  jmp    L193
L283:
  mov    $0x1,%eax
  test   %esi,%esi
  je     L440
  test   %r15d,%r15d
  jle    L425
  mov    0x18(%rsp),%rax
  mov    -0x8(%rbp,%rax,1),%r10
  movslq %r9d,%r8
  lea    0x0(%rbp,%r8,8),%rax
  mov    %rax,0x18(%rsp)
  mov    (%rax),%rcx
  lea    -0x1(%r15),%eax
  mov    %rax,0x28(%rsp)
  mov    %r15d,%esi
  mov    $0x0,%eax
  movsd  D87(%rip),%xmm1
  mov    $0x0,%edi
  movq   D89(%rip),%xmm4
  pxor   %xmm5,%xmm5
  jmp    L273
L233:
  add    $0x1,%rax
  cmp    %rsi,%rax
  je     L277
L273:
  movsd  (%rcx,%rax,8),%xmm2
  movsd  (%r10,%rax,8),%xmm0
  divsd  %xmm2,%xmm0
  andpd  %xmm4,%xmm0
  comisd %xmm0,%xmm1
  jbe    L233
  movapd %xmm2,%xmm3
  cmpnltsd %xmm5,%xmm3
  andpd  %xmm3,%xmm1
  andnpd %xmm0,%xmm3
  orpd   %xmm3,%xmm1
  ucomisd %xmm2,%xmm5
  cmova  %eax,%edi
  jmp    L233
L277:
  ucomisd D87(%rip),%xmm1
  jp     L225
  je     L425
L225:
  movslq %edi,%rax
  lea    0x0(,%rax,8),%rbx
  mov    %rbx,0x20(%rsp)
  movsd  (%rcx,%rax,8),%xmm2
  mov    0x8(%rsp),%rcx
  lea    (%rcx,%r8,4),%rdx
  mov    (%rdx),%ecx
  mov    0x10(%rsp),%rsi
  lea    (%rsi,%rax,4),%rax
  mov    (%rax),%esi
  mov    %esi,(%rdx)
  mov    %ecx,(%rax)
  mov    0x4(%rsp),%eax
  add    $0x1,%eax
  mov    %r13,%rbx
  mov    %rbp,%r11
  mov    $0x0,%r8d
  lea    0x1(%r15),%r12d
  movq   D143(%rip),%xmm4
  movsd  D110(%rip),%xmm1
  mov    %rbp,0x30(%rsp)
  mov    %r13,0x38(%rsp)
  mov    0x18(%rsp),%r14
  mov    %eax,%r13d
  mov    %rbp,0x18(%rsp)
  mov    0x20(%rsp),%rbp
  jmp    L132
L425:
  lea    D93(%rip),%rdi
  call   <puts@plt>
  mov    $0x2,%eax
  jmp    L440
L447:
  mov    (%rbx),%rcx
  mov    (%r11),%rsi
  movapd %xmm1,%xmm0
  divsd  (%rsi,%rdx,1),%xmm0
  movsd  %xmm0,(%rcx,%rdx,1)
L94:
  add    $0x1,%eax
  add    $0x8,%rdx
  cmp    %r12d,%eax
  je     L96
L191:
  cmp    %r8d,%r9d
  sete   %cl
  cmp    %eax,%edi
  sete   %sil
  test   %cl,%cl
  je     L253
  test   %sil,%sil
  jne    L447
L253:
  cmp    %eax,%edi
  setne  %r10b
  test   %cl,%cl
  je     L386
  test   %r10b,%r10b
  je     L386
  mov    (%rbx),%rcx
  mov    (%r11),%rsi
  movsd  (%rsi,%rdx,1),%xmm0
  divsd  %xmm2,%xmm0
  movsd  %xmm0,(%rcx,%rdx,1)
  jmp    L94
L386:
  cmp    %r8d,%r9d
  setne  %cl
  test   %sil,%sil
  je     L65
  test   %cl,%cl
  je     L65
  mov    (%rbx),%rcx
  mov    (%r11),%rsi
  movsd  (%rsi,%rdx,1),%xmm0
  xorpd  %xmm4,%xmm0
  divsd  %xmm2,%xmm0
  movsd  %xmm0,(%rcx,%rdx,1)
  jmp    L94
L65:
  test   %r10b,%r10b
  je     L94
  test   %cl,%cl
  je     L94
  mov    (%r11),%rcx
  mov    (%rbx),%rsi
  movapd %xmm2,%xmm0
  mulsd  (%rcx,%rdx,1),%xmm0
  mov    (%r14),%r10
  movsd  (%r10,%rdx,1),%xmm3
  mulsd  (%rcx,%rbp,1),%xmm3
  subsd  %xmm3,%xmm0
  divsd  %xmm2,%xmm0
  movsd  %xmm0,(%rsi,%rdx,1)
  jmp    L94
L96:
  add    $0x1,%r8d
  add    $0x8,%r11
  add    $0x8,%rbx
  cmp    %r13d,%r8d
  je     L215
L132:
  mov    $0x0,%edx
  mov    $0x0,%eax
  jmp    L191
L215:
  mov    0x30(%rsp),%r10
  mov    0x38(%rsp),%r14
  mov    0x18(%rsp),%rbp
  mov    0x4(%rsp),%eax
  lea    0x8(%rbp,%rax,8),%rdi
  lea    0x1(%r15),%esi
  shl    $0x3,%rsi
L56:
  mov    (%r14),%rcx
  mov    $0x0,%eax
L23:
  mov    (%r10),%rdx
  movsd  (%rcx,%rax,1),%xmm0
  movsd  %xmm0,(%rdx,%rax,1)
  add    $0x8,%rax
  cmp    %rsi,%rax
  jne    L23
  add    $0x8,%r10
  add    $0x8,%r14
  cmp    %r10,%rdi
  jne    L56
  lea    D59(%rip),%rdi
  call   <puts@plt>
  mov    0x10(%rsp),%rax
  mov    %rax,%rbx
  mov    0x28(%rsp),%rdi
  lea    0x4(%rax,%rdi,4),%r12
  lea    D61(%rip),%r14
  lea    D60(%rip),%r13
  jmp    L144
L431:
  movslq %esi,%rax
  imul   $0x66666667,%rax,%rax
  sar    $0x22,%rax
  mov    %esi,%edx
  sar    $0x1f,%edx
  sub    %edx,%eax
  lea    (%rax,%rax,4),%eax
  add    %eax,%eax
  sub    %eax,%esi
  add    $0x1,%esi
  mov    %r13,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L224:
  add    $0x4,%rbx
  cmp    %rbx,%r12
  je     L179
L144:
  mov    (%rbx),%esi
  lea    -0xa(%rsi),%eax
  cmp    $0x9,%eax
  jbe    L431
  lea    -0x14(%rsi),%eax
  cmp    $0x9,%eax
  ja     L224
  movslq %esi,%rax
  imul   $0x66666667,%rax,%rax
  sar    $0x22,%rax
  mov    %esi,%edx
  sar    $0x1f,%edx
  sub    %edx,%eax
  lea    (%rax,%rax,4),%eax
  add    %eax,%eax
  sub    %eax,%esi
  add    $0x1,%esi
  mov    %r14,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L224
L179:
  lea    D111(%rip),%rdi
  call   <puts@plt>
  mov    $0x0,%r13d
  lea    D112(%rip),%r12
  lea    D5(%rip),%r14
  jmp    L383
L108:
  lea    D39(%rip),%rdi
  call   <puts@plt>
  jmp    L77
L463:
  movslq %esi,%rax
  imul   $0x66666667,%rax,%rax
  sar    $0x22,%rax
  mov    %esi,%edx
  sar    $0x1f,%edx
  sub    %edx,%eax
  lea    (%rax,%rax,4),%eax
  add    %eax,%eax
  sub    %eax,%esi
  add    $0x1,%esi
  lea    D101(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L77:
  add    $0x1,%r13
  add    $0x8,%rbp
  cmp    %r13d,0x4(%rsp)
  jl     L259
L383:
  mov    $0x0,%ebx
L303:
  mov    0x0(%rbp),%rax
  movsd  (%rax,%rbx,8),%xmm0
  mov    %r12,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  add    $0x1,%rbx
  cmp    %ebx,%r15d
  jge    L303
  cmp    %r13d,0x4(%rsp)
  je     L108
  mov    0x8(%rsp),%rax
  mov    (%rax,%r13,4),%esi
  movslq %esi,%rax
  imul   $0x66666667,%rax,%rax
  sar    $0x22,%rax
  mov    %esi,%edx
  sar    $0x1f,%edx
  sub    %edx,%eax
  cmp    $0x1,%eax
  je     L463
  cmp    $0x2,%eax
  jne    L77
  movslq %esi,%rax
  imul   $0x66666667,%rax,%rax
  sar    $0x22,%rax
  mov    %esi,%edx
  sar    $0x1f,%edx
  sub    %edx,%eax
  lea    (%rax,%rax,4),%eax
  add    %eax,%eax
  sub    %eax,%esi
  add    $0x1,%esi
  mov    %r14,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L77
L116:
  mov    $0x1,%eax
  jmp    L440
L259:
  mov    $0x0,%eax
L440:
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: read_data
arguments: data_tag: D15
type: f64
name: read_data
arguments: data_tag: D87
type: f64
name: read_data
arguments: data_tag: D89
type: qword
name: read_data
arguments: data_tag: D143
type: byte[8]
name: read_data
arguments: data_tag: D110
type: byte[8]
name: read_data
arguments: data_tag: D93
type: string
name: read_data
arguments: data_tag: D59
type: string
name: read_data
arguments: data_tag: D61
type: string
name: read_data
arguments: data_tag: D60
type: string
name: read_data
arguments: data_tag: D111
type: string
name: read_data
arguments: data_tag: D112
type: string
name: read_data
arguments: data_tag: D5
type: string
name: read_data
arguments: data_tag: D39
type: string
name: read_data
arguments: data_tag: D101
type: string

tool: D15: 100

tool: D87: 10000

tool: D89: 9223372036854775807

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

tool: {"D110": [0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x3f]}

tool: D93: The solution is unbounded

tool: D59: 
Table: 

tool: D61: Z%d		

tool: D60: X%d		

tool: D111: 1

tool: D112: %lf	

tool: D5: Z%d


tool: D39: Z

tool: D101: X%d


assistant: ```c
int dual_simplex_method(double **T, int no_of_eqns, int no_of_variables, int *column, int *row) {
  int flag = 0, mp = 0, i;
  double **A;
  A = (double **)malloc((no_of_eqns + 1) * sizeof(double *));
  for (i = 0; i < no_of_eqns + 1; i++) {
    A[i] = (double *)malloc((no_of_variables + 1) * sizeof(double));
  }
  double min = 100;
  for (i = 0; i < no_of_eqns; i++) {
    if (T[i][no_of_variables] < min && T[i][no_of_variables] < 0) {
      flag = 1;
      min = T[i][no_of_variables];
      mp = i;
    }
  }
  int most_negative_row = mp, pivot_column;
  double most_negative_value = min, pivot_value;
  if (flag == 0) {
    return 1;
  } else {
    int min_ratio_column = 0;
    double min_ratio = 10000;
    flag = 0;
    for (i = 0; i < no_of_variables; i++) {
      if (fabs(T[no_of_eqns][i] / T[most_negative_row][i]) < min_ratio && T[most_negative_row][i] < 0) {
        min_ratio = fabs(T[no_of_eqns][i] / T[most_negative_row][i]);
        min_ratio_column = i;
      }
    }
    if (min_ratio == 10000) {
      printf("The solution is unbounded\n");
      return 2;
    } else {
      pivot_column = min_ratio_column;
      pivot_value = T[most_negative_row][min_ratio_column];
      int temp1 = row[most_negative_row];
      row[most_negative_row] = column[min_ratio_column];
      column[min_ratio_column] = temp1;
      for (i = 0; i < no_of_eqns + 1; i++) {
        int j;
        for (j = 0; j < no_of_variables + 1; j++) {
          if (i == most_negative_row && j == min_ratio_column) {
            A[i][j] = 1 / T[i][j];
          } else if (i == most_negative_row && j != min_ratio_column) {
            A[i][j] = T[i][j] / pivot_value;
          } else if (j == min_ratio_column && i != most_negative_row) {
            A[i][j] = -T[i][j] / pivot_value;
          } else if (j != min_ratio_column && i != most_negative_row) {
            double temp = T[i][j] * pivot_value - T[most_negative_row][j] * T[i][min_ratio_column];
            A[i][j] = temp / ((double)pivot_value);
          }
        }
      }
    }
  }
  for (i = 0; i < no_of_eqns + 1; i++) {
    int j;
    for (j = 0; j < no_of_variables + 1; j++) {
      T[i][j] = A[i][j];
    }
  }
  printf("\nTable: \n");
  int k, l;
  for (l = 0; l < no_of_variables; l++) {
    if (column[l] / 10 == 1) {
      printf("X%d\t\t", (column[l] % 10) + 1);
    } else if (column[l] / 10 == 2) {
      printf("Z%d\t\t", (column[l] % 10) + 1);
    }
  }
  printf("1\n");
  for (k = 0; k < no_of_eqns + 1; k++) {
    for (l = 0; l < no_of_variables + 1; l++) {
      printf("%lf\t", T[k][l]);
    }
    if (k == no_of_eqns) {
      printf("Z\n");
    } else {
      switch (row[k] / 10) {
      case 1:
        printf("X%d\n", (row[k] % 10) + 1);
        break;
      case 2:
        printf("Z%d\n", (row[k] % 10) + 1);
        break;
      }
    }
  }
  return 0;
}
```