	.file	"89220.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"
	.align 8
.LC11:
	.string	"Single block that is %d-bit(s) short detected,\nplaintext will be padded with %dx 0 at end.\n"
	.align 8
.LC12:
	.string	"Multiple blocks with last block that is %d-bit(s) short detected.\n"
.LC13:
	.string	"Key:\t\t0x%04X\n"
.LC14:
	.string	"Padded data:\t%s\n"
.LC15:
	.string	"CTR seed:\t0x%04X\n"
.LC16:
	.string	"Plaintext:\t0x"
.LC17:
	.string	"%04X"
.LC18:
	.string	"Ciphertext:\t0x"
.LC19:
	.string	"w"
	.align 8
.LC20:
	.string	"Cannot open output file. Exiting..."
.LC21:
	.string	"%s%s"
	.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	r14
	push	r13
	push	r12
	push	rbx
	sub	rsp, 320
	.cfi_offset 14, -24
	.cfi_offset 13, -32
	.cfi_offset 12, -40
	.cfi_offset 3, -48
	mov	DWORD PTR -260[rbp], edi
	mov	QWORD PTR -272[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -40[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -220[rbp], 0
	mov	DWORD PTR -224[rbp], 0
	cmp	DWORD PTR -260[rbp], 5
	jg	.L2
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	mov	rax, QWORD PTR -272[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -176[rbp], rax
	mov	rax, QWORD PTR -176[rbp]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L3
	mov	DWORD PTR -220[rbp], 1
	lea	rdi, .LC2[rip]
	call	puts@PLT
	jmp	.L4
.L3:
	mov	rax, QWORD PTR -176[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L5
	mov	DWORD PTR -224[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 -272[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	QWORD PTR -168[rbp], rax
	mov	rax, QWORD PTR -168[rbp]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -160[rbp], rax
	mov	edi, 100
	call	malloc@PLT
	mov	QWORD PTR -184[rbp], rax
	mov	DWORD PTR -212[rbp], 100
	cmp	QWORD PTR -160[rbp], 0
	jne	.L6
	lea	rdi, .LC7[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L6:
	mov	rax, QWORD PTR -160[rbp]
	mov	rcx, QWORD PTR -184[rbp]
	mov	rdx, rax
	mov	esi, 100
	mov	rdi, rcx
	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 -184[rbp]
	mov	rsi, rax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -160[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	DWORD PTR -208[rbp], 0
	mov	DWORD PTR -228[rbp], 0
	mov	rax, QWORD PTR -184[rbp]
	mov	rdi, rax
	call	strlen@PLT
	sub	eax, 1
	mov	DWORD PTR -204[rbp], eax
	pxor	xmm0, xmm0
	cvtsi2ss	xmm0, DWORD PTR -204[rbp]
	movss	xmm1, DWORD PTR .LC10[rip]
	divss	xmm0, xmm1
	movss	DWORD PTR -200[rbp], xmm0
	pxor	xmm2, xmm2
	cvtss2sd	xmm2, DWORD PTR -200[rbp]
	movq	rax, xmm2
	movq	xmm0, rax
	call	ceil@PLT
	cvttsd2si	eax, xmm0
	mov	DWORD PTR -196[rbp], eax
	cmp	DWORD PTR -204[rbp], 15
	jg	.L8
	mov	eax, 16
	sub	eax, DWORD PTR -204[rbp]
	mov	DWORD PTR -228[rbp], eax
	mov	edx, DWORD PTR -228[rbp]
	mov	eax, DWORD PTR -228[rbp]
	mov	esi, eax
	lea	rdi, .LC11[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L9
.L8:
	cmp	DWORD PTR -204[rbp], 16
	jle	.L9
	mov	DWORD PTR -208[rbp], 1
	pxor	xmm0, xmm0
	cvtsi2ss	xmm0, DWORD PTR -196[rbp]
	comiss	xmm0, DWORD PTR -200[rbp]
	jbe	.L9
	mov	eax, DWORD PTR -196[rbp]
	sal	eax, 4
	sub	eax, DWORD PTR -204[rbp]
	mov	DWORD PTR -228[rbp], eax
	mov	eax, DWORD PTR -228[rbp]
	mov	esi, eax
	lea	rdi, .LC12[rip]
	mov	eax, 0
	call	printf@PLT
.L9:
	mov	rax, QWORD PTR -272[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	QWORD PTR -152[rbp], rax
	mov	edi, 4
	call	malloc@PLT
	mov	QWORD PTR -144[rbp], rax
	mov	DWORD PTR -232[rbp], 0
	jmp	.L11
.L12:
	mov	eax, DWORD PTR -232[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -152[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	edx, al
	mov	eax, DWORD PTR -232[rbp]
	movsx	rcx, eax
	mov	rax, QWORD PTR -144[rbp]
	lea	rbx, [rcx+rax]
	mov	edi, edx
	call	convert_char_to_hex
	mov	BYTE PTR [rbx], al
	add	DWORD PTR -232[rbp], 1
.L11:
	cmp	DWORD PTR -232[rbp], 3
	jle	.L12
	mov	WORD PTR -242[rbp], 0
	mov	DWORD PTR -232[rbp], 0
	jmp	.L13
.L14:
	mov	eax, DWORD PTR -232[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -144[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movzx	edx, al
	mov	eax, 3
	sub	eax, DWORD PTR -232[rbp]
	sal	eax, 2
	mov	ecx, eax
	sal	edx, cl
	mov	eax, edx
	add	WORD PTR -242[rbp], ax
	add	DWORD PTR -232[rbp], 1
.L13:
	cmp	DWORD PTR -232[rbp], 3
	jle	.L14
	movzx	eax, WORD PTR -242[rbp]
	mov	esi, eax
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
	cmp	DWORD PTR -228[rbp], 0
	je	.L15
	mov	eax, DWORD PTR -196[rbp]
	sal	eax, 4
	add	eax, 1
	movsx	rdx, eax
	mov	rax, QWORD PTR -184[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	realloc@PLT
	mov	QWORD PTR -184[rbp], rax
	mov	eax, DWORD PTR -196[rbp]
	sal	eax, 4
	sub	eax, DWORD PTR -228[rbp]
	mov	DWORD PTR -232[rbp], eax
	jmp	.L16
.L17:
	mov	eax, DWORD PTR -232[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -184[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 48
	add	DWORD PTR -232[rbp], 1
.L16:
	mov	eax, DWORD PTR -196[rbp]
	sal	eax, 4
	cmp	DWORD PTR -232[rbp], eax
	jl	.L17
	mov	eax, DWORD PTR -196[rbp]
	sal	eax, 4
	movsx	rdx, eax
	mov	rax, QWORD PTR -184[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	mov	rax, QWORD PTR -184[rbp]
	mov	rsi, rax
	lea	rdi, .LC14[rip]
	mov	eax, 0
	call	printf@PLT
.L15:
	mov	edx, DWORD PTR -196[rbp]
	mov	rax, rsp
	mov	r14, rax
	movsx	rax, edx
	sub	rax, 1
	mov	QWORD PTR -136[rbp], rax
	movsx	rax, edx
	mov	QWORD PTR -288[rbp], rax
	mov	QWORD PTR -280[rbp], 0
	movsx	rax, edx
	mov	r12, rax
	mov	r13d, 0
	movsx	rax, edx
	lea	rdx, [rax+rax]
	mov	eax, 16
	sub	rax, 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
.L18:
	cmp	rsp, rdx
	je	.L19
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	jmp	.L18
.L19:
	mov	rdx, rax
	and	edx, 4095
	sub	rsp, rdx
	mov	rdx, rax
	and	edx, 4095
	test	rdx, rdx
	je	.L20
	and	eax, 4095
	sub	rax, 8
	add	rax, rsp
	or	QWORD PTR [rax], 0
.L20:
	mov	rax, rsp
	add	rax, 1
	shr	rax
	add	rax, rax
	mov	QWORD PTR -128[rbp], rax
	mov	DWORD PTR -232[rbp], 0
	jmp	.L21
.L24:
	mov	edi, 9
	call	malloc@PLT
	mov	QWORD PTR -56[rbp], rax
	mov	edi, 9
	call	malloc@PLT
	mov	QWORD PTR -48[rbp], rax
	mov	DWORD PTR -216[rbp], 0
	jmp	.L22
.L23:
	mov	eax, DWORD PTR -232[rbp]
	sal	eax, 4
	mov	edx, eax
	mov	eax, DWORD PTR -216[rbp]
	add	eax, edx
	movsx	rdx, eax
	mov	rax, QWORD PTR -184[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR -216[rbp]
	movsx	rcx, edx
	mov	rdx, QWORD PTR -56[rbp]
	add	rdx, rcx
	movzx	eax, BYTE PTR [rax]
	mov	BYTE PTR [rdx], al
	mov	eax, DWORD PTR -232[rbp]
	sal	eax, 4
	mov	edx, eax
	mov	eax, DWORD PTR -216[rbp]
	add	eax, edx
	cdqe
	lea	rdx, 8[rax]
	mov	rax, QWORD PTR -184[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR -216[rbp]
	movsx	rcx, edx
	mov	rdx, QWORD PTR -48[rbp]
	add	rdx, rcx
	movzx	eax, BYTE PTR [rax]
	mov	BYTE PTR [rdx], al
	add	DWORD PTR -216[rbp], 1
.L22:
	cmp	DWORD PTR -216[rbp], 7
	jle	.L23
	mov	rax, QWORD PTR -56[rbp]
	add	rax, 8
	mov	BYTE PTR [rax], 0
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 8
	mov	BYTE PTR [rax], 0
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	bit_string_to_byte
	mov	BYTE PTR -244[rbp], al
	mov	rax, QWORD PTR -48[rbp]
	mov	rdi, rax
	call	bit_string_to_byte
	mov	BYTE PTR -243[rbp], al
	movzx	eax, BYTE PTR -244[rbp]
	sal	eax, 8
	mov	edx, eax
	movzx	eax, BYTE PTR -243[rbp]
	lea	ecx, [rdx+rax]
	mov	rax, QWORD PTR -128[rbp]
	mov	edx, DWORD PTR -232[rbp]
	movsx	rdx, edx
	mov	WORD PTR [rax+rdx*2], cx
	add	DWORD PTR -232[rbp], 1
.L21:
	mov	eax, DWORD PTR -232[rbp]
	cmp	eax, DWORD PTR -196[rbp]
	jl	.L24
	mov	rax, QWORD PTR -272[rbp]
	add	rax, 40
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -192[rbp], eax
	mov	rdx, QWORD PTR -144[rbp]
	mov	eax, DWORD PTR -192[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	generate_IV_from_nonce
	mov	WORD PTR -240[rbp], ax
	movzx	eax, WORD PTR -240[rbp]
	mov	esi, eax
	lea	rdi, .LC15[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -196[rbp]
	mov	rdx, rsp
	mov	r12, rdx
	movsx	rdx, eax
	sub	rdx, 1
	mov	QWORD PTR -120[rbp], rdx
	movsx	rdx, eax
	mov	QWORD PTR -304[rbp], rdx
	mov	QWORD PTR -296[rbp], 0
	movsx	rdx, eax
	mov	QWORD PTR -320[rbp], rdx
	mov	QWORD PTR -312[rbp], 0
	cdqe
	lea	rdx, [rax+rax]
	mov	eax, 16
	sub	rax, 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
.L25:
	cmp	rsp, rdx
	je	.L26
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	jmp	.L25
.L26:
	mov	rdx, rax
	and	edx, 4095
	sub	rsp, rdx
	mov	rdx, rax
	and	edx, 4095
	test	rdx, rdx
	je	.L27
	and	eax, 4095
	sub	rax, 8
	add	rax, rsp
	or	QWORD PTR [rax], 0
.L27:
	mov	rax, rsp
	add	rax, 1
	shr	rax
	add	rax, rax
	mov	QWORD PTR -112[rbp], rax
	movzx	eax, WORD PTR -240[rbp]
	mov	rdx, QWORD PTR -144[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	generate_IV_from_nonce
	mov	rdx, QWORD PTR -112[rbp]
	mov	WORD PTR [rdx], ax
	mov	DWORD PTR -232[rbp], 1
	jmp	.L28
.L29:
	mov	eax, DWORD PTR -232[rbp]
	lea	edx, -1[rax]
	mov	rax, QWORD PTR -112[rbp]
	movsx	rdx, edx
	movzx	eax, WORD PTR [rax+rdx*2]
	movzx	eax, ax
	mov	rdx, QWORD PTR -144[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	generate_IV_from_nonce
	mov	rdx, QWORD PTR -112[rbp]
	mov	ecx, DWORD PTR -232[rbp]
	movsx	rcx, ecx
	mov	WORD PTR [rdx+rcx*2], ax
	add	DWORD PTR -232[rbp], 1
.L28:
	mov	eax, DWORD PTR -232[rbp]
	cmp	eax, DWORD PTR -196[rbp]
	jl	.L29
	mov	eax, DWORD PTR -196[rbp]
	mov	rdx, rsp
	mov	r13, rdx
	movsx	rdx, eax
	sub	rdx, 1
	mov	QWORD PTR -104[rbp], rdx
	movsx	rdx, eax
	mov	QWORD PTR -336[rbp], rdx
	mov	QWORD PTR -328[rbp], 0
	movsx	rdx, eax
	mov	QWORD PTR -352[rbp], rdx
	mov	QWORD PTR -344[rbp], 0
	cdqe
	lea	rdx, [rax+rax]
	mov	eax, 16
	sub	rax, 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
.L30:
	cmp	rsp, rdx
	je	.L31
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	jmp	.L30
.L31:
	mov	rdx, rax
	and	edx, 4095
	sub	rsp, rdx
	mov	rdx, rax
	and	edx, 4095
	test	rdx, rdx
	je	.L32
	and	eax, 4095
	sub	rax, 8
	add	rax, rsp
	or	QWORD PTR [rax], 0
.L32:
	mov	rax, rsp
	add	rax, 1
	shr	rax
	add	rax, rax
	mov	QWORD PTR -96[rbp], rax
	cmp	DWORD PTR -220[rbp], 0
	je	.L33
	lea	rdi, .LC16[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -232[rbp], 0
	jmp	.L34
.L35:
	mov	rax, QWORD PTR -128[rbp]
	mov	edx, DWORD PTR -232[rbp]
	movsx	rdx, edx
	movzx	eax, WORD PTR [rax+rdx*2]
	movzx	eax, ax
	mov	esi, eax
	lea	rdi, .LC17[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -232[rbp], 1
.L34:
	mov	eax, DWORD PTR -232[rbp]
	cmp	eax, DWORD PTR -196[rbp]
	jl	.L35
	mov	edi, 10
	call	putchar@PLT
	mov	DWORD PTR -232[rbp], 0
	jmp	.L36
.L37:
	mov	rax, QWORD PTR -128[rbp]
	mov	edx, DWORD PTR -232[rbp]
	movsx	rdx, edx
	movzx	ebx, WORD PTR [rax+rdx*2]
	mov	rax, QWORD PTR -112[rbp]
	mov	edx, DWORD PTR -232[rbp]
	movsx	rdx, edx
	movzx	eax, WORD PTR [rax+rdx*2]
	movzx	eax, ax
	mov	rdx, QWORD PTR -144[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	encrypt_word
	xor	ebx, eax
	mov	ecx, ebx
	mov	rax, QWORD PTR -96[rbp]
	mov	edx, DWORD PTR -232[rbp]
	movsx	rdx, edx
	mov	WORD PTR [rax+rdx*2], cx
	add	DWORD PTR -232[rbp], 1
.L36:
	mov	eax, DWORD PTR -232[rbp]
	cmp	eax, DWORD PTR -196[rbp]
	jl	.L37
	lea	rdi, .LC18[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -232[rbp], 0
	jmp	.L38
.L39:
	mov	rax, QWORD PTR -96[rbp]
	mov	edx, DWORD PTR -232[rbp]
	movsx	rdx, edx
	movzx	eax, WORD PTR [rax+rdx*2]
	movzx	eax, ax
	mov	esi, eax
	lea	rdi, .LC17[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -232[rbp], 1
.L38:
	mov	eax, DWORD PTR -232[rbp]
	cmp	eax, DWORD PTR -196[rbp]
	jl	.L39
	mov	edi, 10
	call	putchar@PLT
	jmp	.L40
.L33:
	cmp	DWORD PTR -224[rbp], 0
	je	.L40
	lea	rdi, .LC18[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -232[rbp], 0
	jmp	.L41
.L42:
	mov	rax, QWORD PTR -128[rbp]
	mov	edx, DWORD PTR -232[rbp]
	movsx	rdx, edx
	movzx	eax, WORD PTR [rax+rdx*2]
	movzx	eax, ax
	mov	esi, eax
	lea	rdi, .LC17[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -232[rbp], 1
.L41:
	mov	eax, DWORD PTR -232[rbp]
	cmp	eax, DWORD PTR -196[rbp]
	jl	.L42
	mov	edi, 10
	call	putchar@PLT
	mov	DWORD PTR -232[rbp], 0
	jmp	.L43
.L44:
	mov	rax, QWORD PTR -128[rbp]
	mov	edx, DWORD PTR -232[rbp]
	movsx	rdx, edx
	movzx	ebx, WORD PTR [rax+rdx*2]
	mov	rax, QWORD PTR -112[rbp]
	mov	edx, DWORD PTR -232[rbp]
	movsx	rdx, edx
	movzx	eax, WORD PTR [rax+rdx*2]
	movzx	eax, ax
	mov	rdx, QWORD PTR -144[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	encrypt_word
	xor	ebx, eax
	mov	ecx, ebx
	mov	rax, QWORD PTR -96[rbp]
	mov	edx, DWORD PTR -232[rbp]
	movsx	rdx, edx
	mov	WORD PTR [rax+rdx*2], cx
	add	DWORD PTR -232[rbp], 1
.L43:
	mov	eax, DWORD PTR -232[rbp]
	cmp	eax, DWORD PTR -196[rbp]
	jl	.L44
	lea	rdi, .LC16[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -232[rbp], 0
	jmp	.L45
.L46:
	mov	rax, QWORD PTR -96[rbp]
	mov	edx, DWORD PTR -232[rbp]
	movsx	rdx, edx
	movzx	eax, WORD PTR [rax+rdx*2]
	movzx	eax, ax
	mov	esi, eax
	lea	rdi, .LC17[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -232[rbp], 1
.L45:
	mov	eax, DWORD PTR -196[rbp]
	sub	eax, 1
	cmp	DWORD PTR -232[rbp], eax
	jl	.L46
	mov	eax, DWORD PTR -196[rbp]
	lea	edx, -1[rax]
	mov	rax, QWORD PTR -96[rbp]
	movsx	rdx, edx
	movzx	eax, WORD PTR [rax+rdx*2]
	movzx	edx, ax
	mov	eax, DWORD PTR -228[rbp]
	mov	esi, 65535
	mov	ecx, eax
	sal	esi, cl
	mov	eax, esi
	and	eax, edx
	mov	esi, eax
	lea	rdi, .LC17[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 10
	call	putchar@PLT
.L40:
	mov	rax, QWORD PTR -272[rbp]
	mov	rax, QWORD PTR 32[rax]
	mov	QWORD PTR -88[rbp], rax
	mov	rax, QWORD PTR -88[rbp]
	lea	rsi, .LC19[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -80[rbp], rax
	mov	eax, DWORD PTR -228[rbp]
	mov	DWORD PTR -188[rbp], eax
	cmp	QWORD PTR -80[rbp], 0
	jne	.L47
	lea	rdi, .LC20[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L47:
	mov	DWORD PTR -232[rbp], 0
	jmp	.L48
.L49:
	mov	rax, QWORD PTR -96[rbp]
	mov	edx, DWORD PTR -232[rbp]
	movsx	rdx, edx
	movzx	eax, WORD PTR [rax+rdx*2]
	mov	WORD PTR -234[rbp], ax
	movzx	eax, WORD PTR -234[rbp]
	shr	ax, 8
	mov	BYTE PTR -246[rbp], al
	movzx	eax, WORD PTR -234[rbp]
	mov	BYTE PTR -245[rbp], al
	movzx	eax, BYTE PTR -245[rbp]
	mov	edi, eax
	call	byte_to_bit_string
	mov	rbx, rax
	movzx	eax, BYTE PTR -246[rbp]
	mov	edi, eax
	call	byte_to_bit_string
	mov	rdx, rax
	mov	rax, QWORD PTR -80[rbp]
	mov	rcx, rbx
	lea	rsi, .LC21[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	add	DWORD PTR -232[rbp], 1
.L48:
	mov	eax, DWORD PTR -196[rbp]
	sub	eax, 1
	cmp	DWORD PTR -232[rbp], eax
	jl	.L49
	cmp	DWORD PTR -188[rbp], 0
	jle	.L50
	mov	eax, DWORD PTR -196[rbp]
	lea	edx, -1[rax]
	mov	rax, QWORD PTR -96[rbp]
	movsx	rdx, edx
	movzx	eax, WORD PTR [rax+rdx*2]
	mov	WORD PTR -236[rbp], ax
	movzx	eax, WORD PTR -236[rbp]
	shr	ax, 8
	mov	BYTE PTR -248[rbp], al
	movzx	eax, WORD PTR -236[rbp]
	mov	BYTE PTR -247[rbp], al
	movzx	eax, BYTE PTR -248[rbp]
	mov	edi, eax
	call	byte_to_bit_string
	mov	QWORD PTR -72[rbp], rax
	movzx	eax, BYTE PTR -247[rbp]
	mov	edi, eax
	call	byte_to_bit_string
	mov	QWORD PTR -64[rbp], rax
	cmp	DWORD PTR -188[rbp], 8
	jle	.L51
	mov	eax, 16
	sub	eax, DWORD PTR -188[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -72[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	mov	rdx, QWORD PTR -80[rbp]
	mov	rax, QWORD PTR -72[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	fputs@PLT
	jmp	.L52
.L51:
	mov	eax, 8
	sub	eax, DWORD PTR -188[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -64[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	mov	rcx, QWORD PTR -64[rbp]
	mov	rdx, QWORD PTR -72[rbp]
	mov	rax, QWORD PTR -80[rbp]
	lea	rsi, .LC21[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	jmp	.L52
.L50:
	mov	eax, DWORD PTR -196[rbp]
	lea	edx, -1[rax]
	mov	rax, QWORD PTR -96[rbp]
	movsx	rdx, edx
	movzx	eax, WORD PTR [rax+rdx*2]
	mov	WORD PTR -238[rbp], ax
	movzx	eax, WORD PTR -238[rbp]
	shr	ax, 8
	mov	BYTE PTR -250[rbp], al
	movzx	eax, WORD PTR -238[rbp]
	mov	BYTE PTR -249[rbp], al
	movzx	eax, BYTE PTR -249[rbp]
	mov	edi, eax
	call	byte_to_bit_string
	mov	rbx, rax
	movzx	eax, BYTE PTR -250[rbp]
	mov	edi, eax
	call	byte_to_bit_string
	mov	rdx, rax
	mov	rax, QWORD PTR -80[rbp]
	mov	rcx, rbx
	lea	rsi, .LC21[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
.L52:
	mov	rax, QWORD PTR -80[rbp]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	mov	rax, QWORD PTR -80[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rsp, r13
	mov	rsp, r12
	mov	rsp, r14
	mov	eax, 0
	mov	rbx, QWORD PTR -40[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L54
	call	__stack_chk_fail@PLT
.L54:
	lea	rsp, -32[rbp]
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	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	.L67
.L68:
	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
.L67:
	cmp	DWORD PTR -16[rbp], 3
	jle	.L68
	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	.L69
.L70:
	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
.L69:
	cmp	DWORD PTR -16[rbp], 3
	jle	.L70
	movzx	eax, WORD PTR -18[rbp]
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L72
	call	__stack_chk_fail@PLT
.L72:
	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	.L74
.L75:
	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
.L74:
	cmp	DWORD PTR -36[rbp], 0
	jns	.L75
	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	.L76
.L77:
	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
.L76:
	cmp	DWORD PTR -36[rbp], 0
	jns	.L77
	movzx	eax, WORD PTR -38[rbp]
	mov	rsi, QWORD PTR -24[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L79
	call	__stack_chk_fail@PLT
.L79:
	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	.L81
.L82:
	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
.L81:
	cmp	DWORD PTR -36[rbp], 0
	jns	.L82
	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	.L83
.L84:
	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
.L83:
	cmp	DWORD PTR -36[rbp], 0
	jns	.L84
	movzx	eax, WORD PTR -38[rbp]
	mov	rcx, QWORD PTR -24[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L86
	call	__stack_chk_fail@PLT
.L86:
	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	.L88
.L89:
	shr	BYTE PTR -20[rbp]
	add	DWORD PTR -4[rbp], 1
.L88:
	cmp	BYTE PTR -20[rbp], 0
	jne	.L89
	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
.L94:
	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	.L92
	movzx	eax, BYTE PTR -19[rbp]
	mov	BYTE PTR -17[rbp], al
	jmp	.L96
.L92:
	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	.L94
.L96:
	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	.L98
.L100:
	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	.L99
	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
.L99:
	add	DWORD PTR -4[rbp], 1
.L98:
	cmp	DWORD PTR -4[rbp], 3
	jle	.L100
	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
.LC22:
	.string	"0x%x:\t"
.LC23:
	.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, .LC22[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -8[rbp], 7
	jmp	.L103
.L104:
	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, .LC23[rip]
	mov	eax, 0
	call	printf@PLT
	sub	DWORD PTR -8[rbp], 1
.L103:
	cmp	DWORD PTR -8[rbp], 0
	jns	.L104
	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	.L106
	cmp	BYTE PTR -1[rbp], 57
	jg	.L106
	movzx	eax, BYTE PTR -1[rbp]
	sub	eax, 48
	mov	BYTE PTR -2[rbp], al
	jmp	.L107
.L106:
	cmp	BYTE PTR -1[rbp], 96
	jle	.L108
	cmp	BYTE PTR -1[rbp], 102
	jg	.L108
	movzx	eax, BYTE PTR -1[rbp]
	sub	eax, 87
	mov	BYTE PTR -2[rbp], al
	jmp	.L107
.L108:
	movzx	eax, BYTE PTR -1[rbp]
	jmp	.L109
.L107:
	movzx	eax, BYTE PTR -2[rbp]
.L109:
	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	.L114
	call	__stack_chk_fail@PLT
.L114:
	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	.L117
	call	__stack_chk_fail@PLT
.L117:
	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
	.globl	bit_string_to_byte
	.type	bit_string_to_byte, @function
bit_string_to_byte:
.LFB26:
	.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	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	DWORD PTR -4[rbp], eax
	mov	BYTE PTR -11[rbp], 0
	cmp	DWORD PTR -4[rbp], 8
	jle	.L125
	mov	eax, -1
	jmp	.L126
.L125:
	mov	DWORD PTR -8[rbp], 0
	jmp	.L127
.L130:
	mov	eax, DWORD PTR -8[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	mov	BYTE PTR -9[rbp], al
	mov	eax, DWORD PTR -8[rbp]
	cmp	eax, DWORD PTR -4[rbp]
	je	.L128
	sal	BYTE PTR -11[rbp]
.L128:
	cmp	BYTE PTR -9[rbp], 49
	jne	.L129
	add	BYTE PTR -11[rbp], 1
.L129:
	add	DWORD PTR -8[rbp], 1
.L127:
	mov	eax, DWORD PTR -8[rbp]
	cmp	eax, DWORD PTR -4[rbp]
	jl	.L130
	movzx	eax, BYTE PTR -11[rbp]
	mov	BYTE PTR -10[rbp], al
	movzx	eax, BYTE PTR -11[rbp]
.L126:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE26:
	.size	bit_string_to_byte, .-bit_string_to_byte
	.globl	byte_to_bit_string
	.type	byte_to_bit_string, @function
byte_to_bit_string:
.LFB27:
	.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
	mov	edi, 9
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	DWORD PTR -16[rbp], 0
	jmp	.L132
.L135:
	movzx	edx, BYTE PTR -20[rbp]
	mov	eax, DWORD PTR -16[rbp]
	mov	ecx, eax
	sal	edx, cl
	mov	eax, edx
	sar	eax, 7
	and	eax, 1
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], 0
	je	.L133
	mov	eax, DWORD PTR -16[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 49
	jmp	.L134
.L133:
	mov	eax, DWORD PTR -16[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 48
.L134:
	add	DWORD PTR -16[rbp], 1
.L132:
	cmp	DWORD PTR -16[rbp], 7
	jle	.L135
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 8
	mov	BYTE PTR [rax], 0
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE27:
	.size	byte_to_bit_string, .-byte_to_bit_string
	.globl	generate_IV_from_nonce
	.type	generate_IV_from_nonce, @function
generate_IV_from_nonce:
.LFB28:
	.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	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	mov	eax, DWORD PTR -20[rbp]
	mov	WORD PTR -6[rbp], ax
	mov	DWORD PTR -4[rbp], 0
	jmp	.L138
.L141:
	mov	eax, DWORD PTR -4[rbp]
	and	eax, 1
	test	eax, eax
	jne	.L139
	movzx	eax, WORD PTR -6[rbp]
	mov	rdx, QWORD PTR -32[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	encrypt_word
	add	eax, eax
	mov	WORD PTR -6[rbp], ax
	jmp	.L140
.L139:
	movzx	eax, WORD PTR -6[rbp]
	mov	rdx, QWORD PTR -32[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	encrypt_word
	shr	ax
	mov	WORD PTR -6[rbp], ax
.L140:
	add	DWORD PTR -4[rbp], 1
.L138:
	cmp	DWORD PTR -4[rbp], 15
	jle	.L141
	movzx	eax, WORD PTR -6[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE28:
	.size	generate_IV_from_nonce, .-generate_IV_from_nonce
	.section	.rodata
	.align 4
.LC10:
	.long	1098907648
	.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	"89220.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"
	.global	__aeabi_i2f
	.global	__aeabi_fdiv
	.global	__aeabi_f2d
	.global	__aeabi_d2iz
	.align	2
.LC12:
	.ascii	"Single block that is %d-bit(s) short detected,\012p"
	.ascii	"laintext will be padded with %dx 0 at end.\012\000"
	.global	__aeabi_fcmplt
	.align	2
.LC13:
	.ascii	"Multiple blocks with last block that is %d-bit(s) s"
	.ascii	"hort detected.\012\000"
	.align	2
.LC14:
	.ascii	"Key:\011\0110x%04X\012\000"
	.align	2
.LC15:
	.ascii	"Padded data:\011%s\012\000"
	.align	2
.LC16:
	.ascii	"CTR seed:\0110x%04X\012\000"
	.align	2
.LC17:
	.ascii	"Plaintext:\0110x\000"
	.align	2
.LC18:
	.ascii	"%04X\000"
	.align	2
.LC19:
	.ascii	"Ciphertext:\0110x\000"
	.align	2
.LC20:
	.ascii	"w\000"
	.align	2
.LC21:
	.ascii	"Cannot open output file. Exiting...\000"
	.align	2
.LC22:
	.ascii	"%s%s\000"
	.align	2
.LC23:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 152
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, fp, lr}
	add	fp, sp, #20
	sub	sp, sp, #152
	str	r0, [fp, #-168]
	str	r1, [fp, #-172]
	ldr	r3, .L47
	ldr	r3, [r3]
	str	r3, [fp, #-24]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-128]
	mov	r3, #0
	str	r3, [fp, #-132]
	ldr	r3, [fp, #-168]
	cmp	r3, #5
	bgt	.L2
	ldr	r0, .L47+4
	bl	puts
	mov	r0, #1
	bl	exit
.L2:
	ldr	r3, [fp, #-172]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-120]
	ldr	r1, .L47+8
	ldr	r0, [fp, #-120]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L3
	mov	r3, #1
	str	r3, [fp, #-128]
	ldr	r0, .L47+12
	bl	puts
	b	.L4
.L3:
	ldr	r1, .L47+16
	ldr	r0, [fp, #-120]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L5
	mov	r3, #1
	str	r3, [fp, #-132]
	ldr	r0, .L47+20
	bl	puts
	b	.L4
.L5:
	ldr	r0, .L47+24
	bl	puts
	mov	r0, #1
	bl	exit
.L4:
	ldr	r3, [fp, #-172]
	ldr	r3, [r3, #8]
	str	r3, [fp, #-116]
	ldr	r1, .L47+28
	ldr	r0, [fp, #-116]
	bl	fopen
	str	r0, [fp, #-112]
	mov	r0, #100
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-136]
	mov	r3, #100
	str	r3, [fp, #-108]
	ldr	r3, [fp, #-112]
	cmp	r3, #0
	bne	.L6
	ldr	r0, .L47+32
	bl	puts
	mov	r0, #1
	bl	exit
.L6:
	ldr	r2, [fp, #-112]
	mov	r1, #100
	ldr	r0, [fp, #-136]
	bl	fgets
	mov	r3, r0
	cmp	r3, #0
	bne	.L7
	ldr	r0, .L47+36
	bl	puts
	mov	r0, #1
	bl	exit
.L7:
	ldr	r1, [fp, #-136]
	ldr	r0, .L47+40
	bl	printf
	ldr	r0, [fp, #-112]
	bl	fclose
	mov	r3, #0
	str	r3, [fp, #-104]
	mov	r3, #0
	str	r3, [fp, #-140]
	ldr	r0, [fp, #-136]
	bl	strlen
	mov	r3, r0
	sub	r3, r3, #1
	str	r3, [fp, #-100]
	ldr	r0, [fp, #-100]
	bl	__aeabi_i2f
	mov	r3, r0
	ldr	r1, .L47+44
	mov	r0, r3
	bl	__aeabi_fdiv
	mov	r3, r0
	str	r3, [fp, #-96]	@ float
	ldr	r0, [fp, #-96]	@ float
	bl	__aeabi_f2d
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	ceil
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	__aeabi_d2iz
	mov	r3, r0
	str	r3, [fp, #-92]
	ldr	r3, [fp, #-100]
	cmp	r3, #15
	bgt	.L8
	ldr	r3, [fp, #-100]
	rsb	r3, r3, #16
	str	r3, [fp, #-140]
	ldr	r2, [fp, #-140]
	ldr	r1, [fp, #-140]
	ldr	r0, .L47+48
	bl	printf
	b	.L9
.L8:
	ldr	r3, [fp, #-100]
	cmp	r3, #16
	ble	.L9
	mov	r3, #1
	str	r3, [fp, #-104]
	ldr	r0, [fp, #-92]
	bl	__aeabi_i2f
	mov	r3, r0
	mov	r1, r3
	ldr	r0, [fp, #-96]	@ float
	bl	__aeabi_fcmplt
	mov	r3, r0
	cmp	r3, #0
	beq	.L9
	ldr	r3, [fp, #-92]
	lsl	r2, r3, #4
	ldr	r3, [fp, #-100]
	sub	r3, r2, r3
	str	r3, [fp, #-140]
	ldr	r1, [fp, #-140]
	ldr	r0, .L47+52
	bl	printf
.L9:
	ldr	r3, [fp, #-172]
	ldr	r3, [r3, #12]
	str	r3, [fp, #-88]
	mov	r0, #4
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-84]
	mov	r3, #0
	str	r3, [fp, #-144]
	b	.L11
.L12:
	ldr	r3, [fp, #-144]
	ldr	r2, [fp, #-88]
	add	r3, r2, r3
	ldrb	r1, [r3]	@ zero_extendqisi2
	ldr	r3, [fp, #-144]
	ldr	r2, [fp, #-84]
	add	r4, r2, r3
	mov	r0, r1
	bl	convert_char_to_hex
	mov	r3, r0
	strb	r3, [r4]
	ldr	r3, [fp, #-144]
	add	r3, r3, #1
	str	r3, [fp, #-144]
.L11:
	ldr	r3, [fp, #-144]
	cmp	r3, #3
	ble	.L12
	mov	r3, #0
	strh	r3, [fp, #-154]	@ movhi
	mov	r3, #0
	str	r3, [fp, #-144]
	b	.L13
.L14:
	ldr	r3, [fp, #-144]
	ldr	r2, [fp, #-84]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r3, [fp, #-144]
	rsb	r3, r3, #3
	lsl	r3, r3, #2
	lsl	r3, r2, r3
	lsl	r3, r3, #16
	lsr	r2, r3, #16
	ldrh	r3, [fp, #-154]	@ movhi
	add	r3, r2, r3
	strh	r3, [fp, #-154]	@ movhi
	ldr	r3, [fp, #-144]
	add	r3, r3, #1
	str	r3, [fp, #-144]
.L13:
	ldr	r3, [fp, #-144]
	cmp	r3, #3
	ble	.L14
	ldrh	r3, [fp, #-154]
	mov	r1, r3
	ldr	r0, .L47+56
	bl	printf
	ldr	r3, [fp, #-140]
	cmp	r3, #0
	beq	.L15
	ldr	r3, [fp, #-92]
	lsl	r3, r3, #4
	add	r3, r3, #1
	mov	r1, r3
	ldr	r0, [fp, #-136]
	bl	realloc
	str	r0, [fp, #-136]
	ldr	r3, [fp, #-92]
	lsl	r2, r3, #4
	ldr	r3, [fp, #-140]
	sub	r3, r2, r3
	str	r3, [fp, #-144]
	b	.L16
.L17:
	ldr	r3, [fp, #-144]
	ldr	r2, [fp, #-136]
	add	r3, r2, r3
	mov	r2, #48
	strb	r2, [r3]
	ldr	r3, [fp, #-144]
	add	r3, r3, #1
	str	r3, [fp, #-144]
.L16:
	ldr	r3, [fp, #-92]
	lsl	r3, r3, #4
	ldr	r2, [fp, #-144]
	cmp	r2, r3
	blt	.L17
	ldr	r3, [fp, #-92]
	lsl	r3, r3, #4
	mov	r2, r3
	ldr	r3, [fp, #-136]
	add	r3, r3, r2
	mov	r2, #0
	strb	r2, [r3]
	ldr	r1, [fp, #-136]
	ldr	r0, .L47+60
	bl	printf
.L15:
	ldr	ip, [fp, #-92]
	mov	r3, sp
	mov	r5, r3
	sub	r3, ip, #1
	str	r3, [fp, #-80]
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #4
	orr	r3, r3, r0, lsr #28
	lsl	r2, r0, #4
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #4
	orr	r3, r3, r0, lsr #28
	lsl	r2, r0, #4
	mov	r3, ip
	lsl	r3, r3, #1
	add	r3, r3, #7
	lsr	r3, r3, #3
	lsl	r3, r3, #3
	sub	sp, sp, r3
	mov	r3, sp
	add	r3, r3, #1
	lsr	r3, r3, #1
	lsl	r3, r3, #1
	str	r3, [fp, #-76]
	mov	r3, #0
	str	r3, [fp, #-144]
	b	.L18
.L21:
	mov	r0, #9
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-32]
	mov	r0, #9
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-124]
	b	.L19
.L20:
	ldr	r3, [fp, #-144]
	lsl	r2, r3, #4
	ldr	r3, [fp, #-124]
	add	r3, r2, r3
	mov	r2, r3
	ldr	r3, [fp, #-136]
	add	r2, r3, r2
	ldr	r3, [fp, #-124]
	ldr	r1, [fp, #-32]
	add	r3, r1, r3
	ldrb	r2, [r2]	@ zero_extendqisi2
	strb	r2, [r3]
	ldr	r3, [fp, #-144]
	lsl	r2, r3, #4
	ldr	r3, [fp, #-124]
	add	r3, r2, r3
	add	r3, r3, #8
	ldr	r2, [fp, #-136]
	add	r2, r2, r3
	ldr	r3, [fp, #-124]
	ldr	r1, [fp, #-28]
	add	r3, r1, r3
	ldrb	r2, [r2]	@ zero_extendqisi2
	strb	r2, [r3]
	ldr	r3, [fp, #-124]
	add	r3, r3, #1
	str	r3, [fp, #-124]
.L19:
	ldr	r3, [fp, #-124]
	cmp	r3, #7
	ble	.L20
	ldr	r3, [fp, #-32]
	add	r3, r3, #8
	mov	r2, #0
	strb	r2, [r3]
	ldr	r3, [fp, #-28]
	add	r3, r3, #8
	mov	r2, #0
	strb	r2, [r3]
	ldr	r0, [fp, #-32]
	bl	bit_string_to_byte
	mov	r3, r0
	strb	r3, [fp, #-156]
	ldr	r0, [fp, #-28]
	bl	bit_string_to_byte
	mov	r3, r0
	strb	r3, [fp, #-155]
	ldrb	r3, [fp, #-156]	@ 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, #-155]	@ zero_extendqisi2
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	add	r3, r2, r3
	lsl	r3, r3, #16
	lsr	r2, r3, #16
	ldr	r1, [fp, #-76]
	ldr	r3, [fp, #-144]
	lsl	r3, r3, #1
	add	r3, r1, r3
	strh	r2, [r3]	@ movhi
	ldr	r3, [fp, #-144]
	add	r3, r3, #1
	str	r3, [fp, #-144]
.L18:
	ldr	r2, [fp, #-144]
	ldr	r3, [fp, #-92]
	cmp	r2, r3
	blt	.L21
	ldr	r3, [fp, #-172]
	add	r3, r3, #20
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-72]
	ldr	r1, [fp, #-84]
	ldr	r0, [fp, #-72]
	bl	generate_IV_from_nonce
	mov	r3, r0
	strh	r3, [fp, #-152]	@ movhi
	ldrh	r3, [fp, #-152]
	mov	r1, r3
	ldr	r0, .L47+64
	bl	printf
	ldr	ip, [fp, #-92]
	mov	r3, sp
	mov	r6, r3
	sub	r3, ip, #1
	str	r3, [fp, #-68]
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #4
	orr	r3, r3, r0, lsr #28
	lsl	r2, r0, #4
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #4
	orr	r3, r3, r0, lsr #28
	lsl	r2, r0, #4
	mov	r3, ip
	lsl	r3, r3, #1
	add	r3, r3, #7
	lsr	r3, r3, #3
	lsl	r3, r3, #3
	sub	sp, sp, r3
	mov	r3, sp
	add	r3, r3, #1
	lsr	r3, r3, #1
	lsl	r3, r3, #1
	str	r3, [fp, #-64]
	ldrh	r3, [fp, #-152]
	ldr	r1, [fp, #-84]
	mov	r0, r3
	bl	generate_IV_from_nonce
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-64]
	strh	r2, [r3]	@ movhi
	mov	r3, #1
	str	r3, [fp, #-144]
	b	.L22
.L23:
	ldr	r3, [fp, #-144]
	sub	r3, r3, #1
	ldr	r2, [fp, #-64]
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r3, [r3]
	ldr	r1, [fp, #-84]
	mov	r0, r3
	bl	generate_IV_from_nonce
	mov	r3, r0
	mov	r1, r3
	ldr	r2, [fp, #-64]
	ldr	r3, [fp, #-144]
	lsl	r3, r3, #1
	add	r3, r2, r3
	strh	r1, [r3]	@ movhi
	ldr	r3, [fp, #-144]
	add	r3, r3, #1
	str	r3, [fp, #-144]
.L22:
	ldr	r2, [fp, #-144]
	ldr	r3, [fp, #-92]
	cmp	r2, r3
	blt	.L23
	ldr	ip, [fp, #-92]
	mov	r3, sp
	mov	r7, r3
	sub	r3, ip, #1
	str	r3, [fp, #-60]
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #4
	orr	r3, r3, r0, lsr #28
	lsl	r2, r0, #4
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #4
	orr	r3, r3, r0, lsr #28
	lsl	r2, r0, #4
	mov	r3, ip
	lsl	r3, r3, #1
	add	r3, r3, #7
	lsr	r3, r3, #3
	lsl	r3, r3, #3
	sub	sp, sp, r3
	mov	r3, sp
	add	r3, r3, #1
	lsr	r3, r3, #1
	lsl	r3, r3, #1
	str	r3, [fp, #-56]
	ldr	r3, [fp, #-128]
	cmp	r3, #0
	beq	.L24
	ldr	r0, .L47+68
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-144]
	b	.L25
.L26:
	ldr	r2, [fp, #-76]
	ldr	r3, [fp, #-144]
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r3, [r3]
	mov	r1, r3
	ldr	r0, .L47+72
	bl	printf
	ldr	r3, [fp, #-144]
	add	r3, r3, #1
	str	r3, [fp, #-144]
.L25:
	ldr	r2, [fp, #-144]
	ldr	r3, [fp, #-92]
	cmp	r2, r3
	blt	.L26
	mov	r0, #10
	bl	putchar
	mov	r3, #0
	str	r3, [fp, #-144]
	b	.L27
.L28:
	ldr	r2, [fp, #-76]
	ldr	r3, [fp, #-144]
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r4, [r3]
	ldr	r2, [fp, #-64]
	ldr	r3, [fp, #-144]
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r3, [r3]
	ldr	r1, [fp, #-84]
	mov	r0, r3
	bl	encrypt_word
	mov	r3, r0
	eor	r3, r3, r4
	lsl	r3, r3, #16
	lsr	r2, r3, #16
	ldr	r1, [fp, #-56]
	ldr	r3, [fp, #-144]
	lsl	r3, r3, #1
	add	r3, r1, r3
	strh	r2, [r3]	@ movhi
	ldr	r3, [fp, #-144]
	add	r3, r3, #1
	str	r3, [fp, #-144]
.L27:
	ldr	r2, [fp, #-144]
	ldr	r3, [fp, #-92]
	cmp	r2, r3
	blt	.L28
	ldr	r0, .L47+76
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-144]
	b	.L29
.L30:
	ldr	r2, [fp, #-56]
	ldr	r3, [fp, #-144]
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r3, [r3]
	mov	r1, r3
	ldr	r0, .L47+72
	bl	printf
	ldr	r3, [fp, #-144]
	add	r3, r3, #1
	str	r3, [fp, #-144]
.L29:
	ldr	r2, [fp, #-144]
	ldr	r3, [fp, #-92]
	cmp	r2, r3
	blt	.L30
	mov	r0, #10
	bl	putchar
	b	.L31
.L24:
	ldr	r3, [fp, #-132]
	cmp	r3, #0
	beq	.L31
	ldr	r0, .L47+76
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-144]
	b	.L32
.L33:
	ldr	r2, [fp, #-76]
	ldr	r3, [fp, #-144]
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r3, [r3]
	mov	r1, r3
	ldr	r0, .L47+72
	bl	printf
	ldr	r3, [fp, #-144]
	add	r3, r3, #1
	str	r3, [fp, #-144]
.L32:
	ldr	r2, [fp, #-144]
	ldr	r3, [fp, #-92]
	cmp	r2, r3
	blt	.L33
	mov	r0, #10
	bl	putchar
	mov	r3, #0
	str	r3, [fp, #-144]
	b	.L34
.L35:
	ldr	r2, [fp, #-76]
	ldr	r3, [fp, #-144]
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r4, [r3]
	ldr	r2, [fp, #-64]
	ldr	r3, [fp, #-144]
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r3, [r3]
	ldr	r1, [fp, #-84]
	mov	r0, r3
	bl	encrypt_word
	mov	r3, r0
	eor	r3, r3, r4
	lsl	r3, r3, #16
	lsr	r2, r3, #16
	ldr	r1, [fp, #-56]
	ldr	r3, [fp, #-144]
	lsl	r3, r3, #1
	add	r3, r1, r3
	strh	r2, [r3]	@ movhi
	ldr	r3, [fp, #-144]
	add	r3, r3, #1
	str	r3, [fp, #-144]
.L34:
	ldr	r2, [fp, #-144]
	ldr	r3, [fp, #-92]
	cmp	r2, r3
	blt	.L35
	ldr	r0, .L47+68
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-144]
	b	.L36
.L37:
	ldr	r2, [fp, #-56]
	ldr	r3, [fp, #-144]
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r3, [r3]
	mov	r1, r3
	ldr	r0, .L47+72
	bl	printf
	ldr	r3, [fp, #-144]
	add	r3, r3, #1
	str	r3, [fp, #-144]
.L36:
	ldr	r3, [fp, #-92]
	sub	r3, r3, #1
	ldr	r2, [fp, #-144]
	cmp	r2, r3
	blt	.L37
	ldr	r3, [fp, #-92]
	sub	r3, r3, #1
	ldr	r2, [fp, #-56]
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r3, [r3]
	mov	r1, r3
	ldr	r2, .L47+80
	ldr	r3, [fp, #-140]
	lsl	r3, r2, r3
	and	r3, r3, r1
	mov	r1, r3
	ldr	r0, .L47+72
	bl	printf
	mov	r0, #10
	bl	putchar
.L31:
	ldr	r3, [fp, #-172]
	ldr	r3, [r3, #16]
	str	r3, [fp, #-52]
	ldr	r1, .L47+84
	ldr	r0, [fp, #-52]
	bl	fopen
	str	r0, [fp, #-48]
	ldr	r3, [fp, #-140]
	str	r3, [fp, #-44]
	ldr	r3, [fp, #-48]
	cmp	r3, #0
	bne	.L38
	ldr	r0, .L47+88
	bl	puts
	mov	r0, #1
	bl	exit
.L38:
	mov	r3, #0
	str	r3, [fp, #-144]
	b	.L39
.L40:
	ldr	r2, [fp, #-56]
	ldr	r3, [fp, #-144]
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r3, [r3]	@ movhi
	strh	r3, [fp, #-146]	@ movhi
	ldrh	r3, [fp, #-146]
	lsr	r3, r3, #8
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	strb	r3, [fp, #-158]
	ldrh	r3, [fp, #-146]	@ movhi
	strb	r3, [fp, #-157]
	ldrb	r3, [fp, #-158]	@ zero_extendqisi2
	mov	r0, r3
	bl	byte_to_bit_string
	mov	r4, r0
	ldrb	r3, [fp, #-157]	@ zero_extendqisi2
	mov	r0, r3
	bl	byte_to_bit_string
	mov	r3, r0
	mov	r2, r4
	ldr	r1, .L47+92
	ldr	r0, [fp, #-48]
	bl	fprintf
	ldr	r3, [fp, #-144]
	add	r3, r3, #1
	str	r3, [fp, #-144]
.L39:
	ldr	r3, [fp, #-92]
	sub	r3, r3, #1
	ldr	r2, [fp, #-144]
	cmp	r2, r3
	blt	.L40
	ldr	r3, [fp, #-44]
	cmp	r3, #0
	ble	.L41
	ldr	r3, [fp, #-92]
	sub	r3, r3, #1
	ldr	r2, [fp, #-56]
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r3, [r3]	@ movhi
	strh	r3, [fp, #-148]	@ movhi
	ldrh	r3, [fp, #-148]
	lsr	r3, r3, #8
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	strb	r3, [fp, #-160]
	ldrh	r3, [fp, #-148]	@ movhi
	strb	r3, [fp, #-159]
	ldrb	r3, [fp, #-160]	@ zero_extendqisi2
	mov	r0, r3
	bl	byte_to_bit_string
	str	r0, [fp, #-40]
	ldrb	r3, [fp, #-159]	@ zero_extendqisi2
	mov	r0, r3
	bl	byte_to_bit_string
	str	r0, [fp, #-36]
	ldr	r3, [fp, #-44]
	cmp	r3, #8
	ble	.L42
	ldr	r3, [fp, #-44]
	rsb	r3, r3, #16
	mov	r2, r3
	ldr	r3, [fp, #-40]
	add	r3, r3, r2
	mov	r2, #0
	strb	r2, [r3]
	ldr	r1, [fp, #-48]
	ldr	r0, [fp, #-40]
	bl	fputs
	b	.L43
.L42:
	ldr	r3, [fp, #-44]
	rsb	r3, r3, #8
	mov	r2, r3
	ldr	r3, [fp, #-36]
	add	r3, r3, r2
	mov	r2, #0
	strb	r2, [r3]
	ldr	r3, [fp, #-36]
	ldr	r2, [fp, #-40]
	ldr	r1, .L47+92
	ldr	r0, [fp, #-48]
	bl	fprintf
	b	.L43
.L41:
	ldr	r3, [fp, #-92]
	sub	r3, r3, #1
	ldr	r2, [fp, #-56]
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r3, [r3]	@ movhi
	strh	r3, [fp, #-150]	@ movhi
	ldrh	r3, [fp, #-150]
	lsr	r3, r3, #8
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	strb	r3, [fp, #-162]
	ldrh	r3, [fp, #-150]	@ movhi
	strb	r3, [fp, #-161]
	ldrb	r3, [fp, #-162]	@ zero_extendqisi2
	mov	r0, r3
	bl	byte_to_bit_string
	mov	r4, r0
	ldrb	r3, [fp, #-161]	@ zero_extendqisi2
	mov	r0, r3
	bl	byte_to_bit_string
	mov	r3, r0
	mov	r2, r4
	ldr	r1, .L47+92
	ldr	r0, [fp, #-48]
	bl	fprintf
.L43:
	ldr	r1, [fp, #-48]
	mov	r0, #10
	bl	fputc
	ldr	r0, [fp, #-48]
	bl	fclose
	mov	sp, r7
	mov	sp, r6
	mov	sp, r5
	mov	r3, #0
	ldr	r2, .L47
	ldr	r1, [r2]
	ldr	r2, [fp, #-24]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L45
	bl	__stack_chk_fail
.L45:
	mov	r0, r3
	sub	sp, fp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, fp, pc}
.L48:
	.align	2
.L47:
	.word	.LC23
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	1098907648
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.word	.LC17
	.word	.LC18
	.word	.LC19
	.word	65535
	.word	.LC20
	.word	.LC21
	.word	.LC22
	.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
.LC24:
	.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, .L66
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L60
.L61:
	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]
.L60:
	ldr	r3, [fp, #-16]
	cmp	r3, #3
	ble	.L61
	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	.L62
.L63:
	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]
.L62:
	ldr	r3, [fp, #-16]
	cmp	r3, #3
	ble	.L63
	ldrh	r3, [fp, #-18]
	ldr	r2, .L66
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L65
	bl	__stack_chk_fail
.L65:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L67:
	.align	2
.L66:
	.word	.LC24
	.size	shift_row, .-shift_row
	.section	.rodata
	.align	2
.LC25:
	.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, .L75
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, #3
	str	r3, [fp, #-28]
	b	.L69
.L70:
	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]
.L69:
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	bge	.L70
	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	.L71
.L72:
	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]
.L71:
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	bge	.L72
	ldrh	r3, [fp, #-30]
	ldr	r2, .L75
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L74
	bl	__stack_chk_fail
.L74:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L76:
	.align	2
.L75:
	.word	.LC25
	.size	mix_column, .-mix_column
	.section	.rodata
	.align	2
.LC26:
	.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, .L84
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, #3
	str	r3, [fp, #-28]
	b	.L78
.L79:
	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]
.L78:
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	bge	.L79
	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	.L80
.L81:
	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]
.L80:
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	bge	.L81
	ldrh	r3, [fp, #-30]
	ldr	r2, .L84
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L83
	bl	__stack_chk_fail
.L83:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L85:
	.align	2
.L84:
	.word	.LC26
	.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	.L87
.L88:
	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]
.L87:
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L88
	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]
.L93:
	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	.L91
	ldrb	r3, [fp, #-23]
	strb	r3, [fp, #-21]
	b	.L95
.L91:
	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	.L93
.L95:
	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	.L97
.L99:
	ldrb	r2, [fp, #-13]	@ zero_extendqisi2
	ldr	r3, [fp, #-8]
	asr	r3, r2, r3
	and	r3, r3, #1
	cmp	r3, #0
	beq	.L98
	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]
.L98:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L97:
	ldr	r3, [fp, #-8]
	cmp	r3, #3
	ble	.L99
	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
.LC27:
	.ascii	"0x%x:\011\000"
	.align	2
.LC28:
	.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, .L104
	bl	printf
	mov	r3, #7
	str	r3, [fp, #-12]
	b	.L102
.L103:
	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, .L104+4
	bl	printf
	ldr	r3, [fp, #-12]
	sub	r3, r3, #1
	str	r3, [fp, #-12]
.L102:
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bge	.L103
	mov	r0, #10
	bl	putchar
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L105:
	.align	2
.L104:
	.word	.LC27
	.word	.LC28
	.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	.L107
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #57
	bhi	.L107
	ldrb	r3, [fp, #-5]
	sub	r3, r3, #48
	strb	r3, [fp, #-6]
	b	.L108
.L107:
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #96
	bls	.L109
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #102
	bhi	.L109
	ldrb	r3, [fp, #-5]
	sub	r3, r3, #87
	strb	r3, [fp, #-6]
	b	.L108
.L109:
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	b	.L110
.L108:
	ldrb	r3, [fp, #-6]	@ zero_extendqisi2
.L110:
	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
.LC29:
	.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, .L116
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L116+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, .L116
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L115
	bl	__stack_chk_fail
.L115:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L117:
	.align	2
.L116:
	.word	.LC29
	.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
.LC30:
	.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, .L121
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L121+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, .L121
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L120
	bl	__stack_chk_fail
.L120:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L122:
	.align	2
.L121:
	.word	.LC30
	.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
	.align	2
	.global	bit_string_to_byte
	.syntax unified
	.arm
	.fpu softvfp
	.type	bit_string_to_byte, %function
bit_string_to_byte:
	@ 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	r0, [fp, #-24]
	bl	strlen
	mov	r3, r0
	str	r3, [fp, #-8]
	mov	r3, #0
	strb	r3, [fp, #-15]
	ldr	r3, [fp, #-8]
	cmp	r3, #8
	ble	.L130
	mov	r3, #255
	b	.L131
.L130:
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L132
.L135:
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldrb	r3, [r3]
	strb	r3, [fp, #-13]
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-8]
	cmp	r2, r3
	beq	.L133
	ldrb	r3, [fp, #-15]
	lsl	r3, r3, #1
	strb	r3, [fp, #-15]
.L133:
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	cmp	r3, #49
	bne	.L134
	ldrb	r3, [fp, #-15]
	add	r3, r3, #1
	strb	r3, [fp, #-15]
.L134:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L132:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-8]
	cmp	r2, r3
	blt	.L135
	ldrb	r3, [fp, #-15]
	strb	r3, [fp, #-14]
	ldrb	r3, [fp, #-15]	@ zero_extendqisi2
.L131:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	bit_string_to_byte, .-bit_string_to_byte
	.align	2
	.global	byte_to_bit_string
	.syntax unified
	.arm
	.fpu softvfp
	.type	byte_to_bit_string, %function
byte_to_bit_string:
	@ 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
	strb	r3, [fp, #-21]
	mov	r0, #9
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L137
.L140:
	ldrb	r2, [fp, #-21]	@ zero_extendqisi2
	ldr	r3, [fp, #-16]
	lsl	r3, r2, r3
	asr	r3, r3, #7
	and	r3, r3, #1
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L138
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-12]
	add	r3, r2, r3
	mov	r2, #49
	strb	r2, [r3]
	b	.L139
.L138:
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-12]
	add	r3, r2, r3
	mov	r2, #48
	strb	r2, [r3]
.L139:
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L137:
	ldr	r3, [fp, #-16]
	cmp	r3, #7
	ble	.L140
	ldr	r3, [fp, #-12]
	add	r3, r3, #8
	mov	r2, #0
	strb	r2, [r3]
	ldr	r3, [fp, #-12]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	byte_to_bit_string, .-byte_to_bit_string
	.align	2
	.global	generate_IV_from_nonce
	.syntax unified
	.arm
	.fpu softvfp
	.type	generate_IV_from_nonce, %function
generate_IV_from_nonce:
	@ 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	r3, [fp, #-16]
	strh	r3, [fp, #-10]	@ movhi
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L143
.L146:
	ldr	r3, [fp, #-8]
	and	r3, r3, #1
	cmp	r3, #0
	bne	.L144
	ldrh	r3, [fp, #-10]
	ldr	r1, [fp, #-20]
	mov	r0, r3
	bl	encrypt_word
	mov	r3, r0
	lsl	r3, r3, #1
	strh	r3, [fp, #-10]	@ movhi
	b	.L145
.L144:
	ldrh	r3, [fp, #-10]
	ldr	r1, [fp, #-20]
	mov	r0, r3
	bl	encrypt_word
	mov	r3, r0
	lsr	r3, r3, #1
	strh	r3, [fp, #-10]	@ movhi
.L145:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L143:
	ldr	r3, [fp, #-8]
	cmp	r3, #15
	ble	.L146
	ldrh	r3, [fp, #-10]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	generate_IV_from_nonce, .-generate_IV_from_nonce
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
