	.file	"140764884.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"r"
.LC1:
	.string	"txt.txt"
.LC2:
	.string	"w"
.LC3:
	.string	"%d\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, 1056
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -1052[rbp], 0
	lea	rsi, .LC0[rip]
	lea	rdi, .LC1[rip]
	call	fopen@PLT
	mov	QWORD PTR -1048[rbp], rax
	mov	QWORD PTR -1008[rbp], 0
	mov	QWORD PTR -1000[rbp], 0
	lea	rdx, -992[rbp]
	mov	eax, 0
	mov	ecx, 123
	mov	rdi, rdx
	rep stosq
	mov	QWORD PTR -1028[rbp], 31085
	mov	WORD PTR -1020[rbp], 0
	mov	QWORD PTR -1018[rbp], 7696249
	mov	WORD PTR -1010[rbp], 0
	mov	rax, QWORD PTR -1048[rbp]
	mov	edx, 2
	mov	esi, 0
	mov	rdi, rax
	call	fseek@PLT
	mov	rax, QWORD PTR -1048[rbp]
	mov	rdi, rax
	call	ftell@PLT
	mov	QWORD PTR -1040[rbp], rax
	mov	rax, QWORD PTR -1048[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	rdi, rax
	call	fseek@PLT
	mov	rdx, QWORD PTR -1040[rbp]
	mov	rcx, QWORD PTR -1048[rbp]
	lea	rax, -1008[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	lea	rax, -1008[rbp]
	mov	rdi, rax
	call	puts@PLT
	lea	rdx, -1018[rbp]
	lea	rcx, -1028[rbp]
	lea	rax, -1008[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	replace
	mov	DWORD PTR -1052[rbp], eax
	lea	rax, -1008[rbp]
	mov	rdi, rax
	call	puts@PLT
	mov	rax, QWORD PTR -1048[rbp]
	mov	rdi, rax
	call	fclose@PLT
	lea	rsi, .LC2[rip]
	lea	rdi, .LC1[rip]
	call	fopen@PLT
	mov	QWORD PTR -1048[rbp], rax
	lea	rax, -1008[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rsi, rax
	mov	rdx, QWORD PTR -1048[rbp]
	lea	rax, -1008[rbp]
	mov	rcx, rdx
	mov	rdx, rsi
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
	mov	eax, DWORD PTR -1052[rbp]
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L3
	call	__stack_chk_fail@PLT
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	replace
	.type	replace, @function
replace:
.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, 1072
	mov	QWORD PTR -1048[rbp], rdi
	mov	QWORD PTR -1056[rbp], rsi
	mov	QWORD PTR -1064[rbp], rdx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -1020[rbp], 0
	mov	rax, QWORD PTR -1048[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	DWORD PTR -1036[rbp], eax
	mov	rax, QWORD PTR -1056[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	DWORD PTR -1016[rbp], eax
	mov	rax, QWORD PTR -1064[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	DWORD PTR -1012[rbp], eax
	mov	DWORD PTR -1032[rbp], 0
	jmp	.L5
.L11:
	mov	DWORD PTR -1024[rbp], 1
	mov	DWORD PTR -1028[rbp], 0
	jmp	.L6
.L9:
	mov	edx, DWORD PTR -1032[rbp]
	mov	eax, DWORD PTR -1028[rbp]
	add	eax, edx
	movsx	rdx, eax
	mov	rax, QWORD PTR -1048[rbp]
	add	rax, rdx
	movzx	edx, BYTE PTR [rax]
	mov	eax, DWORD PTR -1028[rbp]
	movsx	rcx, eax
	mov	rax, QWORD PTR -1056[rbp]
	add	rax, rcx
	movzx	eax, BYTE PTR [rax]
	cmp	dl, al
	je	.L7
	mov	DWORD PTR -1024[rbp], 0
	jmp	.L8
.L7:
	add	DWORD PTR -1028[rbp], 1
.L6:
	mov	eax, DWORD PTR -1028[rbp]
	cmp	eax, DWORD PTR -1016[rbp]
	jl	.L9
.L8:
	cmp	DWORD PTR -1024[rbp], 0
	je	.L10
	mov	rdx, QWORD PTR -1048[rbp]
	lea	rax, -1008[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	lea	rdx, -1008[rbp]
	mov	eax, DWORD PTR -1032[rbp]
	cdqe
	add	rdx, rax
	mov	rax, QWORD PTR -1064[rbp]
	mov	rsi, rax
	mov	rdi, rdx
	call	strcpy@PLT
	mov	edx, DWORD PTR -1032[rbp]
	mov	eax, DWORD PTR -1016[rbp]
	add	eax, edx
	movsx	rdx, eax
	mov	rax, QWORD PTR -1048[rbp]
	add	rdx, rax
	mov	ecx, DWORD PTR -1032[rbp]
	mov	eax, DWORD PTR -1012[rbp]
	add	eax, ecx
	lea	rcx, -1008[rbp]
	cdqe
	add	rax, rcx
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	lea	rdx, -1008[rbp]
	mov	rax, QWORD PTR -1048[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	eax, DWORD PTR -1012[rbp]
	sub	eax, 1
	add	DWORD PTR -1032[rbp], eax
	mov	rax, QWORD PTR -1048[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	DWORD PTR -1036[rbp], eax
	add	DWORD PTR -1020[rbp], 1
.L10:
	add	DWORD PTR -1032[rbp], 1
.L5:
	mov	eax, DWORD PTR -1036[rbp]
	sub	eax, DWORD PTR -1016[rbp]
	cmp	DWORD PTR -1032[rbp], eax
	jl	.L11
	mov	eax, DWORD PTR -1020[rbp]
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	replace, .-replace
	.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	"140764884.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"r\000"
	.align	2
.LC1:
	.ascii	"txt.txt\000"
	.align	2
.LC2:
	.ascii	"w\000"
	.align	2
.LC3:
	.ascii	"%d\012\000"
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 1048
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1040
	sub	sp, sp, #8
	ldr	r3, .L4
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-1052]
	ldr	r1, .L4+4
	ldr	r0, .L4+8
	bl	fopen
	str	r0, [fp, #-1048]
	mov	r3, #0
	str	r3, [fp, #-1008]
	sub	r3, fp, #1004
	mov	r2, #996
	mov	r1, #0
	mov	r0, r3
	bl	memset
	ldr	r3, .L4+12
	str	r3, [fp, #-1032]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	mov	r2, #0
	str	r2, [r3]
	strh	r2, [r3, #4]	@ movhi
	ldr	r3, .L4+16
	str	r3, [fp, #-1020]
	sub	r3, fp, #1016
	mov	r2, #0
	str	r2, [r3]
	strh	r2, [r3, #4]	@ movhi
	mov	r2, #2
	mov	r1, #0
	ldr	r0, [fp, #-1048]
	bl	fseek
	ldr	r0, [fp, #-1048]
	bl	ftell
	mov	r3, r0
	mov	r2, r3
	asr	r3, r2, #31
	str	r2, [fp, #-1044]
	str	r3, [fp, #-1040]
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-1048]
	bl	fseek
	ldr	r2, [fp, #-1044]
	sub	r0, fp, #1008
	ldr	r3, [fp, #-1048]
	mov	r1, #1
	bl	fread
	sub	r3, fp, #1008
	mov	r0, r3
	bl	puts
	sub	r2, fp, #1020
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	sub	r0, fp, #1008
	mov	r1, r3
	bl	replace
	str	r0, [fp, #-1052]
	sub	r3, fp, #1008
	mov	r0, r3
	bl	puts
	ldr	r0, [fp, #-1048]
	bl	fclose
	ldr	r1, .L4+20
	ldr	r0, .L4+8
	bl	fopen
	str	r0, [fp, #-1048]
	sub	r3, fp, #1008
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r0, fp, #1008
	ldr	r3, [fp, #-1048]
	mov	r1, #1
	bl	fwrite
	ldr	r1, [fp, #-1052]
	ldr	r0, .L4+24
	bl	printf
	mov	r3, #0
	ldr	r2, .L4
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L3
	bl	__stack_chk_fail
.L3:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L5:
	.align	2
.L4:
	.word	.LC4
	.word	.LC0
	.word	.LC1
	.word	31085
	.word	7696249
	.word	.LC2
	.word	.LC3
	.size	main, .-main
	.section	.rodata
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	replace
	.syntax unified
	.arm
	.fpu softvfp
	.type	replace, %function
replace:
	@ args = 0, pretend = 0, frame = 1048
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1040
	sub	sp, sp, #8
	str	r0, [fp, #-1040]
	str	r1, [fp, #-1044]
	str	r2, [fp, #-1048]
	ldr	r3, .L16
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-1020]
	ldr	r0, [fp, #-1040]
	bl	strlen
	mov	r3, r0
	str	r3, [fp, #-1036]
	ldr	r0, [fp, #-1044]
	bl	strlen
	mov	r3, r0
	str	r3, [fp, #-1016]
	ldr	r0, [fp, #-1048]
	bl	strlen
	mov	r3, r0
	str	r3, [fp, #-1012]
	mov	r3, #0
	str	r3, [fp, #-1032]
	b	.L7
.L13:
	mov	r3, #1
	str	r3, [fp, #-1024]
	mov	r3, #0
	str	r3, [fp, #-1028]
	b	.L8
.L11:
	ldr	r2, [fp, #-1032]
	ldr	r3, [fp, #-1028]
	add	r3, r2, r3
	mov	r2, r3
	ldr	r3, [fp, #-1040]
	add	r3, r3, r2
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r3, [fp, #-1028]
	ldr	r1, [fp, #-1044]
	add	r3, r1, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r2, r3
	beq	.L9
	mov	r3, #0
	str	r3, [fp, #-1024]
	b	.L10
.L9:
	ldr	r3, [fp, #-1028]
	add	r3, r3, #1
	str	r3, [fp, #-1028]
.L8:
	ldr	r2, [fp, #-1028]
	ldr	r3, [fp, #-1016]
	cmp	r2, r3
	blt	.L11
.L10:
	ldr	r3, [fp, #-1024]
	cmp	r3, #0
	beq	.L12
	sub	r3, fp, #1008
	ldr	r1, [fp, #-1040]
	mov	r0, r3
	bl	strcpy
	sub	r2, fp, #1008
	ldr	r3, [fp, #-1032]
	add	r3, r2, r3
	ldr	r1, [fp, #-1048]
	mov	r0, r3
	bl	strcpy
	ldr	r2, [fp, #-1032]
	ldr	r3, [fp, #-1012]
	add	r3, r2, r3
	sub	r2, fp, #1008
	add	r0, r2, r3
	ldr	r2, [fp, #-1032]
	ldr	r3, [fp, #-1016]
	add	r3, r2, r3
	mov	r2, r3
	ldr	r3, [fp, #-1040]
	add	r3, r3, r2
	mov	r1, r3
	bl	strcpy
	sub	r3, fp, #1008
	mov	r1, r3
	ldr	r0, [fp, #-1040]
	bl	strcpy
	ldr	r3, [fp, #-1012]
	sub	r3, r3, #1
	ldr	r2, [fp, #-1032]
	add	r3, r2, r3
	str	r3, [fp, #-1032]
	ldr	r0, [fp, #-1040]
	bl	strlen
	mov	r3, r0
	str	r3, [fp, #-1036]
	ldr	r3, [fp, #-1020]
	add	r3, r3, #1
	str	r3, [fp, #-1020]
.L12:
	ldr	r3, [fp, #-1032]
	add	r3, r3, #1
	str	r3, [fp, #-1032]
.L7:
	ldr	r2, [fp, #-1036]
	ldr	r3, [fp, #-1016]
	sub	r3, r2, r3
	ldr	r2, [fp, #-1032]
	cmp	r2, r3
	blt	.L13
	ldr	r3, [fp, #-1020]
	ldr	r2, .L16
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L15
	bl	__stack_chk_fail
.L15:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L17:
	.align	2
.L16:
	.word	.LC5
	.size	replace, .-replace
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
