user: Converte this assembly snippet into its equivalent C code:

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  lea    D35(%rip),%r14
  push   %r13
  lea    D6(%rip),%r13
  push   %r12
  lea    D3(%rip),%r12
  mov    %r13,%rsi
  push   %rbp
  mov    %r12,%rdi
  push   %rbx
  lea    D12(%rip),%rbx
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  lea    0x14(%rsp),%rbp
  call   <printf@plt>
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <scanf@plt>
  jmp    L77
  nopl   0x0(%rax,%rax,1)
L136:
  test   %esi,%esi
  jne    L47
L3:
  cmp    $0x1,%r8d
  je     L145
L48:
  test   %r8d,%r8d
  jne    L61
L25:
  cmp    $0x1,%r9d
  je     L23
L101:
  test   %r9d,%r9d
  jne    L122
L16:
  cmp    $0x1,%r15d
  je     L58
L92:
  test   %r15d,%r15d
  je     L53
L71:
  mov    %r14,%rdi
  call   <puts@plt>
  mov    %r13,%rsi
  mov    %r12,%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <scanf@plt>
L77:
  mov    0x14(%rsp),%edx
  cmp    $0x2b67,%edx
  ja     L71
  movslq %edx,%rax
  mov    %edx,%ecx
  imul   $0x68db8bad,%rax,%rax
  sar    $0x1f,%ecx
  sar    $0x2c,%rax
  sub    %ecx,%eax
  imul   $0x2710,%eax,%ecx
  mov    %edx,%eax
  sub    $0x2710,%edx
  sub    %ecx,%eax
  mov    %eax,%esi
  imul   $0x10624dd3,%rsi,%rsi
  shr    $0x26,%rsi
  imul   $0x3e8,%esi,%edi
  sub    %edi,%eax
  mov    %eax,%r8d
  mov    %r8,%rcx
  imul   $0x51eb851f,%r8,%r8
  shr    $0x25,%r8
  imul   $0x64,%r8d,%eax
  sub    %eax,%ecx
  mov    $0xcccccccd,%eax
  mov    %ecx,%r9d
  imul   %rax,%r9
  shr    $0x23,%r9
  lea    (%r9,%r9,4),%eax
  add    %eax,%eax
  sub    %eax,%ecx
  cmp    $0x270f,%edx
  setbe  %dl
  mov    %ecx,0x14(%rsp)
  mov    %ecx,%r15d
  movzbl %dl,%edx
  shl    $0x4,%edx
  cmp    $0x1,%esi
  jne    L136
  add    $0x8,%edx
  cmp    $0x1,%r8d
  jne    L48
L145:
  add    $0x4,%edx
  cmp    $0x1,%r9d
  jne    L101
L23:
  add    $0x2,%edx
  cmp    $0x1,%r15d
  jne    L92
L58:
  add    $0x1,%edx
L53:
  xor    %eax,%eax
  lea    D28(%rip),%rsi
  lea    D1(%rip),%rdi
  call   <printf@plt>
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L104
  add    $0x28,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L61:
  mov    %r14,%rdi
  mov    %r9d,0x8(%rsp)
  mov    %edx,0x4(%rsp)
  call   <puts@plt>
  mov    %r13,%rsi
  mov    %r12,%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <scanf@plt>
  mov    0x8(%rsp),%r9d
  mov    0x4(%rsp),%edx
  jmp    L25
  nopw   0x0(%rax,%rax,1)
L47:
  mov    %r14,%rdi
  mov    %r9d,0xc(%rsp)
  mov    %r8d,0x8(%rsp)
  mov    %edx,0x4(%rsp)
  call   <puts@plt>
  mov    %r13,%rsi
  mov    %r12,%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <scanf@plt>
  mov    0xc(%rsp),%r9d
  mov    0x8(%rsp),%r8d
  mov    0x4(%rsp),%edx
  jmp    L3
  nopl   0x0(%rax)
L122:
  mov    %r14,%rdi
  mov    %edx,0x4(%rsp)
  call   <puts@plt>
  mov    %r13,%rsi
  mov    %r12,%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <scanf@plt>
  mov    0x4(%rsp),%edx
  jmp    L16
L104:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: label: D35
type_infered: string
name: retrieve_data
arguments: label: D6
type_infered: string
name: retrieve_data
arguments: label: D3
type_infered: string
name: retrieve_data
arguments: label: D12
type_infered: string
name: retrieve_data
arguments: label: D28
type_infered: string
name: retrieve_data
arguments: label: D1
type_infered: string

tool: D35: You have not entered a binary number

tool: D6: Enter a valid binary number (up to 5 digits): 

tool: D3: %s

tool: D12: %d

tool: D28: The decimal equivalent is: 

tool: D1: %s%d

assistant: ```c
int main(void) {
  int number;
  int flag = 1;
  int numA;
  int numB;
  int numC;
  int numD;
  int numE;
  int decimal = 0;
  printf("%s", "Enter a valid binary number (up to 5 digits): ");
  scanf("%d", &number);
  while (flag != -1) {
    decimal = 0;
    if (number >= 0) {
      if (number <= 11111) {
        numA = number / 10000;
        number = number % 10000;
        numB = number / 1000;
        number = number % 1000;
        numC = number / 100;
        number = number % 100;
        numD = number / 10;
        number = number % 10;
        numE = number;
        if (numA == 1) {
          decimal = decimal + (numA * 16);
          flag = -1;
        } else if (numA == 0) {
          decimal = decimal + (numA * 16);
          flag = -1;
        } else {
          puts("You have not entered a binary number");
          printf("%s", "Enter a valid binary number (up to 5 digits): ");
          scanf("%d", &number);
          flag = 1;
        }
        if (numB == 1) {
          decimal = decimal + (numB * 8);
          flag = -1;
        } else if (numB == 0) {
          decimal = decimal + (numB * 8);
          flag = -1;
        } else {
          puts("You have not entered a binary number");
          printf("%s", "Enter a valid binary number (up to 5 digits): ");
          scanf("%d", &number);
          flag = 1;
        }
        if (numC == 1) {
          decimal = decimal + (numC * 4);
          flag = -1;
        } else if (numC == 0) {
          decimal = decimal + (numC * 4);
          flag = -1;
        } else {
          puts("You have not entered a binary number");
          printf("%s", "Enter a valid binary number (up to 5 digits): ");
          scanf("%d", &number);
          flag = 1;
        }
        if (numD == 1) {
          decimal = decimal + (numD * 2);
          flag = -1;
        } else if (numD == 0) {
          decimal = decimal + (numD * 2);
          flag = -1;
        } else {
          puts("You have not entered a binary number");
          printf("%s", "Enter a valid binary number (up to 5 digits): ");
          scanf("%d", &number);
          flag = 1;
        }
        if (numE == 1) {
          decimal = decimal + numE;
          flag = -1;
        } else if (numE == 0) {
          decimal = decimal + numE;
          flag = -1;
        } else {
          puts("You have not entered a binary number");
          printf("%s", "Enter a valid binary number (up to 5 digits): ");
          scanf("%d", &number);
          flag = 1;
        }
      } else {
        puts("You have not entered a binary number");
        printf("%s", "Enter a valid binary number (up to 5 digits): ");
        scanf("%d", &number);
        flag = 1;
      }
    } else {
      puts("You have not entered a binary number");
      printf("%s", "Enter a valid binary number (up to 5 digits): ");
      scanf("%d", &number);
      flag = 1;
    }
  }
  printf("%s%d", "The decimal equivalent is: ", decimal);
  return 0;
}
```