	.file	"84099.c"
	.intel_syntax noprefix
	.text
	.globl	gcd
	.type	gcd, @function
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, 16
	mov	DWORD PTR -4[rbp], edi
	mov	DWORD PTR -8[rbp], esi
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -8[rbp]
	jge	.L2
	mov	edx, DWORD PTR -4[rbp]
	mov	eax, DWORD PTR -8[rbp]
	mov	esi, edx
	mov	edi, eax
	call	gcd
.L2:
	mov	eax, DWORD PTR -4[rbp]
	cdq
	idiv	DWORD PTR -8[rbp]
	mov	eax, edx
	test	eax, eax
	je	.L3
	mov	eax, DWORD PTR -4[rbp]
	cdq
	idiv	DWORD PTR -8[rbp]
	mov	eax, DWORD PTR -8[rbp]
	mov	esi, edx
	mov	edi, eax
	call	gcd
	jmp	.L1
.L3:
	mov	eax, DWORD PTR -8[rbp]
.L1:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	gcd, .-gcd
	.globl	rotate
	.type	rotate, @function
rotate:
.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, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	DWORD PTR -44[rbp], esi
	mov	DWORD PTR -48[rbp], edx
	mov	eax, DWORD PTR -48[rbp]
	cmp	eax, DWORD PTR -44[rbp]
	jle	.L7
	mov	eax, DWORD PTR -48[rbp]
	cdq
	idiv	DWORD PTR -44[rbp]
	mov	DWORD PTR -48[rbp], edx
.L7:
	cmp	DWORD PTR -48[rbp], 0
	je	.L14
	mov	edx, DWORD PTR -48[rbp]
	mov	eax, DWORD PTR -44[rbp]
	mov	esi, edx
	mov	edi, eax
	call	gcd
	mov	DWORD PTR -20[rbp], eax
	mov	eax, DWORD PTR -44[rbp]
	cdq
	idiv	DWORD PTR -20[rbp]
	imul	eax, DWORD PTR -20[rbp]
	mov	ecx, eax
	mov	eax, DWORD PTR -48[rbp]
	cdq
	idiv	DWORD PTR -20[rbp]
	imul	eax, ecx
	mov	DWORD PTR -16[rbp], eax
	mov	eax, DWORD PTR -16[rbp]
	cdq
	idiv	DWORD PTR -48[rbp]
	mov	DWORD PTR -12[rbp], eax
	mov	eax, DWORD PTR -44[rbp]
	cdq
	idiv	DWORD PTR -12[rbp]
	mov	DWORD PTR -8[rbp], eax
	mov	DWORD PTR -28[rbp], 0
	jmp	.L10
.L13:
	mov	DWORD PTR -24[rbp], 0
	mov	eax, DWORD PTR -28[rbp]
	mov	DWORD PTR -32[rbp], eax
	jmp	.L11
.L12:
	mov	edx, DWORD PTR -32[rbp]
	mov	eax, DWORD PTR -48[rbp]
	add	eax, edx
	cdq
	idiv	DWORD PTR -44[rbp]
	mov	eax, edx
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -40[rbp]
	lea	rcx, [rdx+rax]
	mov	edx, DWORD PTR -32[rbp]
	mov	eax, DWORD PTR -48[rbp]
	add	eax, edx
	cdq
	idiv	DWORD PTR -44[rbp]
	mov	eax, edx
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -40[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR [rcx]
	mov	DWORD PTR [rdx], eax
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -40[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -4[rbp]
	mov	DWORD PTR [rdx], eax
	add	DWORD PTR -24[rbp], 1
	mov	eax, DWORD PTR -48[rbp]
	add	DWORD PTR -32[rbp], eax
.L11:
	mov	eax, DWORD PTR -12[rbp]
	sub	eax, 1
	cmp	DWORD PTR -24[rbp], eax
	jl	.L12
	add	DWORD PTR -28[rbp], 1
.L10:
	mov	eax, DWORD PTR -28[rbp]
	cmp	eax, DWORD PTR -8[rbp]
	jl	.L13
	jmp	.L6
.L14:
	nop
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	rotate, .-rotate
	.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	"84099.c"
	.text
	.global	__aeabi_idivmod
	.align	2
	.global	gcd
	.syntax unified
	.arm
	.fpu softvfp
	.type	gcd, %function
gcd:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-12]
	cmp	r2, r3
	bge	.L2
	ldr	r1, [fp, #-8]
	ldr	r0, [fp, #-12]
	bl	gcd
.L2:
	ldr	r3, [fp, #-8]
	ldr	r1, [fp, #-12]
	mov	r0, r3
	bl	__aeabi_idivmod
	mov	r3, r1
	cmp	r3, #0
	beq	.L3
	ldr	r3, [fp, #-8]
	ldr	r1, [fp, #-12]
	mov	r0, r3
	bl	__aeabi_idivmod
	mov	r3, r1
	mov	r1, r3
	ldr	r0, [fp, #-12]
	bl	gcd
	b	.L1
.L3:
	ldr	r3, [fp, #-12]
.L1:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	gcd, .-gcd
	.global	__aeabi_idiv
	.align	2
	.global	rotate
	.syntax unified
	.arm
	.fpu softvfp
	.type	rotate, %function
rotate:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #52
	str	r0, [fp, #-48]
	str	r1, [fp, #-52]
	str	r2, [fp, #-56]
	ldr	r2, [fp, #-56]
	ldr	r3, [fp, #-52]
	cmp	r2, r3
	ble	.L7
	ldr	r3, [fp, #-56]
	ldr	r1, [fp, #-52]
	mov	r0, r3
	bl	__aeabi_idivmod
	mov	r3, r1
	str	r3, [fp, #-56]
.L7:
	ldr	r3, [fp, #-56]
	cmp	r3, #0
	beq	.L14
	ldr	r1, [fp, #-56]
	ldr	r0, [fp, #-52]
	bl	gcd
	str	r0, [fp, #-32]
	ldr	r1, [fp, #-32]
	ldr	r0, [fp, #-52]
	bl	__aeabi_idiv
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-32]
	mul	r4, r3, r2
	ldr	r1, [fp, #-32]
	ldr	r0, [fp, #-56]
	bl	__aeabi_idiv
	mov	r3, r0
	mul	r3, r4, r3
	str	r3, [fp, #-28]
	ldr	r1, [fp, #-56]
	ldr	r0, [fp, #-28]
	bl	__aeabi_idiv
	mov	r3, r0
	str	r3, [fp, #-24]
	ldr	r1, [fp, #-24]
	ldr	r0, [fp, #-52]
	bl	__aeabi_idiv
	mov	r3, r0
	str	r3, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-40]
	b	.L10
.L13:
	mov	r3, #0
	str	r3, [fp, #-36]
	ldr	r3, [fp, #-40]
	str	r3, [fp, #-44]
	b	.L11
.L12:
	ldr	r2, [fp, #-44]
	ldr	r3, [fp, #-56]
	add	r3, r2, r3
	ldr	r1, [fp, #-52]
	mov	r0, r3
	bl	__aeabi_idivmod
	mov	r3, r1
	lsl	r3, r3, #2
	ldr	r2, [fp, #-48]
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-40]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-48]
	add	r4, r2, r3
	ldr	r2, [fp, #-44]
	ldr	r3, [fp, #-56]
	add	r3, r2, r3
	ldr	r1, [fp, #-52]
	mov	r0, r3
	bl	__aeabi_idivmod
	mov	r3, r1
	lsl	r3, r3, #2
	ldr	r2, [fp, #-48]
	add	r3, r2, r3
	ldr	r2, [r4]
	str	r2, [r3]
	ldr	r3, [fp, #-40]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-48]
	add	r3, r2, r3
	ldr	r2, [fp, #-16]
	str	r2, [r3]
	ldr	r3, [fp, #-36]
	add	r3, r3, #1
	str	r3, [fp, #-36]
	ldr	r2, [fp, #-44]
	ldr	r3, [fp, #-56]
	add	r3, r2, r3
	str	r3, [fp, #-44]
.L11:
	ldr	r3, [fp, #-24]
	sub	r3, r3, #1
	ldr	r2, [fp, #-36]
	cmp	r2, r3
	blt	.L12
	ldr	r3, [fp, #-40]
	add	r3, r3, #1
	str	r3, [fp, #-40]
.L10:
	ldr	r2, [fp, #-40]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	blt	.L13
	b	.L6
.L14:
	nop
.L6:
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
	.size	rotate, .-rotate
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
