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

```asm
<f_maxmemory>:
  endbr64
  push   %r14
  lea    D74(%rip),%rdx
  push   %r13
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  call   <get_var@plt>
  xor    %esi,%esi
  mov    $0xa,%edx
  mov    %eax,%edi
  call   <strtoull@plt>
  mov    %r12,%rsi
  mov    %rbp,%rdi
  lea    D130(%rip),%rdx
  mov    %rax,%r14
  call   <get_var@plt>
  xor    %esi,%esi
  mov    $0xa,%edx
  mov    %eax,%edi
  call   <strtoull@plt>
  mov    %r12,%rsi
  mov    %rbp,%rdi
  lea    D61(%rip),%rdx
  cmp    %rax,%r14
  cmova  %rax,%r14
  call   <get_var@plt>
  xor    %esi,%esi
  mov    $0xa,%edx
  mov    %eax,%edi
  call   <strtoull@plt>
  mov    %r12,%rsi
  mov    %rbp,%rdi
  lea    D40(%rip),%rdx
  mov    %rax,%rbx
  call   <get_var@plt>
  xor    %esi,%esi
  mov    $0xa,%edx
  mov    %eax,%edi
  call   <strtoull@plt>
  mov    %r12,%rsi
  mov    %rbp,%rdi
  lea    D99(%rip),%rdx
  add    %rax,%rbx
  call   <get_var@plt>
  xor    %esi,%esi
  mov    $0xa,%edx
  mov    %eax,%edi
  call   <strtoull@plt>
  mov    %r12,%rsi
  mov    %rbp,%rdi
  lea    D43(%rip),%rdx
  lea    (%rax,%rbx,1),%r13
  call   <get_var@plt>
  xor    %esi,%esi
  mov    $0xa,%edx
  mov    %eax,%edi
  call   <strtoull@plt>
  mov    %r12,%rsi
  mov    %rbp,%rdi
  lea    D64(%rip),%rdx
  add    %rax,%r13
  call   <get_var@plt>
  xor    %esi,%esi
  mov    $0xa,%edx
  mov    %eax,%edi
  call   <strtoull@plt>
  mov    %r12,%rsi
  mov    %rbp,%rdi
  lea    D73(%rip),%rdx
  add    %rax,%r13
  call   <get_var@plt>
  xor    %esi,%esi
  mov    $0xa,%edx
  add    %r14,%r13
  mov    %eax,%edi
  call   <strtoull@plt>
  mov    %r12,%rsi
  mov    %rbp,%rdi
  lea    D4(%rip),%rdx
  mov    %rax,%rbx
  call   <get_var@plt>
  xor    %esi,%esi
  mov    $0xa,%edx
  mov    %eax,%edi
  call   <strtoull@plt>
  mov    %r12,%rsi
  mov    %rbp,%rdi
  lea    D45(%rip),%rdx
  add    %rax,%rbx
  call   <get_var@plt>
  xor    %esi,%esi
  mov    $0xa,%edx
  mov    %eax,%edi
  call   <strtoull@plt>
  mov    %r12,%rsi
  mov    %rbp,%rdi
  lea    D77(%rip),%rdx
  add    %rax,%rbx
  call   <get_var@plt>
  mov    $0xa,%edx
  xor    %esi,%esi
  mov    %eax,%edi
  call   <strtoull@plt>
  mov    %r12,%rsi
  mov    %rbp,%rdi
  lea    D108(%rip),%rdx
  add    %rax,%rbx
  call   <get_var@plt>
  mov    $0xa,%edx
  xor    %esi,%esi
  mov    %eax,%edi
  call   <strtoull@plt>
  mov    %r12,%rsi
  mov    %rbp,%rdi
  lea    D127(%rip),%rdx
  add    %rax,%rbx
  call   <get_var@plt>
  xor    %esi,%esi
  mov    $0xa,%edx
  mov    %eax,%edi
  call   <strtoull@plt>
  lea    D72(%rip),%rdi
  imul   %rbx,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  lea    (%rax,%r13,1),%rsi
  pop    %r13
  pop    %r14
  jmp    1070 <printf@plt>
```

tool_calls: name: retrieve_data
arguments: label: D74
type_infered: string
name: retrieve_data
arguments: label: D130
type_infered: string
name: retrieve_data
arguments: label: D61
type_infered: string
name: retrieve_data
arguments: label: D40
type_infered: string
name: retrieve_data
arguments: label: D99
type_infered: string
name: retrieve_data
arguments: label: D43
type_infered: string
name: retrieve_data
arguments: label: D64
type_infered: string
name: retrieve_data
arguments: label: D73
type_infered: string
name: retrieve_data
arguments: label: D4
type_infered: string
name: retrieve_data
arguments: label: D45
type_infered: string
name: retrieve_data
arguments: label: D77
type_infered: string
name: retrieve_data
arguments: label: D108
type_infered: string
name: retrieve_data
arguments: label: D127
type_infered: string
name: retrieve_data
arguments: label: D72
type_infered: string

tool: D74: tmp_table_size

tool: D130: max_heap_table_size

tool: D61: key_buffer_size

tool: D40: innodb_buffer_pool_size

tool: D99: innodb_additional_mem_pool_size

tool: D43: innodb_log_buffer_size

tool: D64: query_cache_size

tool: D73: read_buffer_size

tool: D4: read_rnd_buffer_size

tool: D45: sort_buffer_size

tool: D77: thread_stack

tool: D108: join_buffer_size

tool: D127: max_connections

tool: D72: %llu

assistant: ```c
void f_maxmemory(const char *buffer, size_t len) {
  unsigned long long tmp_table_size;
  unsigned long long max_heap_table_size;
  unsigned long long max_tmp_table_size;
  unsigned long long server_buffers;
  unsigned long long per_thread_buffers;
  unsigned long long total_per_thread_buffers;
  tmp_table_size = strtoull(get_var(buffer, len, "tmp_table_size"), NULL, 10);
  max_heap_table_size = strtoull(get_var(buffer, len, "max_heap_table_size"), NULL, 10);
  max_tmp_table_size = (tmp_table_size > max_heap_table_size) ? max_heap_table_size : tmp_table_size;
  server_buffers = strtoull(get_var(buffer, len, "key_buffer_size"), NULL, 10) + max_tmp_table_size;
  server_buffers += strtoull(get_var(buffer, len, "innodb_buffer_pool_size"), NULL, 10);
  server_buffers += strtoull(get_var(buffer, len, "innodb_additional_mem_pool_size"), NULL, 10);
  server_buffers += strtoull(get_var(buffer, len, "innodb_log_buffer_size"), NULL, 10);
  server_buffers += strtoull(get_var(buffer, len, "query_cache_size"), NULL, 10);
  per_thread_buffers = strtoull(get_var(buffer, len, "read_buffer_size"), NULL, 10);
  per_thread_buffers += strtoull(get_var(buffer, len, "read_rnd_buffer_size"), NULL, 10);
  per_thread_buffers += strtoull(get_var(buffer, len, "sort_buffer_size"), NULL, 10);
  per_thread_buffers += strtoull(get_var(buffer, len, "thread_stack"), NULL, 10);
  per_thread_buffers += strtoull(get_var(buffer, len, "join_buffer_size"), NULL, 10);
  total_per_thread_buffers = per_thread_buffers * strtoull(get_var(buffer, len, "max_connections"), NULL, 10);
  printf("%llu", server_buffers + total_per_thread_buffers);
}
```