	.file	"630137.c"
	.intel_syntax noprefix
	.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
	mov	eax, 0
	call	testPointer
	mov	eax, 0
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
.LC0:
	.string	"test1"
.LC1:
	.string	"NULL oops!"
.LC2:
	.string	"The base address is %X\n"
.LC3:
	.string	"%X\n"
	.text
	.type	readPointer, @function
readPointer:
.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, 16
	mov	esi, 0
	lea	rdi, .LC0[rip]
	call	openPointer
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L4
	lea	rdi, .LC1[rip]
	call	puts@PLT
	jmp	.L3
.L4:
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -12[rbp], 0
	jmp	.L6
.L7:
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -12[rbp], 1
.L6:
	cmp	DWORD PTR -12[rbp], 9
	jle	.L7
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	closePointer
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	readPointer, .-readPointer
	.section	.rodata
.LC4:
	.string	"%d\n"
	.text
	.type	testPointer, @function
testPointer:
.LFB8:
	.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	esi, 1
	lea	rdi, .LC0[rip]
	call	openPointer
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L9
	lea	rdi, .LC1[rip]
	call	puts@PLT
	jmp	.L8
.L9:
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -12[rbp], 0
	jmp	.L11
.L12:
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -8[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -12[rbp]
	mov	DWORD PTR [rdx], eax
	add	DWORD PTR -12[rbp], 1
.L11:
	cmp	DWORD PTR -12[rbp], 9
	jle	.L12
	mov	DWORD PTR -12[rbp], 0
	jmp	.L13
.L14:
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -12[rbp], 1
.L13:
	cmp	DWORD PTR -12[rbp], 9
	jle	.L14
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	closePointer
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	testPointer, .-testPointer
	.type	openPointer, @function
openPointer:
.LFB9:
	.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	QWORD PTR -40[rbp], rdi
	mov	DWORD PTR -44[rbp], esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -24[rbp], 0
	mov	WORD PTR -10[rbp], 88
	cmp	QWORD PTR -40[rbp], 0
	jne	.L16
	mov	eax, 0
	jmp	.L20
.L16:
	mov	rax, QWORD PTR -40[rbp]
	mov	edx, 448
	mov	esi, 578
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -28[rbp], eax
	cmp	DWORD PTR -28[rbp], 0
	jns	.L18
	mov	eax, 0
	jmp	.L20
.L18:
	mov	eax, DWORD PTR -28[rbp]
	mov	edx, 0
	mov	esi, 1023
	mov	edi, eax
	call	lseek@PLT
	lea	rcx, -10[rbp]
	mov	eax, DWORD PTR -28[rbp]
	mov	edx, 1
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	r9d, 0
	mov	r8d, -1
	mov	ecx, 34
	mov	edx, 3
	mov	esi, 1023
	mov	edi, 0
	call	mmap@PLT
	mov	QWORD PTR -24[rbp], rax
	cmp	QWORD PTR -24[rbp], -1
	jne	.L19
	mov	eax, DWORD PTR -28[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
	jmp	.L20
.L19:
	mov	eax, DWORD PTR -28[rbp]
	mov	edi, eax
	call	close@PLT
	mov	rax, QWORD PTR -24[rbp]
.L20:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	openPointer, .-openPointer
	.type	closePointer, @function
closePointer:
.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	QWORD PTR -8[rbp], rdi
	cmp	QWORD PTR -8[rbp], 0
	je	.L24
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, 1024
	mov	rdi, rax
	call	munmap@PLT
.L24:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	closePointer, .-closePointer
	.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	"630137.c"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	bl	testPointer
	mov	r3, #0
	mov	r0, r3
	pop	{fp, pc}
	.size	main, .-main
	.section	.rodata
	.align	2
.LC0:
	.ascii	"test1\000"
	.align	2
.LC1:
	.ascii	"NULL oops!\000"
	.align	2
.LC2:
	.ascii	"The base address is %X\012\000"
	.align	2
.LC3:
	.ascii	"%X\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	readPointer, %function
readPointer:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	mov	r1, #0
	ldr	r0, .L8
	bl	openPointer
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L4
	ldr	r0, .L8+4
	bl	puts
	b	.L3
.L4:
	ldr	r3, [fp, #-8]
	mov	r1, r3
	ldr	r0, .L8+8
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L6
.L7:
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-8]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L8+12
	bl	printf
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L6:
	ldr	r3, [fp, #-12]
	cmp	r3, #9
	ble	.L7
	ldr	r0, [fp, #-8]
	bl	closePointer
.L3:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L9:
	.align	2
.L8:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.size	readPointer, .-readPointer
	.section	.rodata
	.align	2
.LC4:
	.ascii	"%d\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	testPointer, %function
testPointer:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	mov	r1, #1
	ldr	r0, .L17
	bl	openPointer
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L11
	ldr	r0, .L17+4
	bl	puts
	b	.L10
.L11:
	ldr	r3, [fp, #-8]
	mov	r1, r3
	ldr	r0, .L17+8
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L13
.L14:
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-8]
	add	r3, r2, r3
	ldr	r2, [fp, #-12]
	str	r2, [r3]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L13:
	ldr	r3, [fp, #-12]
	cmp	r3, #9
	ble	.L14
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L15
.L16:
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-8]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L17+12
	bl	printf
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L15:
	ldr	r3, [fp, #-12]
	cmp	r3, #9
	ble	.L16
	ldr	r0, [fp, #-8]
	bl	closePointer
.L10:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L18:
	.align	2
.L17:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC4
	.size	testPointer, .-testPointer
	.section	.rodata
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	openPointer, %function
openPointer:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldr	r3, .L26
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-20]
	mov	r3, #88
	strh	r3, [fp, #-12]	@ movhi
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bne	.L20
	mov	r3, #0
	b	.L24
.L20:
	mov	r2, #448
	ldr	r1, .L26+4
	ldr	r0, [fp, #-24]
	bl	open
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bge	.L22
	mov	r3, #0
	b	.L24
.L22:
	mov	r2, #0
	ldr	r1, .L26+8
	ldr	r0, [fp, #-16]
	bl	lseek
	sub	r3, fp, #12
	mov	r2, #1
	mov	r1, r3
	ldr	r0, [fp, #-16]
	bl	write
	mov	r3, #0
	str	r3, [sp, #4]
	mvn	r3, #0
	str	r3, [sp]
	mov	r3, #34
	mov	r2, #3
	ldr	r1, .L26+8
	mov	r0, #0
	bl	mmap
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmn	r3, #1
	bne	.L23
	ldr	r0, [fp, #-16]
	bl	close
	mov	r3, #0
	b	.L24
.L23:
	ldr	r0, [fp, #-16]
	bl	close
	ldr	r3, [fp, #-20]
.L24:
	ldr	r2, .L26
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L25
	bl	__stack_chk_fail
.L25:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L27:
	.align	2
.L26:
	.word	.LC5
	.word	578
	.word	1023
	.size	openPointer, .-openPointer
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	closePointer, %function
closePointer:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L30
	mov	r1, #1024
	ldr	r0, [fp, #-8]
	bl	munmap
.L30:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	closePointer, .-closePointer
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
