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>

void phouse(int s[15][10])
{
    int i,j;
    for (i=0;i<15;i++)
    {
        for (j=0; j<10;j++)
        {
            if (i%4==3) printf("##");
            else printf(" %d",s[i][j]);
        }
        printf("\n");
    }
}

int main(void)
{
    int house[15][10] = {{0}};
    int n,b,f,r,v;
    scanf("%d",&n);
    int i,j,p,k;
    for (i=0;i<n;i++)
    {

        scanf("\n%d %d %d %d",&b,&f,&r,&v);
        p = (b-1)*4+f-1;
        k = r-1;
        house[p][k] += v;
    }
    phouse(house);
    return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"##"
.LC1:
	.string	" %d"
	.text
	.globl	phouse
	.type	phouse, @function
phouse:
.LFB0:
	.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)
	movl	$0, -8(%rbp)
	jmp	.L2
.L7:
	movl	$0, -4(%rbp)
	jmp	.L3
.L6:
	movl	-8(%rbp), %eax
	cltd
	shrl	$30, %edx
	addl	%edx, %eax
	andl	$3, %eax
	subl	%edx, %eax
	cmpl	$3, %eax
	jne	.L4
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L5
.L4:
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rdx
	movq	-24(%rbp), %rax
	addq	%rax, %rdx
	movl	-4(%rbp), %eax
	cltq
	movl	(%rdx,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L5:
	addl	$1, -4(%rbp)
.L3:
	cmpl	$9, -4(%rbp)
	jle	.L6
	movl	$10, %edi
	call	putchar@PLT
	addl	$1, -8(%rbp)
.L2:
	cmpl	$14, -8(%rbp)
	jle	.L7
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	phouse, .-phouse
	.section	.rodata
.LC2:
	.string	"%d"
.LC3:
	.string	"\n%d %d %d %d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$640, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-608(%rbp), %rdx
	movl	$0, %eax
	movl	$75, %ecx
	movq	%rdx, %rdi
	rep stosq
	leaq	-640(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -620(%rbp)
	jmp	.L9
.L10:
	leaq	-624(%rbp), %rsi
	leaq	-628(%rbp), %rcx
	leaq	-632(%rbp), %rdx
	leaq	-636(%rbp), %rax
	movq	%rsi, %r8
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-636(%rbp), %eax
	subl	$1, %eax
	leal	0(,%rax,4), %edx
	movl	-632(%rbp), %eax
	addl	%edx, %eax
	subl	$1, %eax
	movl	%eax, -616(%rbp)
	movl	-628(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -612(%rbp)
	movl	-612(%rbp), %eax
	movslq	%eax, %rcx
	movl	-616(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-608(%rbp,%rax,4), %edx
	movl	-624(%rbp), %eax
	leal	(%rdx,%rax), %ecx
	movl	-612(%rbp), %eax
	movslq	%eax, %rsi
	movl	-616(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	%ecx, -608(%rbp,%rax,4)
	addl	$1, -620(%rbp)
.L9:
	movl	-640(%rbp), %eax
	cmpl	%eax, -620(%rbp)
	jl	.L10
	leaq	-608(%rbp), %rax
	movq	%rax, %rdi
	call	phouse
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"##"
.LC1:
	.string	" %d"
	.text
	.p2align 4
	.globl	phouse
	.type	phouse, @function
phouse:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	.LC0(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	xorl	%r13d, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	leaq	.LC1(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	leaq	40(%rdi), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	.p2align 4,,10
	.p2align 3
.L2:
	movl	%r13d, %eax
	andl	$3, %eax
	cmpl	$3, %eax
	je	.L7
	leaq	-40(%rbp), %rbx
	.p2align 4,,10
	.p2align 3
.L5:
	movl	(%rbx), %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__printf_chk@PLT
	cmpq	%rbp, %rbx
	jne	.L5
.L6:
	movl	$10, %edi
	addl	$1, %r13d
	addq	$40, %rbp
	call	putchar@PLT
	cmpl	$15, %r13d
	jne	.L2
	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
.L7:
	.cfi_restore_state
	movl	$10, %ebx
	.p2align 4,,10
	.p2align 3
.L3:
	xorl	%eax, %eax
	movq	%r14, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	subl	$1, %ebx
	jne	.L3
	jmp	.L6
	.cfi_endproc
.LFE23:
	.size	phouse, .-phouse
	.section	.rodata.str1.1
.LC2:
	.string	"%d"
.LC3:
	.string	"\n%d %d %d %d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	$75, %ecx
	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	$664, %rsp
	.cfi_def_cfa_offset 720
	movq	%fs:40, %rax
	movq	%rax, 648(%rsp)
	xorl	%eax, %eax
	leaq	48(%rsp), %rdi
	leaq	28(%rsp), %rsi
	movq	%rdi, 8(%rsp)
	rep stosq
	leaq	.LC2(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %eax
	testl	%eax, %eax
	jle	.L13
	xorl	%r14d, %r14d
	leaq	44(%rsp), %r15
	leaq	40(%rsp), %r13
	leaq	36(%rsp), %r12
	leaq	32(%rsp), %rbp
	leaq	.LC3(%rip), %rbx
	.p2align 4,,10
	.p2align 3
.L14:
	movq	%r12, %rdx
	movq	%r15, %r8
	movq	%r13, %rcx
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %r14d
	call	__isoc99_scanf@PLT
	movl	36(%rsp), %eax
	movl	32(%rsp), %edx
	leal	-5(%rax,%rdx,4), %edx
	movl	40(%rsp), %eax
	movslq	%edx, %rdx
	subl	$1, %eax
	leaq	(%rdx,%rdx,4), %rdx
	cltq
	leaq	(%rax,%rdx,2), %rax
	movl	44(%rsp), %edx
	addl	%edx, 48(%rsp,%rax,4)
	cmpl	%r14d, 28(%rsp)
	jg	.L14
.L13:
	movq	8(%rsp), %rdi
	call	phouse
	movq	648(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L18
	addq	$664, %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
.L18:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.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:

rule
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"##"
.LC1:
	.string	" %d"
	.text
	.p2align 4
	.globl	phouse
	.type	phouse, @function
phouse:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	.LC0(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	xorl	%r13d, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	leaq	.LC1(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	leaq	40(%rdi), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	.p2align 4,,10
	.p2align 3
.L2:
	movl	%r13d, %eax
	andl	$3, %eax
	cmpl	$3, %eax
	je	.L7
	leaq	-40(%rbp), %rbx
	.p2align 4,,10
	.p2align 3
.L5:
	movl	(%rbx), %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__printf_chk@PLT
	cmpq	%rbp, %rbx
	jne	.L5
.L6:
	movl	$10, %edi
	addl	$1, %r13d
	addq	$40, %rbp
	call	putchar@PLT
	cmpl	$15, %r13d
	jne	.L2
	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
.L7:
	.cfi_restore_state
	movl	$10, %ebx
	.p2align 4,,10
	.p2align 3
.L3:
	xorl	%eax, %eax
	movq	%r14, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	subl	$1, %ebx
	jne	.L3
	jmp	.L6
	.cfi_endproc
.LFE23:
	.size	phouse, .-phouse
	.section	.rodata.str1.1
.LC2:
	.string	"%d"
.LC3:
	.string	"\n%d %d %d %d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	$75, %ecx
	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	$664, %rsp
	.cfi_def_cfa_offset 720
	movq	%fs:40, %rax
	movq	%rax, 648(%rsp)
	xorl	%eax, %eax
	leaq	48(%rsp), %rdi
	leaq	28(%rsp), %rsi
	movq	%rdi, 8(%rsp)
	rep stosq
	leaq	.LC2(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %eax
	testl	%eax, %eax
	jle	.L13
	xorl	%r14d, %r14d
	leaq	44(%rsp), %r15
	leaq	40(%rsp), %r13
	leaq	36(%rsp), %r12
	leaq	32(%rsp), %rbp
	leaq	.LC3(%rip), %rbx
	.p2align 4,,10
	.p2align 3
.L14:
	movq	%r12, %rdx
	movq	%r15, %r8
	movq	%r13, %rcx
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %r14d
	call	__isoc99_scanf@PLT
	movl	36(%rsp), %eax
	movl	32(%rsp), %edx
	leal	-5(%rax,%rdx,4), %edx
	movl	40(%rsp), %eax
	movslq	%edx, %rdx
	subl	$1, %eax
	leaq	(%rdx,%rdx,4), %rdx
	cltq
	leaq	(%rax,%rdx,2), %rax
	movl	44(%rsp), %edx
	addl	%edx, 48(%rsp,%rax,4)
	cmpl	%r14d, 28(%rsp)
	jg	.L14
.L13:
	movq	8(%rsp), %rdi
	call	phouse
	movq	648(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L18
	addq	$664, %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
.L18:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.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:

#include <stdio.h>

void phouse(int s[15][10])
{
    int i,j;
    for (i=0;i<15;i++)
    {
        for (j=0; j<10;j++)
        {
            if (i%4==3) printf("##");
            else printf(" %d",s[i][j]);
        }
        printf("\n");
    }
}

int main(void)
{
    int house[15][10] = {{0}};
    int n,b,f,r,v;
    scanf("%d",&n);
    int i,j,p,k;
    for (i=0;i<n;i++)
    {

        scanf("\n%d %d %d %d",&b,&f,&r,&v);
        p = (b-1)*4+f-1;
        k = r-1;
        house[p][k] += v;
    }
    phouse(house);
    return 0;
}

3
1 1 3 16
3 2 2 7
4 3 8 1
 3
1 1 3 8
3 2 4 7
4 3 8 1
 3
1 1 3 12
3 2 4 7
4 3 8 1
 3
1 1 6 12
3 2 4 7
4 3 8 1
 3
1 1 10 12
3 2 4 7
4 3 8 1
 3
1 1 10 12
3 2 6 7
4 3 8 1
 3
1 1 10 12
3 3 6 7
4 3 8 1
 3
0 1 10 12
3 3 6 7
4 3 8 1
 3
2 1 3 8
3 2 2 7
4 3 8 1
 3
1 1 3 16
2 2 2 7
4 3 8 1

 0 0 16 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
####################
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
####################
 0 0 0 0 0 0 0 0 0 0
 0 7 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
####################
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 1 0 0
  0 0 8 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
####################
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
####################
 0 0 0 0 0 0 0 0 0 0
 0 0 0 7 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
####################
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 1 0 0
  0 0 12 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
####################
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
####################
 0 0 0 0 0 0 0 0 0 0
 0 0 0 7 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
####################
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 1 0 0
  0 0 0 0 0 12 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
####################
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
####################
 0 0 0 0 0 0 0 0 0 0
 0 0 0 7 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
####################
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 1 0 0
  0 0 0 0 0 0 0 0 0 12
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
####################
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
####################
 0 0 0 0 0 0 0 0 0 0
 0 0 0 7 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
####################
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 1 0 0
  0 0 0 0 0 0 0 0 0 12
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
####################
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
####################
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 7 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
####################
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 1 0 0
  0 0 0 0 0 0 0 0 0 12
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
####################
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
####################
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 7 0 0 0 0
####################
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 1 0 0
  0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
####################
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
####################
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 7 0 0 0 0
####################
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 1 0 0
  0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
####################
 0 0 8 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
####################
 0 0 0 0 0 0 0 0 0 0
 0 7 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
####################
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 1 0 0
  0 0 16 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
####################
 0 0 0 0 0 0 0 0 0 0
 0 7 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
####################
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
####################
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 1 0 0

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>

void phouse(int s[15][10])
{
    int i,j;
    for (i=0;i<15;i++)
    {
        for (j=0; j<10;j++)
        {
            if (i%4==3) printf("##");
            else printf(" %d",s[i][j]);
        }
        printf("\n");
    }
}

int main(void)
{
    int house[15][10] = {{0}};
    int n,b,f,r,v;
    scanf("%d",&n);
    int i,j,p,k;
    for (i=0;i<n;i++)
    {

        scanf("\n%d %d %d %d",&b,&f,&r,&v);
        p = (b-1)*4+f-1;
        k = r-1;
        house[p][k] += v;
    }
    phouse(house);
    return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"##"
.LC1:
	.string	" %d"
	.text
	.globl	phouse
	.type	phouse, @function
phouse:
.LFB0:
	.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)
	movl	$0, -8(%rbp)
	jmp	.L2
.L7:
	movl	$0, -4(%rbp)
	jmp	.L3
.L6:
	movl	-8(%rbp), %eax
	cltd
	shrl	$30, %edx
	addl	%edx, %eax
	andl	$3, %eax
	subl	%edx, %eax
	cmpl	$3, %eax
	jne	.L4
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L5
.L4:
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rdx
	movq	-24(%rbp), %rax
	addq	%rax, %rdx
	movl	-4(%rbp), %eax
	cltq
	movl	(%rdx,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L5:
	addl	$1, -4(%rbp)
.L3:
	cmpl	$9, -4(%rbp)
	jle	.L6
	movl	$10, %edi
	call	putchar@PLT
	addl	$1, -8(%rbp)
.L2:
	cmpl	$14, -8(%rbp)
	jle	.L7
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	phouse, .-phouse
	.section	.rodata
.LC2:
	.string	"%d"
.LC3:
	.string	"\n%d %d %d %d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$640, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-608(%rbp), %rdx
	movl	$0, %eax
	movl	$75, %ecx
	movq	%rdx, %rdi
	rep stosq
	leaq	-640(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -620(%rbp)
	jmp	.L9
.L10:
	leaq	-624(%rbp), %rsi
	leaq	-628(%rbp), %rcx
	leaq	-632(%rbp), %rdx
	leaq	-636(%rbp), %rax
	movq	%rsi, %r8
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-636(%rbp), %eax
	subl	$1, %eax
	leal	0(,%rax,4), %edx
	movl	-632(%rbp), %eax
	addl	%edx, %eax
	subl	$1, %eax
	movl	%eax, -616(%rbp)
	movl	-628(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -612(%rbp)
	movl	-612(%rbp), %eax
	movslq	%eax, %rcx
	movl	-616(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-608(%rbp,%rax,4), %edx
	movl	-624(%rbp), %eax
	leal	(%rdx,%rax), %ecx
	movl	-612(%rbp), %eax
	movslq	%eax, %rsi
	movl	-616(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	%ecx, -608(%rbp,%rax,4)
	addl	$1, -620(%rbp)
.L9:
	movl	-640(%rbp), %eax
	cmpl	%eax, -620(%rbp)
	jl	.L10
	leaq	-608(%rbp), %rax
	movq	%rax, %rdi
	call	phouse
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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
	.section	.rodata
.LC0:
	.string	"##"
.LC1:
	.string	" %d"
	.text
	.globl	phouse
	.type	phouse, @function
phouse:
.LFB0:
	.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)
	movl	$0, -8(%rbp)
	jmp	.L2
.L7:
	movl	$0, -4(%rbp)
	jmp	.L3
.L6:
	movl	-8(%rbp), %eax
	cltd
	shrl	$30, %edx
	addl	%edx, %eax
	andl	$3, %eax
	subl	%edx, %eax
	cmpl	$3, %eax
	jne	.L4
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L5
.L4:
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rdx
	movq	-24(%rbp), %rax
	addq	%rax, %rdx
	movl	-4(%rbp), %eax
	cltq
	movl	(%rdx,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L5:
	addl	$1, -4(%rbp)
.L3:
	cmpl	$9, -4(%rbp)
	jle	.L6
	movl	$10, %edi
	call	putchar@PLT
	addl	$1, -8(%rbp)
.L2:
	cmpl	$14, -8(%rbp)
	jle	.L7
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	phouse, .-phouse
	.section	.rodata
.LC2:
	.string	"%d"
.LC3:
	.string	"\n%d %d %d %d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$640, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-608(%rbp), %rdx
	movl	$0, %eax
	movl	$75, %ecx
	movq	%rdx, %rdi
	rep stosq
	leaq	-640(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -620(%rbp)
	jmp	.L9
.L10:
	leaq	-624(%rbp), %rsi
	leaq	-628(%rbp), %rcx
	leaq	-632(%rbp), %rdx
	leaq	-636(%rbp), %rax
	movq	%rsi, %r8
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-636(%rbp), %eax
	subl	$1, %eax
	leal	0(,%rax,4), %edx
	movl	-632(%rbp), %eax
	addl	%edx, %eax
	subl	$1, %eax
	movl	%eax, -616(%rbp)
	movl	-628(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -612(%rbp)
	movl	-612(%rbp), %eax
	movslq	%eax, %rcx
	movl	-616(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-608(%rbp,%rax,4), %edx
	movl	-624(%rbp), %eax
	leal	(%rdx,%rax), %ecx
	movl	-612(%rbp), %eax
	movslq	%eax, %rsi
	movl	-616(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	%ecx, -608(%rbp,%rax,4)
	addl	$1, -620(%rbp)
.L9:
	movl	-640(%rbp), %eax
	cmpl	%eax, -620(%rbp)
	jl	.L10
	leaq	-608(%rbp), %rax
	movq	%rax, %rdi
	call	phouse
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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:
