	.file	"12637302.c"
	.intel_syntax noprefix
	.text
	.globl	htoi_digit
	.type	htoi_digit, @function
htoi_digit:
.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
	jg	.L2
	movsx	eax, BYTE PTR -4[rbp]
	sub	eax, 48
	jmp	.L3
.L2:
	cmp	BYTE PTR -4[rbp], 96
	jle	.L4
	cmp	BYTE PTR -4[rbp], 102
	jg	.L4
	movsx	eax, BYTE PTR -4[rbp]
	sub	eax, 87
	jmp	.L3
.L4:
	cmp	BYTE PTR -4[rbp], 64
	jle	.L5
	cmp	BYTE PTR -4[rbp], 70
	jg	.L5
	movsx	eax, BYTE PTR -4[rbp]
	sub	eax, 55
	jmp	.L3
.L5:
	mov	eax, -1
.L3:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	htoi_digit, .-htoi_digit
	.globl	htoi
	.type	htoi, @function
htoi:
.LFB1:
	.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	rax, QWORD PTR -40[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 48
	jne	.L7
	mov	rax, QWORD PTR -40[rbp]
	add	rax, 1
	movzx	eax, BYTE PTR [rax]
	cmp	al, 120
	je	.L8
	mov	rax, QWORD PTR -40[rbp]
	add	rax, 1
	movzx	eax, BYTE PTR [rax]
	cmp	al, 88
	jne	.L7
.L8:
	mov	DWORD PTR -20[rbp], 2
	jmp	.L9
.L7:
	mov	DWORD PTR -20[rbp], 0
.L9:
	mov	eax, DWORD PTR -20[rbp]
	mov	DWORD PTR -28[rbp], eax
	jmp	.L10
.L11:
	mov	eax, DWORD PTR -24[rbp]
	sal	eax, 4
	mov	ebx, eax
	mov	eax, DWORD PTR -28[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	htoi_digit
	add	eax, ebx
	mov	DWORD PTR -24[rbp], eax
	add	DWORD PTR -28[rbp], 1
.L10:
	call	__ctype_b_loc@PLT
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -28[rbp]
	movsx	rcx, eax
	mov	rax, QWORD PTR -40[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, 4096
	test	eax, eax
	jne	.L11
	mov	eax, DWORD PTR -24[rbp]
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	htoi, .-htoi
	.section	.rodata
.LC0:
	.string	"aaa"
.LC1:
	.string	"\n%d\n"
.LC2:
	.string	"0xaaa"
	.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
	lea	rdi, .LC0[rip]
	call	htoi
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC2[rip]
	call	htoi
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	pop	rbp
	.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	"12637302.c"
	.text
	.align	2
	.global	htoi_digit
	.syntax unified
	.arm
	.fpu softvfp
	.type	htoi_digit, %function
htoi_digit:
	@ 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
	bhi	.L2
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	sub	r3, r3, #48
	b	.L3
.L2:
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #96
	bls	.L4
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #102
	bhi	.L4
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	sub	r3, r3, #87
	b	.L3
.L4:
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #64
	bls	.L5
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #70
	bhi	.L5
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	sub	r3, r3, #55
	b	.L3
.L5:
	mvn	r3, #0
.L3:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	htoi_digit, .-htoi_digit
	.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]
	ldr	r3, [fp, #-32]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #48
	bne	.L7
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #120
	beq	.L8
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #88
	bne	.L7
.L8:
	mov	r3, #2
	str	r3, [fp, #-16]
	b	.L9
.L7:
	mov	r3, #0
	str	r3, [fp, #-16]
.L9:
	ldr	r3, [fp, #-16]
	str	r3, [fp, #-24]
	b	.L10
.L11:
	ldr	r3, [fp, #-20]
	lsl	r4, r3, #4
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	bl	htoi_digit
	mov	r3, r0
	add	r3, r4, r3
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L10:
	bl	__ctype_b_loc
	mov	r3, r0
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	ldr	r1, [fp, #-32]
	add	r3, r1, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r3, [r3]
	and	r3, r3, #4096
	cmp	r3, #0
	bne	.L11
	ldr	r3, [fp, #-20]
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
	.size	htoi, .-htoi
	.section	.rodata
	.align	2
.LC0:
	.ascii	"aaa\000"
	.align	2
.LC1:
	.ascii	"\012%d\012\000"
	.align	2
.LC2:
	.ascii	"0xaaa\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	r0, .L15
	bl	htoi
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L15+4
	bl	printf
	ldr	r0, .L15+8
	bl	htoi
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L15+4
	bl	printf
	mov	r3, #0
	mov	r0, r3
	pop	{fp, pc}
.L16:
	.align	2
.L15:
	.word	.LC0
	.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
