	.file	"133094.c"
	.intel_syntax noprefix
	.text
	.globl	codifica_messaggio
	.type	codifica_messaggio, @function
codifica_messaggio:
.LFB6:
	.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
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	codifica_messaggio, .-codifica_messaggio
	.globl	trova_chiave
	.type	trova_chiave, @function
trova_chiave:
.LFB7:
	.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
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	trova_chiave, .-trova_chiave
	.globl	decifra_messaggio
	.type	decifra_messaggio, @function
decifra_messaggio:
.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, 24
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	trova_chiave
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	neg	eax
	mov	edx, eax
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	codifica_messaggio
	mov	eax, DWORD PTR -4[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	decifra_messaggio, .-decifra_messaggio
	.section	.rodata
.LC0:
	.string	"%c"
	.text
	.globl	leggi_messaggio
	.type	leggi_messaggio, @function
leggi_messaggio:
.LFB9:
	.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -16[rbp], 0
.L8:
	lea	rax, -17[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], 1
	jne	.L6
	mov	eax, DWORD PTR -16[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -40[rbp]
	add	rdx, rax
	movzx	eax, BYTE PTR -17[rbp]
	mov	BYTE PTR [rdx], al
	add	DWORD PTR -16[rbp], 1
.L6:
	cmp	DWORD PTR -12[rbp], 1
	jne	.L7
	cmp	DWORD PTR -16[rbp], 3999
	jg	.L7
	movzx	eax, BYTE PTR -17[rbp]
	cmp	al, 46
	jne	.L8
.L7:
	mov	eax, DWORD PTR -16[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	leggi_messaggio, .-leggi_messaggio
	.section	.rodata
.LC1:
	.string	"[CHIAVE]"
.LC2:
	.string	"%d\n\n"
.LC3:
	.string	"[DECIFRATO]"
	.text
	.globl	main
	.type	main, @function
main:
.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, 4032
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -4016[rbp]
	mov	rdi, rax
	call	leggi_messaggio
	lea	rax, -4016[rbp]
	mov	rdi, rax
	call	decifra_messaggio
	mov	DWORD PTR -4020[rbp], eax
	lea	rdi, .LC1[rip]
	call	puts@PLT
	mov	eax, DWORD PTR -4020[rbp]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC3[rip]
	call	puts@PLT
	lea	rax, -4016[rbp]
	mov	rdi, rax
	call	puts@PLT
	mov	eax, 0
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.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	"133094.c"
	.text
	.align	2
	.global	codifica_messaggio
	.syntax unified
	.arm
	.fpu softvfp
	.type	codifica_messaggio, %function
codifica_messaggio:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	codifica_messaggio, .-codifica_messaggio
	.align	2
	.global	trova_chiave
	.syntax unified
	.arm
	.fpu softvfp
	.type	trova_chiave, %function
trova_chiave:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	nop
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	trova_chiave, .-trova_chiave
	.align	2
	.global	decifra_messaggio
	.syntax unified
	.arm
	.fpu softvfp
	.type	decifra_messaggio, %function
decifra_messaggio:
	@ 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, [fp, #-16]
	bl	trova_chiave
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	rsb	r3, r3, #0
	mov	r1, r3
	ldr	r0, [fp, #-16]
	bl	codifica_messaggio
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	decifra_messaggio, .-decifra_messaggio
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%c\000"
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	leggi_messaggio
	.syntax unified
	.arm
	.fpu softvfp
	.type	leggi_messaggio, %function
leggi_messaggio:
	@ 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, .L10
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-16]
.L8:
	sub	r3, fp, #17
	mov	r1, r3
	ldr	r0, .L10+4
	bl	__isoc99_scanf
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #1
	bne	.L6
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldrb	r2, [fp, #-17]	@ zero_extendqisi2
	strb	r2, [r3]
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L6:
	ldr	r3, [fp, #-12]
	cmp	r3, #1
	bne	.L7
	ldr	r3, [fp, #-16]
	cmp	r3, #4000
	bge	.L7
	ldrb	r3, [fp, #-17]	@ zero_extendqisi2
	cmp	r3, #46
	bne	.L8
.L7:
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	nop
	ldr	r3, .L10
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L9
	bl	__stack_chk_fail
.L9:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L11:
	.align	2
.L10:
	.word	.LC1
	.word	.LC0
	.size	leggi_messaggio, .-leggi_messaggio
	.section	.rodata
	.align	2
.LC2:
	.ascii	"[CHIAVE]\000"
	.align	2
.LC3:
	.ascii	"%d\012\012\000"
	.align	2
.LC4:
	.ascii	"[DECIFRATO]\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 = 4016
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #4016
	ldr	r3, .L15
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #4000
	sub	r3, r3, #4
	sub	r3, r3, #8
	mov	r0, r3
	bl	leggi_messaggio
	sub	r3, fp, #4000
	sub	r3, r3, #4
	sub	r3, r3, #8
	mov	r0, r3
	bl	decifra_messaggio
	str	r0, [fp, #-4016]
	ldr	r0, .L15+4
	bl	puts
	ldr	r1, [fp, #-4016]
	ldr	r0, .L15+8
	bl	printf
	ldr	r0, .L15+12
	bl	puts
	sub	r3, fp, #4000
	sub	r3, r3, #4
	sub	r3, r3, #8
	mov	r0, r3
	bl	puts
	mov	r3, #0
	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	.LC5
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
