	.file	"310616.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"rb"
.LC1:
	.string	"error open file %s\n "
.LC2:
	.string	"wb"
	.text
	.globl	copyFile
	.type	copyFile, @function
copyFile:
.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, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	QWORD PTR -48[rbp], rsi
	mov	rax, QWORD PTR -40[rbp]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 0
	jne	.L2
	mov	rax, QWORD PTR -40[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, -1
	jmp	.L3
.L2:
	mov	rax, QWORD PTR -48[rbp]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L5
	mov	rax, QWORD PTR -48[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, -1
	jmp	.L3
.L6:
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	fgetc@PLT
	mov	BYTE PTR -17[rbp], al
	movsx	eax, BYTE PTR -17[rbp]
	mov	rdx, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	fputc@PLT
.L5:
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	feof@PLT
	test	eax, eax
	je	.L6
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, 0
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	copyFile, .-copyFile
	.section	.rodata
.LC3:
	.string	"/etc/foo.conf"
	.align 8
.LC4:
	.string	"step 1 create link configure ok"
.LC5:
	.string	"/usr/bin/libfoo.so"
.LC6:
	.string	"libfoo.so"
.LC7:
	.string	"error copyfile libfoo.so"
	.align 8
.LC8:
	.string	"step 2 copy libfoo.so to usr/bin  ok"
.LC9:
	.string	"/bin/test1"
.LC10:
	.string	"test1"
.LC11:
	.string	"error copy test to bin"
.LC12:
	.string	"step 3 copy test to /bin  ok"
.LC13:
	.string	"error step 2 "
.LC14:
	.string	"error : "
.LC15:
	.string	"install successfully !!!"
	.text
	.globl	main
	.type	main, @function
main:
.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, 511
	lea	rdi, .LC3[rip]
	call	creat@PLT
	cmp	eax, -1
	je	.L8
	lea	rdi, .LC4[rip]
	call	puts@PLT
	mov	esi, 511
	lea	rdi, .LC5[rip]
	call	creat@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], -1
	je	.L9
	lea	rsi, .LC5[rip]
	lea	rdi, .LC6[rip]
	call	copyFile
	test	eax, eax
	je	.L10
	lea	rdi, .LC7[rip]
	call	puts@PLT
	mov	eax, -1
	jmp	.L11
.L10:
	lea	rdi, .LC8[rip]
	call	puts@PLT
	mov	esi, 511
	lea	rdi, .LC9[rip]
	call	creat@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], -1
	je	.L12
	lea	rsi, .LC9[rip]
	lea	rdi, .LC10[rip]
	call	copyFile
	test	eax, eax
	je	.L13
	lea	rdi, .LC11[rip]
	call	puts@PLT
	mov	eax, -1
	jmp	.L11
.L13:
	lea	rdi, .LC12[rip]
	call	puts@PLT
	lea	rdi, .LC15[rip]
	call	puts@PLT
	mov	eax, 0
	jmp	.L11
.L12:
	lea	rdi, .LC13[rip]
	call	puts@PLT
	mov	eax, -1
	jmp	.L11
.L9:
	lea	rdi, .LC14[rip]
	call	perror@PLT
	mov	eax, -1
	jmp	.L11
.L8:
	lea	rdi, .LC14[rip]
	call	perror@PLT
	mov	eax, -1
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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	"310616.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"rb\000"
	.align	2
.LC1:
	.ascii	"error open file %s\012 \000"
	.align	2
.LC2:
	.ascii	"wb\000"
	.text
	.align	2
	.global	copyFile
	.syntax unified
	.arm
	.fpu softvfp
	.type	copyFile, %function
copyFile:
	@ 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	r1, .L7
	ldr	r0, [fp, #-24]
	bl	fopen
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L2
	ldr	r1, [fp, #-24]
	ldr	r0, .L7+4
	bl	printf
	mvn	r3, #0
	b	.L3
.L2:
	ldr	r1, .L7+8
	ldr	r0, [fp, #-28]
	bl	fopen
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L5
	ldr	r1, [fp, #-28]
	ldr	r0, .L7+4
	bl	printf
	mvn	r3, #0
	b	.L3
.L6:
	ldr	r0, [fp, #-12]
	bl	fgetc
	mov	r3, r0
	strb	r3, [fp, #-13]
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	ldr	r1, [fp, #-8]
	mov	r0, r3
	bl	fputc
.L5:
	ldr	r0, [fp, #-12]
	bl	feof
	mov	r3, r0
	cmp	r3, #0
	beq	.L6
	ldr	r0, [fp, #-12]
	bl	fclose
	ldr	r0, [fp, #-8]
	bl	fclose
	mov	r3, #0
.L3:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L8:
	.align	2
.L7:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.size	copyFile, .-copyFile
	.section	.rodata
	.align	2
.LC3:
	.ascii	"/etc/foo.conf\000"
	.align	2
.LC4:
	.ascii	"step 1 create link configure ok\000"
	.align	2
.LC5:
	.ascii	"/usr/bin/libfoo.so\000"
	.align	2
.LC6:
	.ascii	"libfoo.so\000"
	.align	2
.LC7:
	.ascii	"error copyfile libfoo.so\000"
	.align	2
.LC8:
	.ascii	"step 2 copy libfoo.so to usr/bin  ok\000"
	.align	2
.LC9:
	.ascii	"/bin/test1\000"
	.align	2
.LC10:
	.ascii	"test1\000"
	.align	2
.LC11:
	.ascii	"error copy test to bin\000"
	.align	2
.LC12:
	.ascii	"step 3 copy test to /bin  ok\000"
	.align	2
.LC13:
	.ascii	"error step 2 \000"
	.align	2
.LC14:
	.ascii	"error : \000"
	.align	2
.LC15:
	.ascii	"install successfully !!!\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	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	ldr	r1, .L17
	ldr	r0, .L17+4
	bl	creat
	mov	r3, r0
	cmn	r3, #1
	beq	.L10
	ldr	r0, .L17+8
	bl	puts
	ldr	r1, .L17
	ldr	r0, .L17+12
	bl	creat
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	beq	.L11
	ldr	r1, .L17+12
	ldr	r0, .L17+16
	bl	copyFile
	mov	r3, r0
	cmp	r3, #0
	beq	.L12
	ldr	r0, .L17+20
	bl	puts
	mvn	r3, #0
	b	.L13
.L12:
	ldr	r0, .L17+24
	bl	puts
	ldr	r1, .L17
	ldr	r0, .L17+28
	bl	creat
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	beq	.L14
	ldr	r1, .L17+28
	ldr	r0, .L17+32
	bl	copyFile
	mov	r3, r0
	cmp	r3, #0
	beq	.L15
	ldr	r0, .L17+36
	bl	puts
	mvn	r3, #0
	b	.L13
.L15:
	ldr	r0, .L17+40
	bl	puts
	ldr	r0, .L17+44
	bl	puts
	mov	r3, #0
	b	.L13
.L14:
	ldr	r0, .L17+48
	bl	puts
	mvn	r3, #0
	b	.L13
.L11:
	ldr	r0, .L17+52
	bl	perror
	mvn	r3, #0
	b	.L13
.L10:
	ldr	r0, .L17+52
	bl	perror
	mvn	r3, #0
.L13:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L18:
	.align	2
.L17:
	.word	511
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC15
	.word	.LC13
	.word	.LC14
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
