	.file	"extr_sections.c_modify_section.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"malloc failed"
	.text
	.p2align 4
	.type	modify_section, @function
modify_section:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 56
	.cfi_def_cfa_offset 112
	mov	QWORD PTR 24[rsp], rdi
	mov	rdi, rsi
	mov	QWORD PTR 16[rsp], rsi
	lea	rsi, 32[rsp]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	call	read_section@PLT
	mov	rbp, rax
	test	rax, rax
	je	.L2
	mov	r12, QWORD PTR 32[rsp]
	test	r12, r12
	je	.L2
.L3:
	mov	rax, QWORD PTR 16[rsp]
	mov	rdi, QWORD PTR 24[rsp]
	mov	esi, DWORD PTR 20[rax]
	call	is_append_section@PLT
	test	rax, rax
	jne	.L45
.L6:
	mov	rdi, r12
	call	malloc@PLT
	mov	r13, rax
	test	rax, rax
	je	.L46
.L7:
	mov	rax, QWORD PTR 16[rsp]
	mov	rdi, QWORD PTR 24[rsp]
	mov	QWORD PTR [rax], r13
	mov	esi, DWORD PTR 20[rax]
	call	is_compress_section@PLT
	test	rax, rax
	je	.L8
	mov	QWORD PTR 8[rsp], 0
	mov	r14, QWORD PTR 32[rsp]
	add	r14, rbp
	cmp	rbp, r14
	jnb	.L10
	cmp	r14, rbp
	jbe	.L23
	.p2align 4,,10
	.p2align 3
.L42:
	mov	rdx, r14
	mov	rax, rbp
	xor	ebx, ebx
	sub	rdx, rbp
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L12:
	add	rbx, 1
	add	rax, 1
	cmp	rdx, rbx
	je	.L11
.L17:
	cmp	BYTE PTR [rax], 0
	jne	.L12
.L11:
	mov	rcx, QWORD PTR 8[rsp]
	lea	r12, 0[r13+rcx]
	cmp	r14, rax
	je	.L13
.L50:
	mov	r15, r13
	cmp	r13, r12
	jb	.L14
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L47:
	mov	rdi, r15
	call	strlen@PLT
	add	eax, 1
	cdqe
	add	r15, rax
	cmp	r15, r12
	jnb	.L15
.L14:
	mov	rsi, rbp
	mov	rdi, r15
	call	strcmp@PLT
	test	rax, rax
	jne	.L47
	lea	rbp, 1[rbp+rbx]
	cmp	r14, rbp
	ja	.L42
	.p2align 4,,10
	.p2align 3
.L10:
	mov	rax, QWORD PTR 16[rsp]
	mov	rdi, QWORD PTR 24[rsp]
	mov	esi, DWORD PTR 20[rax]
	call	is_append_section@PLT
	test	rax, rax
	jne	.L48
.L18:
	mov	rax, QWORD PTR 16[rsp]
	mov	rcx, QWORD PTR 8[rsp]
	mov	DWORD PTR 16[rax], 1
	mov	QWORD PTR 8[rax], rcx
.L1:
	mov	rax, QWORD PTR 40[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L49
	add	rsp, 56
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	rax, QWORD PTR 16[rsp]
	mov	rdi, QWORD PTR 24[rsp]
	mov	esi, DWORD PTR 20[rax]
	call	is_append_section@PLT
	test	rax, rax
	je	.L1
	mov	r12, QWORD PTR 32[rsp]
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L15:
	mov	rsi, rbp
	mov	rdx, rbx
	lea	rbp, 1[rbp+rbx]
	mov	rdi, r12
	call	strncpy@PLT
	mov	rax, QWORD PTR 8[rsp]
	add	rax, rbx
	mov	BYTE PTR 0[r13+rax], 0
	add	rax, 1
	mov	QWORD PTR 8[rsp], rax
	cmp	r14, rbp
	ja	.L42
	jmp	.L10
.L23:
	mov	rcx, QWORD PTR 8[rsp]
	mov	rax, rbp
	xor	ebx, ebx
	lea	r12, 0[r13+rcx]
	cmp	r14, rax
	jne	.L50
.L13:
	mov	rdx, rbx
	mov	rsi, rbp
	mov	rdi, r12
	call	strncpy@PLT
	add	QWORD PTR 8[rsp], rbx
	jmp	.L10
.L8:
	mov	rdx, QWORD PTR 32[rsp]
	mov	rsi, rbp
	mov	rdi, r13
	call	memcpy@PLT
	mov	rax, QWORD PTR 32[rsp]
	mov	QWORD PTR 8[rsp], rax
	jmp	.L10
.L45:
	mov	rax, QWORD PTR 16[rsp]
	mov	rdi, QWORD PTR 24[rsp]
	xor	edx, edx
	mov	esi, DWORD PTR 20[rax]
	call	lookup_sec_act@PLT
	mov	rdi, QWORD PTR [rax]
	call	strlen@PLT
	add	eax, 1
	cdqe
	add	r12, rax
	jmp	.L6
.L48:
	mov	rax, QWORD PTR 16[rsp]
	mov	rdi, QWORD PTR 24[rsp]
	xor	edx, edx
	mov	esi, DWORD PTR 20[rax]
	call	lookup_sec_act@PLT
	mov	rdi, QWORD PTR [rax]
	mov	rbp, rax
	call	strlen@PLT
	mov	r14, QWORD PTR 8[rsp]
	mov	rsi, QWORD PTR 0[rbp]
	movsx	rbx, eax
	mov	rdx, rbx
	lea	rdi, 0[r13+r14]
	add	rbx, r14
	call	strncpy@PLT
	lea	rax, 1[rbx]
	mov	BYTE PTR 0[r13+rbx], 0
	mov	QWORD PTR 8[rsp], rax
	jmp	.L18
.L49:
	call	__stack_chk_fail@PLT
.L46:
	mov	edi, DWORD PTR EXIT_FAILURE[rip]
	lea	rsi, .LC0[rip]
	call	err@PLT
	jmp	.L7
	.cfi_endproc
.LFE0:
	.size	modify_section, .-modify_section
	.comm	EXIT_FAILURE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.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, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_sections.c_modify_section.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"malloc failed\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	modify_section, %function
modify_section:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r10, r1
	mov	fp, r0
	sub	sp, sp, #20
	ldr	r3, .L50
	str	fp, [sp, #4]
	mov	r0, r10
	add	r1, sp, #8
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	bl	read_section
	subs	r5, r0, #0
	beq	.L2
	ldr	r4, [sp, #8]
	cmp	r4, #0
	beq	.L2
.L3:
	ldr	r1, [r10, #12]
	ldr	r0, [sp, #4]
	bl	is_append_section
	cmp	r0, #0
	bne	.L44
.L6:
	mov	r0, r4
	bl	malloc
	subs	r7, r0, #0
	beq	.L45
.L7:
	ldr	r1, [r10, #12]
	ldr	r0, [sp, #4]
	str	r7, [r10]
	bl	is_compress_section
	cmp	r0, #0
	beq	.L8
	ldr	r8, [sp, #8]
	mov	r9, #0
	add	r8, r5, r8
	cmp	r5, r8
	bcs	.L10
	cmp	r8, r5
	bls	.L23
.L41:
	mov	r3, r5
	mov	r4, #0
	sub	r0, r8, r5
	b	.L17
.L12:
	add	r4, r4, #1
	cmp	r4, r0
	mov	r2, r3
	beq	.L11
.L17:
	ldrb	r1, [r3]	@ zero_extendqisi2
	mov	r2, r3
	cmp	r1, #0
	add	r3, r3, #1
	bne	.L12
.L11:
	cmp	r8, r2
	add	r6, r7, r9
	beq	.L13
.L49:
	cmp	r7, r6
	movcc	fp, r7
	bcc	.L14
	b	.L15
.L46:
	mov	r0, fp
	bl	strlen
	add	r0, r0, #1
	add	fp, fp, r0
	cmp	r6, fp
	bls	.L15
.L14:
	mov	r1, r5
	mov	r0, fp
	bl	strcmp
	cmp	r0, #0
	bne	.L46
	add	r4, r4, #1
	add	r5, r5, r4
	cmp	r8, r5
	bhi	.L41
.L10:
	ldr	r1, [r10, #12]
	ldr	r0, [sp, #4]
	bl	is_append_section
	cmp	r0, #0
	bne	.L47
.L18:
	mov	r3, #1
	str	r9, [r10, #4]
	str	r3, [r10, #8]
.L1:
	ldr	r3, .L50
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L48
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L2:
	ldr	r1, [r10, #12]
	ldr	r0, [sp, #4]
	bl	is_append_section
	cmp	r0, #0
	beq	.L1
	ldr	r4, [sp, #8]
	b	.L3
.L15:
	mov	r2, r4
	mov	r1, r5
	mov	r0, r6
	bl	strncpy
	mov	r3, #0
	add	r9, r9, r4
	add	r4, r4, #1
	add	r5, r5, r4
	cmp	r8, r5
	strb	r3, [r7, r9]
	add	r9, r9, #1
	bhi	.L41
	b	.L10
.L23:
	mov	r2, r5
	cmp	r8, r2
	mov	r4, #0
	add	r6, r7, r9
	bne	.L49
.L13:
	mov	r1, r5
	mov	r0, r6
	mov	r2, r4
	add	r9, r9, r4
	bl	strncpy
	b	.L10
.L8:
	ldr	r9, [sp, #8]
	mov	r1, r5
	mov	r2, r9
	mov	r0, r7
	bl	memcpy
	b	.L10
.L44:
	mov	r2, #0
	ldr	r1, [r10, #12]
	ldr	r0, [sp, #4]
	bl	lookup_sec_act
	ldr	r0, [r0]
	bl	strlen
	add	r4, r4, #1
	add	r4, r4, r0
	b	.L6
.L47:
	mov	r2, #0
	ldr	r1, [r10, #12]
	ldr	r0, [sp, #4]
	bl	lookup_sec_act
	ldr	r5, [r0]
	mov	r0, r5
	bl	strlen
	mov	r1, r5
	mov	r4, r0
	mov	r2, r0
	add	r0, r7, r9
	bl	strncpy
	mov	r3, #0
	add	r9, r9, r4
	strb	r3, [r7, r9]
	add	r9, r9, #1
	b	.L18
.L48:
	bl	__stack_chk_fail
.L45:
	ldr	r3, .L50+4
	ldr	r1, .L50+8
	ldr	r0, [r3]
	bl	err
	b	.L7
.L51:
	.align	2
.L50:
	.word	.LC1
	.word	EXIT_FAILURE
	.word	.LC0
	.size	modify_section, .-modify_section
	.comm	EXIT_FAILURE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
