	.file	"21148.c"
	.intel_syntax noprefix
	.text
	.globl	max_addend
	.data
	.align 4
	.type	max_addend, @object
	.size	max_addend, 4
max_addend:
	.long	1048576
	.text
	.globl	sum_till_MAX
	.type	sum_till_MAX, @function
sum_till_MAX:
.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, 32
	mov	DWORD PTR -20[rbp], edi
	add	DWORD PTR -20[rbp], 1
	mov	eax, DWORD PTR -20[rbp]
	mov	QWORD PTR -8[rbp], rax
	mov	eax, DWORD PTR max_addend[rip]
	cmp	DWORD PTR -20[rbp], eax
	jnb	.L2
	mov	eax, DWORD PTR -20[rbp]
	mov	edi, eax
	call	sum_till_MAX
	add	QWORD PTR -8[rbp], rax
.L2:
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	sum_till_MAX, .-sum_till_MAX
	.section	.rodata
.LC0:
	.string	"Invalid number is specified\n"
.LC1:
	.string	"sum(0..%lu) = %llu\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
	mov	QWORD PTR -8[rbp], 0
	cmp	DWORD PTR -20[rbp], 2
	jne	.L5
	call	__ctype_b_loc@PLT
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	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	rax, QWORD PTR -32[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	edx, 0
	mov	esi, 0
	mov	rdi, rax
	call	strtoul@PLT
	mov	DWORD PTR max_addend[rip], eax
.L5:
	mov	eax, DWORD PTR max_addend[rip]
	cmp	eax, 1048576
	ja	.L6
	mov	eax, DWORD PTR max_addend[rip]
	test	eax, eax
	jne	.L7
.L6:
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 28
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	eax, 1
	jmp	.L8
.L7:
	mov	edi, 0
	call	sum_till_MAX
	mov	QWORD PTR -8[rbp], rax
	mov	eax, DWORD PTR max_addend[rip]
	mov	rdx, QWORD PTR -8[rbp]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
.L8:
	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	"21148.c"
	.text
	.global	max_addend
	.data
	.align	2
	.type	max_addend, %object
	.size	max_addend, 4
max_addend:
	.word	1048576
	.text
	.align	2
	.global	sum_till_MAX
	.syntax unified
	.arm
	.fpu softvfp
	.type	sum_till_MAX, %function
sum_till_MAX:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #16
	str	r0, [fp, #-24]
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-24]
	mov	r2, r3
	mov	r3, #0
	str	r2, [fp, #-20]
	str	r3, [fp, #-16]
	ldr	r3, .L4
	ldr	r3, [r3]
	ldr	r2, [fp, #-24]
	cmp	r2, r3
	bcs	.L2
	ldr	r0, [fp, #-24]
	bl	sum_till_MAX
	sub	r3, fp, #20
	ldmia	r3, {r2-r3}
	adds	r4, r2, r0
	adc	r5, r3, r1
	str	r4, [fp, #-20]
	str	r5, [fp, #-16]
.L2:
	sub	r3, fp, #20
	ldmia	r3, {r2-r3}
	mov	r0, r2
	mov	r1, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L5:
	.align	2
.L4:
	.word	max_addend
	.size	sum_till_MAX, .-sum_till_MAX
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Invalid number is specified\012\000"
	.align	2
.LC1:
	.ascii	"sum(0..%lu) = %llu\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]
	mov	r2, #0
	mov	r3, #0
	str	r2, [fp, #-12]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-16]
	cmp	r3, #2
	bne	.L7
	bl	__ctype_b_loc
	mov	r3, r0
	ldr	r2, [r3]
	ldr	r3, [fp, #-20]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r3, [r3]
	and	r3, r3, #2048
	cmp	r3, #0
	beq	.L7
	ldr	r3, [fp, #-20]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r2, #0
	mov	r1, #0
	mov	r0, r3
	bl	strtoul
	mov	r3, r0
	ldr	r2, .L11
	str	r3, [r2]
.L7:
	ldr	r3, .L11
	ldr	r3, [r3]
	cmp	r3, #1048576
	bhi	.L8
	ldr	r3, .L11
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L9
.L8:
	ldr	r3, .L11+4
	ldr	r3, [r3]
	mov	r2, #28
	mov	r1, #1
	ldr	r0, .L11+8
	bl	fwrite
	mov	r3, #1
	b	.L10
.L9:
	mov	r0, #0
	bl	sum_till_MAX
	str	r0, [fp, #-12]
	str	r1, [fp, #-8]
	ldr	r3, .L11
	ldr	r1, [r3]
	sub	r3, fp, #12
	ldmia	r3, {r2-r3}
	ldr	r0, .L11+12
	bl	printf
	mov	r3, #0
.L10:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L12:
	.align	2
.L11:
	.word	max_addend
	.word	stderr
	.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
