	.file	"476007.c"
	.intel_syntax noprefix
	.text
	.globl	no_spaces
	.bss
	.align 32
	.type	no_spaces, @object
	.size	no_spaces, 255
no_spaces:
	.zero	255
	.globl	with_spaces
	.align 32
	.type	with_spaces, @object
	.size	with_spaces, 255
with_spaces:
	.zero	255
	.globl	key
	.align 32
	.type	key, @object
	.size	key, 80
key:
	.zero	80
	.globl	shifted_key
	.align 32
	.type	shifted_key, @object
	.size	shifted_key, 80
shifted_key:
	.zero	80
	.section	.rodata
.LC0:
	.string	"KEY"
.LC1:
	.string	"%s"
.LC2:
	.string	"No solution found"
	.text
	.globl	main
	.type	main, @function
main:
.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, 288
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -276[rbp], 0
	mov	BYTE PTR no_spaces[rip], 0
	mov	BYTE PTR with_spaces[rip], 0
	jmp	.L2
.L5:
	cmp	DWORD PTR -276[rbp], 0
	je	.L3
	lea	rax, -272[rbp]
	mov	rsi, rax
	lea	rdi, key[rip]
	call	strcpy@PLT
	mov	DWORD PTR -276[rbp], 0
	jmp	.L2
.L3:
	lea	rax, -272[rbp]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L4
	mov	DWORD PTR -276[rbp], 1
	jmp	.L2
.L4:
	lea	rax, -272[rbp]
	mov	rsi, rax
	lea	rdi, no_spaces[rip]
	call	strcat@PLT
	lea	rax, -272[rbp]
	mov	rsi, rax
	lea	rdi, with_spaces[rip]
	call	strcat@PLT
	lea	rdi, with_spaces[rip]
	call	strlen@PLT
	mov	rdx, rax
	lea	rax, with_spaces[rip]
	add	rax, rdx
	mov	WORD PTR [rax], 32
.L2:
	lea	rax, -272[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	cmp	eax, 1
	je	.L5
	mov	DWORD PTR -280[rbp], 99
	mov	DWORD PTR -284[rbp], 0
	jmp	.L6
.L9:
	mov	eax, DWORD PTR -284[rbp]
	mov	edi, eax
	call	key_shift
	lea	rsi, shifted_key[rip]
	lea	rdi, no_spaces[rip]
	call	strstr@PLT
	test	rax, rax
	je	.L7
	mov	eax, DWORD PTR -284[rbp]
	mov	DWORD PTR -280[rbp], eax
	jmp	.L8
.L7:
	add	DWORD PTR -284[rbp], 1
.L6:
	cmp	DWORD PTR -284[rbp], 25
	jle	.L9
.L8:
	cmp	DWORD PTR -280[rbp], 99
	jne	.L10
	lea	rdi, .LC2[rip]
	call	puts@PLT
	mov	eax, 0
	jmp	.L12
.L10:
	mov	eax, DWORD PTR -280[rbp]
	mov	edi, eax
	call	print_decoded
	mov	eax, 0
.L12:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	key_shift
	.type	key_shift, @function
key_shift:
.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, 32
	mov	DWORD PTR -20[rbp], edi
	lea	rdi, key[rip]
	call	strlen@PLT
	mov	DWORD PTR -4[rbp], eax
	mov	DWORD PTR -8[rbp], 0
	jmp	.L15
.L16:
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, key[rip]
	movzx	eax, BYTE PTR [rax+rdx]
	movsx	eax, al
	lea	edx, -65[rax]
	mov	eax, DWORD PTR -20[rbp]
	add	eax, edx
	movsx	rdx, eax
	imul	rdx, rdx, 1321528399
	shr	rdx, 32
	sar	edx, 3
	mov	ecx, eax
	sar	ecx, 31
	sub	edx, ecx
	imul	ecx, edx, 26
	sub	eax, ecx
	mov	edx, eax
	mov	eax, edx
	add	eax, 65
	mov	ecx, eax
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, shifted_key[rip]
	mov	BYTE PTR [rax+rdx], cl
	add	DWORD PTR -8[rbp], 1
.L15:
	mov	eax, DWORD PTR -8[rbp]
	cmp	eax, DWORD PTR -4[rbp]
	jl	.L16
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	key_shift, .-key_shift
	.section	.rodata
.LC3:
	.string	"\n"
	.text
	.globl	print_decoded
	.type	print_decoded, @function
print_decoded:
.LFB2:
	.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, 40
	.cfi_offset 3, -24
	mov	DWORD PTR -36[rbp], edi
	mov	eax, 26
	sub	eax, DWORD PTR -36[rbp]
	mov	DWORD PTR -20[rbp], eax
	mov	eax, 26
	sub	eax, DWORD PTR -36[rbp]
	mov	DWORD PTR -20[rbp], eax
	mov	DWORD PTR -24[rbp], 0
	jmp	.L18
.L21:
	mov	eax, DWORD PTR -24[rbp]
	cdqe
	lea	rdx, with_spaces[rip]
	movzx	eax, BYTE PTR [rax+rdx]
	mov	BYTE PTR -25[rbp], al
	call	__ctype_b_loc@PLT
	mov	rdx, QWORD PTR [rax]
	movsx	rax, BYTE PTR -25[rbp]
	add	rax, rax
	add	rax, rdx
	movzx	eax, WORD PTR [rax]
	movzx	eax, ax
	and	eax, 1024
	test	eax, eax
	je	.L19
	movsx	eax, BYTE PTR -25[rbp]
	lea	edx, -65[rax]
	mov	eax, DWORD PTR -20[rbp]
	add	edx, eax
	movsx	rax, edx
	imul	rax, rax, 1321528399
	shr	rax, 32
	sar	eax, 3
	mov	ecx, edx
	sar	ecx, 31
	sub	eax, ecx
	imul	ecx, eax, 26
	mov	eax, edx
	sub	eax, ecx
	add	eax, 65
	mov	edi, eax
	call	putchar@PLT
	jmp	.L20
.L19:
	movsx	eax, BYTE PTR -25[rbp]
	mov	edi, eax
	call	putchar@PLT
.L20:
	add	DWORD PTR -24[rbp], 1
.L18:
	mov	eax, DWORD PTR -24[rbp]
	movsx	rbx, eax
	lea	rdi, with_spaces[rip]
	call	strlen@PLT
	cmp	rbx, rax
	jb	.L21
	lea	rdi, .LC3[rip]
	call	puts@PLT
	nop
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	print_decoded, .-print_decoded
	.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	"476007.c"
	.text
	.comm	no_spaces,255,4
	.comm	with_spaces,255,4
	.comm	key,80,4
	.comm	shifted_key,80,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"KEY\000"
	.align	2
.LC1:
	.ascii	" \000"
	.align	2
.LC2:
	.ascii	"%s\000"
	.align	2
.LC3:
	.ascii	"No solution found\000"
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 272
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #272
	ldr	r3, .L14
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-268]
	ldr	r3, .L14+4
	mov	r2, #0
	strb	r2, [r3]
	ldr	r3, .L14+8
	mov	r2, #0
	strb	r2, [r3]
	b	.L2
.L5:
	ldr	r3, [fp, #-268]
	cmp	r3, #0
	beq	.L3
	sub	r3, fp, #264
	mov	r1, r3
	ldr	r0, .L14+12
	bl	strcpy
	mov	r3, #0
	str	r3, [fp, #-268]
	b	.L2
.L3:
	sub	r3, fp, #264
	ldr	r1, .L14+16
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L4
	mov	r3, #1
	str	r3, [fp, #-268]
	b	.L2
.L4:
	sub	r3, fp, #264
	mov	r1, r3
	ldr	r0, .L14+4
	bl	strcat
	sub	r3, fp, #264
	mov	r1, r3
	ldr	r0, .L14+8
	bl	strcat
	ldr	r0, .L14+8
	bl	strlen
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L14+8
	add	r3, r2, r3
	ldr	r2, .L14+20
	mov	r0, r3
	mov	r1, r2
	mov	r3, #2
	mov	r2, r3
	bl	memcpy
.L2:
	sub	r3, fp, #264
	mov	r1, r3
	ldr	r0, .L14+24
	bl	__isoc99_scanf
	mov	r3, r0
	cmp	r3, #1
	beq	.L5
	mov	r3, #99
	str	r3, [fp, #-272]
	mov	r3, #0
	str	r3, [fp, #-276]
	b	.L6
.L9:
	ldr	r0, [fp, #-276]
	bl	key_shift
	ldr	r1, .L14+28
	ldr	r0, .L14+4
	bl	strstr
	mov	r3, r0
	cmp	r3, #0
	beq	.L7
	ldr	r3, [fp, #-276]
	str	r3, [fp, #-272]
	b	.L8
.L7:
	ldr	r3, [fp, #-276]
	add	r3, r3, #1
	str	r3, [fp, #-276]
.L6:
	ldr	r3, [fp, #-276]
	cmp	r3, #25
	ble	.L9
.L8:
	ldr	r3, [fp, #-272]
	cmp	r3, #99
	bne	.L10
	ldr	r0, .L14+32
	bl	puts
	mov	r3, #0
	b	.L12
.L10:
	ldr	r0, [fp, #-272]
	bl	print_decoded
	mov	r3, #0
.L12:
	ldr	r2, .L14
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L13
	bl	__stack_chk_fail
.L13:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L15:
	.align	2
.L14:
	.word	.LC4
	.word	no_spaces
	.word	with_spaces
	.word	key
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	shifted_key
	.word	.LC3
	.size	main, .-main
	.align	2
	.global	key_shift
	.syntax unified
	.arm
	.fpu softvfp
	.type	key_shift, %function
key_shift:
	@ 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]
	ldr	r0, .L19
	bl	strlen
	mov	r3, r0
	str	r3, [fp, #-8]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L17
.L18:
	ldr	r2, .L19
	ldr	r3, [fp, #-12]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	sub	r2, r3, #65
	ldr	r3, [fp, #-16]
	add	r1, r2, r3
	ldr	r3, .L19+4
	smull	r2, r3, r1, r3
	asr	r2, r3, #3
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #1
	sub	r2, r1, r3
	and	r3, r2, #255
	add	r3, r3, #65
	and	r1, r3, #255
	ldr	r2, .L19+8
	ldr	r3, [fp, #-12]
	add	r3, r2, r3
	mov	r2, r1
	strb	r2, [r3]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L17:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-8]
	cmp	r2, r3
	blt	.L18
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L20:
	.align	2
.L19:
	.word	key
	.word	1321528399
	.word	shifted_key
	.size	key_shift, .-key_shift
	.section	.rodata
	.align	2
.LC5:
	.ascii	"\012\000"
	.text
	.align	2
	.global	print_decoded
	.syntax unified
	.arm
	.fpu softvfp
	.type	print_decoded, %function
print_decoded:
	@ 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]
	ldr	r3, [fp, #-24]
	rsb	r3, r3, #26
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-24]
	rsb	r3, r3, #26
	str	r3, [fp, #-8]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L22
.L25:
	ldr	r2, .L26
	ldr	r3, [fp, #-12]
	add	r3, r2, r3
	ldrb	r3, [r3]
	strb	r3, [fp, #-13]
	bl	__ctype_b_loc
	mov	r3, r0
	ldr	r2, [r3]
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r3, [r3]
	and	r3, r3, #1024
	cmp	r3, #0
	beq	.L23
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	sub	r2, r3, #65
	ldr	r3, [fp, #-8]
	add	r1, r2, r3
	ldr	r3, .L26+4
	smull	r2, r3, r1, r3
	asr	r2, r3, #3
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #1
	sub	r2, r1, r3
	add	r3, r2, #65
	mov	r0, r3
	bl	putchar
	b	.L24
.L23:
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	mov	r0, r3
	bl	putchar
.L24:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L22:
	ldr	r0, .L26
	bl	strlen
	mov	r2, r0
	ldr	r3, [fp, #-12]
	cmp	r2, r3
	bhi	.L25
	ldr	r0, .L26+8
	bl	puts
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L27:
	.align	2
.L26:
	.word	with_spaces
	.word	1321528399
	.word	.LC5
	.size	print_decoded, .-print_decoded
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
