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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    -0x2c(%rbp),%rax
  mov    %rax,%rsi
  lea    D60(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  lea    -0x28(%rbp),%rax
  mov    %rax,%rsi
  lea    D60(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  lea    -0x24(%rbp),%rax
  mov    %rax,%rsi
  lea    D60(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  mov    -0x28(%rbp),%eax
  cmp    $0x1,%eax
  jne    L95
  mov    -0x24(%rbp),%eax
  cmp    $0x1,%eax
  jne    L73
  mov    -0x2c(%rbp),%eax
  mov    %eax,%esi
  lea    D60(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L97
L73:
  movl   $0x0,-0x10(%rbp)
  jmp    L137
L88:
  mov    -0x2c(%rbp),%eax
  mov    %eax,%esi
  lea    D1(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  addl   $0x1,-0x10(%rbp)
L137:
  mov    -0x24(%rbp),%eax
  cmp    %eax,-0x10(%rbp)
  jl     L88
  jmp    L97
L95:
  mov    -0x24(%rbp),%eax
  cmp    $0x1,%eax
  jne    L74
  mov    -0x2c(%rbp),%eax
  mov    %eax,%esi
  lea    D60(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movl   $0x0,-0xc(%rbp)
  jmp    L170
L31:
  mov    $0x20,%edi
  call   <putchar@plt>
  addl   $0x1,-0xc(%rbp)
L170:
  mov    -0x28(%rbp),%eax
  sub    $0x2,%eax
  cmp    %eax,-0xc(%rbp)
  jl     L31
  mov    -0x2c(%rbp),%eax
  mov    %eax,%esi
  lea    D60(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L97
L74:
  movl   $0x0,-0x20(%rbp)
  jmp    L70
L23:
  mov    -0x2c(%rbp),%eax
  mov    %eax,%esi
  lea    D60(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  addl   $0x1,-0x20(%rbp)
L70:
  mov    -0x28(%rbp),%eax
  cmp    %eax,-0x20(%rbp)
  jl     L23
  mov    $0xa,%edi
  call   <putchar@plt>
  movl   $0x0,-0x1c(%rbp)
  jmp    L183
L184:
  mov    -0x2c(%rbp),%eax
  mov    %eax,%esi
  lea    D60(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movl   $0x0,-0x18(%rbp)
  jmp    L168
L3:
  mov    $0x20,%edi
  call   <putchar@plt>
  addl   $0x1,-0x18(%rbp)
L168:
  mov    -0x28(%rbp),%eax
  sub    $0x2,%eax
  cmp    %eax,-0x18(%rbp)
  jl     L3
  mov    -0x2c(%rbp),%eax
  mov    %eax,%esi
  lea    D1(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  addl   $0x1,-0x1c(%rbp)
L183:
  mov    -0x24(%rbp),%eax
  sub    $0x2,%eax
  cmp    %eax,-0x1c(%rbp)
  jl     L184
  movl   $0x0,-0x14(%rbp)
  jmp    L122
L131:
  mov    -0x2c(%rbp),%eax
  mov    %eax,%esi
  lea    D60(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  addl   $0x1,-0x14(%rbp)
L122:
  mov    -0x28(%rbp),%eax
  cmp    %eax,-0x14(%rbp)
  jl     L131
L97:
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L58
  call   <__stack_chk_fail@plt>
L58:
  leave
  ret
```

tool_calls: name: read_data
arguments: data_tag: D60
type_infered: string
name: read_data
arguments: data_tag: D1
type_infered: string

tool: D60: %d

tool: D1: %d


assistant: ```c
int main() {
  int N, w, h, i, j, k, l, m, n;
  scanf("%d", &N);
  scanf("%d", &w);
  scanf("%d", &h);
  if (w == 1) {
    if (h == 1) {
      printf("%d", N);
    } else {
      for (m = 0; m < h; m++) {
        printf("%d\n", N);
      }
    }
  } else {
    if (h == 1) {
      printf("%d", N);
      for (n = 0; n < w - 2; n++) {
        printf(" ");
      }
      printf("%d", N);
    } else {
      {
        for (i = 0; i < w; i++) {
          printf("%d", N);
        }
        printf("\n");
      }
      {
        for (j = 0; j < (h - 2); j++) {
          printf("%d", N);
          {
            for (k = 0; k < (w - 2); k++) {
              printf(" ");
            }
          }
          printf("%d\n", N);
        }
      }
      {
        for (l = 0; l < w; l++) {
          printf("%d", N);
        }
      }
    }
  }
  return 0;
}
```