	.file	"extr_m68kmake.c_read_insert.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Buffer overflow reading inserts"
	.align 8
.LC1:
	.string	"Premature EOF while reading inserts"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC2:
	.string	"\n"
	.text
	.p2align 4
	.globl	read_insert
	.type	read_insert, @function
read_insert:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	lea	r13, .LC0[rip]
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	movsx	r12, DWORD PTR MAX_INSERT_LENGTH[rip]
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rdi
	add	r12, rdi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	sub	r12, QWORD PTR MAX_LINE_LENGTH[rip]
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L2:
	mov	edx, DWORD PTR g_input_file[rip]
	mov	rsi, QWORD PTR MAX_LINE_LENGTH[rip]
	mov	rdi, rbp
	call	fgetline@PLT
	movsx	rbx, eax
	test	ebx, ebx
	jne	.L23
.L3:
	cmp	rbp, r12
	jb	.L2
	mov	rdi, r13
	call	error_exit@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L23:
	js	.L24
.L4:
	lea	rdi, 0[rbp+rbx]
	lea	rsi, .LC2[rip]
	xor	r13d, r13d
	lea	rbp, 1[rdi]
	lea	r14, .LC0[rip]
	call	strcpy@PLT
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L5:
	mov	edx, DWORD PTR g_input_file[rip]
	mov	rsi, QWORD PTR MAX_LINE_LENGTH[rip]
	mov	rdi, rbp
	call	fgetline@PLT
	mov	ebx, eax
	test	eax, eax
	js	.L25
	mov	esi, DWORD PTR ID_INPUT_SEPARATOR[rip]
	mov	rdi, rbp
	call	strcmp@PLT
	test	rax, rax
	je	.L7
	test	ebx, ebx
	jne	.L9
	test	r13, r13
	cmove	r13, rbp
.L8:
	movsx	rdi, ebx
	lea	rsi, .LC2[rip]
	add	rdi, rbp
	lea	rbp, 1[rdi]
	call	strcpy@PLT
.L10:
	cmp	rbp, r12
	jb	.L5
	mov	rdi, r14
	call	error_exit@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L25:
	lea	rdi, .LC1[rip]
	call	error_exit@PLT
	mov	esi, DWORD PTR ID_INPUT_SEPARATOR[rip]
	mov	rdi, rbp
	call	strcmp@PLT
	test	rax, rax
	je	.L7
.L9:
	xor	r13d, r13d
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L7:
	test	r13, r13
	cmove	r13, rbp
	mov	BYTE PTR 0[r13], 0
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L24:
	.cfi_restore_state
	lea	rdi, .LC1[rip]
	call	error_exit@PLT
	jmp	.L4
	.cfi_endproc
.LFE0:
	.size	read_insert, .-read_insert
	.comm	g_input_file,4,4
	.comm	MAX_LINE_LENGTH,8,8
	.comm	MAX_INSERT_LENGTH,4,4
	.comm	ID_INPUT_SEPARATOR,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_m68kmake.c_read_insert.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Buffer overflow reading inserts\000"
	.align	2
.LC1:
	.ascii	"Premature EOF while reading inserts\000"
	.align	2
.LC2:
	.ascii	"\012\000"
	.text
	.align	2
	.global	read_insert
	.syntax unified
	.arm
	.fpu softvfp
	.type	read_insert, %function
read_insert:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r3, .L26
	ldr	r7, .L26+4
	ldr	r5, [r3]
	ldr	r3, [r7]
	add	r5, r0, r5
	mov	r6, r0
	ldr	r8, .L26+8
	ldr	r9, .L26+12
	sub	r5, r5, r3
	b	.L3
.L2:
	mov	r0, r6
	ldr	r2, [r8]
	ldr	r1, [r7]
	bl	fgetline
	subs	r4, r0, #0
	bne	.L23
.L3:
	cmp	r6, r5
	bcc	.L2
	mov	r0, r9
	bl	error_exit
	b	.L2
.L23:
	blt	.L24
.L4:
	add	r0, r6, r4
	ldr	r1, .L26+16
	add	r4, r0, #1
	mov	r6, #0
	bl	strcpy
	ldr	r9, .L26+20
	ldr	r10, .L26+16
	b	.L10
.L5:
	mov	r0, r4
	ldr	r2, [r8]
	ldr	r1, [r7]
	bl	fgetline
	subs	fp, r0, #0
	blt	.L25
	mov	r0, r4
	ldr	r1, [r9]
	bl	strcmp
	cmp	r0, #0
	beq	.L7
	cmp	fp, #0
	bne	.L9
	cmp	r6, #0
	moveq	r6, r4
.L8:
	add	r0, r4, fp
	mov	r1, r10
	add	r4, r0, #1
	bl	strcpy
.L10:
	cmp	r4, r5
	bcc	.L5
	ldr	r0, .L26+12
	bl	error_exit
	b	.L5
.L25:
	ldr	r0, .L26+24
	bl	error_exit
	mov	r0, r4
	ldr	r1, [r9]
	bl	strcmp
	cmp	r0, #0
	beq	.L7
.L9:
	mov	r6, #0
	b	.L8
.L7:
	cmp	r6, #0
	moveq	r6, r4
	mov	r3, #0
	strb	r3, [r6]
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L24:
	ldr	r0, .L26+24
	bl	error_exit
	b	.L4
.L27:
	.align	2
.L26:
	.word	MAX_INSERT_LENGTH
	.word	MAX_LINE_LENGTH
	.word	g_input_file
	.word	.LC0
	.word	.LC2
	.word	ID_INPUT_SEPARATOR
	.word	.LC1
	.size	read_insert, .-read_insert
	.comm	g_input_file,4,4
	.comm	MAX_LINE_LENGTH,4,4
	.comm	MAX_INSERT_LENGTH,4,4
	.comm	ID_INPUT_SEPARATOR,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
