	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function QUARTZ_InsertAviseEntryFromQueue
_QUARTZ_InsertAviseEntryFromQueue:      ## @QUARTZ_InsertAviseEntryFromQueue
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	(%rdx), %rcx
	testq	%rcx, %rcx
	je	LBB0_6
## %bb.1:
	movq	8(%rsi), %r8
	addq	(%rsi), %r8
	movq	8(%rcx), %rax
	addq	(%rcx), %rax
	cmpq	%r8, %rax
	jge	LBB0_2
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rcx, %rax
	movq	24(%rcx), %rcx
	testq	%rcx, %rcx
	je	LBB0_11
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	8(%rcx), %rdi
	addq	(%rcx), %rdi
	cmpq	%r8, %rdi
	jl	LBB0_3
## %bb.5:
	testq	%rax, %rax
	je	LBB0_6
LBB0_11:
	movq	%rax, 16(%rsi)
	movq	24(%rax), %rcx
	movq	%rcx, 24(%rsi)
	movq	%rsi, 24(%rax)
	movq	24(%rsi), %rdx
	testq	%rdx, %rdx
	je	LBB0_14
## %bb.12:
	addq	$16, %rdx
	jmp	LBB0_13
LBB0_2:
	xorl	%eax, %eax
	testq	%rax, %rax
	jne	LBB0_11
LBB0_6:
	movq	$0, 16(%rsi)
	movq	(%rdx), %rax
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movq	24(%rax), %rax
	movq	%rax, 24(%rsi)
	testq	%rax, %rax
	je	LBB0_13
LBB0_10:
	movq	%rsi, 16(%rax)
LBB0_13:
	movq	%rsi, (%rdx)
LBB0_14:
	popq	%rbp
	retq
LBB0_7:
	movq	24(%rsi), %rax
	testq	%rax, %rax
	jne	LBB0_10
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_QUARTZ_InsertAviseEntryFromQueue
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function QUARTZ_InsertAviseEntryFromQueue
_QUARTZ_InsertAviseEntryFromQueue:      ; @QUARTZ_InsertAviseEntryFromQueue
	.cfi_startproc
; %bb.0:
	ldr	x8, [x2]
	cbz	x8, LBB0_8
; %bb.1:
	ldp	x9, x10, [x1]
	add	x10, x10, x9
	ldp	x9, x11, [x8]
	add	x9, x11, x9
	cmp	x9, x10
	b.ge	LBB0_7
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x9, x8
	ldr	x8, [x8, #24]
	cbz	x8, LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldp	x11, x12, [x8]
	add	x11, x12, x11
	cmp	x11, x10
	b.lt	LBB0_2
; %bb.4:
	cbz	x9, LBB0_8
LBB0_5:
	ldr	x8, [x9, #24]
	stp	x9, x8, [x1, #16]
	str	x1, [x9, #24]
	ldr	x8, [x1, #24]
	cbz	x8, LBB0_12
; %bb.6:
	add	x2, x8, #16
	b	LBB0_11
LBB0_7:
	mov	x9, #0
	cbnz	x9, LBB0_5
LBB0_8:
	str	xzr, [x1, #16]
	ldr	x8, [x2]
	cbz	x8, LBB0_13
; %bb.9:
	ldr	x8, [x8, #24]
	str	x8, [x1, #24]
	cbz	x8, LBB0_11
LBB0_10:
	str	x1, [x8, #16]
LBB0_11:
	str	x1, [x2]
LBB0_12:
	ret
LBB0_13:
	ldr	x8, [x1, #24]
	cbnz	x8, LBB0_10
	b	LBB0_11
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_QUARTZ_InsertAviseEntryFromQueue
.subsections_via_symbols
