	.file	"629515.c"
	.intel_syntax noprefix
	.text
	.globl	k
	.bss
	.align 8
	.type	k, @object
	.size	k, 8
k:
	.zero	8
	.globl	t
	.align 8
	.type	t, @object
	.size	t, 8
t:
	.zero	8
	.globl	d
	.align 8
	.type	d, @object
	.size	d, 8
d:
	.zero	8
	.text
	.globl	extended_gcd
	.type	extended_gcd, @function
extended_gcd:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	cmp	QWORD PTR -32[rbp], 0
	jne	.L2
	mov	QWORD PTR k[rip], 1
	mov	QWORD PTR t[rip], 0
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR d[rip], rax
	mov	rax, QWORD PTR -24[rbp]
	jmp	.L3
.L2:
	mov	rax, QWORD PTR -24[rbp]
	cqo
	idiv	QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -32[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	extended_gcd
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR k[rip]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR t[rip]
	mov	QWORD PTR k[rip], rax
	mov	rax, QWORD PTR -24[rbp]
	cqo
	idiv	QWORD PTR -32[rbp]
	mov	rdx, rax
	mov	rax, QWORD PTR t[rip]
	imul	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, rdx
	mov	QWORD PTR t[rip], rax
	mov	rax, QWORD PTR -16[rbp]
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	extended_gcd, .-extended_gcd
	.section	.rodata
.LC0:
	.string	"%lld %lld %lld %lld %lld"
.LC1:
	.string	"Impossible"
.LC2:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdi, -32[rbp]
	lea	rsi, -40[rbp]
	lea	rcx, -48[rbp]
	lea	rdx, -56[rbp]
	lea	rax, -64[rbp]
	mov	r9, rdi
	mov	r8, rsi
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	rax, QWORD PTR -48[rbp]
	mov	rdx, QWORD PTR -40[rbp]
	sub	rax, rdx
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -56[rbp]
	mov	rdx, QWORD PTR -64[rbp]
	sub	rax, rdx
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -24[rbp], 0
	jns	.L5
	neg	QWORD PTR -24[rbp]
	neg	QWORD PTR -16[rbp]
.L5:
	mov	rdx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	extended_gcd
	mov	rcx, QWORD PTR d[rip]
	mov	rax, QWORD PTR -16[rbp]
	cqo
	idiv	rcx
	mov	rax, rdx
	test	rax, rax
	je	.L6
	lea	rdi, .LC1[rip]
	call	puts@PLT
	jmp	.L7
.L6:
	mov	rax, QWORD PTR k[rip]
	imul	rax, QWORD PTR -16[rbp]
	mov	rsi, QWORD PTR d[rip]
	cqo
	idiv	rsi
	mov	QWORD PTR k[rip], rax
	mov	rax, QWORD PTR t[rip]
	imul	rax, QWORD PTR -16[rbp]
	mov	rdi, QWORD PTR d[rip]
	cqo
	idiv	rdi
	mov	QWORD PTR t[rip], rax
	mov	rax, QWORD PTR -32[rbp]
	mov	rsi, QWORD PTR d[rip]
	cqo
	idiv	rsi
	mov	QWORD PTR -32[rbp], rax
	mov	rax, QWORD PTR k[rip]
	test	rax, rax
	js	.L8
	mov	rax, QWORD PTR k[rip]
	mov	rcx, QWORD PTR -32[rbp]
	cqo
	idiv	rcx
	mov	rax, rdx
	mov	QWORD PTR k[rip], rax
	jmp	.L9
.L8:
	mov	rax, QWORD PTR k[rip]
	mov	rcx, QWORD PTR -32[rbp]
	cqo
	idiv	rcx
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	QWORD PTR k[rip], rax
.L9:
	mov	rax, QWORD PTR k[rip]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
.L7:
	mov	eax, 0
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"629515.c"
	.text
	.comm	k,8,8
	.comm	t,8,8
	.comm	d,8,8
	.global	__aeabi_ldivmod
	.align	2
	.global	extended_gcd
	.syntax unified
	.arm
	.fpu softvfp
	.type	extended_gcd, %function
extended_gcd:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, fp, lr}
	add	fp, sp, #20
	sub	sp, sp, #32
	str	r0, [fp, #-44]
	str	r1, [fp, #-40]
	str	r2, [fp, #-52]
	str	r3, [fp, #-48]
	sub	r3, fp, #52
	ldmia	r3, {r2-r3}
	orrs	r3, r2, r3
	bne	.L2
	ldr	r1, .L4
	mov	r2, #1
	mov	r3, #0
	stm	r1, {r2-r3}
	ldr	r1, .L4+4
	mov	r2, #0
	mov	r3, #0
	stm	r1, {r2-r3}
	ldr	r1, .L4+8
	sub	r3, fp, #44
	ldmia	r3, {r2-r3}
	stm	r1, {r2-r3}
	sub	r3, fp, #44
	ldmia	r3, {r2-r3}
	b	.L3
.L2:
	sub	r1, fp, #44
	ldmia	r1, {r0-r1}
	sub	r3, fp, #52
	ldmia	r3, {r2-r3}
	bl	__aeabi_ldivmod
	sub	r1, fp, #52
	ldmia	r1, {r0-r1}
	bl	extended_gcd
	str	r0, [fp, #-36]
	str	r1, [fp, #-32]
	ldr	r3, .L4
	ldmia	r3, {r2-r3}
	str	r2, [fp, #-28]
	str	r3, [fp, #-24]
	ldr	r3, .L4+4
	ldmia	r3, {r2-r3}
	ldr	r1, .L4
	stm	r1, {r2-r3}
	sub	r3, fp, #52
	ldmia	r3, {r2-r3}
	sub	r1, fp, #44
	ldmia	r1, {r0-r1}
	bl	__aeabi_ldivmod
	mov	r2, r0
	mov	r3, r1
	mov	r4, r2
	mov	r5, r3
	ldr	r3, .L4+4
	ldmia	r3, {r0-r1}
	mul	r2, r0, r5
	mul	r3, r4, r1
	add	ip, r2, r3
	umull	r2, r3, r4, r0
	add	r1, ip, r3
	mov	r3, r1
	sub	r1, fp, #28
	ldmia	r1, {r0-r1}
	subs	r6, r0, r2
	sbc	r7, r1, r3
	ldr	r3, .L4+4
	stm	r3, {r6-r7}
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
.L3:
	mov	r0, r2
	mov	r1, r3
	sub	sp, fp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, fp, pc}
.L5:
	.align	2
.L4:
	.word	k
	.word	t
	.word	d
	.size	extended_gcd, .-extended_gcd
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%lld %lld %lld %lld %lld\000"
	.align	2
.LC1:
	.ascii	"Impossible\000"
	.align	2
.LC2:
	.ascii	"%lld\012\000"
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 64
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, fp, lr}
	add	fp, sp, #28
	sub	sp, sp, #72
	ldr	r3, .L14
	ldr	r3, [r3]
	str	r3, [fp, #-32]
	mov	r3,#0
	sub	r0, fp, #76
	sub	r2, fp, #84
	sub	r1, fp, #92
	sub	r3, fp, #60
	str	r3, [sp, #4]
	sub	r3, fp, #68
	str	r3, [sp]
	mov	r3, r0
	ldr	r0, .L14+4
	bl	__isoc99_scanf
	sub	r1, fp, #76
	ldmia	r1, {r0-r1}
	sub	r3, fp, #68
	ldmia	r3, {r2-r3}
	subs	r8, r0, r2
	sbc	r9, r1, r3
	str	r8, [fp, #-52]
	str	r9, [fp, #-48]
	sub	r1, fp, #84
	ldmia	r1, {r0-r1}
	sub	r3, fp, #92
	ldmia	r3, {r2-r3}
	subs	r6, r0, r2
	sbc	r7, r1, r3
	str	r6, [fp, #-44]
	str	r7, [fp, #-40]
	sub	r3, fp, #52
	ldmia	r3, {r2-r3}
	cmp	r2, #0
	sbcs	r3, r3, #0
	bge	.L7
	sub	r3, fp, #52
	ldmia	r3, {r2-r3}
	rsbs	r2, r2, #0
	rsc	r3, r3, #0
	str	r2, [fp, #-52]
	str	r3, [fp, #-48]
	sub	r3, fp, #44
	ldmia	r3, {r2-r3}
	rsbs	r2, r2, #0
	rsc	r3, r3, #0
	str	r2, [fp, #-44]
	str	r3, [fp, #-40]
.L7:
	sub	r3, fp, #60
	ldmia	r3, {r2-r3}
	sub	r1, fp, #52
	ldmia	r1, {r0-r1}
	bl	extended_gcd
	ldr	r3, .L14+8
	ldmia	r3, {r2-r3}
	sub	r1, fp, #44
	ldmia	r1, {r0-r1}
	bl	__aeabi_ldivmod
	orrs	r3, r2, r3
	beq	.L8
	ldr	r0, .L14+12
	bl	puts
	b	.L9
.L8:
	ldr	r3, .L14+16
	ldmia	r3, {r2-r3}
	ldr	r1, [fp, #-44]
	mul	r0, r3, r1
	ldr	r1, [fp, #-40]
	mul	r1, r2, r1
	add	ip, r0, r1
	ldr	lr, [fp, #-44]
	umull	r0, r1, lr, r2
	add	r3, ip, r1
	mov	r1, r3
	ldr	r3, .L14+8
	ldmia	r3, {r2-r3}
	bl	__aeabi_ldivmod
	mov	r2, r0
	mov	r3, r1
	ldr	r1, .L14+16
	stm	r1, {r2-r3}
	ldr	r3, .L14+20
	ldmia	r3, {r2-r3}
	ldr	r1, [fp, #-44]
	mul	r0, r3, r1
	ldr	r1, [fp, #-40]
	mul	r1, r2, r1
	add	ip, r0, r1
	ldr	lr, [fp, #-44]
	umull	r0, r1, lr, r2
	add	r3, ip, r1
	mov	r1, r3
	ldr	r3, .L14+8
	ldmia	r3, {r2-r3}
	bl	__aeabi_ldivmod
	mov	r2, r0
	mov	r3, r1
	ldr	r1, .L14+20
	stm	r1, {r2-r3}
	sub	r1, fp, #60
	ldmia	r1, {r0-r1}
	ldr	r3, .L14+8
	ldmia	r3, {r2-r3}
	bl	__aeabi_ldivmod
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-60]
	str	r3, [fp, #-56]
	ldr	r3, .L14+16
	ldmia	r3, {r2-r3}
	cmp	r2, #0
	sbcs	r3, r3, #0
	blt	.L10
	ldr	r3, .L14+16
	ldmia	r3, {r0-r1}
	sub	r3, fp, #60
	ldmia	r3, {r2-r3}
	bl	__aeabi_ldivmod
	ldr	r1, .L14+16
	stm	r1, {r2-r3}
	b	.L11
.L10:
	ldr	r3, .L14+16
	ldmia	r3, {r0-r1}
	sub	r3, fp, #60
	ldmia	r3, {r2-r3}
	bl	__aeabi_ldivmod
	mov	r0, r2
	mov	r1, r3
	sub	r3, fp, #60
	ldmia	r3, {r2-r3}
	adds	r4, r0, r2
	adc	r5, r1, r3
	ldr	r3, .L14+16
	stm	r3, {r4-r5}
.L11:
	ldr	r3, .L14+16
	ldmia	r3, {r2-r3}
	ldr	r0, .L14+24
	bl	printf
.L9:
	mov	r3, #0
	ldr	r2, .L14
	ldr	r1, [r2]
	ldr	r2, [fp, #-32]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L13
	bl	__stack_chk_fail
.L13:
	mov	r0, r3
	sub	sp, fp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, fp, pc}
.L15:
	.align	2
.L14:
	.word	.LC3
	.word	.LC0
	.word	d
	.word	.LC1
	.word	k
	.word	t
	.word	.LC2
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
