user: What would the C source look like for the assembly code provided here:

```asm
<main>:
  endbr64
  push   %r15
  lea    D49(%rip),%rsi
  lea    D32(%rip),%rdi
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x728,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x718(%rsp)
  xor    %eax,%eax
  call   <fopen@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  je     L87
L50:
  lea    0xd0(%rsp),%rax
  lea    0x120(%rsp),%r12
  xor    %r13d,%r13d
  mov    %rax,0xc0(%rsp)
  xor    %eax,%eax
  lea    D52(%rip),%r15
  lea    D75(%rip),%r14
  mov    %r12,0x8(%rsp)
  mov    %r12,0x10(%rsp)
  mov    %rax,%r12
L54:
  mov    0x8(%rsp),%rax
  lea    -0x50(%rax),%rbx
  jmp    L99
  nopw   0x0(%rax,%rax,1)
L15:
  mov    %rbx,%rdx
  mov    %r15,%rsi
  mov    %rbp,%rdi
  call   <fscanf@plt>
  lea    (%rbx,%r12,1),%rax
  mov    %r14,%rdi
  add    $0x4,%rbx
  mov    (%rax,%r13,1),%esi
  xor    %eax,%eax
  call   <printf@plt>
  cmp    0x8(%rsp),%rbx
  je     L29
L99:
  mov    %rbp,%rdi
  call   <feof@plt>
  test   %rax,%rax
  je     L15
  mov    %rbp,%rdi
  mov    0x10(%rsp),%r12
  call   <fclose@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    0xc0(%rsp),%rsi
  mov    $0x1,%r8d
  mov    %r12,0xc8(%rsp)
  mov    %r8,0x18(%rsp)
  lea    0x640(%rsi),%rax
  mov    %rax,0xb8(%rsp)
  nopl   (%rax)
L10:
  movslq 0x4(%rsi),%rcx
  movslq (%rsi),%rax
  movslq 0x8(%rsi),%rdx
  movslq 0x10(%rsi),%r14
  imul   %rcx,%rax
  movslq 0x14(%rsi),%r13
  movslq 0x18(%rsi),%r12
  imul   %rdx,%rcx
  movslq 0x1c(%rsi),%rbp
  movslq 0x24(%rsi),%r11
  mov    %r13,%r10
  mov    %r12,%r15
  imul   %rdx,%rax
  mov    %rbp,%r8
  mov    %r11,%rdi
  imul   %r12,%r10
  imul   %rbp,%r15
  mov    %rax,0x50(%rsp)
  movslq 0xc(%rsi),%rax
  imul   %rbp,%r10
  mov    %rax,%rbx
  imul   %rax,%rdx
  imul   %r14,%rbx
  mov    %r10,0x78(%rsp)
  movslq 0x28(%rsi),%r10
  imul   %rax,%rcx
  imul   %r14,%rdx
  imul   %r13,%rbx
  imul   %r10,%rdi
  mov    %rcx,0x58(%rsp)
  movslq 0x38(%rsi),%rcx
  mov    %rdx,0x60(%rsp)
  mov    %r14,%rdx
  mov    %rbx,0x68(%rsp)
  movslq 0x20(%rsi),%rbx
  imul   %r13,%rdx
  mov    %rcx,0x10(%rsp)
  mov    %rbx,%r9
  imul   %rbx,%r8
  imul   %r11,%r9
  imul   %r12,%rdx
  imul   %r11,%r8
  imul   %r10,%r9
  imul   %rbx,%r15
  mov    %rdx,0x70(%rsp)
  mov    %r10,%rdx
  mov    %r8,0x88(%rsp)
  movslq 0x30(%rsi),%r8
  mov    %r9,0x90(%rsp)
  movslq 0x2c(%rsi),%r9
  mov    %r15,0x80(%rsp)
  imul   %r9,%rdi
  mov    %r9,%r15
  imul   %r9,%rdx
  imul   %r8,%r15
  mov    %rdi,0x98(%rsp)
  movslq 0x34(%rsi),%rdi
  imul   %r8,%rdx
  imul   %rdi,%r15
  mov    %rdx,0xa0(%rsp)
  mov    %rdi,%rdx
  mov    %r8,%rdi
  mov    %r15,0xb0(%rsp)
  mov    %rdx,%r15
  imul   %rdx,%rdi
  movslq 0x3c(%rsi),%rdx
  mov    %r15,0xa8(%rsp)
  imul   %rcx,%r15
  imul   %rcx,%rdi
  imul   %rdx,%r15
  mov    %rdi,0x20(%rsp)
  mov    %r15,0x38(%rsp)
  movslq 0x40(%rsi),%r15
  mov    0x10(%rsp),%rcx
  mov    %r15,0x8(%rsp)
  imul   %rdx,%rcx
  imul   %r15,%rcx
  imul   %rdx,%r15
  mov    %rcx,0x30(%rsp)
  movslq 0x44(%rsi),%rcx
  mov    %r15,%rdi
  imul   %rcx,%rdi
  mov    %rcx,0x28(%rsp)
  imul   0x8(%rsp),%rcx
  imul   0x50(%rsp),%rax
  imul   0x58(%rsp),%r14
  mov    %rdi,0x40(%rsp)
  movslq 0x48(%rsi),%rdi
  mov    %rcx,%r15
  mov    0x10(%rsp),%rcx
  imul   %rdi,%r15
  cmp    %r14,%rax
  mov    %rdi,0x48(%rsp)
  mov    0xa8(%rsp),%rdi
  cmovae %rax,%r14
  mov    0x60(%rsp),%rax
  imul   %r13,%rax
  cmp    %rax,%r14
  cmovae %r14,%rax
  imul   0x68(%rsp),%r12
  cmp    %r12,%rax
  cmovb  %r12,%rax
  imul   0x70(%rsp),%rbp
  cmp    %rbp,%rax
  cmovb  %rbp,%rax
  imul   0x78(%rsp),%rbx
  cmp    %rbx,%rax
  cmovb  %rbx,%rax
  imul   0x80(%rsp),%r11
  cmp    %r11,%rax
  cmovb  %r11,%rax
  imul   0x88(%rsp),%r10
  cmp    %r10,%rax
  cmovb  %r10,%rax
  imul   0x90(%rsp),%r9
  cmp    %r9,%rax
  cmovb  %r9,%rax
  imul   0x98(%rsp),%r8
  cmp    %r8,%rax
  cmovb  %r8,%rax
  imul   0xa0(%rsp),%rdi
  cmp    %rdi,%rax
  cmovb  %rdi,%rax
  imul   0xb0(%rsp),%rcx
  cmp    %rcx,%rax
  cmovb  %rcx,%rax
  imul   0x20(%rsp),%rdx
  cmp    %rdx,%rax
  cmovb  %rdx,%rax
  mov    0x8(%rsp),%rdx
  imul   0x38(%rsp),%rdx
  cmp    %rdx,%rax
  cmovb  %rdx,%rax
  mov    0x28(%rsp),%rdx
  imul   0x30(%rsp),%rdx
  cmp    %rdx,%rax
  cmovb  %rdx,%rax
  mov    0x40(%rsp),%rdx
  imul   0x48(%rsp),%rdx
  cmp    %rdx,%rax
  cmovb  %rdx,%rax
  movslq 0x4c(%rsi),%rdx
  mov    0x18(%rsp),%rbx
  imul   %r15,%rdx
  cmp    %rdx,%rax
  cmovb  %rdx,%rax
  cmp    %rax,%rbx
  cmovae %rbx,%rax
  add    $0x50,%rsi
  mov    %rax,0x18(%rsp)
  cmp    %rsi,0xb8(%rsp)
  jne    L10
  mov    %rax,%r8
  mov    0xc0(%rsp),%rax
  mov    0xc8(%rsp),%r12
  lea    0x5a0(%rax),%rsi
  nopl   0x0(%rax,%rax,1)
L118:
  lea    -0x50(%r12),%rax
  nopl   (%rax)
L30:
  movslq 0x50(%rax),%rcx
  movslq (%rax),%rdx
  imul   %rcx,%rdx
  movslq 0xa0(%rax),%rcx
  imul   %rcx,%rdx
  movslq 0xf0(%rax),%rcx
  imul   %rcx,%rdx
  cmp    %rdx,%r8
  cmovb  %rdx,%r8
  add    $0x4,%rax
  cmp    %r12,%rax
  jne    L30
  lea    0x50(%rax),%r12
  cmp    %rsi,%r12
  jne    L118
  mov    0xc0(%rsp),%rdi
  lea    0x550(%rdi),%rax
  mov    %rax,0x30(%rsp)
L42:
  movslq 0x54(%rdi),%rdx
  movslq (%rdi),%rax
  movslq 0x4(%rdi),%r14
  movslq 0x8(%rdi),%r13
  imul   %rdx,%rax
  movslq 0xa8(%rdi),%rdx
  movslq 0xc(%rdi),%r12
  movslq 0x10(%rdi),%rbp
  movslq 0x14(%rdi),%rbx
  movslq 0x18(%rdi),%r11
  movslq 0x70(%rdi),%rcx
  imul   %rdx,%rax
  movslq 0x58(%rdi),%rdx
  imul   %rdx,%r14
  movslq 0xac(%rdi),%rdx
  imul   %rdx,%r14
  movslq 0x5c(%rdi),%rdx
  imul   %rdx,%r13
  movslq 0xb0(%rdi),%rdx
  imul   %rdx,%r13
  movslq 0x60(%rdi),%rdx
  imul   %rdx,%r12
  movslq 0xb4(%rdi),%rdx
  imul   %rdx,%r12
  movslq 0x64(%rdi),%rdx
  imul   %rdx,%rbp
  movslq 0xb8(%rdi),%rdx
  imul   %rdx,%rbp
  movslq 0x68(%rdi),%rdx
  imul   %rdx,%rbx
  movslq 0xbc(%rdi),%rdx
  imul   %rdx,%rbx
  movslq 0x6c(%rdi),%rdx
  imul   %rdx,%r11
  movslq 0xc0(%rdi),%rdx
  imul   %rdx,%r11
  movslq 0x1c(%rdi),%rdx
  imul   %rcx,%rdx
  movslq 0xc4(%rdi),%rcx
  imul   %rcx,%rdx
  movslq 0x74(%rdi),%rcx
  mov    %rdx,0x8(%rsp)
  movslq 0x20(%rdi),%rdx
  imul   %rcx,%rdx
  movslq 0xc8(%rdi),%rcx
  mov    %rdx,%rsi
  movslq 0x24(%rdi),%rdx
  imul   %rcx,%rsi
  movslq 0x78(%rdi),%rcx
  imul   %rcx,%rdx
  movslq 0xcc(%rdi),%rcx
  mov    %rsi,0x10(%rsp)
  imul   %rcx,%rdx
  mov    %rdx,0x18(%rsp)
  movslq 0x7c(%rdi),%rcx
  movslq 0x28(%rdi),%rdx
  movslq 0x88(%rdi),%r9
  movslq 0x8c(%rdi),%rsi
  imul   %rcx,%rdx
  movslq 0xd0(%rdi),%rcx
  mov    %rdx,%r10
  movslq 0x80(%rdi),%rdx
  imul   %rcx,%r10
  movslq 0x2c(%rdi),%rcx
  imul   %rcx,%rdx
  movslq 0xd4(%rdi),%rcx
  mov    %r10,0x20(%rsp)
  movslq 0x84(%rdi),%r10
  mov    %rdx,%r15
  movslq 0x30(%rdi),%rdx
  imul   %rcx,%r15
  movslq 0x90(%rdi),%rcx
  imul   %rdx,%r10
  movslq 0xd8(%rdi),%rdx
  mov    %r15,0x28(%rsp)
  movslq 0x40(%rdi),%r15
  imul   %rdx,%r10
  movslq 0x34(%rdi),%rdx
  imul   %rdx,%r9
  movslq 0xdc(%rdi),%rdx
  imul   %rdx,%r9
  movslq 0x38(%rdi),%rdx
  imul   %rdx,%rsi
  movslq 0xe0(%rdi),%rdx
  imul   %rdx,%rsi
  movslq 0x3c(%rdi),%rdx
  imul   %rdx,%rcx
  movslq 0xe4(%rdi),%rdx
  imul   %rdx,%rcx
  movslq 0x94(%rdi),%rdx
  imul   %r15,%rdx
  movslq 0xe8(%rdi),%r15
  imul   %r15,%rdx
  movslq 0xfc(%rdi),%r15
  imul   %rax,%r15
  movslq 0x100(%rdi),%rax
  imul   %r14,%rax
  cmp    %rax,%r15
  cmovae %r15,%rax
  mov    %rax,%r14
  movslq 0x104(%rdi),%rax
  imul   %r13,%rax
  cmp    %rax,%r14
  cmovae %r14,%rax
  mov    %rax,%r13
  movslq 0x108(%rdi),%rax
  imul   %r12,%rax
  cmp    %rax,%r13
  cmovae %r13,%rax
  mov    %rax,%r12
  movslq 0x10c(%rdi),%rax
  imul   %rbp,%rax
  cmp    %rax,%r12
  cmovae %r12,%rax
  mov    %rax,%rbp
  movslq 0x110(%rdi),%rax
  imul   %rbx,%rax
  cmp    %rax,%rbp
  cmovae %rbp,%rax
  mov    %rax,%rbx
  movslq 0x114(%rdi),%rax
  imul   %r11,%rax
  movslq 0x118(%rdi),%r11
  cmp    %rax,%rbx
  cmovae %rbx,%rax
  imul   0x8(%rsp),%r11
  cmp    %r11,%rax
  cmovb  %r11,%rax
  movslq 0x11c(%rdi),%r11
  imul   0x10(%rsp),%r11
  cmp    %r11,%rax
  cmovb  %r11,%rax
  movslq 0x120(%rdi),%r11
  imul   0x18(%rsp),%r11
  cmp    %r11,%rax
  cmovb  %r11,%rax
  movslq 0x124(%rdi),%r11
  imul   0x20(%rsp),%r11
  cmp    %r11,%rax
  cmovb  %r11,%rax
  movslq 0x128(%rdi),%r11
  imul   0x28(%rsp),%r11
  cmp    %r11,%rax
  cmovb  %r11,%rax
  movslq 0x12c(%rdi),%r11
  imul   %r11,%r10
  cmp    %r10,%rax
  cmovb  %r10,%rax
  movslq 0x130(%rdi),%r10
  imul   %r10,%r9
  cmp    %r9,%rax
  cmovb  %r9,%rax
  movslq 0x134(%rdi),%r9
  imul   %r9,%rsi
  cmp    %rsi,%rax
  cmovb  %rsi,%rax
  movslq 0x138(%rdi),%rsi
  imul   %rsi,%rcx
  cmp    %rcx,%rax
  cmovb  %rcx,%rax
  movslq 0x13c(%rdi),%rcx
  imul   %rcx,%rdx
  cmp    %rdx,%rax
  cmovb  %rdx,%rax
  cmp    %rax,%r8
  cmovb  %rax,%r8
  add    $0x50,%rdi
  cmp    0x30(%rsp),%rdi
  jne    L42
  mov    0xc0(%rsp),%rax
  lea    0xdc(%rsp),%r9
  add    $0x55c,%rax
  mov    %rax,0x30(%rsp)
L107:
  movslq 0x4c(%r9),%rax
  movslq (%r9),%r14
  movslq 0x4(%r9),%rdx
  movslq 0x54(%r9),%r13
  imul   %rax,%r14
  movslq 0x98(%r9),%rax
  movslq 0x58(%r9),%r12
  movslq 0x5c(%r9),%rbp
  movslq 0x60(%r9),%rbx
  movslq 0x18(%r9),%rcx
  imul   %rax,%r14
  movslq 0x50(%r9),%rax
  imul   %rdx,%rax
  movslq 0x9c(%r9),%rdx
  imul   %rdx,%rax
  movslq 0x8(%r9),%rdx
  imul   %rdx,%r13
  movslq 0xa0(%r9),%rdx
  imul   %rdx,%r13
  movslq 0xc(%r9),%rdx
  imul   %rdx,%r12
  movslq 0xa4(%r9),%rdx
  imul   %rdx,%r12
  movslq 0x10(%r9),%rdx
  imul   %rdx,%rbp
  movslq 0xa8(%r9),%rdx
  imul   %rdx,%rbp
  movslq 0x14(%r9),%rdx
  imul   %rdx,%rbx
  movslq 0xac(%r9),%rdx
  imul   %rdx,%rbx
  movslq 0x64(%r9),%rdx
  imul   %rcx,%rdx
  movslq 0xb0(%r9),%rcx
  imul   %rcx,%rdx
  movslq 0x1c(%r9),%rcx
  mov    %rdx,0x10(%rsp)
  movslq 0x68(%r9),%rdx
  imul   %rcx,%rdx
  movslq 0xb4(%r9),%rcx
  mov    %rdx,%rsi
  movslq 0x6c(%r9),%rdx
  imul   %rcx,%rsi
  movslq 0x20(%r9),%rcx
  imul   %rcx,%rdx
  movslq 0xb8(%r9),%rcx
  mov    %rsi,0x8(%rsp)
  mov    %rdx,%rdi
  movslq 0x24(%r9),%rdx
  imul   %rcx,%rdi
  movslq 0x70(%r9),%rcx
  imul   %rcx,%rdx
  mov    %rdi,0x18(%rsp)
  movslq 0xbc(%r9),%rcx
  movslq 0x78(%r9),%r11
  movslq 0x80(%r9),%rdi
  imul   %rcx,%rdx
  movslq 0x74(%r9),%rcx
  movslq 0x84(%r9),%rsi
  movslq 0x40(%r9),%r15
  mov    %rdx,0x20(%rsp)
  movslq 0x28(%r9),%rdx
  imul   %rcx,%rdx
  movslq 0xc0(%r9),%rcx
  mov    %rdx,%r10
  movslq 0x2c(%r9),%rdx
  imul   %rcx,%r10
  movslq 0x88(%r9),%rcx
  imul   %rdx,%r11
  movslq 0xc4(%r9),%rdx
  mov    %r10,0x28(%rsp)
  movslq 0x7c(%r9),%r10
  imul   %rdx,%r11
  movslq 0x30(%r9),%rdx
  imul   %rdx,%r10
  movslq 0xc8(%r9),%rdx
  imul   %rdx,%r10
  movslq 0x34(%r9),%rdx
  imul   %rdx,%rdi
  movslq 0xcc(%r9),%rdx
  imul   %rdx,%rdi
  movslq 0x38(%r9),%rdx
  imul   %rdx,%rsi
  movslq 0xd0(%r9),%rdx
  imul   %rdx,%rsi
  movslq 0x3c(%r9),%rdx
  imul   %rdx,%rcx
  movslq 0xd4(%r9),%rdx
  imul   %rdx,%rcx
  movslq 0x8c(%r9),%rdx
  imul   %r15,%rdx
  movslq 0xd8(%r9),%r15
  imul   %r15,%rdx
  movslq 0xe8(%r9),%r15
  imul   %rax,%r15
  movslq 0xe4(%r9),%rax
  imul   %r14,%rax
  cmp    %rax,%r15
  cmovae %r15,%rax
  mov    %rax,%r14
  movslq 0xec(%r9),%rax
  imul   %r13,%rax
  cmp    %rax,%r14
  cmovae %r14,%rax
  mov    %rax,%r13
  movslq 0xf0(%r9),%rax
  imul   %r12,%rax
  cmp    %rax,%r13
  cmovae %r13,%rax
  mov    %rax,%r12
  movslq 0xf4(%r9),%rax
  imul   %rbp,%rax
  cmp    %rax,%r12
  cmovae %r12,%rax
  mov    %rax,%rbp
  movslq 0xf8(%r9),%rax
  imul   %rbx,%rax
  cmp    %rax,%rbp
  cmovae %rbp,%rax
  mov    %rax,%rbx
  movslq 0xfc(%r9),%rax
  imul   0x10(%rsp),%rax
  cmp    %rax,%rbx
  cmovae %rbx,%rax
  movslq 0x100(%r9),%rbx
  imul   0x8(%rsp),%rbx
  cmp    %rbx,%rax
  cmovb  %rbx,%rax
  movslq 0x104(%r9),%rbx
  imul   0x18(%rsp),%rbx
  cmp    %rbx,%rax
  cmovb  %rbx,%rax
  movslq 0x108(%r9),%rbx
  imul   0x20(%rsp),%rbx
  cmp    %rbx,%rax
  cmovb  %rbx,%rax
  movslq 0x10c(%r9),%rbx
  imul   0x28(%rsp),%rbx
  cmp    %rbx,%rax
  cmovb  %rbx,%rax
  movslq 0x110(%r9),%rbx
  imul   %rbx,%r11
  cmp    %r11,%rax
  cmovb  %r11,%rax
  movslq 0x114(%r9),%r11
  imul   %r11,%r10
  cmp    %r10,%rax
  cmovb  %r10,%rax
  movslq 0x118(%r9),%r10
  imul   %r10,%rdi
  cmp    %rdi,%rax
  cmovb  %rdi,%rax
  movslq 0x11c(%r9),%rdi
  imul   %rdi,%rsi
  cmp    %rsi,%rax
  cmovb  %rsi,%rax
  movslq 0x120(%r9),%rsi
  imul   %rsi,%rcx
  cmp    %rcx,%rax
  cmovb  %rcx,%rax
  movslq 0x124(%r9),%rcx
  imul   %rcx,%rdx
  cmp    %rdx,%rax
  cmovb  %rdx,%rax
  cmp    %rax,%r8
  cmovb  %rax,%r8
  add    $0x50,%r9
  cmp    %r9,0x30(%rsp)
  jne    L107
  lea    D48(%rip),%rdi
  xor    %eax,%eax
  mov    %r8,%rsi
  call   <printf@plt>
  lea    D34(%rip),%rdi
  call   <system@plt>
  mov    0x718(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L112
  add    $0x728,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L29:
  mov    $0xa,%edi
  sub    $0x50,%r12
  add    $0x50,%r13
  call   <putchar@plt>
  addq   $0x50,0x8(%rsp)
  jmp    L54
L87:
  lea    D65(%rip),%rdi
  call   <puts@plt>
  lea    D34(%rip),%rdi
  call   <system@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L50
L112:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_tag: D49
type_guessed: string
name: unpack_data
arguments: data_tag: D32
type_guessed: string
name: unpack_data
arguments: data_tag: D52
type_guessed: string
name: unpack_data
arguments: data_tag: D75
type_guessed: string
name: unpack_data
arguments: data_tag: D48
type_guessed: string
name: unpack_data
arguments: data_tag: D34
type_guessed: string
name: unpack_data
arguments: data_tag: D65
type_guessed: string

tool: D49: r

tool: D32: Project_Euler_Data/Problem_11_product_in_number_grid_[data].txt

tool: D52: %d

tool: D75: %02d 

tool: D48: Max grid product: %lu


tool: D34: PAUSE

tool: D65: Input file error.

assistant: ```c
int main(void) {
  int i, j, k, n[20][20];
  long unsigned int max, product;
  FILE *infile;
  if ((infile = fopen("Project_Euler_Data/Problem_11_product_in_number_grid_[data].txt", "r")) == NULL) {
    printf("Input file error.\n");
    system("PAUSE");
    exit(1);
  }
  i = j = 0;
  while (feof(infile) == 0) {
    fscanf(infile, "%d", &n[i][j]);
    printf("%02d ", n[i][j]);
    if (++j == 20) {
      printf("\n");
      i++;
      j = 0;
    }
  }
  fclose(infile);
  printf("\n");
  max = product = 1;
  for (i = 0; i < 20; i++)
    for (j = 0; j < 17; j++) {
      for (k = 0; k < 4; k++)
        product *= n[i][j + k];
      if (product > max)
        max = product;
      product = 1;
    }
  product = 1;
  for (j = 0; j < 20; j++)
    for (i = 0; i < 17; i++) {
      for (k = 0; k < 4; k++)
        product *= n[i + k][j];
      if (product > max)
        max = product;
      product = 1;
    }
  product = 1;
  for (i = 0; i < 17; i++)
    for (j = 0; j < 17; j++) {
      for (k = 0; k < 4; k++)
        product *= n[i + k][j + k];
      if (product > max)
        max = product;
      product = 1;
    }
  product = 1;
  for (i = 0; i < 17; i++)
    for (j = 3; j < 20; j++) {
      for (k = 0; k < 4; k++)
        product *= n[i + k][j - k];
      if (product > max)
        max = product;
      product = 1;
    }
  printf("Max grid product: %lu\n", max);
  system("PAUSE");
  return 0;
}
```