	.file	"1541.c"
	.intel_syntax noprefix
	.text
	.globl	get_int
	.type	get_int, @function
get_int:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	nop
.L2:
	call	getchar@PLT
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], 32
	je	.L2
	cmp	DWORD PTR -12[rbp], 10
	je	.L2
	cmp	DWORD PTR -12[rbp], 45
	jne	.L3
	call	getchar@PLT
	mov	DWORD PTR -12[rbp], eax
	mov	eax, DWORD PTR -12[rbp]
	jmp	.L4
.L3:
	mov	eax, 0
.L4:
	mov	DWORD PTR -4[rbp], eax
	mov	DWORD PTR -8[rbp], 0
	jmp	.L5
.L7:
	mov	edx, DWORD PTR -8[rbp]
	mov	eax, edx
	sal	eax, 2
	add	eax, edx
	add	eax, eax
	mov	edx, eax
	mov	eax, DWORD PTR -12[rbp]
	sub	eax, 48
	add	eax, edx
	mov	DWORD PTR -8[rbp], eax
	call	getchar@PLT
	mov	DWORD PTR -12[rbp], eax
.L5:
	cmp	DWORD PTR -12[rbp], 47
	jle	.L6
	cmp	DWORD PTR -12[rbp], 57
	jle	.L7
.L6:
	cmp	DWORD PTR -4[rbp], 0
	je	.L8
	mov	eax, DWORD PTR -8[rbp]
	neg	eax
	jmp	.L9
.L8:
	mov	eax, DWORD PTR -8[rbp]
.L9:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	get_int, .-get_int
	.section	.rodata
.LC0:
	.string	"Teste %d\n"
.LC1:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.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
	lea	r11, -1998848[rsp]
.LPSRL0:
	sub	rsp, 4096
	or	DWORD PTR [rsp], 0
	cmp	rsp, r11
	jne	.LPSRL0
	sub	rsp, 1192
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -2000068[rbp], 1
.L25:
	mov	eax, 0
	call	get_int
	mov	r13d, eax
	mov	eax, 0
	call	get_int
	mov	r14d, eax
	test	r13d, r13d
	jne	.L11
	test	r14d, r14d
	je	.L30
.L11:
	mov	r12d, 0
	jmp	.L13
.L16:
	mov	ebx, 0
	jmp	.L14
.L15:
	mov	eax, 0
	call	get_int
	mov	edx, eax
	movsx	rcx, ebx
	movsx	rax, r12d
	imul	rax, rax, 1000
	add	rax, rcx
	mov	WORD PTR -2000064[rbp+rax*2], dx
	add	ebx, 1
.L14:
	cmp	ebx, r14d
	jl	.L15
	add	r12d, 1
.L13:
	cmp	r12d, r13d
	jl	.L16
	mov	r15d, 0
	mov	DWORD PTR -2000072[rbp], r15d
.L19:
	mov	eax, 0
	call	get_int
	mov	r12d, eax
	mov	eax, 0
	call	get_int
	mov	ebx, eax
	test	r12d, r12d
	jne	.L17
	test	ebx, ebx
	je	.L31
.L17:
	add	DWORD PTR -2000072[rbp], r12d
	sub	r15d, ebx
	jmp	.L19
.L31:
	nop
	mov	eax, DWORD PTR -2000068[rbp]
	lea	ecx, 1[rax]
	mov	DWORD PTR -2000068[rbp], ecx
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	r12d, 0
	jmp	.L20
.L24:
	mov	ebx, 0
	jmp	.L21
.L23:
	test	ebx, ebx
	je	.L22
	mov	edi, 32
	call	putchar@PLT
.L22:
	mov	eax, r12d
	sub	eax, r15d
	cdq
	idiv	r13d
	mov	eax, edx
	add	eax, r13d
	cdq
	idiv	r13d
	mov	esi, edx
	mov	eax, ebx
	sub	eax, DWORD PTR -2000072[rbp]
	cdq
	idiv	r14d
	mov	eax, edx
	add	eax, r14d
	cdq
	idiv	r14d
	mov	eax, edx
	movsx	rdx, eax
	movsx	rax, esi
	imul	rax, rax, 1000
	add	rax, rdx
	movzx	eax, WORD PTR -2000064[rbp+rax*2]
	cwde
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	add	ebx, 1
.L21:
	cmp	ebx, r14d
	jl	.L23
	mov	edi, 10
	call	putchar@PLT
	add	r12d, 1
.L20:
	cmp	r12d, r13d
	jl	.L24
	mov	edi, 10
	call	putchar@PLT
	jmp	.L25
.L30:
	nop
	mov	eax, 0
	mov	rcx, QWORD PTR -56[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L27
	call	__stack_chk_fail@PLT
.L27:
	add	rsp, 2000040
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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	"1541.c"
	.text
	.align	2
	.global	get_int
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_int, %function
get_int:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	nop
.L2:
	bl	getchar
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #32
	beq	.L2
	ldr	r3, [fp, #-16]
	cmp	r3, #10
	beq	.L2
	ldr	r3, [fp, #-16]
	cmp	r3, #45
	bne	.L3
	bl	getchar
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	b	.L4
.L3:
	mov	r3, #0
.L4:
	str	r3, [fp, #-8]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L5
.L7:
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #1
	mov	r2, r3
	ldr	r3, [fp, #-16]
	sub	r3, r3, #48
	add	r3, r2, r3
	str	r3, [fp, #-12]
	bl	getchar
	str	r0, [fp, #-16]
.L5:
	ldr	r3, [fp, #-16]
	cmp	r3, #47
	ble	.L6
	ldr	r3, [fp, #-16]
	cmp	r3, #57
	ble	.L7
.L6:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L8
	ldr	r3, [fp, #-12]
	rsb	r3, r3, #0
	b	.L9
.L8:
	ldr	r3, [fp, #-12]
.L9:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	get_int, .-get_int
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Teste %d\012\000"
	.global	__aeabi_idivmod
	.align	2
.LC1:
	.ascii	"%d\000"
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 2000016
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	add	fp, sp, #32
	sub	sp, sp, #1998848
	sub	sp, sp, #1168
	sub	sp, sp, #4
	ldr	r3, .L32
	ldr	r3, [r3]
	str	r3, [fp, #-40]
	mov	r3,#0
	mov	r3, #1
	sub	r2, fp, #1998848
	sub	r2, r2, #1200
	str	r3, [r2]
.L25:
	bl	get_int
	mov	r6, r0
	bl	get_int
	mov	r7, r0
	cmp	r6, #0
	bne	.L11
	cmp	r7, #0
	beq	.L30
.L11:
	mov	r4, #0
	b	.L13
.L16:
	mov	r5, #0
	b	.L14
.L15:
	bl	get_int
	mov	r3, r0
	lsl	r3, r3, #16
	asr	r1, r3, #16
	sub	r3, fp, #1998848
	sub	r3, r3, #36
	sub	r2, r3, #1152
	sub	r2, r2, #4
	mov	r3, r4
	lsl	r3, r3, #5
	sub	r3, r3, r4
	lsl	r3, r3, #2
	add	r3, r3, r4
	lsl	r3, r3, #3
	add	r3, r3, r5
	lsl	r3, r3, #1
	add	r3, r2, r3
	strh	r1, [r3]	@ movhi
	add	r5, r5, #1
.L14:
	cmp	r5, r7
	blt	.L15
	add	r4, r4, #1
.L13:
	cmp	r4, r6
	blt	.L16
	mov	r8, #0
	mov	r9, r8
.L19:
	bl	get_int
	mov	r5, r0
	bl	get_int
	mov	r4, r0
	cmp	r5, #0
	bne	.L17
	cmp	r4, #0
	beq	.L31
.L17:
	add	r9, r9, r5
	sub	r8, r8, r4
	b	.L19
.L31:
	nop
	sub	r3, fp, #1998848
	sub	r3, r3, #1200
	ldr	r3, [r3]
	add	r2, r3, #1
	sub	r1, fp, #1998848
	sub	r1, r1, #1200
	str	r2, [r1]
	mov	r1, r3
	ldr	r0, .L32+4
	bl	printf
	mov	r4, #0
	b	.L20
.L24:
	mov	r5, #0
	b	.L21
.L23:
	cmp	r5, #0
	beq	.L22
	mov	r0, #32
	bl	putchar
.L22:
	sub	r3, r4, r8
	mov	r1, r6
	mov	r0, r3
	bl	__aeabi_idivmod
	mov	r3, r1
	add	r3, r6, r3
	mov	r1, r6
	mov	r0, r3
	bl	__aeabi_idivmod
	mov	r3, r1
	mov	r10, r3
	sub	r3, r5, r9
	mov	r1, r7
	mov	r0, r3
	bl	__aeabi_idivmod
	mov	r3, r1
	add	r3, r7, r3
	mov	r1, r7
	mov	r0, r3
	bl	__aeabi_idivmod
	mov	r3, r1
	mov	r1, r3
	sub	r3, fp, #1998848
	sub	r3, r3, #36
	sub	r2, r3, #1152
	sub	r2, r2, #4
	mov	r3, r10
	lsl	r3, r3, #5
	sub	r3, r3, r10
	lsl	r3, r3, #2
	add	r3, r3, r10
	lsl	r3, r3, #3
	add	r3, r3, r1
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrsh	r3, [r3]
	mov	r1, r3
	ldr	r0, .L32+8
	bl	printf
	add	r5, r5, #1
.L21:
	cmp	r5, r7
	blt	.L23
	mov	r0, #10
	bl	putchar
	add	r4, r4, #1
.L20:
	cmp	r4, r6
	blt	.L24
	mov	r0, #10
	bl	putchar
	b	.L25
.L30:
	nop
	mov	r3, #0
	ldr	r2, .L32
	ldr	r1, [r2]
	ldr	r2, [fp, #-40]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L27
	bl	__stack_chk_fail
.L27:
	mov	r0, r3
	sub	sp, fp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L33:
	.align	2
.L32:
	.word	.LC2
	.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
