	.file	"673415.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"r"
.LC1:
	.string	"in21"
.LC2:
	.string	"Part1: %d\n"
.LC3:
	.string	"in21r"
.LC4:
	.string	"Part2: %d\n"
	.text
	.globl	main
	.type	main, @function
main:
.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
	lea	rsi, .LC0[rip]
	lea	rdi, .LC1[rip]
	call	fopen@PLT
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	part1
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	fclose@PLT
	lea	rsi, .LC0[rip]
	lea	rdi, .LC3[rip]
	call	fopen@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	part2
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
.LC5:
	.string	"abcdefgh"
	.text
	.globl	part1
	.type	part1, @function
part1:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 80
	mov	QWORD PTR -72[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, .LC5[rip]
	mov	QWORD PTR -48[rbp], rax
	mov	rax, QWORD PTR -48[rbp]
	mov	rdi, rax
	call	strlen@PLT
	add	rax, 1
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -40[rbp], rax
	mov	rax, QWORD PTR -48[rbp]
	mov	rdi, rax
	call	strlen@PLT
	lea	rdx, 1[rax]
	mov	rcx, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	strncpy@PLT
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR -32[rbp], rax
	mov	DWORD PTR -24[rbp], 0
	mov	rax, QWORD PTR -48[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	DWORD PTR -20[rbp], eax
	mov	QWORD PTR -64[rbp], 0
	mov	QWORD PTR -56[rbp], 0
	nop
.L4:
	lea	rcx, -56[rbp]
	lea	rdx, -64[rbp]
	lea	rsi, -32[rbp]
	mov	rax, QWORD PTR -72[rbp]
	mov	rdi, rax
	call	scramble
	test	eax, eax
	jne	.L4
	lea	rax, -32[rbp]
	mov	rdi, rax
	call	print
	mov	edi, 10
	call	putchar@PLT
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -64[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -48[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L6
	call	__stack_chk_fail@PLT
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	part1, .-part1
	.section	.rodata
.LC6:
	.string	"fbgdceah"
	.text
	.globl	part2
	.type	part2, @function
part2:
.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, 80
	mov	QWORD PTR -72[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, .LC6[rip]
	mov	QWORD PTR -48[rbp], rax
	mov	rax, QWORD PTR -48[rbp]
	mov	rdi, rax
	call	strlen@PLT
	add	rax, 1
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -40[rbp], rax
	mov	rax, QWORD PTR -48[rbp]
	mov	rdi, rax
	call	strlen@PLT
	lea	rdx, 1[rax]
	mov	rcx, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	strncpy@PLT
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR -32[rbp], rax
	mov	DWORD PTR -24[rbp], 0
	mov	rax, QWORD PTR -48[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	DWORD PTR -20[rbp], eax
	mov	QWORD PTR -64[rbp], 0
	mov	QWORD PTR -56[rbp], 0
	nop
.L8:
	lea	rcx, -56[rbp]
	lea	rdx, -64[rbp]
	lea	rsi, -32[rbp]
	mov	rax, QWORD PTR -72[rbp]
	mov	rdi, rax
	call	unscramble
	test	eax, eax
	jne	.L8
	lea	rax, -32[rbp]
	mov	rdi, rax
	call	print
	mov	edi, 10
	call	putchar@PLT
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -64[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -48[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	part2, .-part2
	.type	swapPos, @function
swapPos:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	DWORD PTR -32[rbp], edx
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, QWORD PTR [rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR 8[rax]
	mov	eax, DWORD PTR -28[rbp]
	add	edx, eax
	mov	rax, QWORD PTR -24[rbp]
	mov	ecx, DWORD PTR 12[rax]
	mov	eax, edx
	cdq
	idiv	ecx
	mov	eax, edx
	cdqe
	add	rax, rsi
	movzx	eax, BYTE PTR [rax]
	mov	BYTE PTR -1[rbp], al
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, QWORD PTR [rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR 8[rax]
	mov	eax, DWORD PTR -32[rbp]
	add	edx, eax
	mov	rax, QWORD PTR -24[rbp]
	mov	ecx, DWORD PTR 12[rax]
	mov	eax, edx
	cdq
	idiv	ecx
	mov	eax, edx
	cdqe
	lea	rcx, [rsi+rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, QWORD PTR [rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR 8[rax]
	mov	eax, DWORD PTR -28[rbp]
	add	edx, eax
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, DWORD PTR 12[rax]
	mov	eax, edx
	cdq
	idiv	esi
	mov	eax, edx
	cdqe
	lea	rdx, [rdi+rax]
	movzx	eax, BYTE PTR [rcx]
	mov	BYTE PTR [rdx], al
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, QWORD PTR [rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR 8[rax]
	mov	eax, DWORD PTR -32[rbp]
	add	edx, eax
	mov	rax, QWORD PTR -24[rbp]
	mov	ecx, DWORD PTR 12[rax]
	mov	eax, edx
	cdq
	idiv	ecx
	mov	eax, edx
	cdqe
	lea	rdx, [rsi+rax]
	movzx	eax, BYTE PTR -1[rbp]
	mov	BYTE PTR [rdx], al
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	swapPos, .-swapPos
	.type	swapLetters, @function
swapLetters:
.LFB10:
	.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	ecx, esi
	mov	eax, edx
	mov	edx, ecx
	mov	BYTE PTR -28[rbp], dl
	mov	BYTE PTR -32[rbp], al
	movsx	edx, BYTE PTR -28[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	esi, edx
	mov	rdi, rax
	call	strchr@PLT
	mov	QWORD PTR -8[rbp], rax
	movsx	edx, BYTE PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	esi, edx
	mov	rdi, rax
	call	strchr@PLT
	movzx	edx, BYTE PTR -28[rbp]
	mov	BYTE PTR [rax], dl
	mov	rax, QWORD PTR -8[rbp]
	movzx	edx, BYTE PTR -32[rbp]
	mov	BYTE PTR [rax], dl
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	swapLetters, .-swapLetters
	.type	rotateLeft, @function
rotateLeft:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -8[rbp], rdi
	mov	DWORD PTR -12[rbp], esi
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, DWORD PTR 8[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	ecx, DWORD PTR 12[rax]
	mov	eax, DWORD PTR -12[rbp]
	cdq
	idiv	ecx
	mov	eax, edx
	lea	edx, [rsi+rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 8[rax], edx
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 8[rax]
	test	eax, eax
	jns	.L14
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR 8[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 12[rax]
	add	edx, eax
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 8[rax], edx
.L14:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 8[rax]
	mov	rdx, QWORD PTR -8[rbp]
	mov	ecx, DWORD PTR 12[rdx]
	cdq
	idiv	ecx
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 8[rax], edx
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	rotateLeft, .-rotateLeft
	.type	rotateRight, @function
rotateRight:
.LFB12:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -8[rbp], rdi
	mov	DWORD PTR -12[rbp], esi
	mov	rax, QWORD PTR -8[rbp]
	mov	ecx, DWORD PTR 8[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, DWORD PTR 12[rax]
	mov	eax, DWORD PTR -12[rbp]
	cdq
	idiv	esi
	mov	eax, edx
	sub	ecx, eax
	mov	edx, ecx
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 8[rax], edx
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 8[rax]
	test	eax, eax
	jns	.L16
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR 8[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 12[rax]
	add	edx, eax
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 8[rax], edx
.L16:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 8[rax]
	mov	rdx, QWORD PTR -8[rbp]
	mov	ecx, DWORD PTR 12[rdx]
	cdq
	idiv	ecx
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 8[rax], edx
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	rotateRight, .-rotateRight
	.type	rotateBased, @function
rotateBased:
.LFB13:
	.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	eax, esi
	mov	BYTE PTR -44[rbp], al
	movsx	edx, BYTE PTR -44[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR [rax]
	mov	esi, edx
	mov	rdi, rax
	call	strchr@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, rdx
	mov	DWORD PTR -16[rbp], eax
	mov	rax, QWORD PTR -40[rbp]
	mov	edx, DWORD PTR 8[rax]
	mov	eax, DWORD PTR -16[rbp]
	sub	eax, edx
	mov	DWORD PTR -20[rbp], eax
	cmp	DWORD PTR -20[rbp], 0
	jns	.L18
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR 12[rax]
	add	DWORD PTR -20[rbp], eax
.L18:
	mov	eax, DWORD PTR -20[rbp]
	lea	edx, 1[rax]
	cmp	DWORD PTR -20[rbp], 3
	setg	al
	movzx	eax, al
	add	eax, edx
	mov	DWORD PTR -12[rbp], eax
	mov	edx, DWORD PTR -12[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	rotateRight
	mov	eax, DWORD PTR -12[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	rotateBased, .-rotateBased
	.type	rotateBasedReverse, @function
rotateBasedReverse:
.LFB14:
	.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	eax, esi
	mov	BYTE PTR -28[rbp], al
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, QWORD PTR [rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 8[rax]
	mov	rdx, QWORD PTR -24[rbp]
	mov	ecx, DWORD PTR 12[rdx]
	cdq
	idiv	ecx
	mov	eax, edx
	cdqe
	add	rax, rsi
	movzx	eax, BYTE PTR [rax]
	mov	BYTE PTR -5[rbp], al
	mov	DWORD PTR -4[rbp], 0
.L23:
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	rotateRight
	movsx	edx, BYTE PTR -28[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	rotateBased
	mov	DWORD PTR -4[rbp], eax
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, QWORD PTR [rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 8[rax]
	mov	rdx, QWORD PTR -24[rbp]
	mov	ecx, DWORD PTR 12[rdx]
	cdq
	idiv	ecx
	mov	eax, edx
	cdqe
	add	rax, rsi
	movzx	eax, BYTE PTR [rax]
	cmp	BYTE PTR -5[rbp], al
	je	.L25
	mov	edx, DWORD PTR -4[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	rotateLeft
	jmp	.L23
.L25:
	nop
	mov	edx, DWORD PTR -4[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	rotateLeft
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	rotateBasedReverse, .-rotateBasedReverse
	.type	reversePositions, @function
reversePositions:
.LFB15:
	.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	DWORD PTR -28[rbp], esi
	mov	DWORD PTR -32[rbp], edx
	mov	DWORD PTR -4[rbp], 0
	jmp	.L27
.L28:
	mov	eax, DWORD PTR -32[rbp]
	sub	eax, DWORD PTR -4[rbp]
	mov	edx, eax
	mov	ecx, DWORD PTR -28[rbp]
	mov	eax, DWORD PTR -4[rbp]
	add	ecx, eax
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	swapPos
	add	DWORD PTR -4[rbp], 1
.L27:
	mov	eax, DWORD PTR -32[rbp]
	sub	eax, DWORD PTR -28[rbp]
	add	eax, 1
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	cmp	DWORD PTR -4[rbp], eax
	jl	.L28
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	reversePositions, .-reversePositions
	.type	movePosition, @function
movePosition:
.LFB16:
	.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	DWORD PTR -28[rbp], esi
	mov	DWORD PTR -32[rbp], edx
	mov	eax, DWORD PTR -32[rbp]
	cmp	eax, DWORD PTR -28[rbp]
	jge	.L30
	mov	eax, DWORD PTR -28[rbp]
	mov	DWORD PTR -8[rbp], eax
	jmp	.L31
.L32:
	mov	eax, DWORD PTR -8[rbp]
	lea	edx, -1[rax]
	mov	ecx, DWORD PTR -8[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	swapPos
	sub	DWORD PTR -8[rbp], 1
.L31:
	mov	eax, DWORD PTR -8[rbp]
	cmp	eax, DWORD PTR -32[rbp]
	jg	.L32
	jmp	.L36
.L30:
	mov	eax, DWORD PTR -28[rbp]
	mov	DWORD PTR -4[rbp], eax
	jmp	.L34
.L35:
	mov	eax, DWORD PTR -4[rbp]
	lea	edx, 1[rax]
	mov	ecx, DWORD PTR -4[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	swapPos
	add	DWORD PTR -4[rbp], 1
.L34:
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -32[rbp]
	jl	.L35
.L36:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	movePosition, .-movePosition
	.section	.rodata
	.align 8
.LC7:
	.string	"swap position %d with position %d"
.LC8:
	.string	"swap letter %c with letter %c"
.LC9:
	.string	"rotate left %d steps"
.LC10:
	.string	"rotate right %d steps"
	.align 8
.LC11:
	.string	"rotate based on position of letter %c"
	.align 8
.LC12:
	.string	"reverse positions %d through %d"
	.align 8
.LC13:
	.string	"move position %d to position %d"
.LC14:
	.string	"Couldn't parse line %s\n"
	.text
	.globl	scramble
	.type	scramble, @function
scramble:
.LFB17:
	.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	QWORD PTR -40[rbp], rdi
	mov	QWORD PTR -48[rbp], rsi
	mov	QWORD PTR -56[rbp], rdx
	mov	QWORD PTR -64[rbp], rcx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rdx, QWORD PTR -40[rbp]
	mov	rcx, QWORD PTR -64[rbp]
	mov	rax, QWORD PTR -56[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	getline@PLT
	test	rax, rax
	jne	.L38
	mov	eax, 0
	jmp	.L49
.L38:
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	je	.L40
	mov	rax, QWORD PTR -16[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 10
	jne	.L41
.L40:
	mov	eax, 0
	jmp	.L49
.L41:
	mov	rax, QWORD PTR -16[rbp]
	mov	esi, 10
	mov	rdi, rax
	call	strchr@PLT
	mov	BYTE PTR [rax], 0
	lea	rcx, -20[rbp]
	lea	rdx, -24[rbp]
	mov	rax, QWORD PTR -16[rbp]
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_sscanf@PLT
	cmp	eax, 2
	jne	.L42
	mov	edx, DWORD PTR -20[rbp]
	mov	ecx, DWORD PTR -24[rbp]
	mov	rax, QWORD PTR -48[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	swapPos
	mov	eax, 1
	jmp	.L49
.L42:
	lea	rcx, -29[rbp]
	lea	rdx, -30[rbp]
	mov	rax, QWORD PTR -16[rbp]
	lea	rsi, .LC8[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_sscanf@PLT
	cmp	eax, 2
	jne	.L43
	movzx	eax, BYTE PTR -29[rbp]
	movsx	edx, al
	movzx	eax, BYTE PTR -30[rbp]
	movsx	ecx, al
	mov	rax, QWORD PTR -48[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	swapLetters
	mov	eax, 2
	jmp	.L49
.L43:
	lea	rdx, -28[rbp]
	mov	rax, QWORD PTR -16[rbp]
	lea	rsi, .LC9[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_sscanf@PLT
	cmp	eax, 1
	jne	.L44
	mov	edx, DWORD PTR -28[rbp]
	mov	rax, QWORD PTR -48[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	rotateLeft
	mov	eax, 3
	jmp	.L49
.L44:
	lea	rdx, -28[rbp]
	mov	rax, QWORD PTR -16[rbp]
	lea	rsi, .LC10[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_sscanf@PLT
	cmp	eax, 1
	jne	.L45
	mov	edx, DWORD PTR -28[rbp]
	mov	rax, QWORD PTR -48[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	rotateRight
	mov	eax, 4
	jmp	.L49
.L45:
	lea	rdx, -30[rbp]
	mov	rax, QWORD PTR -16[rbp]
	lea	rsi, .LC11[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_sscanf@PLT
	cmp	eax, 1
	jne	.L46
	movzx	eax, BYTE PTR -30[rbp]
	movsx	edx, al
	mov	rax, QWORD PTR -48[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	rotateBased
	mov	eax, 5
	jmp	.L49
.L46:
	lea	rcx, -20[rbp]
	lea	rdx, -24[rbp]
	mov	rax, QWORD PTR -16[rbp]
	lea	rsi, .LC12[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_sscanf@PLT
	cmp	eax, 2
	jne	.L47
	mov	edx, DWORD PTR -20[rbp]
	mov	ecx, DWORD PTR -24[rbp]
	mov	rax, QWORD PTR -48[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	reversePositions
	mov	eax, 6
	jmp	.L49
.L47:
	lea	rcx, -20[rbp]
	lea	rdx, -24[rbp]
	mov	rax, QWORD PTR -16[rbp]
	lea	rsi, .LC13[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_sscanf@PLT
	cmp	eax, 2
	jne	.L48
	mov	edx, DWORD PTR -20[rbp]
	mov	ecx, DWORD PTR -24[rbp]
	mov	rax, QWORD PTR -48[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	movePosition
	mov	eax, 7
	jmp	.L49
.L48:
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -16[rbp]
	lea	rsi, .LC14[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, -1
.L49:
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L50
	call	__stack_chk_fail@PLT
.L50:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE17:
	.size	scramble, .-scramble
	.globl	unscramble
	.type	unscramble, @function
unscramble:
.LFB18:
	.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	QWORD PTR -40[rbp], rdi
	mov	QWORD PTR -48[rbp], rsi
	mov	QWORD PTR -56[rbp], rdx
	mov	QWORD PTR -64[rbp], rcx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rdx, QWORD PTR -40[rbp]
	mov	rcx, QWORD PTR -64[rbp]
	mov	rax, QWORD PTR -56[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	getline@PLT
	test	rax, rax
	jne	.L52
	mov	eax, 0
	jmp	.L63
.L52:
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	je	.L54
	mov	rax, QWORD PTR -16[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 10
	jne	.L55
.L54:
	mov	eax, 0
	jmp	.L63
.L55:
	mov	rax, QWORD PTR -16[rbp]
	mov	esi, 10
	mov	rdi, rax
	call	strchr@PLT
	mov	BYTE PTR [rax], 0
	lea	rcx, -20[rbp]
	lea	rdx, -24[rbp]
	mov	rax, QWORD PTR -16[rbp]
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_sscanf@PLT
	cmp	eax, 2
	jne	.L56
	mov	edx, DWORD PTR -20[rbp]
	mov	ecx, DWORD PTR -24[rbp]
	mov	rax, QWORD PTR -48[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	swapPos
	mov	eax, 1
	jmp	.L63
.L56:
	lea	rcx, -29[rbp]
	lea	rdx, -30[rbp]
	mov	rax, QWORD PTR -16[rbp]
	lea	rsi, .LC8[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_sscanf@PLT
	cmp	eax, 2
	jne	.L57
	movzx	eax, BYTE PTR -29[rbp]
	movsx	edx, al
	movzx	eax, BYTE PTR -30[rbp]
	movsx	ecx, al
	mov	rax, QWORD PTR -48[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	swapLetters
	mov	eax, 2
	jmp	.L63
.L57:
	lea	rdx, -28[rbp]
	mov	rax, QWORD PTR -16[rbp]
	lea	rsi, .LC9[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_sscanf@PLT
	cmp	eax, 1
	jne	.L58
	mov	edx, DWORD PTR -28[rbp]
	mov	rax, QWORD PTR -48[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	rotateRight
	mov	eax, 3
	jmp	.L63
.L58:
	lea	rdx, -28[rbp]
	mov	rax, QWORD PTR -16[rbp]
	lea	rsi, .LC10[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_sscanf@PLT
	cmp	eax, 1
	jne	.L59
	mov	edx, DWORD PTR -28[rbp]
	mov	rax, QWORD PTR -48[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	rotateLeft
	mov	eax, 4
	jmp	.L63
.L59:
	lea	rdx, -30[rbp]
	mov	rax, QWORD PTR -16[rbp]
	lea	rsi, .LC11[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_sscanf@PLT
	cmp	eax, 1
	jne	.L60
	movzx	eax, BYTE PTR -30[rbp]
	movsx	edx, al
	mov	rax, QWORD PTR -48[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	rotateBasedReverse
	mov	eax, 5
	jmp	.L63
.L60:
	lea	rcx, -20[rbp]
	lea	rdx, -24[rbp]
	mov	rax, QWORD PTR -16[rbp]
	lea	rsi, .LC12[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_sscanf@PLT
	cmp	eax, 2
	jne	.L61
	mov	edx, DWORD PTR -20[rbp]
	mov	ecx, DWORD PTR -24[rbp]
	mov	rax, QWORD PTR -48[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	reversePositions
	mov	eax, 6
	jmp	.L63
.L61:
	lea	rcx, -20[rbp]
	lea	rdx, -24[rbp]
	mov	rax, QWORD PTR -16[rbp]
	lea	rsi, .LC13[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_sscanf@PLT
	cmp	eax, 2
	jne	.L62
	mov	edx, DWORD PTR -24[rbp]
	mov	ecx, DWORD PTR -20[rbp]
	mov	rax, QWORD PTR -48[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	movePosition
	mov	eax, 7
	jmp	.L63
.L62:
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -16[rbp]
	lea	rsi, .LC14[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, -1
.L63:
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L64
	call	__stack_chk_fail@PLT
.L64:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE18:
	.size	unscramble, .-unscramble
	.globl	print
	.type	print, @function
print:
.LFB19:
	.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	DWORD PTR -4[rbp], 0
	jmp	.L66
.L67:
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, QWORD PTR [rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR 8[rax]
	mov	eax, DWORD PTR -4[rbp]
	add	edx, eax
	mov	rax, QWORD PTR -24[rbp]
	mov	ecx, DWORD PTR 12[rax]
	mov	eax, edx
	cdq
	idiv	ecx
	mov	eax, edx
	cdqe
	add	rax, rsi
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	edi, eax
	call	putchar@PLT
	add	DWORD PTR -4[rbp], 1
.L66:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 12[rax]
	cmp	DWORD PTR -4[rbp], eax
	jl	.L67
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE19:
	.size	print, .-print
	.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	"673415.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"r\000"
	.align	2
.LC1:
	.ascii	"in21\000"
	.align	2
.LC2:
	.ascii	"Part1: %d\012\000"
	.align	2
.LC3:
	.ascii	"in21r\000"
	.align	2
.LC4:
	.ascii	"Part2: %d\012\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	ldr	r1, .L3
	ldr	r0, .L3+4
	bl	fopen
	str	r0, [fp, #-12]
	ldr	r0, [fp, #-12]
	bl	part1
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L3+8
	bl	printf
	ldr	r0, [fp, #-12]
	bl	fclose
	ldr	r1, .L3
	ldr	r0, .L3+12
	bl	fopen
	str	r0, [fp, #-8]
	ldr	r0, [fp, #-8]
	bl	part2
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L3+16
	bl	printf
	ldr	r0, [fp, #-8]
	bl	fclose
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L4:
	.align	2
.L3:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.size	main, .-main
	.section	.rodata
	.align	2
.LC5:
	.ascii	"abcdefgh\000"
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	part1
	.syntax unified
	.arm
	.fpu softvfp
	.type	part1, %function
part1:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	str	r0, [fp, #-40]
	ldr	r3, .L9
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L9+4
	str	r3, [fp, #-28]
	ldr	r0, [fp, #-28]
	bl	strlen
	mov	r3, r0
	add	r3, r3, #1
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-24]
	ldr	r0, [fp, #-28]
	bl	strlen
	mov	r3, r0
	add	r3, r3, #1
	mov	r2, r3
	ldr	r1, [fp, #-28]
	ldr	r0, [fp, #-24]
	bl	strncpy
	ldr	r3, [fp, #-24]
	str	r3, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-16]
	ldr	r0, [fp, #-28]
	bl	strlen
	mov	r3, r0
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-36]
	mov	r3, #0
	str	r3, [fp, #-32]
	nop
.L6:
	sub	r3, fp, #32
	sub	r2, fp, #36
	sub	r1, fp, #20
	ldr	r0, [fp, #-40]
	bl	scramble
	mov	r3, r0
	cmp	r3, #0
	bne	.L6
	sub	r3, fp, #20
	mov	r0, r3
	bl	print
	mov	r0, #10
	bl	putchar
	ldr	r0, [fp, #-24]
	bl	free
	ldr	r3, [fp, #-36]
	mov	r0, r3
	bl	free
	ldr	r0, [fp, #-28]
	bl	strlen
	mov	r3, r0
	ldr	r2, .L9
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L8
	bl	__stack_chk_fail
.L8:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L10:
	.align	2
.L9:
	.word	.LC6
	.word	.LC5
	.size	part1, .-part1
	.section	.rodata
	.align	2
.LC7:
	.ascii	"fbgdceah\000"
	.align	2
.LC8:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	part2
	.syntax unified
	.arm
	.fpu softvfp
	.type	part2, %function
part2:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	str	r0, [fp, #-40]
	ldr	r3, .L15
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L15+4
	str	r3, [fp, #-28]
	ldr	r0, [fp, #-28]
	bl	strlen
	mov	r3, r0
	add	r3, r3, #1
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-24]
	ldr	r0, [fp, #-28]
	bl	strlen
	mov	r3, r0
	add	r3, r3, #1
	mov	r2, r3
	ldr	r1, [fp, #-28]
	ldr	r0, [fp, #-24]
	bl	strncpy
	ldr	r3, [fp, #-24]
	str	r3, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-16]
	ldr	r0, [fp, #-28]
	bl	strlen
	mov	r3, r0
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-36]
	mov	r3, #0
	str	r3, [fp, #-32]
	nop
.L12:
	sub	r3, fp, #32
	sub	r2, fp, #36
	sub	r1, fp, #20
	ldr	r0, [fp, #-40]
	bl	unscramble
	mov	r3, r0
	cmp	r3, #0
	bne	.L12
	sub	r3, fp, #20
	mov	r0, r3
	bl	print
	mov	r0, #10
	bl	putchar
	ldr	r0, [fp, #-24]
	bl	free
	ldr	r3, [fp, #-36]
	mov	r0, r3
	bl	free
	ldr	r0, [fp, #-28]
	bl	strlen
	mov	r3, r0
	ldr	r2, .L15
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L14
	bl	__stack_chk_fail
.L14:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L16:
	.align	2
.L15:
	.word	.LC8
	.word	.LC7
	.size	part2, .-part2
	.global	__aeabi_idivmod
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	swapPos, %function
swapPos:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	str	r2, [fp, #-32]
	ldr	r3, [fp, #-24]
	ldr	r4, [r3]
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-28]
	add	r2, r2, r3
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #8]
	mov	r1, r3
	mov	r0, r2
	bl	__aeabi_idivmod
	mov	r3, r1
	add	r3, r4, r3
	ldrb	r3, [r3]
	strb	r3, [fp, #-13]
	ldr	r3, [fp, #-24]
	ldr	r4, [r3]
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-32]
	add	r2, r2, r3
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #8]
	mov	r1, r3
	mov	r0, r2
	bl	__aeabi_idivmod
	mov	r3, r1
	add	r4, r4, r3
	ldr	r3, [fp, #-24]
	ldr	r5, [r3]
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-28]
	add	r2, r2, r3
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #8]
	mov	r1, r3
	mov	r0, r2
	bl	__aeabi_idivmod
	mov	r3, r1
	add	r3, r5, r3
	ldrb	r2, [r4]	@ zero_extendqisi2
	strb	r2, [r3]
	ldr	r3, [fp, #-24]
	ldr	r4, [r3]
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-32]
	add	r2, r2, r3
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #8]
	mov	r1, r3
	mov	r0, r2
	bl	__aeabi_idivmod
	mov	r3, r1
	add	r3, r4, r3
	ldrb	r2, [fp, #-13]
	strb	r2, [r3]
	nop
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
	.size	swapPos, .-swapPos
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	swapLetters, %function
swapLetters:
	@ 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, #-16]
	mov	r3, r1
	strb	r3, [fp, #-17]
	mov	r3, r2
	strb	r3, [fp, #-18]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	ldrb	r2, [fp, #-17]	@ zero_extendqisi2
	mov	r1, r2
	mov	r0, r3
	bl	strchr
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	ldrb	r2, [fp, #-18]	@ zero_extendqisi2
	mov	r1, r2
	mov	r0, r3
	bl	strchr
	mov	r2, r0
	ldrb	r3, [fp, #-17]
	strb	r3, [r2]
	ldr	r3, [fp, #-8]
	ldrb	r2, [fp, #-18]
	strb	r2, [r3]
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	swapLetters, .-swapLetters
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	rotateLeft, %function
rotateLeft:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #12
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	ldr	r3, [fp, #-16]
	ldr	r4, [r3, #4]
	ldr	r3, [fp, #-16]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-20]
	mov	r1, r2
	mov	r0, r3
	bl	__aeabi_idivmod
	mov	r3, r1
	add	r2, r4, r3
	ldr	r3, [fp, #-16]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #4]
	cmp	r3, #0
	bge	.L20
	ldr	r3, [fp, #-16]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #8]
	add	r2, r2, r3
	ldr	r3, [fp, #-16]
	str	r2, [r3, #4]
.L20:
	ldr	r3, [fp, #-16]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #8]
	mov	r1, r3
	mov	r0, r2
	bl	__aeabi_idivmod
	mov	r3, r1
	mov	r2, r3
	ldr	r3, [fp, #-16]
	str	r2, [r3, #4]
	nop
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
	.size	rotateLeft, .-rotateLeft
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	rotateRight, %function
rotateRight:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #12
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	ldr	r3, [fp, #-16]
	ldr	r4, [r3, #4]
	ldr	r3, [fp, #-16]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-20]
	mov	r1, r2
	mov	r0, r3
	bl	__aeabi_idivmod
	mov	r3, r1
	sub	r2, r4, r3
	ldr	r3, [fp, #-16]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #4]
	cmp	r3, #0
	bge	.L22
	ldr	r3, [fp, #-16]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #8]
	add	r2, r2, r3
	ldr	r3, [fp, #-16]
	str	r2, [r3, #4]
.L22:
	ldr	r3, [fp, #-16]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #8]
	mov	r1, r3
	mov	r0, r2
	bl	__aeabi_idivmod
	mov	r3, r1
	mov	r2, r3
	ldr	r3, [fp, #-16]
	str	r2, [r3, #4]
	nop
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
	.size	rotateRight, .-rotateRight
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	rotateBased, %function
rotateBased:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	mov	r3, r1
	strb	r3, [fp, #-25]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	ldrb	r2, [fp, #-25]	@ zero_extendqisi2
	mov	r1, r2
	mov	r0, r3
	bl	strchr
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	sub	r3, r2, r3
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-12]
	sub	r3, r2, r3
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bge	.L24
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #8]
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	str	r3, [fp, #-20]
.L24:
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	ldr	r2, [fp, #-20]
	cmp	r2, #3
	movgt	r2, #1
	movle	r2, #0
	and	r2, r2, #255
	add	r3, r3, r2
	str	r3, [fp, #-8]
	ldr	r1, [fp, #-8]
	ldr	r0, [fp, #-24]
	bl	rotateRight
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	rotateBased, .-rotateBased
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	rotateBasedReverse, %function
rotateBasedReverse:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #20
	str	r0, [fp, #-24]
	mov	r3, r1
	strb	r3, [fp, #-25]
	ldr	r3, [fp, #-24]
	ldr	r4, [r3]
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #8]
	mov	r1, r3
	mov	r0, r2
	bl	__aeabi_idivmod
	mov	r3, r1
	add	r3, r4, r3
	ldrb	r3, [r3]
	strb	r3, [fp, #-17]
	mov	r3, #0
	str	r3, [fp, #-16]
.L29:
	mov	r1, #1
	ldr	r0, [fp, #-24]
	bl	rotateRight
	ldrb	r3, [fp, #-25]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, [fp, #-24]
	bl	rotateBased
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-24]
	ldr	r4, [r3]
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #8]
	mov	r1, r3
	mov	r0, r2
	bl	__aeabi_idivmod
	mov	r3, r1
	add	r3, r4, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	ldrb	r2, [fp, #-17]	@ zero_extendqisi2
	cmp	r2, r3
	beq	.L31
	ldr	r1, [fp, #-16]
	ldr	r0, [fp, #-24]
	bl	rotateLeft
	b	.L29
.L31:
	nop
	ldr	r1, [fp, #-16]
	ldr	r0, [fp, #-24]
	bl	rotateLeft
	nop
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
	.size	rotateBasedReverse, .-rotateBasedReverse
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	reversePositions, %function
reversePositions:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L33
.L34:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-8]
	add	r1, r2, r3
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-8]
	sub	r3, r2, r3
	mov	r2, r3
	ldr	r0, [fp, #-16]
	bl	swapPos
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L33:
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-20]
	sub	r3, r2, r3
	add	r3, r3, #1
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	mov	r2, r3
	ldr	r3, [fp, #-8]
	cmp	r3, r2
	blt	.L34
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	reversePositions, .-reversePositions
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	movePosition, %function
movePosition:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	bge	.L36
	ldr	r3, [fp, #-20]
	str	r3, [fp, #-12]
	b	.L37
.L38:
	ldr	r3, [fp, #-12]
	sub	r3, r3, #1
	mov	r2, r3
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-16]
	bl	swapPos
	ldr	r3, [fp, #-12]
	sub	r3, r3, #1
	str	r3, [fp, #-12]
.L37:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	bgt	.L38
	b	.L42
.L36:
	ldr	r3, [fp, #-20]
	str	r3, [fp, #-8]
	b	.L40
.L41:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	mov	r2, r3
	ldr	r1, [fp, #-8]
	ldr	r0, [fp, #-16]
	bl	swapPos
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L40:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	blt	.L41
.L42:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	movePosition, .-movePosition
	.section	.rodata
	.align	2
.LC9:
	.ascii	"swap position %d with position %d\000"
	.align	2
.LC10:
	.ascii	"swap letter %c with letter %c\000"
	.align	2
.LC11:
	.ascii	"rotate left %d steps\000"
	.align	2
.LC12:
	.ascii	"rotate right %d steps\000"
	.align	2
.LC13:
	.ascii	"rotate based on position of letter %c\000"
	.align	2
.LC14:
	.ascii	"reverse positions %d through %d\000"
	.align	2
.LC15:
	.ascii	"move position %d to position %d\000"
	.align	2
.LC16:
	.ascii	"Couldn't parse line %s\012\000"
	.align	2
.LC17:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	scramble
	.syntax unified
	.arm
	.fpu softvfp
	.type	scramble, %function
scramble:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	str	r0, [fp, #-32]
	str	r1, [fp, #-36]
	str	r2, [fp, #-40]
	str	r3, [fp, #-44]
	ldr	r3, .L57
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r2, [fp, #-32]
	ldr	r1, [fp, #-44]
	ldr	r0, [fp, #-40]
	bl	getline
	mov	r3, r0
	cmp	r3, #0
	bne	.L44
	mov	r3, #0
	b	.L55
.L44:
	ldr	r3, [fp, #-40]
	ldr	r3, [r3]
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L46
	ldr	r3, [fp, #-12]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #10
	bne	.L47
.L46:
	mov	r3, #0
	b	.L55
.L47:
	mov	r1, #10
	ldr	r0, [fp, #-12]
	bl	strchr
	mov	r3, r0
	mov	r2, #0
	strb	r2, [r3]
	sub	r3, fp, #16
	sub	r2, fp, #20
	ldr	r1, .L57+4
	ldr	r0, [fp, #-12]
	bl	__isoc99_sscanf
	mov	r3, r0
	cmp	r3, #2
	bne	.L48
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-16]
	mov	r1, r3
	ldr	r0, [fp, #-36]
	bl	swapPos
	mov	r3, #1
	b	.L55
.L48:
	sub	r3, fp, #25
	sub	r2, fp, #26
	ldr	r1, .L57+8
	ldr	r0, [fp, #-12]
	bl	__isoc99_sscanf
	mov	r3, r0
	cmp	r3, #2
	bne	.L49
	ldrb	r3, [fp, #-26]	@ zero_extendqisi2
	ldrb	r2, [fp, #-25]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, [fp, #-36]
	bl	swapLetters
	mov	r3, #2
	b	.L55
.L49:
	sub	r3, fp, #24
	mov	r2, r3
	ldr	r1, .L57+12
	ldr	r0, [fp, #-12]
	bl	__isoc99_sscanf
	mov	r3, r0
	cmp	r3, #1
	bne	.L50
	ldr	r3, [fp, #-24]
	mov	r1, r3
	ldr	r0, [fp, #-36]
	bl	rotateLeft
	mov	r3, #3
	b	.L55
.L50:
	sub	r3, fp, #24
	mov	r2, r3
	ldr	r1, .L57+16
	ldr	r0, [fp, #-12]
	bl	__isoc99_sscanf
	mov	r3, r0
	cmp	r3, #1
	bne	.L51
	ldr	r3, [fp, #-24]
	mov	r1, r3
	ldr	r0, [fp, #-36]
	bl	rotateRight
	mov	r3, #4
	b	.L55
.L51:
	sub	r3, fp, #26
	mov	r2, r3
	ldr	r1, .L57+20
	ldr	r0, [fp, #-12]
	bl	__isoc99_sscanf
	mov	r3, r0
	cmp	r3, #1
	bne	.L52
	ldrb	r3, [fp, #-26]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, [fp, #-36]
	bl	rotateBased
	mov	r3, #5
	b	.L55
.L52:
	sub	r3, fp, #16
	sub	r2, fp, #20
	ldr	r1, .L57+24
	ldr	r0, [fp, #-12]
	bl	__isoc99_sscanf
	mov	r3, r0
	cmp	r3, #2
	bne	.L53
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-16]
	mov	r1, r3
	ldr	r0, [fp, #-36]
	bl	reversePositions
	mov	r3, #6
	b	.L55
.L53:
	sub	r3, fp, #16
	sub	r2, fp, #20
	ldr	r1, .L57+28
	ldr	r0, [fp, #-12]
	bl	__isoc99_sscanf
	mov	r3, r0
	cmp	r3, #2
	bne	.L54
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-16]
	mov	r1, r3
	ldr	r0, [fp, #-36]
	bl	movePosition
	mov	r3, #7
	b	.L55
.L54:
	ldr	r3, .L57+32
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	ldr	r1, .L57+36
	mov	r0, r3
	bl	fprintf
	mvn	r3, #0
.L55:
	ldr	r2, .L57
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L56
	bl	__stack_chk_fail
.L56:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L58:
	.align	2
.L57:
	.word	.LC17
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.word	stderr
	.word	.LC16
	.size	scramble, .-scramble
	.section	.rodata
	.align	2
.LC18:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	unscramble
	.syntax unified
	.arm
	.fpu softvfp
	.type	unscramble, %function
unscramble:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	str	r0, [fp, #-32]
	str	r1, [fp, #-36]
	str	r2, [fp, #-40]
	str	r3, [fp, #-44]
	ldr	r3, .L73
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r2, [fp, #-32]
	ldr	r1, [fp, #-44]
	ldr	r0, [fp, #-40]
	bl	getline
	mov	r3, r0
	cmp	r3, #0
	bne	.L60
	mov	r3, #0
	b	.L71
.L60:
	ldr	r3, [fp, #-40]
	ldr	r3, [r3]
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L62
	ldr	r3, [fp, #-12]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #10
	bne	.L63
.L62:
	mov	r3, #0
	b	.L71
.L63:
	mov	r1, #10
	ldr	r0, [fp, #-12]
	bl	strchr
	mov	r3, r0
	mov	r2, #0
	strb	r2, [r3]
	sub	r3, fp, #16
	sub	r2, fp, #20
	ldr	r1, .L73+4
	ldr	r0, [fp, #-12]
	bl	__isoc99_sscanf
	mov	r3, r0
	cmp	r3, #2
	bne	.L64
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-16]
	mov	r1, r3
	ldr	r0, [fp, #-36]
	bl	swapPos
	mov	r3, #1
	b	.L71
.L64:
	sub	r3, fp, #25
	sub	r2, fp, #26
	ldr	r1, .L73+8
	ldr	r0, [fp, #-12]
	bl	__isoc99_sscanf
	mov	r3, r0
	cmp	r3, #2
	bne	.L65
	ldrb	r3, [fp, #-26]	@ zero_extendqisi2
	ldrb	r2, [fp, #-25]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, [fp, #-36]
	bl	swapLetters
	mov	r3, #2
	b	.L71
.L65:
	sub	r3, fp, #24
	mov	r2, r3
	ldr	r1, .L73+12
	ldr	r0, [fp, #-12]
	bl	__isoc99_sscanf
	mov	r3, r0
	cmp	r3, #1
	bne	.L66
	ldr	r3, [fp, #-24]
	mov	r1, r3
	ldr	r0, [fp, #-36]
	bl	rotateRight
	mov	r3, #3
	b	.L71
.L66:
	sub	r3, fp, #24
	mov	r2, r3
	ldr	r1, .L73+16
	ldr	r0, [fp, #-12]
	bl	__isoc99_sscanf
	mov	r3, r0
	cmp	r3, #1
	bne	.L67
	ldr	r3, [fp, #-24]
	mov	r1, r3
	ldr	r0, [fp, #-36]
	bl	rotateLeft
	mov	r3, #4
	b	.L71
.L67:
	sub	r3, fp, #26
	mov	r2, r3
	ldr	r1, .L73+20
	ldr	r0, [fp, #-12]
	bl	__isoc99_sscanf
	mov	r3, r0
	cmp	r3, #1
	bne	.L68
	ldrb	r3, [fp, #-26]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, [fp, #-36]
	bl	rotateBasedReverse
	mov	r3, #5
	b	.L71
.L68:
	sub	r3, fp, #16
	sub	r2, fp, #20
	ldr	r1, .L73+24
	ldr	r0, [fp, #-12]
	bl	__isoc99_sscanf
	mov	r3, r0
	cmp	r3, #2
	bne	.L69
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-16]
	mov	r1, r3
	ldr	r0, [fp, #-36]
	bl	reversePositions
	mov	r3, #6
	b	.L71
.L69:
	sub	r3, fp, #16
	sub	r2, fp, #20
	ldr	r1, .L73+28
	ldr	r0, [fp, #-12]
	bl	__isoc99_sscanf
	mov	r3, r0
	cmp	r3, #2
	bne	.L70
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-20]
	mov	r1, r3
	ldr	r0, [fp, #-36]
	bl	movePosition
	mov	r3, #7
	b	.L71
.L70:
	ldr	r3, .L73+32
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	ldr	r1, .L73+36
	mov	r0, r3
	bl	fprintf
	mvn	r3, #0
.L71:
	ldr	r2, .L73
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L72
	bl	__stack_chk_fail
.L72:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L74:
	.align	2
.L73:
	.word	.LC18
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.word	stderr
	.word	.LC16
	.size	unscramble, .-unscramble
	.align	2
	.global	print
	.syntax unified
	.arm
	.fpu softvfp
	.type	print, %function
print:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #20
	str	r0, [fp, #-24]
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L76
.L77:
	ldr	r3, [fp, #-24]
	ldr	r4, [r3]
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-16]
	add	r2, r2, r3
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #8]
	mov	r1, r3
	mov	r0, r2
	bl	__aeabi_idivmod
	mov	r3, r1
	add	r3, r4, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	bl	putchar
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L76:
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #8]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	blt	.L77
	nop
	nop
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
	.size	print, .-print
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
