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

```c
#include <stdio.h>

int res[1010][1010];

int main(){
    int h, w, a, b;
    scanf("%d%d%d%d", &h, &w, &a, &b);

    for(int i = 0; i < b; i++){
        for(int j = 0; j < a; j++) res[i][j] = 1;
    }

    for(int i = b; i < h; i++){
        for(int j = a; j < w; j++){
            res[i][j] = 1;
        }
    }

    for(int i = 0; i < h; i++){
        for(int j = 0; j < w; j++) printf("%d", res[i][j]);
        printf("\n");
    }
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d%d%d"
.LC2:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%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	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	32(%rsp), %rcx
	leaq	28(%rsp), %rdx
	leaq	24(%rsp), %rsi
	leaq	36(%rsp), %r8
	call	__isoc99_scanf@PLT
	movl	36(%rsp), %ecx
	testl	%ecx, %ecx
	jle	.L2
	movl	32(%rsp), %r10d
	testl	%r10d, %r10d
	jle	.L2
	movl	%r10d, %eax
	leaq	res(%rip), %rsi
	movl	%r10d, %r11d
	xorl	%r9d, %r9d
	shrl	$2, %eax
	movq	%rsi, %r8
	leal	-1(%r10), %ebp
	andl	$-4, %r11d
	leal	-1(%rax), %ebx
	movdqa	.LC1(%rip), %xmm0
	addq	$1, %rbx
	salq	$4, %rbx
	.p2align 4,,10
	.p2align 3
.L3:
	leaq	(%rbx,%r8), %rdx
	movq	%r8, %rax
	cmpl	$2, %ebp
	jbe	.L29
	.p2align 4,,10
	.p2align 3
.L4:
	movups	%xmm0, (%rax)
	addq	$16, %rax
	cmpq	%rdx, %rax
	jne	.L4
	movl	%r11d, %eax
	cmpl	%r11d, %r10d
	je	.L5
.L6:
	movslq	%r9d, %rdx
	movslq	%eax, %rdi
	imulq	$1010, %rdx, %rdx
	addq	%rdx, %rdi
	movl	$1, (%rsi,%rdi,4)
	leal	1(%rax), %edi
	cmpl	%edi, %r10d
	jle	.L5
	movslq	%edi, %rdi
	addl	$2, %eax
	addq	%rdx, %rdi
	movl	$1, (%rsi,%rdi,4)
	cmpl	%eax, %r10d
	jle	.L5
	cltq
	addq	%rax, %rdx
	movl	$1, (%rsi,%rdx,4)
.L5:
	addl	$1, %r9d
	addq	$4040, %r8
	cmpl	%ecx, %r9d
	jne	.L3
.L2:
	movl	24(%rsp), %r11d
	cmpl	%ecx, %r11d
	jle	.L8
	movl	32(%rsp), %eax
	movl	28(%rsp), %r8d
	cmpl	%r8d, %eax
	jge	.L8
	movslq	%ecx, %rdx
	movslq	%eax, %rsi
	movl	%r8d, %ebx
	movdqa	.LC1(%rip), %xmm0
	imulq	$1010, %rdx, %rdx
	subl	%eax, %ebx
	movl	%ebx, %r12d
	leal	-1(%rbx), %ebp
	andl	$-4, %r12d
	addq	%rsi, %rdx
	leaq	res(%rip), %rsi
	leal	(%r12,%rax), %r9d
	leaq	(%rsi,%rdx,4), %rdi
	movl	%ebx, %edx
	shrl	$2, %edx
	subl	$1, %edx
	cmpl	$2, %ebp
	cmovbe	%eax, %r9d
	leaq	1(%rdx), %r10
	salq	$4, %r10
	leal	2(%r9), %r14d
	leal	1(%r9), %r13d
	movslq	%r9d, %r9
	movslq	%r14d, %rax
	movslq	%r13d, %r15
	movq	%rax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L12:
	cmpl	$2, %ebp
	jbe	.L9
	leaq	(%r10,%rdi), %rdx
	movq	%rdi, %rax
	.p2align 4,,10
	.p2align 3
.L10:
	movups	%xmm0, (%rax)
	addq	$16, %rax
	cmpq	%rdx, %rax
	jne	.L10
	cmpl	%r12d, %ebx
	je	.L11
.L9:
	movslq	%ecx, %rax
	imulq	$1010, %rax, %rax
	leaq	(%rax,%r9), %rdx
	movl	$1, (%rsi,%rdx,4)
	cmpl	%r8d, %r13d
	jge	.L11
	leaq	(%rax,%r15), %rdx
	movl	$1, (%rsi,%rdx,4)
	cmpl	%r14d, %r8d
	jle	.L11
	addq	8(%rsp), %rax
	movl	$1, (%rsi,%rax,4)
.L11:
	addl	$1, %ecx
	addq	$4040, %rdi
	cmpl	%r11d, %ecx
	jne	.L12
.L8:
	testl	%r11d, %r11d
	jle	.L13
	leaq	res(%rip), %rbp
	xorl	%r13d, %r13d
	leaq	.LC2(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L14:
	movl	28(%rsp), %eax
	xorl	%ebx, %ebx
	testl	%eax, %eax
	jle	.L16
	.p2align 4,,10
	.p2align 3
.L15:
	movl	0(%rbp,%rbx,4), %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__printf_chk@PLT
	cmpl	%ebx, 28(%rsp)
	jg	.L15
.L16:
	movl	$10, %edi
	addl	$1, %r13d
	addq	$4040, %rbp
	call	putchar@PLT
	cmpl	%r13d, 24(%rsp)
	jg	.L14
.L13:
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L30
	addq	$56, %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
.L29:
	.cfi_restore_state
	xorl	%eax, %eax
	jmp	.L6
.L30:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	res
	.bss
	.align 32
	.type	res, @object
	.size	res, 4080400
res:
	.zero	4080400
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.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:
```

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.
Optimized Assembly Code:

user
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d%d%d"
.LC2:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%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	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	32(%rsp), %rcx
	leaq	28(%rsp), %rdx
	leaq	24(%rsp), %rsi
	leaq	36(%rsp), %r8
	call	__isoc99_scanf@PLT
	movl	36(%rsp), %ecx
	testl	%ecx, %ecx
	jle	.L2
	movl	32(%rsp), %r10d
	testl	%r10d, %r10d
	jle	.L2
	movl	%r10d, %eax
	leaq	res(%rip), %rsi
	movl	%r10d, %r11d
	xorl	%r9d, %r9d
	shrl	$2, %eax
	movq	%rsi, %r8
	leal	-1(%r10), %ebp
	andl	$-4, %r11d
	leal	-1(%rax), %ebx
	movdqa	.LC1(%rip), %xmm0
	addq	$1, %rbx
	salq	$4, %rbx
	.p2align 4,,10
	.p2align 3
.L3:
	leaq	(%rbx,%r8), %rdx
	movq	%r8, %rax
	cmpl	$2, %ebp
	jbe	.L29
	.p2align 4,,10
	.p2align 3
.L4:
	movups	%xmm0, (%rax)
	addq	$16, %rax
	cmpq	%rdx, %rax
	jne	.L4
	movl	%r11d, %eax
	cmpl	%r11d, %r10d
	je	.L5
.L6:
	movslq	%r9d, %rdx
	movslq	%eax, %rdi
	imulq	$1010, %rdx, %rdx
	addq	%rdx, %rdi
	movl	$1, (%rsi,%rdi,4)
	leal	1(%rax), %edi
	cmpl	%edi, %r10d
	jle	.L5
	movslq	%edi, %rdi
	addl	$2, %eax
	addq	%rdx, %rdi
	movl	$1, (%rsi,%rdi,4)
	cmpl	%eax, %r10d
	jle	.L5
	cltq
	addq	%rax, %rdx
	movl	$1, (%rsi,%rdx,4)
.L5:
	addl	$1, %r9d
	addq	$4040, %r8
	cmpl	%ecx, %r9d
	jne	.L3
.L2:
	movl	24(%rsp), %r11d
	cmpl	%ecx, %r11d
	jle	.L8
	movl	32(%rsp), %eax
	movl	28(%rsp), %r8d
	cmpl	%r8d, %eax
	jge	.L8
	movslq	%ecx, %rdx
	movslq	%eax, %rsi
	movl	%r8d, %ebx
	movdqa	.LC1(%rip), %xmm0
	imulq	$1010, %rdx, %rdx
	subl	%eax, %ebx
	movl	%ebx, %r12d
	leal	-1(%rbx), %ebp
	andl	$-4, %r12d
	addq	%rsi, %rdx
	leaq	res(%rip), %rsi
	leal	(%r12,%rax), %r9d
	leaq	(%rsi,%rdx,4), %rdi
	movl	%ebx, %edx
	shrl	$2, %edx
	subl	$1, %edx
	cmpl	$2, %ebp
	cmovbe	%eax, %r9d
	leaq	1(%rdx), %r10
	salq	$4, %r10
	leal	2(%r9), %r14d
	leal	1(%r9), %r13d
	movslq	%r9d, %r9
	movslq	%r14d, %rax
	movslq	%r13d, %r15
	movq	%rax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L12:
	cmpl	$2, %ebp
	jbe	.L9
	leaq	(%r10,%rdi), %rdx
	movq	%rdi, %rax
	.p2align 4,,10
	.p2align 3
.L10:
	movups	%xmm0, (%rax)
	addq	$16, %rax
	cmpq	%rdx, %rax
	jne	.L10
	cmpl	%r12d, %ebx
	je	.L11
.L9:
	movslq	%ecx, %rax
	imulq	$1010, %rax, %rax
	leaq	(%rax,%r9), %rdx
	movl	$1, (%rsi,%rdx,4)
	cmpl	%r8d, %r13d
	jge	.L11
	leaq	(%rax,%r15), %rdx
	movl	$1, (%rsi,%rdx,4)
	cmpl	%r14d, %r8d
	jle	.L11
	addq	8(%rsp), %rax
	movl	$1, (%rsi,%rax,4)
.L11:
	addl	$1, %ecx
	addq	$4040, %rdi
	cmpl	%r11d, %ecx
	jne	.L12
.L8:
	testl	%r11d, %r11d
	jle	.L13
	leaq	res(%rip), %rbp
	xorl	%r13d, %r13d
	leaq	.LC2(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L14:
	movl	28(%rsp), %eax
	xorl	%ebx, %ebx
	testl	%eax, %eax
	jle	.L16
	.p2align 4,,10
	.p2align 3
.L15:
	movl	0(%rbp,%rbx,4), %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__printf_chk@PLT
	cmpl	%ebx, 28(%rsp)
	jg	.L15
.L16:
	movl	$10, %edi
	addl	$1, %r13d
	addq	$4040, %rbp
	call	putchar@PLT
	cmpl	%r13d, 24(%rsp)
	jg	.L14
.L13:
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L30
	addq	$56, %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
.L29:
	.cfi_restore_state
	xorl	%eax, %eax
	jmp	.L6
.L30:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	res
	.bss
	.align 32
	.type	res, @object
	.size	res, 4080400
res:
	.zero	4080400
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.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
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d%d%d"
.LC2:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%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	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	32(%rsp), %rcx
	leaq	28(%rsp), %rdx
	leaq	24(%rsp), %rsi
	leaq	36(%rsp), %r8
	call	__isoc99_scanf@PLT
	movl	36(%rsp), %ecx
	testl	%ecx, %ecx
	jle	.L2
	movl	32(%rsp), %r10d
	testl	%r10d, %r10d
	jle	.L2
	movl	%r10d, %eax
	leaq	res(%rip), %rsi
	movl	%r10d, %r11d
	xorl	%r9d, %r9d
	shrl	$2, %eax
	movq	%rsi, %r8
	leal	-1(%r10), %ebp
	andl	$-4, %r11d
	leal	-1(%rax), %ebx
	movdqa	.LC1(%rip), %xmm0
	addq	$1, %rbx
	salq	$4, %rbx
	.p2align 4,,10
	.p2align 3
.L3:
	leaq	(%rbx,%r8), %rdx
	movq	%r8, %rax
	cmpl	$2, %ebp
	jbe	.L29
	.p2align 4,,10
	.p2align 3
.L4:
	movups	%xmm0, (%rax)
	addq	$16, %rax
	cmpq	%rdx, %rax
	jne	.L4
	movl	%r11d, %eax
	cmpl	%r11d, %r10d
	je	.L5
.L6:
	movslq	%r9d, %rdx
	movslq	%eax, %rdi
	imulq	$1010, %rdx, %rdx
	addq	%rdx, %rdi
	movl	$1, (%rsi,%rdi,4)
	leal	1(%rax), %edi
	cmpl	%edi, %r10d
	jle	.L5
	movslq	%edi, %rdi
	addl	$2, %eax
	addq	%rdx, %rdi
	movl	$1, (%rsi,%rdi,4)
	cmpl	%eax, %r10d
	jle	.L5
	cltq
	addq	%rax, %rdx
	movl	$1, (%rsi,%rdx,4)
.L5:
	addl	$1, %r9d
	addq	$4040, %r8
	cmpl	%ecx, %r9d
	jne	.L3
.L2:
	movl	24(%rsp), %r11d
	cmpl	%ecx, %r11d
	jle	.L8
	movl	32(%rsp), %eax
	movl	28(%rsp), %r8d
	cmpl	%r8d, %eax
	jge	.L8
	movslq	%ecx, %rdx
	movslq	%eax, %rsi
	movl	%r8d, %ebx
	movdqa	.LC1(%rip), %xmm0
	imulq	$1010, %rdx, %rdx
	subl	%eax, %ebx
	movl	%ebx, %r12d
	leal	-1(%rbx), %ebp
	andl	$-4, %r12d
	addq	%rsi, %rdx
	leaq	res(%rip), %rsi
	leal	(%r12,%rax), %r9d
	leaq	(%rsi,%rdx,4), %rdi
	movl	%ebx, %edx
	shrl	$2, %edx
	subl	$1, %edx
	cmpl	$2, %ebp
	cmovbe	%eax, %r9d
	leaq	1(%rdx), %r10
	salq	$4, %r10
	leal	2(%r9), %r14d
	leal	1(%r9), %r13d
	movslq	%r9d, %r9
	movslq	%r14d, %rax
	movslq	%r13d, %r15
	movq	%rax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L12:
	cmpl	$2, %ebp
	jbe	.L9
	leaq	(%r10,%rdi), %rdx
	movq	%rdi, %rax
	.p2align 4,,10
	.p2align 3
.L10:
	movups	%xmm0, (%rax)
	addq	$16, %rax
	cmpq	%rdx, %rax
	jne	.L10
	cmpl	%r12d, %ebx
	je	.L11
.L9:
	movslq	%ecx, %rax
	imulq	$1010, %rax, %rax
	leaq	(%rax,%r9), %rdx
	movl	$1, (%rsi,%rdx,4)
	cmpl	%r8d, %r13d
	jge	.L11
	leaq	(%rax,%r15), %rdx
	movl	$1, (%rsi,%rdx,4)
	cmpl	%r14d, %r8d
	jle	.L11
	addq	8(%rsp), %rax
	movl	$1, (%rsi,%rax,4)
.L11:
	addl	$1, %ecx
	addq	$4040, %rdi
	cmpl	%r11d, %ecx
	jne	.L12
.L8:
	testl	%r11d, %r11d
	jle	.L13
	leaq	res(%rip), %rbp
	xorl	%r13d, %r13d
	leaq	.LC2(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L14:
	movl	28(%rsp), %eax
	xorl	%ebx, %ebx
	testl	%eax, %eax
	jle	.L16
	.p2align 4,,10
	.p2align 3
.L15:
	movl	0(%rbp,%rbx,4), %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__printf_chk@PLT
	cmpl	%ebx, 28(%rsp)
	jg	.L15
.L16:
	movl	$10, %edi
	addl	$1, %r13d
	addq	$4040, %rbp
	call	putchar@PLT
	cmpl	%r13d, 24(%rsp)
	jg	.L14
.L13:
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L30
	addq	$56, %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
.L29:
	.cfi_restore_state
	xorl	%eax, %eax
	jmp	.L6
.L30:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	res
	.bss
	.align 32
	.type	res, @object
	.size	res, 4080400
res:
	.zero	4080400
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.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:
```
```c
#include <stdio.h>

int res[1010][1010];

int main(){
    int h, w, a, b;
    scanf("%d%d%d%d", &h, &w, &a, &b);

    for(int i = 0; i < b; i++){
        for(int j = 0; j < a; j++) res[i][j] = 1;
    }

    for(int i = b; i < h; i++){
        for(int j = a; j < w; j++){
            res[i][j] = 1;
        }
    }

    for(int i = 0; i < h; i++){
        for(int j = 0; j < w; j++) printf("%d", res[i][j]);
        printf("\n");
    }
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>

int res[1010][1010];

int main(){
    int h, w, a, b;
    scanf("%d%d%d%d", &h, &w, &a, &b);

    for(int i = 0; i < b; i++){
        for(int j = 0; j < a; j++) res[i][j] = 1;
    }

    for(int i = b; i < h; i++){
        for(int j = a; j < w; j++){
            res[i][j] = 1;
        }
    }

    for(int i = 0; i < h; i++){
        for(int j = 0; j < w; j++) printf("%d", res[i][j]);
        printf("\n");
    }
}```

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.
Optimized Assembly Code:

3 3 0 1

000
111
111

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

```c
#include <stdio.h>

int res[1010][1010];

int main(){
    int h, w, a, b;
    scanf("%d%d%d%d", &h, &w, &a, &b);

    for(int i = 0; i < b; i++){
        for(int j = 0; j < a; j++) res[i][j] = 1;
    }

    for(int i = b; i < h; i++){
        for(int j = a; j < w; j++){
            res[i][j] = 1;
        }
    }

    for(int i = 0; i < h; i++){
        for(int j = 0; j < w; j++) printf("%d", res[i][j]);
        printf("\n");
    }
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d%d%d"
.LC2:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%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	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	32(%rsp), %rcx
	leaq	28(%rsp), %rdx
	leaq	24(%rsp), %rsi
	leaq	36(%rsp), %r8
	call	__isoc99_scanf@PLT
	movl	36(%rsp), %ecx
	testl	%ecx, %ecx
	jle	.L2
	movl	32(%rsp), %r10d
	testl	%r10d, %r10d
	jle	.L2
	movl	%r10d, %eax
	leaq	res(%rip), %rsi
	movl	%r10d, %r11d
	xorl	%r9d, %r9d
	shrl	$2, %eax
	movq	%rsi, %r8
	leal	-1(%r10), %ebp
	andl	$-4, %r11d
	leal	-1(%rax), %ebx
	movdqa	.LC1(%rip), %xmm0
	addq	$1, %rbx
	salq	$4, %rbx
	.p2align 4,,10
	.p2align 3
.L3:
	leaq	(%rbx,%r8), %rdx
	movq	%r8, %rax
	cmpl	$2, %ebp
	jbe	.L29
	.p2align 4,,10
	.p2align 3
.L4:
	movups	%xmm0, (%rax)
	addq	$16, %rax
	cmpq	%rdx, %rax
	jne	.L4
	movl	%r11d, %eax
	cmpl	%r11d, %r10d
	je	.L5
.L6:
	movslq	%r9d, %rdx
	movslq	%eax, %rdi
	imulq	$1010, %rdx, %rdx
	addq	%rdx, %rdi
	movl	$1, (%rsi,%rdi,4)
	leal	1(%rax), %edi
	cmpl	%edi, %r10d
	jle	.L5
	movslq	%edi, %rdi
	addl	$2, %eax
	addq	%rdx, %rdi
	movl	$1, (%rsi,%rdi,4)
	cmpl	%eax, %r10d
	jle	.L5
	cltq
	addq	%rax, %rdx
	movl	$1, (%rsi,%rdx,4)
.L5:
	addl	$1, %r9d
	addq	$4040, %r8
	cmpl	%ecx, %r9d
	jne	.L3
.L2:
	movl	24(%rsp), %r11d
	cmpl	%ecx, %r11d
	jle	.L8
	movl	32(%rsp), %eax
	movl	28(%rsp), %r8d
	cmpl	%r8d, %eax
	jge	.L8
	movslq	%ecx, %rdx
	movslq	%eax, %rsi
	movl	%r8d, %ebx
	movdqa	.LC1(%rip), %xmm0
	imulq	$1010, %rdx, %rdx
	subl	%eax, %ebx
	movl	%ebx, %r12d
	leal	-1(%rbx), %ebp
	andl	$-4, %r12d
	addq	%rsi, %rdx
	leaq	res(%rip), %rsi
	leal	(%r12,%rax), %r9d
	leaq	(%rsi,%rdx,4), %rdi
	movl	%ebx, %edx
	shrl	$2, %edx
	subl	$1, %edx
	cmpl	$2, %ebp
	cmovbe	%eax, %r9d
	leaq	1(%rdx), %r10
	salq	$4, %r10
	leal	2(%r9), %r14d
	leal	1(%r9), %r13d
	movslq	%r9d, %r9
	movslq	%r14d, %rax
	movslq	%r13d, %r15
	movq	%rax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L12:
	cmpl	$2, %ebp
	jbe	.L9
	leaq	(%r10,%rdi), %rdx
	movq	%rdi, %rax
	.p2align 4,,10
	.p2align 3
.L10:
	movups	%xmm0, (%rax)
	addq	$16, %rax
	cmpq	%rdx, %rax
	jne	.L10
	cmpl	%r12d, %ebx
	je	.L11
.L9:
	movslq	%ecx, %rax
	imulq	$1010, %rax, %rax
	leaq	(%rax,%r9), %rdx
	movl	$1, (%rsi,%rdx,4)
	cmpl	%r8d, %r13d
	jge	.L11
	leaq	(%rax,%r15), %rdx
	movl	$1, (%rsi,%rdx,4)
	cmpl	%r14d, %r8d
	jle	.L11
	addq	8(%rsp), %rax
	movl	$1, (%rsi,%rax,4)
.L11:
	addl	$1, %ecx
	addq	$4040, %rdi
	cmpl	%r11d, %ecx
	jne	.L12
.L8:
	testl	%r11d, %r11d
	jle	.L13
	leaq	res(%rip), %rbp
	xorl	%r13d, %r13d
	leaq	.LC2(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L14:
	movl	28(%rsp), %eax
	xorl	%ebx, %ebx
	testl	%eax, %eax
	jle	.L16
	.p2align 4,,10
	.p2align 3
.L15:
	movl	0(%rbp,%rbx,4), %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__printf_chk@PLT
	cmpl	%ebx, 28(%rsp)
	jg	.L15
.L16:
	movl	$10, %edi
	addl	$1, %r13d
	addq	$4040, %rbp
	call	putchar@PLT
	cmpl	%r13d, 24(%rsp)
	jg	.L14
.L13:
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L30
	addq	$56, %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
.L29:
	.cfi_restore_state
	xorl	%eax, %eax
	jmp	.L6
.L30:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	res
	.bss
	.align 32
	.type	res, @object
	.size	res, 4080400
res:
	.zero	4080400
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.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:
```

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.
Optimized Assembly Code:

train
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d%d%d"
.LC2:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%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	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	32(%rsp), %rcx
	leaq	28(%rsp), %rdx
	leaq	24(%rsp), %rsi
	leaq	36(%rsp), %r8
	call	__isoc99_scanf@PLT
	movl	36(%rsp), %ecx
	testl	%ecx, %ecx
	jle	.L2
	movl	32(%rsp), %r10d
	testl	%r10d, %r10d
	jle	.L2
	movl	%r10d, %eax
	leaq	res(%rip), %rsi
	movl	%r10d, %r11d
	xorl	%r9d, %r9d
	shrl	$2, %eax
	movq	%rsi, %r8
	leal	-1(%r10), %ebp
	andl	$-4, %r11d
	leal	-1(%rax), %ebx
	movdqa	.LC1(%rip), %xmm0
	addq	$1, %rbx
	salq	$4, %rbx
	.p2align 4,,10
	.p2align 3
.L3:
	leaq	(%rbx,%r8), %rdx
	movq	%r8, %rax
	cmpl	$2, %ebp
	jbe	.L29
	.p2align 4,,10
	.p2align 3
.L4:
	movups	%xmm0, (%rax)
	addq	$16, %rax
	cmpq	%rdx, %rax
	jne	.L4
	movl	%r11d, %eax
	cmpl	%r11d, %r10d
	je	.L5
.L6:
	movslq	%r9d, %rdx
	movslq	%eax, %rdi
	imulq	$1010, %rdx, %rdx
	addq	%rdx, %rdi
	movl	$1, (%rsi,%rdi,4)
	leal	1(%rax), %edi
	cmpl	%edi, %r10d
	jle	.L5
	movslq	%edi, %rdi
	addl	$2, %eax
	addq	%rdx, %rdi
	movl	$1, (%rsi,%rdi,4)
	cmpl	%eax, %r10d
	jle	.L5
	cltq
	addq	%rax, %rdx
	movl	$1, (%rsi,%rdx,4)
.L5:
	addl	$1, %r9d
	addq	$4040, %r8
	cmpl	%ecx, %r9d
	jne	.L3
.L2:
	movl	24(%rsp), %r11d
	cmpl	%ecx, %r11d
	jle	.L8
	movl	32(%rsp), %eax
	movl	28(%rsp), %r8d
	cmpl	%r8d, %eax
	jge	.L8
	movslq	%ecx, %rdx
	movslq	%eax, %rsi
	movl	%r8d, %ebx
	movdqa	.LC1(%rip), %xmm0
	imulq	$1010, %rdx, %rdx
	subl	%eax, %ebx
	movl	%ebx, %r12d
	leal	-1(%rbx), %ebp
	andl	$-4, %r12d
	addq	%rsi, %rdx
	leaq	res(%rip), %rsi
	leal	(%r12,%rax), %r9d
	leaq	(%rsi,%rdx,4), %rdi
	movl	%ebx, %edx
	shrl	$2, %edx
	subl	$1, %edx
	cmpl	$2, %ebp
	cmovbe	%eax, %r9d
	leaq	1(%rdx), %r10
	salq	$4, %r10
	leal	2(%r9), %r14d
	leal	1(%r9), %r13d
	movslq	%r9d, %r9
	movslq	%r14d, %rax
	movslq	%r13d, %r15
	movq	%rax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L12:
	cmpl	$2, %ebp
	jbe	.L9
	leaq	(%r10,%rdi), %rdx
	movq	%rdi, %rax
	.p2align 4,,10
	.p2align 3
.L10:
	movups	%xmm0, (%rax)
	addq	$16, %rax
	cmpq	%rdx, %rax
	jne	.L10
	cmpl	%r12d, %ebx
	je	.L11
.L9:
	movslq	%ecx, %rax
	imulq	$1010, %rax, %rax
	leaq	(%rax,%r9), %rdx
	movl	$1, (%rsi,%rdx,4)
	cmpl	%r8d, %r13d
	jge	.L11
	leaq	(%rax,%r15), %rdx
	movl	$1, (%rsi,%rdx,4)
	cmpl	%r14d, %r8d
	jle	.L11
	addq	8(%rsp), %rax
	movl	$1, (%rsi,%rax,4)
.L11:
	addl	$1, %ecx
	addq	$4040, %rdi
	cmpl	%r11d, %ecx
	jne	.L12
.L8:
	testl	%r11d, %r11d
	jle	.L13
	leaq	res(%rip), %rbp
	xorl	%r13d, %r13d
	leaq	.LC2(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L14:
	movl	28(%rsp), %eax
	xorl	%ebx, %ebx
	testl	%eax, %eax
	jle	.L16
	.p2align 4,,10
	.p2align 3
.L15:
	movl	0(%rbp,%rbx,4), %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__printf_chk@PLT
	cmpl	%ebx, 28(%rsp)
	jg	.L15
.L16:
	movl	$10, %edi
	addl	$1, %r13d
	addq	$4040, %rbp
	call	putchar@PLT
	cmpl	%r13d, 24(%rsp)
	jg	.L14
.L13:
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L30
	addq	$56, %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
.L29:
	.cfi_restore_state
	xorl	%eax, %eax
	jmp	.L6
.L30:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	res
	.bss
	.align 32
	.type	res, @object
	.size	res, 4080400
res:
	.zero	4080400
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.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:
```