	.file	"80458.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"\t[+] allocating %d bytes of memory on the heap for char_ptr\n"
.LC1:
	.string	"char_ptr (%p) --> '%s'\n"
	.align 8
.LC2:
	.string	"\t[+] allocating 12 bytes of memory on the heap for int_ptr"
.LC3:
	.string	"int_ptr (%p) --> %d\n"
	.align 8
.LC4:
	.string	"\t[-] freeing char_ptr's heap memory..."
	.align 8
.LC5:
	.string	"\t[+] allocating another 15 bytes for char_ptr"
	.align 8
.LC6:
	.string	"\t[-] freeing int_ptr's heap memory..."
	.text
	.globl	main
	.type	main, @function
main:
.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	DWORD PTR -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	cmp	DWORD PTR -36[rbp], 1
	jg	.L2
	mov	DWORD PTR -20[rbp], 50
	jmp	.L3
.L2:
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -20[rbp], eax
.L3:
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -20[rbp]
	mov	edi, eax
	call	errorchecked_malloc
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	movabs	rsi, 7882826708924590164
	movabs	rdi, 7791354250704548463
	mov	QWORD PTR [rax], rsi
	mov	QWORD PTR 8[rax], rdi
	movabs	rsi, 8007510524371755887
	movabs	rdi, 7307126015324856430
	mov	QWORD PTR 16[rax], rsi
	mov	QWORD PTR 24[rax], rdi
	mov	DWORD PTR 32[rax], 3043425
	mov	rdx, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC2[rip]
	call	puts@PLT
	mov	edi, 12
	call	errorchecked_malloc
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR [rax], 31337
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC4[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	free@PLT
	lea	rdi, .LC5[rip]
	call	puts@PLT
	mov	edi, 15
	call	errorchecked_malloc
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	movabs	rcx, 8029185230041998702
	mov	QWORD PTR [rax], rcx
	mov	WORD PTR 8[rax], 31090
	mov	BYTE PTR 10[rax], 0
	mov	rdx, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC6[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	free@PLT
	lea	rdi, .LC4[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC7:
	.string	"Error: could not allocate heap memory.\n"
	.text
	.globl	errorchecked_malloc
	.type	errorchecked_malloc, @function
errorchecked_malloc:
.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 -20[rbp]
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L6
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 39
	mov	esi, 1
	lea	rdi, .LC7[rip]
	call	fwrite@PLT
	mov	edi, -1
	call	exit@PLT
.L6:
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	errorchecked_malloc, .-errorchecked_malloc
	.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	"80458.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"\011[+] allocating %d bytes of memory on the heap f"
	.ascii	"or char_ptr\012\000"
	.align	2
.LC1:
	.ascii	"This memory is located on the heap.\000"
	.align	2
.LC2:
	.ascii	"char_ptr (%p) --> '%s'\012\000"
	.align	2
.LC3:
	.ascii	"\011[+] allocating 12 bytes of memory on the heap f"
	.ascii	"or int_ptr\000"
	.align	2
.LC4:
	.ascii	"int_ptr (%p) --> %d\012\000"
	.align	2
.LC5:
	.ascii	"\011[-] freeing char_ptr's heap memory...\000"
	.align	2
.LC6:
	.ascii	"\011[+] allocating another 15 bytes for char_ptr\000"
	.align	2
.LC7:
	.ascii	"new memory\000"
	.align	2
.LC8:
	.ascii	"\011[-] freeing int_ptr's heap memory...\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ 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]
	str	r1, [fp, #-28]
	ldr	r3, [fp, #-24]
	cmp	r3, #1
	bgt	.L2
	mov	r3, #50
	str	r3, [fp, #-16]
	b	.L3
.L2:
	ldr	r3, [fp, #-28]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-16]
.L3:
	ldr	r1, [fp, #-16]
	ldr	r0, .L5
	bl	printf
	ldr	r3, [fp, #-16]
	mov	r0, r3
	bl	errorchecked_malloc
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	ldr	r2, .L5+4
	mov	r0, r3
	mov	r1, r2
	mov	r3, #36
	mov	r2, r3
	bl	memcpy
	ldr	r2, [fp, #-12]
	ldr	r1, [fp, #-12]
	ldr	r0, .L5+8
	bl	printf
	ldr	r0, .L5+12
	bl	puts
	mov	r0, #12
	bl	errorchecked_malloc
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r2, .L5+16
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, [fp, #-8]
	ldr	r0, .L5+20
	bl	printf
	ldr	r0, .L5+24
	bl	puts
	ldr	r0, [fp, #-12]
	bl	free
	ldr	r0, .L5+28
	bl	puts
	mov	r0, #15
	bl	errorchecked_malloc
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	ldr	r2, .L5+32
	mov	r0, r3
	mov	r1, r2
	mov	r3, #11
	mov	r2, r3
	bl	memcpy
	ldr	r2, [fp, #-12]
	ldr	r1, [fp, #-12]
	ldr	r0, .L5+8
	bl	printf
	ldr	r0, .L5+36
	bl	puts
	ldr	r0, [fp, #-8]
	bl	free
	ldr	r0, .L5+24
	bl	puts
	ldr	r0, [fp, #-12]
	bl	free
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L6:
	.align	2
.L5:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	31337
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.size	main, .-main
	.section	.rodata
	.align	2
.LC9:
	.ascii	"Error: could not allocate heap memory.\012\000"
	.text
	.align	2
	.global	errorchecked_malloc
	.syntax unified
	.arm
	.fpu softvfp
	.type	errorchecked_malloc, %function
errorchecked_malloc:
	@ 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	r0, [fp, #-16]
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L8
	ldr	r3, .L10
	ldr	r3, [r3]
	mov	r2, #39
	mov	r1, #1
	ldr	r0, .L10+4
	bl	fwrite
	mvn	r0, #0
	bl	exit
.L8:
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L11:
	.align	2
.L10:
	.word	stderr
	.word	.LC9
	.size	errorchecked_malloc, .-errorchecked_malloc
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
