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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  movl   $0x0,-0x10(%rbp)
  movl   $0x1,-0x4(%rbp)
  movl   $0xa,-0xc(%rbp)
  jmp    L330
L205:
  addl   $0x1,-0x10(%rbp)
  subl   $0x1,-0xc(%rbp)
L330:
  cmpl   $0x0,-0xc(%rbp)
  jg     L205
  cmpl   $0xa,-0x10(%rbp)
  je     L242
  mov    -0x10(%rbp),%edx
  mov    -0x4(%rbp),%eax
  mov    %eax,%esi
  lea    D17(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0xffffffff,%eax
  jmp    L341
L242:
  movl   $0x0,-0x10(%rbp)
  addl   $0x1,-0x4(%rbp)
  movl   $0xa,-0x8(%rbp)
  jmp    L257
L177:
  addl   $0x1,-0x10(%rbp)
  subl   $0x1,-0x8(%rbp)
L257:
  cmpl   $0x0,-0x8(%rbp)
  jg     L177
  cmpl   $0xa,-0x10(%rbp)
  je     L166
  mov    -0x10(%rbp),%edx
  mov    -0x4(%rbp),%eax
  mov    %eax,%esi
  lea    D17(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0xffffffff,%eax
  jmp    L341
L166:
  movl   $0x0,-0x10(%rbp)
  addl   $0x1,-0x4(%rbp)
  movl   $0x0,-0xc(%rbp)
  jmp    L176
L316:
  addl   $0x1,-0x10(%rbp)
  addl   $0x1,-0xc(%rbp)
L176:
  cmpl   $0x9,-0xc(%rbp)
  jle    L316
  cmpl   $0xa,-0x10(%rbp)
  je     L170
  mov    -0x10(%rbp),%edx
  mov    -0x4(%rbp),%eax
  mov    %eax,%esi
  lea    D17(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0xffffffff,%eax
  jmp    L341
L170:
  movl   $0x0,-0x10(%rbp)
  addl   $0x1,-0x4(%rbp)
  movl   $0x1,-0xc(%rbp)
  jmp    L58
L68:
  addl   $0x1,-0x10(%rbp)
  addl   $0x1,-0xc(%rbp)
L58:
  cmpl   $0xa,-0xc(%rbp)
  jle    L68
  cmpl   $0xa,-0x10(%rbp)
  je     L191
  mov    -0x10(%rbp),%edx
  mov    -0x4(%rbp),%eax
  mov    %eax,%esi
  lea    D17(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0xffffffff,%eax
  jmp    L341
L191:
  movl   $0x0,-0x10(%rbp)
  addl   $0x1,-0x4(%rbp)
  movl   $0xa,-0xc(%rbp)
  jmp    L46
L291:
  addl   $0x1,-0x10(%rbp)
  subl   $0x1,-0xc(%rbp)
L46:
  cmpl   $0x0,-0xc(%rbp)
  jg     L291
  cmpl   $0xa,-0x10(%rbp)
  je     L16
  mov    -0x10(%rbp),%edx
  mov    -0x4(%rbp),%eax
  mov    %eax,%esi
  lea    D17(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0xffffffff,%eax
  jmp    L341
L16:
  movl   $0x0,-0x10(%rbp)
  addl   $0x1,-0x4(%rbp)
  movl   $0x1,-0xc(%rbp)
  jmp    L351
L285:
  addl   $0x1,-0x10(%rbp)
  addl   $0x1,-0xc(%rbp)
L351:
  cmpl   $0xa,-0xc(%rbp)
  jle    L285
  cmpl   $0xa,-0x10(%rbp)
  je     L307
  mov    -0x10(%rbp),%edx
  mov    -0x4(%rbp),%eax
  mov    %eax,%esi
  lea    D17(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0xffffffff,%eax
  jmp    L341
L307:
  movl   $0x0,-0x10(%rbp)
  addl   $0x1,-0x4(%rbp)
  movl   $0x1,-0xc(%rbp)
  jmp    L63
L315:
  addl   $0x1,-0x10(%rbp)
  addl   $0x1,-0xc(%rbp)
L63:
  cmpl   $0xa,-0xc(%rbp)
  jle    L315
  cmpl   $0xa,-0x10(%rbp)
  je     L1
  mov    -0x10(%rbp),%edx
  mov    -0x4(%rbp),%eax
  mov    %eax,%esi
  lea    D17(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0xffffffff,%eax
  jmp    L341
L1:
  movl   $0x0,-0x10(%rbp)
  addl   $0x1,-0x4(%rbp)
  movl   $0xa,-0xc(%rbp)
  jmp    L10
L340:
  addl   $0x1,-0x10(%rbp)
  subl   $0x1,-0xc(%rbp)
L10:
  cmpl   $0x0,-0xc(%rbp)
  jg     L340
  cmpl   $0xa,-0x10(%rbp)
  je     L126
  mov    -0x10(%rbp),%edx
  mov    -0x4(%rbp),%eax
  mov    %eax,%esi
  lea    D17(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0xffffffff,%eax
  jmp    L341
L126:
  movl   $0x0,-0x10(%rbp)
  addl   $0x1,-0x4(%rbp)
  movl   $0xa,-0xc(%rbp)
  jmp    L85
L201:
  addl   $0x1,-0x10(%rbp)
  subl   $0x1,-0xc(%rbp)
L85:
  cmpl   $0x0,-0xc(%rbp)
  jg     L201
  cmpl   $0xa,-0x10(%rbp)
  je     L140
  mov    -0x10(%rbp),%edx
  mov    -0x4(%rbp),%eax
  mov    %eax,%esi
  lea    D17(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0xffffffff,%eax
  jmp    L341
L140:
  movl   $0x0,-0x10(%rbp)
  addl   $0x1,-0x4(%rbp)
  lea    D62(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x0,%eax
L341:
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: tag: D17
type_guessed: string
name: disassemble_data
arguments: tag: D62
type_guessed: string

tool: D17: ERROR TEST %d(c: %d)


tool: D62: OK!

assistant: ```c
int main() {
  int check = 0;
  int test = 1;
  int i;
  for (i = 10; i >= 1; i--) {
    check++;
  }
  if (check != 10) {
    printf("ERROR TEST %d(c: %d)\n", test, check);
    return -1;
  }
  check = 0;
  test++;
  for (int j = 10; j > 0; j--) {
    check++;
  }
  if (check != 10) {
    printf("ERROR TEST %d(c: %d)\n", test, check);
    return -1;
  }
  check = 0;
  test++;
  for (i = 0; i < 10; i++) {
    check++;
  }
  if (check != 10) {
    printf("ERROR TEST %d(c: %d)\n", test, check);
    return -1;
  }
  check = 0;
  test++;
  for (i = 1; i <= 10; i++) {
    check++;
  }
  if (check != 10) {
    printf("ERROR TEST %d(c: %d)\n", test, check);
    return -1;
  }
  check = 0;
  test++;
  for (i = 10; i > 0; --i) {
    check++;
  }
  if (check != 10) {
    printf("ERROR TEST %d(c: %d)\n", test, check);
    return -1;
  }
  check = 0;
  test++;
  for (i = 1; i <= 10; ++i) {
    check++;
  }
  if (check != 10) {
    printf("ERROR TEST %d(c: %d)\n", test, check);
    return -1;
  }
  check = 0;
  test++;
  for (i = 1; i <= 10; i = i + 1) {
    check++;
  }
  if (check != 10) {
    printf("ERROR TEST %d(c: %d)\n", test, check);
    return -1;
  }
  check = 0;
  test++;
  for (i = 10; i > 0; i = i - 1) {
    check++;
  }
  if (check != 10) {
    printf("ERROR TEST %d(c: %d)\n", test, check);
    return -1;
  }
  check = 0;
  test++;
  for (i = 10; i >= 1; i = -1 + i) {
    check++;
  }
  if (check != 10) {
    printf("ERROR TEST %d(c: %d)\n", test, check);
    return -1;
  }
  check = 0;
  test++;
  printf("OK!\n");
  return 0;
}
```