	.file	"476532.c"
	.intel_syntax noprefix
	.text
	.globl	is_hex_char
	.type	is_hex_char, @function
is_hex_char:
.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 -4[rbp], al
	cmp	BYTE PTR -4[rbp], 47
	jle	.L2
	cmp	BYTE PTR -4[rbp], 57
	jle	.L3
.L2:
	cmp	BYTE PTR -4[rbp], 96
	jle	.L4
	cmp	BYTE PTR -4[rbp], 102
	jle	.L3
.L4:
	cmp	BYTE PTR -4[rbp], 64
	jle	.L5
	cmp	BYTE PTR -4[rbp], 70
	jg	.L5
.L3:
	mov	eax, 1
	jmp	.L6
.L5:
	mov	eax, 0
.L6:
	and	eax, 1
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	is_hex_char, .-is_hex_char
	.globl	get_hex
	.type	get_hex, @function
get_hex:
.LFB1:
	.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 -4[rbp], al
	cmp	BYTE PTR -4[rbp], 47
	jle	.L9
	cmp	BYTE PTR -4[rbp], 57
	jg	.L9
	movsx	eax, BYTE PTR -4[rbp]
	sub	eax, 48
	jmp	.L10
.L9:
	cmp	BYTE PTR -4[rbp], 96
	jle	.L11
	cmp	BYTE PTR -4[rbp], 102
	jg	.L11
	movsx	eax, BYTE PTR -4[rbp]
	sub	eax, 87
	jmp	.L10
.L11:
	cmp	BYTE PTR -4[rbp], 64
	jle	.L12
	cmp	BYTE PTR -4[rbp], 70
	jg	.L12
	movsx	eax, BYTE PTR -4[rbp]
	sub	eax, 55
	jmp	.L10
.L12:
	mov	eax, 0
.L10:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	get_hex, .-get_hex
	.section	.rodata
.LC0:
	.string	"hex: %d\n"
	.text
	.globl	htoi
	.type	htoi, @function
htoi:
.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, 40
	.cfi_offset 3, -24
	mov	QWORD PTR -40[rbp], rdi
	mov	DWORD PTR -24[rbp], 0
	mov	BYTE PTR -26[rbp], 0
	jmp	.L14
.L18:
	add	DWORD PTR -24[rbp], 1
	cmp	DWORD PTR -24[rbp], 1
	jle	.L14
	mov	rax, QWORD PTR -40[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 48
	jne	.L23
	mov	rax, QWORD PTR -40[rbp]
	add	rax, 1
	movzx	eax, BYTE PTR [rax]
	cmp	al, 120
	je	.L16
	mov	rax, QWORD PTR -40[rbp]
	add	rax, 1
	movzx	eax, BYTE PTR [rax]
	cmp	al, 88
	jne	.L23
.L16:
	mov	BYTE PTR -26[rbp], 1
	jmp	.L23
.L14:
	mov	eax, DWORD PTR -24[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	mov	BYTE PTR -25[rbp], al
	cmp	BYTE PTR -25[rbp], 0
	jne	.L18
	jmp	.L17
.L23:
	nop
.L17:
	movzx	eax, BYTE PTR -26[rbp]
	xor	eax, 1
	test	al, al
	je	.L19
	mov	DWORD PTR -24[rbp], 0
.L19:
	mov	DWORD PTR -20[rbp], 0
	jmp	.L20
.L21:
	mov	eax, DWORD PTR -24[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	edi, eax
	call	get_hex
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -20[rbp]
	sal	eax, 4
	mov	ebx, eax
	mov	eax, DWORD PTR -24[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	edi, eax
	call	get_hex
	add	eax, ebx
	mov	DWORD PTR -20[rbp], eax
	add	DWORD PTR -24[rbp], 1
.L20:
	mov	eax, DWORD PTR -24[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	edi, eax
	call	is_hex_char
	test	al, al
	jne	.L21
	mov	eax, DWORD PTR -20[rbp]
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	htoi, .-htoi
	.section	.rodata
.LC1:
	.string	"0xff"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB3:
	.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	DWORD PTR -4[rbp], edi
	mov	QWORD PTR -16[rbp], rsi
	cmp	DWORD PTR -4[rbp], 1
	jle	.L25
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 8[rax]
	jmp	.L26
.L25:
	lea	rax, .LC1[rip]
.L26:
	mov	rdi, rax
	call	htoi
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.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	"476532.c"
	.text
	.align	2
	.global	is_hex_char
	.syntax unified
	.arm
	.fpu softvfp
	.type	is_hex_char, %function
is_hex_char:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	mov	r3, r0
	strb	r3, [fp, #-5]
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #47
	bls	.L2
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #57
	bls	.L3
.L2:
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #96
	bls	.L4
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #102
	bls	.L3
.L4:
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #64
	bls	.L5
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #70
	bhi	.L5
.L3:
	mov	r3, #1
	b	.L6
.L5:
	mov	r3, #0
.L6:
	and	r3, r3, #1
	and	r3, r3, #255
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	is_hex_char, .-is_hex_char
	.align	2
	.global	get_hex
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_hex, %function
get_hex:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	mov	r3, r0
	strb	r3, [fp, #-5]
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #47
	bls	.L9
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #57
	bhi	.L9
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	sub	r3, r3, #48
	b	.L10
.L9:
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #96
	bls	.L11
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #102
	bhi	.L11
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	sub	r3, r3, #87
	b	.L10
.L11:
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #64
	bls	.L12
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #70
	bhi	.L12
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	sub	r3, r3, #55
	b	.L10
.L12:
	mov	r3, #0
.L10:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	get_hex, .-get_hex
	.section	.rodata
	.align	2
.LC0:
	.ascii	"hex: %d\012\000"
	.text
	.align	2
	.global	htoi
	.syntax unified
	.arm
	.fpu softvfp
	.type	htoi, %function
htoi:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #28
	str	r0, [fp, #-32]
	mov	r3, #0
	str	r3, [fp, #-20]
	mov	r3, #0
	strb	r3, [fp, #-22]
	b	.L14
.L18:
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #1
	ble	.L14
	ldr	r3, [fp, #-32]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #48
	bne	.L23
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #120
	beq	.L16
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #88
	bne	.L23
.L16:
	mov	r3, #1
	strb	r3, [fp, #-22]
	b	.L23
.L14:
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldrb	r3, [r3]
	strb	r3, [fp, #-21]
	ldrb	r3, [fp, #-21]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L18
	b	.L17
.L23:
	nop
.L17:
	ldrb	r3, [fp, #-22]
	eor	r3, r3, #1
	and	r3, r3, #255
	cmp	r3, #0
	beq	.L19
	mov	r3, #0
	str	r3, [fp, #-20]
.L19:
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L20
.L21:
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	bl	get_hex
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L24
	bl	printf
	ldr	r3, [fp, #-16]
	lsl	r4, r3, #4
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	bl	get_hex
	mov	r3, r0
	add	r3, r4, r3
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L20:
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	bl	is_hex_char
	mov	r3, r0
	cmp	r3, #0
	bne	.L21
	ldr	r3, [fp, #-16]
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L25:
	.align	2
.L24:
	.word	.LC0
	.size	htoi, .-htoi
	.section	.rodata
	.align	2
.LC1:
	.ascii	"0xff\000"
	.align	2
.LC2:
	.ascii	"%d\012\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	ldr	r3, [fp, #-8]
	cmp	r3, #1
	ble	.L27
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #4]
	b	.L28
.L27:
	ldr	r3, .L30
.L28:
	mov	r0, r3
	bl	htoi
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L30+4
	bl	printf
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L31:
	.align	2
.L30:
	.word	.LC1
	.word	.LC2
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
