user: Translate the below assembly code into C programming language:

```asm
<safeId>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  movzbl (%rdi),%ebx
  test   %bl,%bl
  jne    L100
  lea    D27(%rip),%rdi
  mov    $0x0,%eax
  call   <sqlite3_mprintf@plt>
L70:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L100:
  mov    %rdi,%rbp
  movsbl %bl,%ebx
  mov    $0x0,%r12d
  mov    $0x0,%r13d
  test   %ebx,%ebx
  jne    L127
  jmp    L34
L109:
  mov    %ebx,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L150
  add    $0x1,%r13d
L7:
  movsbl 0x1(%rbp,%r12,1),%ebx
  add    $0x1,%r12
  test   %ebx,%ebx
  je     L68
L127:
  mov    %ebx,%edi
  call   <isalpha@plt>
  cmp    $0x5f,%ebx
  je     L7
  test   %eax,%eax
  jne    L7
  test   %r12d,%r12d
  jg     L109
L150:
  mov    %rbp,%rsi
  lea    D2(%rip),%rdi
  mov    $0x0,%eax
  call   <sqlite3_mprintf@plt>
  jmp    L70
L68:
  test   %r13d,%r13d
  jne    L55
L34:
  mov    $0x7b,%r12d
  mov    $0x0,%r13d
  lea    D43(%rip),%r14
  jmp    L6
L55:
  mov    %rbp,%rsi
  lea    D26(%rip),%rdi
  mov    $0x0,%eax
  call   <sqlite3_mprintf@plt>
  jmp    L70
L120:
  mov    %rbp,%rsi
  lea    D2(%rip),%rdi
  call   <sqlite3_mprintf@plt>
  jmp    L70
L46:
  lea    0x1(%rbx),%r13d
L94:
  cmp    %r12d,%r13d
  jg     L63
L6:
  lea    0x0(%r13,%r12,1),%eax
  mov    %eax,%ebx
  shr    $0x1f,%ebx
  add    %eax,%ebx
  sar    %ebx
  movslq %ebx,%rax
  mov    (%r14,%rax,8),%rdi
  mov    %rbp,%rsi
  call   <sqlite3_stricmp@plt>
  test   %eax,%eax
  je     L120
  js     L46
  lea    -0x1(%rbx),%r12d
  jmp    L94
L63:
  mov    %rbp,%rsi
  lea    D26(%rip),%rdi
  mov    $0x0,%eax
  call   <sqlite3_mprintf@plt>
  jmp    L70
```

tool_calls: name: disassemble_data
arguments: tag: D27
type_infered: string
name: disassemble_data
arguments: tag: D2
type_infered: string
name: disassemble_data
arguments: tag: D26
type_infered: string

tool: D27: ""

tool: D2: "%w"

tool: D26: %s

assistant: ```c
char *safeId(const char *zId) {
  static const char *azKeywords[] = {
      "ABORT", "ACTION", "ADD", "AFTER", "ALL", "ALTER", "ANALYZE", "AND", "AS", "ASC", "ATTACH", "AUTOINCREMENT", "BEFORE", "BEGIN", "BETWEEN", "BY", "CASCADE", "CASE", "CAST", "CHECK", "COLLATE", "COLUMN", "COMMIT", "CONFLICT", "CONSTRAINT", "CREATE", "CROSS", "CURRENT_DATE", "CURRENT_TIME", "CURRENT_TIMESTAMP", "DATABASE", "DEFAULT", "DEFERRABLE", "DEFERRED", "DELETE", "DESC", "DETACH", "DISTINCT", "DROP", "EACH", "ELSE", "END", "ESCAPE", "EXCEPT", "EXCLUSIVE", "EXISTS", "EXPLAIN", "FAIL", "FOR", "FOREIGN", "FROM", "FULL", "GLOB", "GROUP", "HAVING", "IF", "IGNORE", "IMMEDIATE", "IN", "INDEX", "INDEXED", "INITIALLY", "INNER", "INSERT", "INSTEAD", "INTERSECT", "INTO", "IS", "ISNULL", "JOIN", "KEY", "LEFT", "LIKE", "LIMIT", "MATCH", "NATURAL", "NO", "NOT", "NOTNULL", "NULL", "OF", "OFFSET", "ON", "OR", "ORDER", "OUTER", "PLAN", "PRAGMA", "PRIMARY", "QUERY", "RAISE", "RECURSIVE", "REFERENCES", "REGEXP", "REINDEX", "RELEASE", "RENAME", "REPLACE", "RESTRICT", "RIGHT", "ROLLBACK", "ROW", "SAVEPOINT", "SELECT", "SET", "TABLE", "TEMP", "TEMPORARY", "THEN", "TO", "TRANSACTION", "TRIGGER", "UNION", "UNIQUE", "UPDATE", "USING", "VACUUM", "VALUES", "VIEW", "VIRTUAL", "WHEN", "WHERE", "WITH", "WITHOUT",
  };
  int lwr, upr, mid, c, i, x;
  if (zId[0] == 0)
    return sqlite3_mprintf("\"\"");
  for (i = x = 0; (c = zId[i]) != 0; i++) {
    if (!isalpha(c) && c != '_') {
      if (i > 0 && isdigit(c)) {
        x++;
      } else {
        return sqlite3_mprintf("\"%w\"", zId);
      }
    }
  }
  if (x)
    return sqlite3_mprintf("%s", zId);
  lwr = 0;
  upr = sizeof(azKeywords) / sizeof(azKeywords[0]) - 1;
  while (lwr <= upr) {
    mid = (lwr + upr) / 2;
    c = sqlite3_stricmp(azKeywords[mid], zId);
    if (c == 0)
      return sqlite3_mprintf("\"%w\"", zId);
    if (c < 0) {
      lwr = mid + 1;
    } else {
      upr = mid - 1;
    }
  }
  return sqlite3_mprintf("%s", zId);
}
```