	.file	"977309.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Please input a string: "
.LC1:
	.string	"%s"
	.align 8
.LC2:
	.string	"Please input an even offset between 0 and 255: "
.LC3:
	.string	"%d"
.LC4:
	.string	"After Cipher: %s"
	.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, 48
	mov	DWORD PTR -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	lea	rdi, .LC2[rip]
	call	puts@PLT
	lea	rax, -20[rbp]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	edx, DWORD PTR -20[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	Cipher
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L3
	call	__stack_chk_fail@PLT
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	GetWrapAround
	.type	GetWrapAround, @function
GetWrapAround:
.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	eax, edi
	mov	BYTE PTR -20[rbp], al
	cmp	BYTE PTR -20[rbp], 122
	jbe	.L5
	movzx	eax, BYTE PTR -20[rbp]
	sub	eax, 122
	mov	BYTE PTR -1[rbp], al
	cmp	BYTE PTR -1[rbp], 25
	jbe	.L6
	movzx	eax, BYTE PTR -1[rbp]
	add	eax, 65
	movzx	eax, al
	mov	edi, eax
	call	GetWrapAround
	jmp	.L4
.L6:
	movzx	eax, BYTE PTR -1[rbp]
	add	eax, 65
	jmp	.L4
.L5:
	cmp	BYTE PTR -20[rbp], 64
	ja	.L8
	mov	eax, 65
	sub	al, BYTE PTR -20[rbp]
	mov	BYTE PTR -2[rbp], al
	cmp	BYTE PTR -2[rbp], 25
	jbe	.L9
	movzx	eax, BYTE PTR -2[rbp]
	add	eax, 65
	movzx	eax, al
	mov	edi, eax
	call	GetWrapAround
	jmp	.L4
.L9:
	movzx	eax, BYTE PTR -2[rbp]
	add	eax, 65
	jmp	.L4
.L8:
	cmp	BYTE PTR -20[rbp], 90
	jbe	.L10
	cmp	BYTE PTR -20[rbp], 96
	ja	.L10
	movzx	eax, BYTE PTR -20[rbp]
	sub	eax, 90
	mov	BYTE PTR -3[rbp], al
	cmp	BYTE PTR -3[rbp], 25
	jbe	.L11
	movzx	eax, BYTE PTR -3[rbp]
	add	eax, 97
	movzx	eax, al
	mov	edi, eax
	call	GetWrapAround
	jmp	.L4
.L11:
	movzx	eax, BYTE PTR -3[rbp]
	add	eax, 97
	jmp	.L4
.L10:
	cmp	BYTE PTR -20[rbp], 96
	ja	.L12
	cmp	BYTE PTR -20[rbp], 97
	jbe	.L13
	movzx	eax, BYTE PTR -20[rbp]
	add	eax, 25
	movzx	eax, al
	mov	edi, eax
	call	GetWrapAround
	jmp	.L4
.L13:
	movzx	eax, BYTE PTR -20[rbp]
	add	eax, 25
	jmp	.L4
.L12:
.L4:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	GetWrapAround, .-GetWrapAround
	.section	.rodata
.LC5:
	.string	"Before Cipher: "
	.text
	.globl	Cipher
	.type	Cipher, @function
Cipher:
.LFB2:
	.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
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L15
.L20:
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	edi, eax
	call	putchar@PLT
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR [rax]
	mov	edx, eax
	mov	eax, DWORD PTR -28[rbp]
	add	eax, edx
	mov	BYTE PTR -1[rbp], al
	cmp	BYTE PTR -1[rbp], 90
	jbe	.L16
	cmp	BYTE PTR -1[rbp], 96
	ja	.L16
	movzx	eax, BYTE PTR -1[rbp]
	mov	edi, eax
	call	GetWrapAround
	mov	edx, eax
	mov	rax, QWORD PTR -24[rbp]
	mov	BYTE PTR [rax], dl
	jmp	.L17
.L16:
	cmp	BYTE PTR -1[rbp], 122
	ja	.L18
	cmp	BYTE PTR -1[rbp], 64
	ja	.L19
.L18:
	movzx	eax, BYTE PTR -1[rbp]
	mov	edi, eax
	call	GetWrapAround
	mov	edx, eax
	mov	rax, QWORD PTR -24[rbp]
	mov	BYTE PTR [rax], dl
	jmp	.L17
.L19:
	movzx	edx, BYTE PTR -1[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	BYTE PTR [rax], dl
.L17:
	add	QWORD PTR -24[rbp], 1
.L15:
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L20
	mov	edi, 10
	call	putchar@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	Cipher, .-Cipher
	.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	"977309.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Please input a string: \000"
	.align	2
.LC1:
	.ascii	"%s\000"
	.align	2
.LC2:
	.ascii	"Please input an even offset between 0 and 255: \000"
	.align	2
.LC3:
	.ascii	"%d\000"
	.align	2
.LC4:
	.ascii	"After Cipher: %s\000"
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ 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]
	str	r1, [fp, #-28]
	ldr	r3, .L4
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, .L4+4
	bl	puts
	ldr	r1, [fp, #-12]
	ldr	r0, .L4+8
	bl	__isoc99_scanf
	ldr	r0, .L4+12
	bl	puts
	sub	r3, fp, #16
	mov	r1, r3
	ldr	r0, .L4+16
	bl	__isoc99_scanf
	ldr	r3, [fp, #-16]
	mov	r1, r3
	ldr	r0, [fp, #-12]
	bl	Cipher
	ldr	r1, [fp, #-12]
	ldr	r0, .L4+20
	bl	printf
	mov	r3, #0
	ldr	r2, .L4
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L3
	bl	__stack_chk_fail
.L3:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L5:
	.align	2
.L4:
	.word	.LC5
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.size	main, .-main
	.align	2
	.global	GetWrapAround
	.syntax unified
	.arm
	.fpu softvfp
	.type	GetWrapAround, %function
GetWrapAround:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	mov	r3, r0
	strb	r3, [fp, #-13]
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	cmp	r3, #122
	bls	.L7
	ldrb	r3, [fp, #-13]
	sub	r3, r3, #122
	strb	r3, [fp, #-5]
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #25
	bls	.L8
	ldrb	r3, [fp, #-5]
	add	r3, r3, #65
	and	r3, r3, #255
	mov	r0, r3
	bl	GetWrapAround
	mov	r3, r0
	b	.L6
.L8:
	ldrb	r3, [fp, #-5]
	add	r3, r3, #65
	and	r3, r3, #255
	b	.L6
.L7:
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	cmp	r3, #64
	bhi	.L10
	ldrb	r3, [fp, #-13]
	rsb	r3, r3, #65
	strb	r3, [fp, #-6]
	ldrb	r3, [fp, #-6]	@ zero_extendqisi2
	cmp	r3, #25
	bls	.L11
	ldrb	r3, [fp, #-6]
	add	r3, r3, #65
	and	r3, r3, #255
	mov	r0, r3
	bl	GetWrapAround
	mov	r3, r0
	b	.L6
.L11:
	ldrb	r3, [fp, #-6]
	add	r3, r3, #65
	and	r3, r3, #255
	b	.L6
.L10:
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	cmp	r3, #90
	bls	.L12
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	cmp	r3, #96
	bhi	.L12
	ldrb	r3, [fp, #-13]
	sub	r3, r3, #90
	strb	r3, [fp, #-7]
	ldrb	r3, [fp, #-7]	@ zero_extendqisi2
	cmp	r3, #25
	bls	.L13
	ldrb	r3, [fp, #-7]
	add	r3, r3, #97
	and	r3, r3, #255
	mov	r0, r3
	bl	GetWrapAround
	mov	r3, r0
	b	.L6
.L13:
	ldrb	r3, [fp, #-7]
	add	r3, r3, #97
	and	r3, r3, #255
	b	.L6
.L12:
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	cmp	r3, #96
	bhi	.L14
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	cmp	r3, #97
	bls	.L15
	ldrb	r3, [fp, #-13]
	add	r3, r3, #25
	and	r3, r3, #255
	mov	r0, r3
	bl	GetWrapAround
	mov	r3, r0
	b	.L6
.L15:
	ldrb	r3, [fp, #-13]
	add	r3, r3, #25
	and	r3, r3, #255
	b	.L6
.L14:
.L6:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	GetWrapAround, .-GetWrapAround
	.section	.rodata
	.align	2
.LC6:
	.ascii	"Before Cipher: \000"
	.text
	.align	2
	.global	Cipher
	.syntax unified
	.arm
	.fpu softvfp
	.type	Cipher, %function
Cipher:
	@ 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]
	str	r1, [fp, #-20]
	ldr	r0, .L23
	bl	printf
	b	.L17
.L22:
	ldr	r3, [fp, #-16]
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	bl	putchar
	ldr	r3, [fp, #-16]
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r3, [fp, #-20]
	and	r3, r3, #255
	add	r3, r2, r3
	strb	r3, [fp, #-5]
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #90
	bls	.L18
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #96
	bhi	.L18
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	mov	r0, r3
	bl	GetWrapAround
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-16]
	strb	r2, [r3]
	b	.L19
.L18:
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #122
	bhi	.L20
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #64
	bhi	.L21
.L20:
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	mov	r0, r3
	bl	GetWrapAround
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-16]
	strb	r2, [r3]
	b	.L19
.L21:
	ldr	r3, [fp, #-16]
	ldrb	r2, [fp, #-5]
	strb	r2, [r3]
.L19:
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L17:
	ldr	r3, [fp, #-16]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L22
	mov	r0, #10
	bl	putchar
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L24:
	.align	2
.L23:
	.word	.LC6
	.size	Cipher, .-Cipher
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
