user: What would the C source look like for the assembly code provided here?

```asm
<my_putnbr_base>:
  endbr64
  push   %r12
  mov    %edi,%r12d
  mov    %rsi,%rdi
  push   %rbp
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  call   <my_strlen@plt>
  test   %r12d,%r12d
  jle    L157
  mov    %eax,%ecx
  mov    %r12d,%eax
  cltd
  idiv   %ecx
  movslq %edx,%rdx
  mov    %eax,%r12d
  movzbl (%rbx,%rdx,1),%edx
  mov    %dl,0xc(%rsp)
  test   %eax,%eax
  jle    L171
  cltd
  idiv   %ecx
  movslq %edx,%rdx
  mov    %eax,%r12d
  movzbl (%rbx,%rdx,1),%edx
  mov    %dl,0xd(%rsp)
  test   %eax,%eax
  jle    L236
  cltd
  idiv   %ecx
  movslq %edx,%rdx
  mov    %eax,%r12d
  movzbl (%rbx,%rdx,1),%edx
  mov    %dl,0xe(%rsp)
  test   %eax,%eax
  jle    L10
  cltd
  idiv   %ecx
  movslq %edx,%rdx
  mov    %eax,%r12d
  movzbl (%rbx,%rdx,1),%edx
  mov    %dl,0xf(%rsp)
  test   %eax,%eax
  jle    L108
  cltd
  idiv   %ecx
  movslq %edx,%rdx
  mov    %eax,%r12d
  movzbl (%rbx,%rdx,1),%edx
  mov    %dl,0x10(%rsp)
  test   %eax,%eax
  jle    L194
  cltd
  idiv   %ecx
  movslq %edx,%rdx
  mov    %eax,%r12d
  movzbl (%rbx,%rdx,1),%edx
  mov    %dl,0x11(%rsp)
  test   %eax,%eax
  jle    L48
  cltd
  idiv   %ecx
  movslq %edx,%rdx
  mov    %eax,%r12d
  movzbl (%rbx,%rdx,1),%edx
  mov    %dl,0x12(%rsp)
  test   %eax,%eax
  jle    L204
  cltd
  idiv   %ecx
  movslq %edx,%rdx
  mov    %eax,%r12d
  movzbl (%rbx,%rdx,1),%edx
  mov    %dl,0x13(%rsp)
  test   %eax,%eax
  jle    L35
  cltd
  idiv   %ecx
  movslq %edx,%rdx
  mov    %eax,%r12d
  movzbl (%rbx,%rdx,1),%edx
  mov    %dl,0x14(%rsp)
  test   %eax,%eax
  jle    L7
  cltd
  idiv   %ecx
  movslq %edx,%rdx
  mov    %eax,%r12d
  movzbl (%rbx,%rdx,1),%edx
  mov    %dl,0x15(%rsp)
  test   %eax,%eax
  jle    L9
  cltd
  idiv   %ecx
  movslq %edx,%rdx
  mov    %eax,%r12d
  movzbl (%rbx,%rdx,1),%edx
  mov    %dl,0x16(%rsp)
  test   %eax,%eax
  jle    L18
  cltd
  idiv   %ecx
  movslq %edx,%rdx
  mov    %eax,%r12d
  mov    $0xb,%eax
  movzbl (%rbx,%rdx,1),%edx
  mov    %dl,0x17(%rsp)
L189:
  lea    0xc(%rsp,%rax,1),%rbx
  lea    0xb(%rsp),%rbp
  nopl   0x0(%rax,%rax,1)
L106:
  mov    %rbx,%rsi
  mov    $0x1,%edx
  mov    $0x1,%edi
  sub    $0x1,%rbx
  call   <write@plt>
  cmp    %rbp,%rbx
  jne    L106
L157:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L228
  add    $0x20,%rsp
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L194:
  mov    $0x4,%eax
  jmp    L189
  xchg   %ax,%ax
L171:
  xor    %eax,%eax
  jmp    L189
L236:
  mov    $0x1,%eax
  jmp    L189
L10:
  mov    $0x2,%eax
  jmp    L189
L108:
  mov    $0x3,%eax
  jmp    L189
L48:
  mov    $0x5,%eax
  jmp    L189
L204:
  mov    $0x6,%eax
  jmp    L189
L35:
  mov    $0x7,%eax
  jmp    L189
L7:
  mov    $0x8,%eax
  jmp    L189
L9:
  mov    $0x9,%eax
  jmp    L189
L18:
  mov    $0xa,%eax
  jmp    L189
L228:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int my_putnbr_base(int nbr, char *base) {
  char str[12];
  int nbase;
  int i;
  i = 0;
  nbase = my_strlen(base);
  while (nbr > 0) {
    str[i] = base[nbr % nbase];
    nbr = nbr / nbase;
    ++i;
  }
  while (i--) {
    write(1, &str[i], 1);
  }
  return (nbr);
}
```