user: Please show me the C implementation that matches the assembly code listed below:

```asm
<ob_itoa>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r12
  push   %rbx
  mov    %edi,-0x24(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %edx,-0x28(%rbp)
  mov    $0x0,%ebx
  cmpl   $0x0,-0x24(%rbp)
  jne    L71
  mov    -0x30(%rbp),%rax
  movb   $0x30,(%rax)
  mov    -0x30(%rbp),%rax
  add    $0x1,%rax
  movb   $0x0,(%rax)
  mov    -0x30(%rbp),%rax
  jmp    L55
L44:
  mov    -0x24(%rbp),%eax
  cltd
  idivl  -0x28(%rbp)
  mov    %edx,%ecx
  mov    %ebx,%eax
  lea    0x1(%rax),%ebx
  movslq %eax,%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0x24(%rbp),%eax
  cltd
  idivl  -0x28(%rbp)
  mov    %eax,-0x24(%rbp)
L71:
  cmpl   $0x0,-0x24(%rbp)
  jg     L44
  sub    $0x1,%ebx
  mov    %ebx,%r12d
  jmp    L95
L104:
  mov    %ebx,%eax
  sub    %r12d,%eax
  movslq %eax,%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    %al,-0x11(%rbp)
  movslq %r12d,%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x9,%al
  jg     L8
  movslq %r12d,%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  lea    0x30(%rax),%ecx
  mov    %ebx,%eax
  sub    %r12d,%eax
  movslq %eax,%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    %ecx,%edx
  mov    %dl,(%rax)
  jmp    L2
L8:
  movslq %r12d,%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  lea    0x57(%rax),%ecx
  mov    %ebx,%eax
  sub    %r12d,%eax
  movslq %eax,%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    %ecx,%edx
  mov    %dl,(%rax)
L2:
  cmpb   $0x9,-0x11(%rbp)
  jg     L72
  movzbl -0x11(%rbp),%eax
  lea    0x30(%rax),%ecx
  movslq %r12d,%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    %ecx,%edx
  mov    %dl,(%rax)
  jmp    L81
L72:
  movzbl -0x11(%rbp),%eax
  lea    0x57(%rax),%ecx
  movslq %r12d,%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    %ecx,%edx
  mov    %dl,(%rax)
L81:
  sub    $0x1,%r12d
L95:
  mov    %ebx,%eax
  shr    $0x1f,%eax
  add    %ebx,%eax
  sar    %eax
  cmp    %eax,%r12d
  jg     L104
  mov    %ebx,%eax
  and    $0x1,%eax
  test   %eax,%eax
  jne    L36
  mov    %ebx,%eax
  shr    $0x1f,%eax
  add    %ebx,%eax
  sar    %eax
  movslq %eax,%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x9,%al
  jg     L33
  mov    %ebx,%eax
  shr    $0x1f,%eax
  add    %ebx,%eax
  sar    %eax
  movslq %eax,%rcx
  mov    -0x30(%rbp),%rdx
  add    %rcx,%rdx
  movzbl (%rdx),%edx
  lea    0x30(%rdx),%ecx
  movslq %eax,%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    %ecx,%edx
  mov    %dl,(%rax)
  jmp    L36
L33:
  mov    %ebx,%eax
  shr    $0x1f,%eax
  add    %ebx,%eax
  sar    %eax
  movslq %eax,%rcx
  mov    -0x30(%rbp),%rdx
  add    %rcx,%rdx
  movzbl (%rdx),%edx
  lea    0x57(%rdx),%ecx
  movslq %eax,%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    %ecx,%edx
  mov    %dl,(%rax)
L36:
  add    $0x1,%ebx
  movslq %ebx,%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  mov    -0x30(%rbp),%rax
L55:
  pop    %rbx
  pop    %r12
  pop    %rbp
  ret
```

assistant: ```c
char *ob_itoa(int value, char *str, int base) {
  register int i = 0, j;
  char temp;
  if (value == 0) {
    str[0] = '0';
    str[1] = 0;
    return str;
  }
  while (value > 0) {
    str[i++] = value % base;
    value = value / base;
  }
  i--;
  for (j = i; j > (i / 2); j--) {
    temp = str[i - j];
    if (str[j] < 10) {
      str[i - j] = str[j] + '0';
    } else {
      str[i - j] = str[j] + 'a' - 10;
    }
    if (temp < 10) {
      str[j] = temp + '0';
    } else {
      str[j] = temp + 'a' - 10;
    }
  }
  if (!(i % 2)) {
    if (str[i / 2] < 10) {
      str[i / 2] += '0';
    } else {
      str[i / 2] += 'a' - 10;
    }
  }
  str[++i] = 0;
  return str;
}
```