	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_read_insert                    ## -- Begin function read_insert
	.p2align	4, 0x90
_read_insert:                           ## @read_insert
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	movq	_MAX_INSERT_LENGTH@GOTPCREL(%rip), %rax
	movslq	(%rax), %r15
	addq	%rdi, %r15
	movq	_MAX_LINE_LENGTH@GOTPCREL(%rip), %rax
	subq	(%rax), %r15
	movq	_g_input_file@GOTPCREL(%rip), %r14
	leaq	L_.str(%rip), %r12
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	_MAX_LINE_LENGTH@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	(%r14), %edx
	movq	%r13, %rdi
	callq	_fgetline
	testl	%eax, %eax
	jne	LBB0_4
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%r13, %r15
	ja	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%r12, %rdi
	callq	_error_exit
	jmp	LBB0_3
LBB0_4:
	movl	%eax, %ebx
	jns	LBB0_6
## %bb.5:
	leaq	L_.str.1(%rip), %rdi
	callq	_error_exit
LBB0_6:
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movslq	%ebx, %rbx
	leaq	(%rbx,%r13), %rdi
                                        ## kill: def $edi killed $edi killed $rdi
	leaq	L_.str.2(%rip), %rsi
	callq	_strcpy
	addq	%rbx, %r13
	incq	%r13
	cmpq	%r15, %r13
	jb	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	leaq	L_.str(%rip), %rdi
	callq	_error_exit
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=1
	movq	_MAX_LINE_LENGTH@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	(%r14), %edx
	movq	%r13, %rdi
	callq	_fgetline
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_7 Depth=1
	leaq	L_.str.1(%rip), %rdi
	callq	_error_exit
LBB0_11:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	_ID_INPUT_SEPARATOR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_7 Depth=1
	testq	%r12, %r12
	cmoveq	%r13, %r12
	testl	%ebx, %ebx
	movl	$0, %eax
	cmovneq	%rax, %r12
	jmp	LBB0_7
LBB0_13:
	testq	%r12, %r12
	cmovneq	%r12, %r13
	movb	$0, (%r13)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_INSERT_LENGTH,4,2          ## @MAX_INSERT_LENGTH
	.comm	_MAX_LINE_LENGTH,8,3            ## @MAX_LINE_LENGTH
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Buffer overflow reading inserts"

	.comm	_g_input_file,4,2               ## @g_input_file
L_.str.1:                               ## @.str.1
	.asciz	"Premature EOF while reading inserts"

L_.str.2:                               ## @.str.2
	.asciz	"\n"

	.comm	_ID_INPUT_SEPARATOR,4,2         ## @ID_INPUT_SEPARATOR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_read_insert                    ; -- Begin function read_insert
	.p2align	2
_read_insert:                           ; @read_insert
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
Lloh0:
	adrp	x8, _MAX_INSERT_LENGTH@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX_INSERT_LENGTH@GOTPAGEOFF]
Lloh2:
	ldrsw	x8, [x8]
Lloh3:
	adrp	x24, _MAX_LINE_LENGTH@GOTPAGE
Lloh4:
	ldr	x24, [x24, _MAX_LINE_LENGTH@GOTPAGEOFF]
	ldr	x9, [x24]
	add	x8, x0, x8
	sub	x25, x8, x9
Lloh5:
	adrp	x26, _g_input_file@GOTPAGE
Lloh6:
	ldr	x26, [x26, _g_input_file@GOTPAGEOFF]
Lloh7:
	adrp	x20, l_.str@PAGE
Lloh8:
	add	x20, x20, l_.str@PAGEOFF
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	x1, [x24]
	ldr	w2, [x26]
	mov	x0, x19
	bl	_fgetline
	cbnz	w0, LBB0_4
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	cmp	x25, x19
	b.hi	LBB0_1
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x20
	bl	_error_exit
	b	LBB0_1
LBB0_4:
	mov	x23, x0
	tbz	w0, #31, LBB0_6
; %bb.5:
Lloh9:
	adrp	x0, l_.str.1@PAGE
Lloh10:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_error_exit
LBB0_6:
	mov	x27, #0
Lloh11:
	adrp	x20, l_.str.2@PAGE
Lloh12:
	add	x20, x20, l_.str.2@PAGEOFF
Lloh13:
	adrp	x21, l_.str.1@PAGE
Lloh14:
	add	x21, x21, l_.str.1@PAGEOFF
Lloh15:
	adrp	x28, _ID_INPUT_SEPARATOR@GOTPAGE
Lloh16:
	ldr	x28, [x28, _ID_INPUT_SEPARATOR@GOTPAGEOFF]
Lloh17:
	adrp	x22, l_.str@PAGE
Lloh18:
	add	x22, x22, l_.str@PAGEOFF
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	add	x19, x19, w23, sxtw
	mov	x0, x19
	mov	x1, x20
	bl	_strcpy
	add	x19, x19, #1
	cmp	x19, x25
	b.lo	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x22
	bl	_error_exit
LBB0_9:                                 ;   in Loop: Header=BB0_7 Depth=1
	ldr	x1, [x24]
	ldr	w2, [x26]
	mov	x0, x19
	bl	_fgetline
	mov	x23, x0
	tbz	w0, #31, LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x21
	bl	_error_exit
LBB0_11:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w1, [x28]
	mov	x0, x19
	bl	_strcmp
	cmp	x27, #0
	cbz	x0, LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_7 Depth=1
	csel	x8, x19, x27, eq
	cmp	w23, #0
	csel	x27, x8, xzr, eq
	b	LBB0_7
LBB0_13:
	csel	x8, x19, x27, eq
	strb	wzr, [x8]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_INSERT_LENGTH,4,2          ; @MAX_INSERT_LENGTH
	.comm	_MAX_LINE_LENGTH,8,3            ; @MAX_LINE_LENGTH
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Buffer overflow reading inserts"

	.comm	_g_input_file,4,2               ; @g_input_file
l_.str.1:                               ; @.str.1
	.asciz	"Premature EOF while reading inserts"

l_.str.2:                               ; @.str.2
	.asciz	"\n"

	.comm	_ID_INPUT_SEPARATOR,4,2         ; @ID_INPUT_SEPARATOR
.subsections_via_symbols
