	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sum_search_on_end              ## -- Begin function sum_search_on_end
	.p2align	4, 0x90
_sum_search_on_end:                     ## @sum_search_on_end
	.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, %r15
	movq	16(%rdi), %r14
	callq	_merge_init_response
	testq	%rax, %rax
	js	LBB0_16
## %bb.1:
	movl	(%r14), %eax
	movl	%eax, %ecx
	andl	$7, %ecx
	xorl	%edx, %edx
	testb	$1, %al
	sete	%dl
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	leal	(%rcx,%rdx,8), %edi
	addl	$16, %edi
	callq	_clear_gather_heap
	cmpl	$0, (%r15)
	jle	LBB0_9
## %bb.2:
	movl	$8, %r12d
	xorl	%ebx, %ebx
	movq	_verbosity@GOTPCREL(%rip), %r13
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
	movslq	(%r15), %rax
	addq	$16, %r12
	cmpq	%rax, %rbx
	jge	LBB0_9
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %rax
	movq	-8(%rax,%r12), %rcx
	testq	%rcx, %rcx
	js	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	(%rax,%r12), %edi
	movq	%rcx, %rsi
	callq	_gather_heap_insert
	testl	%eax, %eax
	jns	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_received_bad_answers@GOTPCREL(%rip), %rax
	incl	(%rax)
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$4, (%r13)
	jl	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	callq	_fprintf
	jmp	LBB0_8
LBB0_9:
	movq	_TL_VECTOR_TOTAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_tl_store_int
	movq	_GH_total@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_tl_store_int
	movl	$4, %edi
	callq	_tl_store_get_ptr
	movl	$0, (%rax)
	cmpl	$0, 4(%r14)
	jle	LBB0_15
## %bb.10:
	movq	%rax, %r12
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	leal	16(,%rax,8), %r13d
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_11 Depth=1
	incl	(%r12)
	xorl	%eax, %eax
	callq	_gather_heap_advance
	movl	(%r12), %eax
	cmpl	4(%r14), %eax
	jge	LBB0_15
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	xorl	%eax, %eax
	callq	_get_gather_heap_head
	testq	%rax, %rax
	je	LBB0_15
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	%rax, %rbx
	movl	4(%rax), %edi
	callq	_tl_store_int
	testb	$8, %r13b
	jne	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_11 Depth=1
	movl	(%rbx), %edi
	callq	_tl_store_int
	jmp	LBB0_14
LBB0_15:
	xorl	%eax, %eax
	callq	_tl_store_end
LBB0_16:
	movq	%r14, %rdi
	movl	$8, %esi
	callq	_zfree
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_merge_delete                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_received_bad_answers,4,2       ## @received_bad_answers
	.comm	_verbosity,4,2                  ## @verbosity
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Dropping result %d (num = %d)\n"

	.comm	_TL_VECTOR_TOTAL,4,2            ## @TL_VECTOR_TOTAL
	.comm	_GH_total,4,2                   ## @GH_total
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sum_search_on_end              ; -- Begin function sum_search_on_end
	.p2align	2
_sum_search_on_end:                     ; @sum_search_on_end
	.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
	ldr	x20, [x0, #16]
	bl	_merge_init_response
	tbnz	x0, #63, LBB0_16
; %bb.1:
	ldr	w8, [x20]
	tst	w8, #0x1
	mov	w9, #16
	mov	w10, #24
	csel	w23, w10, w9, eq
	mov	x0, x23
	bfxil	w0, w8, #0, #3
	bl	_clear_gather_heap
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.2:
	mov	x24, #0
	mov	x21, #0
Lloh0:
	adrp	x25, _received_bad_answers@GOTPAGE
Lloh1:
	ldr	x25, [x25, _received_bad_answers@GOTPAGEOFF]
Lloh2:
	adrp	x26, _verbosity@GOTPAGE
Lloh3:
	ldr	x26, [x26, _verbosity@GOTPAGEOFF]
Lloh4:
	adrp	x27, _stderr@GOTPAGE
Lloh5:
	ldr	x27, [x27, _stderr@GOTPAGEOFF]
Lloh6:
	adrp	x22, l_.str@PAGE
Lloh7:
	add	x22, x22, l_.str@PAGEOFF
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x21, x21, #1
	ldrsw	x8, [x19]
	add	x24, x24, #16
	cmp	x21, x8
	b.ge	LBB0_9
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	x3, [x8, x24]
	tbnz	x3, #63, LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x8, x8, x24
	ldr	w0, [x8, #8]
	mov	x1, x3
	bl	_gather_heap_insert
	tbz	w0, #31, LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x25]
	add	w8, w8, #1
	str	w8, [x25]
	b	LBB0_3
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x26]
	cmp	w8, #4
	b.lt	LBB0_3
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x27]
	mov	x1, x22
	mov	x2, x21
	bl	_fprintf
	b	LBB0_3
LBB0_9:
Lloh8:
	adrp	x8, _TL_VECTOR_TOTAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _TL_VECTOR_TOTAL@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	bl	_tl_store_int
Lloh11:
	adrp	x8, _GH_total@GOTPAGE
Lloh12:
	ldr	x8, [x8, _GH_total@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	bl	_tl_store_int
	mov	w0, #4
	bl	_tl_store_get_ptr
	str	wzr, [x0]
	ldr	w8, [x20, #4]
	cmp	w8, #1
	b.lt	LBB0_15
; %bb.10:
	mov	x21, x0
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	ldr	w8, [x21]
	add	w8, w8, #1
	str	w8, [x21]
	bl	_gather_heap_advance
	ldr	w8, [x21]
	ldr	w9, [x20, #4]
	cmp	w8, w9
	b.ge	LBB0_15
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	bl	_get_gather_heap_head
	cbz	x0, LBB0_15
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	x22, x0
	ldr	w0, [x0, #4]
	bl	_tl_store_int
	tbnz	w23, #3, LBB0_11
; %bb.14:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	w0, [x22]
	bl	_tl_store_int
	b	LBB0_11
LBB0_15:
	bl	_tl_store_end
LBB0_16:
	mov	x0, x20
	mov	w1, #8
	bl	_zfree
	mov	x0, x19
	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
	b	_merge_delete
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_received_bad_answers,4,2       ; @received_bad_answers
	.comm	_verbosity,4,2                  ; @verbosity
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Dropping result %d (num = %d)\n"

	.comm	_TL_VECTOR_TOTAL,4,2            ; @TL_VECTOR_TOTAL
	.comm	_GH_total,4,2                   ; @GH_total
.subsections_via_symbols
