	.file	"427638.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"%s: can't open %s\n"
.LC1:
	.string	"%s: error writing stdout\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, 32
	mov	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	mov	rax, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -8[rbp], rax
	cmp	DWORD PTR -20[rbp], 1
	jne	.L4
	mov	esi, 1
	mov	edi, 0
	call	filecopy_
	jmp	.L3
.L7:
	add	QWORD PTR -32[rbp], 8
	mov	rax, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR [rax]
	mov	esi, 0
	mov	rdi, rax
	call	fopen_
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], -1
	jne	.L5
	mov	rax, QWORD PTR -32[rbp]
	mov	rcx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -8[rbp]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 1
	jmp	.L6
.L5:
	mov	eax, DWORD PTR -12[rbp]
	mov	esi, 1
	mov	edi, eax
	call	filecopy_
	mov	eax, DWORD PTR -12[rbp]
	mov	edi, eax
	call	close@PLT
.L4:
	sub	DWORD PTR -20[rbp], 1
	cmp	DWORD PTR -20[rbp], 0
	jg	.L7
.L3:
	mov	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	ferror@PLT
	test	eax, eax
	je	.L8
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -8[rbp]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 2
	jmp	.L6
.L8:
	mov	eax, 0
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	filecopy_
	.type	filecopy_, @function
filecopy_:
.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, 32
	mov	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -24[rbp], esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	jmp	.L10
.L11:
	mov	eax, DWORD PTR -24[rbp]
	movsx	rdx, eax
	lea	rax, -13[rbp]
	mov	rsi, rax
	mov	edi, 1
	call	write@PLT
.L10:
	lea	rcx, -13[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	edx, 1
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], 0
	jg	.L11
	nop
	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	filecopy_, .-filecopy_
	.globl	fopen_
	.type	fopen_, @function
fopen_:
.LFB2:
	.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
	mov	DWORD PTR -12[rbp], esi
	cmp	DWORD PTR -12[rbp], 0
	jne	.L14
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	jmp	.L15
.L14:
	cmp	DWORD PTR -12[rbp], 1
	jne	.L16
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, 438
	mov	rdi, rax
	call	creat@PLT
	jmp	.L15
.L16:
	mov	eax, -1
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	fopen_, .-fopen_
	.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	"427638.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%s: can't open %s\012\000"
	.align	2
.LC1:
	.ascii	"%s: error writing stdout\012\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ 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]
	str	r1, [fp, #-20]
	ldr	r3, [fp, #-20]
	ldr	r3, [r3]
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-16]
	cmp	r3, #1
	bne	.L4
	mov	r1, #1
	mov	r0, #0
	bl	filecopy_
	b	.L3
.L7:
	ldr	r3, [fp, #-20]
	add	r3, r3, #4
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-20]
	ldr	r3, [r3]
	mov	r1, #0
	mov	r0, r3
	bl	fopen_
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	bne	.L5
	ldr	r3, .L9
	ldr	r0, [r3]
	ldr	r3, [fp, #-20]
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	ldr	r1, .L9+4
	bl	fprintf
	mov	r3, #1
	b	.L6
.L5:
	mov	r1, #1
	ldr	r0, [fp, #-8]
	bl	filecopy_
	ldr	r0, [fp, #-8]
	bl	close
.L4:
	ldr	r3, [fp, #-16]
	sub	r3, r3, #1
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bgt	.L7
.L3:
	ldr	r3, .L9+8
	ldr	r3, [r3]
	mov	r0, r3
	bl	ferror
	mov	r3, r0
	cmp	r3, #0
	beq	.L8
	ldr	r3, .L9
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	ldr	r1, .L9+12
	mov	r0, r3
	bl	fprintf
	mov	r3, #2
	b	.L6
.L8:
	mov	r3, #0
.L6:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L10:
	.align	2
.L9:
	.word	stderr
	.word	.LC0
	.word	stdout
	.word	.LC1
	.size	main, .-main
	.section	.rodata
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	filecopy_
	.syntax unified
	.arm
	.fpu softvfp
	.type	filecopy_, %function
filecopy_:
	@ 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, .L15
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	b	.L12
.L13:
	ldr	r2, [fp, #-28]
	sub	r3, fp, #13
	mov	r1, r3
	mov	r0, #1
	bl	write
.L12:
	sub	r3, fp, #13
	mov	r2, #1
	mov	r1, r3
	ldr	r0, [fp, #-24]
	bl	read
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bgt	.L13
	nop
	ldr	r3, .L15
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L14
	bl	__stack_chk_fail
.L14:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L16:
	.align	2
.L15:
	.word	.LC2
	.size	filecopy_, .-filecopy_
	.align	2
	.global	fopen_
	.syntax unified
	.arm
	.fpu softvfp
	.type	fopen_, %function
fopen_:
	@ 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]
	str	r1, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L18
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-8]
	bl	open
	mov	r3, r0
	b	.L19
.L18:
	ldr	r3, [fp, #-12]
	cmp	r3, #1
	bne	.L20
	ldr	r1, .L21
	ldr	r0, [fp, #-8]
	bl	creat
	mov	r3, r0
	b	.L19
.L20:
	mvn	r3, #0
.L19:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L22:
	.align	2
.L21:
	.word	438
	.size	fopen_, .-fopen_
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
