	.file	"21786.c"
	.intel_syntax noprefix
	.text
	.globl	i
	.bss
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.text
	.globl	htoi
	.type	htoi, @function
htoi:
.LFB0:
	.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 -8[rbp], 0
	jmp	.L2
.L4:
	mov	eax, DWORD PTR i[rip]
	add	eax, 1
	mov	DWORD PTR i[rip], eax
.L2:
	call	__ctype_b_loc@PLT
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR i[rip]
	movsx	rcx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rcx
	movzx	eax, BYTE PTR [rax]
	movsx	rax, al
	add	rax, rax
	add	rax, rdx
	movzx	eax, WORD PTR [rax]
	movzx	eax, ax
	and	eax, 2048
	test	eax, eax
	jne	.L5
	mov	eax, DWORD PTR i[rip]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 64
	jle	.L4
	mov	eax, DWORD PTR i[rip]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 70
	jg	.L4
	jmp	.L5
.L8:
	call	__ctype_b_loc@PLT
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR i[rip]
	movsx	rcx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rcx
	movzx	eax, BYTE PTR [rax]
	movsx	rax, al
	add	rax, rax
	add	rax, rdx
	movzx	eax, WORD PTR [rax]
	movzx	eax, ax
	and	eax, 2048
	test	eax, eax
	je	.L6
	mov	eax, DWORD PTR i[rip]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	sub	eax, 48
	mov	DWORD PTR -4[rbp], eax
	jmp	.L7
.L6:
	mov	eax, DWORD PTR i[rip]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	sub	eax, 55
	mov	DWORD PTR -4[rbp], eax
.L7:
	mov	eax, DWORD PTR -8[rbp]
	sal	eax, 4
	mov	edx, eax
	mov	eax, DWORD PTR -4[rbp]
	add	eax, edx
	mov	DWORD PTR -8[rbp], eax
	mov	eax, DWORD PTR i[rip]
	add	eax, 1
	mov	DWORD PTR i[rip], eax
.L5:
	call	__ctype_b_loc@PLT
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR i[rip]
	movsx	rcx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rcx
	movzx	eax, BYTE PTR [rax]
	movsx	rax, al
	add	rax, rax
	add	rax, rdx
	movzx	eax, WORD PTR [rax]
	movzx	eax, ax
	and	eax, 2048
	test	eax, eax
	jne	.L8
	mov	eax, DWORD PTR i[rip]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 64
	jle	.L9
	mov	eax, DWORD PTR i[rip]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 70
	jle	.L8
.L9:
	mov	eax, DWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	htoi, .-htoi
	.section	.rodata
.LC0:
	.string	"Hexadecimal string: "
.LC1:
	.string	", Decimal number %d\n"
	.text
	.globl	main
	.type	main, @function
main:
.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, 1024
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -1020[rbp], 0
	jmp	.L12
.L14:
	mov	eax, DWORD PTR -1016[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -1020[rbp]
	cdqe
	mov	BYTE PTR -1008[rbp+rax], dl
	add	DWORD PTR -1020[rbp], 1
.L12:
	call	getchar@PLT
	mov	DWORD PTR -1016[rbp], eax
	cmp	DWORD PTR -1016[rbp], -1
	je	.L13
	cmp	DWORD PTR -1016[rbp], 10
	jne	.L14
.L13:
	mov	eax, DWORD PTR -1020[rbp]
	mov	DWORD PTR -1012[rbp], eax
	mov	DWORD PTR -1020[rbp], 0
	jmp	.L15
.L17:
	mov	eax, DWORD PTR -1020[rbp]
	cdqe
	movzx	eax, BYTE PTR -1008[rbp+rax]
	cmp	al, 96
	jle	.L16
	mov	eax, DWORD PTR -1020[rbp]
	cdqe
	movzx	eax, BYTE PTR -1008[rbp+rax]
	cmp	al, 102
	jg	.L16
	mov	eax, DWORD PTR -1020[rbp]
	cdqe
	movzx	eax, BYTE PTR -1008[rbp+rax]
	movsx	eax, al
	mov	edi, eax
	call	toupper@PLT
	mov	edx, eax
	mov	eax, DWORD PTR -1020[rbp]
	cdqe
	mov	BYTE PTR -1008[rbp+rax], dl
.L16:
	add	DWORD PTR -1020[rbp], 1
.L15:
	mov	eax, DWORD PTR -1020[rbp]
	cmp	eax, DWORD PTR -1012[rbp]
	jne	.L17
	mov	DWORD PTR -1020[rbp], 0
	jmp	.L18
.L24:
	call	__ctype_b_loc@PLT
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -1020[rbp]
	cdqe
	movzx	eax, BYTE PTR -1008[rbp+rax]
	movsx	rax, al
	add	rax, rax
	add	rax, rdx
	movzx	eax, WORD PTR [rax]
	movzx	eax, ax
	and	eax, 2048
	test	eax, eax
	jne	.L19
	mov	eax, DWORD PTR -1020[rbp]
	cdqe
	movzx	eax, BYTE PTR -1008[rbp+rax]
	cmp	al, 64
	jle	.L20
	mov	eax, DWORD PTR -1020[rbp]
	cdqe
	movzx	eax, BYTE PTR -1008[rbp+rax]
	cmp	al, 70
	jg	.L20
.L19:
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L21
.L22:
	mov	eax, DWORD PTR -1020[rbp]
	cdqe
	movzx	eax, BYTE PTR -1008[rbp+rax]
	movsx	eax, al
	mov	edi, eax
	call	putchar@PLT
	add	DWORD PTR -1020[rbp], 1
.L21:
	call	__ctype_b_loc@PLT
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -1020[rbp]
	cdqe
	movzx	eax, BYTE PTR -1008[rbp+rax]
	movsx	rax, al
	add	rax, rax
	add	rax, rdx
	movzx	eax, WORD PTR [rax]
	movzx	eax, ax
	and	eax, 2048
	test	eax, eax
	jne	.L22
	mov	eax, DWORD PTR -1020[rbp]
	cdqe
	movzx	eax, BYTE PTR -1008[rbp+rax]
	cmp	al, 64
	jle	.L23
	mov	eax, DWORD PTR -1020[rbp]
	cdqe
	movzx	eax, BYTE PTR -1008[rbp+rax]
	cmp	al, 70
	jle	.L22
.L23:
	lea	rax, -1008[rbp]
	mov	rdi, rax
	call	htoi
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
.L20:
	add	DWORD PTR -1020[rbp], 1
.L18:
	mov	eax, DWORD PTR -1020[rbp]
	cdqe
	movzx	eax, BYTE PTR -1008[rbp+rax]
	test	al, al
	jne	.L24
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L26
	call	__stack_chk_fail@PLT
.L26:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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	"21786.c"
	.text
	.comm	i,4,4
	.align	2
	.global	htoi
	.syntax unified
	.arm
	.fpu softvfp
	.type	htoi, %function
htoi:
	@ 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]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L2
.L4:
	ldr	r3, .L11
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L11
	str	r3, [r2]
.L2:
	bl	__ctype_b_loc
	mov	r3, r0
	ldr	r2, [r3]
	ldr	r3, .L11
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, r1
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r3, [r3]
	and	r3, r3, #2048
	cmp	r3, #0
	bne	.L5
	ldr	r3, .L11
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, r2
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #64
	bls	.L4
	ldr	r3, .L11
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, r2
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #70
	bhi	.L4
	b	.L5
.L8:
	bl	__ctype_b_loc
	mov	r3, r0
	ldr	r2, [r3]
	ldr	r3, .L11
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, r1
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r3, [r3]
	and	r3, r3, #2048
	cmp	r3, #0
	beq	.L6
	ldr	r3, .L11
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, r2
	ldrb	r3, [r3]	@ zero_extendqisi2
	sub	r3, r3, #48
	str	r3, [fp, #-8]
	b	.L7
.L6:
	ldr	r3, .L11
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, r2
	ldrb	r3, [r3]	@ zero_extendqisi2
	sub	r3, r3, #55
	str	r3, [fp, #-8]
.L7:
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #4
	ldr	r2, [fp, #-8]
	add	r3, r2, r3
	str	r3, [fp, #-12]
	ldr	r3, .L11
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L11
	str	r3, [r2]
.L5:
	bl	__ctype_b_loc
	mov	r3, r0
	ldr	r2, [r3]
	ldr	r3, .L11
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, r1
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r3, [r3]
	and	r3, r3, #2048
	cmp	r3, #0
	bne	.L8
	ldr	r3, .L11
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, r2
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #64
	bls	.L9
	ldr	r3, .L11
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, r2
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #70
	bls	.L8
.L9:
	ldr	r3, [fp, #-12]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L12:
	.align	2
.L11:
	.word	i
	.size	htoi, .-htoi
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Hexadecimal string: \000"
	.align	2
.LC1:
	.ascii	", Decimal number %d\012\000"
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 1016
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1016
	ldr	r3, .L29
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-1020]
	b	.L14
.L16:
	ldr	r3, [fp, #-1016]
	and	r1, r3, #255
	sub	r2, fp, #1008
	ldr	r3, [fp, #-1020]
	add	r3, r2, r3
	mov	r2, r1
	strb	r2, [r3]
	ldr	r3, [fp, #-1020]
	add	r3, r3, #1
	str	r3, [fp, #-1020]
.L14:
	bl	getchar
	str	r0, [fp, #-1016]
	ldr	r3, [fp, #-1016]
	cmn	r3, #1
	beq	.L15
	ldr	r3, [fp, #-1016]
	cmp	r3, #10
	bne	.L16
.L15:
	ldr	r3, [fp, #-1020]
	str	r3, [fp, #-1012]
	mov	r3, #0
	str	r3, [fp, #-1020]
	b	.L17
.L19:
	sub	r2, fp, #1008
	ldr	r3, [fp, #-1020]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #96
	bls	.L18
	sub	r2, fp, #1008
	ldr	r3, [fp, #-1020]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #102
	bhi	.L18
	sub	r2, fp, #1008
	ldr	r3, [fp, #-1020]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	bl	toupper
	mov	r3, r0
	and	r1, r3, #255
	sub	r2, fp, #1008
	ldr	r3, [fp, #-1020]
	add	r3, r2, r3
	mov	r2, r1
	strb	r2, [r3]
.L18:
	ldr	r3, [fp, #-1020]
	add	r3, r3, #1
	str	r3, [fp, #-1020]
.L17:
	ldr	r2, [fp, #-1020]
	ldr	r3, [fp, #-1012]
	cmp	r2, r3
	bne	.L19
	mov	r3, #0
	str	r3, [fp, #-1020]
	b	.L20
.L26:
	bl	__ctype_b_loc
	mov	r3, r0
	ldr	r2, [r3]
	sub	r1, fp, #1008
	ldr	r3, [fp, #-1020]
	add	r3, r1, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r3, [r3]
	and	r3, r3, #2048
	cmp	r3, #0
	bne	.L21
	sub	r2, fp, #1008
	ldr	r3, [fp, #-1020]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #64
	bls	.L22
	sub	r2, fp, #1008
	ldr	r3, [fp, #-1020]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #70
	bhi	.L22
.L21:
	ldr	r0, .L29+4
	bl	printf
	b	.L23
.L24:
	sub	r2, fp, #1008
	ldr	r3, [fp, #-1020]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	bl	putchar
	ldr	r3, [fp, #-1020]
	add	r3, r3, #1
	str	r3, [fp, #-1020]
.L23:
	bl	__ctype_b_loc
	mov	r3, r0
	ldr	r2, [r3]
	sub	r1, fp, #1008
	ldr	r3, [fp, #-1020]
	add	r3, r1, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r3, [r3]
	and	r3, r3, #2048
	cmp	r3, #0
	bne	.L24
	sub	r2, fp, #1008
	ldr	r3, [fp, #-1020]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #64
	bls	.L25
	sub	r2, fp, #1008
	ldr	r3, [fp, #-1020]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #70
	bls	.L24
.L25:
	sub	r3, fp, #1008
	mov	r0, r3
	bl	htoi
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L29+8
	bl	printf
.L22:
	ldr	r3, [fp, #-1020]
	add	r3, r3, #1
	str	r3, [fp, #-1020]
.L20:
	sub	r2, fp, #1008
	ldr	r3, [fp, #-1020]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L26
	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	.LC2
	.word	.LC0
	.word	.LC1
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
