	.file	"595124.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"input so file\n"
.LC1:
	.string	"read elf header failed\n"
	.align 8
.LC2:
	.string	"read elf .shstrtab header failed\n"
.LC3:
	.string	"apply mem failed\n"
.LC4:
	.string	"find target section faile\nd"
.LC5:
	.string	"completed\n"
	.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
	sub	rsp, 192
	mov	DWORD PTR -180[rbp], edi
	mov	QWORD PTR -192[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	movabs	rax, 32783474439580974
	mov	QWORD PTR -16[rbp], rax
	mov	QWORD PTR -144[rbp], 0
	mov	DWORD PTR -168[rbp], 0
	mov	DWORD PTR -164[rbp], 0
	mov	QWORD PTR -136[rbp], 0
	mov	DWORD PTR -156[rbp], 4096
	cmp	DWORD PTR -180[rbp], 1
	jg	.L2
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	eax, -1
	jmp	.L24
.L2:
	mov	rax, QWORD PTR -192[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	esi, 2
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -152[rbp], eax
	cmp	DWORD PTR -152[rbp], 0
	js	.L26
	lea	rcx, -80[rbp]
	mov	eax, DWORD PTR -152[rbp]
	mov	edx, 52
	mov	rsi, rcx
	mov	edi, eax
	mov	eax, 0
	call	read@PLT
	cmp	eax, 52
	je	.L6
	lea	rdi, .LC1[rip]
	call	puts@PLT
	jmp	.L5
.L6:
	mov	eax, DWORD PTR -48[rbp]
	mov	ecx, eax
	movzx	eax, WORD PTR -30[rbp]
	movzx	edx, ax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 3
	add	rcx, rax
	mov	eax, DWORD PTR -152[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	edi, eax
	mov	eax, 0
	call	lseek@PLT
	lea	rcx, -128[rbp]
	mov	eax, DWORD PTR -152[rbp]
	mov	edx, 40
	mov	rsi, rcx
	mov	edi, eax
	mov	eax, 0
	call	read@PLT
	cmp	eax, 40
	je	.L7
	lea	rdi, .LC2[rip]
	call	puts@PLT
	jmp	.L5
.L7:
	mov	eax, DWORD PTR -108[rbp]
	mov	eax, eax
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -144[rbp], rax
	cmp	QWORD PTR -144[rbp], 0
	jne	.L8
	lea	rdi, .LC3[rip]
	call	puts@PLT
	jmp	.L5
.L8:
	mov	ecx, DWORD PTR -112[rbp]
	mov	eax, DWORD PTR -152[rbp]
	mov	edx, 0
	mov	esi, ecx
	mov	edi, eax
	mov	eax, 0
	call	lseek@PLT
	mov	edx, DWORD PTR -108[rbp]
	mov	rcx, QWORD PTR -144[rbp]
	mov	eax, DWORD PTR -152[rbp]
	mov	rsi, rcx
	mov	edi, eax
	mov	eax, 0
	call	read@PLT
	mov	edx, eax
	mov	eax, DWORD PTR -108[rbp]
	cmp	edx, eax
	jne	.L27
	mov	ecx, DWORD PTR -48[rbp]
	mov	eax, DWORD PTR -152[rbp]
	mov	edx, 0
	mov	esi, ecx
	mov	edi, eax
	mov	eax, 0
	call	lseek@PLT
	mov	DWORD PTR -160[rbp], 0
	mov	DWORD PTR -160[rbp], 0
	jmp	.L10
.L14:
	lea	rcx, -128[rbp]
	mov	eax, DWORD PTR -152[rbp]
	mov	edx, 40
	mov	rsi, rcx
	mov	edi, eax
	mov	eax, 0
	call	read@PLT
	cmp	eax, 40
	je	.L11
	lea	rdi, .LC4[rip]
	call	puts@PLT
	jmp	.L5
.L11:
	mov	eax, DWORD PTR -128[rbp]
	mov	edx, eax
	mov	rax, QWORD PTR -144[rbp]
	add	rdx, rax
	lea	rax, -16[rbp]
	mov	rsi, rax
	mov	rdi, rdx
	call	strcmp@PLT
	test	eax, eax
	jne	.L12
	mov	eax, DWORD PTR -112[rbp]
	mov	DWORD PTR -168[rbp], eax
	mov	eax, DWORD PTR -108[rbp]
	mov	DWORD PTR -164[rbp], eax
	jmp	.L13
.L12:
	add	DWORD PTR -160[rbp], 1
.L10:
	movzx	eax, WORD PTR -32[rbp]
	movzx	eax, ax
	cmp	DWORD PTR -160[rbp], eax
	jl	.L14
.L13:
	mov	ecx, DWORD PTR -168[rbp]
	mov	eax, DWORD PTR -152[rbp]
	mov	edx, 0
	mov	esi, ecx
	mov	edi, eax
	mov	eax, 0
	call	lseek@PLT
	mov	eax, DWORD PTR -164[rbp]
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -136[rbp], rax
	cmp	QWORD PTR -136[rbp], 0
	je	.L28
	mov	edx, DWORD PTR -164[rbp]
	mov	rcx, QWORD PTR -136[rbp]
	mov	eax, DWORD PTR -152[rbp]
	mov	rsi, rcx
	mov	edi, eax
	mov	eax, 0
	call	read@PLT
	cmp	DWORD PTR -164[rbp], eax
	jne	.L29
	mov	esi, DWORD PTR -156[rbp]
	mov	eax, DWORD PTR -164[rbp]
	mov	edx, 0
	div	esi
	add	eax, 1
	mov	DWORD PTR -148[rbp], eax
	mov	eax, DWORD PTR -164[rbp]
	mov	DWORD PTR -56[rbp], eax
	mov	eax, DWORD PTR -168[rbp]
	mov	DWORD PTR -48[rbp], eax
	mov	DWORD PTR -160[rbp], 0
	jmp	.L17
.L18:
	mov	eax, DWORD PTR -160[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -136[rbp]
	add	rax, rdx
	movzx	edx, BYTE PTR [rax]
	mov	eax, DWORD PTR -160[rbp]
	movsx	rcx, eax
	mov	rax, QWORD PTR -136[rbp]
	add	rax, rcx
	not	edx
	mov	BYTE PTR [rax], dl
	add	DWORD PTR -160[rbp], 1
.L17:
	mov	eax, DWORD PTR -160[rbp]
	cmp	DWORD PTR -164[rbp], eax
	ja	.L18
	mov	eax, DWORD PTR -152[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	mov	eax, 0
	call	lseek@PLT
	lea	rcx, -80[rbp]
	mov	eax, DWORD PTR -152[rbp]
	mov	edx, 52
	mov	rsi, rcx
	mov	edi, eax
	mov	eax, 0
	call	write@PLT
	cmp	eax, 52
	jne	.L30
	mov	ecx, DWORD PTR -168[rbp]
	mov	eax, DWORD PTR -152[rbp]
	mov	edx, 0
	mov	esi, ecx
	mov	edi, eax
	mov	eax, 0
	call	lseek@PLT
	mov	edx, DWORD PTR -164[rbp]
	mov	rcx, QWORD PTR -136[rbp]
	mov	eax, DWORD PTR -152[rbp]
	mov	rsi, rcx
	mov	edi, eax
	mov	eax, 0
	call	write@PLT
	cmp	DWORD PTR -164[rbp], eax
	jne	.L31
	lea	rdi, .LC5[rip]
	call	puts@PLT
	jmp	.L5
.L26:
	nop
	jmp	.L5
.L27:
	nop
	jmp	.L5
.L28:
	nop
	jmp	.L5
.L29:
	nop
	jmp	.L5
.L30:
	nop
	jmp	.L5
.L31:
	nop
.L5:
	cmp	QWORD PTR -136[rbp], 0
	je	.L21
	mov	rax, QWORD PTR -136[rbp]
	mov	rdi, rax
	call	free@PLT
.L21:
	cmp	QWORD PTR -144[rbp], 0
	je	.L22
	mov	rax, QWORD PTR -144[rbp]
	mov	rdi, rax
	call	free@PLT
.L22:
	cmp	DWORD PTR -152[rbp], 0
	je	.L23
	mov	eax, DWORD PTR -152[rbp]
	mov	edi, eax
	mov	eax, 0
	call	close@PLT
.L23:
	mov	eax, 0
.L24:
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L25
	call	__stack_chk_fail@PLT
.L25:
	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	"595124.c"
	.text
	.section	.rodata
	.align	2
.LC1:
	.ascii	"input so file\012\000"
	.align	2
.LC2:
	.ascii	"read elf header failed\012\000"
	.align	2
.LC3:
	.ascii	"read elf .shstrtab header failed\012\000"
	.align	2
.LC4:
	.ascii	"apply mem failed\012\000"
	.align	2
.LC5:
	.ascii	"find target section faile\012d\000"
	.global	__aeabi_uidiv
	.align	2
.LC6:
	.ascii	"completed\012\000"
	.align	2
.LC0:
	.ascii	".mytext\000"
	.align	2
.LC7:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 144
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #144
	str	r0, [fp, #-144]
	str	r1, [fp, #-148]
	ldr	r3, .L32
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r2, .L32+4
	sub	r3, fp, #16
	ldm	r2, {r0, r1}
	stm	r3, {r0, r1}
	mov	r3, #0
	str	r3, [fp, #-140]
	mov	r3, #0
	str	r3, [fp, #-136]
	mov	r3, #0
	str	r3, [fp, #-132]
	mov	r3, #0
	str	r3, [fp, #-128]
	mov	r3, #4096
	str	r3, [fp, #-120]
	ldr	r3, [fp, #-144]
	cmp	r3, #1
	bgt	.L2
	ldr	r0, .L32+8
	bl	puts
	mvn	r3, #0
	b	.L24
.L2:
	ldr	r3, [fp, #-148]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r1, #2
	mov	r0, r3
	bl	open
	str	r0, [fp, #-116]
	ldr	r3, [fp, #-116]
	cmp	r3, #0
	blt	.L26
	sub	r3, fp, #68
	mov	r2, #52
	mov	r1, r3
	ldr	r0, [fp, #-116]
	bl	read
	mov	r3, r0
	cmp	r3, #52
	beq	.L6
	ldr	r0, .L32+12
	bl	puts
	b	.L5
.L6:
	ldr	r2, [fp, #-36]
	ldrh	r3, [fp, #-18]
	mov	r1, r3
	mov	r3, r1
	lsl	r3, r3, #2
	add	r3, r3, r1
	lsl	r3, r3, #3
	add	r3, r2, r3
	mov	r2, #0
	mov	r1, r3
	ldr	r0, [fp, #-116]
	bl	lseek
	sub	r3, fp, #108
	mov	r2, #40
	mov	r1, r3
	ldr	r0, [fp, #-116]
	bl	read
	mov	r3, r0
	cmp	r3, #40
	beq	.L7
	ldr	r0, .L32+16
	bl	puts
	b	.L5
.L7:
	ldr	r3, [fp, #-88]
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-140]
	ldr	r3, [fp, #-140]
	cmp	r3, #0
	bne	.L8
	ldr	r0, .L32+20
	bl	puts
	b	.L5
.L8:
	ldr	r3, [fp, #-92]
	mov	r2, #0
	mov	r1, r3
	ldr	r0, [fp, #-116]
	bl	lseek
	ldr	r3, [fp, #-88]
	mov	r2, r3
	ldr	r1, [fp, #-140]
	ldr	r0, [fp, #-116]
	bl	read
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-88]
	cmp	r2, r3
	bne	.L27
	ldr	r3, [fp, #-36]
	mov	r2, #0
	mov	r1, r3
	ldr	r0, [fp, #-116]
	bl	lseek
	mov	r3, #0
	str	r3, [fp, #-124]
	mov	r3, #0
	str	r3, [fp, #-124]
	b	.L10
.L14:
	sub	r3, fp, #108
	mov	r2, #40
	mov	r1, r3
	ldr	r0, [fp, #-116]
	bl	read
	mov	r3, r0
	cmp	r3, #40
	beq	.L11
	ldr	r0, .L32+24
	bl	puts
	b	.L5
.L11:
	ldr	r3, [fp, #-108]
	ldr	r2, [fp, #-140]
	add	r3, r2, r3
	sub	r2, fp, #16
	mov	r1, r2
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L12
	ldr	r3, [fp, #-92]
	str	r3, [fp, #-136]
	ldr	r3, [fp, #-88]
	str	r3, [fp, #-132]
	b	.L13
.L12:
	ldr	r3, [fp, #-124]
	add	r3, r3, #1
	str	r3, [fp, #-124]
.L10:
	ldrh	r3, [fp, #-20]
	mov	r2, r3
	ldr	r3, [fp, #-124]
	cmp	r3, r2
	blt	.L14
.L13:
	mov	r2, #0
	ldr	r1, [fp, #-136]
	ldr	r0, [fp, #-116]
	bl	lseek
	ldr	r0, [fp, #-132]
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-128]
	ldr	r3, [fp, #-128]
	cmp	r3, #0
	beq	.L28
	ldr	r2, [fp, #-132]
	ldr	r1, [fp, #-128]
	ldr	r0, [fp, #-116]
	bl	read
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-132]
	cmp	r3, r2
	bne	.L29
	ldr	r3, [fp, #-120]
	mov	r1, r3
	ldr	r0, [fp, #-132]
	bl	__aeabi_uidiv
	mov	r3, r0
	add	r3, r3, #1
	str	r3, [fp, #-112]
	ldr	r3, [fp, #-132]
	str	r3, [fp, #-44]
	ldr	r3, [fp, #-136]
	str	r3, [fp, #-36]
	mov	r3, #0
	str	r3, [fp, #-124]
	b	.L17
.L18:
	ldr	r3, [fp, #-124]
	ldr	r2, [fp, #-128]
	add	r3, r2, r3
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r3, [fp, #-124]
	ldr	r1, [fp, #-128]
	add	r3, r1, r3
	mvn	r2, r2
	and	r2, r2, #255
	strb	r2, [r3]
	ldr	r3, [fp, #-124]
	add	r3, r3, #1
	str	r3, [fp, #-124]
.L17:
	ldr	r3, [fp, #-124]
	ldr	r2, [fp, #-132]
	cmp	r2, r3
	bhi	.L18
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-116]
	bl	lseek
	sub	r3, fp, #68
	mov	r2, #52
	mov	r1, r3
	ldr	r0, [fp, #-116]
	bl	write
	mov	r3, r0
	cmp	r3, #52
	bne	.L30
	mov	r2, #0
	ldr	r1, [fp, #-136]
	ldr	r0, [fp, #-116]
	bl	lseek
	ldr	r2, [fp, #-132]
	ldr	r1, [fp, #-128]
	ldr	r0, [fp, #-116]
	bl	write
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-132]
	cmp	r3, r2
	bne	.L31
	ldr	r0, .L32+28
	bl	puts
	b	.L5
.L26:
	nop
	b	.L5
.L27:
	nop
	b	.L5
.L28:
	nop
	b	.L5
.L29:
	nop
	b	.L5
.L30:
	nop
	b	.L5
.L31:
	nop
.L5:
	ldr	r3, [fp, #-128]
	cmp	r3, #0
	beq	.L21
	ldr	r0, [fp, #-128]
	bl	free
.L21:
	ldr	r3, [fp, #-140]
	cmp	r3, #0
	beq	.L22
	ldr	r0, [fp, #-140]
	bl	free
.L22:
	ldr	r3, [fp, #-116]
	cmp	r3, #0
	beq	.L23
	ldr	r0, [fp, #-116]
	bl	close
.L23:
	mov	r3, #0
.L24:
	ldr	r2, .L32
	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}
.L33:
	.align	2
.L32:
	.word	.LC7
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
