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>

int main(void){
  int i, j;

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

  for(i = 0; i < h; i++){
    for(j = 0; j < w; j++){
      if(i < b ^ j < a == 1) printf("0");
      else printf("1");
    }
    printf("\n");
  }

  return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d%d%d%d"
	.text
	.globl	main
	.type	main, @function
main:
.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	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-20(%rbp), %rsi
	leaq	-24(%rbp), %rcx
	leaq	-28(%rbp), %rdx
	leaq	-32(%rbp), %rax
	movq	%rsi, %r8
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -16(%rbp)
	jmp	.L2
.L7:
	movl	$0, -12(%rbp)
	jmp	.L3
.L6:
	movl	-20(%rbp), %eax
	cmpl	%eax, -16(%rbp)
	setl	%dl
	movl	-24(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	setl	%al
	xorl	%edx, %eax
	testb	%al, %al
	je	.L4
	movl	$48, %edi
	call	putchar@PLT
	jmp	.L5
.L4:
	movl	$49, %edi
	call	putchar@PLT
.L5:
	addl	$1, -12(%rbp)
.L3:
	movl	-28(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L6
	movl	$10, %edi
	call	putchar@PLT
	addl	$1, -16(%rbp)
.L2:
	movl	-32(%rbp), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L7
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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	"%d%d%d%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC0(%rip), %rdi
	xorl	%ebp, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	subq	$40, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	16(%rsp), %rcx
	leaq	8(%rsp), %rsi
	leaq	20(%rsp), %r8
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %edx
	testl	%edx, %edx
	jle	.L3
	.p2align 4,,10
	.p2align 3
.L2:
	movl	12(%rsp), %eax
	xorl	%ebx, %ebx
	testl	%eax, %eax
	jle	.L6
	.p2align 4,,10
	.p2align 3
.L7:
	cmpl	%ebp, 20(%rsp)
	setg	%dl
	cmpl	%ebx, 16(%rsp)
	setg	%al
	cmpb	%al, %dl
	je	.L4
	movl	$48, %edi
	addl	$1, %ebx
	call	putchar@PLT
	cmpl	12(%rsp), %ebx
	jl	.L7
.L6:
	movl	$10, %edi
	addl	$1, %ebp
	call	putchar@PLT
	cmpl	%ebp, 8(%rsp)
	jg	.L2
.L3:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L16
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	movl	$49, %edi
	addl	$1, %ebx
	call	putchar@PLT
	cmpl	%ebx, 12(%rsp)
	jg	.L7
	jmp	.L6
.L16:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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	"%d%d%d%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC0(%rip), %rdi
	xorl	%ebp, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	subq	$40, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	16(%rsp), %rcx
	leaq	8(%rsp), %rsi
	leaq	20(%rsp), %r8
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %edx
	testl	%edx, %edx
	jle	.L3
	.p2align 4,,10
	.p2align 3
.L2:
	movl	12(%rsp), %eax
	xorl	%ebx, %ebx
	testl	%eax, %eax
	jle	.L6
	.p2align 4,,10
	.p2align 3
.L7:
	cmpl	%ebp, 20(%rsp)
	setg	%dl
	cmpl	%ebx, 16(%rsp)
	setg	%al
	cmpb	%al, %dl
	je	.L4
	movl	$48, %edi
	addl	$1, %ebx
	call	putchar@PLT
	cmpl	12(%rsp), %ebx
	jl	.L7
.L6:
	movl	$10, %edi
	addl	$1, %ebp
	call	putchar@PLT
	cmpl	%ebp, 8(%rsp)
	jg	.L2
.L3:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L16
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	movl	$49, %edi
	addl	$1, %ebx
	call	putchar@PLT
	cmpl	%ebx, 12(%rsp)
	jg	.L7
	jmp	.L6
.L16:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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>

int main(void){
  int i, j;

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

  for(i = 0; i < h; i++){
    for(j = 0; j < w; j++){
      if(i < b ^ j < a == 1) printf("0");
      else printf("1");
    }
    printf("\n");
  }

  return 0;
}

3 3 0 1
 1 5 2 -1
 3 6 0 1
 1 5 4 -1
 3 10 0 1
 2 5 4 -1
 2 6 4 -1
 1 5 0 0
 3 3 0 2
 1 5 2 1

000
111
111
 00111
 000000
111111
111111
 00001
 0000000000
1111111111
1111111111
 00001
00001
 000011
000011
 11111
 000
000
111
 11000

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>

int main(void){
  int i, j;

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

  for(i = 0; i < h; i++){
    for(j = 0; j < w; j++){
      if(i < b ^ j < a == 1) printf("0");
      else printf("1");
    }
    printf("\n");
  }

  return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d%d%d%d"
	.text
	.globl	main
	.type	main, @function
main:
.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	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-20(%rbp), %rsi
	leaq	-24(%rbp), %rcx
	leaq	-28(%rbp), %rdx
	leaq	-32(%rbp), %rax
	movq	%rsi, %r8
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -16(%rbp)
	jmp	.L2
.L7:
	movl	$0, -12(%rbp)
	jmp	.L3
.L6:
	movl	-20(%rbp), %eax
	cmpl	%eax, -16(%rbp)
	setl	%dl
	movl	-24(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	setl	%al
	xorl	%edx, %eax
	testb	%al, %al
	je	.L4
	movl	$48, %edi
	call	putchar@PLT
	jmp	.L5
.L4:
	movl	$49, %edi
	call	putchar@PLT
.L5:
	addl	$1, -12(%rbp)
.L3:
	movl	-28(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L6
	movl	$10, %edi
	call	putchar@PLT
	addl	$1, -16(%rbp)
.L2:
	movl	-32(%rbp), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L7
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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	"%d%d%d%d"
	.text
	.globl	main
	.type	main, @function
main:
.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	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-20(%rbp), %rsi
	leaq	-24(%rbp), %rcx
	leaq	-28(%rbp), %rdx
	leaq	-32(%rbp), %rax
	movq	%rsi, %r8
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -16(%rbp)
	jmp	.L2
.L7:
	movl	$0, -12(%rbp)
	jmp	.L3
.L6:
	movl	-20(%rbp), %eax
	cmpl	%eax, -16(%rbp)
	setl	%dl
	movl	-24(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	setl	%al
	xorl	%edx, %eax
	testb	%al, %al
	je	.L4
	movl	$48, %edi
	call	putchar@PLT
	jmp	.L5
.L4:
	movl	$49, %edi
	call	putchar@PLT
.L5:
	addl	$1, -12(%rbp)
.L3:
	movl	-28(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L6
	movl	$10, %edi
	call	putchar@PLT
	addl	$1, -16(%rbp)
.L2:
	movl	-32(%rbp), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L7
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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:
