	.file	"135234.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"%02X"
	.text
	.globl	charToHex
	.type	charToHex, @function
charToHex:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	eax, DWORD PTR -28[rbp]
	add	eax, eax
	add	eax, 1
	cdqe
	mov	esi, 1
	mov	rdi, rax
	call	calloc@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	DWORD PTR -12[rbp], 0
	mov	DWORD PTR -12[rbp], 0
	jmp	.L2
.L3:
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	edx, DWORD PTR -12[rbp]
	add	edx, edx
	movsx	rcx, edx
	mov	rdx, QWORD PTR -8[rbp]
	add	rcx, rdx
	mov	edx, eax
	lea	rsi, .LC0[rip]
	mov	rdi, rcx
	mov	eax, 0
	call	sprintf@PLT
	add	DWORD PTR -12[rbp], 1
.L2:
	mov	eax, DWORD PTR -12[rbp]
	cmp	eax, DWORD PTR -28[rbp]
	jl	.L3
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	charToHex, .-charToHex
	.section	.rodata
.LC1:
	.string	"A: %d\n"
.LC2:
	.string	"B"
	.text
	.globl	crypt
	.type	crypt, @function
crypt:
.LFB7:
	.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	QWORD PTR -56[rbp], rdi
	mov	QWORD PTR -64[rbp], rsi
	mov	rax, QWORD PTR -64[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	esi, 1
	mov	rdi, rax
	call	calloc@PLT
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -56[rbp]
	movzx	eax, BYTE PTR [rax]
	mov	BYTE PTR -38[rbp], al
	mov	rax, QWORD PTR -64[rbp]
	movzx	eax, BYTE PTR [rax]
	mov	BYTE PTR -37[rbp], al
	mov	DWORD PTR -36[rbp], 0
	mov	DWORD PTR -32[rbp], 0
	mov	DWORD PTR -28[rbp], 0
.L10:
	movsx	edx, BYTE PTR -38[rbp]
	mov	eax, DWORD PTR -32[rbp]
	mov	ecx, eax
	sar	edx, cl
	mov	eax, edx
	and	eax, 1
	test	eax, eax
	je	.L6
	mov	eax, DWORD PTR -28[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -64[rbp]
	add	rax, rdx
	movzx	ecx, BYTE PTR [rax]
	mov	eax, DWORD PTR -36[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rdx
	movzx	edx, BYTE PTR [rax]
	mov	eax, DWORD PTR -28[rbp]
	movsx	rsi, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rsi
	xor	edx, ecx
	mov	BYTE PTR [rax], dl
	movsx	eax, BYTE PTR -38[rbp]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L7
.L6:
	lea	rdi, .LC2[rip]
	call	puts@PLT
	mov	eax, DWORD PTR -28[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -64[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR -28[rbp]
	movsx	rcx, edx
	mov	rdx, QWORD PTR -24[rbp]
	add	rdx, rcx
	movzx	eax, BYTE PTR [rax]
	mov	BYTE PTR [rdx], al
.L7:
	add	DWORD PTR -28[rbp], 1
	add	DWORD PTR -32[rbp], 1
	cmp	DWORD PTR -32[rbp], 7
	jne	.L8
	mov	DWORD PTR -32[rbp], 0
	add	DWORD PTR -36[rbp], 1
.L8:
	mov	eax, DWORD PTR -36[rbp]
	movsx	rbx, eax
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	strlen@PLT
	cmp	rbx, rax
	jne	.L9
	mov	DWORD PTR -36[rbp], 0
.L9:
	mov	eax, DWORD PTR -36[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	mov	BYTE PTR -38[rbp], al
	mov	eax, DWORD PTR -28[rbp]
	movsx	rbx, eax
	mov	rax, QWORD PTR -64[rbp]
	mov	rdi, rax
	call	strlen@PLT
	cmp	rbx, rax
	jb	.L10
	mov	rax, QWORD PTR -64[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	edx, eax
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	charToHex
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	crypt, .-crypt
	.section	.rodata
	.align 8
.LC3:
	.string	"Hello! Here is a secret message :)"
.LC4:
	.string	"Thisismysecretkey"
.LC5:
	.string	"%s"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	lea	rsi, .LC3[rip]
	lea	rdi, .LC4[rip]
	call	crypt
	mov	rsi, rax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"135234.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%02X\000"
	.text
	.align	2
	.global	charToHex
	.syntax unified
	.arm
	.fpu softvfp
	.type	charToHex, %function
charToHex:
	@ 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, #-20]
	lsl	r3, r3, #1
	add	r3, r3, #1
	mov	r1, #1
	mov	r0, r3
	bl	calloc
	mov	r3, r0
	str	r3, [fp, #-8]
	mov	r3, #0
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L2
.L3:
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #1
	mov	r2, r3
	ldr	r3, [fp, #-8]
	add	r0, r3, r2
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r1, .L5
	bl	sprintf
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L2:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	blt	.L3
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L6:
	.align	2
.L5:
	.word	.LC0
	.size	charToHex, .-charToHex
	.section	.rodata
	.align	2
.LC1:
	.ascii	"A: %d\012\000"
	.align	2
.LC2:
	.ascii	"B\000"
	.text
	.align	2
	.global	crypt
	.syntax unified
	.arm
	.fpu softvfp
	.type	crypt, %function
crypt:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-32]
	str	r1, [fp, #-36]
	ldr	r0, [fp, #-36]
	bl	strlen
	mov	r3, r0
	mov	r1, #1
	mov	r0, r3
	bl	calloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-32]
	ldrb	r3, [r3]
	strb	r3, [fp, #-22]
	ldr	r3, [fp, #-36]
	ldrb	r3, [r3]
	strb	r3, [fp, #-21]
	mov	r3, #0
	str	r3, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-12]
.L12:
	ldrb	r2, [fp, #-22]	@ zero_extendqisi2
	ldr	r3, [fp, #-16]
	asr	r3, r2, r3
	and	r3, r3, #1
	cmp	r3, #0
	beq	.L8
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-36]
	add	r3, r2, r3
	ldrb	r1, [r3]	@ zero_extendqisi2
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r3, [fp, #-12]
	ldr	r0, [fp, #-8]
	add	r3, r0, r3
	eor	r2, r2, r1
	and	r2, r2, #255
	strb	r2, [r3]
	ldrb	r3, [fp, #-22]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, .L14
	bl	printf
	b	.L9
.L8:
	ldr	r0, .L14+4
	bl	puts
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-36]
	add	r2, r2, r3
	ldr	r3, [fp, #-12]
	ldr	r1, [fp, #-8]
	add	r3, r1, r3
	ldrb	r2, [r2]	@ zero_extendqisi2
	strb	r2, [r3]
.L9:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #7
	bne	.L10
	mov	r3, #0
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L10:
	ldr	r0, [fp, #-32]
	bl	strlen
	mov	r2, r0
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	bne	.L11
	mov	r3, #0
	str	r3, [fp, #-20]
.L11:
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldrb	r3, [r3]
	strb	r3, [fp, #-22]
	ldr	r0, [fp, #-36]
	bl	strlen
	mov	r2, r0
	ldr	r3, [fp, #-12]
	cmp	r2, r3
	bhi	.L12
	ldr	r0, [fp, #-36]
	bl	strlen
	mov	r3, r0
	mov	r1, r3
	ldr	r0, [fp, #-8]
	bl	charToHex
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L15:
	.align	2
.L14:
	.word	.LC1
	.word	.LC2
	.size	crypt, .-crypt
	.section	.rodata
	.align	2
.LC3:
	.ascii	"Hello! Here is a secret message :)\000"
	.align	2
.LC4:
	.ascii	"Thisismysecretkey\000"
	.align	2
.LC5:
	.ascii	"%s\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r1, .L18
	ldr	r0, .L18+4
	bl	crypt
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L18+8
	bl	printf
	mov	r3, #0
	mov	r0, r3
	pop	{fp, pc}
.L19:
	.align	2
.L18:
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
