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

```c
main(a,b,c,p,q,r,s,i,j){for(;scanf("%d%d%d",&a,&b,&c),a;){
if(!c)a==1&&b<0?printf("1 0 %d %d\n",a,b):printf("%d %d 1 0\n",a,b);
else{
	for(r=1;r*r<=a;r++)if(a%r==0)for(p=a/r,s=1;s*s<=abs(c);s++)if(c%s==0){
		for(j=0;j<4;j++,s=c/s)for(i=0;i<2;i++,s=-s)if(q=c/s,p*s+q*r==b){
			p==r&&q<s?printf("%d %d %d %d\n",r,s,p,q):printf("%d %d %d %d\n",p,q,r,s);
			goto next;
		}
	}
	puts("Impossible");
}next:;}exit(0);}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"1 0 %d %d\n"
.LC1:
	.string	"%d %d 1 0\n"
.LC2:
	.string	"%d %d %d %d\n"
.LC3:
	.string	"Impossible"
.LC4:
	.string	"%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
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	%edx, -12(%rbp)
	movl	%ecx, -16(%rbp)
	movl	%r8d, -20(%rbp)
	movl	%r9d, -24(%rbp)
	jmp	.L2
.L20:
	movl	-12(%rbp), %eax
	testl	%eax, %eax
	jne	.L3
	movl	-4(%rbp), %eax
	cmpl	$1, %eax
	jne	.L4
	movl	-8(%rbp), %eax
	testl	%eax, %eax
	jns	.L4
	movl	-8(%rbp), %edx
	movl	-4(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L2
.L4:
	movl	-8(%rbp), %edx
	movl	-4(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L2
.L3:
	movl	$1, -24(%rbp)
	jmp	.L7
.L19:
	movl	-4(%rbp), %eax
	cltd
	idivl	-24(%rbp)
	movl	%edx, %eax
	testl	%eax, %eax
	jne	.L8
	movl	-4(%rbp), %eax
	cltd
	idivl	-24(%rbp)
	movl	%eax, -16(%rbp)
	movl	$1, 16(%rbp)
	jmp	.L9
.L18:
	movl	-12(%rbp), %eax
	cltd
	idivl	16(%rbp)
	movl	%edx, %eax
	testl	%eax, %eax
	jne	.L10
	movl	$0, 32(%rbp)
	jmp	.L11
.L17:
	movl	$0, 24(%rbp)
	jmp	.L12
.L16:
	movl	-12(%rbp), %eax
	cltd
	idivl	16(%rbp)
	movl	%eax, -20(%rbp)
	movl	-16(%rbp), %eax
	imull	16(%rbp), %eax
	movl	%eax, %edx
	movl	-20(%rbp), %eax
	imull	-24(%rbp), %eax
	addl	%eax, %edx
	movl	-8(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L13
	movl	-16(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jne	.L14
	movl	-20(%rbp), %eax
	cmpl	16(%rbp), %eax
	jge	.L14
	movl	-20(%rbp), %ecx
	movl	-16(%rbp), %edx
	movl	-24(%rbp), %eax
	movl	%ecx, %r8d
	movl	%edx, %ecx
	movl	16(%rbp), %edx
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	nop
	jmp	.L2
.L14:
	movl	-24(%rbp), %ecx
	movl	-20(%rbp), %edx
	movl	-16(%rbp), %eax
	movl	16(%rbp), %r8d
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L2
.L13:
	addl	$1, 24(%rbp)
	negl	16(%rbp)
.L12:
	cmpl	$1, 24(%rbp)
	jle	.L16
	addl	$1, 32(%rbp)
	movl	-12(%rbp), %eax
	cltd
	idivl	16(%rbp)
	movl	%eax, 16(%rbp)
.L11:
	cmpl	$3, 32(%rbp)
	jle	.L17
.L10:
	addl	$1, 16(%rbp)
.L9:
	movl	16(%rbp), %eax
	imull	%eax, %eax
	movl	%eax, %edx
	movl	-12(%rbp), %eax
	movl	%eax, %ecx
	negl	%ecx
	cmovns	%ecx, %eax
	cmpl	%eax, %edx
	jle	.L18
.L8:
	addl	$1, -24(%rbp)
.L7:
	movl	-24(%rbp), %eax
	imull	%eax, %eax
	movl	%eax, %edx
	movl	-4(%rbp), %eax
	cmpl	%eax, %edx
	jle	.L19
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L6:
.L2:
	leaq	-12(%rbp), %rcx
	leaq	-8(%rbp), %rdx
	leaq	-4(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	-4(%rbp), %eax
	testl	%eax, %eax
	jne	.L20
	movl	$0, %edi
	call	exit@PLT
	.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	"1 0 %d %d\n"
.LC1:
	.string	"%d %d 1 0\n"
.LC2:
	.string	"%d %d %d %d\n"
.LC3:
	.string	"Impossible"
.LC4:
	.string	"%d%d%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC4(%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
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	leaq	28(%rsp), %rax
	movl	%edi, 28(%rsp)
	leaq	20(%rsp), %rbp
	movl	%esi, 24(%rsp)
	leaq	24(%rsp), %rbx
	movl	%edx, 20(%rsp)
	movq	%rax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L2:
	movq	8(%rsp), %rsi
	movq	%rbp, %rcx
	movq	%rbx, %rdx
	movq	%r15, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	28(%rsp), %r8d
	testl	%r8d, %r8d
	je	.L35
	movl	20(%rsp), %ecx
	testl	%ecx, %ecx
	jne	.L36
	movl	24(%rsp), %edx
	cmpl	$1, %r8d
	jne	.L6
	testl	%edx, %edx
	js	.L37
.L6:
	movl	%r8d, %esi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	printf@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L36:
	movl	%ecx, %r12d
	movl	24(%rsp), %edi
	movl	$1, %esi
	negl	%r12d
	cmovs	%ecx, %r12d
	testl	%r8d, %r8d
	jle	.L5
.L14:
	movl	%r8d, %eax
	cltd
	idivl	%esi
	movl	%eax, %r11d
	testl	%edx, %edx
	je	.L38
.L8:
	addl	$1, %esi
	movl	%esi, %eax
	imull	%esi, %eax
	cmpl	%r8d, %eax
	jle	.L14
.L5:
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L38:
	movl	%r8d, 16(%rsp)
	movl	$1, %r9d
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L9:
	addl	$1, %r9d
	movl	%r9d, %eax
	imull	%r9d, %eax
	cmpl	%r12d, %eax
	jg	.L39
.L13:
	movl	%ecx, %eax
	cltd
	idivl	%r9d
	testl	%edx, %edx
	jne	.L9
	movl	%eax, %r10d
	movl	%r11d, %eax
	movl	%r10d, %edx
	imull	%r9d, %eax
	imull	%esi, %edx
	leal	(%rax,%rdx), %r8d
	cmpl	%edi, %r8d
	je	.L10
	negl	%eax
	movl	%r10d, %r13d
	subl	%edx, %eax
	negl	%r13d
	cmpl	%edi, %eax
	je	.L40
	movl	%ecx, %eax
	cltd
	idivl	%r10d
	movl	%r11d, %edx
	imull	%r10d, %edx
	movl	%eax, %r8d
	movl	%eax, %r9d
	imull	%esi, %r8d
	leal	(%rdx,%r8), %r14d
	cmpl	%r14d, %edi
	je	.L16
	negl	%edx
	movl	%eax, %r10d
	subl	%r8d, %edx
	negl	%r10d
	cmpl	%edi, %edx
	je	.L33
	movl	%ecx, %eax
	cltd
	idivl	%r9d
	movl	%eax, %r13d
	movl	%r11d, %eax
	movl	%r13d, %edx
	imull	%r9d, %eax
	imull	%esi, %edx
	leal	(%rax,%rdx), %r8d
	cmpl	%r8d, %edi
	je	.L18
	negl	%eax
	movl	%r13d, %r14d
	subl	%edx, %eax
	negl	%r14d
	cmpl	%edi, %eax
	je	.L19
	movl	%ecx, %eax
	cltd
	idivl	%r13d
	movl	%eax, %r9d
	movl	%r11d, %eax
	movl	%r9d, %edx
	imull	%r13d, %eax
	imull	%esi, %edx
	leal	(%rax,%rdx), %r8d
	cmpl	%r8d, %edi
	je	.L20
	negl	%eax
	subl	%edx, %eax
	cmpl	%edi, %eax
	jne	.L9
	movl	%r9d, %r10d
	movl	%r14d, %r9d
	negl	%r10d
	.p2align 4,,10
	.p2align 3
.L10:
	cmpl	%esi, %r11d
	jne	.L12
	cmpl	%r10d, %r9d
	jle	.L12
	movl	%r10d, %r8d
	movl	%r11d, %ecx
	movl	%r9d, %edx
	xorl	%eax, %eax
	leaq	.LC2(%rip), %rdi
	call	printf@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L39:
	movl	16(%rsp), %r8d
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L35:
	xorl	%edi, %edi
	call	exit@PLT
	.p2align 4,,10
	.p2align 3
.L12:
	movl	%esi, %ecx
	movl	%r9d, %r8d
	movl	%r10d, %edx
	movl	%r11d, %esi
	leaq	.LC2(%rip), %rdi
	xorl	%eax, %eax
	call	printf@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L37:
	movl	$1, %esi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	printf@PLT
	jmp	.L2
.L20:
	movl	%r9d, %r10d
.L33:
	movl	%r13d, %r9d
	jmp	.L10
.L40:
	movl	%r13d, %r10d
	negl	%r9d
	jmp	.L10
.L16:
	movl	%r10d, %r9d
	movl	%eax, %r10d
	jmp	.L10
.L18:
	movl	%r13d, %r10d
	jmp	.L10
.L19:
	movl	%r10d, %r9d
	movl	%r14d, %r10d
	jmp	.L10
	.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:

rule
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"1 0 %d %d\n"
.LC1:
	.string	"%d %d 1 0\n"
.LC2:
	.string	"%d %d %d %d\n"
.LC3:
	.string	"Impossible"
.LC4:
	.string	"%d%d%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC4(%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
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	leaq	28(%rsp), %rax
	movl	%edi, 28(%rsp)
	leaq	20(%rsp), %rbp
	movl	%esi, 24(%rsp)
	leaq	24(%rsp), %rbx
	movl	%edx, 20(%rsp)
	movq	%rax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L2:
	movq	8(%rsp), %rsi
	movq	%rbp, %rcx
	movq	%rbx, %rdx
	movq	%r15, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	28(%rsp), %r8d
	testl	%r8d, %r8d
	je	.L35
	movl	20(%rsp), %ecx
	testl	%ecx, %ecx
	jne	.L36
	movl	24(%rsp), %edx
	cmpl	$1, %r8d
	jne	.L6
	testl	%edx, %edx
	js	.L37
.L6:
	movl	%r8d, %esi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	printf@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L36:
	movl	%ecx, %r12d
	movl	24(%rsp), %edi
	movl	$1, %esi
	negl	%r12d
	cmovs	%ecx, %r12d
	testl	%r8d, %r8d
	jle	.L5
.L14:
	movl	%r8d, %eax
	cltd
	idivl	%esi
	movl	%eax, %r11d
	testl	%edx, %edx
	je	.L38
.L8:
	addl	$1, %esi
	movl	%esi, %eax
	imull	%esi, %eax
	cmpl	%r8d, %eax
	jle	.L14
.L5:
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L38:
	movl	%r8d, 16(%rsp)
	movl	$1, %r9d
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L9:
	addl	$1, %r9d
	movl	%r9d, %eax
	imull	%r9d, %eax
	cmpl	%r12d, %eax
	jg	.L39
.L13:
	movl	%ecx, %eax
	cltd
	idivl	%r9d
	testl	%edx, %edx
	jne	.L9
	movl	%eax, %r10d
	movl	%r11d, %eax
	movl	%r10d, %edx
	imull	%r9d, %eax
	imull	%esi, %edx
	leal	(%rax,%rdx), %r8d
	cmpl	%edi, %r8d
	je	.L10
	negl	%eax
	movl	%r10d, %r13d
	subl	%edx, %eax
	negl	%r13d
	cmpl	%edi, %eax
	je	.L40
	movl	%ecx, %eax
	cltd
	idivl	%r10d
	movl	%r11d, %edx
	imull	%r10d, %edx
	movl	%eax, %r8d
	movl	%eax, %r9d
	imull	%esi, %r8d
	leal	(%rdx,%r8), %r14d
	cmpl	%r14d, %edi
	je	.L16
	negl	%edx
	movl	%eax, %r10d
	subl	%r8d, %edx
	negl	%r10d
	cmpl	%edi, %edx
	je	.L33
	movl	%ecx, %eax
	cltd
	idivl	%r9d
	movl	%eax, %r13d
	movl	%r11d, %eax
	movl	%r13d, %edx
	imull	%r9d, %eax
	imull	%esi, %edx
	leal	(%rax,%rdx), %r8d
	cmpl	%r8d, %edi
	je	.L18
	negl	%eax
	movl	%r13d, %r14d
	subl	%edx, %eax
	negl	%r14d
	cmpl	%edi, %eax
	je	.L19
	movl	%ecx, %eax
	cltd
	idivl	%r13d
	movl	%eax, %r9d
	movl	%r11d, %eax
	movl	%r9d, %edx
	imull	%r13d, %eax
	imull	%esi, %edx
	leal	(%rax,%rdx), %r8d
	cmpl	%r8d, %edi
	je	.L20
	negl	%eax
	subl	%edx, %eax
	cmpl	%edi, %eax
	jne	.L9
	movl	%r9d, %r10d
	movl	%r14d, %r9d
	negl	%r10d
	.p2align 4,,10
	.p2align 3
.L10:
	cmpl	%esi, %r11d
	jne	.L12
	cmpl	%r10d, %r9d
	jle	.L12
	movl	%r10d, %r8d
	movl	%r11d, %ecx
	movl	%r9d, %edx
	xorl	%eax, %eax
	leaq	.LC2(%rip), %rdi
	call	printf@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L39:
	movl	16(%rsp), %r8d
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L35:
	xorl	%edi, %edi
	call	exit@PLT
	.p2align 4,,10
	.p2align 3
.L12:
	movl	%esi, %ecx
	movl	%r9d, %r8d
	movl	%r10d, %edx
	movl	%r11d, %esi
	leaq	.LC2(%rip), %rdi
	xorl	%eax, %eax
	call	printf@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L37:
	movl	$1, %esi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	printf@PLT
	jmp	.L2
.L20:
	movl	%r9d, %r10d
.L33:
	movl	%r13d, %r9d
	jmp	.L10
.L40:
	movl	%r13d, %r10d
	negl	%r9d
	jmp	.L10
.L16:
	movl	%r10d, %r9d
	movl	%eax, %r10d
	jmp	.L10
.L18:
	movl	%r13d, %r10d
	jmp	.L10
.L19:
	movl	%r10d, %r9d
	movl	%r14d, %r10d
	jmp	.L10
	.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:

main(a,b,c,p,q,r,s,i,j){for(;scanf("%d%d%d",&a,&b,&c),a;){
if(!c)a==1&&b<0?printf("1 0 %d %d\n",a,b):printf("%d %d 1 0\n",a,b);
else{
	for(r=1;r*r<=a;r++)if(a%r==0)for(p=a/r,s=1;s*s<=abs(c);s++)if(c%s==0){
		for(j=0;j<4;j++,s=c/s)for(i=0;i<2;i++,s=-s)if(q=c/s,p*s+q*r==b){
			p==r&&q<s?printf("%d %d %d %d\n",r,s,p,q):printf("%d %d %d %d\n",p,q,r,s);
			goto next;
		}
	}
	puts("Impossible");
}next:;}exit(0);}
2 5 4
1 1 1
10 -7 0
1 0 -3
0 0 0
 2 5 2
1 1 1
9 -7 0
1 0 -3
0 0 0
 2 5 4
1 2 1
10 -7 0
1 0 -3
0 0 0
 2 5 2
1 1 1
11 -7 0
1 0 -3
0 0 0
 2 5 4
1 2 1
10 -7 -1
1 0 -3
0 0 0
 2 5 2
1 1 1
10 -7 1
1 0 -3
0 0 0
 2 7 2
1 1 1
9 -7 0
1 0 -3
0 0 0
 2 5 4
1 2 1
10 -11 0
1 0 -3
0 0 0
 2 5 2
1 1 1
11 -10 0
1 0 -3
0 0 0
 2 5 4
1 0 1
10 -7 -1
2 0 -5
0 0 0

Impossible
Impossible
10 -7 1 0
Impossible
 2 1 1 2
Impossible
9 -7 1 0
Impossible
 Impossible
1 1 1 1
10 -7 1 0
Impossible
 2 1 1 2
Impossible
11 -7 1 0
Impossible
 Impossible
1 1 1 1
Impossible
Impossible
 2 1 1 2
Impossible
5 -1 2 -1
Impossible
 Impossible
Impossible
9 -7 1 0
Impossible
 Impossible
1 1 1 1
10 -11 1 0
Impossible
 2 1 1 2
Impossible
11 -10 1 0
Impossible
 Impossible
Impossible
Impossible
Impossible

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

```c
main(a,b,c,p,q,r,s,i,j){for(;scanf("%d%d%d",&a,&b,&c),a;){
if(!c)a==1&&b<0?printf("1 0 %d %d\n",a,b):printf("%d %d 1 0\n",a,b);
else{
	for(r=1;r*r<=a;r++)if(a%r==0)for(p=a/r,s=1;s*s<=abs(c);s++)if(c%s==0){
		for(j=0;j<4;j++,s=c/s)for(i=0;i<2;i++,s=-s)if(q=c/s,p*s+q*r==b){
			p==r&&q<s?printf("%d %d %d %d\n",r,s,p,q):printf("%d %d %d %d\n",p,q,r,s);
			goto next;
		}
	}
	puts("Impossible");
}next:;}exit(0);}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"1 0 %d %d\n"
.LC1:
	.string	"%d %d 1 0\n"
.LC2:
	.string	"%d %d %d %d\n"
.LC3:
	.string	"Impossible"
.LC4:
	.string	"%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
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	%edx, -12(%rbp)
	movl	%ecx, -16(%rbp)
	movl	%r8d, -20(%rbp)
	movl	%r9d, -24(%rbp)
	jmp	.L2
.L20:
	movl	-12(%rbp), %eax
	testl	%eax, %eax
	jne	.L3
	movl	-4(%rbp), %eax
	cmpl	$1, %eax
	jne	.L4
	movl	-8(%rbp), %eax
	testl	%eax, %eax
	jns	.L4
	movl	-8(%rbp), %edx
	movl	-4(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L2
.L4:
	movl	-8(%rbp), %edx
	movl	-4(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L2
.L3:
	movl	$1, -24(%rbp)
	jmp	.L7
.L19:
	movl	-4(%rbp), %eax
	cltd
	idivl	-24(%rbp)
	movl	%edx, %eax
	testl	%eax, %eax
	jne	.L8
	movl	-4(%rbp), %eax
	cltd
	idivl	-24(%rbp)
	movl	%eax, -16(%rbp)
	movl	$1, 16(%rbp)
	jmp	.L9
.L18:
	movl	-12(%rbp), %eax
	cltd
	idivl	16(%rbp)
	movl	%edx, %eax
	testl	%eax, %eax
	jne	.L10
	movl	$0, 32(%rbp)
	jmp	.L11
.L17:
	movl	$0, 24(%rbp)
	jmp	.L12
.L16:
	movl	-12(%rbp), %eax
	cltd
	idivl	16(%rbp)
	movl	%eax, -20(%rbp)
	movl	-16(%rbp), %eax
	imull	16(%rbp), %eax
	movl	%eax, %edx
	movl	-20(%rbp), %eax
	imull	-24(%rbp), %eax
	addl	%eax, %edx
	movl	-8(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L13
	movl	-16(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jne	.L14
	movl	-20(%rbp), %eax
	cmpl	16(%rbp), %eax
	jge	.L14
	movl	-20(%rbp), %ecx
	movl	-16(%rbp), %edx
	movl	-24(%rbp), %eax
	movl	%ecx, %r8d
	movl	%edx, %ecx
	movl	16(%rbp), %edx
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	nop
	jmp	.L2
.L14:
	movl	-24(%rbp), %ecx
	movl	-20(%rbp), %edx
	movl	-16(%rbp), %eax
	movl	16(%rbp), %r8d
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L2
.L13:
	addl	$1, 24(%rbp)
	negl	16(%rbp)
.L12:
	cmpl	$1, 24(%rbp)
	jle	.L16
	addl	$1, 32(%rbp)
	movl	-12(%rbp), %eax
	cltd
	idivl	16(%rbp)
	movl	%eax, 16(%rbp)
.L11:
	cmpl	$3, 32(%rbp)
	jle	.L17
.L10:
	addl	$1, 16(%rbp)
.L9:
	movl	16(%rbp), %eax
	imull	%eax, %eax
	movl	%eax, %edx
	movl	-12(%rbp), %eax
	movl	%eax, %ecx
	negl	%ecx
	cmovns	%ecx, %eax
	cmpl	%eax, %edx
	jle	.L18
.L8:
	addl	$1, -24(%rbp)
.L7:
	movl	-24(%rbp), %eax
	imull	%eax, %eax
	movl	%eax, %edx
	movl	-4(%rbp), %eax
	cmpl	%eax, %edx
	jle	.L19
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L6:
.L2:
	leaq	-12(%rbp), %rcx
	leaq	-8(%rbp), %rdx
	leaq	-4(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	-4(%rbp), %eax
	testl	%eax, %eax
	jne	.L20
	movl	$0, %edi
	call	exit@PLT
	.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	"1 0 %d %d\n"
.LC1:
	.string	"%d %d 1 0\n"
.LC2:
	.string	"%d %d %d %d\n"
.LC3:
	.string	"Impossible"
.LC4:
	.string	"%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
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	%edx, -12(%rbp)
	movl	%ecx, -16(%rbp)
	movl	%r8d, -20(%rbp)
	movl	%r9d, -24(%rbp)
	jmp	.L2
.L20:
	movl	-12(%rbp), %eax
	testl	%eax, %eax
	jne	.L3
	movl	-4(%rbp), %eax
	cmpl	$1, %eax
	jne	.L4
	movl	-8(%rbp), %eax
	testl	%eax, %eax
	jns	.L4
	movl	-8(%rbp), %edx
	movl	-4(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L2
.L4:
	movl	-8(%rbp), %edx
	movl	-4(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L2
.L3:
	movl	$1, -24(%rbp)
	jmp	.L7
.L19:
	movl	-4(%rbp), %eax
	cltd
	idivl	-24(%rbp)
	movl	%edx, %eax
	testl	%eax, %eax
	jne	.L8
	movl	-4(%rbp), %eax
	cltd
	idivl	-24(%rbp)
	movl	%eax, -16(%rbp)
	movl	$1, 16(%rbp)
	jmp	.L9
.L18:
	movl	-12(%rbp), %eax
	cltd
	idivl	16(%rbp)
	movl	%edx, %eax
	testl	%eax, %eax
	jne	.L10
	movl	$0, 32(%rbp)
	jmp	.L11
.L17:
	movl	$0, 24(%rbp)
	jmp	.L12
.L16:
	movl	-12(%rbp), %eax
	cltd
	idivl	16(%rbp)
	movl	%eax, -20(%rbp)
	movl	-16(%rbp), %eax
	imull	16(%rbp), %eax
	movl	%eax, %edx
	movl	-20(%rbp), %eax
	imull	-24(%rbp), %eax
	addl	%eax, %edx
	movl	-8(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L13
	movl	-16(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jne	.L14
	movl	-20(%rbp), %eax
	cmpl	16(%rbp), %eax
	jge	.L14
	movl	-20(%rbp), %ecx
	movl	-16(%rbp), %edx
	movl	-24(%rbp), %eax
	movl	%ecx, %r8d
	movl	%edx, %ecx
	movl	16(%rbp), %edx
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	nop
	jmp	.L2
.L14:
	movl	-24(%rbp), %ecx
	movl	-20(%rbp), %edx
	movl	-16(%rbp), %eax
	movl	16(%rbp), %r8d
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L2
.L13:
	addl	$1, 24(%rbp)
	negl	16(%rbp)
.L12:
	cmpl	$1, 24(%rbp)
	jle	.L16
	addl	$1, 32(%rbp)
	movl	-12(%rbp), %eax
	cltd
	idivl	16(%rbp)
	movl	%eax, 16(%rbp)
.L11:
	cmpl	$3, 32(%rbp)
	jle	.L17
.L10:
	addl	$1, 16(%rbp)
.L9:
	movl	16(%rbp), %eax
	imull	%eax, %eax
	movl	%eax, %edx
	movl	-12(%rbp), %eax
	movl	%eax, %ecx
	negl	%ecx
	cmovns	%ecx, %eax
	cmpl	%eax, %edx
	jle	.L18
.L8:
	addl	$1, -24(%rbp)
.L7:
	movl	-24(%rbp), %eax
	imull	%eax, %eax
	movl	%eax, %edx
	movl	-4(%rbp), %eax
	cmpl	%eax, %edx
	jle	.L19
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L6:
.L2:
	leaq	-12(%rbp), %rcx
	leaq	-8(%rbp), %rdx
	leaq	-4(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	-4(%rbp), %eax
	testl	%eax, %eax
	jne	.L20
	movl	$0, %edi
	call	exit@PLT
	.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:
