	.file	"75420.c"
	.intel_syntax noprefix
	.text
	.data
	.align 4
	.type	g, @object
	.size	g, 4
g:
	.long	5
	.section	.rodata
.LC0:
	.string	"mmapdemo.c"
.LC1:
	.string	"open() or fstat() failed.\n"
.LC2:
	.string	"%d\n"
.LC3:
	.string	"mmap(1) failed.\n"
	.align 8
.LC4:
	.string	"static: %p, heap: %p, stack: %p, mmap: %p\n"
.LC5:
	.string	"%d"
.LC6:
	.string	"mmap(2) failed.\n"
	.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, 192
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	esi, 0
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -184[rbp], eax
	cmp	DWORD PTR -184[rbp], 0
	js	.L2
	lea	rdx, -160[rbp]
	mov	eax, DWORD PTR -184[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	fstat@PLT
	test	eax, eax
	jns	.L3
.L2:
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 26
	mov	esi, 1
	lea	rdi, .LC1[rip]
	call	fwrite@PLT
	mov	eax, 1
	jmp	.L9
.L3:
	mov	rax, QWORD PTR -112[rbp]
	mov	DWORD PTR -180[rbp], eax
	mov	eax, DWORD PTR -180[rbp]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -180[rbp]
	cdqe
	mov	edx, DWORD PTR -184[rbp]
	mov	r9d, 0
	mov	r8d, edx
	mov	ecx, 2
	mov	edx, 1
	mov	rsi, rax
	mov	edi, 0
	call	mmap@PLT
	mov	QWORD PTR -176[rbp], rax
	cmp	QWORD PTR -176[rbp], -1
	jne	.L5
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 16
	mov	esi, 1
	lea	rdi, .LC3[rip]
	call	fwrite@PLT
	mov	eax, 1
	jmp	.L9
.L5:
	mov	edi, 4
	call	malloc@PLT
	mov	QWORD PTR -168[rbp], rax
	mov	rcx, QWORD PTR -176[rbp]
	lea	rdx, -160[rbp]
	mov	rax, QWORD PTR -168[rbp]
	mov	r8, rcx
	mov	rcx, rdx
	mov	rdx, rax
	lea	rsi, g[rip]
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -176[rbp]
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -188[rbp], 0
	jmp	.L6
.L7:
	mov	eax, DWORD PTR -188[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -176[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	edi, eax
	call	putchar@PLT
	add	DWORD PTR -188[rbp], 1
.L6:
	mov	eax, DWORD PTR -188[rbp]
	cmp	eax, DWORD PTR -180[rbp]
	jl	.L7
	mov	eax, DWORD PTR -180[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -176[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	munmap@PLT
	mov	eax, DWORD PTR -184[rbp]
	mov	edi, eax
	call	close@PLT
	mov	r9d, 0
	mov	r8d, -1
	mov	ecx, 34
	mov	edx, 3
	mov	esi, 32
	mov	edi, 0
	call	mmap@PLT
	mov	QWORD PTR -176[rbp], rax
	cmp	QWORD PTR -176[rbp], -1
	jne	.L8
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 16
	mov	esi, 1
	lea	rdi, .LC6[rip]
	call	fwrite@PLT
	mov	eax, 1
	jmp	.L9
.L8:
	mov	rax, QWORD PTR -176[rbp]
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rcx, QWORD PTR -176[rbp]
	lea	rdx, -160[rbp]
	mov	rax, QWORD PTR -168[rbp]
	mov	r8, rcx
	mov	rcx, rdx
	mov	rdx, rax
	lea	rsi, g[rip]
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -176[rbp]
	mov	DWORD PTR [rax], 1953723719
	mov	WORD PTR 4[rax], 121
	mov	rax, QWORD PTR -176[rbp]
	mov	rdi, rax
	call	puts@PLT
	mov	rax, QWORD PTR -176[rbp]
	mov	esi, 32
	mov	rdi, rax
	call	munmap@PLT
	mov	eax, 0
.L9:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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	"75420.c"
	.text
	.data
	.align	2
	.type	g, %object
	.size	g, 4
g:
	.word	5
	.section	.rodata
	.align	2
.LC0:
	.ascii	"mmapdemo.c\000"
	.align	2
.LC1:
	.ascii	"open() or fstat() failed.\012\000"
	.align	2
.LC2:
	.ascii	"%d\012\000"
	.align	2
.LC3:
	.ascii	"mmap(1) failed.\012\000"
	.align	2
.LC4:
	.ascii	"static: %p, heap: %p, stack: %p, mmap: %p\012\000"
	.align	2
.LC5:
	.ascii	"%d\000"
	.align	2
.LC6:
	.ascii	"mmap(2) failed.\012\000"
	.align	2
.LC7:
	.ascii	"Gusty\000"
	.align	2
.LC8:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 120
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #128
	ldr	r3, .L11
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r1, #0
	ldr	r0, .L11+4
	bl	open
	str	r0, [fp, #-116]
	ldr	r3, [fp, #-116]
	cmp	r3, #0
	blt	.L2
	sub	r3, fp, #100
	mov	r1, r3
	ldr	r0, [fp, #-116]
	bl	fstat
	mov	r3, r0
	cmp	r3, #0
	bge	.L3
.L2:
	ldr	r3, .L11+8
	ldr	r3, [r3]
	mov	r2, #26
	mov	r1, #1
	ldr	r0, .L11+12
	bl	fwrite
	mov	r3, #1
	b	.L9
.L3:
	ldr	r3, [fp, #-56]
	str	r3, [fp, #-112]
	ldr	r1, [fp, #-112]
	ldr	r0, .L11+16
	bl	printf
	ldr	r1, [fp, #-112]
	mov	r3, #0
	str	r3, [sp, #4]
	ldr	r3, [fp, #-116]
	str	r3, [sp]
	mov	r3, #2
	mov	r2, #1
	mov	r0, #0
	bl	mmap
	str	r0, [fp, #-108]
	ldr	r3, [fp, #-108]
	cmn	r3, #1
	bne	.L5
	ldr	r3, .L11+8
	ldr	r3, [r3]
	mov	r2, #16
	mov	r1, #1
	ldr	r0, .L11+20
	bl	fwrite
	mov	r3, #1
	b	.L9
.L5:
	mov	r0, #4
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-104]
	sub	r2, fp, #100
	ldr	r3, [fp, #-108]
	str	r3, [sp]
	mov	r3, r2
	ldr	r2, [fp, #-104]
	ldr	r1, .L11+24
	ldr	r0, .L11+28
	bl	printf
	ldr	r3, [fp, #-108]
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, .L11+32
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-120]
	b	.L6
.L7:
	ldr	r3, [fp, #-120]
	ldr	r2, [fp, #-108]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	bl	putchar
	ldr	r3, [fp, #-120]
	add	r3, r3, #1
	str	r3, [fp, #-120]
.L6:
	ldr	r2, [fp, #-120]
	ldr	r3, [fp, #-112]
	cmp	r2, r3
	blt	.L7
	ldr	r3, [fp, #-112]
	mov	r1, r3
	ldr	r0, [fp, #-108]
	bl	munmap
	ldr	r0, [fp, #-116]
	bl	close
	mov	r3, #0
	str	r3, [sp, #4]
	mvn	r3, #0
	str	r3, [sp]
	mov	r3, #34
	mov	r2, #3
	mov	r1, #32
	mov	r0, #0
	bl	mmap
	str	r0, [fp, #-108]
	ldr	r3, [fp, #-108]
	cmn	r3, #1
	bne	.L8
	ldr	r3, .L11+8
	ldr	r3, [r3]
	mov	r2, #16
	mov	r1, #1
	ldr	r0, .L11+36
	bl	fwrite
	mov	r3, #1
	b	.L9
.L8:
	ldr	r3, [fp, #-108]
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, .L11+16
	bl	printf
	sub	r2, fp, #100
	ldr	r3, [fp, #-108]
	str	r3, [sp]
	mov	r3, r2
	ldr	r2, [fp, #-104]
	ldr	r1, .L11+24
	ldr	r0, .L11+28
	bl	printf
	ldr	r3, [fp, #-108]
	ldr	r2, .L11+40
	mov	r0, r3
	mov	r1, r2
	mov	r3, #6
	mov	r2, r3
	bl	memcpy
	ldr	r0, [fp, #-108]
	bl	puts
	mov	r1, #32
	ldr	r0, [fp, #-108]
	bl	munmap
	mov	r3, #0
.L9:
	ldr	r2, .L11
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L10
	bl	__stack_chk_fail
.L10:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L12:
	.align	2
.L11:
	.word	.LC8
	.word	.LC0
	.word	stderr
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	g
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
