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

```asm
<iconvConvert>:
  endbr64
  push   %r15
  mov    %rdi,%r15
  push   %r14
  mov    %r8d,%r14d
  push   %r13
  mov    %rsi,%r13
  push   %r12
  mov    %rcx,%r12
  push   %rbp
  push   %rbx
  mov    %edx,%ebx
  sub    $0x38,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  test   %rsi,%rsi
  je     L120
L7:
  test   %ebx,%ebx
  js     L40
  test   %r12,%r12
  je     L107
L24:
  cmp    %r14d,%ebx
  jge    L92
L112:
  movb   $0x0,(%r12)
  movslq %ebx,%rbp
  cmp    $0xffffffffffffffff,%r15
  je     L85
  movslq %r14d,%rax
  lea    0x10(%rsp),%r8
  lea    0x20(%rsp),%rcx
  mov    %r15,%rdi
  lea    0x8(%rsp),%rdx
  lea    0x18(%rsp),%rsi
  mov    %r13,0x18(%rsp)
  mov    %r12,0x20(%rsp)
  mov    %rbp,0x8(%rsp)
  mov    %rax,0x10(%rsp)
  call   <iconv@plt>
  mov    %eax,%r8d
  mov    $0xffffffff,%eax
  test   %r8d,%r8d
  js     L33
  cmpq   $0x0,0x8(%rsp)
  jne    L33
  mov    %r14d,%eax
  sub    0x10(%rsp),%eax
  movslq %eax,%rdx
  movb   $0x0,(%r12,%rdx,1)
L33:
  mov    0x28(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L10
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L85:
  mov    %ebx,%edx
  mov    %r13,%rsi
  mov    %r12,%rdi
  call   <memcpy@plt>
  movb   $0x0,(%r12,%rbp,1)
  mov    %ebx,%eax
  jmp    L33
  cs nopw 0x0(%rax,%rax,1)
L92:
  lea    D74(%rip),%rdx
  mov    $0x7d,%esi
  lea    D2(%rip),%rdi
  call   <utfError@plt>
  jmp    L112
  nopl   (%rax)
L40:
  lea    D19(%rip),%rdx
  mov    $0x7b,%esi
  lea    D2(%rip),%rdi
  call   <utfError@plt>
  test   %r12,%r12
  jne    L24
L107:
  lea    D45(%rip),%rdx
  mov    $0x7c,%esi
  lea    D2(%rip),%rdi
  call   <utfError@plt>
  jmp    L24
  xchg   %ax,%ax
L120:
  lea    D56(%rip),%rdx
  mov    $0x7a,%esi
  lea    D2(%rip),%rdi
  call   <utfError@plt>
  jmp    L7
L10:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: tag: D74
type_infered: string
name: retrieve_data
arguments: tag: D2
type_infered: string
name: retrieve_data
arguments: tag: D19
type_infered: string
name: retrieve_data
arguments: tag: D45
type_infered: string
name: retrieve_data
arguments: tag: D56
type_infered: string

tool: D74: ASSERT ERROR outputMaxLen>len

tool: D2: /scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/34benma/openjdk/refs/heads/jaklin-master/jdk/src/java.instrument/unix/native/libinstrument/EncodingSupport_md.c

tool: D19: ASSERT ERROR len>=0

tool: D45: ASSERT ERROR output

tool: D56: ASSERT ERROR bytes

assistant: ```c
int iconvConvert(iconv_t ic, char *bytes, int len, char *output, int outputMaxLen) {
  int outputLen = 0;
  ((bytes) == 0 ? utfError("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/34benma/openjdk/refs/heads/jaklin-master/jdk/src/java.instrument/unix/native/libinstrument/EncodingSupport_md.c", 122,
                           "ASSERT ERROR "
                           "bytes")
                : (void)0);
  ((len >= 0) == 0 ? utfError("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/34benma/openjdk/refs/heads/jaklin-master/jdk/src/java.instrument/unix/native/libinstrument/EncodingSupport_md.c", 123,
                              "ASSERT ERROR "
                              "len>=0")
                   : (void)0);
  ((output) == 0 ? utfError("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/34benma/openjdk/refs/heads/jaklin-master/jdk/src/java.instrument/unix/native/libinstrument/EncodingSupport_md.c", 124,
                            "ASSERT ERROR "
                            "output")
                 : (void)0);
  ((outputMaxLen > len) == 0 ? utfError("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/34benma/openjdk/refs/heads/jaklin-master/jdk/src/java.instrument/unix/native/libinstrument/EncodingSupport_md.c", 125,
                                        "ASSERT ERROR "
                                        "outputMaxLen>len")
                             : (void)0);
  output[0] = 0;
  outputLen = 0;
  if (ic != (iconv_t)-1) {
    int returnValue;
    size_t inLeft;
    size_t outLeft;
    char *inbuf;
    char *outbuf;
    inbuf = bytes;
    outbuf = output;
    inLeft = len;
    outLeft = outputMaxLen;
    returnValue = iconv(ic, (void *)&inbuf, &inLeft, &outbuf, &outLeft);
    if (returnValue >= 0 && inLeft == 0) {
      outputLen = outputMaxLen - outLeft;
      output[outputLen] = 0;
      return outputLen;
    }
    return -1;
  }
  outputLen = len;
  (void)memcpy(output, bytes, len);
  output[len] = 0;
  return outputLen;
}
```