	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_heap_insert                    ## -- Begin function heap_insert
	.p2align	4, 0x90
_heap_insert:                           ## @heap_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
	movl	%esi, %r14d
	movq	%rdi, %r12
	movq	___use_factor@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_2
## %bb.1:
	mulss	(%r12), %xmm0
LBB0_2:
	movss	%xmm0, -44(%rbp)                ## 4-byte Spill
	movq	8(%r12), %rdi
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.3:
	callq	_calc_domain_hash
	movq	_HS@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cltq
	shlq	$4, %rax
	movq	(%rcx,%rax), %rdx
	movq	___build_heap_generation@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rdx
	jne	LBB0_6
## %bb.4:
	movslq	8(%rcx,%rax), %rdi
	movq	_H@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	leaq	(%rdi,%rdi,2), %rcx
	movss	(%rax,%rcx,8), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	movss	-44(%rbp), %xmm1                ## 4-byte Reload
                                        ## xmm1 = mem[0],zero,zero,zero
	ucomiss	%xmm1, %xmm0
	jae	LBB0_16
## %bb.5:
	movaps	%xmm1, %xmm0
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_heap_sift_down
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_11
LBB0_6:
	movq	_HN@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	___gsort_limit@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.7:
	movq	_H@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movss	24(%rax), %xmm0                 ## xmm0 = mem[0],zero,zero,zero
	movss	-44(%rbp), %xmm1                ## 4-byte Reload
                                        ## xmm1 = mem[0],zero,zero,zero
	ucomiss	%xmm1, %xmm0
	jae	LBB0_16
## %bb.8:
	movaps	%xmm1, %xmm0
	movq	32(%rax), %rax
	movq	_HS@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	shlq	$4, %rax
	decq	(%rcx,%rax)
	movl	$1, %edi
	callq	_heap_sift_down
	jmp	LBB0_10
LBB0_9:
	movss	-44(%rbp), %xmm0                ## 4-byte Reload
                                        ## xmm0 = mem[0],zero,zero,zero
	callq	_heap_sift_up
LBB0_10:
	movl	%eax, %r15d
LBB0_11:
	movl	16(%r12), %eax
	movq	_H@GOTPCREL(%rip), %r13
	movq	(%r13), %rcx
	movslq	%r15d, %rdx
	leaq	(%rdx,%rdx,2), %rbx
	movl	%eax, 20(%rcx,%rbx,8)
	movl	%r14d, 16(%rcx,%rbx,8)
	movq	8(%r12), %rdi
	testq	%rdi, %rdi
	je	LBB0_13
## %bb.12:
	movq	_HS@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	callq	_calc_domain_hash
	movq	(%r13), %rcx
	movq	%rax, 8(%rcx,%rbx,8)
	shlq	$4, %rax
	movl	%r15d, 8(%r14,%rax)
	movq	___build_heap_generation@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	%rdx, (%r14,%rax)
	jmp	LBB0_14
LBB0_16:
	xorl	%eax, %eax
	jmp	LBB0_17
LBB0_13:
	movq	$-1, 8(%rcx,%rbx,8)
LBB0_14:
	leaq	(%rcx,%rbx,8), %rax
	movss	-44(%rbp), %xmm0                ## 4-byte Reload
                                        ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, (%rcx,%rbx,8)
LBB0_17:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	___use_factor,8,3               ## @__use_factor
	.comm	_HS,8,3                         ## @HS
	.comm	___build_heap_generation,8,3    ## @__build_heap_generation
	.comm	_H,8,3                          ## @H
	.comm	_HN,8,3                         ## @HN
	.comm	___gsort_limit,8,3              ## @__gsort_limit
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_heap_insert                    ; -- Begin function heap_insert
	.p2align	2
_heap_insert:                           ; @heap_insert
	.cfi_startproc
; %bb.0:
	stp	d9, d8, [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 b8, -88
	.cfi_offset b9, -96
	mov	x20, x1
	mov	x19, x0
	fmov	s8, s0
Lloh0:
	adrp	x8, ___use_factor@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___use_factor@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	s0, [x19]
	fmul	s8, s0, s8
LBB0_2:
	ldr	x0, [x19, #8]
Lloh3:
	adrp	x23, _HS@GOTPAGE
Lloh4:
	ldr	x23, [x23, _HS@GOTPAGEOFF]
Lloh5:
	adrp	x22, ___build_heap_generation@GOTPAGE
Lloh6:
	ldr	x22, [x22, ___build_heap_generation@GOTPAGEOFF]
	cbz	x0, LBB0_6
; %bb.3:
	bl	_calc_domain_hash
	ldr	x8, [x23]
	sbfiz	x9, x0, #4, #32
	ldr	x9, [x8, x9]
	ldr	x10, [x22]
	cmp	x9, x10
	b.ne	LBB0_6
; %bb.4:
	sxtw	x9, w0
	add	x8, x8, x9, lsl #4
	ldrsw	x0, [x8, #8]
Lloh7:
	adrp	x8, _H@GOTPAGE
Lloh8:
	ldr	x8, [x8, _H@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	mov	w9, #24
	mul	x9, x0, x9
	ldr	s0, [x8, x9]
	fcmp	s0, s8
	b.ge	LBB0_13
; %bb.5:
                                        ; kill: def $w0 killed $w0 killed $x0
	fmov	s0, s8
	bl	_heap_sift_down
	mov	x21, x0
	cbnz	w0, LBB0_11
LBB0_6:
Lloh10:
	adrp	x8, _HN@GOTPAGE
Lloh11:
	ldr	x8, [x8, _HN@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
Lloh13:
	adrp	x9, ___gsort_limit@GOTPAGE
Lloh14:
	ldr	x9, [x9, ___gsort_limit@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.7:
Lloh16:
	adrp	x8, _H@GOTPAGE
Lloh17:
	ldr	x8, [x8, _H@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
	ldr	s0, [x8, #24]
	fcmp	s0, s8
	b.ge	LBB0_13
; %bb.8:
	ldr	x8, [x8, #32]
	ldr	x9, [x23]
	lsl	x8, x8, #4
	ldr	x10, [x9, x8]
	sub	x10, x10, #1
	str	x10, [x9, x8]
	mov	w0, #1
	fmov	s0, s8
	bl	_heap_sift_down
	b	LBB0_10
LBB0_9:
	fmov	s0, s8
	bl	_heap_sift_up
LBB0_10:
	mov	x21, x0
LBB0_11:
	ldr	w9, [x19, #16]
Lloh19:
	adrp	x25, _H@GOTPAGE
Lloh20:
	ldr	x25, [x25, _H@GOTPAGEOFF]
	ldr	x8, [x25]
	sxtw	x24, w21
	mov	w10, #24
	smaddl	x10, w21, w10, x8
	stp	w20, w9, [x10, #16]
	ldr	x0, [x19, #8]
	cbz	x0, LBB0_14
; %bb.12:
	ldr	x19, [x23]
	bl	_calc_domain_hash
	ldr	x8, [x25]
	mov	w9, #24
	madd	x9, x24, x9, x8
	str	x0, [x9, #8]
	add	x9, x19, x0, lsl #4
	str	w21, [x9, #8]
	ldr	x10, [x22]
	str	x10, [x9]
	b	LBB0_15
LBB0_13:
	mov	x0, #0
	b	LBB0_16
LBB0_14:
	mov	w9, #24
	madd	x9, x24, x9, x8
	mov	x10, #-1
	str	x10, [x9, #8]
LBB0_15:
	mov	w9, #24
	madd	x0, x24, x9, x8
	str	s8, [x0]
LBB0_16:
	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	d9, d8, [sp], #96               ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	___use_factor,8,3               ; @__use_factor
	.comm	_HS,8,3                         ; @HS
	.comm	___build_heap_generation,8,3    ; @__build_heap_generation
	.comm	_H,8,3                          ; @H
	.comm	_HN,8,3                         ; @HN
	.comm	___gsort_limit,8,3              ; @__gsort_limit
.subsections_via_symbols
