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>

main()
{
  for (;;) {
    int r, w, col, row;
    
    scanf("%d%d%d%d", &r, &w, &col, &row);
    if (r == 0 && w == 0 && col == 0 && row == 0) break ;
    
    if (w * col <= r)
      puts("0");
    else
      printf("%d\n", (w * col - r) / row + !!((w * col - r) % row));
  }  

  return EXIT_SUCCESS;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d%d%d%d"
.LC1:
	.string	"0"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.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
.L6:
	leaq	-12(%rbp), %rsi
	leaq	-16(%rbp), %rcx
	leaq	-20(%rbp), %rdx
	leaq	-24(%rbp), %rax
	movq	%rsi, %r8
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-24(%rbp), %eax
	testl	%eax, %eax
	jne	.L2
	movl	-20(%rbp), %eax
	testl	%eax, %eax
	jne	.L2
	movl	-16(%rbp), %eax
	testl	%eax, %eax
	jne	.L2
	movl	-12(%rbp), %eax
	testl	%eax, %eax
	jne	.L2
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L7
	jmp	.L8
.L2:
	movl	-20(%rbp), %edx
	movl	-16(%rbp), %eax
	imull	%eax, %edx
	movl	-24(%rbp), %eax
	cmpl	%eax, %edx
	jg	.L4
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L6
.L4:
	movl	-20(%rbp), %edx
	movl	-16(%rbp), %eax
	imull	%edx, %eax
	movl	-24(%rbp), %edx
	subl	%edx, %eax
	movl	-12(%rbp), %edi
	cltd
	idivl	%edi
	movl	%eax, %esi
	movl	-20(%rbp), %edx
	movl	-16(%rbp), %eax
	imull	%edx, %eax
	movl	-24(%rbp), %edx
	subl	%edx, %eax
	movl	-12(%rbp), %ecx
	cltd
	idivl	%ecx
	movl	%edx, %eax
	testl	%eax, %eax
	setne	%al
	movzbl	%al, %eax
	addl	%esi, %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L6
.L8:
	call	__stack_chk_fail@PLT
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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"
.LC1:
	.string	"0"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC1(%rip), %r15
	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
	leaq	.LC0(%rip), %rbx
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	20(%rsp), %r14
	leaq	16(%rsp), %r13
	leaq	12(%rsp), %r12
	leaq	8(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%r13, %rcx
	movq	%r12, %rdx
	xorl	%eax, %eax
	movq	%r14, %r8
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %edx
	movl	12(%rsp), %eax
	movl	%edx, %ecx
	orl	%eax, %ecx
	jne	.L2
	movl	16(%rsp), %eax
	orl	20(%rsp), %eax
	je	.L11
.L4:
	movq	%r15, %rdi
	call	puts@PLT
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L2:
	imull	16(%rsp), %eax
	cmpl	%eax, %edx
	jge	.L4
	subl	%edx, %eax
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	cltd
	idivl	20(%rsp)
	cmpl	$1, %edx
	sbbl	$-1, %eax
	movl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L11:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L12
	addq	$40, %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
.L12:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.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"
.LC1:
	.string	"0"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC1(%rip), %r15
	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
	leaq	.LC0(%rip), %rbx
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	20(%rsp), %r14
	leaq	16(%rsp), %r13
	leaq	12(%rsp), %r12
	leaq	8(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%r13, %rcx
	movq	%r12, %rdx
	xorl	%eax, %eax
	movq	%r14, %r8
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %edx
	movl	12(%rsp), %eax
	movl	%edx, %ecx
	orl	%eax, %ecx
	jne	.L2
	movl	16(%rsp), %eax
	orl	20(%rsp), %eax
	je	.L11
.L4:
	movq	%r15, %rdi
	call	puts@PLT
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L2:
	imull	16(%rsp), %eax
	cmpl	%eax, %edx
	jge	.L4
	subl	%edx, %eax
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	cltd
	idivl	20(%rsp)
	cmpl	$1, %edx
	sbbl	$-1, %eax
	movl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L11:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L12
	addq	$40, %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
.L12:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.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>
#include <stdlib.h>

main()
{
  for (;;) {
    int r, w, col, row;
    
    scanf("%d%d%d%d", &r, &w, &col, &row);
    if (r == 0 && w == 0 && col == 0 && row == 0) break ;
    
    if (w * col <= r)
      puts("0");
    else
      printf("%d\n", (w * col - r) / row + !!((w * col - r) % row));
  }  

  return EXIT_SUCCESS;
}
10 5 3 4
2 5 2 3
150 13 7 62
10 1 3 5
20 100 2 20
2 14 7 1
0 0 0 0
 10 5 3 4
1 5 2 3
150 13 7 62
10 1 3 5
20 100 3 20
2 14 7 1
0 0 0 0
 10 5 3 1
2 5 2 3
150 13 7 62
10 1 3 5
20 100 2 20
2 14 7 1
0 0 0 0
 10 5 3 4
1 6 2 3
150 13 7 62
10 1 3 5
20 100 3 20
2 14 7 1
0 0 0 0
 10 5 3 1
2 3 2 3
150 13 7 62
10 1 3 5
35 100 2 20
2 14 7 1
0 0 0 0
 18 5 3 4
1 5 2 4
150 13 7 62
10 1 1 5
20 100 2 20
2 14 7 1
0 0 0 0
 10 3 3 1
2 3 2 3
150 13 7 105
10 2 3 5
35 101 2 20
2 14 7 1
0 0 0 0
 10 5 3 4
1 5 2 3
150 13 7 62
10 1 3 5
20 100 3 20
2 14 3 1
0 0 0 0
 10 5 3 4
1 5 2 4
150 13 7 62
10 1 3 5
20 100 2 20
2 14 10 1
0 0 0 0
 10 5 3 4
1 6 2 3
150 13 7 62
10 1 3 5
20 100 3 20
2 14 13 1
0 0 0 0

2
3
0
0
9
96
 2
3
0
0
14
96
 5
3
0
0
9
96
 2
4
0
0
14
96
 5
2
0
0
9
96
 0
3
0
0
9
96
 0
2
0
0
9
96
 2
3
0
0
14
40
 2
3
0
0
9
138
 2
4
0
0
14
180

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>

main()
{
  for (;;) {
    int r, w, col, row;
    
    scanf("%d%d%d%d", &r, &w, &col, &row);
    if (r == 0 && w == 0 && col == 0 && row == 0) break ;
    
    if (w * col <= r)
      puts("0");
    else
      printf("%d\n", (w * col - r) / row + !!((w * col - r) % row));
  }  

  return EXIT_SUCCESS;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d%d%d%d"
.LC1:
	.string	"0"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.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
.L6:
	leaq	-12(%rbp), %rsi
	leaq	-16(%rbp), %rcx
	leaq	-20(%rbp), %rdx
	leaq	-24(%rbp), %rax
	movq	%rsi, %r8
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-24(%rbp), %eax
	testl	%eax, %eax
	jne	.L2
	movl	-20(%rbp), %eax
	testl	%eax, %eax
	jne	.L2
	movl	-16(%rbp), %eax
	testl	%eax, %eax
	jne	.L2
	movl	-12(%rbp), %eax
	testl	%eax, %eax
	jne	.L2
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L7
	jmp	.L8
.L2:
	movl	-20(%rbp), %edx
	movl	-16(%rbp), %eax
	imull	%eax, %edx
	movl	-24(%rbp), %eax
	cmpl	%eax, %edx
	jg	.L4
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L6
.L4:
	movl	-20(%rbp), %edx
	movl	-16(%rbp), %eax
	imull	%edx, %eax
	movl	-24(%rbp), %edx
	subl	%edx, %eax
	movl	-12(%rbp), %edi
	cltd
	idivl	%edi
	movl	%eax, %esi
	movl	-20(%rbp), %edx
	movl	-16(%rbp), %eax
	imull	%edx, %eax
	movl	-24(%rbp), %edx
	subl	%edx, %eax
	movl	-12(%rbp), %ecx
	cltd
	idivl	%ecx
	movl	%edx, %eax
	testl	%eax, %eax
	setne	%al
	movzbl	%al, %eax
	addl	%esi, %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L6
.L8:
	call	__stack_chk_fail@PLT
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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"
.LC1:
	.string	"0"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.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
.L6:
	leaq	-12(%rbp), %rsi
	leaq	-16(%rbp), %rcx
	leaq	-20(%rbp), %rdx
	leaq	-24(%rbp), %rax
	movq	%rsi, %r8
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-24(%rbp), %eax
	testl	%eax, %eax
	jne	.L2
	movl	-20(%rbp), %eax
	testl	%eax, %eax
	jne	.L2
	movl	-16(%rbp), %eax
	testl	%eax, %eax
	jne	.L2
	movl	-12(%rbp), %eax
	testl	%eax, %eax
	jne	.L2
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L7
	jmp	.L8
.L2:
	movl	-20(%rbp), %edx
	movl	-16(%rbp), %eax
	imull	%eax, %edx
	movl	-24(%rbp), %eax
	cmpl	%eax, %edx
	jg	.L4
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L6
.L4:
	movl	-20(%rbp), %edx
	movl	-16(%rbp), %eax
	imull	%edx, %eax
	movl	-24(%rbp), %edx
	subl	%edx, %eax
	movl	-12(%rbp), %edi
	cltd
	idivl	%edi
	movl	%eax, %esi
	movl	-20(%rbp), %edx
	movl	-16(%rbp), %eax
	imull	%edx, %eax
	movl	-24(%rbp), %edx
	subl	%edx, %eax
	movl	-12(%rbp), %ecx
	cltd
	idivl	%ecx
	movl	%edx, %eax
	testl	%eax, %eax
	setne	%al
	movzbl	%al, %eax
	addl	%esi, %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L6
.L8:
	call	__stack_chk_fail@PLT
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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:
