	.file	"870143.c"
	.intel_syntax noprefix
	.text
	.globl	heap
	.bss
	.align 8
	.type	heap, @object
	.size	heap, 8
heap:
	.zero	8
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.section	.rodata
.LC0:
	.string	"heap: "
.LC1:
	.string	"%d "
	.text
	.globl	print_heap
	.type	print_heap, @function
print_heap:
.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, 16
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -4[rbp], 1
	jmp	.L2
.L3:
	mov	rdx, QWORD PTR heap[rip]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -4[rbp], 1
.L2:
	mov	eax, DWORD PTR n[rip]
	cmp	DWORD PTR -4[rbp], eax
	jle	.L3
	mov	edi, 10
	call	putchar@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	print_heap, .-print_heap
	.section	.rodata
.LC2:
	.string	"increased n: %d, i: %d\n"
	.text
	.globl	insert_heap
	.type	insert_heap, @function
insert_heap:
.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	eax, DWORD PTR n[rip]
	add	eax, 1
	mov	DWORD PTR n[rip], eax
	mov	eax, DWORD PTR n[rip]
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR n[rip]
	mov	edx, DWORD PTR -4[rbp]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L5
.L7:
	mov	rdx, QWORD PTR heap[rip]
	mov	eax, DWORD PTR -4[rbp]
	mov	ecx, eax
	shr	ecx, 31
	add	eax, ecx
	sar	eax
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	rcx, QWORD PTR heap[rip]
	mov	edx, DWORD PTR -4[rbp]
	movsx	rdx, edx
	sal	rdx, 2
	add	rdx, rcx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR [rdx], eax
	mov	eax, DWORD PTR -4[rbp]
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	mov	DWORD PTR -4[rbp], eax
.L5:
	mov	rdx, QWORD PTR heap[rip]
	mov	eax, DWORD PTR -4[rbp]
	mov	ecx, eax
	shr	ecx, 31
	add	eax, ecx
	sar	eax
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -20[rbp], eax
	jle	.L6
	cmp	DWORD PTR -4[rbp], 1
	jne	.L7
.L6:
	mov	rdx, QWORD PTR heap[rip]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	sal	rax, 2
	add	rdx, rax
	mov	eax, DWORD PTR -20[rbp]
	mov	DWORD PTR [rdx], eax
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	insert_heap, .-insert_heap
	.globl	pop_from_heap
	.type	pop_from_heap, @function
pop_from_heap:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -12[rbp], 1
	mov	DWORD PTR -8[rbp], 2
	mov	eax, DWORD PTR n[rip]
	sub	eax, 1
	mov	DWORD PTR n[rip], eax
	mov	rdx, QWORD PTR heap[rip]
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -4[rbp], eax
	jmp	.L9
.L13:
	mov	eax, DWORD PTR n[rip]
	cmp	DWORD PTR -8[rbp], eax
	jge	.L10
	mov	rdx, QWORD PTR heap[rip]
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	rcx, QWORD PTR heap[rip]
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	add	rax, 1
	sal	rax, 2
	add	rax, rcx
	mov	eax, DWORD PTR [rax]
	cmp	edx, eax
	jge	.L10
	add	DWORD PTR -8[rbp], 1
.L10:
	mov	rdx, QWORD PTR heap[rip]
	mov	eax, DWORD PTR n[rip]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	rcx, QWORD PTR heap[rip]
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	sal	rax, 2
	add	rax, rcx
	mov	eax, DWORD PTR [rax]
	cmp	edx, eax
	jge	.L15
	mov	rdx, QWORD PTR heap[rip]
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	rcx, QWORD PTR heap[rip]
	mov	edx, DWORD PTR -12[rbp]
	movsx	rdx, edx
	sal	rdx, 2
	add	rdx, rcx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR [rdx], eax
	mov	eax, DWORD PTR -8[rbp]
	mov	DWORD PTR -12[rbp], eax
	sal	DWORD PTR -8[rbp]
.L9:
	mov	eax, DWORD PTR n[rip]
	cmp	DWORD PTR -8[rbp], eax
	jle	.L13
	jmp	.L12
.L15:
	nop
.L12:
	mov	rdx, QWORD PTR heap[rip]
	mov	eax, DWORD PTR n[rip]
	cdqe
	add	rax, 1
	sal	rax, 2
	add	rax, rdx
	mov	rcx, QWORD PTR heap[rip]
	mov	edx, DWORD PTR -12[rbp]
	movsx	rdx, edx
	sal	rdx, 2
	add	rdx, rcx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR [rdx], eax
	mov	eax, DWORD PTR -4[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	pop_from_heap, .-pop_from_heap
	.globl	change_priority
	.type	change_priority, @function
change_priority:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -4[rbp], edi
	mov	DWORD PTR -8[rbp], esi
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	change_priority, .-change_priority
	.section	.rodata
.LC3:
	.string	"ans: %d "
	.text
	.globl	main
	.type	main, @function
main:
.LFB10:
	.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
	mov	DWORD PTR n[rip], 0
	mov	edi, 200
	call	malloc@PLT
	mov	QWORD PTR heap[rip], rax
	mov	edi, 1
	call	insert_heap
	mov	eax, 0
	call	print_heap
	mov	edi, 3
	call	insert_heap
	mov	eax, 0
	call	print_heap
	mov	edi, 5
	call	insert_heap
	mov	eax, 0
	call	print_heap
	mov	edi, 2
	call	insert_heap
	mov	eax, 0
	call	print_heap
	mov	edi, 4
	call	insert_heap
	mov	eax, 0
	call	print_heap
	mov	edi, 6
	call	insert_heap
	mov	eax, 0
	call	print_heap
	mov	eax, 0
	call	pop_from_heap
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	call	print_heap
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.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	"870143.c"
	.text
	.comm	heap,4,4
	.comm	n,4,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"heap: \000"
	.align	2
.LC1:
	.ascii	"%d \000"
	.text
	.align	2
	.global	print_heap
	.syntax unified
	.arm
	.fpu softvfp
	.type	print_heap, %function
print_heap:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	ldr	r0, .L4
	bl	printf
	mov	r3, #1
	str	r3, [fp, #-8]
	b	.L2
.L3:
	ldr	r3, .L4+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L4+8
	bl	printf
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L2:
	ldr	r3, .L4+12
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	ble	.L3
	mov	r0, #10
	bl	putchar
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L5:
	.align	2
.L4:
	.word	.LC0
	.word	heap
	.word	.LC1
	.word	n
	.size	print_heap, .-print_heap
	.section	.rodata
	.align	2
.LC2:
	.ascii	"increased n: %d, i: %d\012\000"
	.text
	.align	2
	.global	insert_heap
	.syntax unified
	.arm
	.fpu softvfp
	.type	insert_heap, %function
insert_heap:
	@ 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]
	ldr	r3, .L10
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L10
	str	r3, [r2]
	ldr	r3, .L10
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	ldr	r3, .L10
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	mov	r1, r3
	ldr	r0, .L10+4
	bl	printf
	b	.L7
.L9:
	ldr	r3, .L10+8
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	lsr	r1, r3, #31
	add	r3, r1, r3
	asr	r3, r3, #1
	lsl	r3, r3, #2
	add	r2, r2, r3
	ldr	r3, .L10+8
	ldr	r1, [r3]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r2, [r2]
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	str	r3, [fp, #-8]
.L7:
	ldr	r3, .L10+8
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	lsr	r1, r3, #31
	add	r3, r1, r3
	asr	r3, r3, #1
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	ble	.L8
	ldr	r3, [fp, #-8]
	cmp	r3, #1
	bne	.L9
.L8:
	ldr	r3, .L10+8
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [fp, #-16]
	str	r2, [r3]
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L11:
	.align	2
.L10:
	.word	n
	.word	.LC2
	.word	heap
	.size	insert_heap, .-insert_heap
	.align	2
	.global	pop_from_heap
	.syntax unified
	.arm
	.fpu softvfp
	.type	pop_from_heap, %function
pop_from_heap:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	mov	r3, #1
	str	r3, [fp, #-16]
	mov	r3, #2
	str	r3, [fp, #-12]
	ldr	r3, .L20
	ldr	r3, [r3]
	sub	r3, r3, #1
	ldr	r2, .L20
	str	r3, [r2]
	ldr	r3, .L20+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	b	.L13
.L17:
	ldr	r3, .L20
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	bge	.L14
	ldr	r3, .L20+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, .L20+4
	ldr	r1, [r3]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r3, [r3]
	cmp	r2, r3
	bge	.L14
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L14:
	ldr	r3, .L20+4
	ldr	r2, [r3]
	ldr	r3, .L20
	ldr	r3, [r3]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, .L20+4
	ldr	r1, [r3]
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r3, [r3]
	cmp	r2, r3
	bge	.L19
	ldr	r3, .L20+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	add	r2, r2, r3
	ldr	r3, .L20+4
	ldr	r1, [r3]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r2, [r2]
	str	r2, [r3]
	ldr	r3, [fp, #-12]
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #1
	str	r3, [fp, #-12]
.L13:
	ldr	r3, .L20
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	ble	.L17
	b	.L16
.L19:
	nop
.L16:
	ldr	r3, .L20+4
	ldr	r2, [r3]
	ldr	r3, .L20
	ldr	r3, [r3]
	add	r3, r3, #1
	lsl	r3, r3, #2
	add	r2, r2, r3
	ldr	r3, .L20+4
	ldr	r1, [r3]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r2, [r2]
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L21:
	.align	2
.L20:
	.word	n
	.word	heap
	.size	pop_from_heap, .-pop_from_heap
	.align	2
	.global	change_priority
	.syntax unified
	.arm
	.fpu softvfp
	.type	change_priority, %function
change_priority:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	change_priority, .-change_priority
	.section	.rodata
	.align	2
.LC3:
	.ascii	"ans: %d \000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	ldr	r3, .L26
	mov	r2, #0
	str	r2, [r3]
	mov	r0, #200
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L26+4
	str	r2, [r3]
	mov	r0, #1
	bl	insert_heap
	bl	print_heap
	mov	r0, #3
	bl	insert_heap
	bl	print_heap
	mov	r0, #5
	bl	insert_heap
	bl	print_heap
	mov	r0, #2
	bl	insert_heap
	bl	print_heap
	mov	r0, #4
	bl	insert_heap
	bl	print_heap
	mov	r0, #6
	bl	insert_heap
	bl	print_heap
	bl	pop_from_heap
	str	r0, [fp, #-8]
	ldr	r1, [fp, #-8]
	ldr	r0, .L26+8
	bl	printf
	bl	print_heap
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L27:
	.align	2
.L26:
	.word	n
	.word	heap
	.word	.LC3
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
