	.file	"326550.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 16
	.type	alphabet, @object
	.size	alphabet, 26
alphabet:
	.ascii	"abcdefghijklmnopqrstuvwxyz"
	.data
	.align 4
	.type	mod, @object
	.size	mod, 4
mod:
	.long	26
	.section	.rodata
	.align 8
.LC0:
	.string	"Chiffrement par substitution\nalphabet {%s} de %d lettres\n\n"
	.align 8
.LC1:
	.string	"Saisir une phrase pour g\303\251n\303\251rer les permutations ?"
.LC2:
	.string	" %127[^\n]s"
.LC3:
	.string	"permut : %s\n"
.LC4:
	.string	"Message ?"
.LC5:
	.string	" %511[^\n]s"
.LC6:
	.string	"MSG = \"%s\"\n"
.LC7:
	.string	"ENC = \"%s\"\n"
.LC8:
	.string	"DEC = \"%s\"\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
	push	rbx
	sub	rsp, 728
	.cfi_offset 3, -24
	mov	DWORD PTR -708[rbp], edi
	mov	QWORD PTR -720[rbp], rsi
	mov	QWORD PTR -728[rbp], rdx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -692[rbp], 0
	mov	eax, DWORD PTR mod[rip]
	cdqe
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -688[rbp], rax
	mov	eax, DWORD PTR mod[rip]
	mov	edx, eax
	lea	rsi, alphabet[rip]
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC1[rip]
	call	puts@PLT
	lea	rax, -672[rbp]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	DWORD PTR -696[rbp], 0
	jmp	.L2
.L4:
	mov	eax, DWORD PTR -696[rbp]
	cdqe
	movzx	eax, BYTE PTR -672[rbp+rax]
	movsx	eax, al
	mov	esi, eax
	lea	rdi, alphabet[rip]
	call	strchr@PLT
	mov	QWORD PTR -680[rbp], rax
	cmp	QWORD PTR -680[rbp], 0
	je	.L3
	mov	eax, DWORD PTR -696[rbp]
	cdqe
	movzx	eax, BYTE PTR -672[rbp+rax]
	movsx	edx, al
	mov	rax, QWORD PTR -688[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	strchr@PLT
	test	rax, rax
	jne	.L3
	mov	eax, DWORD PTR -692[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -688[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -696[rbp]
	cdqe
	movzx	eax, BYTE PTR -672[rbp+rax]
	mov	BYTE PTR [rdx], al
	add	DWORD PTR -692[rbp], 1
.L3:
	add	DWORD PTR -696[rbp], 1
.L2:
	mov	eax, DWORD PTR -696[rbp]
	movsx	rbx, eax
	lea	rax, -672[rbp]
	mov	rdi, rax
	call	strlen@PLT
	cmp	rbx, rax
	jb	.L4
	mov	DWORD PTR -696[rbp], 0
	jmp	.L5
.L7:
	mov	eax, DWORD PTR -696[rbp]
	cdqe
	lea	rdx, alphabet[rip]
	movzx	eax, BYTE PTR [rax+rdx]
	movsx	edx, al
	mov	rax, QWORD PTR -688[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	strchr@PLT
	test	rax, rax
	jne	.L6
	mov	eax, DWORD PTR -692[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -688[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -696[rbp]
	cdqe
	lea	rcx, alphabet[rip]
	movzx	eax, BYTE PTR [rax+rcx]
	mov	BYTE PTR [rdx], al
	add	DWORD PTR -692[rbp], 1
.L6:
	add	DWORD PTR -696[rbp], 1
.L5:
	mov	eax, DWORD PTR mod[rip]
	cmp	DWORD PTR -696[rbp], eax
	jl	.L7
	mov	rax, QWORD PTR -688[rbp]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC4[rip]
	call	puts@PLT
	lea	rax, -544[rbp]
	mov	rsi, rax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	lea	rax, -544[rbp]
	mov	rsi, rax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rdx, QWORD PTR -688[rbp]
	lea	rax, -544[rbp]
	lea	rsi, alphabet[rip]
	mov	rdi, rax
	call	substitution
	lea	rax, -544[rbp]
	mov	rsi, rax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rcx, QWORD PTR -688[rbp]
	lea	rax, -544[rbp]
	lea	rdx, alphabet[rip]
	mov	rsi, rcx
	mov	rdi, rax
	call	substitution
	lea	rax, -544[rbp]
	mov	rsi, rax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	mov	rbx, QWORD PTR -24[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.globl	substitution
	.type	substitution, @function
substitution:
.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, 48
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	QWORD PTR -40[rbp], rdx
	cmp	QWORD PTR -24[rbp], 0
	je	.L19
	mov	DWORD PTR -4[rbp], 0
	jmp	.L12
.L18:
	call	__ctype_b_loc@PLT
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR [rax]
	movsx	rax, al
	add	rax, rax
	add	rax, rdx
	movzx	eax, WORD PTR [rax]
	movzx	eax, ax
	and	eax, 256
	mov	DWORD PTR -4[rbp], eax
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	edi, eax
	call	tolower@PLT
	mov	edx, eax
	mov	rax, QWORD PTR -24[rbp]
	mov	BYTE PTR [rax], dl
	mov	DWORD PTR -8[rbp], 0
	jmp	.L13
.L17:
	mov	eax, DWORD PTR -8[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	movzx	edx, BYTE PTR [rax]
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	dl, al
	jne	.L14
	mov	eax, DWORD PTR -8[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	movzx	edx, BYTE PTR [rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	BYTE PTR [rax], dl
	cmp	DWORD PTR -4[rbp], 0
	je	.L20
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	edi, eax
	call	toupper@PLT
	mov	edx, eax
	mov	rax, QWORD PTR -24[rbp]
	mov	BYTE PTR [rax], dl
	jmp	.L20
.L14:
	add	DWORD PTR -8[rbp], 1
.L13:
	mov	eax, DWORD PTR mod[rip]
	cmp	DWORD PTR -8[rbp], eax
	jl	.L17
	jmp	.L16
.L20:
	nop
.L16:
	add	QWORD PTR -24[rbp], 1
.L12:
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L18
.L19:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	substitution, .-substitution
	.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	"326550.c"
	.text
	.section	.rodata
	.align	2
	.type	alphabet, %object
	.size	alphabet, 26
alphabet:
	.ascii	"abcdefghijklmnopqrstuvwxyz"
	.data
	.align	2
	.type	mod, %object
	.size	mod, 4
mod:
	.word	26
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Chiffrement par substitution\012alphabet {%s} de %d"
	.ascii	" lettres\012\012\000"
	.align	2
.LC1:
	.ascii	"Saisir une phrase pour g\303\251n\303\251rer les pe"
	.ascii	"rmutations ?\000"
	.align	2
.LC2:
	.ascii	" %127[^\012]s\000"
	.align	2
.LC3:
	.ascii	"permut : %s\012\000"
	.align	2
.LC4:
	.ascii	"Message ?\000"
	.align	2
.LC5:
	.ascii	" %511[^\012]s\000"
	.align	2
.LC6:
	.ascii	"MSG = \"%s\"\012\000"
	.align	2
.LC7:
	.ascii	"ENC = \"%s\"\012\000"
	.align	2
.LC8:
	.ascii	"DEC = \"%s\"\012\000"
	.align	2
.LC9:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 680
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #680
	str	r0, [fp, #-672]
	str	r1, [fp, #-676]
	str	r2, [fp, #-680]
	ldr	r3, .L10
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-660]
	ldr	r3, .L10+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-656]
	ldr	r3, .L10+4
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L10+8
	ldr	r0, .L10+12
	bl	printf
	ldr	r0, .L10+16
	bl	puts
	sub	r3, fp, #648
	mov	r1, r3
	ldr	r0, .L10+20
	bl	__isoc99_scanf
	mov	r3, #0
	str	r3, [fp, #-664]
	b	.L2
.L4:
	sub	r2, fp, #648
	ldr	r3, [fp, #-664]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, .L10+8
	bl	strchr
	str	r0, [fp, #-652]
	ldr	r3, [fp, #-652]
	cmp	r3, #0
	beq	.L3
	sub	r2, fp, #648
	ldr	r3, [fp, #-664]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, [fp, #-656]
	bl	strchr
	mov	r3, r0
	cmp	r3, #0
	bne	.L3
	ldr	r3, [fp, #-660]
	ldr	r2, [fp, #-656]
	add	r3, r2, r3
	sub	r1, fp, #648
	ldr	r2, [fp, #-664]
	add	r2, r1, r2
	ldrb	r2, [r2]	@ zero_extendqisi2
	strb	r2, [r3]
	ldr	r3, [fp, #-660]
	add	r3, r3, #1
	str	r3, [fp, #-660]
.L3:
	ldr	r3, [fp, #-664]
	add	r3, r3, #1
	str	r3, [fp, #-664]
.L2:
	sub	r3, fp, #648
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	ldr	r3, [fp, #-664]
	cmp	r2, r3
	bhi	.L4
	mov	r3, #0
	str	r3, [fp, #-664]
	b	.L5
.L7:
	ldr	r2, .L10+8
	ldr	r3, [fp, #-664]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, [fp, #-656]
	bl	strchr
	mov	r3, r0
	cmp	r3, #0
	bne	.L6
	ldr	r3, [fp, #-660]
	ldr	r2, [fp, #-656]
	add	r3, r2, r3
	ldr	r1, .L10+8
	ldr	r2, [fp, #-664]
	add	r2, r1, r2
	ldrb	r2, [r2]	@ zero_extendqisi2
	strb	r2, [r3]
	ldr	r3, [fp, #-660]
	add	r3, r3, #1
	str	r3, [fp, #-660]
.L6:
	ldr	r3, [fp, #-664]
	add	r3, r3, #1
	str	r3, [fp, #-664]
.L5:
	ldr	r3, .L10+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-664]
	cmp	r2, r3
	blt	.L7
	ldr	r1, [fp, #-656]
	ldr	r0, .L10+24
	bl	printf
	ldr	r0, .L10+28
	bl	puts
	sub	r3, fp, #520
	mov	r1, r3
	ldr	r0, .L10+32
	bl	__isoc99_scanf
	sub	r3, fp, #520
	mov	r1, r3
	ldr	r0, .L10+36
	bl	printf
	sub	r3, fp, #520
	ldr	r2, [fp, #-656]
	ldr	r1, .L10+8
	mov	r0, r3
	bl	substitution
	sub	r3, fp, #520
	mov	r1, r3
	ldr	r0, .L10+40
	bl	printf
	sub	r3, fp, #520
	ldr	r2, .L10+8
	ldr	r1, [fp, #-656]
	mov	r0, r3
	bl	substitution
	sub	r3, fp, #520
	mov	r1, r3
	ldr	r0, .L10+44
	bl	printf
	mov	r3, #0
	ldr	r2, .L10
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L9
	bl	__stack_chk_fail
.L9:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L11:
	.align	2
.L10:
	.word	.LC9
	.word	mod
	.word	alphabet
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.size	main, .-main
	.align	2
	.global	substitution
	.syntax unified
	.arm
	.fpu softvfp
	.type	substitution, %function
substitution:
	@ 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	r3, [fp, #-16]
	cmp	r3, #0
	beq	.L21
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L14
.L20:
	bl	__ctype_b_loc
	mov	r3, r0
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r3, [r3]
	and	r3, r3, #256
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-16]
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	bl	tolower
	mov	r3, r0
	and	r2, r3, #255
	ldr	r3, [fp, #-16]
	strb	r2, [r3]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L15
.L19:
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r3, [fp, #-16]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r2, r3
	bne	.L16
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r3, [fp, #-16]
	strb	r2, [r3]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L22
	ldr	r3, [fp, #-16]
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	bl	toupper
	mov	r3, r0
	and	r2, r3, #255
	ldr	r3, [fp, #-16]
	strb	r2, [r3]
	b	.L22
.L16:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L15:
	ldr	r3, .L23
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	blt	.L19
	b	.L18
.L22:
	nop
.L18:
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L14:
	ldr	r3, [fp, #-16]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L20
.L21:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L24:
	.align	2
.L23:
	.word	mod
	.size	substitution, .-substitution
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
