	.file	"583649.c"
	.intel_syntax noprefix
	.text
	.globl	str_hex_to_int
	.type	str_hex_to_int, @function
str_hex_to_int:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	DWORD PTR -12[rbp], esi
	mov	DWORD PTR -16[rbp], edx
	cmp	DWORD PTR -12[rbp], 0
	jle	.L2
	sal	DWORD PTR -16[rbp], 4
	call	__ctype_b_loc@PLT
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, BYTE PTR [rax]
	movsx	rax, al
	add	rax, rax
	add	rax, rdx
	movzx	eax, WORD PTR [rax]
	movzx	eax, ax
	and	eax, 1024
	test	eax, eax
	je	.L3
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	sub	eax, 65
	cmp	eax, 5
	ja	.L12
	mov	eax, eax
	lea	rdx, 0[0+rax*4]
	lea	rax, .L6[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	lea	rdx, .L6[rip]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L6:
	.long	.L11-.L6
	.long	.L10-.L6
	.long	.L9-.L6
	.long	.L8-.L6
	.long	.L7-.L6
	.long	.L5-.L6
	.text
.L11:
	add	DWORD PTR -16[rbp], 10
	jmp	.L12
.L10:
	add	DWORD PTR -16[rbp], 11
	jmp	.L12
.L9:
	add	DWORD PTR -16[rbp], 12
	jmp	.L12
.L8:
	add	DWORD PTR -16[rbp], 13
	jmp	.L12
.L7:
	add	DWORD PTR -16[rbp], 14
	jmp	.L12
.L5:
	add	DWORD PTR -16[rbp], 15
	jmp	.L12
.L3:
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	sub	eax, 48
	add	DWORD PTR -16[rbp], eax
.L12:
	mov	eax, DWORD PTR -12[rbp]
	lea	ecx, -1[rax]
	add	QWORD PTR -8[rbp], 1
	mov	edx, DWORD PTR -16[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	str_hex_to_int
	jmp	.L13
.L2:
	mov	eax, DWORD PTR -16[rbp]
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	str_hex_to_int, .-str_hex_to_int
	.section	.rodata
.LC0:
	.string	"%s"
	.text
	.globl	main
	.type	main, @function
main:
.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, 1040
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -544[rbp], 0
	mov	QWORD PTR -536[rbp], 0
	mov	QWORD PTR -528[rbp], 0
	mov	QWORD PTR -520[rbp], 0
	mov	QWORD PTR -512[rbp], 0
	mov	QWORD PTR -504[rbp], 0
	mov	QWORD PTR -496[rbp], 0
	mov	QWORD PTR -488[rbp], 0
	mov	BYTE PTR -480[rbp], 0
	lea	rdx, -992[rbp]
	mov	eax, 0
	mov	ecx, 56
	mov	rdi, rdx
	rep stosq
	mov	DWORD PTR -1032[rbp], 0
	mov	DWORD PTR -1028[rbp], 0
	mov	DWORD PTR -1024[rbp], 7
	lea	rax, -464[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	lea	rax, -464[rbp]
	mov	QWORD PTR -1000[rbp], rax
	lea	rax, -464[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	DWORD PTR -1008[rbp], eax
	mov	eax, DWORD PTR -1008[rbp]
	movsx	rdx, eax
	imul	rdx, rdx, -1840700269
	shr	rdx, 32
	add	edx, eax
	sar	edx, 2
	sar	eax, 31
	mov	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	mov	DWORD PTR -1004[rbp], eax
	jmp	.L15
.L18:
	mov	DWORD PTR -1020[rbp], 0
	jmp	.L16
.L17:
	mov	rax, QWORD PTR -1000[rbp]
	mov	edx, 0
	mov	esi, 2
	mov	rdi, rax
	call	str_hex_to_int
	mov	edx, eax
	mov	eax, DWORD PTR -1020[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR -1032[rbp]
	cdqe
	sal	rax, 6
	add	rax, rbp
	add	rax, rcx
	sub	rax, 992
	mov	BYTE PTR [rax], dl
	add	QWORD PTR -1000[rbp], 2
	add	DWORD PTR -1020[rbp], 1
.L16:
	mov	eax, DWORD PTR -1004[rbp]
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	cmp	DWORD PTR -1020[rbp], eax
	jl	.L17
	add	DWORD PTR -1032[rbp], 1
.L15:
	mov	rax, QWORD PTR -1000[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L18
	mov	DWORD PTR -1016[rbp], 0
	jmp	.L19
.L26:
	mov	DWORD PTR -1012[rbp], 0
	jmp	.L20
.L23:
	mov	eax, DWORD PTR -1016[rbp]
	cdqe
	movzx	esi, BYTE PTR -544[rbp+rax]
	mov	eax, DWORD PTR -1028[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -1012[rbp]
	cdqe
	sal	rax, 6
	add	rax, rbp
	add	rax, rdx
	sub	rax, 992
	movzx	eax, BYTE PTR [rax]
	movzx	edx, al
	mov	eax, DWORD PTR -1024[rbp]
	mov	ecx, eax
	sar	edx, cl
	mov	eax, edx
	and	eax, 1
	test	eax, eax
	je	.L21
	mov	eax, DWORD PTR -1012[rbp]
	mov	edx, 1
	mov	ecx, eax
	sal	edx, cl
	mov	eax, edx
	jmp	.L22
.L21:
	mov	eax, 0
.L22:
	or	eax, esi
	mov	edx, eax
	mov	eax, DWORD PTR -1016[rbp]
	cdqe
	mov	BYTE PTR -544[rbp+rax], dl
	add	DWORD PTR -1012[rbp], 1
.L20:
	cmp	DWORD PTR -1012[rbp], 6
	jle	.L23
	cmp	DWORD PTR -1024[rbp], 0
	jle	.L24
	sub	DWORD PTR -1024[rbp], 1
	jmp	.L25
.L24:
	mov	DWORD PTR -1024[rbp], 7
	add	DWORD PTR -1028[rbp], 1
.L25:
	add	DWORD PTR -1016[rbp], 1
.L19:
	cmp	DWORD PTR -1016[rbp], 63
	jle	.L26
	lea	rax, -544[rbp]
	mov	rdi, rax
	call	puts@PLT
	mov	eax, 0
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L28
	call	__stack_chk_fail@PLT
.L28:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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	"583649.c"
	.text
	.align	2
	.global	str_hex_to_int
	.syntax unified
	.arm
	.fpu softvfp
	.type	str_hex_to_int, %function
str_hex_to_int:
	@ 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, #-8]
	str	r1, [fp, #-12]
	str	r2, [fp, #-16]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	ble	.L2
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #4
	str	r3, [fp, #-16]
	bl	__ctype_b_loc
	mov	r3, r0
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r3, [r3]
	and	r3, r3, #1024
	cmp	r3, #0
	beq	.L3
	ldr	r3, [fp, #-8]
	ldrb	r3, [r3]	@ zero_extendqisi2
	sub	r3, r3, #65
	cmp	r3, #5
	ldrls	pc, [pc, r3, asl #2]
	b	.L12
.L6:
	.word	.L11
	.word	.L10
	.word	.L9
	.word	.L8
	.word	.L7
	.word	.L5
.L11:
	ldr	r3, [fp, #-16]
	add	r3, r3, #10
	str	r3, [fp, #-16]
	b	.L12
.L10:
	ldr	r3, [fp, #-16]
	add	r3, r3, #11
	str	r3, [fp, #-16]
	b	.L12
.L9:
	ldr	r3, [fp, #-16]
	add	r3, r3, #12
	str	r3, [fp, #-16]
	b	.L12
.L8:
	ldr	r3, [fp, #-16]
	add	r3, r3, #13
	str	r3, [fp, #-16]
	b	.L12
.L7:
	ldr	r3, [fp, #-16]
	add	r3, r3, #14
	str	r3, [fp, #-16]
	b	.L12
.L5:
	ldr	r3, [fp, #-16]
	add	r3, r3, #15
	str	r3, [fp, #-16]
	b	.L12
.L3:
	ldr	r3, [fp, #-8]
	ldrb	r3, [r3]	@ zero_extendqisi2
	sub	r3, r3, #48
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	str	r3, [fp, #-16]
.L12:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-12]
	sub	r3, r3, #1
	ldr	r2, [fp, #-16]
	mov	r1, r3
	ldr	r0, [fp, #-8]
	bl	str_hex_to_int
	mov	r3, r0
	b	.L13
.L2:
	ldr	r3, [fp, #-16]
.L13:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	str_hex_to_int, .-str_hex_to_int
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%s\000"
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 1008
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1008
	ldr	r3, .L29
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-528]
	sub	r3, fp, #524
	mov	r2, #61
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r3, fp, #976
	mov	r2, #448
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #0
	str	r3, [fp, #-1012]
	mov	r3, #0
	str	r3, [fp, #-1008]
	mov	r3, #7
	str	r3, [fp, #-1004]
	sub	r3, fp, #460
	mov	r1, r3
	ldr	r0, .L29+4
	bl	__isoc99_scanf
	sub	r3, fp, #460
	str	r3, [fp, #-1000]
	sub	r3, fp, #460
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	str	r3, [fp, #-984]
	ldr	r3, [fp, #-984]
	ldr	r2, .L29+8
	smull	r1, r2, r3, r2
	add	r2, r2, r3
	asr	r2, r2, #2
	asr	r3, r3, #31
	sub	r3, r2, r3
	str	r3, [fp, #-980]
	b	.L15
.L18:
	mov	r3, #0
	str	r3, [fp, #-996]
	b	.L16
.L17:
	mov	r2, #0
	mov	r1, #2
	ldr	r0, [fp, #-1000]
	bl	str_hex_to_int
	mov	r3, r0
	and	r1, r3, #255
	ldr	r3, [fp, #-1012]
	lsl	r3, r3, #6
	sub	r2, fp, #4
	add	r2, r2, r3
	ldr	r3, [fp, #-996]
	add	r3, r2, r3
	sub	r3, r3, #972
	mov	r2, r1
	strb	r2, [r3]
	ldr	r3, [fp, #-1000]
	add	r3, r3, #2
	str	r3, [fp, #-1000]
	ldr	r3, [fp, #-996]
	add	r3, r3, #1
	str	r3, [fp, #-996]
.L16:
	ldr	r3, [fp, #-980]
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	mov	r2, r3
	ldr	r3, [fp, #-996]
	cmp	r3, r2
	blt	.L17
	ldr	r3, [fp, #-1012]
	add	r3, r3, #1
	str	r3, [fp, #-1012]
.L15:
	ldr	r3, [fp, #-1000]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L18
	mov	r3, #0
	str	r3, [fp, #-992]
	b	.L19
.L26:
	mov	r3, #0
	str	r3, [fp, #-988]
	b	.L20
.L23:
	sub	r2, fp, #528
	ldr	r3, [fp, #-992]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #24
	asr	r2, r3, #24
	ldr	r3, [fp, #-988]
	lsl	r3, r3, #6
	sub	r1, fp, #4
	add	r1, r1, r3
	ldr	r3, [fp, #-1008]
	add	r3, r1, r3
	sub	r3, r3, #972
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r3, [fp, #-1004]
	asr	r3, r1, r3
	and	r3, r3, #1
	cmp	r3, #0
	beq	.L21
	mov	r1, #1
	ldr	r3, [fp, #-988]
	lsl	r3, r1, r3
	lsl	r3, r3, #24
	asr	r3, r3, #24
	b	.L22
.L21:
	mov	r3, #0
.L22:
	orr	r3, r3, r2
	lsl	r3, r3, #24
	asr	r3, r3, #24
	and	r1, r3, #255
	sub	r2, fp, #528
	ldr	r3, [fp, #-992]
	add	r3, r2, r3
	mov	r2, r1
	strb	r2, [r3]
	ldr	r3, [fp, #-988]
	add	r3, r3, #1
	str	r3, [fp, #-988]
.L20:
	ldr	r3, [fp, #-988]
	cmp	r3, #6
	ble	.L23
	ldr	r3, [fp, #-1004]
	cmp	r3, #0
	ble	.L24
	ldr	r3, [fp, #-1004]
	sub	r3, r3, #1
	str	r3, [fp, #-1004]
	b	.L25
.L24:
	mov	r3, #7
	str	r3, [fp, #-1004]
	ldr	r3, [fp, #-1008]
	add	r3, r3, #1
	str	r3, [fp, #-1008]
.L25:
	ldr	r3, [fp, #-992]
	add	r3, r3, #1
	str	r3, [fp, #-992]
.L19:
	ldr	r3, [fp, #-992]
	cmp	r3, #63
	ble	.L26
	sub	r3, fp, #528
	mov	r0, r3
	bl	puts
	mov	r3, #0
	ldr	r2, .L29
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L28
	bl	__stack_chk_fail
.L28:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L30:
	.align	2
.L29:
	.word	.LC1
	.word	.LC0
	.word	-1840700269
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
