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

```asm
<kruskal>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0xa0,%rsp
  mov    %edi,-0x84(%rbp)
  mov    %rsi,-0x90(%rbp)
  mov    %rdx,-0x98(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x80(%rbp)
  movl   $0x0,-0x7c(%rbp)
  movl   $0x0,-0x78(%rbp)
  jmp    L16
L109:
  movl   $0x3e7,-0x74(%rbp)
  movl   $0x1,-0x70(%rbp)
  jmp    L28
L67:
  movl   $0x1,-0x6c(%rbp)
  jmp    L106
L116:
  mov    -0x70(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x3,%rax
  mov    %rax,%rdx
  mov    -0x90(%rbp),%rax
  add    %rax,%rdx
  mov    -0x6c(%rbp),%eax
  cltq
  mov    (%rdx,%rax,4),%eax
  cmp    %eax,-0x74(%rbp)
  jle    L37
  mov    -0x70(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x3,%rax
  mov    %rax,%rdx
  mov    -0x90(%rbp),%rax
  add    %rax,%rdx
  mov    -0x6c(%rbp),%eax
  cltq
  mov    (%rdx,%rax,4),%eax
  test   %eax,%eax
  je     L37
  mov    -0x70(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x3,%rax
  mov    %rax,%rdx
  mov    -0x90(%rbp),%rax
  add    %rax,%rdx
  mov    -0x6c(%rbp),%eax
  cltq
  mov    (%rdx,%rax,4),%eax
  mov    %eax,-0x74(%rbp)
  mov    -0x70(%rbp),%eax
  mov    %eax,-0x68(%rbp)
  mov    -0x6c(%rbp),%eax
  mov    %eax,-0x64(%rbp)
L37:
  addl   $0x1,-0x6c(%rbp)
L106:
  mov    -0x6c(%rbp),%eax
  cmp    -0x84(%rbp),%eax
  jle    L116
  addl   $0x1,-0x70(%rbp)
L28:
  mov    -0x70(%rbp),%eax
  cmp    -0x84(%rbp),%eax
  jle    L67
  mov    -0x98(%rbp),%rdx
  mov    -0x68(%rbp),%eax
  mov    %rdx,%rsi
  mov    %eax,%edi
  call   <find@plt>
  mov    %eax,-0x70(%rbp)
  mov    -0x98(%rbp),%rdx
  mov    -0x64(%rbp),%eax
  mov    %rdx,%rsi
  mov    %eax,%edi
  call   <find@plt>
  mov    %eax,-0x6c(%rbp)
  mov    -0x70(%rbp),%eax
  cmp    -0x6c(%rbp),%eax
  je     L93
  mov    -0x7c(%rbp),%eax
  cltq
  mov    -0x68(%rbp),%edx
  mov    %edx,-0x60(%rbp,%rax,8)
  mov    -0x7c(%rbp),%eax
  cltq
  mov    -0x64(%rbp),%edx
  mov    %edx,-0x5c(%rbp,%rax,8)
  addl   $0x1,-0x80(%rbp)
  addl   $0x1,-0x7c(%rbp)
  mov    -0x68(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x3,%rax
  mov    %rax,%rdx
  mov    -0x90(%rbp),%rax
  add    %rax,%rdx
  mov    -0x64(%rbp),%eax
  cltq
  mov    (%rdx,%rax,4),%eax
  add    %eax,-0x78(%rbp)
  mov    -0x84(%rbp),%ecx
  mov    -0x98(%rbp),%rdx
  mov    -0x6c(%rbp),%esi
  mov    -0x70(%rbp),%eax
  mov    %eax,%edi
  call   <unionij@plt>
L93:
  mov    -0x64(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x3,%rax
  mov    %rax,%rdx
  mov    -0x90(%rbp),%rax
  add    %rax,%rdx
  mov    -0x68(%rbp),%eax
  cltq
  movl   $0x3e7,(%rdx,%rax,4)
  mov    -0x68(%rbp),%eax
  movslq %eax,%rcx
  mov    %rcx,%rax
  shl    $0x2,%rax
  add    %rcx,%rax
  shl    $0x3,%rax
  mov    %rax,%rcx
  mov    -0x90(%rbp),%rax
  add    %rax,%rcx
  mov    -0x68(%rbp),%eax
  cltq
  mov    (%rdx,%rax,4),%edx
  mov    -0x64(%rbp),%eax
  cltq
  mov    %edx,(%rcx,%rax,4)
L16:
  mov    -0x84(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0x80(%rbp)
  jl     L109
  cmpl   $0x3e6,-0x78(%rbp)
  jg     L85
  lea    D15(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    -0x78(%rbp),%eax
  mov    %eax,%esi
  lea    D17(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D1(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  movl   $0x0,-0x70(%rbp)
  jmp    L62
L117:
  mov    -0x70(%rbp),%eax
  cltq
  mov    -0x5c(%rbp,%rax,8),%edx
  mov    -0x70(%rbp),%eax
  cltq
  mov    -0x60(%rbp,%rax,8),%eax
  mov    %eax,%esi
  lea    D35(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  addl   $0x1,-0x70(%rbp)
L62:
  mov    -0x84(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0x70(%rbp)
  jl     L117
  jmp    L48
L85:
  lea    D9(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L48:
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L26
  call   <__stack_chk_fail@plt>
L26:
  leave
  ret
```

tool_calls: name: read_data
arguments: data_tag: D15
data_type: string
name: read_data
arguments: data_tag: D17
data_type: string
name: read_data
arguments: data_tag: D1
data_type: string
name: read_data
arguments: data_tag: D35
data_type: string
name: read_data
arguments: data_tag: D9
data_type: string

tool: D15: spannig tree exist

tool: D17: the sum of cost is%d


tool: D1: the edges are

tool: D35: 	%d->%d


tool: D9: spannig tree does not exist

assistant: ```c
void kruskal(int n, int cost[10][10], int r[10]) {
  int count = 0, select[10][2], k = 0;
  int sum = 0, min, i, j, u, v;
  while (count < n - 1) {
    min = 999;
    for (i = 1; i <= n; i++) {
      for (j = 1; j <= n; j++) {
        if (min > cost[i][j] && cost[i][j] != 0) {
          min = cost[i][j];
          u = i;
          v = j;
        }
      }
    }
    i = find(u, r);
    j = find(v, r);
    if (i != j) {
      select[k][0] = u;
      select[k][1] = v;
      count++;
      k++;
      sum = sum + cost[u][v];
      unionij(i, j, r, n);
    }
    cost[u][v] = cost[v][u] = 999;
  }
  if (sum < 999) {
    printf("spannig tree exist\n");
    printf("the sum of cost is%d\n", sum);
    printf("the edges are\n");
    for (i = 0; i < n - 1; i++) {
      printf("\t%d->%d\n", select[i][0], select[i][1]);
    }
  } else
    printf("spannig tree does not exist");
}
```