	.file	"extr_wordlist.c_load_segment.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	load_segment
	.type	load_segment, @function
load_segment:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rcx, rsi
	mov	rbp, rsi
	mov	esi, 1
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	mov	rbx, QWORD PTR [rdi]
	mov	rax, QWORD PTR 24[rbx]
	mov	rdi, QWORD PTR 8[rbx]
	mov	QWORD PTR 32[rbx], 0
	lea	rdx, -1000[rax]
	call	hc_fread@PLT
	mov	rdx, QWORD PTR 8[rbx]
	mov	QWORD PTR [rbx], rax
	mov	BYTE PTR [rdx+rax], 0
	mov	rax, QWORD PTR [rbx]
	test	rax, rax
	je	.L3
	mov	rdx, QWORD PTR 8[rbx]
	cmp	BYTE PTR -1[rdx+rax], 10
	jne	.L5
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L6:
	mov	rdi, rbp
	call	hc_fgetc@PLT
	cmp	DWORD PTR EOF[rip], eax
	je	.L14
.L7:
	mov	rdx, QWORD PTR [rbx]
	mov	rcx, QWORD PTR 8[rbx]
	mov	BYTE PTR [rcx+rdx], al
	mov	rcx, QWORD PTR [rbx]
	lea	rdx, 1[rcx]
	mov	QWORD PTR [rbx], rdx
	cmp	eax, 10
	je	.L8
.L5:
	mov	rdi, rbp
	call	hc_feof@PLT
	test	eax, eax
	jne	.L14
	movsx	rax, DWORD PTR 16[rbx]
	mov	rsi, rax
	cmp	QWORD PTR [rbx], rax
	jne	.L6
	mov	rdx, QWORD PTR 24[rbx]
	mov	rdi, QWORD PTR 8[rbx]
	call	hcrealloc@PLT
	mov	rdi, rbp
	mov	QWORD PTR 8[rbx], rax
	mov	rax, QWORD PTR 24[rbx]
	add	DWORD PTR 16[rbx], eax
	call	hc_fgetc@PLT
	cmp	DWORD PTR EOF[rip], eax
	jne	.L7
	.p2align 4,,10
	.p2align 3
.L14:
	mov	rdx, QWORD PTR [rbx]
	lea	rcx, -1[rdx]
.L8:
	mov	rax, QWORD PTR 8[rbx]
	cmp	BYTE PTR [rax+rcx], 10
	je	.L3
	lea	rcx, 1[rdx]
	mov	QWORD PTR [rbx], rcx
	mov	BYTE PTR [rax+rdx], 10
.L3:
	add	rsp, 8
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	load_segment, .-load_segment
	.comm	EOF,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_wordlist.c_load_segment.c"
	.text
	.align	2
	.global	load_segment
	.syntax unified
	.arm
	.fpu softvfp
	.type	load_segment, %function
load_segment:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r6, #0
	ldr	r4, [r0]
	mov	r3, r1
	ldr	r2, [r4, #12]
	mov	r5, r1
	ldr	r0, [r4, #4]
	mov	r1, #1
	str	r6, [r4, #16]
	sub	r2, r2, #1000
	bl	hc_fread
	ldr	r3, [r4, #4]
	str	r0, [r4]
	strb	r6, [r3, r0]
	ldr	r3, [r4]
	cmp	r3, r6
	beq	.L3
	ldr	r2, [r4, #4]
	add	r3, r2, r3
	ldrb	r3, [r3, #-1]	@ zero_extendqisi2
	cmp	r3, #10
	beq	.L3
	ldr	r6, .L22
	b	.L5
.L6:
	mov	r0, r5
	bl	hc_fgetc
	ldr	r3, [r6]
	cmp	r3, r0
	beq	.L20
	ldr	r3, [r4]
	ldr	r2, [r4, #4]
	cmp	r0, #10
	strb	r0, [r2, r3]
	ldr	r2, [r4]
	add	r3, r2, #1
	str	r3, [r4]
	beq	.L8
.L5:
	mov	r0, r5
	bl	hc_feof
	cmp	r0, #0
	bne	.L20
	ldr	r3, [r4, #8]
	ldr	r1, [r4]
	cmp	r1, r3
	bne	.L6
	ldr	r2, [r4, #12]
	ldr	r0, [r4, #4]
	bl	hcrealloc
	ldr	r3, [r4, #8]
	ldr	r2, [r4, #12]
	str	r0, [r4, #4]
	add	r3, r3, r2
	str	r3, [r4, #8]
	b	.L6
.L20:
	ldr	r3, [r4]
	sub	r2, r3, #1
.L8:
	ldr	r1, [r4, #4]
	ldrb	r2, [r1, r2]	@ zero_extendqisi2
	cmp	r2, #10
	movne	r2, #10
	addne	r0, r3, #1
	strne	r0, [r4]
	strbne	r2, [r1, r3]
.L3:
	mov	r0, #0
	pop	{r4, r5, r6, pc}
.L23:
	.align	2
.L22:
	.word	EOF
	.size	load_segment, .-load_segment
	.comm	EOF,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
