	.file	"179081.c"
	.intel_syntax noprefix
	.text
	.globl	strtol
	.type	strtol, @function
strtol:
.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, 48
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -36[rbp], edx
	mov	QWORD PTR -8[rbp], 0
	mov	DWORD PTR -12[rbp], 0
	jmp	.L2
.L3:
	add	QWORD PTR -24[rbp], 1
.L2:
	call	__ctype_b_loc@PLT
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -24[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, 8192
	test	eax, eax
	jne	.L3
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 45
	jne	.L4
	mov	DWORD PTR -12[rbp], 1
	add	QWORD PTR -24[rbp], 1
	jmp	.L5
.L4:
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 43
	jne	.L5
	mov	DWORD PTR -12[rbp], 0
.L5:
	cmp	DWORD PTR -36[rbp], 16
	je	.L6
	cmp	DWORD PTR -36[rbp], 0
	jne	.L7
.L6:
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 48
	jne	.L7
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 1
	movzx	eax, BYTE PTR [rax]
	cmp	al, 120
	je	.L8
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 1
	movzx	eax, BYTE PTR [rax]
	cmp	al, 88
	jne	.L7
.L8:
	add	QWORD PTR -24[rbp], 2
	mov	DWORD PTR -36[rbp], 16
.L7:
	cmp	DWORD PTR -36[rbp], 0
	jne	.L15
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 48
	jne	.L10
	mov	DWORD PTR -36[rbp], 8
	jmp	.L15
.L10:
	mov	DWORD PTR -36[rbp], 10
.L15:
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR [rax]
	mov	BYTE PTR -13[rbp], al
	cmp	BYTE PTR -13[rbp], 47
	jle	.L11
	cmp	BYTE PTR -13[rbp], 57
	jg	.L11
	movsx	eax, BYTE PTR -13[rbp]
	sub	eax, 47
	cmp	DWORD PTR -36[rbp], eax
	jl	.L11
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	imul	rax, QWORD PTR -8[rbp]
	mov	rdx, rax
	movsx	eax, BYTE PTR -13[rbp]
	sub	eax, 48
	cdqe
	add	rax, rdx
	mov	QWORD PTR -8[rbp], rax
	jmp	.L12
.L11:
	cmp	BYTE PTR -13[rbp], 96
	jle	.L13
	cmp	BYTE PTR -13[rbp], 122
	jg	.L13
	movsx	eax, BYTE PTR -13[rbp]
	sub	eax, 86
	cmp	DWORD PTR -36[rbp], eax
	jl	.L13
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	imul	rax, QWORD PTR -8[rbp]
	mov	rdx, rax
	movsx	eax, BYTE PTR -13[rbp]
	sub	eax, 87
	cdqe
	add	rax, rdx
	mov	QWORD PTR -8[rbp], rax
	jmp	.L12
.L13:
	cmp	BYTE PTR -13[rbp], 64
	jle	.L14
	cmp	BYTE PTR -13[rbp], 90
	jg	.L14
	movsx	eax, BYTE PTR -13[rbp]
	sub	eax, 54
	cmp	DWORD PTR -36[rbp], eax
	jl	.L14
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	imul	rax, QWORD PTR -8[rbp]
	mov	rdx, rax
	movsx	eax, BYTE PTR -13[rbp]
	sub	eax, 55
	cdqe
	add	rax, rdx
	mov	QWORD PTR -8[rbp], rax
.L12:
	add	QWORD PTR -24[rbp], 1
	jmp	.L15
.L14:
	cmp	DWORD PTR -12[rbp], 0
	je	.L16
	neg	QWORD PTR -8[rbp]
.L16:
	cmp	QWORD PTR -32[rbp], 0
	je	.L17
	mov	rax, QWORD PTR -32[rbp]
	mov	rdx, QWORD PTR -24[rbp]
	mov	QWORD PTR [rax], rdx
.L17:
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	strtol, .-strtol
	.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	"179081.c"
	.text
	.align	2
	.global	strtol
	.syntax unified
	.arm
	.fpu softvfp
	.type	strtol, %function
strtol:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	str	r2, [fp, #-32]
	mov	r3, #0
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L2
.L3:
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L2:
	bl	__ctype_b_loc
	mov	r3, r0
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r3, [r3]
	and	r3, r3, #8192
	cmp	r3, #0
	bne	.L3
	ldr	r3, [fp, #-24]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #45
	bne	.L4
	mov	r3, #1
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
	b	.L5
.L4:
	ldr	r3, [fp, #-24]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #43
	bne	.L5
	mov	r3, #0
	str	r3, [fp, #-8]
.L5:
	ldr	r3, [fp, #-32]
	cmp	r3, #16
	beq	.L6
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	bne	.L7
.L6:
	ldr	r3, [fp, #-24]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #48
	bne	.L7
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #120
	beq	.L8
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #88
	bne	.L7
.L8:
	ldr	r3, [fp, #-24]
	add	r3, r3, #2
	str	r3, [fp, #-24]
	mov	r3, #16
	str	r3, [fp, #-32]
.L7:
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	bne	.L15
	ldr	r3, [fp, #-24]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #48
	bne	.L10
	mov	r3, #8
	str	r3, [fp, #-32]
	b	.L15
.L10:
	mov	r3, #10
	str	r3, [fp, #-32]
.L15:
	ldr	r3, [fp, #-24]
	ldrb	r3, [r3]
	strb	r3, [fp, #-13]
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	cmp	r3, #47
	bls	.L11
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	cmp	r3, #57
	bhi	.L11
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	sub	r3, r3, #47
	ldr	r2, [fp, #-32]
	cmp	r2, r3
	blt	.L11
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-32]
	mul	r2, r3, r2
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	sub	r3, r3, #48
	add	r3, r2, r3
	str	r3, [fp, #-12]
	b	.L12
.L11:
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	cmp	r3, #96
	bls	.L13
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	cmp	r3, #122
	bhi	.L13
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	sub	r3, r3, #86
	ldr	r2, [fp, #-32]
	cmp	r2, r3
	blt	.L13
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-32]
	mul	r2, r3, r2
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	sub	r3, r3, #87
	add	r3, r2, r3
	str	r3, [fp, #-12]
	b	.L12
.L13:
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	cmp	r3, #64
	bls	.L14
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	cmp	r3, #90
	bhi	.L14
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	sub	r3, r3, #54
	ldr	r2, [fp, #-32]
	cmp	r2, r3
	blt	.L14
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-32]
	mul	r2, r3, r2
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	sub	r3, r3, #55
	add	r3, r2, r3
	str	r3, [fp, #-12]
.L12:
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
	b	.L15
.L14:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L16
	ldr	r3, [fp, #-12]
	rsb	r3, r3, #0
	str	r3, [fp, #-12]
.L16:
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	beq	.L17
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-24]
	str	r2, [r3]
.L17:
	ldr	r3, [fp, #-12]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	strtol, .-strtol
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
