Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>
#include <stdlib.h>
 
#define CLEAN 0
#define DIRTY 1
#define SIZE  1401
#define INITIAL_STACK_SIZE 10
 
int table[SIZE][SIZE] = {};
int board[SIZE][SIZE] = {};
 
typedef struct Rectangle {
  int height;
  int pos;
} Rectangle;
 
typedef struct _stack {
  int size;
  int max;
  Rectangle *stack;
} *Stack;
 
Stack stack_init() {
  Stack stack = (Stack)malloc(sizeof(struct _stack));
  stack->size = 0;
  stack->max = INITIAL_STACK_SIZE;
  stack->stack = (Rectangle *)malloc(sizeof(Rectangle)*INITIAL_STACK_SIZE);
  return stack;
}
 
Rectangle empty_rectangle() {
  return (Rectangle) {
    .height = 0,
    .pos = 0
  };
}
 
Rectangle top(Stack stack) {
  if (stack->size <= 0) {
    return empty_rectangle();
  } else
    return stack->stack[stack->size-1];
}
 
Rectangle pop(Stack stack) {
  if (stack->size <= 0) {
    return empty_rectangle();
  } else
    return stack->stack[--(stack->size)];
}
 
Rectangle push(Rectangle item, Stack stack) {
  int i;
  if (stack->size < stack->max) {
    stack->stack[(stack->size)++] = item;
  } else {
    Rectangle *newStack = (Rectangle *)malloc(sizeof(int) * stack->max * 2);
 
    if (newStack == NULL) {
      perror("malloc failed.\n");
      exit(-1);
    }
      
    for (i=0; i<stack->size; i++)
      newStack[i] = stack->stack[i];
 
    newStack[stack->size++] = item;
    stack->max *= 2;
    free(stack->stack);
    stack->stack = newStack;
  }
 
  return item;
}
 
int empty(Stack stack) {
  return !stack->size;
}
 
void free_stack(Stack stack) {
  free(stack);
}
 
void create_table(int h, int w) {
  int i, j;
 
  for (i=0; i<w; i++)
    table[0][i] = (board[0][i] ? 0 : 1);
   
  for (i = 1; i < h; i++) {
    for (j = 0; j < w; j++) {
      if (board[i][j] == CLEAN)
    table[i][j] = table[i-1][j] + 1;
      else
    table[i][j] = 0;
    }
  }
}
 
int rectangleAreaMaxRow(int row[],int w) {
  Stack s = stack_init();
  int i, max = 0;
  row[w] = DIRTY;
 
  for (i=0; i<=w; i++) {
    Rectangle r;
    r.height = row[i];
    r.pos = i;
     
    if (empty(s) || top(s).height < r.height) {
      push(r, s);
    } else {
      int target = i;
      while (!empty(s) && top(s).height >= r.height) {
        Rectangle pre = pop(s);
        int area = pre.height * (i-pre.pos);
        max = (area > max ? area : max);
        target = pre.pos;
      }
    r.pos = target;
    push(r, s);
    }
  }
 
  free_stack(s);
  return max;
}
   
int rectangleAreaMax(int h, int w)
{
  int i, max = 0, temp;
  for (i=0; i<h; i++) {
    temp = rectangleAreaMaxRow(table[i], w);
    max = (temp > max ? temp : max);
  }
 
  return max;
}
 
int main() {
  int i, j, h, w;
 
  scanf("%d %d", &h, &w);
  for (i=0; i<h; i++)
    for (j=0; j<w; j++)
      scanf("%d", &board[i][j]);
 
  create_table(h, w);
   
  printf("%d\n", rectangleAreaMax(h, w));
   
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	table
	.bss
	.align 32
	.type	table, @object
	.size	table, 7851204
table:
	.zero	7851204
	.globl	board
	.align 32
	.type	board, @object
	.size	board, 7851204
board:
	.zero	7851204
	.text
	.globl	stack_init
	.type	stack_init, @function
stack_init:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	$16, %edi
	call	malloc@PLT
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	movl	$0, (%rax)
	movq	-8(%rbp), %rax
	movl	$10, 4(%rax)
	movl	$80, %edi
	call	malloc@PLT
	movq	%rax, %rdx
	movq	-8(%rbp), %rax
	movq	%rdx, 8(%rax)
	movq	-8(%rbp), %rax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	stack_init, .-stack_init
	.globl	empty_rectangle
	.type	empty_rectangle, @function
empty_rectangle:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movabsq	$-4294967296, %rdx
	andq	%rdx, %rax
	movl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	empty_rectangle, .-empty_rectangle
	.globl	top
	.type	top, @function
top:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$8, %rsp
	movq	%rdi, -8(%rbp)
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jg	.L6
	movl	$0, %eax
	call	empty_rectangle
	jmp	.L7
.L6:
	movq	-8(%rbp), %rax
	movq	8(%rax), %rdx
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	cltq
	salq	$3, %rax
	subq	$8, %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	top, .-top
	.globl	pop
	.type	pop, @function
pop:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$8, %rsp
	movq	%rdi, -8(%rbp)
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jg	.L9
	movl	$0, %eax
	call	empty_rectangle
	jmp	.L10
.L9:
	movq	-8(%rbp), %rax
	movq	8(%rax), %rcx
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	leal	-1(%rax), %edx
	movq	-8(%rbp), %rax
	movl	%edx, (%rax)
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	cltq
	salq	$3, %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	pop, .-pop
	.section	.rodata
.LC0:
	.string	"malloc failed.\n"
	.text
	.globl	push
	.type	push, @function
push:
.LFB10:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	-32(%rbp), %rax
	movl	(%rax), %edx
	movq	-32(%rbp), %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jge	.L12
	movq	-32(%rbp), %rax
	movq	8(%rax), %rsi
	movq	-32(%rbp), %rax
	movl	(%rax), %eax
	leal	1(%rax), %ecx
	movq	-32(%rbp), %rdx
	movl	%ecx, (%rdx)
	cltq
	salq	$3, %rax
	leaq	(%rsi,%rax), %rdx
	movq	-24(%rbp), %rax
	movq	%rax, (%rdx)
	jmp	.L13
.L12:
	movq	-32(%rbp), %rax
	movl	4(%rax), %eax
	cltq
	salq	$3, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, -8(%rbp)
	cmpq	$0, -8(%rbp)
	jne	.L14
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	call	perror@PLT
	movl	$-1, %edi
	call	exit@PLT
.L14:
	movl	$0, -12(%rbp)
	jmp	.L15
.L16:
	movq	-32(%rbp), %rax
	movq	8(%rax), %rdx
	movl	-12(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movl	-12(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	movq	-8(%rbp), %rdx
	addq	%rcx, %rdx
	movq	(%rax), %rax
	movq	%rax, (%rdx)
	addl	$1, -12(%rbp)
.L15:
	movq	-32(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L16
	movq	-32(%rbp), %rax
	movl	(%rax), %eax
	leal	1(%rax), %ecx
	movq	-32(%rbp), %rdx
	movl	%ecx, (%rdx)
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-8(%rbp), %rax
	addq	%rax, %rdx
	movq	-24(%rbp), %rax
	movq	%rax, (%rdx)
	movq	-32(%rbp), %rax
	movl	4(%rax), %eax
	leal	(%rax,%rax), %edx
	movq	-32(%rbp), %rax
	movl	%edx, 4(%rax)
	movq	-32(%rbp), %rax
	movq	8(%rax), %rax
	movq	%rax, %rdi
	call	free@PLT
	movq	-32(%rbp), %rax
	movq	-8(%rbp), %rdx
	movq	%rdx, 8(%rax)
.L13:
	movq	-24(%rbp), %rax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	push, .-push
	.globl	empty
	.type	empty, @function
empty:
.LFB11:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	sete	%al
	movzbl	%al, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	empty, .-empty
	.globl	free_stack
	.type	free_stack, @function
free_stack:
.LFB12:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movq	%rdi, -8(%rbp)
	movq	-8(%rbp), %rax
	movq	%rax, %rdi
	call	free@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	free_stack, .-free_stack
	.globl	create_table
	.type	create_table, @function
create_table:
.LFB13:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	$0, -8(%rbp)
	jmp	.L22
.L23:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	board(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	sete	%al
	movzbl	%al, %eax
	movl	-8(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	table(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -8(%rbp)
.L22:
	movl	-8(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jl	.L23
	movl	$1, -8(%rbp)
	jmp	.L24
.L29:
	movl	$0, -4(%rbp)
	jmp	.L25
.L28:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movl	-8(%rbp), %eax
	cltq
	imulq	$1401, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	board(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L26
	movl	-8(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-4(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	imulq	$1401, %rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	table(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	1(%rax), %ecx
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movl	-8(%rbp), %eax
	cltq
	imulq	$1401, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	table(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	jmp	.L27
.L26:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movl	-8(%rbp), %eax
	cltq
	imulq	$1401, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	table(%rip), %rax
	movl	$0, (%rdx,%rax)
.L27:
	addl	$1, -4(%rbp)
.L25:
	movl	-4(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jl	.L28
	addl	$1, -8(%rbp)
.L24:
	movl	-8(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jl	.L29
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	create_table, .-create_table
	.globl	rectangleAreaMaxRow
	.type	rectangleAreaMaxRow, @function
rectangleAreaMaxRow:
.LFB14:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movq	%rdi, -56(%rbp)
	movl	%esi, -60(%rbp)
	movl	$0, %eax
	call	stack_init
	movq	%rax, -24(%rbp)
	movl	$0, -36(%rbp)
	movl	-60(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-56(%rbp), %rax
	addq	%rdx, %rax
	movl	$1, (%rax)
	movl	$0, -40(%rbp)
	jmp	.L31
.L38:
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-56(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	%eax, -16(%rbp)
	movl	-40(%rbp), %eax
	movl	%eax, -12(%rbp)
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	empty
	testl	%eax, %eax
	jne	.L32
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	top
	movl	%eax, %edx
	movl	-16(%rbp), %eax
	cmpl	%eax, %edx
	jge	.L33
.L32:
	movq	-24(%rbp), %rdx
	movq	-16(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	push
	jmp	.L34
.L33:
	movl	-40(%rbp), %eax
	movl	%eax, -32(%rbp)
	jmp	.L35
.L37:
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	pop
	movq	%rax, -8(%rbp)
	movl	-8(%rbp), %eax
	movl	-4(%rbp), %ecx
	movl	-40(%rbp), %edx
	subl	%ecx, %edx
	imull	%edx, %eax
	movl	%eax, -28(%rbp)
	movl	-36(%rbp), %edx
	movl	-28(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	%eax, -36(%rbp)
	movl	-4(%rbp), %eax
	movl	%eax, -32(%rbp)
.L35:
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	empty
	testl	%eax, %eax
	jne	.L36
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	top
	movl	%eax, %edx
	movl	-16(%rbp), %eax
	cmpl	%eax, %edx
	jge	.L37
.L36:
	movl	-32(%rbp), %eax
	movl	%eax, -12(%rbp)
	movq	-24(%rbp), %rdx
	movq	-16(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	push
.L34:
	addl	$1, -40(%rbp)
.L31:
	movl	-40(%rbp), %eax
	cmpl	-60(%rbp), %eax
	jle	.L38
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	free_stack
	movl	-36(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	rectangleAreaMaxRow, .-rectangleAreaMaxRow
	.globl	rectangleAreaMax
	.type	rectangleAreaMax, @function
rectangleAreaMax:
.LFB15:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	$0, -8(%rbp)
	movl	$0, -12(%rbp)
	jmp	.L41
.L42:
	movl	-12(%rbp), %eax
	cltq
	imulq	$5604, %rax, %rax
	leaq	table(%rip), %rdx
	addq	%rax, %rdx
	movl	-24(%rbp), %eax
	movl	%eax, %esi
	movq	%rdx, %rdi
	call	rectangleAreaMaxRow
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %edx
	movl	-4(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	%eax, -8(%rbp)
	addl	$1, -12(%rbp)
.L41:
	movl	-12(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jl	.L42
	movl	-8(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	rectangleAreaMax, .-rectangleAreaMax
	.section	.rodata
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%d"
.LC3:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB16:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-20(%rbp), %rdx
	leaq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -16(%rbp)
	jmp	.L45
.L48:
	movl	$0, -12(%rbp)
	jmp	.L46
.L47:
	movl	-12(%rbp), %eax
	movslq	%eax, %rdx
	movl	-16(%rbp), %eax
	cltq
	imulq	$1401, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	board(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -12(%rbp)
.L46:
	movl	-20(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L47
	addl	$1, -16(%rbp)
.L45:
	movl	-24(%rbp), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L48
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	create_table
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	rectangleAreaMax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L50
	call	__stack_chk_fail@PLT
.L50:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
user
	.file	"temp.c"
	.text
	.p2align 4
	.globl	stack_init
	.type	stack_init, @function
stack_init:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movl	$16, %edi
	call	malloc@PLT
	movl	$80, %edi
	movq	%rax, %r12
	movq	.LC0(%rip), %rax
	movq	%rax, (%r12)
	call	malloc@PLT
	movq	%rax, 8(%r12)
	movq	%r12, %rax
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE39:
	.size	stack_init, .-stack_init
	.p2align 4
	.globl	empty_rectangle
	.type	empty_rectangle, @function
empty_rectangle:
.LFB40:
	.cfi_startproc
	endbr64
	xorl	%eax, %eax
	ret
	.cfi_endproc
.LFE40:
	.size	empty_rectangle, .-empty_rectangle
	.p2align 4
	.globl	top
	.type	top, @function
top:
.LFB41:
	.cfi_startproc
	endbr64
	movslq	(%rdi), %rax
	testl	%eax, %eax
	jle	.L8
	movq	8(%rdi), %rdx
	movq	-8(%rdx,%rax,8), %rax
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	xorl	%eax, %eax
	ret
	.cfi_endproc
.LFE41:
	.size	top, .-top
	.p2align 4
	.globl	pop
	.type	pop, @function
pop:
.LFB42:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	testl	%eax, %eax
	jle	.L12
	subl	$1, %eax
	movq	8(%rdi), %rdx
	movl	%eax, (%rdi)
	cltq
	movq	(%rdx,%rax,8), %rax
	ret
	.p2align 4,,10
	.p2align 3
.L12:
	xorl	%eax, %eax
	ret
	.cfi_endproc
.LFE42:
	.size	pop, .-pop
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"malloc failed.\n"
	.text
	.p2align 4
	.globl	push
	.type	push, @function
push:
.LFB43:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	movq	%rdi, %r14
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	movl	4(%rsi), %r13d
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	movslq	(%rsi), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	movq	%rsi, %rbx
	cmpl	%r13d, %ebp
	jge	.L14
	movq	8(%rsi), %rax
	leal	1(%rbp), %edx
	movl	%edx, (%rsi)
	movq	%rdi, (%rax,%rbp,8)
	movq	%r14, %rax
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L14:
	.cfi_restore_state
	movslq	%r13d, %rdi
	salq	$3, %rdi
	call	malloc@PLT
	movq	%rax, %r12
	testq	%rax, %rax
	je	.L16
	movq	8(%rbx), %rdi
	movslq	%ebp, %rax
	xorl	%edx, %edx
	testl	%ebp, %ebp
	jle	.L19
	.p2align 4,,10
	.p2align 3
.L18:
	movq	(%rdi,%rdx,8), %rcx
	movq	%rcx, (%r12,%rdx,8)
	addq	$1, %rdx
	cmpq	%rdx, %rax
	jne	.L18
.L19:
	addl	$1, %ebp
	addl	%r13d, %r13d
	movq	%r14, (%r12,%rax,8)
	movl	%ebp, (%rbx)
	movl	%r13d, 4(%rbx)
	call	free@PLT
	movq	%r12, 8(%rbx)
	movq	%r14, %rax
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L16:
	.cfi_restore_state
	leaq	.LC1(%rip), %rdi
	call	perror@PLT
	orl	$-1, %edi
	call	exit@PLT
	.cfi_endproc
.LFE43:
	.size	push, .-push
	.p2align 4
	.globl	empty
	.type	empty, @function
empty:
.LFB44:
	.cfi_startproc
	endbr64
	movl	(%rdi), %edx
	xorl	%eax, %eax
	testl	%edx, %edx
	sete	%al
	ret
	.cfi_endproc
.LFE44:
	.size	empty, .-empty
	.p2align 4
	.globl	free_stack
	.type	free_stack, @function
free_stack:
.LFB45:
	.cfi_startproc
	endbr64
	jmp	free@PLT
	.cfi_endproc
.LFE45:
	.size	free_stack, .-free_stack
	.p2align 4
	.globl	create_table
	.type	create_table, @function
create_table:
.LFB46:
	.cfi_startproc
	endbr64
	movslq	%esi, %r8
	testl	%r8d, %r8d
	jle	.L49
	leal	-1(%r8), %eax
	movl	%edi, %r10d
	cmpl	$2, %eax
	jbe	.L43
	movl	%r8d, %edx
	leaq	board(%rip), %rdi
	pxor	%xmm1, %xmm1
	xorl	%eax, %eax
	shrl	$2, %edx
	movdqa	.LC2(%rip), %xmm2
	leaq	table(%rip), %r11
	salq	$4, %rdx
	.p2align 4,,10
	.p2align 3
.L28:
	movdqa	%xmm1, %xmm0
	pcmpeqd	(%rdi,%rax), %xmm0
	pand	%xmm2, %xmm0
	movaps	%xmm0, (%r11,%rax)
	addq	$16, %rax
	cmpq	%rdx, %rax
	jne	.L28
	movl	%r8d, %eax
	andl	$-4, %eax
	testb	$3, %r8b
	je	.L29
.L27:
	movslq	%eax, %rdx
	xorl	%ecx, %ecx
	movl	(%rdi,%rdx,4), %r9d
	testl	%r9d, %r9d
	sete	%cl
	movl	%ecx, (%r11,%rdx,4)
	leal	1(%rax), %edx
	cmpl	%edx, %r8d
	jle	.L29
	movslq	%edx, %rdx
	xorl	%ecx, %ecx
	movl	(%rdi,%rdx,4), %esi
	testl	%esi, %esi
	sete	%cl
	addl	$2, %eax
	movl	%ecx, (%r11,%rdx,4)
	cmpl	%eax, %r8d
	jle	.L29
	cltq
	xorl	%edx, %edx
	movl	(%rdi,%rax,4), %ecx
	testl	%ecx, %ecx
	sete	%dl
	movl	%edx, (%r11,%rax,4)
.L29:
	cmpl	$1, %r10d
	jle	.L49
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	movl	$1, %r9d
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	leal	-1(%r10), %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	cmpl	$3, %r10d
	jle	.L31
	leal	1400(%r8), %eax
	leaq	4+table(%rip), %rdx
	xorl	%esi, %esi
	movq	$-5604, %rbx
	leaq	(%rdx,%rax,4), %rcx
	movl	$2, %ebp
	leaq	5604+board(%rip), %r14
	leaq	5604(%r11), %r13
.L36:
	leaq	(%r14,%rsi), %r9
	leaq	0(%r13,%rsi), %rax
	.p2align 4,,10
	.p2align 3
.L42:
	xorl	%edx, %edx
	cmpl	$0, (%r9)
	jne	.L32
	leaq	(%rax,%rbx), %rdx
	movl	(%rdx,%rsi), %edx
	addl	$1, %edx
.L32:
	cmpl	$0, 5604(%r9)
	movl	%edx, (%rax)
	jne	.L33
	addl	$1, %edx
	addq	$4, %rax
	addq	$4, %r9
	movl	%edx, 5600(%rax)
	cmpq	%rcx, %rax
	jne	.L42
.L35:
	leal	1(%rbp), %r9d
	addl	$2, %ebp
	addq	$11208, %rcx
	subq	$11208, %rbx
	addq	$11208, %rsi
	cmpl	%ebp, %r12d
	jg	.L36
.L31:
	movslq	%r9d, %rcx
	subl	$1, %r9d
	imulq	$5604, %rcx, %rcx
	leaq	(%r11,%rcx), %rsi
	addq	%rdi, %rcx
	.p2align 4,,10
	.p2align 3
.L41:
	movslq	%r9d, %rdi
	xorl	%eax, %eax
	imulq	$5604, %rdi, %rdi
	addq	%r11, %rdi
	.p2align 4,,10
	.p2align 3
.L40:
	movl	(%rcx,%rax,4), %edx
	testl	%edx, %edx
	jne	.L37
	movl	(%rdi,%rax,4), %ebx
	leal	1(%rbx), %edx
	movl	%edx, (%rsi,%rax,4)
	addq	$1, %rax
	cmpq	%r8, %rax
	jne	.L40
.L39:
	leal	1(%r9), %eax
	addl	$2, %r9d
	addq	$5604, %rsi
	addq	$5604, %rcx
	cmpl	%r9d, %r10d
	jle	.L52
	movl	%eax, %r9d
	jmp	.L41
	.p2align 4,,10
	.p2align 3
.L33:
	movl	$0, 5604(%rax)
	addq	$4, %rax
	addq	$4, %r9
	cmpq	%rcx, %rax
	jne	.L42
	jmp	.L35
	.p2align 4,,10
	.p2align 3
.L37:
	movl	$0, (%rsi,%rax,4)
	addq	$1, %rax
	cmpq	%r8, %rax
	jne	.L40
	jmp	.L39
	.p2align 4,,10
	.p2align 3
.L52:
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L49:
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	.cfi_restore 14
	ret
.L43:
	xorl	%eax, %eax
	leaq	board(%rip), %rdi
	leaq	table(%rip), %r11
	jmp	.L27
	.cfi_endproc
.LFE46:
	.size	create_table, .-create_table
	.p2align 4
	.globl	rectangleAreaMaxRow
	.type	rectangleAreaMaxRow, @function
rectangleAreaMaxRow:
.LFB47:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%rdi, %r13
	movl	$16, %edi
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movl	%esi, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	call	malloc@PLT
	movl	$80, %edi
	movq	%rax, %r14
	movq	.LC0(%rip), %rax
	movq	%rax, (%r14)
	call	malloc@PLT
	movq	%rax, 8(%r14)
	movslq	%r12d, %rax
	movl	$1, 0(%r13,%rax,4)
	testl	%r12d, %r12d
	js	.L71
	xorl	%ebp, %ebp
	xorl	%ebx, %ebx
	xorl	%r15d, %r15d
	jmp	.L69
	.p2align 4,,10
	.p2align 3
.L86:
	leal	1(%rbx), %eax
	movl	%eax, (%r14)
	movq	8(%r14), %rax
	leaq	(%rax,%rbx,8), %rbx
	movl	%edi, (%rbx)
	movl	%esi, 4(%rbx)
.L66:
	addq	$1, %rbp
	cmpl	%ebp, %r12d
	jl	.L54
.L87:
	movslq	(%r14), %rbx
.L69:
	movl	0(%r13,%rbp,4), %edi
	movd	%ebp, %xmm1
	movl	%ebp, %esi
	movd	%edi, %xmm0
	punpckldq	%xmm1, %xmm0
	testl	%ebx, %ebx
	je	.L55
	movl	$0, %eax
	jle	.L56
	movq	8(%r14), %r8
	movslq	%ebx, %rdx
	movl	-8(%r8,%rdx,8), %eax
.L56:
	cmpl	%eax, %edi
	jle	.L85
.L55:
	movl	4(%r14), %r8d
	cmpl	%ebx, %r8d
	jg	.L86
	movslq	%r8d, %rdi
	movl	%r8d, (%rsp)
	salq	$3, %rdi
	movq	%xmm0, 8(%rsp)
	call	malloc@PLT
	movq	%rax, %rsi
	testq	%rax, %rax
	je	.L62
	xorl	%eax, %eax
	testl	%ebx, %ebx
	movq	8(%r14), %rdi
	movl	(%rsp), %r8d
	movq	8(%rsp), %xmm0
	movslq	%ebx, %rdx
	jle	.L65
	.p2align 4,,10
	.p2align 3
.L64:
	movq	(%rdi,%rax,8), %rcx
	movq	%rcx, (%rsi,%rax,8)
	addq	$1, %rax
	cmpq	%rax, %rdx
	jne	.L64
.L65:
	leal	1(%rbx), %eax
	addl	%r8d, %r8d
	movq	%xmm0, (%rsi,%rdx,8)
	addq	$1, %rbp
	movd	%eax, %xmm0
	movd	%r8d, %xmm3
	movq	%rsi, (%rsp)
	punpckldq	%xmm3, %xmm0
	movq	%xmm0, (%r14)
	call	free@PLT
	movq	(%rsp), %rsi
	movq	%rsi, 8(%r14)
	cmpl	%ebp, %r12d
	jge	.L87
.L54:
	movq	%r14, %rdi
	call	free@PLT
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	movl	%r15d, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L85:
	.cfi_restore_state
	testl	%edi, %edi
	jg	.L88
	movq	8(%r14), %r8
	movl	%esi, %ecx
	movslq	%ebx, %rdx
	.p2align 4,,10
	.p2align 3
.L57:
	testl	%ebx, %ebx
	jle	.L67
	cmpl	-8(%r8,%rdx,8), %edi
	jg	.L58
	subl	$1, %ebx
	movl	%esi, %eax
	movslq	%ebx, %rdx
	movl	%ebx, (%r14)
	leaq	(%r8,%rdx,8), %r9
	movl	4(%r9), %ecx
	subl	%ecx, %eax
	imull	(%r9), %eax
	cmpl	%eax, %r15d
	cmovl	%eax, %r15d
	testl	%ebx, %ebx
	jne	.L57
.L58:
	movd	%edi, %xmm2
	movd	%ecx, %xmm4
	movq	%r14, %rsi
	punpckldq	%xmm4, %xmm2
	movq	%xmm2, %rdi
	call	push
	jmp	.L66
	.p2align 4,,10
	.p2align 3
.L67:
	xorl	%eax, %eax
	testl	%r15d, %r15d
	cmovs	%eax, %r15d
	xorl	%ecx, %ecx
	jmp	.L57
.L71:
	xorl	%r15d, %r15d
	jmp	.L54
.L88:
	movslq	%ebx, %rax
	movl	%esi, %ecx
	leaq	-8(,%rax,8), %rdx
	jmp	.L59
	.p2align 4,,10
	.p2align 3
.L89:
	movq	8(%r14), %rax
	addq	%rdx, %rax
	movl	(%rax), %r8d
	cmpl	%r8d, %edi
	jg	.L58
	movl	4(%rax), %ecx
	movl	%esi, %eax
	subl	$1, %ebx
	movl	%ebx, (%r14)
	subl	%ecx, %eax
	imull	%r8d, %eax
	cmpl	%eax, %r15d
	cmovl	%eax, %r15d
	subq	$8, %rdx
	testl	%ebx, %ebx
	je	.L58
.L59:
	testl	%ebx, %ebx
	jg	.L89
	jmp	.L58
.L62:
	leaq	.LC1(%rip), %rdi
	call	perror@PLT
	orl	$-1, %edi
	call	exit@PLT
	.cfi_endproc
.LFE47:
	.size	rectangleAreaMaxRow, .-rectangleAreaMaxRow
	.p2align 4
	.globl	rectangleAreaMax
	.type	rectangleAreaMax, @function
rectangleAreaMax:
.LFB48:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	testl	%edi, %edi
	jle	.L93
	leal	-1(%rdi), %ebp
	leaq	table(%rip), %rbx
	movl	%esi, %r13d
	xorl	%r12d, %r12d
	imulq	$5604, %rbp, %rbp
	leaq	5604(%rbx), %rax
	addq	%rax, %rbp
	.p2align 4,,10
	.p2align 3
.L92:
	movq	%rbx, %rdi
	movl	%r13d, %esi
	call	rectangleAreaMaxRow
	cmpl	%eax, %r12d
	cmovl	%eax, %r12d
	addq	$5604, %rbx
	cmpq	%rbp, %rbx
	jne	.L92
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	movl	%r12d, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L93:
	.cfi_restore_state
	addq	$8, %rsp
	.cfi_def_cfa_offset 40
	xorl	%r12d, %r12d
	popq	%rbx
	.cfi_def_cfa_offset 32
	movl	%r12d, %eax
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE48:
	.size	rectangleAreaMax, .-rectangleAreaMax
	.section	.rodata.str1.1
.LC3:
	.string	"%d %d"
.LC4:
	.string	"%d"
.LC5:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB49:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC3(%rip), %rdi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	leaq	4(%rsp), %rdx
	call	__isoc99_scanf@PLT
	movl	(%rsp), %edi
	movl	4(%rsp), %esi
	testl	%edi, %edi
	jle	.L101
	xorl	%r14d, %r14d
	xorl	%r13d, %r13d
	leaq	board(%rip), %r15
	leaq	.LC4(%rip), %r12
	testl	%esi, %esi
	jle	.L101
	.p2align 4,,10
	.p2align 3
.L102:
	leaq	(%r15,%r14,4), %rbp
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L99:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %esi
	addq	$4, %rbp
	cmpl	%ebx, %esi
	jg	.L99
	movl	(%rsp), %edi
	addl	$1, %r13d
	cmpl	%r13d, %edi
	jle	.L101
	addq	$1401, %r14
	testl	%esi, %esi
	jg	.L102
.L101:
	call	create_table
	movl	(%rsp), %eax
	movl	4(%rsp), %r13d
	testl	%eax, %eax
	jle	.L107
	leal	-1(%rax), %ebp
	leaq	table(%rip), %rbx
	xorl	%r12d, %r12d
	imulq	$5604, %rbp, %rbp
	leaq	5604(%rbx), %rax
	addq	%rax, %rbp
	.p2align 4,,10
	.p2align 3
.L105:
	movq	%rbx, %rdi
	movl	%r13d, %esi
	call	rectangleAreaMaxRow
	cmpl	%eax, %r12d
	cmovl	%eax, %r12d
	addq	$5604, %rbx
	cmpq	%rbx, %rbp
	jne	.L105
.L104:
	xorl	%eax, %eax
	movl	%r12d, %edx
	movl	$1, %edi
	leaq	.LC5(%rip), %rsi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L112
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L107:
	.cfi_restore_state
	xorl	%r12d, %r12d
	jmp	.L104
.L112:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE49:
	.size	main, .-main
	.globl	board
	.bss
	.align 32
	.type	board, @object
	.size	board, 7851204
board:
	.zero	7851204
	.globl	table
	.align 32
	.type	table, @object
	.size	table, 7851204
table:
	.zero	7851204
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC0:
	.long	0
	.long	10
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC2:
	.long	1
	.long	1
	.long	1
	.long	1
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

rule
	.file	"temp.c"
	.text
	.p2align 4
	.globl	stack_init
	.type	stack_init, @function
stack_init:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movl	$16, %edi
	call	malloc@PLT
	movl	$80, %edi
	movq	%rax, %r12
	movq	.LC0(%rip), %rax
	movq	%rax, (%r12)
	call	malloc@PLT
	movq	%rax, 8(%r12)
	movq	%r12, %rax
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE39:
	.size	stack_init, .-stack_init
	.p2align 4
	.globl	empty_rectangle
	.type	empty_rectangle, @function
empty_rectangle:
.LFB40:
	.cfi_startproc
	endbr64
	xorl	%eax, %eax
	ret
	.cfi_endproc
.LFE40:
	.size	empty_rectangle, .-empty_rectangle
	.p2align 4
	.globl	top
	.type	top, @function
top:
.LFB41:
	.cfi_startproc
	endbr64
	movslq	(%rdi), %rax
	testl	%eax, %eax
	jle	.L8
	movq	8(%rdi), %rdx
	movq	-8(%rdx,%rax,8), %rax
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	xorl	%eax, %eax
	ret
	.cfi_endproc
.LFE41:
	.size	top, .-top
	.p2align 4
	.globl	pop
	.type	pop, @function
pop:
.LFB42:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	testl	%eax, %eax
	jle	.L12
	subl	$1, %eax
	movq	8(%rdi), %rdx
	movl	%eax, (%rdi)
	cltq
	movq	(%rdx,%rax,8), %rax
	ret
	.p2align 4,,10
	.p2align 3
.L12:
	xorl	%eax, %eax
	ret
	.cfi_endproc
.LFE42:
	.size	pop, .-pop
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"malloc failed.\n"
	.text
	.p2align 4
	.globl	push
	.type	push, @function
push:
.LFB43:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	movq	%rdi, %r14
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	movl	4(%rsi), %r13d
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	movslq	(%rsi), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	movq	%rsi, %rbx
	cmpl	%r13d, %ebp
	jge	.L14
	movq	8(%rsi), %rax
	leal	1(%rbp), %edx
	movl	%edx, (%rsi)
	movq	%rdi, (%rax,%rbp,8)
	movq	%r14, %rax
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L14:
	.cfi_restore_state
	movslq	%r13d, %rdi
	salq	$3, %rdi
	call	malloc@PLT
	movq	%rax, %r12
	testq	%rax, %rax
	je	.L16
	movq	8(%rbx), %rdi
	movslq	%ebp, %rax
	xorl	%edx, %edx
	testl	%ebp, %ebp
	jle	.L19
	.p2align 4,,10
	.p2align 3
.L18:
	movq	(%rdi,%rdx,8), %rcx
	movq	%rcx, (%r12,%rdx,8)
	addq	$1, %rdx
	cmpq	%rdx, %rax
	jne	.L18
.L19:
	addl	$1, %ebp
	addl	%r13d, %r13d
	movq	%r14, (%r12,%rax,8)
	movl	%ebp, (%rbx)
	movl	%r13d, 4(%rbx)
	call	free@PLT
	movq	%r12, 8(%rbx)
	movq	%r14, %rax
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L16:
	.cfi_restore_state
	leaq	.LC1(%rip), %rdi
	call	perror@PLT
	orl	$-1, %edi
	call	exit@PLT
	.cfi_endproc
.LFE43:
	.size	push, .-push
	.p2align 4
	.globl	empty
	.type	empty, @function
empty:
.LFB44:
	.cfi_startproc
	endbr64
	movl	(%rdi), %edx
	xorl	%eax, %eax
	testl	%edx, %edx
	sete	%al
	ret
	.cfi_endproc
.LFE44:
	.size	empty, .-empty
	.p2align 4
	.globl	free_stack
	.type	free_stack, @function
free_stack:
.LFB45:
	.cfi_startproc
	endbr64
	jmp	free@PLT
	.cfi_endproc
.LFE45:
	.size	free_stack, .-free_stack
	.p2align 4
	.globl	create_table
	.type	create_table, @function
create_table:
.LFB46:
	.cfi_startproc
	endbr64
	movslq	%esi, %r8
	testl	%r8d, %r8d
	jle	.L49
	leal	-1(%r8), %eax
	movl	%edi, %r10d
	cmpl	$2, %eax
	jbe	.L43
	movl	%r8d, %edx
	leaq	board(%rip), %rdi
	pxor	%xmm1, %xmm1
	xorl	%eax, %eax
	shrl	$2, %edx
	movdqa	.LC2(%rip), %xmm2
	leaq	table(%rip), %r11
	salq	$4, %rdx
	.p2align 4,,10
	.p2align 3
.L28:
	movdqa	%xmm1, %xmm0
	pcmpeqd	(%rdi,%rax), %xmm0
	pand	%xmm2, %xmm0
	movaps	%xmm0, (%r11,%rax)
	addq	$16, %rax
	cmpq	%rdx, %rax
	jne	.L28
	movl	%r8d, %eax
	andl	$-4, %eax
	testb	$3, %r8b
	je	.L29
.L27:
	movslq	%eax, %rdx
	xorl	%ecx, %ecx
	movl	(%rdi,%rdx,4), %r9d
	testl	%r9d, %r9d
	sete	%cl
	movl	%ecx, (%r11,%rdx,4)
	leal	1(%rax), %edx
	cmpl	%edx, %r8d
	jle	.L29
	movslq	%edx, %rdx
	xorl	%ecx, %ecx
	movl	(%rdi,%rdx,4), %esi
	testl	%esi, %esi
	sete	%cl
	addl	$2, %eax
	movl	%ecx, (%r11,%rdx,4)
	cmpl	%eax, %r8d
	jle	.L29
	cltq
	xorl	%edx, %edx
	movl	(%rdi,%rax,4), %ecx
	testl	%ecx, %ecx
	sete	%dl
	movl	%edx, (%r11,%rax,4)
.L29:
	cmpl	$1, %r10d
	jle	.L49
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	movl	$1, %r9d
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	leal	-1(%r10), %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	cmpl	$3, %r10d
	jle	.L31
	leal	1400(%r8), %eax
	leaq	4+table(%rip), %rdx
	xorl	%esi, %esi
	movq	$-5604, %rbx
	leaq	(%rdx,%rax,4), %rcx
	movl	$2, %ebp
	leaq	5604+board(%rip), %r14
	leaq	5604(%r11), %r13
.L36:
	leaq	(%r14,%rsi), %r9
	leaq	0(%r13,%rsi), %rax
	.p2align 4,,10
	.p2align 3
.L42:
	xorl	%edx, %edx
	cmpl	$0, (%r9)
	jne	.L32
	leaq	(%rax,%rbx), %rdx
	movl	(%rdx,%rsi), %edx
	addl	$1, %edx
.L32:
	cmpl	$0, 5604(%r9)
	movl	%edx, (%rax)
	jne	.L33
	addl	$1, %edx
	addq	$4, %rax
	addq	$4, %r9
	movl	%edx, 5600(%rax)
	cmpq	%rcx, %rax
	jne	.L42
.L35:
	leal	1(%rbp), %r9d
	addl	$2, %ebp
	addq	$11208, %rcx
	subq	$11208, %rbx
	addq	$11208, %rsi
	cmpl	%ebp, %r12d
	jg	.L36
.L31:
	movslq	%r9d, %rcx
	subl	$1, %r9d
	imulq	$5604, %rcx, %rcx
	leaq	(%r11,%rcx), %rsi
	addq	%rdi, %rcx
	.p2align 4,,10
	.p2align 3
.L41:
	movslq	%r9d, %rdi
	xorl	%eax, %eax
	imulq	$5604, %rdi, %rdi
	addq	%r11, %rdi
	.p2align 4,,10
	.p2align 3
.L40:
	movl	(%rcx,%rax,4), %edx
	testl	%edx, %edx
	jne	.L37
	movl	(%rdi,%rax,4), %ebx
	leal	1(%rbx), %edx
	movl	%edx, (%rsi,%rax,4)
	addq	$1, %rax
	cmpq	%r8, %rax
	jne	.L40
.L39:
	leal	1(%r9), %eax
	addl	$2, %r9d
	addq	$5604, %rsi
	addq	$5604, %rcx
	cmpl	%r9d, %r10d
	jle	.L52
	movl	%eax, %r9d
	jmp	.L41
	.p2align 4,,10
	.p2align 3
.L33:
	movl	$0, 5604(%rax)
	addq	$4, %rax
	addq	$4, %r9
	cmpq	%rcx, %rax
	jne	.L42
	jmp	.L35
	.p2align 4,,10
	.p2align 3
.L37:
	movl	$0, (%rsi,%rax,4)
	addq	$1, %rax
	cmpq	%r8, %rax
	jne	.L40
	jmp	.L39
	.p2align 4,,10
	.p2align 3
.L52:
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L49:
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	.cfi_restore 14
	ret
.L43:
	xorl	%eax, %eax
	leaq	board(%rip), %rdi
	leaq	table(%rip), %r11
	jmp	.L27
	.cfi_endproc
.LFE46:
	.size	create_table, .-create_table
	.p2align 4
	.globl	rectangleAreaMaxRow
	.type	rectangleAreaMaxRow, @function
rectangleAreaMaxRow:
.LFB47:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%rdi, %r13
	movl	$16, %edi
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movl	%esi, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	call	malloc@PLT
	movl	$80, %edi
	movq	%rax, %r14
	movq	.LC0(%rip), %rax
	movq	%rax, (%r14)
	call	malloc@PLT
	movq	%rax, 8(%r14)
	movslq	%r12d, %rax
	movl	$1, 0(%r13,%rax,4)
	testl	%r12d, %r12d
	js	.L71
	xorl	%ebp, %ebp
	xorl	%ebx, %ebx
	xorl	%r15d, %r15d
	jmp	.L69
	.p2align 4,,10
	.p2align 3
.L86:
	leal	1(%rbx), %eax
	movl	%eax, (%r14)
	movq	8(%r14), %rax
	leaq	(%rax,%rbx,8), %rbx
	movl	%edi, (%rbx)
	movl	%esi, 4(%rbx)
.L66:
	addq	$1, %rbp
	cmpl	%ebp, %r12d
	jl	.L54
.L87:
	movslq	(%r14), %rbx
.L69:
	movl	0(%r13,%rbp,4), %edi
	movd	%ebp, %xmm1
	movl	%ebp, %esi
	movd	%edi, %xmm0
	punpckldq	%xmm1, %xmm0
	testl	%ebx, %ebx
	je	.L55
	movl	$0, %eax
	jle	.L56
	movq	8(%r14), %r8
	movslq	%ebx, %rdx
	movl	-8(%r8,%rdx,8), %eax
.L56:
	cmpl	%eax, %edi
	jle	.L85
.L55:
	movl	4(%r14), %r8d
	cmpl	%ebx, %r8d
	jg	.L86
	movslq	%r8d, %rdi
	movl	%r8d, (%rsp)
	salq	$3, %rdi
	movq	%xmm0, 8(%rsp)
	call	malloc@PLT
	movq	%rax, %rsi
	testq	%rax, %rax
	je	.L62
	xorl	%eax, %eax
	testl	%ebx, %ebx
	movq	8(%r14), %rdi
	movl	(%rsp), %r8d
	movq	8(%rsp), %xmm0
	movslq	%ebx, %rdx
	jle	.L65
	.p2align 4,,10
	.p2align 3
.L64:
	movq	(%rdi,%rax,8), %rcx
	movq	%rcx, (%rsi,%rax,8)
	addq	$1, %rax
	cmpq	%rax, %rdx
	jne	.L64
.L65:
	leal	1(%rbx), %eax
	addl	%r8d, %r8d
	movq	%xmm0, (%rsi,%rdx,8)
	addq	$1, %rbp
	movd	%eax, %xmm0
	movd	%r8d, %xmm3
	movq	%rsi, (%rsp)
	punpckldq	%xmm3, %xmm0
	movq	%xmm0, (%r14)
	call	free@PLT
	movq	(%rsp), %rsi
	movq	%rsi, 8(%r14)
	cmpl	%ebp, %r12d
	jge	.L87
.L54:
	movq	%r14, %rdi
	call	free@PLT
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	movl	%r15d, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L85:
	.cfi_restore_state
	testl	%edi, %edi
	jg	.L88
	movq	8(%r14), %r8
	movl	%esi, %ecx
	movslq	%ebx, %rdx
	.p2align 4,,10
	.p2align 3
.L57:
	testl	%ebx, %ebx
	jle	.L67
	cmpl	-8(%r8,%rdx,8), %edi
	jg	.L58
	subl	$1, %ebx
	movl	%esi, %eax
	movslq	%ebx, %rdx
	movl	%ebx, (%r14)
	leaq	(%r8,%rdx,8), %r9
	movl	4(%r9), %ecx
	subl	%ecx, %eax
	imull	(%r9), %eax
	cmpl	%eax, %r15d
	cmovl	%eax, %r15d
	testl	%ebx, %ebx
	jne	.L57
.L58:
	movd	%edi, %xmm2
	movd	%ecx, %xmm4
	movq	%r14, %rsi
	punpckldq	%xmm4, %xmm2
	movq	%xmm2, %rdi
	call	push
	jmp	.L66
	.p2align 4,,10
	.p2align 3
.L67:
	xorl	%eax, %eax
	testl	%r15d, %r15d
	cmovs	%eax, %r15d
	xorl	%ecx, %ecx
	jmp	.L57
.L71:
	xorl	%r15d, %r15d
	jmp	.L54
.L88:
	movslq	%ebx, %rax
	movl	%esi, %ecx
	leaq	-8(,%rax,8), %rdx
	jmp	.L59
	.p2align 4,,10
	.p2align 3
.L89:
	movq	8(%r14), %rax
	addq	%rdx, %rax
	movl	(%rax), %r8d
	cmpl	%r8d, %edi
	jg	.L58
	movl	4(%rax), %ecx
	movl	%esi, %eax
	subl	$1, %ebx
	movl	%ebx, (%r14)
	subl	%ecx, %eax
	imull	%r8d, %eax
	cmpl	%eax, %r15d
	cmovl	%eax, %r15d
	subq	$8, %rdx
	testl	%ebx, %ebx
	je	.L58
.L59:
	testl	%ebx, %ebx
	jg	.L89
	jmp	.L58
.L62:
	leaq	.LC1(%rip), %rdi
	call	perror@PLT
	orl	$-1, %edi
	call	exit@PLT
	.cfi_endproc
.LFE47:
	.size	rectangleAreaMaxRow, .-rectangleAreaMaxRow
	.p2align 4
	.globl	rectangleAreaMax
	.type	rectangleAreaMax, @function
rectangleAreaMax:
.LFB48:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	testl	%edi, %edi
	jle	.L93
	leal	-1(%rdi), %ebp
	leaq	table(%rip), %rbx
	movl	%esi, %r13d
	xorl	%r12d, %r12d
	imulq	$5604, %rbp, %rbp
	leaq	5604(%rbx), %rax
	addq	%rax, %rbp
	.p2align 4,,10
	.p2align 3
.L92:
	movq	%rbx, %rdi
	movl	%r13d, %esi
	call	rectangleAreaMaxRow
	cmpl	%eax, %r12d
	cmovl	%eax, %r12d
	addq	$5604, %rbx
	cmpq	%rbp, %rbx
	jne	.L92
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	movl	%r12d, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L93:
	.cfi_restore_state
	addq	$8, %rsp
	.cfi_def_cfa_offset 40
	xorl	%r12d, %r12d
	popq	%rbx
	.cfi_def_cfa_offset 32
	movl	%r12d, %eax
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE48:
	.size	rectangleAreaMax, .-rectangleAreaMax
	.section	.rodata.str1.1
.LC3:
	.string	"%d %d"
.LC4:
	.string	"%d"
.LC5:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB49:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC3(%rip), %rdi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	leaq	4(%rsp), %rdx
	call	__isoc99_scanf@PLT
	movl	(%rsp), %edi
	movl	4(%rsp), %esi
	testl	%edi, %edi
	jle	.L101
	xorl	%r14d, %r14d
	xorl	%r13d, %r13d
	leaq	board(%rip), %r15
	leaq	.LC4(%rip), %r12
	testl	%esi, %esi
	jle	.L101
	.p2align 4,,10
	.p2align 3
.L102:
	leaq	(%r15,%r14,4), %rbp
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L99:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %esi
	addq	$4, %rbp
	cmpl	%ebx, %esi
	jg	.L99
	movl	(%rsp), %edi
	addl	$1, %r13d
	cmpl	%r13d, %edi
	jle	.L101
	addq	$1401, %r14
	testl	%esi, %esi
	jg	.L102
.L101:
	call	create_table
	movl	(%rsp), %eax
	movl	4(%rsp), %r13d
	testl	%eax, %eax
	jle	.L107
	leal	-1(%rax), %ebp
	leaq	table(%rip), %rbx
	xorl	%r12d, %r12d
	imulq	$5604, %rbp, %rbp
	leaq	5604(%rbx), %rax
	addq	%rax, %rbp
	.p2align 4,,10
	.p2align 3
.L105:
	movq	%rbx, %rdi
	movl	%r13d, %esi
	call	rectangleAreaMaxRow
	cmpl	%eax, %r12d
	cmovl	%eax, %r12d
	addq	$5604, %rbx
	cmpq	%rbx, %rbp
	jne	.L105
.L104:
	xorl	%eax, %eax
	movl	%r12d, %edx
	movl	$1, %edi
	leaq	.LC5(%rip), %rsi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L112
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L107:
	.cfi_restore_state
	xorl	%r12d, %r12d
	jmp	.L104
.L112:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE49:
	.size	main, .-main
	.globl	board
	.bss
	.align 32
	.type	board, @object
	.size	board, 7851204
board:
	.zero	7851204
	.globl	table
	.align 32
	.type	table, @object
	.size	table, 7851204
table:
	.zero	7851204
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC0:
	.long	0
	.long	10
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC2:
	.long	1
	.long	1
	.long	1
	.long	1
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

#include <stdio.h>
#include <stdlib.h>
 
#define CLEAN 0
#define DIRTY 1
#define SIZE  1401
#define INITIAL_STACK_SIZE 10
 
int table[SIZE][SIZE] = {};
int board[SIZE][SIZE] = {};
 
typedef struct Rectangle {
  int height;
  int pos;
} Rectangle;
 
typedef struct _stack {
  int size;
  int max;
  Rectangle *stack;
} *Stack;
 
Stack stack_init() {
  Stack stack = (Stack)malloc(sizeof(struct _stack));
  stack->size = 0;
  stack->max = INITIAL_STACK_SIZE;
  stack->stack = (Rectangle *)malloc(sizeof(Rectangle)*INITIAL_STACK_SIZE);
  return stack;
}
 
Rectangle empty_rectangle() {
  return (Rectangle) {
    .height = 0,
    .pos = 0
  };
}
 
Rectangle top(Stack stack) {
  if (stack->size <= 0) {
    return empty_rectangle();
  } else
    return stack->stack[stack->size-1];
}
 
Rectangle pop(Stack stack) {
  if (stack->size <= 0) {
    return empty_rectangle();
  } else
    return stack->stack[--(stack->size)];
}
 
Rectangle push(Rectangle item, Stack stack) {
  int i;
  if (stack->size < stack->max) {
    stack->stack[(stack->size)++] = item;
  } else {
    Rectangle *newStack = (Rectangle *)malloc(sizeof(int) * stack->max * 2);
 
    if (newStack == NULL) {
      perror("malloc failed.\n");
      exit(-1);
    }
      
    for (i=0; i<stack->size; i++)
      newStack[i] = stack->stack[i];
 
    newStack[stack->size++] = item;
    stack->max *= 2;
    free(stack->stack);
    stack->stack = newStack;
  }
 
  return item;
}
 
int empty(Stack stack) {
  return !stack->size;
}
 
void free_stack(Stack stack) {
  free(stack);
}
 
void create_table(int h, int w) {
  int i, j;
 
  for (i=0; i<w; i++)
    table[0][i] = (board[0][i] ? 0 : 1);
   
  for (i = 1; i < h; i++) {
    for (j = 0; j < w; j++) {
      if (board[i][j] == CLEAN)
    table[i][j] = table[i-1][j] + 1;
      else
    table[i][j] = 0;
    }
  }
}
 
int rectangleAreaMaxRow(int row[],int w) {
  Stack s = stack_init();
  int i, max = 0;
  row[w] = DIRTY;
 
  for (i=0; i<=w; i++) {
    Rectangle r;
    r.height = row[i];
    r.pos = i;
     
    if (empty(s) || top(s).height < r.height) {
      push(r, s);
    } else {
      int target = i;
      while (!empty(s) && top(s).height >= r.height) {
        Rectangle pre = pop(s);
        int area = pre.height * (i-pre.pos);
        max = (area > max ? area : max);
        target = pre.pos;
      }
    r.pos = target;
    push(r, s);
    }
  }
 
  free_stack(s);
  return max;
}
   
int rectangleAreaMax(int h, int w)
{
  int i, max = 0, temp;
  for (i=0; i<h; i++) {
    temp = rectangleAreaMaxRow(table[i], w);
    max = (temp > max ? temp : max);
  }
 
  return max;
}
 
int main() {
  int i, j, h, w;
 
  scanf("%d %d", &h, &w);
  for (i=0; i<h; i++)
    for (j=0; j<w; j++)
      scanf("%d", &board[i][j]);
 
  create_table(h, w);
   
  printf("%d\n", rectangleAreaMax(h, w));
   
  return 0;
}
4 5
0 0 1 0 0
1 0 0 0 0
0 0 0 0 0
0 0 0 1 0
 4 5
0 0 1 0 0
1 0 0 0 0
0 0 0 0 1
0 0 0 1 0
 1 5
0 0 1 0 0
1 0 0 0 1
0 0 0 1 0
0 0 0 1 0
 0 5
0 0 1 -1 0
1 0 0 0 0
0 0 0 0 0
0 0 0 1 0
 1 5
1 0 1 0 1
2 0 -1 0 1
0 -1 0 0 0
0 0 0 1 0
 4 5
1 0 1 1 0
1 0 0 0 0
0 0 1 0 0
0 0 0 1 0
 4 5
0 0 1 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 1 0
 4 5
0 0 0 0 0
1 1 0 0 0
0 0 0 0 0
0 0 0 1 0
 1 5
1 0 0 0 1
2 0 -1 0 1
0 0 0 0 0
0 1 1 1 0
 1 5
0 0 0 0 0
2 0 -1 -1 0
0 0 0 0 0
0 2 1 1 -1

8
 6
 2
 0
 1
 4
 10
 9
 3
 5

Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>
#include <stdlib.h>
 
#define CLEAN 0
#define DIRTY 1
#define SIZE  1401
#define INITIAL_STACK_SIZE 10
 
int table[SIZE][SIZE] = {};
int board[SIZE][SIZE] = {};
 
typedef struct Rectangle {
  int height;
  int pos;
} Rectangle;
 
typedef struct _stack {
  int size;
  int max;
  Rectangle *stack;
} *Stack;
 
Stack stack_init() {
  Stack stack = (Stack)malloc(sizeof(struct _stack));
  stack->size = 0;
  stack->max = INITIAL_STACK_SIZE;
  stack->stack = (Rectangle *)malloc(sizeof(Rectangle)*INITIAL_STACK_SIZE);
  return stack;
}
 
Rectangle empty_rectangle() {
  return (Rectangle) {
    .height = 0,
    .pos = 0
  };
}
 
Rectangle top(Stack stack) {
  if (stack->size <= 0) {
    return empty_rectangle();
  } else
    return stack->stack[stack->size-1];
}
 
Rectangle pop(Stack stack) {
  if (stack->size <= 0) {
    return empty_rectangle();
  } else
    return stack->stack[--(stack->size)];
}
 
Rectangle push(Rectangle item, Stack stack) {
  int i;
  if (stack->size < stack->max) {
    stack->stack[(stack->size)++] = item;
  } else {
    Rectangle *newStack = (Rectangle *)malloc(sizeof(int) * stack->max * 2);
 
    if (newStack == NULL) {
      perror("malloc failed.\n");
      exit(-1);
    }
      
    for (i=0; i<stack->size; i++)
      newStack[i] = stack->stack[i];
 
    newStack[stack->size++] = item;
    stack->max *= 2;
    free(stack->stack);
    stack->stack = newStack;
  }
 
  return item;
}
 
int empty(Stack stack) {
  return !stack->size;
}
 
void free_stack(Stack stack) {
  free(stack);
}
 
void create_table(int h, int w) {
  int i, j;
 
  for (i=0; i<w; i++)
    table[0][i] = (board[0][i] ? 0 : 1);
   
  for (i = 1; i < h; i++) {
    for (j = 0; j < w; j++) {
      if (board[i][j] == CLEAN)
    table[i][j] = table[i-1][j] + 1;
      else
    table[i][j] = 0;
    }
  }
}
 
int rectangleAreaMaxRow(int row[],int w) {
  Stack s = stack_init();
  int i, max = 0;
  row[w] = DIRTY;
 
  for (i=0; i<=w; i++) {
    Rectangle r;
    r.height = row[i];
    r.pos = i;
     
    if (empty(s) || top(s).height < r.height) {
      push(r, s);
    } else {
      int target = i;
      while (!empty(s) && top(s).height >= r.height) {
        Rectangle pre = pop(s);
        int area = pre.height * (i-pre.pos);
        max = (area > max ? area : max);
        target = pre.pos;
      }
    r.pos = target;
    push(r, s);
    }
  }
 
  free_stack(s);
  return max;
}
   
int rectangleAreaMax(int h, int w)
{
  int i, max = 0, temp;
  for (i=0; i<h; i++) {
    temp = rectangleAreaMaxRow(table[i], w);
    max = (temp > max ? temp : max);
  }
 
  return max;
}
 
int main() {
  int i, j, h, w;
 
  scanf("%d %d", &h, &w);
  for (i=0; i<h; i++)
    for (j=0; j<w; j++)
      scanf("%d", &board[i][j]);
 
  create_table(h, w);
   
  printf("%d\n", rectangleAreaMax(h, w));
   
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	table
	.bss
	.align 32
	.type	table, @object
	.size	table, 7851204
table:
	.zero	7851204
	.globl	board
	.align 32
	.type	board, @object
	.size	board, 7851204
board:
	.zero	7851204
	.text
	.globl	stack_init
	.type	stack_init, @function
stack_init:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	$16, %edi
	call	malloc@PLT
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	movl	$0, (%rax)
	movq	-8(%rbp), %rax
	movl	$10, 4(%rax)
	movl	$80, %edi
	call	malloc@PLT
	movq	%rax, %rdx
	movq	-8(%rbp), %rax
	movq	%rdx, 8(%rax)
	movq	-8(%rbp), %rax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	stack_init, .-stack_init
	.globl	empty_rectangle
	.type	empty_rectangle, @function
empty_rectangle:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movabsq	$-4294967296, %rdx
	andq	%rdx, %rax
	movl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	empty_rectangle, .-empty_rectangle
	.globl	top
	.type	top, @function
top:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$8, %rsp
	movq	%rdi, -8(%rbp)
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jg	.L6
	movl	$0, %eax
	call	empty_rectangle
	jmp	.L7
.L6:
	movq	-8(%rbp), %rax
	movq	8(%rax), %rdx
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	cltq
	salq	$3, %rax
	subq	$8, %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	top, .-top
	.globl	pop
	.type	pop, @function
pop:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$8, %rsp
	movq	%rdi, -8(%rbp)
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jg	.L9
	movl	$0, %eax
	call	empty_rectangle
	jmp	.L10
.L9:
	movq	-8(%rbp), %rax
	movq	8(%rax), %rcx
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	leal	-1(%rax), %edx
	movq	-8(%rbp), %rax
	movl	%edx, (%rax)
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	cltq
	salq	$3, %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	pop, .-pop
	.section	.rodata
.LC0:
	.string	"malloc failed.\n"
	.text
	.globl	push
	.type	push, @function
push:
.LFB10:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	-32(%rbp), %rax
	movl	(%rax), %edx
	movq	-32(%rbp), %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jge	.L12
	movq	-32(%rbp), %rax
	movq	8(%rax), %rsi
	movq	-32(%rbp), %rax
	movl	(%rax), %eax
	leal	1(%rax), %ecx
	movq	-32(%rbp), %rdx
	movl	%ecx, (%rdx)
	cltq
	salq	$3, %rax
	leaq	(%rsi,%rax), %rdx
	movq	-24(%rbp), %rax
	movq	%rax, (%rdx)
	jmp	.L13
.L12:
	movq	-32(%rbp), %rax
	movl	4(%rax), %eax
	cltq
	salq	$3, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, -8(%rbp)
	cmpq	$0, -8(%rbp)
	jne	.L14
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	call	perror@PLT
	movl	$-1, %edi
	call	exit@PLT
.L14:
	movl	$0, -12(%rbp)
	jmp	.L15
.L16:
	movq	-32(%rbp), %rax
	movq	8(%rax), %rdx
	movl	-12(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movl	-12(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	movq	-8(%rbp), %rdx
	addq	%rcx, %rdx
	movq	(%rax), %rax
	movq	%rax, (%rdx)
	addl	$1, -12(%rbp)
.L15:
	movq	-32(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L16
	movq	-32(%rbp), %rax
	movl	(%rax), %eax
	leal	1(%rax), %ecx
	movq	-32(%rbp), %rdx
	movl	%ecx, (%rdx)
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-8(%rbp), %rax
	addq	%rax, %rdx
	movq	-24(%rbp), %rax
	movq	%rax, (%rdx)
	movq	-32(%rbp), %rax
	movl	4(%rax), %eax
	leal	(%rax,%rax), %edx
	movq	-32(%rbp), %rax
	movl	%edx, 4(%rax)
	movq	-32(%rbp), %rax
	movq	8(%rax), %rax
	movq	%rax, %rdi
	call	free@PLT
	movq	-32(%rbp), %rax
	movq	-8(%rbp), %rdx
	movq	%rdx, 8(%rax)
.L13:
	movq	-24(%rbp), %rax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	push, .-push
	.globl	empty
	.type	empty, @function
empty:
.LFB11:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	sete	%al
	movzbl	%al, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	empty, .-empty
	.globl	free_stack
	.type	free_stack, @function
free_stack:
.LFB12:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movq	%rdi, -8(%rbp)
	movq	-8(%rbp), %rax
	movq	%rax, %rdi
	call	free@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	free_stack, .-free_stack
	.globl	create_table
	.type	create_table, @function
create_table:
.LFB13:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	$0, -8(%rbp)
	jmp	.L22
.L23:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	board(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	sete	%al
	movzbl	%al, %eax
	movl	-8(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	table(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -8(%rbp)
.L22:
	movl	-8(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jl	.L23
	movl	$1, -8(%rbp)
	jmp	.L24
.L29:
	movl	$0, -4(%rbp)
	jmp	.L25
.L28:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movl	-8(%rbp), %eax
	cltq
	imulq	$1401, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	board(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L26
	movl	-8(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-4(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	imulq	$1401, %rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	table(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	1(%rax), %ecx
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movl	-8(%rbp), %eax
	cltq
	imulq	$1401, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	table(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	jmp	.L27
.L26:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movl	-8(%rbp), %eax
	cltq
	imulq	$1401, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	table(%rip), %rax
	movl	$0, (%rdx,%rax)
.L27:
	addl	$1, -4(%rbp)
.L25:
	movl	-4(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jl	.L28
	addl	$1, -8(%rbp)
.L24:
	movl	-8(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jl	.L29
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	create_table, .-create_table
	.globl	rectangleAreaMaxRow
	.type	rectangleAreaMaxRow, @function
rectangleAreaMaxRow:
.LFB14:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movq	%rdi, -56(%rbp)
	movl	%esi, -60(%rbp)
	movl	$0, %eax
	call	stack_init
	movq	%rax, -24(%rbp)
	movl	$0, -36(%rbp)
	movl	-60(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-56(%rbp), %rax
	addq	%rdx, %rax
	movl	$1, (%rax)
	movl	$0, -40(%rbp)
	jmp	.L31
.L38:
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-56(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	%eax, -16(%rbp)
	movl	-40(%rbp), %eax
	movl	%eax, -12(%rbp)
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	empty
	testl	%eax, %eax
	jne	.L32
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	top
	movl	%eax, %edx
	movl	-16(%rbp), %eax
	cmpl	%eax, %edx
	jge	.L33
.L32:
	movq	-24(%rbp), %rdx
	movq	-16(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	push
	jmp	.L34
.L33:
	movl	-40(%rbp), %eax
	movl	%eax, -32(%rbp)
	jmp	.L35
.L37:
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	pop
	movq	%rax, -8(%rbp)
	movl	-8(%rbp), %eax
	movl	-4(%rbp), %ecx
	movl	-40(%rbp), %edx
	subl	%ecx, %edx
	imull	%edx, %eax
	movl	%eax, -28(%rbp)
	movl	-36(%rbp), %edx
	movl	-28(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	%eax, -36(%rbp)
	movl	-4(%rbp), %eax
	movl	%eax, -32(%rbp)
.L35:
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	empty
	testl	%eax, %eax
	jne	.L36
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	top
	movl	%eax, %edx
	movl	-16(%rbp), %eax
	cmpl	%eax, %edx
	jge	.L37
.L36:
	movl	-32(%rbp), %eax
	movl	%eax, -12(%rbp)
	movq	-24(%rbp), %rdx
	movq	-16(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	push
.L34:
	addl	$1, -40(%rbp)
.L31:
	movl	-40(%rbp), %eax
	cmpl	-60(%rbp), %eax
	jle	.L38
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	free_stack
	movl	-36(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	rectangleAreaMaxRow, .-rectangleAreaMaxRow
	.globl	rectangleAreaMax
	.type	rectangleAreaMax, @function
rectangleAreaMax:
.LFB15:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	$0, -8(%rbp)
	movl	$0, -12(%rbp)
	jmp	.L41
.L42:
	movl	-12(%rbp), %eax
	cltq
	imulq	$5604, %rax, %rax
	leaq	table(%rip), %rdx
	addq	%rax, %rdx
	movl	-24(%rbp), %eax
	movl	%eax, %esi
	movq	%rdx, %rdi
	call	rectangleAreaMaxRow
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %edx
	movl	-4(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	%eax, -8(%rbp)
	addl	$1, -12(%rbp)
.L41:
	movl	-12(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jl	.L42
	movl	-8(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	rectangleAreaMax, .-rectangleAreaMax
	.section	.rodata
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%d"
.LC3:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB16:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-20(%rbp), %rdx
	leaq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -16(%rbp)
	jmp	.L45
.L48:
	movl	$0, -12(%rbp)
	jmp	.L46
.L47:
	movl	-12(%rbp), %eax
	movslq	%eax, %rdx
	movl	-16(%rbp), %eax
	cltq
	imulq	$1401, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	board(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -12(%rbp)
.L46:
	movl	-20(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L47
	addl	$1, -16(%rbp)
.L45:
	movl	-24(%rbp), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L48
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	create_table
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	rectangleAreaMax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L50
	call	__stack_chk_fail@PLT
.L50:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
train
	.file	"temp.c"
	.text
	.globl	table
	.bss
	.align 32
	.type	table, @object
	.size	table, 7851204
table:
	.zero	7851204
	.globl	board
	.align 32
	.type	board, @object
	.size	board, 7851204
board:
	.zero	7851204
	.text
	.globl	stack_init
	.type	stack_init, @function
stack_init:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	$16, %edi
	call	malloc@PLT
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	movl	$0, (%rax)
	movq	-8(%rbp), %rax
	movl	$10, 4(%rax)
	movl	$80, %edi
	call	malloc@PLT
	movq	%rax, %rdx
	movq	-8(%rbp), %rax
	movq	%rdx, 8(%rax)
	movq	-8(%rbp), %rax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	stack_init, .-stack_init
	.globl	empty_rectangle
	.type	empty_rectangle, @function
empty_rectangle:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movabsq	$-4294967296, %rdx
	andq	%rdx, %rax
	movl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	empty_rectangle, .-empty_rectangle
	.globl	top
	.type	top, @function
top:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$8, %rsp
	movq	%rdi, -8(%rbp)
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jg	.L6
	movl	$0, %eax
	call	empty_rectangle
	jmp	.L7
.L6:
	movq	-8(%rbp), %rax
	movq	8(%rax), %rdx
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	cltq
	salq	$3, %rax
	subq	$8, %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	top, .-top
	.globl	pop
	.type	pop, @function
pop:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$8, %rsp
	movq	%rdi, -8(%rbp)
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jg	.L9
	movl	$0, %eax
	call	empty_rectangle
	jmp	.L10
.L9:
	movq	-8(%rbp), %rax
	movq	8(%rax), %rcx
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	leal	-1(%rax), %edx
	movq	-8(%rbp), %rax
	movl	%edx, (%rax)
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	cltq
	salq	$3, %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	pop, .-pop
	.section	.rodata
.LC0:
	.string	"malloc failed.\n"
	.text
	.globl	push
	.type	push, @function
push:
.LFB10:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	-32(%rbp), %rax
	movl	(%rax), %edx
	movq	-32(%rbp), %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jge	.L12
	movq	-32(%rbp), %rax
	movq	8(%rax), %rsi
	movq	-32(%rbp), %rax
	movl	(%rax), %eax
	leal	1(%rax), %ecx
	movq	-32(%rbp), %rdx
	movl	%ecx, (%rdx)
	cltq
	salq	$3, %rax
	leaq	(%rsi,%rax), %rdx
	movq	-24(%rbp), %rax
	movq	%rax, (%rdx)
	jmp	.L13
.L12:
	movq	-32(%rbp), %rax
	movl	4(%rax), %eax
	cltq
	salq	$3, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, -8(%rbp)
	cmpq	$0, -8(%rbp)
	jne	.L14
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	call	perror@PLT
	movl	$-1, %edi
	call	exit@PLT
.L14:
	movl	$0, -12(%rbp)
	jmp	.L15
.L16:
	movq	-32(%rbp), %rax
	movq	8(%rax), %rdx
	movl	-12(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movl	-12(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	movq	-8(%rbp), %rdx
	addq	%rcx, %rdx
	movq	(%rax), %rax
	movq	%rax, (%rdx)
	addl	$1, -12(%rbp)
.L15:
	movq	-32(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L16
	movq	-32(%rbp), %rax
	movl	(%rax), %eax
	leal	1(%rax), %ecx
	movq	-32(%rbp), %rdx
	movl	%ecx, (%rdx)
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-8(%rbp), %rax
	addq	%rax, %rdx
	movq	-24(%rbp), %rax
	movq	%rax, (%rdx)
	movq	-32(%rbp), %rax
	movl	4(%rax), %eax
	leal	(%rax,%rax), %edx
	movq	-32(%rbp), %rax
	movl	%edx, 4(%rax)
	movq	-32(%rbp), %rax
	movq	8(%rax), %rax
	movq	%rax, %rdi
	call	free@PLT
	movq	-32(%rbp), %rax
	movq	-8(%rbp), %rdx
	movq	%rdx, 8(%rax)
.L13:
	movq	-24(%rbp), %rax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	push, .-push
	.globl	empty
	.type	empty, @function
empty:
.LFB11:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	sete	%al
	movzbl	%al, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	empty, .-empty
	.globl	free_stack
	.type	free_stack, @function
free_stack:
.LFB12:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movq	%rdi, -8(%rbp)
	movq	-8(%rbp), %rax
	movq	%rax, %rdi
	call	free@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	free_stack, .-free_stack
	.globl	create_table
	.type	create_table, @function
create_table:
.LFB13:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	$0, -8(%rbp)
	jmp	.L22
.L23:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	board(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	sete	%al
	movzbl	%al, %eax
	movl	-8(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	table(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -8(%rbp)
.L22:
	movl	-8(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jl	.L23
	movl	$1, -8(%rbp)
	jmp	.L24
.L29:
	movl	$0, -4(%rbp)
	jmp	.L25
.L28:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movl	-8(%rbp), %eax
	cltq
	imulq	$1401, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	board(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L26
	movl	-8(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-4(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	imulq	$1401, %rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	table(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	1(%rax), %ecx
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movl	-8(%rbp), %eax
	cltq
	imulq	$1401, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	table(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	jmp	.L27
.L26:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movl	-8(%rbp), %eax
	cltq
	imulq	$1401, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	table(%rip), %rax
	movl	$0, (%rdx,%rax)
.L27:
	addl	$1, -4(%rbp)
.L25:
	movl	-4(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jl	.L28
	addl	$1, -8(%rbp)
.L24:
	movl	-8(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jl	.L29
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	create_table, .-create_table
	.globl	rectangleAreaMaxRow
	.type	rectangleAreaMaxRow, @function
rectangleAreaMaxRow:
.LFB14:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movq	%rdi, -56(%rbp)
	movl	%esi, -60(%rbp)
	movl	$0, %eax
	call	stack_init
	movq	%rax, -24(%rbp)
	movl	$0, -36(%rbp)
	movl	-60(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-56(%rbp), %rax
	addq	%rdx, %rax
	movl	$1, (%rax)
	movl	$0, -40(%rbp)
	jmp	.L31
.L38:
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-56(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	%eax, -16(%rbp)
	movl	-40(%rbp), %eax
	movl	%eax, -12(%rbp)
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	empty
	testl	%eax, %eax
	jne	.L32
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	top
	movl	%eax, %edx
	movl	-16(%rbp), %eax
	cmpl	%eax, %edx
	jge	.L33
.L32:
	movq	-24(%rbp), %rdx
	movq	-16(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	push
	jmp	.L34
.L33:
	movl	-40(%rbp), %eax
	movl	%eax, -32(%rbp)
	jmp	.L35
.L37:
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	pop
	movq	%rax, -8(%rbp)
	movl	-8(%rbp), %eax
	movl	-4(%rbp), %ecx
	movl	-40(%rbp), %edx
	subl	%ecx, %edx
	imull	%edx, %eax
	movl	%eax, -28(%rbp)
	movl	-36(%rbp), %edx
	movl	-28(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	%eax, -36(%rbp)
	movl	-4(%rbp), %eax
	movl	%eax, -32(%rbp)
.L35:
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	empty
	testl	%eax, %eax
	jne	.L36
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	top
	movl	%eax, %edx
	movl	-16(%rbp), %eax
	cmpl	%eax, %edx
	jge	.L37
.L36:
	movl	-32(%rbp), %eax
	movl	%eax, -12(%rbp)
	movq	-24(%rbp), %rdx
	movq	-16(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	push
.L34:
	addl	$1, -40(%rbp)
.L31:
	movl	-40(%rbp), %eax
	cmpl	-60(%rbp), %eax
	jle	.L38
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	free_stack
	movl	-36(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	rectangleAreaMaxRow, .-rectangleAreaMaxRow
	.globl	rectangleAreaMax
	.type	rectangleAreaMax, @function
rectangleAreaMax:
.LFB15:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	$0, -8(%rbp)
	movl	$0, -12(%rbp)
	jmp	.L41
.L42:
	movl	-12(%rbp), %eax
	cltq
	imulq	$5604, %rax, %rax
	leaq	table(%rip), %rdx
	addq	%rax, %rdx
	movl	-24(%rbp), %eax
	movl	%eax, %esi
	movq	%rdx, %rdi
	call	rectangleAreaMaxRow
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %edx
	movl	-4(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	%eax, -8(%rbp)
	addl	$1, -12(%rbp)
.L41:
	movl	-12(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jl	.L42
	movl	-8(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	rectangleAreaMax, .-rectangleAreaMax
	.section	.rodata
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%d"
.LC3:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB16:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-20(%rbp), %rdx
	leaq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -16(%rbp)
	jmp	.L45
.L48:
	movl	$0, -12(%rbp)
	jmp	.L46
.L47:
	movl	-12(%rbp), %eax
	movslq	%eax, %rdx
	movl	-16(%rbp), %eax
	cltq
	imulq	$1401, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	board(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -12(%rbp)
.L46:
	movl	-20(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L47
	addl	$1, -16(%rbp)
.L45:
	movl	-24(%rbp), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L48
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	create_table
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	rectangleAreaMax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L50
	call	__stack_chk_fail@PLT
.L50:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
