	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_paste_selection                ## -- Begin function paste_selection
	.p2align	4, 0x90
_paste_selection:                       ## @paste_selection
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	16(%rdi), %r15
	movq	_wait@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	movq	_current@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_DECLARE_WAITQUEUE
	xorl	%eax, %eax
	callq	_acquire_console_sem
	xorl	%eax, %eax
	callq	_poke_blanked_console
	xorl	%eax, %eax
	callq	_release_console_sem
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_tty_ldisc_ref_wait
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_add_wait_queue
	movq	_sel_buffer@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_6
## %bb.1:
	movq	_sel_buffer_lth@GOTPCREL(%rip), %r14
	cmpl	$0, (%r14)
	jle	LBB0_6
## %bb.2:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	leaq	12(%rax), %rbx
	movq	_TASK_INTERRUPTIBLE@GOTPCREL(%rip), %r12
	movq	_TTY_THROTTLED@GOTPCREL(%rip), %r13
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %edi
	callq	_set_current_state
	movl	(%r13), %edi
	movq	%rbx, %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	xorl	%eax, %eax
	callq	_schedule
	movq	_sel_buffer@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	%r15d, (%r14)
	jg	LBB0_3
	jmp	LBB0_6
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	(%r14), %edi
	subl	%r15d, %edi
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	8(%rax), %esi
	callq	_min
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	(%rdi), %rcx
	movq	(%rcx), %r8
	movslq	%r15d, %rsi
	movq	_sel_buffer@GOTPCREL(%rip), %rcx
	addq	(%rcx), %rsi
	xorl	%edx, %edx
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movl	%eax, %ecx
	callq	*(%r8)
	movq	_sel_buffer@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_6
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	addl	-52(%rbp), %r15d                ## 4-byte Folded Reload
	cmpl	%r15d, (%r14)
	jg	LBB0_3
LBB0_6:
	movq	_wait@GOTPCREL(%rip), %rsi
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_remove_wait_queue
	movq	_TASK_RUNNING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	___set_current_state
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_tty_ldisc_deref
	xorl	%eax, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_wait,4,2                       ## @wait
	.comm	_current,4,2                    ## @current
	.comm	_sel_buffer,8,3                 ## @sel_buffer
	.comm	_sel_buffer_lth,4,2             ## @sel_buffer_lth
	.comm	_TASK_INTERRUPTIBLE,4,2         ## @TASK_INTERRUPTIBLE
	.comm	_TTY_THROTTLED,4,2              ## @TTY_THROTTLED
	.comm	_TASK_RUNNING,4,2               ## @TASK_RUNNING
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_paste_selection                ; -- Begin function paste_selection
	.p2align	2
_paste_selection:                       ; @paste_selection
	.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	x20, x0
	ldr	x19, [x0, #16]
Lloh0:
	adrp	x22, _wait@GOTPAGE
Lloh1:
	ldr	x22, [x22, _wait@GOTPAGEOFF]
	ldr	w0, [x22]
Lloh2:
	adrp	x8, _current@GOTPAGE
Lloh3:
	ldr	x8, [x8, _current@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	bl	_DECLARE_WAITQUEUE
	bl	_acquire_console_sem
	bl	_poke_blanked_console
	bl	_release_console_sem
	mov	x0, x20
	bl	_tty_ldisc_ref_wait
	mov	x21, x0
	mov	x0, x19
	mov	x1, x22
	bl	_add_wait_queue
Lloh5:
	adrp	x24, _sel_buffer@GOTPAGE
Lloh6:
	ldr	x24, [x24, _sel_buffer@GOTPAGEOFF]
	ldr	x8, [x24]
Lloh7:
	adrp	x25, _sel_buffer_lth@GOTPAGE
Lloh8:
	ldr	x25, [x25, _sel_buffer_lth@GOTPAGEOFF]
	ldr	w9, [x25]
	cmp	x8, #0
	ccmp	w9, #1, #8, ne
	b.ge	LBB0_2
LBB0_1:
Lloh9:
	adrp	x1, _wait@GOTPAGE
Lloh10:
	ldr	x1, [x1, _wait@GOTPAGEOFF]
	mov	x0, x19
	bl	_remove_wait_queue
Lloh11:
	adrp	x8, _TASK_RUNNING@GOTPAGE
Lloh12:
	ldr	x8, [x8, _TASK_RUNNING@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	bl	___set_current_state
	mov	x0, x21
	bl	_tty_ldisc_deref
	mov	w0, #0
	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
LBB0_2:
	mov	w26, #0
	add	x22, x20, #12
Lloh14:
	adrp	x27, _TASK_INTERRUPTIBLE@GOTPAGE
Lloh15:
	ldr	x27, [x27, _TASK_INTERRUPTIBLE@GOTPAGEOFF]
Lloh16:
	adrp	x28, _TTY_THROTTLED@GOTPAGE
Lloh17:
	ldr	x28, [x28, _TTY_THROTTLED@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x27]
	bl	_set_current_state
	ldr	w0, [x28]
	mov	x1, x22
	bl	_test_bit
	cbz	x0, LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	bl	_schedule
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x24]
	ldr	w9, [x25]
	cmp	x8, #0
	ccmp	w9, w26, #4, ne
	b.gt	LBB0_3
	b	LBB0_1
LBB0_6:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x25]
	sub	w0, w8, w26
	ldr	w1, [x20, #8]
	bl	_min
	mov	x23, x0
	ldr	x8, [x20]
	ldr	x8, [x8]
	ldr	x8, [x8]
	ldr	x9, [x24]
	add	x1, x9, w26, sxtw
	mov	x0, x20
	mov	x2, #0
	mov	x3, x23
	blr	x8
	add	w26, w23, w26
	b	LBB0_5
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_wait,4,2                       ; @wait
	.comm	_current,4,2                    ; @current
	.comm	_sel_buffer,8,3                 ; @sel_buffer
	.comm	_sel_buffer_lth,4,2             ; @sel_buffer_lth
	.comm	_TASK_INTERRUPTIBLE,4,2         ; @TASK_INTERRUPTIBLE
	.comm	_TTY_THROTTLED,4,2              ; @TTY_THROTTLED
	.comm	_TASK_RUNNING,4,2               ; @TASK_RUNNING
.subsections_via_symbols
