	.file	"821403.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"Too few options. Program terminating..."
.LC1:
	.string	"-e"
.LC2:
	.string	"Set to encrypt."
.LC3:
	.string	"-d"
.LC4:
	.string	"Set to decrypt."
	.align 8
.LC5:
	.string	"Invalid option. Program terminating..."
.LC6:
	.string	"r"
	.align 8
.LC7:
	.string	"Cannot open input file, or file does not exist. Exiting..."
	.align 8
.LC8:
	.string	"Cannot read from input file. Exiting..."
.LC9:
	.string	"File data:\t%s"
.LC10:
	.string	"Data size: \t%d nibbles\n"
	.align 8
.LC11:
	.string	"Irregular data. Please pad to continue."
.LC12:
	.string	"Key:\t\t0x%04X\n"
.LC13:
	.string	"Plaintext:\t0x"
.LC14:
	.string	"%04X"
.LC15:
	.string	"\nCiphertext:\t0x"
.LC16:
	.string	"Ciphertext:\t0x"
.LC17:
	.string	"\nPlaintext:\t0x"
.LC18:
	.string	"w"
	.align 8
.LC19:
	.string	"Cannot open output file. Exiting..."
	.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	r15
	push	r14
	push	r12
	push	rbx
	sub	rsp, 176
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 12, -40
	.cfi_offset 3, -48
	mov	DWORD PTR -180[rbp], edi
	mov	QWORD PTR -192[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -40[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -160[rbp], 0
	mov	DWORD PTR -164[rbp], 0
	cmp	DWORD PTR -180[rbp], 3
	jg	.L2
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	mov	rax, QWORD PTR -192[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -136[rbp], rax
	mov	rax, QWORD PTR -136[rbp]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L3
	mov	DWORD PTR -160[rbp], 1
	lea	rdi, .LC2[rip]
	call	puts@PLT
	jmp	.L4
.L3:
	mov	rax, QWORD PTR -136[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L5
	mov	DWORD PTR -164[rbp], 1
	lea	rdi, .LC4[rip]
	call	puts@PLT
	jmp	.L4
.L5:
	lea	rdi, .LC5[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L4:
	mov	rax, QWORD PTR -192[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	QWORD PTR -128[rbp], rax
	mov	rax, QWORD PTR -128[rbp]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -120[rbp], rax
	mov	edi, 100
	call	malloc@PLT
	mov	QWORD PTR -112[rbp], rax
	mov	DWORD PTR -152[rbp], 100
	cmp	QWORD PTR -120[rbp], 0
	jne	.L6
	lea	rdi, .LC7[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L6:
	mov	rdx, QWORD PTR -120[rbp]
	mov	rax, QWORD PTR -112[rbp]
	mov	esi, 100
	mov	rdi, rax
	call	fgets@PLT
	test	rax, rax
	jne	.L7
	lea	rdi, .LC8[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L7:
	mov	rax, QWORD PTR -112[rbp]
	mov	rsi, rax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -120[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -112[rbp]
	mov	rdi, rax
	call	strlen@PLT
	sub	eax, 1
	mov	DWORD PTR -148[rbp], eax
	mov	eax, DWORD PTR -148[rbp]
	lea	edx, 3[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 2
	mov	DWORD PTR -144[rbp], eax
	mov	eax, DWORD PTR -148[rbp]
	mov	esi, eax
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -148[rbp]
	and	eax, 3
	test	eax, eax
	je	.L8
	lea	rdi, .LC11[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L8:
	mov	rax, QWORD PTR -192[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	QWORD PTR -104[rbp], rax
	mov	edi, 4
	call	malloc@PLT
	mov	QWORD PTR -96[rbp], rax
	mov	DWORD PTR -168[rbp], 0
	jmp	.L9
.L10:
	mov	eax, DWORD PTR -168[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -104[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	edx, DWORD PTR -168[rbp]
	movsx	rcx, edx
	mov	rdx, QWORD PTR -96[rbp]
	lea	rbx, [rcx+rdx]
	mov	edi, eax
	call	convert_char_to_hex
	mov	BYTE PTR [rbx], al
	add	DWORD PTR -168[rbp], 1
.L9:
	cmp	DWORD PTR -168[rbp], 3
	jle	.L10
	mov	WORD PTR -170[rbp], 0
	mov	DWORD PTR -168[rbp], 0
	jmp	.L11
.L12:
	mov	eax, DWORD PTR -168[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -96[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movzx	edx, al
	mov	eax, 3
	sub	eax, DWORD PTR -168[rbp]
	sal	eax, 2
	mov	ecx, eax
	sal	edx, cl
	mov	eax, edx
	add	WORD PTR -170[rbp], ax
	add	DWORD PTR -168[rbp], 1
.L11:
	cmp	DWORD PTR -168[rbp], 3
	jle	.L12
	movzx	eax, WORD PTR -170[rbp]
	mov	esi, eax
	lea	rdi, .LC12[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -148[rbp]
	mov	rdx, rsp
	mov	r12, rdx
	movsx	rdx, eax
	sub	rdx, 1
	mov	QWORD PTR -88[rbp], rdx
	movsx	rdx, eax
	mov	QWORD PTR -208[rbp], rdx
	mov	QWORD PTR -200[rbp], 0
	movsx	rdx, eax
	mov	r14, rdx
	mov	r15d, 0
	cdqe
	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
.L13:
	cmp	rsp, rdx
	je	.L14
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	jmp	.L13
.L14:
	mov	rdx, rax
	and	edx, 4095
	sub	rsp, rdx
	mov	rdx, rax
	and	edx, 4095
	test	rdx, rdx
	je	.L15
	and	eax, 4095
	sub	rax, 8
	add	rax, rsp
	or	QWORD PTR [rax], 0
.L15:
	mov	rax, rsp
	add	rax, 0
	mov	QWORD PTR -80[rbp], rax
	mov	DWORD PTR -168[rbp], 0
	jmp	.L16
.L17:
	mov	eax, DWORD PTR -168[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -112[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	edi, eax
	call	convert_char_to_hex
	mov	rcx, QWORD PTR -80[rbp]
	mov	edx, DWORD PTR -168[rbp]
	movsx	rdx, edx
	mov	BYTE PTR [rcx+rdx], al
	add	DWORD PTR -168[rbp], 1
.L16:
	mov	eax, DWORD PTR -168[rbp]
	cmp	eax, DWORD PTR -148[rbp]
	jl	.L17
	mov	eax, DWORD PTR -144[rbp]
	cdqe
	add	rax, rax
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -72[rbp], rax
	mov	DWORD PTR -168[rbp], 0
	jmp	.L18
.L21:
	mov	eax, DWORD PTR -168[rbp]
	sal	eax, 2
	mov	DWORD PTR -140[rbp], eax
	mov	DWORD PTR -156[rbp], 0
	jmp	.L19
.L20:
	mov	eax, DWORD PTR -168[rbp]
	cdqe
	lea	rdx, [rax+rax]
	mov	rax, QWORD PTR -72[rbp]
	add	rax, rdx
	movzx	esi, WORD PTR [rax]
	mov	edx, DWORD PTR -156[rbp]
	mov	eax, DWORD PTR -140[rbp]
	add	eax, edx
	mov	rdx, QWORD PTR -80[rbp]
	cdqe
	movzx	eax, BYTE PTR [rdx+rax]
	movzx	edx, al
	mov	eax, 3
	sub	eax, DWORD PTR -156[rbp]
	sal	eax, 2
	mov	ecx, eax
	sal	edx, cl
	mov	eax, edx
	mov	ecx, eax
	mov	eax, DWORD PTR -168[rbp]
	cdqe
	lea	rdx, [rax+rax]
	mov	rax, QWORD PTR -72[rbp]
	add	rax, rdx
	lea	edx, [rsi+rcx]
	mov	WORD PTR [rax], dx
	add	DWORD PTR -156[rbp], 1
.L19:
	cmp	DWORD PTR -156[rbp], 3
	jle	.L20
	add	DWORD PTR -168[rbp], 1
.L18:
	mov	eax, DWORD PTR -168[rbp]
	cmp	eax, DWORD PTR -144[rbp]
	jl	.L21
	mov	eax, DWORD PTR -144[rbp]
	cdqe
	add	rax, rax
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -64[rbp], rax
	cmp	DWORD PTR -160[rbp], 0
	je	.L22
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -168[rbp], 0
	jmp	.L23
.L24:
	mov	eax, DWORD PTR -168[rbp]
	cdqe
	lea	rdx, [rax+rax]
	mov	rax, QWORD PTR -72[rbp]
	add	rax, rdx
	movzx	eax, WORD PTR [rax]
	movzx	eax, ax
	mov	esi, eax
	lea	rdi, .LC14[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -168[rbp], 1
.L23:
	mov	eax, DWORD PTR -168[rbp]
	cmp	eax, DWORD PTR -144[rbp]
	jl	.L24
	lea	rdi, .LC15[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -168[rbp], 0
	jmp	.L25
.L26:
	mov	eax, DWORD PTR -168[rbp]
	cdqe
	lea	rdx, [rax+rax]
	mov	rax, QWORD PTR -72[rbp]
	add	rax, rdx
	movzx	eax, WORD PTR [rax]
	movzx	eax, ax
	mov	edx, DWORD PTR -168[rbp]
	movsx	rdx, edx
	lea	rcx, [rdx+rdx]
	mov	rdx, QWORD PTR -64[rbp]
	lea	rbx, [rcx+rdx]
	mov	rdx, QWORD PTR -96[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	encrypt_word
	mov	WORD PTR [rbx], ax
	mov	eax, DWORD PTR -168[rbp]
	cdqe
	lea	rdx, [rax+rax]
	mov	rax, QWORD PTR -64[rbp]
	add	rax, rdx
	movzx	eax, WORD PTR [rax]
	movzx	eax, ax
	mov	esi, eax
	lea	rdi, .LC14[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -168[rbp], 1
.L25:
	mov	eax, DWORD PTR -168[rbp]
	cmp	eax, DWORD PTR -144[rbp]
	jl	.L26
	mov	edi, 10
	call	putchar@PLT
	jmp	.L27
.L22:
	cmp	DWORD PTR -164[rbp], 0
	je	.L27
	lea	rdi, .LC16[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -168[rbp], 0
	jmp	.L28
.L29:
	mov	eax, DWORD PTR -168[rbp]
	cdqe
	lea	rdx, [rax+rax]
	mov	rax, QWORD PTR -72[rbp]
	add	rax, rdx
	movzx	eax, WORD PTR [rax]
	movzx	eax, ax
	mov	esi, eax
	lea	rdi, .LC14[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -168[rbp], 1
.L28:
	mov	eax, DWORD PTR -168[rbp]
	cmp	eax, DWORD PTR -144[rbp]
	jl	.L29
	lea	rdi, .LC17[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -168[rbp], 0
	jmp	.L30
.L31:
	mov	eax, DWORD PTR -168[rbp]
	cdqe
	lea	rdx, [rax+rax]
	mov	rax, QWORD PTR -72[rbp]
	add	rax, rdx
	movzx	eax, WORD PTR [rax]
	movzx	eax, ax
	mov	edx, DWORD PTR -168[rbp]
	movsx	rdx, edx
	lea	rcx, [rdx+rdx]
	mov	rdx, QWORD PTR -64[rbp]
	lea	rbx, [rcx+rdx]
	mov	rdx, QWORD PTR -96[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	decrypt_word
	mov	WORD PTR [rbx], ax
	mov	eax, DWORD PTR -168[rbp]
	cdqe
	lea	rdx, [rax+rax]
	mov	rax, QWORD PTR -64[rbp]
	add	rax, rdx
	movzx	eax, WORD PTR [rax]
	movzx	eax, ax
	mov	esi, eax
	lea	rdi, .LC14[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -168[rbp], 1
.L30:
	mov	eax, DWORD PTR -168[rbp]
	cmp	eax, DWORD PTR -144[rbp]
	jl	.L31
	mov	edi, 10
	call	putchar@PLT
.L27:
	mov	rax, QWORD PTR -192[rbp]
	mov	rax, QWORD PTR 32[rax]
	mov	QWORD PTR -56[rbp], rax
	mov	rax, QWORD PTR -56[rbp]
	lea	rsi, .LC18[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -48[rbp], rax
	cmp	QWORD PTR -48[rbp], 0
	jne	.L32
	lea	rdi, .LC19[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L32:
	mov	DWORD PTR -168[rbp], 0
	jmp	.L33
.L34:
	mov	eax, DWORD PTR -168[rbp]
	cdqe
	lea	rdx, [rax+rax]
	mov	rax, QWORD PTR -64[rbp]
	add	rax, rdx
	movzx	eax, WORD PTR [rax]
	movzx	edx, ax
	mov	rax, QWORD PTR -48[rbp]
	lea	rsi, .LC14[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	add	DWORD PTR -168[rbp], 1
.L33:
	mov	eax, DWORD PTR -168[rbp]
	cmp	eax, DWORD PTR -144[rbp]
	jl	.L34
	mov	rax, QWORD PTR -48[rbp]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	mov	rax, QWORD PTR -48[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rsp, r12
	mov	eax, 0
	mov	rbx, QWORD PTR -40[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L36
	call	__stack_chk_fail@PLT
.L36:
	lea	rsp, -32[rbp]
	pop	rbx
	pop	r12
	pop	r14
	pop	r15
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.globl	encrypt_word
	.type	encrypt_word, @function
encrypt_word:
.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, 32
	mov	eax, edi
	mov	QWORD PTR -32[rbp], rsi
	mov	WORD PTR -20[rbp], ax
	movzx	eax, WORD PTR -20[rbp]
	mov	WORD PTR -16[rbp], ax
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	generate_keys
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	sal	eax, 8
	mov	edx, eax
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 1
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	add	eax, edx
	mov	WORD PTR -14[rbp], ax
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 2
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	sal	eax, 8
	mov	edx, eax
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 3
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	add	eax, edx
	mov	WORD PTR -12[rbp], ax
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 4
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	sal	eax, 8
	mov	edx, eax
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 5
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	add	eax, edx
	mov	WORD PTR -10[rbp], ax
	movzx	edx, WORD PTR -14[rbp]
	movzx	eax, WORD PTR -16[rbp]
	mov	esi, edx
	mov	edi, eax
	call	add_key
	mov	WORD PTR -16[rbp], ax
	movzx	eax, WORD PTR -16[rbp]
	mov	edi, eax
	call	n_substitution
	mov	WORD PTR -16[rbp], ax
	movzx	eax, WORD PTR -16[rbp]
	mov	edi, eax
	call	shift_row
	mov	WORD PTR -16[rbp], ax
	movzx	eax, WORD PTR -16[rbp]
	mov	edi, eax
	call	mix_column
	mov	WORD PTR -16[rbp], ax
	movzx	edx, WORD PTR -12[rbp]
	movzx	eax, WORD PTR -16[rbp]
	mov	esi, edx
	mov	edi, eax
	call	add_key
	mov	WORD PTR -16[rbp], ax
	movzx	eax, WORD PTR -16[rbp]
	mov	edi, eax
	call	n_substitution
	mov	WORD PTR -16[rbp], ax
	movzx	eax, WORD PTR -16[rbp]
	mov	edi, eax
	call	shift_row
	mov	WORD PTR -16[rbp], ax
	movzx	edx, WORD PTR -10[rbp]
	movzx	eax, WORD PTR -16[rbp]
	mov	esi, edx
	mov	edi, eax
	call	add_key
	mov	WORD PTR -16[rbp], ax
	movzx	eax, WORD PTR -16[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	encrypt_word, .-encrypt_word
	.globl	decrypt_word
	.type	decrypt_word, @function
decrypt_word:
.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, 32
	mov	eax, edi
	mov	QWORD PTR -32[rbp], rsi
	mov	WORD PTR -20[rbp], ax
	movzx	eax, WORD PTR -20[rbp]
	mov	WORD PTR -16[rbp], ax
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	generate_keys
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	sal	eax, 8
	mov	edx, eax
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 1
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	add	eax, edx
	mov	WORD PTR -14[rbp], ax
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 2
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	sal	eax, 8
	mov	edx, eax
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 3
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	add	eax, edx
	mov	WORD PTR -12[rbp], ax
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 4
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	sal	eax, 8
	mov	edx, eax
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 5
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	add	eax, edx
	mov	WORD PTR -10[rbp], ax
	movzx	edx, WORD PTR -10[rbp]
	movzx	eax, WORD PTR -16[rbp]
	mov	esi, edx
	mov	edi, eax
	call	add_key
	mov	WORD PTR -16[rbp], ax
	movzx	eax, WORD PTR -16[rbp]
	mov	edi, eax
	call	shift_row
	mov	WORD PTR -16[rbp], ax
	movzx	eax, WORD PTR -16[rbp]
	mov	edi, eax
	call	inv_n_substitution
	mov	WORD PTR -16[rbp], ax
	movzx	edx, WORD PTR -12[rbp]
	movzx	eax, WORD PTR -16[rbp]
	mov	esi, edx
	mov	edi, eax
	call	add_key
	mov	WORD PTR -16[rbp], ax
	movzx	eax, WORD PTR -16[rbp]
	mov	edi, eax
	call	inv_mix_column
	mov	WORD PTR -16[rbp], ax
	movzx	eax, WORD PTR -16[rbp]
	mov	edi, eax
	call	shift_row
	mov	WORD PTR -16[rbp], ax
	movzx	eax, WORD PTR -16[rbp]
	mov	edi, eax
	call	inv_n_substitution
	mov	WORD PTR -16[rbp], ax
	movzx	edx, WORD PTR -14[rbp]
	movzx	eax, WORD PTR -16[rbp]
	mov	esi, edx
	mov	edi, eax
	call	add_key
	mov	WORD PTR -16[rbp], ax
	movzx	eax, WORD PTR -16[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	decrypt_word, .-decrypt_word
	.globl	add_key
	.type	add_key, @function
add_key:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	edx, edi
	mov	eax, esi
	mov	WORD PTR -20[rbp], dx
	mov	WORD PTR -24[rbp], ax
	movzx	eax, WORD PTR -20[rbp]
	xor	ax, WORD PTR -24[rbp]
	mov	WORD PTR -2[rbp], ax
	movzx	eax, WORD PTR -2[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	add_key, .-add_key
	.globl	n_substitution
	.type	n_substitution, @function
n_substitution:
.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, 32
	mov	eax, edi
	mov	WORD PTR -20[rbp], ax
	movzx	eax, WORD PTR -20[rbp]
	shr	ax, 8
	mov	BYTE PTR -6[rbp], al
	movzx	eax, WORD PTR -20[rbp]
	mov	BYTE PTR -5[rbp], al
	movzx	eax, BYTE PTR -6[rbp]
	mov	edi, eax
	call	s_box_8
	mov	BYTE PTR -4[rbp], al
	movzx	eax, BYTE PTR -5[rbp]
	mov	edi, eax
	call	s_box_8
	mov	BYTE PTR -3[rbp], al
	movzx	eax, BYTE PTR -4[rbp]
	sal	eax, 8
	mov	edx, eax
	movzx	eax, BYTE PTR -3[rbp]
	add	eax, edx
	mov	WORD PTR -2[rbp], ax
	movzx	eax, WORD PTR -2[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	n_substitution, .-n_substitution
	.globl	inv_n_substitution
	.type	inv_n_substitution, @function
inv_n_substitution:
.LFB11:
	.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	WORD PTR -20[rbp], ax
	movzx	eax, WORD PTR -20[rbp]
	shr	ax, 8
	mov	BYTE PTR -6[rbp], al
	movzx	eax, WORD PTR -20[rbp]
	mov	BYTE PTR -5[rbp], al
	movzx	eax, BYTE PTR -6[rbp]
	mov	edi, eax
	call	inv_s_box_8
	mov	BYTE PTR -4[rbp], al
	movzx	eax, BYTE PTR -5[rbp]
	mov	edi, eax
	call	inv_s_box_8
	mov	BYTE PTR -3[rbp], al
	movzx	eax, BYTE PTR -4[rbp]
	sal	eax, 8
	mov	edx, eax
	movzx	eax, BYTE PTR -3[rbp]
	add	eax, edx
	mov	WORD PTR -2[rbp], ax
	movzx	eax, WORD PTR -2[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	inv_n_substitution, .-inv_n_substitution
	.globl	shift_row
	.type	shift_row, @function
shift_row:
.LFB12:
	.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	eax, edi
	mov	WORD PTR -36[rbp], ax
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -16[rbp], 0
	jmp	.L48
.L49:
	mov	eax, DWORD PTR -16[rbp]
	sal	eax, 2
	mov	edx, 15
	mov	ecx, eax
	sal	edx, cl
	movzx	eax, WORD PTR -36[rbp]
	and	edx, eax
	mov	eax, DWORD PTR -16[rbp]
	sal	eax, 2
	mov	ecx, eax
	sar	edx, cl
	mov	eax, edx
	mov	edx, eax
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	mov	BYTE PTR -12[rbp+rax], dl
	add	DWORD PTR -16[rbp], 1
.L48:
	cmp	DWORD PTR -16[rbp], 3
	jle	.L49
	movzx	eax, BYTE PTR -12[rbp]
	mov	BYTE PTR -19[rbp], al
	movzx	eax, BYTE PTR -10[rbp]
	mov	BYTE PTR -12[rbp], al
	movzx	eax, BYTE PTR -19[rbp]
	mov	BYTE PTR -10[rbp], al
	mov	WORD PTR -18[rbp], 0
	mov	DWORD PTR -16[rbp], 0
	jmp	.L50
.L51:
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	movzx	eax, BYTE PTR -12[rbp+rax]
	movzx	edx, al
	mov	eax, DWORD PTR -16[rbp]
	sal	eax, 2
	mov	ecx, eax
	sal	edx, cl
	mov	eax, edx
	add	WORD PTR -18[rbp], ax
	add	DWORD PTR -16[rbp], 1
.L50:
	cmp	DWORD PTR -16[rbp], 3
	jle	.L51
	movzx	eax, WORD PTR -18[rbp]
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L53
	call	__stack_chk_fail@PLT
.L53:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	shift_row, .-shift_row
	.globl	mix_column
	.type	mix_column, @function
mix_column:
.LFB13:
	.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, 56
	.cfi_offset 3, -24
	mov	eax, edi
	mov	WORD PTR -52[rbp], ax
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -36[rbp], 3
	jmp	.L55
.L56:
	mov	eax, DWORD PTR -36[rbp]
	sal	eax, 2
	mov	edx, 15
	mov	ecx, eax
	sal	edx, cl
	movzx	eax, WORD PTR -52[rbp]
	and	edx, eax
	mov	eax, DWORD PTR -36[rbp]
	sal	eax, 2
	mov	ecx, eax
	sar	edx, cl
	mov	eax, 3
	sub	eax, DWORD PTR -36[rbp]
	cdqe
	mov	BYTE PTR -32[rbp+rax], dl
	sub	DWORD PTR -36[rbp], 1
.L55:
	cmp	DWORD PTR -36[rbp], 0
	jns	.L56
	movzx	ebx, BYTE PTR -32[rbp]
	movzx	eax, BYTE PTR -31[rbp]
	movzx	eax, al
	mov	esi, eax
	mov	edi, 4
	call	gf_mult_4
	xor	eax, ebx
	mov	BYTE PTR -28[rbp], al
	movzx	eax, BYTE PTR -32[rbp]
	movzx	eax, al
	mov	esi, eax
	mov	edi, 4
	call	gf_mult_4
	movzx	edx, BYTE PTR -31[rbp]
	xor	eax, edx
	mov	BYTE PTR -27[rbp], al
	movzx	ebx, BYTE PTR -30[rbp]
	movzx	eax, BYTE PTR -29[rbp]
	movzx	eax, al
	mov	esi, eax
	mov	edi, 4
	call	gf_mult_4
	xor	eax, ebx
	mov	BYTE PTR -26[rbp], al
	movzx	eax, BYTE PTR -30[rbp]
	movzx	eax, al
	mov	esi, eax
	mov	edi, 4
	call	gf_mult_4
	movzx	edx, BYTE PTR -29[rbp]
	xor	eax, edx
	mov	BYTE PTR -25[rbp], al
	mov	WORD PTR -38[rbp], 0
	mov	DWORD PTR -36[rbp], 3
	jmp	.L57
.L58:
	mov	eax, 3
	sub	eax, DWORD PTR -36[rbp]
	cdqe
	movzx	eax, BYTE PTR -28[rbp+rax]
	movzx	edx, al
	mov	eax, DWORD PTR -36[rbp]
	sal	eax, 2
	mov	ecx, eax
	sal	edx, cl
	mov	eax, edx
	add	WORD PTR -38[rbp], ax
	sub	DWORD PTR -36[rbp], 1
.L57:
	cmp	DWORD PTR -36[rbp], 0
	jns	.L58
	movzx	eax, WORD PTR -38[rbp]
	mov	rsi, QWORD PTR -24[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L60
	call	__stack_chk_fail@PLT
.L60:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	mix_column, .-mix_column
	.globl	inv_mix_column
	.type	inv_mix_column, @function
inv_mix_column:
.LFB14:
	.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, 56
	.cfi_offset 3, -24
	mov	eax, edi
	mov	WORD PTR -52[rbp], ax
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -36[rbp], 3
	jmp	.L62
.L63:
	mov	eax, DWORD PTR -36[rbp]
	sal	eax, 2
	mov	edx, 15
	mov	ecx, eax
	sal	edx, cl
	movzx	eax, WORD PTR -52[rbp]
	and	edx, eax
	mov	eax, DWORD PTR -36[rbp]
	sal	eax, 2
	mov	ecx, eax
	sar	edx, cl
	mov	eax, 3
	sub	eax, DWORD PTR -36[rbp]
	cdqe
	mov	BYTE PTR -32[rbp+rax], dl
	sub	DWORD PTR -36[rbp], 1
.L62:
	cmp	DWORD PTR -36[rbp], 0
	jns	.L63
	movzx	eax, BYTE PTR -32[rbp]
	movzx	eax, al
	mov	esi, eax
	mov	edi, 9
	call	gf_mult_4
	mov	ebx, eax
	movzx	eax, BYTE PTR -31[rbp]
	movzx	eax, al
	mov	esi, eax
	mov	edi, 2
	call	gf_mult_4
	xor	eax, ebx
	mov	BYTE PTR -28[rbp], al
	movzx	eax, BYTE PTR -32[rbp]
	movzx	eax, al
	mov	esi, eax
	mov	edi, 2
	call	gf_mult_4
	mov	ebx, eax
	movzx	eax, BYTE PTR -31[rbp]
	movzx	eax, al
	mov	esi, eax
	mov	edi, 9
	call	gf_mult_4
	xor	eax, ebx
	mov	BYTE PTR -27[rbp], al
	movzx	eax, BYTE PTR -30[rbp]
	movzx	eax, al
	mov	esi, eax
	mov	edi, 9
	call	gf_mult_4
	mov	ebx, eax
	movzx	eax, BYTE PTR -29[rbp]
	movzx	eax, al
	mov	esi, eax
	mov	edi, 2
	call	gf_mult_4
	xor	eax, ebx
	mov	BYTE PTR -26[rbp], al
	movzx	eax, BYTE PTR -30[rbp]
	movzx	eax, al
	mov	esi, eax
	mov	edi, 2
	call	gf_mult_4
	mov	ebx, eax
	movzx	eax, BYTE PTR -29[rbp]
	movzx	eax, al
	mov	esi, eax
	mov	edi, 9
	call	gf_mult_4
	xor	eax, ebx
	mov	BYTE PTR -25[rbp], al
	mov	WORD PTR -38[rbp], 0
	mov	DWORD PTR -36[rbp], 3
	jmp	.L64
.L65:
	mov	eax, 3
	sub	eax, DWORD PTR -36[rbp]
	cdqe
	movzx	eax, BYTE PTR -28[rbp+rax]
	movzx	edx, al
	mov	eax, DWORD PTR -36[rbp]
	sal	eax, 2
	mov	ecx, eax
	sal	edx, cl
	mov	eax, edx
	add	WORD PTR -38[rbp], ax
	sub	DWORD PTR -36[rbp], 1
.L64:
	cmp	DWORD PTR -36[rbp], 0
	jns	.L65
	movzx	eax, WORD PTR -38[rbp]
	mov	rcx, QWORD PTR -24[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L67
	call	__stack_chk_fail@PLT
.L67:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	inv_mix_column, .-inv_mix_column
	.globl	poly_degree
	.type	poly_degree, @function
poly_degree:
.LFB15:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	eax, edi
	mov	BYTE PTR -20[rbp], al
	mov	DWORD PTR -4[rbp], 0
	jmp	.L69
.L70:
	shr	BYTE PTR -20[rbp]
	add	DWORD PTR -4[rbp], 1
.L69:
	cmp	BYTE PTR -20[rbp], 0
	jne	.L70
	mov	eax, DWORD PTR -4[rbp]
	sub	eax, 1
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	poly_degree, .-poly_degree
	.globl	gf_reduce_4
	.type	gf_reduce_4, @function
gf_reduce_4:
.LFB16:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 40
	mov	eax, edi
	mov	BYTE PTR -36[rbp], al
	mov	BYTE PTR -18[rbp], 19
	mov	BYTE PTR -17[rbp], -1
	mov	DWORD PTR -16[rbp], 0
	mov	DWORD PTR -12[rbp], 4
	movzx	eax, BYTE PTR -36[rbp]
	mov	BYTE PTR -19[rbp], al
.L75:
	movzx	eax, BYTE PTR -19[rbp]
	mov	edi, eax
	call	poly_degree
	mov	DWORD PTR -8[rbp], eax
	mov	eax, DWORD PTR -12[rbp]
	cmp	eax, DWORD PTR -8[rbp]
	jle	.L73
	movzx	eax, BYTE PTR -19[rbp]
	mov	BYTE PTR -17[rbp], al
	jmp	.L77
.L73:
	mov	eax, DWORD PTR -8[rbp]
	sub	eax, DWORD PTR -12[rbp]
	mov	DWORD PTR -4[rbp], eax
	movzx	edx, BYTE PTR -18[rbp]
	mov	eax, DWORD PTR -4[rbp]
	mov	ecx, eax
	sal	edx, cl
	mov	eax, edx
	mov	edx, eax
	movzx	eax, BYTE PTR -19[rbp]
	xor	eax, edx
	mov	BYTE PTR -19[rbp], al
	jmp	.L75
.L77:
	movzx	eax, BYTE PTR -17[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	gf_reduce_4, .-gf_reduce_4
	.globl	gf_mult_4
	.type	gf_mult_4, @function
gf_mult_4:
.LFB17:
	.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	edx, edi
	mov	eax, esi
	mov	BYTE PTR -20[rbp], dl
	mov	BYTE PTR -24[rbp], al
	mov	BYTE PTR -6[rbp], 0
	mov	DWORD PTR -4[rbp], 0
	jmp	.L79
.L81:
	movzx	edx, BYTE PTR -20[rbp]
	mov	eax, DWORD PTR -4[rbp]
	mov	ecx, eax
	sar	edx, cl
	mov	eax, edx
	and	eax, 1
	test	eax, eax
	je	.L80
	movzx	edx, BYTE PTR -24[rbp]
	mov	eax, DWORD PTR -4[rbp]
	mov	ecx, eax
	sal	edx, cl
	mov	eax, edx
	mov	edx, eax
	movzx	eax, BYTE PTR -6[rbp]
	xor	eax, edx
	mov	BYTE PTR -6[rbp], al
.L80:
	add	DWORD PTR -4[rbp], 1
.L79:
	cmp	DWORD PTR -4[rbp], 3
	jle	.L81
	movzx	eax, BYTE PTR -6[rbp]
	mov	edi, eax
	call	gf_reduce_4
	mov	BYTE PTR -5[rbp], al
	movzx	eax, BYTE PTR -5[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE17:
	.size	gf_mult_4, .-gf_mult_4
	.section	.rodata
.LC20:
	.string	"0x%x:\t"
.LC21:
	.string	"%d"
	.text
	.globl	print_byte
	.type	print_byte, @function
print_byte:
.LFB18:
	.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
	movzx	eax, BYTE PTR -20[rbp]
	mov	esi, eax
	lea	rdi, .LC20[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -8[rbp], 7
	jmp	.L84
.L85:
	mov	eax, DWORD PTR -8[rbp]
	mov	edx, 1
	mov	ecx, eax
	sal	edx, cl
	movzx	eax, BYTE PTR -20[rbp]
	and	edx, eax
	mov	eax, DWORD PTR -8[rbp]
	mov	ecx, eax
	sar	edx, cl
	mov	eax, edx
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, eax
	lea	rdi, .LC21[rip]
	mov	eax, 0
	call	printf@PLT
	sub	DWORD PTR -8[rbp], 1
.L84:
	cmp	DWORD PTR -8[rbp], 0
	jns	.L85
	mov	edi, 10
	call	putchar@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE18:
	.size	print_byte, .-print_byte
	.globl	convert_char_to_hex
	.type	convert_char_to_hex, @function
convert_char_to_hex:
.LFB19:
	.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
	movsx	eax, BYTE PTR -20[rbp]
	mov	edi, eax
	call	tolower@PLT
	mov	BYTE PTR -1[rbp], al
	cmp	BYTE PTR -1[rbp], 47
	jle	.L87
	cmp	BYTE PTR -1[rbp], 57
	jg	.L87
	movzx	eax, BYTE PTR -1[rbp]
	sub	eax, 48
	mov	BYTE PTR -2[rbp], al
	jmp	.L88
.L87:
	cmp	BYTE PTR -1[rbp], 96
	jle	.L89
	cmp	BYTE PTR -1[rbp], 102
	jg	.L89
	movzx	eax, BYTE PTR -1[rbp]
	sub	eax, 87
	mov	BYTE PTR -2[rbp], al
	jmp	.L88
.L89:
	movzx	eax, BYTE PTR -1[rbp]
	jmp	.L90
.L88:
	movzx	eax, BYTE PTR -2[rbp]
.L90:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE19:
	.size	convert_char_to_hex, .-convert_char_to_hex
	.globl	rotate_byte
	.type	rotate_byte, @function
rotate_byte:
.LFB20:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	eax, edi
	mov	BYTE PTR -20[rbp], al
	movzx	eax, BYTE PTR -20[rbp]
	and	eax, 15
	mov	BYTE PTR -3[rbp], al
	movzx	eax, BYTE PTR -20[rbp]
	and	eax, -16
	mov	BYTE PTR -2[rbp], al
	movzx	eax, BYTE PTR -3[rbp]
	sal	eax, 4
	mov	edx, eax
	movzx	eax, BYTE PTR -2[rbp]
	shr	al, 4
	add	eax, edx
	mov	BYTE PTR -1[rbp], al
	movzx	eax, BYTE PTR -1[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE20:
	.size	rotate_byte, .-rotate_byte
	.globl	s_box_4
	.type	s_box_4, @function
s_box_4:
.LFB21:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 64
	mov	eax, edi
	mov	BYTE PTR -52[rbp], al
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -32[rbp], 185205769
	mov	DWORD PTR -28[rbp], 84410637
	mov	DWORD PTR -24[rbp], 50332166
	mov	DWORD PTR -20[rbp], 118427148
	movzx	eax, BYTE PTR -52[rbp]
	sar	eax, 2
	and	eax, 3
	mov	BYTE PTR -35[rbp], al
	movzx	eax, BYTE PTR -52[rbp]
	and	eax, 3
	mov	BYTE PTR -34[rbp], al
	movzx	eax, BYTE PTR -35[rbp]
	movzx	edx, BYTE PTR -34[rbp]
	movsx	rdx, edx
	cdqe
	sal	rax, 2
	add	rax, rbp
	add	rax, rdx
	sub	rax, 32
	movzx	eax, BYTE PTR [rax]
	mov	BYTE PTR -33[rbp], al
	movzx	eax, BYTE PTR -33[rbp]
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L95
	call	__stack_chk_fail@PLT
.L95:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE21:
	.size	s_box_4, .-s_box_4
	.globl	inv_s_box_4
	.type	inv_s_box_4, @function
inv_s_box_4:
.LFB22:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 64
	mov	eax, edi
	mov	BYTE PTR -52[rbp], al
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -32[rbp], 185140490
	mov	DWORD PTR -28[rbp], 252184321
	mov	DWORD PTR -24[rbp], 50462726
	mov	DWORD PTR -20[rbp], 235734028
	movzx	eax, BYTE PTR -52[rbp]
	sar	eax, 2
	and	eax, 3
	mov	BYTE PTR -35[rbp], al
	movzx	eax, BYTE PTR -52[rbp]
	and	eax, 3
	mov	BYTE PTR -34[rbp], al
	movzx	eax, BYTE PTR -35[rbp]
	movzx	edx, BYTE PTR -34[rbp]
	movsx	rdx, edx
	cdqe
	sal	rax, 2
	add	rax, rbp
	add	rax, rdx
	sub	rax, 32
	movzx	eax, BYTE PTR [rax]
	mov	BYTE PTR -33[rbp], al
	movzx	eax, BYTE PTR -33[rbp]
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L98
	call	__stack_chk_fail@PLT
.L98:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE22:
	.size	inv_s_box_4, .-inv_s_box_4
	.globl	s_box_8
	.type	s_box_8, @function
s_box_8:
.LFB23:
	.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
	movzx	eax, BYTE PTR -20[rbp]
	shr	al, 4
	mov	BYTE PTR -5[rbp], al
	movzx	eax, BYTE PTR -20[rbp]
	and	eax, 15
	mov	BYTE PTR -4[rbp], al
	movzx	eax, BYTE PTR -5[rbp]
	mov	edi, eax
	call	s_box_4
	mov	BYTE PTR -3[rbp], al
	movzx	eax, BYTE PTR -4[rbp]
	mov	edi, eax
	call	s_box_4
	mov	BYTE PTR -2[rbp], al
	movzx	eax, BYTE PTR -3[rbp]
	sal	eax, 4
	mov	edx, eax
	movzx	eax, BYTE PTR -2[rbp]
	add	eax, edx
	mov	BYTE PTR -1[rbp], al
	movzx	eax, BYTE PTR -1[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE23:
	.size	s_box_8, .-s_box_8
	.globl	inv_s_box_8
	.type	inv_s_box_8, @function
inv_s_box_8:
.LFB24:
	.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
	movzx	eax, BYTE PTR -20[rbp]
	shr	al, 4
	mov	BYTE PTR -5[rbp], al
	movzx	eax, BYTE PTR -20[rbp]
	and	eax, 15
	mov	BYTE PTR -4[rbp], al
	movzx	eax, BYTE PTR -5[rbp]
	mov	edi, eax
	call	inv_s_box_4
	mov	BYTE PTR -3[rbp], al
	movzx	eax, BYTE PTR -4[rbp]
	mov	edi, eax
	call	inv_s_box_4
	mov	BYTE PTR -2[rbp], al
	movzx	eax, BYTE PTR -3[rbp]
	sal	eax, 4
	mov	edx, eax
	movzx	eax, BYTE PTR -2[rbp]
	add	eax, edx
	mov	BYTE PTR -1[rbp], al
	movzx	eax, BYTE PTR -1[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE24:
	.size	inv_s_box_8, .-inv_s_box_8
	.globl	generate_keys
	.type	generate_keys, @function
generate_keys:
.LFB25:
	.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	edi, 6
	call	malloc@PLT
	mov	QWORD PTR -24[rbp], rax
	mov	BYTE PTR -26[rbp], -128
	mov	BYTE PTR -25[rbp], 48
	mov	rax, QWORD PTR -40[rbp]
	movzx	eax, BYTE PTR [rax]
	sal	eax, 4
	mov	edx, eax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, 1
	movzx	eax, BYTE PTR [rax]
	add	edx, eax
	mov	rax, QWORD PTR -24[rbp]
	mov	BYTE PTR [rax], dl
	mov	rax, QWORD PTR -40[rbp]
	add	rax, 2
	movzx	eax, BYTE PTR [rax]
	sal	eax, 4
	mov	ecx, eax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, 3
	movzx	edx, BYTE PTR [rax]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 1
	add	edx, ecx
	mov	BYTE PTR [rax], dl
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR [rax]
	xor	al, BYTE PTR -26[rbp]
	mov	ebx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 1
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	mov	edi, eax
	call	rotate_byte
	movzx	eax, al
	mov	edi, eax
	call	s_box_8
	mov	edx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 2
	xor	edx, ebx
	mov	BYTE PTR [rax], dl
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 2
	movzx	ecx, BYTE PTR [rax]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 1
	movzx	edx, BYTE PTR [rax]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 3
	xor	edx, ecx
	mov	BYTE PTR [rax], dl
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 2
	movzx	eax, BYTE PTR [rax]
	xor	al, BYTE PTR -25[rbp]
	mov	ebx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 3
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	mov	edi, eax
	call	rotate_byte
	movzx	eax, al
	mov	edi, eax
	call	s_box_8
	mov	edx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 4
	xor	edx, ebx
	mov	BYTE PTR [rax], dl
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 4
	movzx	ecx, BYTE PTR [rax]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 3
	movzx	edx, BYTE PTR [rax]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 5
	xor	edx, ecx
	mov	BYTE PTR [rax], dl
	mov	rax, QWORD PTR -24[rbp]
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE25:
	.size	generate_keys, .-generate_keys
	.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	"821403.c"
	.text
	.section	.rodata
	.align	2
.LC2:
	.ascii	"Too few options. Program terminating...\000"
	.align	2
.LC3:
	.ascii	"-e\000"
	.align	2
.LC4:
	.ascii	"Set to encrypt.\000"
	.align	2
.LC5:
	.ascii	"-d\000"
	.align	2
.LC6:
	.ascii	"Set to decrypt.\000"
	.align	2
.LC7:
	.ascii	"Invalid option. Program terminating...\000"
	.align	2
.LC8:
	.ascii	"r\000"
	.align	2
.LC9:
	.ascii	"Cannot open input file, or file does not exist. Exi"
	.ascii	"ting...\000"
	.align	2
.LC10:
	.ascii	"Cannot read from input file. Exiting...\000"
	.align	2
.LC11:
	.ascii	"File data:\011%s\000"
	.align	2
.LC12:
	.ascii	"Data size: \011%d nibbles\012\000"
	.align	2
.LC13:
	.ascii	"Irregular data. Please pad to continue.\000"
	.align	2
.LC14:
	.ascii	"Key:\011\0110x%04X\012\000"
	.align	2
.LC15:
	.ascii	"Plaintext:\0110x\000"
	.align	2
.LC16:
	.ascii	"%04X\000"
	.align	2
.LC17:
	.ascii	"\012Ciphertext:\0110x\000"
	.align	2
.LC18:
	.ascii	"Ciphertext:\0110x\000"
	.align	2
.LC19:
	.ascii	"\012Plaintext:\0110x\000"
	.align	2
.LC20:
	.ascii	"w\000"
	.align	2
.LC21:
	.ascii	"Cannot open output file. Exiting...\000"
	.align	2
.LC22:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 96
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #96
	str	r0, [fp, #-104]
	str	r1, [fp, #-108]
	ldr	r3, .L34
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-88]
	mov	r3, #0
	str	r3, [fp, #-92]
	ldr	r3, [fp, #-104]
	cmp	r3, #3
	bgt	.L2
	ldr	r0, .L34+4
	bl	puts
	mov	r0, #1
	bl	exit
.L2:
	ldr	r3, [fp, #-108]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-80]
	ldr	r1, .L34+8
	ldr	r0, [fp, #-80]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L3
	mov	r3, #1
	str	r3, [fp, #-88]
	ldr	r0, .L34+12
	bl	puts
	b	.L4
.L3:
	ldr	r1, .L34+16
	ldr	r0, [fp, #-80]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L5
	mov	r3, #1
	str	r3, [fp, #-92]
	ldr	r0, .L34+20
	bl	puts
	b	.L4
.L5:
	ldr	r0, .L34+24
	bl	puts
	mov	r0, #1
	bl	exit
.L4:
	ldr	r3, [fp, #-108]
	ldr	r3, [r3, #8]
	str	r3, [fp, #-76]
	ldr	r1, .L34+28
	ldr	r0, [fp, #-76]
	bl	fopen
	str	r0, [fp, #-72]
	mov	r0, #100
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-68]
	mov	r3, #100
	str	r3, [fp, #-64]
	ldr	r3, [fp, #-72]
	cmp	r3, #0
	bne	.L6
	ldr	r0, .L34+32
	bl	puts
	mov	r0, #1
	bl	exit
.L6:
	ldr	r2, [fp, #-72]
	mov	r1, #100
	ldr	r0, [fp, #-68]
	bl	fgets
	mov	r3, r0
	cmp	r3, #0
	bne	.L7
	ldr	r0, .L34+36
	bl	puts
	mov	r0, #1
	bl	exit
.L7:
	ldr	r1, [fp, #-68]
	ldr	r0, .L34+40
	bl	printf
	ldr	r0, [fp, #-72]
	bl	fclose
	ldr	r0, [fp, #-68]
	bl	strlen
	mov	r3, r0
	sub	r3, r3, #1
	str	r3, [fp, #-60]
	ldr	r3, [fp, #-60]
	add	r2, r3, #3
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #2
	str	r3, [fp, #-56]
	ldr	r1, [fp, #-60]
	ldr	r0, .L34+44
	bl	printf
	ldr	r3, [fp, #-60]
	and	r3, r3, #3
	cmp	r3, #0
	beq	.L8
	ldr	r0, .L34+48
	bl	puts
	mov	r0, #1
	bl	exit
.L8:
	ldr	r3, [fp, #-108]
	ldr	r3, [r3, #12]
	str	r3, [fp, #-52]
	mov	r0, #4
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-48]
	mov	r3, #0
	str	r3, [fp, #-96]
	b	.L9
.L10:
	ldr	r3, [fp, #-96]
	ldr	r2, [fp, #-52]
	add	r3, r2, r3
	ldrb	r1, [r3]	@ zero_extendqisi2
	ldr	r3, [fp, #-96]
	ldr	r2, [fp, #-48]
	add	r4, r2, r3
	mov	r0, r1
	bl	convert_char_to_hex
	mov	r3, r0
	strb	r3, [r4]
	ldr	r3, [fp, #-96]
	add	r3, r3, #1
	str	r3, [fp, #-96]
.L9:
	ldr	r3, [fp, #-96]
	cmp	r3, #3
	ble	.L10
	mov	r3, #0
	strh	r3, [fp, #-98]	@ movhi
	mov	r3, #0
	str	r3, [fp, #-96]
	b	.L11
.L12:
	ldr	r3, [fp, #-96]
	ldr	r2, [fp, #-48]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r3, [fp, #-96]
	rsb	r3, r3, #3
	lsl	r3, r3, #2
	lsl	r3, r2, r3
	lsl	r3, r3, #16
	lsr	r2, r3, #16
	ldrh	r3, [fp, #-98]	@ movhi
	add	r3, r2, r3
	strh	r3, [fp, #-98]	@ movhi
	ldr	r3, [fp, #-96]
	add	r3, r3, #1
	str	r3, [fp, #-96]
.L11:
	ldr	r3, [fp, #-96]
	cmp	r3, #3
	ble	.L12
	ldrh	r3, [fp, #-98]
	mov	r1, r3
	ldr	r0, .L34+52
	bl	printf
	ldr	ip, [fp, #-60]
	mov	r3, sp
	mov	r5, r3
	sub	r3, ip, #1
	str	r3, [fp, #-44]
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #3
	orr	r3, r3, r0, lsr #29
	lsl	r2, r0, #3
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #3
	orr	r3, r3, r0, lsr #29
	lsl	r2, r0, #3
	mov	r3, ip
	add	r3, r3, #7
	lsr	r3, r3, #3
	lsl	r3, r3, #3
	sub	sp, sp, r3
	mov	r3, sp
	add	r3, r3, #0
	str	r3, [fp, #-40]
	mov	r3, #0
	str	r3, [fp, #-96]
	b	.L13
.L14:
	ldr	r3, [fp, #-96]
	ldr	r2, [fp, #-68]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	bl	convert_char_to_hex
	mov	r3, r0
	mov	r1, r3
	ldr	r2, [fp, #-40]
	ldr	r3, [fp, #-96]
	add	r3, r2, r3
	mov	r2, r1
	strb	r2, [r3]
	ldr	r3, [fp, #-96]
	add	r3, r3, #1
	str	r3, [fp, #-96]
.L13:
	ldr	r2, [fp, #-96]
	ldr	r3, [fp, #-60]
	cmp	r2, r3
	blt	.L14
	ldr	r3, [fp, #-56]
	lsl	r3, r3, #1
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-36]
	mov	r3, #0
	str	r3, [fp, #-96]
	b	.L15
.L18:
	ldr	r3, [fp, #-96]
	lsl	r3, r3, #2
	str	r3, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-84]
	b	.L16
.L17:
	ldr	r3, [fp, #-96]
	lsl	r3, r3, #1
	ldr	r2, [fp, #-36]
	add	r3, r2, r3
	ldrh	r1, [r3]
	ldr	r2, [fp, #-84]
	ldr	r3, [fp, #-20]
	add	r3, r2, r3
	ldr	r2, [fp, #-40]
	ldrb	r3, [r2, r3]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r3, [fp, #-84]
	rsb	r3, r3, #3
	lsl	r3, r3, #2
	lsl	r3, r2, r3
	lsl	r3, r3, #16
	lsr	r2, r3, #16
	ldr	r3, [fp, #-96]
	lsl	r3, r3, #1
	ldr	r0, [fp, #-36]
	add	r3, r0, r3
	add	r2, r1, r2
	lsl	r2, r2, #16
	lsr	r2, r2, #16
	strh	r2, [r3]	@ movhi
	ldr	r3, [fp, #-84]
	add	r3, r3, #1
	str	r3, [fp, #-84]
.L16:
	ldr	r3, [fp, #-84]
	cmp	r3, #3
	ble	.L17
	ldr	r3, [fp, #-96]
	add	r3, r3, #1
	str	r3, [fp, #-96]
.L15:
	ldr	r2, [fp, #-96]
	ldr	r3, [fp, #-56]
	cmp	r2, r3
	blt	.L18
	ldr	r3, [fp, #-56]
	lsl	r3, r3, #1
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-88]
	cmp	r3, #0
	beq	.L19
	ldr	r0, .L34+56
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-96]
	b	.L20
.L21:
	ldr	r3, [fp, #-96]
	lsl	r3, r3, #1
	ldr	r2, [fp, #-36]
	add	r3, r2, r3
	ldrh	r3, [r3]
	mov	r1, r3
	ldr	r0, .L34+60
	bl	printf
	ldr	r3, [fp, #-96]
	add	r3, r3, #1
	str	r3, [fp, #-96]
.L20:
	ldr	r2, [fp, #-96]
	ldr	r3, [fp, #-56]
	cmp	r2, r3
	blt	.L21
	ldr	r0, .L34+64
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-96]
	b	.L22
.L23:
	ldr	r3, [fp, #-96]
	lsl	r3, r3, #1
	ldr	r2, [fp, #-36]
	add	r3, r2, r3
	ldrh	r0, [r3]
	ldr	r3, [fp, #-96]
	lsl	r3, r3, #1
	ldr	r2, [fp, #-32]
	add	r4, r2, r3
	ldr	r1, [fp, #-48]
	bl	encrypt_word
	mov	r3, r0
	strh	r3, [r4]	@ movhi
	ldr	r3, [fp, #-96]
	lsl	r3, r3, #1
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldrh	r3, [r3]
	mov	r1, r3
	ldr	r0, .L34+60
	bl	printf
	ldr	r3, [fp, #-96]
	add	r3, r3, #1
	str	r3, [fp, #-96]
.L22:
	ldr	r2, [fp, #-96]
	ldr	r3, [fp, #-56]
	cmp	r2, r3
	blt	.L23
	mov	r0, #10
	bl	putchar
	b	.L24
.L19:
	ldr	r3, [fp, #-92]
	cmp	r3, #0
	beq	.L24
	ldr	r0, .L34+68
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-96]
	b	.L25
.L26:
	ldr	r3, [fp, #-96]
	lsl	r3, r3, #1
	ldr	r2, [fp, #-36]
	add	r3, r2, r3
	ldrh	r3, [r3]
	mov	r1, r3
	ldr	r0, .L34+60
	bl	printf
	ldr	r3, [fp, #-96]
	add	r3, r3, #1
	str	r3, [fp, #-96]
.L25:
	ldr	r2, [fp, #-96]
	ldr	r3, [fp, #-56]
	cmp	r2, r3
	blt	.L26
	ldr	r0, .L34+72
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-96]
	b	.L27
.L28:
	ldr	r3, [fp, #-96]
	lsl	r3, r3, #1
	ldr	r2, [fp, #-36]
	add	r3, r2, r3
	ldrh	r0, [r3]
	ldr	r3, [fp, #-96]
	lsl	r3, r3, #1
	ldr	r2, [fp, #-32]
	add	r4, r2, r3
	ldr	r1, [fp, #-48]
	bl	decrypt_word
	mov	r3, r0
	strh	r3, [r4]	@ movhi
	ldr	r3, [fp, #-96]
	lsl	r3, r3, #1
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldrh	r3, [r3]
	mov	r1, r3
	ldr	r0, .L34+60
	bl	printf
	ldr	r3, [fp, #-96]
	add	r3, r3, #1
	str	r3, [fp, #-96]
.L27:
	ldr	r2, [fp, #-96]
	ldr	r3, [fp, #-56]
	cmp	r2, r3
	blt	.L28
	mov	r0, #10
	bl	putchar
.L24:
	ldr	r3, [fp, #-108]
	ldr	r3, [r3, #16]
	str	r3, [fp, #-28]
	ldr	r1, .L34+76
	ldr	r0, [fp, #-28]
	bl	fopen
	str	r0, [fp, #-24]
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bne	.L29
	ldr	r0, .L34+80
	bl	puts
	mov	r0, #1
	bl	exit
.L29:
	mov	r3, #0
	str	r3, [fp, #-96]
	b	.L30
.L31:
	ldr	r3, [fp, #-96]
	lsl	r3, r3, #1
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldrh	r3, [r3]
	mov	r2, r3
	ldr	r1, .L34+60
	ldr	r0, [fp, #-24]
	bl	fprintf
	ldr	r3, [fp, #-96]
	add	r3, r3, #1
	str	r3, [fp, #-96]
.L30:
	ldr	r2, [fp, #-96]
	ldr	r3, [fp, #-56]
	cmp	r2, r3
	blt	.L31
	ldr	r1, [fp, #-24]
	mov	r0, #10
	bl	fputc
	ldr	r0, [fp, #-24]
	bl	fclose
	mov	sp, r5
	mov	r3, #0
	ldr	r2, .L34
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L33
	bl	__stack_chk_fail
.L33:
	mov	r0, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L35:
	.align	2
.L34:
	.word	.LC22
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.word	.LC17
	.word	.LC18
	.word	.LC19
	.word	.LC20
	.word	.LC21
	.size	main, .-main
	.align	2
	.global	encrypt_word
	.syntax unified
	.arm
	.fpu softvfp
	.type	encrypt_word, %function
encrypt_word:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	mov	r3, r0
	str	r1, [fp, #-28]
	strh	r3, [fp, #-22]	@ movhi
	ldrh	r3, [fp, #-22]	@ movhi
	strh	r3, [fp, #-16]	@ movhi
	ldr	r0, [fp, #-28]
	bl	generate_keys
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	lsl	r3, r3, #8
	lsl	r3, r3, #16
	lsr	r2, r3, #16
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	add	r3, r2, r3
	strh	r3, [fp, #-14]	@ movhi
	ldr	r3, [fp, #-8]
	add	r3, r3, #2
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	lsl	r3, r3, #8
	lsl	r3, r3, #16
	lsr	r2, r3, #16
	ldr	r3, [fp, #-8]
	add	r3, r3, #3
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	add	r3, r2, r3
	strh	r3, [fp, #-12]	@ movhi
	ldr	r3, [fp, #-8]
	add	r3, r3, #4
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	lsl	r3, r3, #8
	lsl	r3, r3, #16
	lsr	r2, r3, #16
	ldr	r3, [fp, #-8]
	add	r3, r3, #5
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	add	r3, r2, r3
	strh	r3, [fp, #-10]	@ movhi
	ldrh	r2, [fp, #-14]
	ldrh	r3, [fp, #-16]
	mov	r1, r2
	mov	r0, r3
	bl	add_key
	mov	r3, r0
	strh	r3, [fp, #-16]	@ movhi
	ldrh	r3, [fp, #-16]
	mov	r0, r3
	bl	n_substitution
	mov	r3, r0
	strh	r3, [fp, #-16]	@ movhi
	ldrh	r3, [fp, #-16]
	mov	r0, r3
	bl	shift_row
	mov	r3, r0
	strh	r3, [fp, #-16]	@ movhi
	ldrh	r3, [fp, #-16]
	mov	r0, r3
	bl	mix_column
	mov	r3, r0
	strh	r3, [fp, #-16]	@ movhi
	ldrh	r2, [fp, #-12]
	ldrh	r3, [fp, #-16]
	mov	r1, r2
	mov	r0, r3
	bl	add_key
	mov	r3, r0
	strh	r3, [fp, #-16]	@ movhi
	ldrh	r3, [fp, #-16]
	mov	r0, r3
	bl	n_substitution
	mov	r3, r0
	strh	r3, [fp, #-16]	@ movhi
	ldrh	r3, [fp, #-16]
	mov	r0, r3
	bl	shift_row
	mov	r3, r0
	strh	r3, [fp, #-16]	@ movhi
	ldrh	r2, [fp, #-10]
	ldrh	r3, [fp, #-16]
	mov	r1, r2
	mov	r0, r3
	bl	add_key
	mov	r3, r0
	strh	r3, [fp, #-16]	@ movhi
	ldrh	r3, [fp, #-16]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	encrypt_word, .-encrypt_word
	.align	2
	.global	decrypt_word
	.syntax unified
	.arm
	.fpu softvfp
	.type	decrypt_word, %function
decrypt_word:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	mov	r3, r0
	str	r1, [fp, #-28]
	strh	r3, [fp, #-22]	@ movhi
	ldrh	r3, [fp, #-22]	@ movhi
	strh	r3, [fp, #-16]	@ movhi
	ldr	r0, [fp, #-28]
	bl	generate_keys
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	lsl	r3, r3, #8
	lsl	r3, r3, #16
	lsr	r2, r3, #16
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	add	r3, r2, r3
	strh	r3, [fp, #-14]	@ movhi
	ldr	r3, [fp, #-8]
	add	r3, r3, #2
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	lsl	r3, r3, #8
	lsl	r3, r3, #16
	lsr	r2, r3, #16
	ldr	r3, [fp, #-8]
	add	r3, r3, #3
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	add	r3, r2, r3
	strh	r3, [fp, #-12]	@ movhi
	ldr	r3, [fp, #-8]
	add	r3, r3, #4
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	lsl	r3, r3, #8
	lsl	r3, r3, #16
	lsr	r2, r3, #16
	ldr	r3, [fp, #-8]
	add	r3, r3, #5
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	add	r3, r2, r3
	strh	r3, [fp, #-10]	@ movhi
	ldrh	r2, [fp, #-10]
	ldrh	r3, [fp, #-16]
	mov	r1, r2
	mov	r0, r3
	bl	add_key
	mov	r3, r0
	strh	r3, [fp, #-16]	@ movhi
	ldrh	r3, [fp, #-16]
	mov	r0, r3
	bl	shift_row
	mov	r3, r0
	strh	r3, [fp, #-16]	@ movhi
	ldrh	r3, [fp, #-16]
	mov	r0, r3
	bl	inv_n_substitution
	mov	r3, r0
	strh	r3, [fp, #-16]	@ movhi
	ldrh	r2, [fp, #-12]
	ldrh	r3, [fp, #-16]
	mov	r1, r2
	mov	r0, r3
	bl	add_key
	mov	r3, r0
	strh	r3, [fp, #-16]	@ movhi
	ldrh	r3, [fp, #-16]
	mov	r0, r3
	bl	inv_mix_column
	mov	r3, r0
	strh	r3, [fp, #-16]	@ movhi
	ldrh	r3, [fp, #-16]
	mov	r0, r3
	bl	shift_row
	mov	r3, r0
	strh	r3, [fp, #-16]	@ movhi
	ldrh	r3, [fp, #-16]
	mov	r0, r3
	bl	inv_n_substitution
	mov	r3, r0
	strh	r3, [fp, #-16]	@ movhi
	ldrh	r2, [fp, #-14]
	ldrh	r3, [fp, #-16]
	mov	r1, r2
	mov	r0, r3
	bl	add_key
	mov	r3, r0
	strh	r3, [fp, #-16]	@ movhi
	ldrh	r3, [fp, #-16]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	decrypt_word, .-decrypt_word
	.align	2
	.global	add_key
	.syntax unified
	.arm
	.fpu softvfp
	.type	add_key, %function
add_key:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	mov	r3, r0
	mov	r2, r1
	strh	r3, [fp, #-14]	@ movhi
	mov	r3, r2	@ movhi
	strh	r3, [fp, #-16]	@ movhi
	ldrh	r2, [fp, #-14]	@ movhi
	ldrh	r3, [fp, #-16]	@ movhi
	eor	r3, r3, r2
	strh	r3, [fp, #-6]	@ movhi
	ldrh	r3, [fp, #-6]
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	add_key, .-add_key
	.align	2
	.global	n_substitution
	.syntax unified
	.arm
	.fpu softvfp
	.type	n_substitution, %function
n_substitution:
	@ 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
	strh	r3, [fp, #-14]	@ movhi
	ldrh	r3, [fp, #-14]
	lsr	r3, r3, #8
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	strb	r3, [fp, #-10]
	ldrh	r3, [fp, #-14]	@ movhi
	strb	r3, [fp, #-9]
	ldrb	r3, [fp, #-10]	@ zero_extendqisi2
	mov	r0, r3
	bl	s_box_8
	mov	r3, r0
	strb	r3, [fp, #-8]
	ldrb	r3, [fp, #-9]	@ zero_extendqisi2
	mov	r0, r3
	bl	s_box_8
	mov	r3, r0
	strb	r3, [fp, #-7]
	ldrb	r3, [fp, #-8]	@ zero_extendqisi2
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	lsl	r3, r3, #8
	lsl	r3, r3, #16
	lsr	r2, r3, #16
	ldrb	r3, [fp, #-7]	@ zero_extendqisi2
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	add	r3, r2, r3
	strh	r3, [fp, #-6]	@ movhi
	ldrh	r3, [fp, #-6]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	n_substitution, .-n_substitution
	.align	2
	.global	inv_n_substitution
	.syntax unified
	.arm
	.fpu softvfp
	.type	inv_n_substitution, %function
inv_n_substitution:
	@ 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
	strh	r3, [fp, #-14]	@ movhi
	ldrh	r3, [fp, #-14]
	lsr	r3, r3, #8
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	strb	r3, [fp, #-10]
	ldrh	r3, [fp, #-14]	@ movhi
	strb	r3, [fp, #-9]
	ldrb	r3, [fp, #-10]	@ zero_extendqisi2
	mov	r0, r3
	bl	inv_s_box_8
	mov	r3, r0
	strb	r3, [fp, #-8]
	ldrb	r3, [fp, #-9]	@ zero_extendqisi2
	mov	r0, r3
	bl	inv_s_box_8
	mov	r3, r0
	strb	r3, [fp, #-7]
	ldrb	r3, [fp, #-8]	@ zero_extendqisi2
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	lsl	r3, r3, #8
	lsl	r3, r3, #16
	lsr	r2, r3, #16
	ldrb	r3, [fp, #-7]	@ zero_extendqisi2
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	add	r3, r2, r3
	strh	r3, [fp, #-6]	@ movhi
	ldrh	r3, [fp, #-6]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	inv_n_substitution, .-inv_n_substitution
	.section	.rodata
	.align	2
.LC23:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	shift_row
	.syntax unified
	.arm
	.fpu softvfp
	.type	shift_row, %function
shift_row:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	mov	r3, r0
	strh	r3, [fp, #-22]	@ movhi
	ldr	r3, .L53
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L47
.L48:
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	mov	r2, #15
	lsl	r2, r2, r3
	ldrh	r3, [fp, #-22]
	and	r2, r2, r3
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	asr	r3, r2, r3
	and	r1, r3, #255
	sub	r2, fp, #12
	ldr	r3, [fp, #-16]
	add	r3, r2, r3
	mov	r2, r1
	strb	r2, [r3]
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L47:
	ldr	r3, [fp, #-16]
	cmp	r3, #3
	ble	.L48
	ldrb	r3, [fp, #-12]
	strb	r3, [fp, #-19]
	ldrb	r3, [fp, #-10]	@ zero_extendqisi2
	strb	r3, [fp, #-12]
	ldrb	r3, [fp, #-19]
	strb	r3, [fp, #-10]
	mov	r3, #0
	strh	r3, [fp, #-18]	@ movhi
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L49
.L50:
	sub	r2, fp, #12
	ldr	r3, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	lsl	r3, r2, r3
	lsl	r3, r3, #16
	lsr	r2, r3, #16
	ldrh	r3, [fp, #-18]	@ movhi
	add	r3, r2, r3
	strh	r3, [fp, #-18]	@ movhi
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L49:
	ldr	r3, [fp, #-16]
	cmp	r3, #3
	ble	.L50
	ldrh	r3, [fp, #-18]
	ldr	r2, .L53
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L52
	bl	__stack_chk_fail
.L52:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L54:
	.align	2
.L53:
	.word	.LC23
	.size	shift_row, .-shift_row
	.section	.rodata
	.align	2
.LC24:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	mix_column
	.syntax unified
	.arm
	.fpu softvfp
	.type	mix_column, %function
mix_column:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #36
	mov	r3, r0
	strh	r3, [fp, #-38]	@ movhi
	ldr	r3, .L62
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, #3
	str	r3, [fp, #-28]
	b	.L56
.L57:
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	mov	r2, #15
	lsl	r2, r2, r3
	ldrh	r3, [fp, #-38]
	and	r2, r2, r3
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	asr	r2, r2, r3
	ldr	r3, [fp, #-28]
	rsb	r3, r3, #3
	and	r2, r2, #255
	sub	r1, fp, #12
	add	r3, r1, r3
	strb	r2, [r3, #-12]
	ldr	r3, [fp, #-28]
	sub	r3, r3, #1
	str	r3, [fp, #-28]
.L56:
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	bge	.L57
	ldrb	r4, [fp, #-24]	@ zero_extendqisi2
	ldrb	r3, [fp, #-23]	@ zero_extendqisi2
	mov	r1, r3
	mov	r0, #4
	bl	gf_mult_4
	mov	r3, r0
	eor	r3, r3, r4
	and	r3, r3, #255
	strb	r3, [fp, #-20]
	ldrb	r3, [fp, #-24]	@ zero_extendqisi2
	mov	r1, r3
	mov	r0, #4
	bl	gf_mult_4
	mov	r3, r0
	mov	r2, r3
	ldrb	r3, [fp, #-23]	@ zero_extendqisi2
	eor	r3, r3, r2
	and	r3, r3, #255
	strb	r3, [fp, #-19]
	ldrb	r4, [fp, #-22]	@ zero_extendqisi2
	ldrb	r3, [fp, #-21]	@ zero_extendqisi2
	mov	r1, r3
	mov	r0, #4
	bl	gf_mult_4
	mov	r3, r0
	eor	r3, r3, r4
	and	r3, r3, #255
	strb	r3, [fp, #-18]
	ldrb	r3, [fp, #-22]	@ zero_extendqisi2
	mov	r1, r3
	mov	r0, #4
	bl	gf_mult_4
	mov	r3, r0
	mov	r2, r3
	ldrb	r3, [fp, #-21]	@ zero_extendqisi2
	eor	r3, r3, r2
	and	r3, r3, #255
	strb	r3, [fp, #-17]
	mov	r3, #0
	strh	r3, [fp, #-30]	@ movhi
	mov	r3, #3
	str	r3, [fp, #-28]
	b	.L58
.L59:
	ldr	r3, [fp, #-28]
	rsb	r3, r3, #3
	sub	r2, fp, #12
	add	r3, r2, r3
	ldrb	r3, [r3, #-8]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	lsl	r3, r2, r3
	lsl	r3, r3, #16
	lsr	r2, r3, #16
	ldrh	r3, [fp, #-30]	@ movhi
	add	r3, r2, r3
	strh	r3, [fp, #-30]	@ movhi
	ldr	r3, [fp, #-28]
	sub	r3, r3, #1
	str	r3, [fp, #-28]
.L58:
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	bge	.L59
	ldrh	r3, [fp, #-30]
	ldr	r2, .L62
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L61
	bl	__stack_chk_fail
.L61:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L63:
	.align	2
.L62:
	.word	.LC24
	.size	mix_column, .-mix_column
	.section	.rodata
	.align	2
.LC25:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	inv_mix_column
	.syntax unified
	.arm
	.fpu softvfp
	.type	inv_mix_column, %function
inv_mix_column:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #36
	mov	r3, r0
	strh	r3, [fp, #-38]	@ movhi
	ldr	r3, .L71
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, #3
	str	r3, [fp, #-28]
	b	.L65
.L66:
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	mov	r2, #15
	lsl	r2, r2, r3
	ldrh	r3, [fp, #-38]
	and	r2, r2, r3
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	asr	r2, r2, r3
	ldr	r3, [fp, #-28]
	rsb	r3, r3, #3
	and	r2, r2, #255
	sub	r1, fp, #12
	add	r3, r1, r3
	strb	r2, [r3, #-12]
	ldr	r3, [fp, #-28]
	sub	r3, r3, #1
	str	r3, [fp, #-28]
.L65:
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	bge	.L66
	ldrb	r3, [fp, #-24]	@ zero_extendqisi2
	mov	r1, r3
	mov	r0, #9
	bl	gf_mult_4
	mov	r3, r0
	mov	r4, r3
	ldrb	r3, [fp, #-23]	@ zero_extendqisi2
	mov	r1, r3
	mov	r0, #2
	bl	gf_mult_4
	mov	r3, r0
	eor	r3, r3, r4
	and	r3, r3, #255
	strb	r3, [fp, #-20]
	ldrb	r3, [fp, #-24]	@ zero_extendqisi2
	mov	r1, r3
	mov	r0, #2
	bl	gf_mult_4
	mov	r3, r0
	mov	r4, r3
	ldrb	r3, [fp, #-23]	@ zero_extendqisi2
	mov	r1, r3
	mov	r0, #9
	bl	gf_mult_4
	mov	r3, r0
	eor	r3, r3, r4
	and	r3, r3, #255
	strb	r3, [fp, #-19]
	ldrb	r3, [fp, #-22]	@ zero_extendqisi2
	mov	r1, r3
	mov	r0, #9
	bl	gf_mult_4
	mov	r3, r0
	mov	r4, r3
	ldrb	r3, [fp, #-21]	@ zero_extendqisi2
	mov	r1, r3
	mov	r0, #2
	bl	gf_mult_4
	mov	r3, r0
	eor	r3, r3, r4
	and	r3, r3, #255
	strb	r3, [fp, #-18]
	ldrb	r3, [fp, #-22]	@ zero_extendqisi2
	mov	r1, r3
	mov	r0, #2
	bl	gf_mult_4
	mov	r3, r0
	mov	r4, r3
	ldrb	r3, [fp, #-21]	@ zero_extendqisi2
	mov	r1, r3
	mov	r0, #9
	bl	gf_mult_4
	mov	r3, r0
	eor	r3, r3, r4
	and	r3, r3, #255
	strb	r3, [fp, #-17]
	mov	r3, #0
	strh	r3, [fp, #-30]	@ movhi
	mov	r3, #3
	str	r3, [fp, #-28]
	b	.L67
.L68:
	ldr	r3, [fp, #-28]
	rsb	r3, r3, #3
	sub	r2, fp, #12
	add	r3, r2, r3
	ldrb	r3, [r3, #-8]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	lsl	r3, r2, r3
	lsl	r3, r3, #16
	lsr	r2, r3, #16
	ldrh	r3, [fp, #-30]	@ movhi
	add	r3, r2, r3
	strh	r3, [fp, #-30]	@ movhi
	ldr	r3, [fp, #-28]
	sub	r3, r3, #1
	str	r3, [fp, #-28]
.L67:
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	bge	.L68
	ldrh	r3, [fp, #-30]
	ldr	r2, .L71
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L70
	bl	__stack_chk_fail
.L70:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L72:
	.align	2
.L71:
	.word	.LC25
	.size	inv_mix_column, .-inv_mix_column
	.align	2
	.global	poly_degree
	.syntax unified
	.arm
	.fpu softvfp
	.type	poly_degree, %function
poly_degree:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	mov	r3, r0
	strb	r3, [fp, #-13]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L74
.L75:
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	lsr	r3, r3, #1
	strb	r3, [fp, #-13]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L74:
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L75
	ldr	r3, [fp, #-8]
	sub	r3, r3, #1
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	poly_degree, .-poly_degree
	.align	2
	.global	gf_reduce_4
	.syntax unified
	.arm
	.fpu softvfp
	.type	gf_reduce_4, %function
gf_reduce_4:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	mov	r3, r0
	strb	r3, [fp, #-29]
	mov	r3, #19
	strb	r3, [fp, #-22]
	mvn	r3, #0
	strb	r3, [fp, #-21]
	mov	r3, #0
	str	r3, [fp, #-20]
	mov	r3, #4
	str	r3, [fp, #-16]
	ldrb	r3, [fp, #-29]
	strb	r3, [fp, #-23]
.L80:
	ldrb	r3, [fp, #-23]	@ zero_extendqisi2
	mov	r0, r3
	bl	poly_degree
	str	r0, [fp, #-12]
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-12]
	cmp	r2, r3
	ble	.L78
	ldrb	r3, [fp, #-23]
	strb	r3, [fp, #-21]
	b	.L82
.L78:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-16]
	sub	r3, r2, r3
	str	r3, [fp, #-8]
	ldrb	r2, [fp, #-22]	@ zero_extendqisi2
	ldr	r3, [fp, #-8]
	lsl	r3, r2, r3
	lsl	r3, r3, #24
	asr	r2, r3, #24
	ldrsb	r3, [fp, #-23]
	eor	r3, r3, r2
	lsl	r3, r3, #24
	asr	r3, r3, #24
	strb	r3, [fp, #-23]
	b	.L80
.L82:
	ldrb	r3, [fp, #-21]	@ zero_extendqisi2
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	gf_reduce_4, .-gf_reduce_4
	.align	2
	.global	gf_mult_4
	.syntax unified
	.arm
	.fpu softvfp
	.type	gf_mult_4, %function
gf_mult_4:
	@ 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
	mov	r2, r1
	strb	r3, [fp, #-13]
	mov	r3, r2
	strb	r3, [fp, #-14]
	mov	r3, #0
	strb	r3, [fp, #-10]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L84
.L86:
	ldrb	r2, [fp, #-13]	@ zero_extendqisi2
	ldr	r3, [fp, #-8]
	asr	r3, r2, r3
	and	r3, r3, #1
	cmp	r3, #0
	beq	.L85
	ldrb	r2, [fp, #-14]	@ zero_extendqisi2
	ldr	r3, [fp, #-8]
	lsl	r3, r2, r3
	lsl	r3, r3, #24
	asr	r2, r3, #24
	ldrsb	r3, [fp, #-10]
	eor	r3, r3, r2
	lsl	r3, r3, #24
	asr	r3, r3, #24
	strb	r3, [fp, #-10]
.L85:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L84:
	ldr	r3, [fp, #-8]
	cmp	r3, #3
	ble	.L86
	ldrb	r3, [fp, #-10]	@ zero_extendqisi2
	mov	r0, r3
	bl	gf_reduce_4
	mov	r3, r0
	strb	r3, [fp, #-9]
	ldrb	r3, [fp, #-9]	@ zero_extendqisi2
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	gf_mult_4, .-gf_mult_4
	.section	.rodata
	.align	2
.LC26:
	.ascii	"0x%x:\011\000"
	.align	2
.LC27:
	.ascii	"%d\000"
	.text
	.align	2
	.global	print_byte
	.syntax unified
	.arm
	.fpu softvfp
	.type	print_byte, %function
print_byte:
	@ 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
	mov	r1, r3
	ldr	r0, .L91
	bl	printf
	mov	r3, #7
	str	r3, [fp, #-12]
	b	.L89
.L90:
	mov	r2, #1
	ldr	r3, [fp, #-12]
	lsl	r2, r2, r3
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	and	r2, r2, r3
	ldr	r3, [fp, #-12]
	asr	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r1, [fp, #-8]
	ldr	r0, .L91+4
	bl	printf
	ldr	r3, [fp, #-12]
	sub	r3, r3, #1
	str	r3, [fp, #-12]
.L89:
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bge	.L90
	mov	r0, #10
	bl	putchar
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L92:
	.align	2
.L91:
	.word	.LC26
	.word	.LC27
	.size	print_byte, .-print_byte
	.align	2
	.global	convert_char_to_hex
	.syntax unified
	.arm
	.fpu softvfp
	.type	convert_char_to_hex, %function
convert_char_to_hex:
	@ 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
	mov	r0, r3
	bl	tolower
	mov	r3, r0
	strb	r3, [fp, #-5]
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #47
	bls	.L94
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #57
	bhi	.L94
	ldrb	r3, [fp, #-5]
	sub	r3, r3, #48
	strb	r3, [fp, #-6]
	b	.L95
.L94:
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #96
	bls	.L96
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #102
	bhi	.L96
	ldrb	r3, [fp, #-5]
	sub	r3, r3, #87
	strb	r3, [fp, #-6]
	b	.L95
.L96:
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	b	.L97
.L95:
	ldrb	r3, [fp, #-6]	@ zero_extendqisi2
.L97:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	convert_char_to_hex, .-convert_char_to_hex
	.align	2
	.global	rotate_byte
	.syntax unified
	.arm
	.fpu softvfp
	.type	rotate_byte, %function
rotate_byte:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	mov	r3, r0
	strb	r3, [fp, #-13]
	ldrb	r3, [fp, #-13]
	and	r3, r3, #15
	strb	r3, [fp, #-7]
	ldrb	r3, [fp, #-13]
	bic	r3, r3, #15
	strb	r3, [fp, #-6]
	ldrb	r3, [fp, #-7]
	lsl	r3, r3, #4
	and	r2, r3, #255
	ldrb	r3, [fp, #-6]	@ zero_extendqisi2
	lsr	r3, r3, #4
	and	r3, r3, #255
	add	r3, r2, r3
	strb	r3, [fp, #-5]
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	rotate_byte, .-rotate_byte
	.section	.rodata
	.align	2
.LC0:
	.ascii	"\011\004\012\013"
	.ascii	"\015\001\010\005"
	.ascii	"\006\002\000\003"
	.ascii	"\014\016\017\007"
	.align	2
.LC28:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	s_box_4
	.syntax unified
	.arm
	.fpu softvfp
	.type	s_box_4, %function
s_box_4:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	mov	r3, r0
	strb	r3, [fp, #-29]
	ldr	r3, .L103
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L103+4
	sub	ip, fp, #24
	ldm	r3, {r0, r1, r2, r3}
	stm	ip, {r0, r1, r2, r3}
	ldrb	r3, [fp, #-29]	@ zero_extendqisi2
	asr	r3, r3, #2
	and	r3, r3, #255
	and	r3, r3, #3
	strb	r3, [fp, #-27]
	ldrb	r3, [fp, #-29]
	and	r3, r3, #3
	strb	r3, [fp, #-26]
	ldrb	r2, [fp, #-27]	@ zero_extendqisi2
	ldrb	r3, [fp, #-26]	@ zero_extendqisi2
	lsl	r2, r2, #2
	sub	r1, fp, #4
	add	r2, r1, r2
	add	r3, r2, r3
	sub	r3, r3, #20
	ldrb	r3, [r3]
	strb	r3, [fp, #-25]
	ldrb	r3, [fp, #-25]	@ zero_extendqisi2
	ldr	r2, .L103
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L102
	bl	__stack_chk_fail
.L102:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L104:
	.align	2
.L103:
	.word	.LC28
	.word	.LC0
	.size	s_box_4, .-s_box_4
	.section	.rodata
	.align	2
.LC1:
	.ascii	"\012\005\011\013"
	.ascii	"\001\007\010\017"
	.ascii	"\006\000\002\003"
	.ascii	"\014\004\015\016"
	.align	2
.LC29:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	inv_s_box_4
	.syntax unified
	.arm
	.fpu softvfp
	.type	inv_s_box_4, %function
inv_s_box_4:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	mov	r3, r0
	strb	r3, [fp, #-29]
	ldr	r3, .L108
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L108+4
	sub	ip, fp, #24
	ldm	r3, {r0, r1, r2, r3}
	stm	ip, {r0, r1, r2, r3}
	ldrb	r3, [fp, #-29]	@ zero_extendqisi2
	asr	r3, r3, #2
	and	r3, r3, #255
	and	r3, r3, #3
	strb	r3, [fp, #-27]
	ldrb	r3, [fp, #-29]
	and	r3, r3, #3
	strb	r3, [fp, #-26]
	ldrb	r2, [fp, #-27]	@ zero_extendqisi2
	ldrb	r3, [fp, #-26]	@ zero_extendqisi2
	lsl	r2, r2, #2
	sub	r1, fp, #4
	add	r2, r1, r2
	add	r3, r2, r3
	sub	r3, r3, #20
	ldrb	r3, [r3]
	strb	r3, [fp, #-25]
	ldrb	r3, [fp, #-25]	@ zero_extendqisi2
	ldr	r2, .L108
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L107
	bl	__stack_chk_fail
.L107:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L109:
	.align	2
.L108:
	.word	.LC29
	.word	.LC1
	.size	inv_s_box_4, .-inv_s_box_4
	.align	2
	.global	s_box_8
	.syntax unified
	.arm
	.fpu softvfp
	.type	s_box_8, %function
s_box_8:
	@ 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
	lsr	r3, r3, #4
	strb	r3, [fp, #-9]
	ldrb	r3, [fp, #-13]
	and	r3, r3, #15
	strb	r3, [fp, #-8]
	ldrb	r3, [fp, #-9]	@ zero_extendqisi2
	mov	r0, r3
	bl	s_box_4
	mov	r3, r0
	strb	r3, [fp, #-7]
	ldrb	r3, [fp, #-8]	@ zero_extendqisi2
	mov	r0, r3
	bl	s_box_4
	mov	r3, r0
	strb	r3, [fp, #-6]
	ldrb	r3, [fp, #-7]
	lsl	r3, r3, #4
	and	r2, r3, #255
	ldrb	r3, [fp, #-6]
	add	r3, r2, r3
	strb	r3, [fp, #-5]
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	s_box_8, .-s_box_8
	.align	2
	.global	inv_s_box_8
	.syntax unified
	.arm
	.fpu softvfp
	.type	inv_s_box_8, %function
inv_s_box_8:
	@ 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
	lsr	r3, r3, #4
	strb	r3, [fp, #-9]
	ldrb	r3, [fp, #-13]
	and	r3, r3, #15
	strb	r3, [fp, #-8]
	ldrb	r3, [fp, #-9]	@ zero_extendqisi2
	mov	r0, r3
	bl	inv_s_box_4
	mov	r3, r0
	strb	r3, [fp, #-7]
	ldrb	r3, [fp, #-8]	@ zero_extendqisi2
	mov	r0, r3
	bl	inv_s_box_4
	mov	r3, r0
	strb	r3, [fp, #-6]
	ldrb	r3, [fp, #-7]
	lsl	r3, r3, #4
	and	r2, r3, #255
	ldrb	r3, [fp, #-6]
	add	r3, r2, r3
	strb	r3, [fp, #-5]
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	inv_s_box_8, .-inv_s_box_8
	.align	2
	.global	generate_keys
	.syntax unified
	.arm
	.fpu softvfp
	.type	generate_keys, %function
generate_keys:
	@ 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]
	mov	r0, #6
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-16]
	mvn	r3, #127
	strb	r3, [fp, #-18]
	mov	r3, #48
	strb	r3, [fp, #-17]
	ldr	r3, [fp, #-24]
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #4
	and	r2, r3, #255
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	ldrb	r3, [r3]	@ zero_extendqisi2
	add	r3, r2, r3
	and	r2, r3, #255
	ldr	r3, [fp, #-16]
	strb	r2, [r3]
	ldr	r3, [fp, #-24]
	add	r3, r3, #2
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #4
	and	r1, r3, #255
	ldr	r3, [fp, #-24]
	add	r3, r3, #3
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	add	r2, r1, r2
	and	r2, r2, #255
	strb	r2, [r3]
	ldr	r3, [fp, #-16]
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldrb	r3, [fp, #-18]
	eor	r3, r3, r2
	and	r4, r3, #255
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	bl	rotate_byte
	mov	r3, r0
	mov	r0, r3
	bl	s_box_8
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, #2
	eor	r2, r2, r4
	and	r2, r2, #255
	strb	r2, [r3]
	ldr	r3, [fp, #-16]
	add	r3, r3, #2
	ldrb	r1, [r3]	@ zero_extendqisi2
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r3, [fp, #-16]
	add	r3, r3, #3
	eor	r2, r2, r1
	and	r2, r2, #255
	strb	r2, [r3]
	ldr	r3, [fp, #-16]
	add	r3, r3, #2
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldrb	r3, [fp, #-17]
	eor	r3, r3, r2
	and	r4, r3, #255
	ldr	r3, [fp, #-16]
	add	r3, r3, #3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	bl	rotate_byte
	mov	r3, r0
	mov	r0, r3
	bl	s_box_8
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, #4
	eor	r2, r2, r4
	and	r2, r2, #255
	strb	r2, [r3]
	ldr	r3, [fp, #-16]
	add	r3, r3, #4
	ldrb	r1, [r3]	@ zero_extendqisi2
	ldr	r3, [fp, #-16]
	add	r3, r3, #3
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r3, [fp, #-16]
	add	r3, r3, #5
	eor	r2, r2, r1
	and	r2, r2, #255
	strb	r2, [r3]
	ldr	r3, [fp, #-16]
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
	.size	generate_keys, .-generate_keys
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
