	.file	"522583.c"
	.intel_syntax noprefix
	.text
	.globl	bss_var
	.bss
	.align 4
	.type	bss_var, @object
	.size	bss_var, 4
bss_var:
	.zero	4
	.globl	data_var
	.data
	.align 4
	.type	data_var, @object
	.size	data_var, 4
data_var:
	.long	42
	.section	.rodata
.LC0:
	.string	"Text Locations - "
.LC1:
	.string	"\tAddress of main - %p\n"
.LC2:
	.string	"\tAddress of afunc - %p\n"
.LC3:
	.string	"Stack Locations - "
	.align 8
.LC4:
	.string	"\tStart of alloca()'ed array - %p\n"
	.align 8
.LC5:
	.string	"\tEnd of alloca()'ed array - %p\n"
.LC6:
	.string	"Data Locations - "
.LC7:
	.string	"\tAddress of data_var - %p\n"
.LC8:
	.string	"BSS Locations - "
.LC9:
	.string	"\tAddress of bss_var - %p\n"
.LC10:
	.string	"Heap Location - "
.LC11:
	.string	"\tInitial End of heap - %p\n"
.LC12:
	.string	"\tNew End of heap - %p\n"
	.text
	.globl	main
	.type	main, @function
main:
.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, 48
	mov	DWORD PTR -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdi, .LC0[rip]
	call	puts@PLT
	lea	rsi, main[rip]
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rsi, afunc[rip]
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC3[rip]
	call	puts@PLT
	call	afunc
	mov	eax, 16
	sub	rax, 1
	add	rax, 40
	mov	ecx, 16
	mov	edx, 0
	div	rcx
	imul	rax, rax, 16
	mov	rcx, rax
	and	rcx, -4096
	mov	rdx, rsp
	sub	rdx, rcx
.L2:
	cmp	rsp, rdx
	je	.L3
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	jmp	.L2
.L3:
	mov	rdx, rax
	and	edx, 4095
	sub	rsp, rdx
	mov	rdx, rax
	and	edx, 4095
	test	rdx, rdx
	je	.L4
	and	eax, 4095
	sub	rax, 8
	add	rax, rsp
	or	QWORD PTR [rax], 0
.L4:
	mov	rax, rsp
	add	rax, 15
	shr	rax, 4
	sal	rax, 4
	mov	QWORD PTR -24[rbp], rax
	cmp	QWORD PTR -24[rbp], 0
	je	.L5
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 31
	mov	rsi, rax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
.L5:
	lea	rdi, .LC6[rip]
	call	puts@PLT
	lea	rsi, data_var[rip]
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC8[rip]
	call	puts@PLT
	lea	rsi, bss_var[rip]
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC10[rip]
	call	puts@PLT
	mov	edi, 100
	call	malloc@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 0
	je	.L6
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rax
	lea	rdi, .LC11[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 99
	mov	rsi, rax
	lea	rdi, .LC12[rip]
	mov	eax, 0
	call	printf@PLT
.L6:
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC13:
	.string	"\tStack level %d, address of stack_var - %p\n"
	.text
	.globl	afunc
	.type	afunc, @function
afunc:
.LFB1:
	.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	eax, DWORD PTR level.0[rip]
	add	eax, 1
	mov	DWORD PTR level.0[rip], eax
	mov	eax, DWORD PTR level.0[rip]
	cmp	eax, 3
	je	.L13
	mov	eax, DWORD PTR level.0[rip]
	lea	rdx, -12[rbp]
	mov	esi, eax
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
	call	afunc
	jmp	.L9
.L13:
	nop
.L9:
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	afunc, .-afunc
	.local	level.0
	.comm	level.0,4,4
	.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	"522583.c"
	.text
	.comm	bss_var,4,4
	.global	data_var
	.data
	.align	2
	.type	data_var, %object
	.size	data_var, 4
data_var:
	.word	42
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Text Locations - \000"
	.align	2
.LC1:
	.ascii	"\011Address of main - %p\012\000"
	.align	2
.LC2:
	.ascii	"\011Address of afunc - %p\012\000"
	.align	2
.LC3:
	.ascii	"Stack Locations - \000"
	.align	2
.LC4:
	.ascii	"\011Start of alloca()'ed array - %p\012\000"
	.align	2
.LC5:
	.ascii	"\011End of alloca()'ed array - %p\012\000"
	.align	2
.LC6:
	.ascii	"Data Locations - \000"
	.align	2
.LC7:
	.ascii	"\011Address of data_var - %p\012\000"
	.align	2
.LC8:
	.ascii	"BSS Locations - \000"
	.align	2
.LC9:
	.ascii	"\011Address of bss_var - %p\012\000"
	.align	2
.LC10:
	.ascii	"Heap Location - \000"
	.align	2
.LC11:
	.ascii	"\011Initial End of heap - %p\012\000"
	.align	2
.LC12:
	.ascii	"\011New End of heap - %p\012\000"
	.align	2
.LC13:
	.word	__stack_chk_guard
	.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, .L6
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, .L6+4
	bl	puts
	ldr	r1, .L6+8
	ldr	r0, .L6+12
	bl	printf
	ldr	r1, .L6+16
	ldr	r0, .L6+20
	bl	printf
	ldr	r0, .L6+24
	bl	puts
	bl	afunc
	sub	sp, sp, #32
	mov	r3, sp
	add	r3, r3, #7
	lsr	r3, r3, #3
	lsl	r3, r3, #3
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	beq	.L2
	ldr	r1, [fp, #-16]
	ldr	r0, .L6+28
	bl	printf
	ldr	r3, [fp, #-16]
	add	r3, r3, #31
	mov	r1, r3
	ldr	r0, .L6+32
	bl	printf
.L2:
	ldr	r0, .L6+36
	bl	puts
	ldr	r1, .L6+40
	ldr	r0, .L6+44
	bl	printf
	ldr	r0, .L6+48
	bl	puts
	ldr	r1, .L6+52
	ldr	r0, .L6+56
	bl	printf
	ldr	r0, .L6+60
	bl	puts
	mov	r0, #100
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	beq	.L3
	ldr	r1, [fp, #-12]
	ldr	r0, .L6+64
	bl	printf
	ldr	r3, [fp, #-12]
	add	r3, r3, #99
	mov	r1, r3
	ldr	r0, .L6+68
	bl	printf
.L3:
	mov	r3, #0
	ldr	r2, .L6
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L5
	bl	__stack_chk_fail
.L5:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L7:
	.align	2
.L6:
	.word	.LC13
	.word	.LC0
	.word	main
	.word	.LC1
	.word	afunc
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	data_var
	.word	.LC7
	.word	.LC8
	.word	bss_var
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.size	main, .-main
	.section	.rodata
	.align	2
.LC14:
	.ascii	"\011Stack level %d, address of stack_var - %p\012\000"
	.align	2
.LC15:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	afunc
	.syntax unified
	.arm
	.fpu softvfp
	.type	afunc, %function
afunc:
	@ 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, .L13
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L13+4
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L13+4
	str	r3, [r2]
	ldr	r3, .L13+4
	ldr	r3, [r3]
	cmp	r3, #3
	beq	.L12
	ldr	r3, .L13+4
	ldr	r3, [r3]
	sub	r2, fp, #12
	mov	r1, r3
	ldr	r0, .L13+8
	bl	printf
	bl	afunc
	b	.L8
.L12:
	nop
.L8:
	ldr	r3, .L13
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L11
	bl	__stack_chk_fail
.L11:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L14:
	.align	2
.L13:
	.word	.LC15
	.word	level.4685
	.word	.LC14
	.size	afunc, .-afunc
	.local	level.4685
	.comm	level.4685,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
