user: 请将以下的汇编代码转换成C语言代码：

```asm
<bioImageGeneName>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x230,%rsp
  mov    %rdi,%rbx
  mov    %esi,%ebp
  mov    %fs:0x28,%rax
  mov    %rax,0x228(%rsp)
  xor    %eax,%eax
  lea    0x20(%rsp),%r12
  mov    %esi,%ecx
  lea    D8(%rip),%rdx
  mov    $0x100,%esi
  mov    %r12,%rdi
  call   <sqlSafef@plt>
  lea    0x120(%rsp),%rdx
  mov    $0x100,%ecx
  mov    %r12,%rsi
  mov    %rbx,%rdi
  call   <sqlNeedQuickQuery@plt>
  cmpb   $0x0,0x120(%rsp)
  je     L48
L49:
  lea    0x120(%rsp),%rdi
  call   <cloneString@plt>
  mov    0x228(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L52
  add    $0x230,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L48:
  mov    %ebp,%ecx
  lea    D6(%rip),%rdx
  mov    $0x100,%esi
  mov    %r12,%rdi
  call   <sqlSafef@plt>
  lea    0x120(%rsp),%rdx
  mov    $0x100,%ecx
  mov    %r12,%rsi
  mov    %rbx,%rdi
  call   <sqlNeedQuickQuery@plt>
  cmpb   $0x0,0x120(%rsp)
  jne    L49
  mov    %ebp,%ecx
  lea    D32(%rip),%rdx
  mov    $0x100,%esi
  mov    %r12,%rdi
  call   <sqlSafef@plt>
  lea    0x120(%rsp),%rdx
  mov    $0x100,%ecx
  mov    %r12,%rsi
  mov    %rbx,%rdi
  call   <sqlNeedQuickQuery@plt>
  cmpb   $0x0,0x120(%rsp)
  jne    L49
  mov    %ebp,%ecx
  lea    D24(%rip),%rdx
  mov    $0x100,%esi
  mov    %r12,%rdi
  call   <sqlSafef@plt>
  mov    %rsp,%rdx
  mov    $0x20,%ecx
  mov    %r12,%rsi
  mov    %rbx,%rdi
  call   <sqlNeedQuickQuery@plt>
  cmpb   $0x0,(%rsp)
  jne    L13
  mov    %ebp,%ecx
  lea    D27(%rip),%rdx
  mov    $0x100,%esi
  mov    %r12,%rdi
  call   <sqlSafef@plt>
  lea    0x120(%rsp),%rdx
  mov    $0x100,%ecx
  mov    %r12,%rsi
  mov    %rbx,%rdi
  call   <sqlNeedQuickQuery@plt>
  jmp    L49
L13:
  mov    %rsp,%rcx
  lea    0x120(%rsp),%rdi
  lea    D21(%rip),%rdx
  mov    $0x100,%esi
  call   <safef@plt>
  jmp    L49
L52:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: label: D8
datatype: string
name: retrieve_data
arguments: label: D6
datatype: string
name: retrieve_data
arguments: label: D32
datatype: string
name: retrieve_data
arguments: label: D24
datatype: string
name: retrieve_data
arguments: label: D27
datatype: string
name: retrieve_data
arguments: label: D21
datatype: string

tool: D8: select gene from image where id=%d

tool: D6: select refSeq from image where id=%d

tool: D32: select genbank from image where id=%d

tool: D24: select locusLink from image where id=%d

tool: D27: select submitId from image where id=%d

tool: D21: NCBI Gene ID #%s

assistant: ```c
char *bioImageGeneName(struct sqlConnection *conn, int id) {
  char query[256], buf[256];
  sqlSafef(query, sizeof(query), "select gene from image where id=%d", id);
  sqlNeedQuickQuery(conn, query, buf, sizeof(buf));
  if (buf[0] == 0) {
    sqlSafef(query, sizeof(query), "select refSeq from image where id=%d", id);
    sqlNeedQuickQuery(conn, query, buf, sizeof(buf));
    if (buf[0] == 0) {
      sqlSafef(query, sizeof(query), "select genbank from image where id=%d", id);
      sqlNeedQuickQuery(conn, query, buf, sizeof(buf));
      if (buf[0] == 0) {
        char locusLink[32];
        sqlSafef(query, sizeof(query), "select locusLink from image where id=%d", id);
        sqlNeedQuickQuery(conn, query, locusLink, sizeof(locusLink));
        if (locusLink[0] == 0) {
          sqlSafef(query, sizeof(query), "select submitId from image where id=%d", id);
          sqlNeedQuickQuery(conn, query, buf, sizeof(buf));
        } else {
          safef(buf, sizeof(buf), "NCBI Gene ID #%s", locusLink);
        }
      }
    }
  }
  return cloneString(buf);
}
```