	.file	"295488.c"
	.intel_syntax noprefix
	.text
	.type	myAtoi, @function
myAtoi:
.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 -40[rbp], rdi
	mov	QWORD PTR -8[rbp], 0
	mov	DWORD PTR -24[rbp], 0
	jmp	.L2
.L3:
	add	QWORD PTR -40[rbp], 1
.L2:
	mov	rax, QWORD PTR -40[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 32
	je	.L3
	mov	rax, QWORD PTR -40[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 9
	je	.L3
	mov	rax, QWORD PTR -40[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 45
	jne	.L4
	call	__ctype_b_loc@PLT
	mov	rdx, QWORD PTR [rax]
	add	QWORD PTR -40[rbp], 1
	mov	rax, QWORD PTR -40[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, 2048
	test	eax, eax
	je	.L5
	mov	DWORD PTR -24[rbp], 1
	jmp	.L4
.L5:
	mov	eax, 0
	jmp	.L6
.L4:
	mov	rax, QWORD PTR -40[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 43
	jne	.L7
	call	__ctype_b_loc@PLT
	mov	rdx, QWORD PTR [rax]
	add	QWORD PTR -40[rbp], 1
	mov	rax, QWORD PTR -40[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, 2048
	test	eax, eax
	je	.L8
	mov	DWORD PTR -24[rbp], 0
	jmp	.L7
.L8:
	mov	eax, 0
	jmp	.L6
.L7:
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR -16[rbp], rax
	jmp	.L9
.L15:
	call	__ctype_b_loc@PLT
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -16[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, 2048
	test	eax, eax
	je	.L18
	mov	rax, QWORD PTR -16[rbp]
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	sub	eax, 48
	mov	DWORD PTR -20[rbp], eax
	cmp	DWORD PTR -24[rbp], 0
	je	.L11
	mov	rax, QWORD PTR -8[rbp]
	neg	rax
	mov	rcx, rax
	mov	eax, DWORD PTR -20[rbp]
	add	eax, -2147483648
	movsx	rdx, eax
	imul	rdx, rdx, 1717986919
	shr	rdx, 32
	sar	edx, 2
	sar	eax, 31
	mov	esi, eax
	mov	eax, edx
	sub	eax, esi
	cdqe
	cmp	rcx, rax
	jge	.L12
	mov	QWORD PTR -8[rbp], -2147483648
	jmp	.L13
.L11:
	mov	eax, 2147483647
	sub	eax, DWORD PTR -20[rbp]
	movsx	rdx, eax
	imul	rdx, rdx, 1717986919
	shr	rdx, 32
	sar	edx, 2
	sar	eax, 31
	mov	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	cdqe
	cmp	QWORD PTR -8[rbp], rax
	jle	.L12
	mov	QWORD PTR -8[rbp], 2147483647
	jmp	.L13
.L12:
	mov	rdx, QWORD PTR -8[rbp]
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	add	rax, rax
	mov	rdx, rax
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	add	rax, rdx
	mov	QWORD PTR -8[rbp], rax
	add	QWORD PTR -16[rbp], 1
.L9:
	mov	rax, QWORD PTR -16[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L15
	jmp	.L13
.L18:
	nop
.L13:
	cmp	DWORD PTR -24[rbp], 0
	je	.L16
	mov	rax, QWORD PTR -8[rbp]
	neg	eax
	jmp	.L6
.L16:
	mov	rax, QWORD PTR -8[rbp]
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	myAtoi, .-myAtoi
	.section	.rodata
.LC0:
	.string	"Usage: ./atoi 123"
.LC1:
	.string	"n = %d %x\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	cmp	DWORD PTR -20[rbp], 2
	je	.L20
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	edi, -1
	call	exit@PLT
.L20:
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	myAtoi
	mov	DWORD PTR -4[rbp], eax
	mov	edx, DWORD PTR -4[rbp]
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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	"295488.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	myAtoi, %function
myAtoi:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	mov	r3, #0
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L2
.L3:
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L2:
	ldr	r3, [fp, #-24]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #32
	beq	.L3
	ldr	r3, [fp, #-24]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #9
	beq	.L3
	ldr	r3, [fp, #-24]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #45
	bne	.L4
	bl	__ctype_b_loc
	mov	r3, r0
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-24]
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r3, [r3]
	and	r3, r3, #2048
	cmp	r3, #0
	beq	.L5
	mov	r3, #1
	str	r3, [fp, #-12]
	b	.L4
.L5:
	mov	r3, #0
	b	.L6
.L4:
	ldr	r3, [fp, #-24]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #43
	bne	.L7
	bl	__ctype_b_loc
	mov	r3, r0
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-24]
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r3, [r3]
	and	r3, r3, #2048
	cmp	r3, #0
	beq	.L8
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L7
.L8:
	mov	r3, #0
	b	.L6
.L7:
	ldr	r3, [fp, #-24]
	str	r3, [fp, #-20]
	b	.L9
.L15:
	bl	__ctype_b_loc
	mov	r3, r0
	ldr	r2, [r3]
	ldr	r3, [fp, #-20]
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r3, [r3]
	and	r3, r3, #2048
	cmp	r3, #0
	beq	.L18
	ldr	r3, [fp, #-20]
	ldrb	r3, [r3]	@ zero_extendqisi2
	sub	r3, r3, #48
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	beq	.L11
	ldr	r3, [fp, #-16]
	rsb	r2, r3, #0
	ldr	r3, [fp, #-8]
	add	r3, r3, #-2147483648
	ldr	r1, .L19
	smull	r0, r1, r3, r1
	asr	r1, r1, #2
	asr	r3, r3, #31
	sub	r3, r1, r3
	cmp	r2, r3
	bge	.L12
	mov	r3, #-2147483648
	str	r3, [fp, #-16]
	b	.L13
.L11:
	ldr	r2, [fp, #-8]
	mvn	r3, #-2147483648
	sub	r3, r3, r2
	ldr	r2, .L19
	smull	r1, r2, r3, r2
	asr	r2, r2, #2
	asr	r3, r3, #31
	sub	r3, r2, r3
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	ble	.L12
	mvn	r3, #-2147483648
	str	r3, [fp, #-16]
	b	.L13
.L12:
	ldr	r2, [fp, #-16]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #1
	mov	r2, r3
	ldr	r3, [fp, #-8]
	add	r3, r3, r2
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L9:
	ldr	r3, [fp, #-20]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L15
	b	.L13
.L18:
	nop
.L13:
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	beq	.L16
	ldr	r3, [fp, #-16]
	rsb	r3, r3, #0
	b	.L6
.L16:
	ldr	r3, [fp, #-16]
.L6:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L20:
	.align	2
.L19:
	.word	1717986919
	.size	myAtoi, .-myAtoi
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Usage: ./atoi 123\000"
	.align	2
.LC1:
	.ascii	"n = %d %x\012\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	ldr	r3, [fp, #-16]
	cmp	r3, #2
	beq	.L22
	ldr	r0, .L24
	bl	puts
	mvn	r0, #0
	bl	exit
.L22:
	ldr	r3, [fp, #-20]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	myAtoi
	str	r0, [fp, #-8]
	ldr	r2, [fp, #-8]
	ldr	r1, [fp, #-8]
	ldr	r0, .L24+4
	bl	printf
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L25:
	.align	2
.L24:
	.word	.LC0
	.word	.LC1
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
