user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<main>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  lea    D73(%rip),%rbp
  mov    %rbp,%rdi
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  mov    %rsp,%r14
  lea    0x4(%rsp),%r13
  call   <print_text@plt>
  mov    %rbp,%rdi
  mov    $0xe,%esi
  call   <buf1@plt>
  mov    %rbp,%rdi
  mov    $0xe,%esi
  mov    %rax,%r12
  call   <buf2@plt>
  mov    %r12,%rsi
  lea    D68(%rip),%rdi
  mov    %rax,%rbp
  xor    %eax,%eax
  call   <printf@plt>
  mov    %rbp,%rsi
  lea    D41(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    D44(%rip),%rbp
  mov    $0x3,%esi
  mov    %rbp,%rdi
  lea    0x3(%rbp),%r12
  call   <ptr@plt>
  lea    D8(%rip),%rdi
  mov    %rax,%rsi
  xor    %eax,%eax
  call   <printf@plt>
  mov    $0x3,%edx
  mov    %rbp,%rsi
  mov    %r14,%rdi
  call   <strncpy@plt>
  mov    $0x3,%edx
  mov    %r12,%rsi
  mov    %r13,%rdi
  movb   $0x0,0x3(%rsp)
  call   <strncpy@plt>
  mov    %r12,%rsi
  mov    %rbp,%rdi
  movb   $0x0,0x7(%rsp)
  call   <index@plt>
  lea    D45(%rip),%rdi
  mov    %eax,%esi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %rbp,%rsi
  lea    D86(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %r12,%rsi
  lea    D40(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %r14,%rsi
  lea    D69(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  xor    %eax,%eax
  mov    %r13,%rsi
  lea    D82(%rip),%rdi
  call   <printf@plt>
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L7
  add    $0x18,%rsp
  xor    %eax,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L7:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_tag: D73
type: string
name: unpack_data
arguments: data_tag: D68
type: string
name: unpack_data
arguments: data_tag: D41
type: string
name: unpack_data
arguments: data_tag: D44
type: string
name: unpack_data
arguments: data_tag: D8
type: string
name: unpack_data
arguments: data_tag: D45
type: string
name: unpack_data
arguments: data_tag: D86
type: string
name: unpack_data
arguments: data_tag: D40
type: string
name: unpack_data
arguments: data_tag: D69
type: string
name: unpack_data
arguments: data_tag: D82
type: string

tool: D73: Mary had a little lamb, its fleece was white as snow.

tool: D68: Buffer1: %s 


tool: D41: Buffer2: %s 


tool: D44: obsidian

tool: D8: Ptr: %s 


tool: D45: Index: %d 


tool: D86: Foo: %s 


tool: D40: Bar: %s 


tool: D69: Baz: %s 


tool: D82: Middle: %s 


assistant: ```c
int main() {
  char *text = "Mary had a little lamb, its fleece was white as snow.";
  print_text(text);
  char *buffer1 = buf1(text, 14);
  char *buffer2 = buf2(text, 14);
  printf("Buffer1: %s \n", buffer1);
  printf("Buffer2: %s \n", buffer2);
  char *test = ptr("obsidian", 3);
  printf("Ptr: %s \n", test);
  char *foo = "obsidian";
  char *bar = foo + 3;
  char baz[4];
  strncpy(baz, foo, 3);
  baz[3] = 0;
  char middle[4];
  strncpy(middle, bar, 3);
  middle[3] = 0;
  int myindex = index(foo, bar);
  printf("Index: %d \n", myindex);
  printf("Foo: %s \n", foo);
  printf("Bar: %s \n", bar);
  printf("Baz: %s \n", baz);
  printf("Middle: %s \n", middle);
  return 0;
}
```