user: Converte this assembly snippet into its equivalent C code:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %edi,-0x34(%rbp)
  mov    %rsi,-0x40(%rbp)
  movl   $0xa,-0x28(%rbp)
  movq   $0x0,-0x8(%rbp)
  movl   $0x0,-0x24(%rbp)
  movl   $0x0,-0x20(%rbp)
  movl   $0x0,-0x1c(%rbp)
  cmpl   $0x2,-0x34(%rbp)
  jne    L29
  mov    -0x40(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  test   %eax,%eax
  jle    L29
  mov    -0x40(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  cmp    $0x63,%eax
  jg     L29
  mov    -0x40(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    %eax,-0x28(%rbp)
L29:
  mov    -0x28(%rbp),%eax
  mov    %eax,%edi
  call   <init_tree@plt>
  mov    %rax,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <tree_depth@plt>
  mov    %eax,-0x24(%rbp)
  mov    -0x24(%rbp),%eax
  mov    %eax,%esi
  lea    D59(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x24(%rbp),%edx
  mov    -0x8(%rbp),%rax
  mov    %edx,%ecx
  mov    $0x1,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <find_depth_most_left@plt>
  mov    %eax,-0x20(%rbp)
  mov    -0x20(%rbp),%edx
  mov    -0x24(%rbp),%eax
  mov    %eax,%esi
  lea    D17(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x24(%rbp),%edx
  mov    -0x8(%rbp),%rax
  mov    %edx,%ecx
  mov    $0x1,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <find_depth_most_right@plt>
  mov    %eax,-0x1c(%rbp)
  mov    -0x1c(%rbp),%edx
  mov    -0x24(%rbp),%eax
  mov    %eax,%esi
  lea    D3(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <trim_the_tree@plt>
  mov    -0x8(%rbp),%rax
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <find_most_left@plt>
  mov    %eax,-0x18(%rbp)
  mov    -0x18(%rbp),%eax
  mov    %eax,%esi
  lea    D60(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x8(%rbp),%rax
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <find_most_right@plt>
  mov    %eax,-0x14(%rbp)
  mov    -0x14(%rbp),%eax
  mov    %eax,%esi
  lea    D18(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x18(%rbp),%edx
  mov    -0x8(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <find_most_left_val@plt>
  mov    %eax,-0x10(%rbp)
  mov    -0x10(%rbp),%eax
  mov    %eax,%esi
  lea    D57(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x14(%rbp),%edx
  mov    -0x8(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <find_most_right_val@plt>
  mov    %eax,-0xc(%rbp)
  mov    -0xc(%rbp),%eax
  mov    %eax,%esi
  lea    D13(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x10(%rbp),%edx
  mov    -0x8(%rbp),%rax
  mov    $0x1,%esi
  mov    %rax,%rdi
  call   <find_val_depth@plt>
  mov    %eax,-0x24(%rbp)
  mov    -0x24(%rbp),%edx
  mov    -0x10(%rbp),%eax
  mov    %eax,%esi
  lea    D64(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0xc(%rbp),%edx
  mov    -0x8(%rbp),%rax
  mov    $0x1,%esi
  mov    %rax,%rdi
  call   <find_val_depth@plt>
  mov    %eax,-0x24(%rbp)
  mov    -0x24(%rbp),%edx
  mov    -0xc(%rbp),%eax
  mov    %eax,%esi
  lea    D64(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <show_tree_pic@plt>
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <destory_tree@plt>
  mov    $0x0,%eax
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: data_label: D59
type_infered: string
name: retrieve_data
arguments: data_label: D17
type_infered: string
name: retrieve_data
arguments: data_label: D3
type_infered: string
name: retrieve_data
arguments: data_label: D60
type_infered: string
name: retrieve_data
arguments: data_label: D18
type_infered: string
name: retrieve_data
arguments: data_label: D57
type_infered: string
name: retrieve_data
arguments: data_label: D13
type_infered: string
name: retrieve_data
arguments: data_label: D64
type_infered: string

tool: D59: tree depth is = %d


tool: D17: depth(%d), the most left = %d


tool: D3: depth(%d), the most right = %d


tool: D60: the most left = %d


tool: D18: the most right = %d


tool: D57: the most left val = %d


tool: D13: the most right val = %d


tool: D64: value(%2d), depth(%d)


assistant: ```c
int main(int argc, char *argv[]) {
  int node_count = 10;
  struct link *r = NULL;
  int most_left;
  int most_right;
  int most_left_val;
  int most_right_val;
  int depth = 0;
  int most_left_of_depth = 0;
  int most_right_of_depth = 0;
  if (argc == 2 && atoi(argv[1]) > 0 && atoi(argv[1]) < 100) {
    node_count = atoi(argv[1]);
  }
  r = init_tree(node_count);
  depth = tree_depth(r);
  printf("tree depth is = %d\n", depth);
  most_left_of_depth = find_depth_most_left(r, 0, 1, depth);
  printf("depth(%d), the most left = %d\n", depth, most_left_of_depth);
  most_right_of_depth = find_depth_most_right(r, 0, 1, depth);
  printf("depth(%d), the most right = %d\n", depth, most_right_of_depth);
  trim_the_tree(r);
  most_left = find_most_left(r, 0);
  printf("the most left = %d\n", most_left);
  most_right = find_most_right(r, 0);
  printf("the most right = %d\n", most_right);
  most_left_val = find_most_left_val(r, most_left);
  printf("the most left val = %d\n", most_left_val);
  most_right_val = find_most_right_val(r, most_right);
  printf("the most right val = %d\n", most_right_val);
  depth = find_val_depth(r, 1, most_left_val);
  printf("value(%2d), depth(%d)\n", most_left_val, depth);
  depth = find_val_depth(r, 1, most_right_val);
  printf("value(%2d), depth(%d)\n", most_right_val, depth);
  show_tree_pic(r);
  destory_tree(r);
  return 0;
}
```