	.file	"46001.c"
	.intel_syntax noprefix
	.text
	.globl	input
	.bss
	.align 32
	.type	input, @object
	.size	input, 61
input:
	.zero	61
	.globl	scoring_space
	.data
	.align 32
	.type	scoring_space, @object
	.size	scoring_space, 54
scoring_space:
	.string	" eEtTaAoOiInNsShHrRdDlLcCuUmMwWfFgGyYpPbBvVkKjJxXqQzZ"
	.text
	.globl	hex2dec
	.type	hex2dec, @function
hex2dec:
.LFB0:
	.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	BYTE PTR -1[rbp], 0
	cmp	BYTE PTR -20[rbp], 97
	jle	.L2
	movzx	eax, BYTE PTR -20[rbp]
	sub	eax, 87
	mov	BYTE PTR -1[rbp], al
	jmp	.L3
.L2:
	cmp	BYTE PTR -20[rbp], 65
	jle	.L4
	movzx	eax, BYTE PTR -20[rbp]
	sub	eax, 55
	mov	BYTE PTR -1[rbp], al
	jmp	.L3
.L4:
	movzx	eax, BYTE PTR -20[rbp]
	sub	eax, 48
	mov	BYTE PTR -1[rbp], al
.L3:
	movzx	eax, BYTE PTR -1[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	hex2dec, .-hex2dec
	.globl	get_score
	.type	get_score, @function
get_score:
.LFB1:
	.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	DWORD PTR -12[rbp], 0
	lea	rdi, scoring_space[rip]
	call	strlen@PLT
	mov	DWORD PTR -4[rbp], eax
	mov	DWORD PTR -8[rbp], 0
	jmp	.L7
.L10:
	mov	eax, DWORD PTR -8[rbp]
	lea	rdx, scoring_space[rip]
	movzx	eax, BYTE PTR [rax+rdx]
	cmp	BYTE PTR -20[rbp], al
	jne	.L8
	mov	eax, DWORD PTR -4[rbp]
	sub	eax, DWORD PTR -8[rbp]
	mov	DWORD PTR -12[rbp], eax
	jmp	.L9
.L8:
	add	DWORD PTR -8[rbp], 1
.L7:
	mov	eax, DWORD PTR -8[rbp]
	cmp	eax, DWORD PTR -4[rbp]
	jb	.L10
.L9:
	mov	eax, DWORD PTR -12[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	get_score, .-get_score
	.section	.rodata
.LC0:
	.string	"r"
.LC1:
	.string	"4.txt"
	.align 8
.LC2:
	.string	"Input: %s\nKey found: %c\nScore: %u\n"
.LC3:
	.string	"Original String: "
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.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, 136
	.cfi_offset 3, -24
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -108[rbp], 61
	mov	DWORD PTR -140[rbp], 0
	mov	DWORD PTR -136[rbp], -1
	lea	rsi, .LC0[rip]
	lea	rdi, .LC1[rip]
	call	fopen@PLT
	mov	QWORD PTR -104[rbp], rax
	jmp	.L13
.L19:
	mov	DWORD PTR -132[rbp], -1
	mov	DWORD PTR -128[rbp], 0
	mov	DWORD PTR -124[rbp], 0
	mov	DWORD PTR -120[rbp], 32
	jmp	.L14
.L18:
	mov	BYTE PTR -141[rbp], 0
	mov	DWORD PTR -128[rbp], 0
	mov	DWORD PTR -116[rbp], 0
	jmp	.L15
.L16:
	mov	eax, DWORD PTR -116[rbp]
	lea	rdx, input[rip]
	movzx	eax, BYTE PTR [rax+rdx]
	movsx	eax, al
	mov	edi, eax
	call	hex2dec
	mov	edx, eax
	mov	eax, DWORD PTR -120[rbp]
	shr	eax, 4
	xor	eax, edx
	sal	eax, 4
	mov	ebx, eax
	mov	eax, DWORD PTR -116[rbp]
	add	eax, 1
	mov	edx, eax
	lea	rax, input[rip]
	movzx	eax, BYTE PTR [rdx+rax]
	movsx	eax, al
	mov	edi, eax
	call	hex2dec
	mov	edx, eax
	mov	eax, DWORD PTR -120[rbp]
	and	eax, 15
	xor	eax, edx
	or	eax, ebx
	mov	BYTE PTR -141[rbp], al
	movsx	eax, BYTE PTR -141[rbp]
	mov	edi, eax
	call	get_score
	add	DWORD PTR -128[rbp], eax
	add	DWORD PTR -116[rbp], 2
.L15:
	mov	eax, DWORD PTR -116[rbp]
	cmp	eax, DWORD PTR -108[rbp]
	jb	.L16
	mov	eax, DWORD PTR -128[rbp]
	cmp	eax, DWORD PTR -124[rbp]
	jbe	.L17
	mov	eax, DWORD PTR -128[rbp]
	mov	DWORD PTR -124[rbp], eax
	mov	eax, DWORD PTR -120[rbp]
	mov	DWORD PTR -132[rbp], eax
.L17:
	add	DWORD PTR -120[rbp], 1
.L14:
	cmp	DWORD PTR -120[rbp], 127
	jbe	.L18
	mov	eax, DWORD PTR -124[rbp]
	cmp	eax, DWORD PTR -140[rbp]
	jbe	.L13
	mov	eax, DWORD PTR -124[rbp]
	mov	DWORD PTR -140[rbp], eax
	mov	eax, DWORD PTR -132[rbp]
	mov	DWORD PTR -136[rbp], eax
	lea	rax, -96[rbp]
	lea	rsi, input[rip]
	mov	rdi, rax
	call	strcpy@PLT
.L13:
	mov	eax, DWORD PTR -108[rbp]
	mov	rdx, QWORD PTR -104[rbp]
	mov	esi, eax
	lea	rdi, input[rip]
	call	fgets@PLT
	test	rax, rax
	jne	.L19
	mov	ecx, DWORD PTR -140[rbp]
	mov	edx, DWORD PTR -136[rbp]
	lea	rax, -96[rbp]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -112[rbp], 0
	jmp	.L20
.L21:
	mov	eax, DWORD PTR -112[rbp]
	movzx	eax, BYTE PTR -96[rbp+rax]
	movsx	eax, al
	mov	edi, eax
	call	hex2dec
	movsx	edx, al
	mov	eax, DWORD PTR -136[rbp]
	sar	eax, 4
	xor	eax, edx
	sal	eax, 4
	mov	ebx, eax
	mov	eax, DWORD PTR -112[rbp]
	add	eax, 1
	mov	eax, eax
	movzx	eax, BYTE PTR -96[rbp+rax]
	movsx	eax, al
	mov	edi, eax
	call	hex2dec
	movsx	edx, al
	mov	eax, DWORD PTR -136[rbp]
	and	eax, 15
	xor	eax, edx
	or	eax, ebx
	mov	edi, eax
	call	putchar@PLT
	add	DWORD PTR -112[rbp], 2
.L20:
	mov	eax, DWORD PTR -112[rbp]
	cmp	eax, DWORD PTR -108[rbp]
	jb	.L21
	mov	eax, 0
	mov	rcx, QWORD PTR -24[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L23
	call	__stack_chk_fail@PLT
.L23:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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	"46001.c"
	.text
	.comm	input,61,4
	.global	scoring_space
	.data
	.align	2
	.type	scoring_space, %object
	.size	scoring_space, 54
scoring_space:
	.ascii	" eEtTaAoOiInNsShHrRdDlLcCuUmMwWfFgGyYpPbBvVkKjJxXqQ"
	.ascii	"zZ\000"
	.text
	.align	2
	.global	hex2dec
	.syntax unified
	.arm
	.fpu softvfp
	.type	hex2dec, %function
hex2dec:
	@ 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
	strb	r3, [fp, #-5]
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	cmp	r3, #97
	bls	.L2
	ldrb	r3, [fp, #-13]
	sub	r3, r3, #87
	strb	r3, [fp, #-5]
	b	.L3
.L2:
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	cmp	r3, #65
	bls	.L4
	ldrb	r3, [fp, #-13]
	sub	r3, r3, #55
	strb	r3, [fp, #-5]
	b	.L3
.L4:
	ldrb	r3, [fp, #-13]
	sub	r3, r3, #48
	strb	r3, [fp, #-5]
.L3:
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	hex2dec, .-hex2dec
	.align	2
	.global	get_score
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_score, %function
get_score:
	@ 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	r3, #0
	str	r3, [fp, #-16]
	ldr	r0, .L12
	bl	strlen
	str	r0, [fp, #-8]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L7
.L10:
	ldr	r2, .L12
	ldr	r3, [fp, #-12]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	ldrb	r2, [fp, #-21]	@ zero_extendqisi2
	cmp	r2, r3
	bne	.L8
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-12]
	sub	r3, r2, r3
	str	r3, [fp, #-16]
	b	.L9
.L8:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L7:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-8]
	cmp	r2, r3
	bcc	.L10
.L9:
	ldr	r3, [fp, #-16]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L13:
	.align	2
.L12:
	.word	scoring_space
	.size	get_score, .-get_score
	.section	.rodata
	.align	2
.LC0:
	.ascii	"r\000"
	.align	2
.LC1:
	.ascii	"4.txt\000"
	.align	2
.LC2:
	.ascii	"Input: %s\012Key found: %c\012Score: %u\012\000"
	.align	2
.LC3:
	.ascii	"Original String: \000"
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 112
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #116
	ldr	r3, .L26
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, #61
	str	r3, [fp, #-88]
	mov	r3, #0
	str	r3, [fp, #-120]
	mvn	r3, #0
	str	r3, [fp, #-116]
	ldr	r1, .L26+4
	ldr	r0, .L26+8
	bl	fopen
	str	r0, [fp, #-84]
	b	.L15
.L21:
	mvn	r3, #0
	str	r3, [fp, #-112]
	mov	r3, #0
	str	r3, [fp, #-108]
	mov	r3, #0
	str	r3, [fp, #-104]
	mov	r3, #32
	str	r3, [fp, #-100]
	b	.L16
.L20:
	mov	r3, #0
	strb	r3, [fp, #-121]
	mov	r3, #0
	str	r3, [fp, #-108]
	mov	r3, #0
	str	r3, [fp, #-96]
	b	.L17
.L18:
	ldr	r2, .L26+12
	ldr	r3, [fp, #-96]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	bl	hex2dec
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-100]
	lsr	r3, r3, #4
	and	r3, r3, #255
	eor	r3, r3, r2
	and	r3, r3, #255
	lsl	r3, r3, #4
	and	r4, r3, #255
	ldr	r3, [fp, #-96]
	add	r3, r3, #1
	ldr	r2, .L26+12
	ldrb	r3, [r2, r3]	@ zero_extendqisi2
	mov	r0, r3
	bl	hex2dec
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-100]
	and	r3, r3, #255
	and	r3, r3, #15
	and	r3, r3, #255
	eor	r3, r3, r2
	and	r3, r3, #255
	orr	r3, r4, r3
	strb	r3, [fp, #-121]
	ldrb	r3, [fp, #-121]	@ zero_extendqisi2
	mov	r0, r3
	bl	get_score
	mov	r2, r0
	ldr	r3, [fp, #-108]
	add	r3, r3, r2
	str	r3, [fp, #-108]
	ldr	r3, [fp, #-96]
	add	r3, r3, #2
	str	r3, [fp, #-96]
.L17:
	ldr	r2, [fp, #-96]
	ldr	r3, [fp, #-88]
	cmp	r2, r3
	bcc	.L18
	ldr	r2, [fp, #-108]
	ldr	r3, [fp, #-104]
	cmp	r2, r3
	bls	.L19
	ldr	r3, [fp, #-108]
	str	r3, [fp, #-104]
	ldr	r3, [fp, #-100]
	str	r3, [fp, #-112]
.L19:
	ldr	r3, [fp, #-100]
	add	r3, r3, #1
	str	r3, [fp, #-100]
.L16:
	ldr	r3, [fp, #-100]
	cmp	r3, #127
	bls	.L20
	ldr	r2, [fp, #-104]
	ldr	r3, [fp, #-120]
	cmp	r2, r3
	bls	.L15
	ldr	r3, [fp, #-104]
	str	r3, [fp, #-120]
	ldr	r3, [fp, #-112]
	str	r3, [fp, #-116]
	sub	r3, fp, #80
	ldr	r1, .L26+12
	mov	r0, r3
	bl	strcpy
.L15:
	ldr	r3, [fp, #-88]
	ldr	r2, [fp, #-84]
	mov	r1, r3
	ldr	r0, .L26+12
	bl	fgets
	mov	r3, r0
	cmp	r3, #0
	bne	.L21
	sub	r1, fp, #80
	ldr	r3, [fp, #-120]
	ldr	r2, [fp, #-116]
	ldr	r0, .L26+16
	bl	printf
	ldr	r0, .L26+20
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-92]
	b	.L22
.L23:
	sub	r2, fp, #80
	ldr	r3, [fp, #-92]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	bl	hex2dec
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-116]
	asr	r3, r3, #4
	eor	r3, r3, r2
	lsl	r4, r3, #4
	ldr	r3, [fp, #-92]
	add	r3, r3, #1
	sub	r2, fp, #12
	add	r3, r2, r3
	ldrb	r3, [r3, #-68]	@ zero_extendqisi2
	mov	r0, r3
	bl	hex2dec
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-116]
	and	r3, r3, #15
	eor	r3, r3, r2
	orr	r3, r4, r3
	mov	r0, r3
	bl	putchar
	ldr	r3, [fp, #-92]
	add	r3, r3, #2
	str	r3, [fp, #-92]
.L22:
	ldr	r2, [fp, #-92]
	ldr	r3, [fp, #-88]
	cmp	r2, r3
	bcc	.L23
	mov	r3, #0
	ldr	r2, .L26
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L25
	bl	__stack_chk_fail
.L25:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L27:
	.align	2
.L26:
	.word	.LC4
	.word	.LC0
	.word	.LC1
	.word	input
	.word	.LC2
	.word	.LC3
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
