	.file	"extr_strtol.c_strtol.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	strtol
	.type	strtol, @function
strtol:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, rdi
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	ebp, edx
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	QWORD PTR 24[rsp], rdi
	mov	QWORD PTR 16[rsp], rsi
	.p2align 4,,10
	.p2align 3
.L2:
	mov	rbx, r15
	movsx	r14d, BYTE PTR [r15]
	add	r15, 1
	mov	edi, r14d
	call	ISSPACE@PLT
	test	rax, rax
	jne	.L2
	cmp	r14d, 45
	je	.L53
	mov	DWORD PTR 12[rsp], 0
	cmp	r14d, 43
	je	.L54
.L4:
	test	ebp, -17
	jne	.L51
	cmp	r14d, 48
	je	.L55
	test	ebp, ebp
	jne	.L51
	mov	QWORD PTR [rsp], 10
	mov	ebp, 10
	jmp	.L6
.L8:
	test	ebp, ebp
	je	.L26
	.p2align 4,,10
	.p2align 3
.L51:
	movsx	rax, ebp
	mov	QWORD PTR [rsp], rax
.L6:
	mov	esi, DWORD PTR 12[rsp]
	mov	rax, QWORD PTR LONG_MAX[rip]
	test	esi, esi
	je	.L10
	mov	rax, QWORD PTR LONG_MIN[rip]
	neg	rax
.L10:
	xor	edx, edx
	xor	ebx, ebx
	xor	r12d, r12d
	div	QWORD PTR [rsp]
	mov	DWORD PTR 8[rsp], edx
	mov	r13, rax
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L12:
	cmp	ebp, ecx
	jle	.L13
.L56:
	test	ebx, ebx
	js	.L28
	cmp	r12, r13
	ja	.L28
	jne	.L31
	mov	ebx, -1
	cmp	ecx, DWORD PTR 8[rsp]
	jle	.L31
.L15:
	movsx	r14d, BYTE PTR [r15]
	add	r15, 1
.L17:
	mov	edi, r14d
	call	ISDIGIT@PLT
	lea	ecx, -48[r14]
	test	rax, rax
	jne	.L12
	mov	edi, r14d
	call	ISALPHA@PLT
	test	rax, rax
	je	.L13
	mov	edi, r14d
	call	ISUPPER@PLT
	mov	ecx, r14d
	cmp	rax, 1
	sbb	eax, eax
	and	eax, 32
	add	eax, 55
	sub	ecx, eax
	cmp	ebp, ecx
	jg	.L56
.L13:
	cmp	ebx, -1
	je	.L57
	mov	edx, DWORD PTR 12[rsp]
	mov	rax, r12
	neg	rax
	test	edx, edx
	cmovne	r12, rax
	cmp	QWORD PTR 16[rsp], 0
	je	.L37
	test	ebx, ebx
	jne	.L21
.L24:
	mov	rax, QWORD PTR 16[rsp]
	mov	rdx, QWORD PTR 24[rsp]
	mov	QWORD PTR [rax], rdx
.L37:
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rax, r12
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L28:
	.cfi_restore_state
	mov	ebx, -1
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L31:
	imul	r12, QWORD PTR [rsp]
	movsx	rcx, ecx
	mov	ebx, 1
	add	r12, rcx
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L54:
	movsx	r14d, BYTE PTR [r15]
	lea	r15, 2[rbx]
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L57:
	mov	ecx, DWORD PTR 12[rsp]
	mov	eax, DWORD PTR ERANGE[rip]
	mov	r12, QWORD PTR LONG_MIN[rip]
	test	ecx, ecx
	cmove	r12, QWORD PTR LONG_MAX[rip]
	cmp	QWORD PTR 16[rsp], 0
	mov	DWORD PTR errno[rip], eax
	je	.L37
.L21:
	lea	rax, -1[r15]
	mov	QWORD PTR 24[rsp], rax
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L53:
	movsx	r14d, BYTE PTR [r15]
	mov	DWORD PTR 12[rsp], 1
	lea	r15, 2[rbx]
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L55:
	movzx	eax, BYTE PTR [r15]
	and	eax, -33
	cmp	al, 88
	jne	.L8
	movsx	r14d, BYTE PTR 1[r15]
	mov	ebp, 16
	add	r15, 2
	mov	QWORD PTR [rsp], 16
	jmp	.L6
.L26:
	mov	QWORD PTR [rsp], 8
	mov	ebp, 8
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	strtol, .-strtol
	.comm	errno,4,4
	.comm	LONG_MIN,8,8
	.comm	LONG_MAX,8,8
	.comm	ERANGE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.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, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_strtol.c_strtol.c"
	.text
	.global	__aeabi_uidivmod
	.align	2
	.global	strtol
	.syntax unified
	.arm
	.fpu softvfp
	.type	strtol, %function
strtol:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r8, r2
	mov	r5, r0
	sub	sp, sp, #20
	str	r0, [sp, #12]
	str	r1, [sp, #8]
.L2:
	mov	r6, r5
	ldrb	fp, [r5], #1	@ zero_extendqisi2
	mov	r0, fp
	bl	ISSPACE
	subs	r4, r0, #0
	bne	.L2
	cmp	fp, #45
	beq	.L47
	cmp	fp, #43
	ldrbeq	fp, [r5]	@ zero_extendqisi2
	streq	r4, [sp, #4]
	addeq	r5, r6, #2
	strne	r4, [sp, #4]
.L4:
	bics	r3, r8, #16
	bne	.L45
	cmp	fp, #48
	beq	.L48
	cmp	r8, #0
	moveq	r8, #10
.L45:
	mov	r10, r8
.L6:
	ldr	r3, [sp, #4]
	mov	r1, r10
	cmp	r3, #0
	ldrne	r2, .L53
	ldreq	r2, .L53+4
	ldrne	r0, [r2]
	ldreq	r0, [r2]
	rsbne	r0, r0, #0
	bl	__aeabi_uidivmod
	mov	r6, #0
	mov	r7, r0
	mov	r9, r1
	b	.L16
.L50:
	sub	r2, r6, r7
	clz	r2, r2
	cmp	r3, r9
	lsr	r2, r2, #5
	movle	r2, #0
	cmp	r2, #0
	bne	.L28
	mov	r4, #1
	mla	r6, r10, r6, r3
.L15:
	ldrb	fp, [r5], #1	@ zero_extendqisi2
.L16:
	mov	r0, fp
	bl	ISDIGIT
	cmp	r0, #0
	subne	r3, fp, #48
	beq	.L49
	cmp	r8, r3
	ble	.L13
.L51:
	cmp	r6, r7
	movls	r2, #0
	movhi	r2, #1
	orrs	r2, r2, r4, lsr #31
	beq	.L50
.L28:
	mvn	r4, #0
	b	.L15
.L49:
	mov	r0, fp
	bl	ISALPHA
	cmp	r0, #0
	beq	.L13
	mov	r0, fp
	bl	ISUPPER
	cmp	r0, #0
	movne	r2, #55
	moveq	r2, #87
	sub	r3, fp, r2
	cmp	r8, r3
	bgt	.L51
.L13:
	cmn	r4, #1
	ldr	r3, [sp, #4]
	beq	.L52
	cmp	r3, #0
	ldr	r3, [sp, #8]
	rsbne	r6, r6, #0
	cmp	r3, #0
	beq	.L34
	cmp	r4, #0
	bne	.L20
.L23:
	ldr	r3, [sp, #8]
	ldr	r2, [sp, #12]
	str	r2, [r3]
.L34:
	mov	r0, r6
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L52:
	cmp	r3, #0
	ldrne	r3, .L53
	ldreq	r3, .L53+4
	ldr	r2, .L53+8
	ldr	r1, [sp, #8]
	ldr	r6, [r3]
	ldr	r2, [r2]
	ldr	r3, .L53+12
	cmp	r1, #0
	str	r2, [r3]
	beq	.L34
.L20:
	sub	r3, r5, #1
	str	r3, [sp, #12]
	b	.L23
.L47:
	mov	r3, #1
	ldrb	fp, [r5]	@ zero_extendqisi2
	str	r3, [sp, #4]
	add	r5, r6, #2
	b	.L4
.L48:
	ldrb	r2, [r5]	@ zero_extendqisi2
	and	r2, r2, #223
	cmp	r2, #88
	bne	.L8
	mov	r8, #16
	ldrb	fp, [r5, #1]	@ zero_extendqisi2
	mov	r10, r8
	add	r5, r5, #2
	b	.L6
.L8:
	cmp	r8, #0
	moveq	r8, #8
	moveq	r10, r8
	beq	.L6
	b	.L45
.L54:
	.align	2
.L53:
	.word	LONG_MIN
	.word	LONG_MAX
	.word	ERANGE
	.word	errno
	.size	strtol, .-strtol
	.comm	errno,4,4
	.comm	LONG_MIN,4,4
	.comm	LONG_MAX,4,4
	.comm	ERANGE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
