	.file	"320114.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"r"
.LC1:
	.string	"./in1"
	.align 8
.LC2:
	.string	"\nFailed : Unable to read this file : %s.\n"
.LC3:
	.string	"Failed "
	.align 8
.LC4:
	.string	"\nSuccess : The file in1 was opened twice : f's are %d and %d.\n"
	.align 8
.LC5:
	.string	"\nFailed : Unable to close this file : %s.\n"
	.align 8
.LC6:
	.string	"\nSuccess : Both f's were closed."
	.align 8
.LC7:
	.string	"\nSuccess : The file in1 was reopened into f_2 : %d.\n"
	.align 8
.LC8:
	.string	"\nSuccess : f_2 was closed.  Now, we will call fclose(f_2) again."
.LC9:
	.string	"This should cause an error."
	.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
	push	rbx
	sub	rsp, 24
	.cfi_offset 3, -24
	lea	rsi, .LC0[rip]
	lea	rdi, .LC1[rip]
	call	fopen@PLT
	mov	QWORD PTR -32[rbp], rax
	cmp	QWORD PTR -32[rbp], 0
	jne	.L2
	mov	rax, QWORD PTR stderr[rip]
	lea	rdx, .LC1[rip]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	lea	rdi, .LC3[rip]
	call	perror@PLT
	mov	eax, 1
	jmp	.L3
.L2:
	lea	rsi, .LC0[rip]
	lea	rdi, .LC1[rip]
	call	fopen@PLT
	mov	QWORD PTR -24[rbp], rax
	cmp	QWORD PTR -24[rbp], 0
	jne	.L4
	mov	rax, QWORD PTR stderr[rip]
	lea	rdx, .LC1[rip]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	lea	rdi, .LC3[rip]
	call	perror@PLT
	mov	eax, 1
	jmp	.L3
.L4:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	fileno@PLT
	mov	ebx, eax
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	fileno@PLT
	mov	edx, ebx
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	fclose@PLT
	test	eax, eax
	je	.L5
	mov	rax, QWORD PTR stderr[rip]
	lea	rdx, .LC1[rip]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	lea	rdi, .LC3[rip]
	call	perror@PLT
	mov	eax, 1
	jmp	.L3
.L5:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	fclose@PLT
	test	eax, eax
	je	.L6
	mov	rax, QWORD PTR stderr[rip]
	lea	rdx, .LC1[rip]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	lea	rdi, .LC3[rip]
	call	perror@PLT
	mov	eax, 1
	jmp	.L3
.L6:
	lea	rdi, .LC6[rip]
	call	puts@PLT
	lea	rsi, .LC0[rip]
	lea	rdi, .LC1[rip]
	call	fopen@PLT
	mov	QWORD PTR -24[rbp], rax
	cmp	QWORD PTR -24[rbp], 0
	jne	.L7
	mov	rax, QWORD PTR stderr[rip]
	lea	rdx, .LC1[rip]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	lea	rdi, .LC3[rip]
	call	perror@PLT
	mov	eax, 1
	jmp	.L3
.L7:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	fileno@PLT
	mov	esi, eax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	fclose@PLT
	test	eax, eax
	je	.L8
	mov	rax, QWORD PTR stderr[rip]
	lea	rdx, .LC1[rip]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	lea	rdi, .LC3[rip]
	call	perror@PLT
	mov	eax, 1
	jmp	.L3
.L8:
	lea	rdi, .LC8[rip]
	call	puts@PLT
	lea	rdi, .LC9[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	fclose@PLT
	test	eax, eax
	je	.L9
	mov	rax, QWORD PTR stderr[rip]
	lea	rdx, .LC1[rip]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	lea	rdi, .LC3[rip]
	call	perror@PLT
	mov	eax, 1
	jmp	.L3
.L9:
	mov	eax, 0
.L3:
	mov	rbx, QWORD PTR -8[rbp]
	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	"320114.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"r\000"
	.align	2
.LC1:
	.ascii	"./in1\000"
	.align	2
.LC2:
	.ascii	"\012Failed : Unable to read this file : %s.\012\000"
	.align	2
.LC3:
	.ascii	"Failed \000"
	.align	2
.LC4:
	.ascii	"\012Success : The file in1 was opened twice : f's a"
	.ascii	"re %d and %d.\012\000"
	.align	2
.LC5:
	.ascii	"\012Failed : Unable to close this file : %s.\012\000"
	.align	2
.LC6:
	.ascii	"\012Success : Both f's were closed.\000"
	.align	2
.LC7:
	.ascii	"\012Success : The file in1 was reopened into f_2 : "
	.ascii	"%d.\012\000"
	.align	2
.LC8:
	.ascii	"\012Success : f_2 was closed.  Now, we will call fc"
	.ascii	"lose(f_2) again.\000"
	.align	2
.LC9:
	.ascii	"This should cause an error.\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	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #12
	ldr	r1, .L10
	ldr	r0, .L10+4
	bl	fopen
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L2
	ldr	r3, .L10+8
	ldr	r3, [r3]
	ldr	r2, .L10+4
	ldr	r1, .L10+12
	mov	r0, r3
	bl	fprintf
	ldr	r0, .L10+16
	bl	perror
	mov	r3, #1
	b	.L3
.L2:
	ldr	r1, .L10
	ldr	r0, .L10+4
	bl	fopen
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L4
	ldr	r3, .L10+8
	ldr	r3, [r3]
	ldr	r2, .L10+4
	ldr	r1, .L10+12
	mov	r0, r3
	bl	fprintf
	ldr	r0, .L10+16
	bl	perror
	mov	r3, #1
	b	.L3
.L4:
	ldr	r0, [fp, #-20]
	bl	fileno
	mov	r4, r0
	ldr	r0, [fp, #-16]
	bl	fileno
	mov	r3, r0
	mov	r2, r3
	mov	r1, r4
	ldr	r0, .L10+20
	bl	printf
	ldr	r0, [fp, #-20]
	bl	fclose
	mov	r3, r0
	cmp	r3, #0
	beq	.L5
	ldr	r3, .L10+8
	ldr	r3, [r3]
	ldr	r2, .L10+4
	ldr	r1, .L10+24
	mov	r0, r3
	bl	fprintf
	ldr	r0, .L10+16
	bl	perror
	mov	r3, #1
	b	.L3
.L5:
	ldr	r0, [fp, #-16]
	bl	fclose
	mov	r3, r0
	cmp	r3, #0
	beq	.L6
	ldr	r3, .L10+8
	ldr	r3, [r3]
	ldr	r2, .L10+4
	ldr	r1, .L10+24
	mov	r0, r3
	bl	fprintf
	ldr	r0, .L10+16
	bl	perror
	mov	r3, #1
	b	.L3
.L6:
	ldr	r0, .L10+28
	bl	puts
	ldr	r1, .L10
	ldr	r0, .L10+4
	bl	fopen
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L7
	ldr	r3, .L10+8
	ldr	r3, [r3]
	ldr	r2, .L10+4
	ldr	r1, .L10+12
	mov	r0, r3
	bl	fprintf
	ldr	r0, .L10+16
	bl	perror
	mov	r3, #1
	b	.L3
.L7:
	ldr	r0, [fp, #-16]
	bl	fileno
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L10+32
	bl	printf
	ldr	r0, [fp, #-16]
	bl	fclose
	mov	r3, r0
	cmp	r3, #0
	beq	.L8
	ldr	r3, .L10+8
	ldr	r3, [r3]
	ldr	r2, .L10+4
	ldr	r1, .L10+24
	mov	r0, r3
	bl	fprintf
	ldr	r0, .L10+16
	bl	perror
	mov	r3, #1
	b	.L3
.L8:
	ldr	r0, .L10+36
	bl	puts
	ldr	r0, .L10+40
	bl	puts
	ldr	r0, [fp, #-16]
	bl	fclose
	mov	r3, r0
	cmp	r3, #0
	beq	.L9
	ldr	r3, .L10+8
	ldr	r3, [r3]
	ldr	r2, .L10+4
	ldr	r1, .L10+24
	mov	r0, r3
	bl	fprintf
	ldr	r0, .L10+16
	bl	perror
	mov	r3, #1
	b	.L3
.L9:
	mov	r3, #0
.L3:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L11:
	.align	2
.L10:
	.word	.LC0
	.word	.LC1
	.word	stderr
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
