	.file	"880020.c"
	.intel_syntax noprefix
	.text
	.globl	presentation_string
	.section	.rodata
	.align 32
	.type	presentation_string, @object
	.size	presentation_string, 85
presentation_string:
	.string	"Usage:\n  command key input\n\nAvailable commands:\n  encode   Encode\n  decode   Decode\n"
	.align 8
.LC0:
	.string	"Key phrase must contain only capital letters"
	.text
	.globl	shift
	.type	shift, @function
shift:
.LFB6:
	.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	QWORD PTR -40[rbp], rdi
	mov	DWORD PTR -44[rbp], esi
	mov	eax, DWORD PTR -44[rbp]
	movsx	rbx, eax
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rsi, rax
	mov	rax, rbx
	mov	edx, 0
	div	rsi
	mov	rcx, rdx
	mov	rax, rcx
	mov	DWORD PTR -20[rbp], eax
	mov	edx, DWORD PTR -20[rbp]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 64
	jle	.L2
	mov	edx, DWORD PTR -20[rbp]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 90
	jle	.L3
.L2:
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L3:
	mov	edx, DWORD PTR -20[rbp]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	sub	eax, 65
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	shift, .-shift
	.section	.rodata
.LC1:
	.string	"decode"
.LC2:
	.string	"encode"
	.align 8
.LC3:
	.string	"Usage:\n  command key input\n\nAvailable commands:\n  encode   Encode\n  decode   Decode"
	.align 8
.LC4:
	.string	"Ciphertext must contain only capital letters"
	.align 8
.LC5:
	.string	"Open text must contain only capital letters"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	push	r14
	push	r12
	push	rbx
	sub	rsp, 64
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 12, -40
	.cfi_offset 3, -48
	mov	DWORD PTR -68[rbp], edi
	mov	QWORD PTR -80[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -40[rbp], rax
	xor	eax, eax
	mov	rax, rsp
	mov	r12, rax
	cmp	DWORD PTR -68[rbp], 4
	jne	.L6
	mov	rax, QWORD PTR -80[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L7
	mov	rax, QWORD PTR -80[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L7
.L6:
	lea	rdi, .LC3[rip]
	call	puts@PLT
	mov	edi, 0
	call	exit@PLT
.L7:
	mov	rax, QWORD PTR -80[rbp]
	add	rax, 24
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	sub	rdx, 1
	mov	QWORD PTR -56[rbp], rdx
	mov	QWORD PTR -96[rbp], rax
	mov	QWORD PTR -88[rbp], 0
	mov	r14, rax
	mov	r15d, 0
	mov	edx, 16
	sub	rdx, 1
	add	rax, rdx
	mov	ebx, 16
	mov	edx, 0
	div	rbx
	imul	rax, rax, 16
	mov	rcx, rax
	and	rcx, -4096
	mov	rdx, rsp
	sub	rdx, rcx
.L8:
	cmp	rsp, rdx
	je	.L9
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	jmp	.L8
.L9:
	mov	rdx, rax
	and	edx, 4095
	sub	rsp, rdx
	mov	rdx, rax
	and	edx, 4095
	test	rdx, rdx
	je	.L10
	and	eax, 4095
	sub	rax, 8
	add	rax, rsp
	or	QWORD PTR [rax], 0
.L10:
	mov	rax, rsp
	add	rax, 0
	mov	QWORD PTR -48[rbp], rax
	mov	WORD PTR -62[rbp], 0
	jmp	.L11
.L22:
	mov	rax, QWORD PTR -80[rbp]
	add	rax, 24
	mov	rdx, QWORD PTR [rax]
	movzx	eax, WORD PTR -62[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	DWORD PTR -60[rbp], eax
	mov	rax, QWORD PTR -80[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L12
	cmp	DWORD PTR -60[rbp], 64
	jle	.L13
	cmp	DWORD PTR -60[rbp], 90
	jle	.L14
.L13:
	lea	rdi, .LC4[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L14:
	movzx	edx, WORD PTR -62[rbp]
	mov	rax, QWORD PTR -80[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	esi, edx
	mov	rdi, rax
	call	shift
	mov	edx, eax
	mov	eax, DWORD PTR -60[rbp]
	sub	eax, edx
	cmp	eax, 64
	jg	.L15
	mov	eax, DWORD PTR -60[rbp]
	mov	ebx, eax
	movzx	edx, WORD PTR -62[rbp]
	mov	rax, QWORD PTR -80[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	esi, edx
	mov	rdi, rax
	call	shift
	mov	edx, eax
	mov	eax, ebx
	sub	eax, edx
	add	eax, 26
	mov	ecx, eax
	jmp	.L16
.L15:
	mov	eax, DWORD PTR -60[rbp]
	mov	ebx, eax
	movzx	edx, WORD PTR -62[rbp]
	mov	rax, QWORD PTR -80[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	esi, edx
	mov	rdi, rax
	call	shift
	mov	edx, eax
	mov	eax, ebx
	sub	eax, edx
	mov	ecx, eax
.L16:
	movzx	eax, WORD PTR -62[rbp]
	mov	rdx, QWORD PTR -48[rbp]
	cdqe
	mov	BYTE PTR [rdx+rax], cl
	jmp	.L17
.L12:
	cmp	DWORD PTR -60[rbp], 64
	jle	.L18
	cmp	DWORD PTR -60[rbp], 90
	jle	.L19
.L18:
	lea	rdi, .LC5[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L19:
	movzx	edx, WORD PTR -62[rbp]
	mov	rax, QWORD PTR -80[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	esi, edx
	mov	rdi, rax
	call	shift
	mov	edx, DWORD PTR -60[rbp]
	add	eax, edx
	cmp	eax, 90
	jle	.L20
	movzx	edx, WORD PTR -62[rbp]
	mov	rax, QWORD PTR -80[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	esi, edx
	mov	rdi, rax
	call	shift
	mov	edx, eax
	mov	eax, DWORD PTR -60[rbp]
	add	eax, edx
	sub	eax, 26
	mov	ecx, eax
	jmp	.L21
.L20:
	movzx	edx, WORD PTR -62[rbp]
	mov	rax, QWORD PTR -80[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	esi, edx
	mov	rdi, rax
	call	shift
	mov	edx, eax
	mov	eax, DWORD PTR -60[rbp]
	add	eax, edx
	mov	ecx, eax
.L21:
	movzx	eax, WORD PTR -62[rbp]
	mov	rdx, QWORD PTR -48[rbp]
	cdqe
	mov	BYTE PTR [rdx+rax], cl
.L17:
	movzx	eax, WORD PTR -62[rbp]
	add	eax, 1
	mov	WORD PTR -62[rbp], ax
.L11:
	movzx	ebx, WORD PTR -62[rbp]
	mov	rax, QWORD PTR -80[rbp]
	add	rax, 24
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	strlen@PLT
	cmp	rbx, rax
	jb	.L22
	mov	rax, QWORD PTR -48[rbp]
	mov	rdi, rax
	call	puts@PLT
	mov	eax, 0
	mov	rsp, r12
	mov	rbx, QWORD PTR -40[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L24
	call	__stack_chk_fail@PLT
.L24:
	lea	rsp, -32[rbp]
	pop	rbx
	pop	r12
	pop	r14
	pop	r15
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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	"880020.c"
	.text
	.global	presentation_string
	.section	.rodata
	.align	2
	.type	presentation_string, %object
	.size	presentation_string, 85
presentation_string:
	.ascii	"Usage:\012  command key input\012\012Available comm"
	.ascii	"ands:\012  encode   Encode\012  decode   Decode\012"
	.ascii	"\000"
	.global	__aeabi_uidivmod
	.align	2
.LC0:
	.ascii	"Key phrase must contain only capital letters\000"
	.text
	.align	2
	.global	shift
	.syntax unified
	.arm
	.fpu softvfp
	.type	shift, %function
shift:
	@ 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]
	str	r1, [fp, #-28]
	ldr	r4, [fp, #-28]
	ldr	r0, [fp, #-24]
	bl	strlen
	mov	r3, r0
	mov	r1, r3
	mov	r0, r4
	bl	__aeabi_uidivmod
	mov	r3, r1
	str	r3, [fp, #-16]
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #64
	bls	.L2
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #90
	bls	.L3
.L2:
	ldr	r0, .L5
	bl	puts
	mov	r0, #1
	bl	exit
.L3:
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	sub	r3, r3, #65
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L6:
	.align	2
.L5:
	.word	.LC0
	.size	shift, .-shift
	.section	.rodata
	.align	2
.LC1:
	.ascii	"decode\000"
	.align	2
.LC2:
	.ascii	"encode\000"
	.align	2
.LC3:
	.ascii	"Usage:\012  command key input\012\012Available comm"
	.ascii	"ands:\012  encode   Encode\012  decode   Decode\000"
	.align	2
.LC4:
	.ascii	"Ciphertext must contain only capital letters\000"
	.align	2
.LC5:
	.ascii	"Open text must contain only capital letters\000"
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #32
	str	r0, [fp, #-40]
	str	r1, [fp, #-44]
	ldr	r3, .L24
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, sp
	mov	r5, r3
	ldr	r3, [fp, #-40]
	cmp	r3, #4
	bne	.L8
	ldr	r3, [fp, #-44]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L24+4
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L9
	ldr	r3, [fp, #-44]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L24+8
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L9
.L8:
	ldr	r0, .L24+12
	bl	puts
	mov	r0, #0
	bl	exit
.L9:
	ldr	r3, [fp, #-44]
	add	r3, r3, #12
	ldr	r3, [r3]
	mov	r0, r3
	bl	strlen
	mov	ip, r0
	mov	r3, ip
	sub	r3, r3, #1
	str	r3, [fp, #-28]
	mov	r0, ip
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #3
	orr	r3, r3, r0, lsr #29
	lsl	r2, r0, #3
	mov	r0, ip
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #3
	orr	r3, r3, r0, lsr #29
	lsl	r2, r0, #3
	add	r3, ip, #7
	lsr	r3, r3, #3
	lsl	r3, r3, #3
	sub	sp, sp, r3
	mov	r3, sp
	add	r3, r3, #0
	str	r3, [fp, #-24]
	mov	r3, #0
	strh	r3, [fp, #-30]	@ movhi
	b	.L10
.L21:
	ldr	r3, [fp, #-44]
	add	r3, r3, #12
	ldr	r2, [r3]
	ldrh	r3, [fp, #-30]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-44]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L24+4
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L11
	ldr	r3, [fp, #-20]
	cmp	r3, #64
	ble	.L12
	ldr	r3, [fp, #-20]
	cmp	r3, #90
	ble	.L13
.L12:
	ldr	r0, .L24+16
	bl	puts
	mov	r0, #1
	bl	exit
.L13:
	ldr	r3, [fp, #-44]
	add	r3, r3, #8
	ldr	r3, [r3]
	ldrh	r2, [fp, #-30]
	mov	r1, r2
	mov	r0, r3
	bl	shift
	mov	r2, r0
	ldr	r3, [fp, #-20]
	sub	r3, r3, r2
	cmp	r3, #64
	bgt	.L14
	ldr	r3, [fp, #-20]
	and	r4, r3, #255
	ldr	r3, [fp, #-44]
	add	r3, r3, #8
	ldr	r3, [r3]
	ldrh	r2, [fp, #-30]
	mov	r1, r2
	mov	r0, r3
	bl	shift
	mov	r3, r0
	and	r3, r3, #255
	sub	r3, r4, r3
	and	r3, r3, #255
	add	r3, r3, #26
	and	r3, r3, #255
	b	.L15
.L14:
	ldr	r3, [fp, #-20]
	and	r4, r3, #255
	ldr	r3, [fp, #-44]
	add	r3, r3, #8
	ldr	r3, [r3]
	ldrh	r2, [fp, #-30]
	mov	r1, r2
	mov	r0, r3
	bl	shift
	mov	r3, r0
	and	r3, r3, #255
	sub	r3, r4, r3
	and	r3, r3, #255
.L15:
	ldrh	r2, [fp, #-30]
	ldr	r1, [fp, #-24]
	strb	r3, [r1, r2]
	b	.L16
.L11:
	ldr	r3, [fp, #-20]
	cmp	r3, #64
	ble	.L17
	ldr	r3, [fp, #-20]
	cmp	r3, #90
	ble	.L18
.L17:
	ldr	r0, .L24+20
	bl	puts
	mov	r0, #1
	bl	exit
.L18:
	ldr	r3, [fp, #-44]
	add	r3, r3, #8
	ldr	r3, [r3]
	ldrh	r2, [fp, #-30]
	mov	r1, r2
	mov	r0, r3
	bl	shift
	mov	r2, r0
	ldr	r3, [fp, #-20]
	add	r3, r2, r3
	cmp	r3, #90
	ble	.L19
	ldr	r3, [fp, #-44]
	add	r3, r3, #8
	ldr	r3, [r3]
	ldrh	r2, [fp, #-30]
	mov	r1, r2
	mov	r0, r3
	bl	shift
	mov	r3, r0
	and	r2, r3, #255
	ldr	r3, [fp, #-20]
	and	r3, r3, #255
	add	r3, r2, r3
	and	r3, r3, #255
	sub	r3, r3, #26
	and	r3, r3, #255
	b	.L20
.L19:
	ldr	r3, [fp, #-44]
	add	r3, r3, #8
	ldr	r3, [r3]
	ldrh	r2, [fp, #-30]
	mov	r1, r2
	mov	r0, r3
	bl	shift
	mov	r3, r0
	and	r2, r3, #255
	ldr	r3, [fp, #-20]
	and	r3, r3, #255
	add	r3, r2, r3
	and	r3, r3, #255
.L20:
	ldrh	r2, [fp, #-30]
	ldr	r1, [fp, #-24]
	strb	r3, [r1, r2]
.L16:
	ldrh	r3, [fp, #-30]
	add	r3, r3, #1
	strh	r3, [fp, #-30]	@ movhi
.L10:
	ldrh	r4, [fp, #-30]
	ldr	r3, [fp, #-44]
	add	r3, r3, #12
	ldr	r3, [r3]
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	cmp	r4, r3
	bcc	.L21
	ldr	r0, [fp, #-24]
	bl	puts
	mov	r3, #0
	mov	sp, r5
	ldr	r2, .L24
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L23
	bl	__stack_chk_fail
.L23:
	mov	r0, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L25:
	.align	2
.L24:
	.word	.LC6
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
