	.file	"349049.c"
	.intel_syntax noprefix
	.text
	.globl	strtoul
	.type	strtoul, @function
strtoul:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	push	r14
	push	r13
	push	r12
	push	rbx
	sub	rsp, 72
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	mov	QWORD PTR -72[rbp], rdi
	mov	QWORD PTR -80[rbp], rsi
	mov	r13d, edx
	mov	rbx, QWORD PTR -72[rbp]
	mov	BYTE PTR -81[rbp], 0
.L2:
	mov	rax, rbx
	lea	rbx, 1[rax]
	movzx	r12d, BYTE PTR [rax]
	call	__ctype_b_loc@PLT
	mov	rdx, QWORD PTR [rax]
	mov	eax, r12d
	movzx	eax, al
	add	rax, rax
	add	rax, rdx
	movzx	eax, WORD PTR [rax]
	movzx	eax, ax
	and	eax, 8192
	test	eax, eax
	jne	.L2
	cmp	r12b, 45
	jne	.L3
	mov	BYTE PTR -81[rbp], 1
	mov	rax, rbx
	lea	rbx, 1[rax]
	movzx	r12d, BYTE PTR [rax]
	jmp	.L4
.L3:
	cmp	r12b, 43
	jne	.L4
	mov	rax, rbx
	lea	rbx, 1[rax]
	movzx	r12d, BYTE PTR [rax]
.L4:
	test	r13d, r13d
	je	.L5
	cmp	r13d, 16
	jne	.L6
.L5:
	cmp	r12b, 48
	jne	.L6
	movzx	eax, BYTE PTR [rbx]
	cmp	al, 120
	je	.L7
	movzx	eax, BYTE PTR [rbx]
	cmp	al, 88
	jne	.L6
.L7:
	movzx	r12d, BYTE PTR 1[rbx]
	add	rbx, 2
	mov	r13d, 16
.L6:
	test	r13d, r13d
	jne	.L8
	cmp	r12b, 48
	jne	.L9
	mov	eax, 8
	jmp	.L10
.L9:
	mov	eax, 10
.L10:
	mov	r13d, eax
.L8:
	movsx	rsi, r13d
	mov	rax, -1
	mov	edx, 0
	div	rsi
	mov	QWORD PTR -96[rbp], rax
	movsx	rcx, r13d
	mov	rax, -1
	mov	edx, 0
	div	rcx
	mov	rax, rdx
	mov	DWORD PTR -100[rbp], eax
	mov	r14d, 0
	mov	r15d, 0
.L21:
	call	__ctype_b_loc@PLT
	mov	rdx, QWORD PTR [rax]
	mov	eax, r12d
	movzx	eax, al
	add	rax, rax
	add	rax, rdx
	movzx	eax, WORD PTR [rax]
	movzx	eax, ax
	and	eax, 2048
	test	eax, eax
	je	.L11
	movsx	eax, r12b
	sub	eax, 48
	mov	DWORD PTR -52[rbp], eax
	jmp	.L12
.L11:
	call	__ctype_b_loc@PLT
	mov	rdx, QWORD PTR [rax]
	mov	eax, r12d
	movzx	eax, al
	add	rax, rax
	add	rax, rdx
	movzx	eax, WORD PTR [rax]
	movzx	eax, ax
	and	eax, 1024
	test	eax, eax
	je	.L28
	movsx	eax, r12b
	mov	DWORD PTR -88[rbp], eax
	call	__ctype_b_loc@PLT
	mov	rdx, QWORD PTR [rax]
	mov	eax, r12d
	movzx	eax, al
	add	rax, rax
	add	rax, rdx
	movzx	eax, WORD PTR [rax]
	movzx	eax, ax
	and	eax, 256
	test	eax, eax
	je	.L14
	mov	edx, 65
	jmp	.L15
.L14:
	mov	edx, 97
.L15:
	mov	eax, DWORD PTR -88[rbp]
	sub	eax, edx
	add	eax, 10
	mov	DWORD PTR -52[rbp], eax
.L12:
	cmp	DWORD PTR -52[rbp], r13d
	jge	.L29
	test	r15d, r15d
	js	.L18
	mov	rax, QWORD PTR -96[rbp]
	cmp	r14, rax
	ja	.L18
	cmp	r14, rax
	jne	.L19
	mov	eax, DWORD PTR -100[rbp]
	cmp	DWORD PTR -52[rbp], eax
	jle	.L19
.L18:
	mov	r15d, -1
	jmp	.L20
.L19:
	mov	r15d, 1
	movsx	rax, r13d
	imul	r14, rax
	mov	eax, DWORD PTR -52[rbp]
	cdqe
	add	r14, rax
.L20:
	mov	rax, rbx
	lea	rbx, 1[rax]
	movzx	r12d, BYTE PTR [rax]
	jmp	.L21
.L28:
	nop
	jmp	.L16
.L29:
	nop
.L16:
	cmp	QWORD PTR -80[rbp], 0
	je	.L22
	test	r15d, r15d
	je	.L23
	lea	rax, -1[rbx]
	jmp	.L24
.L23:
	mov	rax, QWORD PTR -72[rbp]
.L24:
	mov	rdx, QWORD PTR -80[rbp]
	mov	QWORD PTR [rdx], rax
.L22:
	test	r15d, r15d
	jns	.L25
	call	__errno_location@PLT
	mov	DWORD PTR [rax], 34
	mov	rax, -1
	jmp	.L26
.L25:
	cmp	BYTE PTR -81[rbp], 0
	je	.L27
	mov	rax, r14
	neg	rax
	jmp	.L26
.L27:
	mov	rax, r14
.L26:
	add	rsp, 72
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	strtoul, .-strtoul
	.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	"349049.c"
	.text
	.global	__aeabi_uidiv
	.global	__aeabi_uidivmod
	.align	2
	.global	strtoul
	.syntax unified
	.arm
	.fpu softvfp
	.type	strtoul, %function
strtoul:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	add	fp, sp, #32
	sub	sp, sp, #28
	str	r0, [fp, #-48]
	str	r1, [fp, #-52]
	mov	r7, r2
	ldr	r4, [fp, #-48]
	mov	r10, #0
.L2:
	mov	r3, r4
	add	r4, r3, #1
	ldrb	r5, [r3]	@ zero_extendqisi2
	bl	__ctype_b_loc
	mov	r3, r0
	ldr	r2, [r3]
	mov	r3, r5
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r3, [r3]
	and	r3, r3, #8192
	cmp	r3, #0
	bne	.L2
	cmp	r5, #45
	bne	.L3
	mov	r10, #1
	mov	r3, r4
	add	r4, r3, #1
	ldrb	r5, [r3]	@ zero_extendqisi2
	b	.L4
.L3:
	cmp	r5, #43
	bne	.L4
	mov	r3, r4
	add	r4, r3, #1
	ldrb	r5, [r3]	@ zero_extendqisi2
.L4:
	cmp	r7, #0
	beq	.L5
	cmp	r7, #16
	bne	.L6
.L5:
	cmp	r5, #48
	bne	.L6
	ldrb	r3, [r4]	@ zero_extendqisi2
	cmp	r3, #120
	beq	.L7
	ldrb	r3, [r4]	@ zero_extendqisi2
	cmp	r3, #88
	bne	.L6
.L7:
	ldrb	r5, [r4, #1]	@ zero_extendqisi2
	add	r4, r4, #2
	mov	r7, #16
.L6:
	cmp	r7, #0
	bne	.L8
	cmp	r5, #48
	bne	.L9
	mov	r3, #8
	b	.L10
.L9:
	mov	r3, #10
.L10:
	mov	r7, r3
.L8:
	mov	r3, r7
	mov	r1, r3
	mvn	r0, #0
	bl	__aeabi_uidiv
	mov	r3, r0
	mov	r9, r3
	mov	r2, r7
	mvn	r3, #0
	mov	r1, r2
	mov	r0, r3
	bl	__aeabi_uidivmod
	mov	r3, r1
	str	r3, [fp, #-60]
	mov	r6, #0
	mov	r8, #0
.L21:
	bl	__ctype_b_loc
	mov	r3, r0
	ldr	r2, [r3]
	mov	r3, r5
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r3, [r3]
	and	r3, r3, #2048
	cmp	r3, #0
	beq	.L11
	mov	r3, r5
	sub	r3, r3, #48
	str	r3, [fp, #-40]
	b	.L12
.L11:
	bl	__ctype_b_loc
	mov	r3, r0
	ldr	r2, [r3]
	mov	r3, r5
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r3, [r3]
	and	r3, r3, #1024
	cmp	r3, #0
	beq	.L28
	str	r5, [fp, #-56]
	bl	__ctype_b_loc
	mov	r3, r0
	ldr	r2, [r3]
	mov	r3, r5
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r3, [r3]
	and	r3, r3, #256
	cmp	r3, #0
	beq	.L14
	mov	r3, #65
	b	.L15
.L14:
	mov	r3, #97
.L15:
	ldr	r2, [fp, #-56]
	sub	r3, r2, r3
	add	r3, r3, #10
	str	r3, [fp, #-40]
.L12:
	ldr	r3, [fp, #-40]
	cmp	r3, r7
	bge	.L29
	cmp	r8, #0
	blt	.L18
	cmp	r6, r9
	bhi	.L18
	cmp	r6, r9
	bne	.L19
	ldr	r3, [fp, #-40]
	ldr	r2, [fp, #-60]
	cmp	r3, r2
	ble	.L19
.L18:
	mvn	r8, #0
	b	.L20
.L19:
	mov	r8, #1
	mov	r3, r7
	mul	r6, r3, r6
	ldr	r3, [fp, #-40]
	add	r6, r6, r3
.L20:
	mov	r3, r4
	add	r4, r3, #1
	ldrb	r5, [r3]	@ zero_extendqisi2
	b	.L21
.L28:
	nop
	b	.L16
.L29:
	nop
.L16:
	ldr	r3, [fp, #-52]
	cmp	r3, #0
	beq	.L22
	cmp	r8, #0
	beq	.L23
	sub	r3, r4, #1
	b	.L24
.L23:
	ldr	r3, [fp, #-48]
.L24:
	ldr	r2, [fp, #-52]
	str	r3, [r2]
.L22:
	cmp	r8, #0
	bge	.L25
	bl	__errno_location
	mov	r3, r0
	mov	r2, #34
	str	r2, [r3]
	mvn	r3, #0
	b	.L26
.L25:
	cmp	r10, #0
	beq	.L27
	rsb	r3, r6, #0
	b	.L26
.L27:
	mov	r3, r6
.L26:
	mov	r0, r3
	sub	sp, fp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
	.size	strtoul, .-strtoul
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
