user: What is the c source code of the assembly code below?

```asm
<i2c_ASN1_INTEGER>:
  endbr64
  push   %r12
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  mov    %rdi,%rbx
  call   <ASN1_INTEGER_valid@plt>
  mov    %eax,%r12d
  test   %eax,%eax
  je     L210
  mov    D2(%rip),%rdx
  mov    0x4(%rbx),%r8d
  mov    (%rbx),%eax
  mov    (%rdx),%edx
  test   %r8d,%r8d
  jne    L170
  test   %rbp,%rbp
  je     L250
  mov    0x0(%rbp),%rdi
  mov    $0x1,%r8d
  mov    $0x1,%r12d
L20:
  movb   $0x0,(%rdi)
L80:
  add    %r8,0x0(%rbp)
L210:
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  cs nopw 0x0(%rax,%rax,1)
L170:
  mov    0x8(%rbx),%rsi
  mov    (%rsi),%ecx
  and    %edx,%eax
  jne    L174
  cmp    $0x7f,%ecx
  jle    L185
  lea    0x1(%r8),%r12d
  test   %rbp,%rbp
  je     L210
  mov    0x0(%rbp),%rax
  movb   $0x0,(%rax)
  mov    0x4(%rbx),%r8d
  lea    0x1(%rax),%rdi
  test   %r8d,%r8d
  je     L141
  mov    0x8(%rbx),%rsi
L131:
  mov    %r8d,%edx
  call   <memcpy@plt>
  movslq %r12d,%r8
  jmp    L80
  nopl   0x0(%rax)
L185:
  test   %eax,%eax
  jne    L174
  test   %rbp,%rbp
  je     L63
  mov    0x0(%rbp),%rdi
  mov    %r8d,%r12d
  jmp    L131
  xchg   %ax,%ax
L174:
  cmp    $0x80,%ecx
  jle    L122
L17:
  lea    0x1(%r8),%r12d
  test   %rbp,%rbp
  je     L210
  mov    0x0(%rbp),%rdx
  movb   $0xff,(%rdx)
  mov    0x4(%rbx),%r8d
  lea    0x1(%rdx),%rdi
  test   %r8d,%r8d
  je     L141
  mov    0x8(%rbx),%rsi
  test   %eax,%eax
  je     L131
L316:
  movslq %r8d,%rax
  lea    -0x4(%rsi,%rax,4),%rcx
  lea    -0x1(%rdi,%rax,1),%rdi
  movzbl (%rcx),%esi
  mov    %rdi,%rax
  test   %sil,%sil
  jne    L235
  nopl   (%rax)
L248:
  sub    $0x1,%rcx
  sub    $0x1,%rax
  movb   $0x0,0x1(%rax)
  movzbl (%rcx),%esi
  lea    (%r8,%rax,1),%edx
  sub    %edi,%edx
  test   %sil,%sil
  je     L248
L222:
  neg    %esi
  movslq %r12d,%r8
  mov    %sil,(%rax)
  cmp    $0x1,%edx
  jle    L80
  sub    $0x2,%edx
  mov    $0xfffffffffffffffe,%rdi
  sub    %rdx,%rdi
  mov    $0xffffffffffffffff,%rdx
  nopw   0x0(%rax,%rax,1)
L290:
  movzbl (%rcx,%rdx,1),%esi
  not    %esi
  mov    %sil,(%rax,%rdx,1)
  sub    $0x1,%rdx
  cmp    %rdx,%rdi
  jne    L290
  jmp    L80
  nopl   0x0(%rax,%rax,1)
L250:
  mov    $0x1,%r12d
  jmp    L210
  nopl   0x0(%rax,%rax,1)
L122:
  je     L178
L173:
  test   %rbp,%rbp
  je     L63
  mov    0x0(%rbp),%rdi
  mov    %r8d,%r12d
  jmp    L316
  nopl   0x0(%rax,%rax,1)
L63:
  mov    %r8d,%r12d
  jmp    L210
L235:
  mov    %r8d,%edx
  jmp    L222
L178:
  cmp    $0x1,%r8d
  jle    L173
  lea    -0x2(%r8),%ecx
  lea    0x4(%rsi),%rdx
  lea    0x8(%rsi,%rcx,4),%rcx
  jmp    L145
  nopl   (%rax)
L267:
  add    $0x4,%rdx
  cmp    %rdx,%rcx
  je     L173
L145:
  mov    (%rdx),%edi
  test   %edi,%edi
  je     L267
  jmp    L17
L141:
  movslq %r12d,%r8
  jmp    L20
```

assistant: ```c
int i2c_ASN1_INTEGER(ASN1_INTEGER *a, unsigned char **pp) {
  int pad = 0, ret, i, neg;
  unsigned char *p, *n, pb = 0;
  if (!ASN1_INTEGER_valid(a))
    return 0;
  neg = a->type & V_ASN1_NEG;
  if (a->length == 0)
    ret = 1;
  else {
    ret = a->length;
    i = a->data[0];
    if (!neg && (i > 127)) {
      pad = 1;
      pb = 0;
    } else if (neg) {
      if (i > 128) {
        pad = 1;
        pb = 0xFF;
      } else if (i == 128) {
        for (i = 1; i < a->length; i++)
          if (a->data[i]) {
            pad = 1;
            pb = 0xFF;
            break;
          }
      }
    }
    ret += pad;
  }
  if (pp == NULL)
    return (ret);
  p = *pp;
  if (pad)
    *(p++) = pb;
  if (a->length == 0)
    *(p++) = 0;
  else if (!neg)
    memcpy(p, a->data, a->length);
  else {
    n = a->data + a->length - 1;
    p += a->length - 1;
    i = a->length;
    while (!*n) {
      *(p--) = 0;
      n--;
      i--;
    }
    *(p--) = ((*(n--)) ^ 0xff) + 1;
    i--;
    for (; i > 0; i--)
      *(p--) = *(n--) ^ 0xff;
  }
  *pp += ret;
  return (ret);
}
```