	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SetKillRing                    ## -- Begin function SetKillRing
	.p2align	4, 0x90
_SetKillRing:                           ## @SetKillRing
	.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
	cmpl	$2, %edi
	movl	$1, %r12d
	cmovgel	%edi, %r12d
	movq	_KillRingMax@GOTPCREL(%rip), %r15
	cmpl	(%r15), %r12d
	je	LBB0_16
## %bb.1:
	movl	%r12d, %edi
	movl	$8, %esi
	callq	_xcalloc
	movq	%rax, %r14
	movq	_KillRing@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rdi
	testq	%rdi, %rdi
	je	LBB0_15
## %bb.2:
	movq	_KillRingLen@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	testl	%ecx, %ecx
	je	LBB0_14
## %bb.3:
	movl	%ecx, %eax
	movq	_KillPos@GOTPCREL(%rip), %r8
	movl	(%r8), %ebx
	subl	%r12d, %eax
	jle	LBB0_4
## %bb.5:
	addl	%ebx, %eax
	cltd
	idivl	%ecx
	movl	%r12d, %r9d
	movl	%edx, %ebx
	testl	%ecx, %ecx
	jg	LBB0_7
	jmp	LBB0_13
LBB0_4:
	movl	%ecx, %r9d
	testl	%ecx, %ecx
	jle	LBB0_13
LBB0_7:
	movl	%r9d, -44(%rbp)                 ## 4-byte Spill
	movslq	%r9d, %r15
	xorl	%r13d, %r13d
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	(%rsi), %rax
	movslq	%ebx, %rcx
	movq	(%rax,%rcx,8), %rdi
	callq	_xfree
	movq	_KillRing@GOTPCREL(%rip), %rsi
	movq	_KillRingLen@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
LBB0_11:                                ##   in Loop: Header=BB0_8 Depth=1
	incl	%ebx
	movl	%ebx, %eax
	cltd
	idivl	%ecx
	incq	%r13
	movslq	%ecx, %rax
	movl	%edx, %ebx
	cmpq	%rax, %r13
	jge	LBB0_12
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%r15, %r13
	jge	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movq	(%rsi), %rax
	movslq	%ebx, %rdx
	movq	(%rax,%rdx,8), %rax
	movq	%rax, (%r14,%r13,8)
	jmp	LBB0_11
LBB0_12:
	movq	(%rsi), %rdi
	movq	_KillRingMax@GOTPCREL(%rip), %r15
	movq	_KillPos@GOTPCREL(%rip), %r8
	movl	-44(%rbp), %r9d                 ## 4-byte Reload
LBB0_13:
	movq	_KillRingLen@GOTPCREL(%rip), %rax
	movl	%r9d, (%rax)
	movl	%r9d, %eax
	cltd
	idivl	%r12d
	movl	%edx, (%r8)
	decl	%r9d
	movq	_YankPos@GOTPCREL(%rip), %rax
	movl	%r9d, (%rax)
LBB0_14:
	callq	_xfree
	movq	_KillRing@GOTPCREL(%rip), %rsi
LBB0_15:
	movq	%r14, (%rsi)
	movl	%r12d, (%r15)
LBB0_16:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_KillRingMax,4,2                ## @KillRingMax
	.comm	_KillRing,8,3                   ## @KillRing
	.comm	_KillRingLen,4,2                ## @KillRingLen
	.comm	_KillPos,4,2                    ## @KillPos
	.comm	_YankPos,4,2                    ## @YankPos
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SetKillRing                    ; -- Begin function SetKillRing
	.p2align	2
_SetKillRing:                           ; @SetKillRing
	.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
	cmp	w0, #1
	csinc	w19, w0, wzr, gt
Lloh0:
	adrp	x21, _KillRingMax@GOTPAGE
Lloh1:
	ldr	x21, [x21, _KillRingMax@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w19, w8
	b.eq	LBB0_15
; %bb.1:
	mov	x0, x19
	mov	w1, #8
	bl	_xcalloc
	mov	x20, x0
Lloh2:
	adrp	x22, _KillRing@GOTPAGE
Lloh3:
	ldr	x22, [x22, _KillRing@GOTPAGEOFF]
	ldr	x0, [x22]
	cbz	x0, LBB0_14
; %bb.2:
Lloh4:
	adrp	x23, _KillRingLen@GOTPAGE
Lloh5:
	ldr	x23, [x23, _KillRingLen@GOTPAGEOFF]
	ldr	w8, [x23]
	cbz	w8, LBB0_13
; %bb.3:
Lloh6:
	adrp	x24, _KillPos@GOTPAGE
Lloh7:
	ldr	x24, [x24, _KillPos@GOTPAGEOFF]
	ldr	w26, [x24]
	mov	x25, x8
	subs	w9, w8, w19
	b.le	LBB0_5
; %bb.4:
	add	w9, w9, w26
	sdiv	w10, w9, w8
	msub	w26, w10, w8, w9
	mov	x25, x19
LBB0_5:
	cmp	w8, #1
	b.lt	LBB0_12
; %bb.6:
	mov	x27, #0
	sxtw	x28, w25
	b	LBB0_9
LBB0_7:                                 ;   in Loop: Header=BB0_9 Depth=1
	ldr	x8, [x22]
	ldr	x0, [x8, w26, sxtw #3]
	bl	_xfree
	ldr	w8, [x23]
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	add	w9, w26, #1
	sdiv	w10, w9, w8
	msub	w26, w10, w8, w9
	add	x27, x27, #1
	cmp	x27, w8, sxtw
	b.ge	LBB0_11
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	cmp	x27, x28
	b.ge	LBB0_7
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	x9, [x22]
	ldr	x9, [x9, w26, sxtw #3]
	str	x9, [x20, x27, lsl #3]
	b	LBB0_8
LBB0_11:
	ldr	x0, [x22]
LBB0_12:
	str	w25, [x23]
	sdiv	w8, w25, w19
	msub	w8, w8, w19, w25
	str	w8, [x24]
	sub	w8, w25, #1
Lloh8:
	adrp	x9, _YankPos@GOTPAGE
Lloh9:
	ldr	x9, [x9, _YankPos@GOTPAGEOFF]
Lloh10:
	str	w8, [x9]
LBB0_13:
	bl	_xfree
LBB0_14:
	str	x20, [x22]
	str	w19, [x21]
LBB0_15:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotStr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_KillRingMax,4,2                ; @KillRingMax
	.comm	_KillRing,8,3                   ; @KillRing
	.comm	_KillRingLen,4,2                ; @KillRingLen
	.comm	_KillPos,4,2                    ; @KillPos
	.comm	_YankPos,4,2                    ; @YankPos
.subsections_via_symbols
