	.file	"47808.c"
	.intel_syntax noprefix
	.text
	.globl	gcd
	.type	gcd, @function
gcd:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	QWORD PTR -16[rbp], rsi
	cmp	QWORD PTR -16[rbp], 0
	jne	.L2
	mov	rax, QWORD PTR -8[rbp]
	jmp	.L3
.L2:
	mov	rax, QWORD PTR -8[rbp]
	cqo
	idiv	QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	gcd
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	gcd, .-gcd
	.globl	lcm
	.type	lcm, @function
lcm:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 24
	.cfi_offset 3, -24
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	rax, QWORD PTR -24[rbp]
	imul	rax, QWORD PTR -32[rbp]
	mov	rbx, rax
	mov	rdx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	gcd
	mov	rcx, rax
	mov	rax, rbx
	cqo
	idiv	rcx
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	lcm, .-lcm
	.section	.rodata
.LC0:
	.string	"%lld"
.LC1:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 4064
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -4064[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	jmp	.L7
.L15:
	lea	rax, -4056[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	QWORD PTR -4040[rbp], 0
	jmp	.L8
.L9:
	lea	rdx, -4016[rbp]
	mov	rax, QWORD PTR -4040[rbp]
	sal	rax, 3
	add	rax, rdx
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	add	QWORD PTR -4040[rbp], 1
.L8:
	mov	rax, QWORD PTR -4056[rbp]
	cmp	QWORD PTR -4040[rbp], rax
	jl	.L9
	mov	rdx, QWORD PTR -4008[rbp]
	mov	rax, QWORD PTR -4016[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	lcm
	mov	QWORD PTR -4048[rbp], rax
	mov	QWORD PTR -4040[rbp], 1
	jmp	.L10
.L14:
	mov	QWORD PTR -4032[rbp], 0
	jmp	.L11
.L13:
	mov	rax, QWORD PTR -4032[rbp]
	mov	rdx, QWORD PTR -4016[rbp+rax*8]
	mov	rax, QWORD PTR -4040[rbp]
	mov	rax, QWORD PTR -4016[rbp+rax*8]
	mov	rsi, rdx
	mov	rdi, rax
	call	lcm
	mov	QWORD PTR -4024[rbp], rax
	mov	rax, QWORD PTR -4024[rbp]
	cmp	rax, QWORD PTR -4048[rbp]
	jge	.L12
	mov	rax, QWORD PTR -4024[rbp]
	mov	QWORD PTR -4048[rbp], rax
.L12:
	add	QWORD PTR -4032[rbp], 1
.L11:
	mov	rax, QWORD PTR -4032[rbp]
	cmp	rax, QWORD PTR -4040[rbp]
	jl	.L13
	add	QWORD PTR -4040[rbp], 1
.L10:
	mov	rax, QWORD PTR -4056[rbp]
	cmp	QWORD PTR -4040[rbp], rax
	jl	.L14
	mov	rax, QWORD PTR -4048[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
.L7:
	mov	rax, QWORD PTR -4064[rbp]
	lea	rdx, -1[rax]
	mov	QWORD PTR -4064[rbp], rdx
	test	rax, rax
	jne	.L15
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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	"47808.c"
	.text
	.global	__aeabi_ldivmod
	.align	2
	.global	gcd
	.syntax unified
	.arm
	.fpu softvfp
	.type	gcd, %function
gcd:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-12]
	str	r1, [fp, #-8]
	str	r2, [fp, #-20]
	str	r3, [fp, #-16]
	sub	r3, fp, #20
	ldmia	r3, {r2-r3}
	orrs	r3, r2, r3
	bne	.L2
	sub	r3, fp, #12
	ldmia	r3, {r2-r3}
	b	.L3
.L2:
	sub	r1, fp, #12
	ldmia	r1, {r0-r1}
	sub	r3, fp, #20
	ldmia	r3, {r2-r3}
	bl	__aeabi_ldivmod
	sub	r1, fp, #20
	ldmia	r1, {r0-r1}
	bl	gcd
	mov	r2, r0
	mov	r3, r1
.L3:
	mov	r0, r2
	mov	r1, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	gcd, .-gcd
	.align	2
	.global	lcm
	.syntax unified
	.arm
	.fpu softvfp
	.type	lcm, %function
lcm:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #16
	str	r0, [fp, #-20]
	str	r1, [fp, #-16]
	str	r2, [fp, #-28]
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-28]
	mul	r2, r3, r2
	ldr	r3, [fp, #-24]
	ldr	r1, [fp, #-20]
	mul	r3, r1, r3
	add	r3, r2, r3
	ldr	r1, [fp, #-20]
	ldr	r2, [fp, #-28]
	umull	r4, r5, r1, r2
	add	r3, r3, r5
	mov	r5, r3
	sub	r3, fp, #28
	ldmia	r3, {r2-r3}
	sub	r1, fp, #20
	ldmia	r1, {r0-r1}
	bl	gcd
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_ldivmod
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
	.size	lcm, .-lcm
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%lld\000"
	.align	2
.LC1:
	.ascii	"%lld\012\000"
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 4072
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, fp, lr}
	add	fp, sp, #28
	sub	sp, sp, #4064
	sub	sp, sp, #8
	ldr	r3, .L18
	ldr	r3, [r3]
	str	r3, [fp, #-32]
	mov	r3,#0
	sub	r3, fp, #4080
	sub	r3, r3, #12
	mov	r1, r3
	ldr	r0, .L18+4
	bl	__isoc99_scanf
	b	.L7
.L15:
	sub	r3, fp, #4064
	sub	r3, r3, #12
	sub	r3, r3, #8
	mov	r1, r3
	ldr	r0, .L18+4
	bl	__isoc99_scanf
	mov	r2, #0
	mov	r3, #0
	str	r2, [fp, #-4068]
	str	r3, [fp, #-4064]
	b	.L8
.L9:
	sub	r2, fp, #4032
	sub	r2, r2, #12
	ldr	r3, [fp, #-4068]
	lsl	r3, r3, #3
	add	r3, r2, r3
	mov	r1, r3
	ldr	r0, .L18+4
	bl	__isoc99_scanf
	ldr	r2, [fp, #-4068]
	ldr	r3, [fp, #-4064]
	adds	r6, r2, #1
	adc	r7, r3, #0
	str	r6, [fp, #-4068]
	str	r7, [fp, #-4064]
.L8:
	ldr	r2, [fp, #-4084]
	ldr	r3, [fp, #-4080]
	ldr	r0, [fp, #-4068]
	ldr	r1, [fp, #-4064]
	cmp	r0, r2
	sbcs	r3, r1, r3
	blt	.L9
	ldr	r0, [fp, #-4044]
	ldr	r1, [fp, #-4040]
	ldr	r2, [fp, #-4036]
	ldr	r3, [fp, #-4032]
	bl	lcm
	str	r0, [fp, #-4076]
	str	r1, [fp, #-4072]
	mov	r2, #1
	mov	r3, #0
	str	r2, [fp, #-4068]
	str	r3, [fp, #-4064]
	b	.L10
.L14:
	mov	r2, #0
	mov	r3, #0
	str	r2, [fp, #-4060]
	str	r3, [fp, #-4056]
	b	.L11
.L13:
	ldr	r3, [fp, #-4068]
	lsl	r3, r3, #3
	sub	r2, fp, #28
	add	r3, r2, r3
	sub	r3, r3, #4016
	ldmia	r3, {r0-r1}
	ldr	r3, [fp, #-4060]
	lsl	r3, r3, #3
	sub	r2, fp, #28
	add	r3, r2, r3
	sub	r3, r3, #4016
	ldmia	r3, {r2-r3}
	bl	lcm
	str	r0, [fp, #-4052]
	str	r1, [fp, #-4048]
	ldr	r0, [fp, #-4052]
	ldr	r1, [fp, #-4048]
	ldr	r2, [fp, #-4076]
	ldr	r3, [fp, #-4072]
	cmp	r0, r2
	sbcs	r3, r1, r3
	bge	.L12
	ldr	r2, [fp, #-4052]
	ldr	r3, [fp, #-4048]
	str	r2, [fp, #-4076]
	str	r3, [fp, #-4072]
.L12:
	ldr	r2, [fp, #-4060]
	ldr	r3, [fp, #-4056]
	adds	r8, r2, #1
	adc	r9, r3, #0
	str	r8, [fp, #-4060]
	str	r9, [fp, #-4056]
.L11:
	ldr	r0, [fp, #-4060]
	ldr	r1, [fp, #-4056]
	ldr	r2, [fp, #-4068]
	ldr	r3, [fp, #-4064]
	cmp	r0, r2
	sbcs	r3, r1, r3
	blt	.L13
	ldr	r2, [fp, #-4068]
	ldr	r3, [fp, #-4064]
	adds	r1, r2, #1
	sub	r0, fp, #4096
	sub	r0, r0, #4
	str	r1, [r0]
	adc	r3, r3, #0
	sub	r2, fp, #4096
	str	r3, [r2]
	sub	r3, fp, #4096
	sub	r3, r3, #4
	ldmia	r3, {r2-r3}
	str	r2, [fp, #-4068]
	str	r3, [fp, #-4064]
.L10:
	ldr	r2, [fp, #-4084]
	ldr	r3, [fp, #-4080]
	ldr	r0, [fp, #-4068]
	ldr	r1, [fp, #-4064]
	cmp	r0, r2
	sbcs	r3, r1, r3
	blt	.L14
	ldr	r2, [fp, #-4076]
	ldr	r3, [fp, #-4072]
	ldr	r0, .L18+8
	bl	printf
.L7:
	ldr	r2, [fp, #-4092]
	ldr	r3, [fp, #-4088]
	subs	r4, r2, #1
	sbc	r5, r3, #0
	str	r4, [fp, #-4092]
	str	r5, [fp, #-4088]
	orrs	r3, r2, r3
	bne	.L15
	mov	r3, #0
	ldr	r2, .L18
	ldr	r1, [r2]
	ldr	r2, [fp, #-32]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L17
	bl	__stack_chk_fail
.L17:
	mov	r0, r3
	sub	sp, fp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, fp, pc}
.L19:
	.align	2
.L18:
	.word	.LC2
	.word	.LC0
	.word	.LC1
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
