	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qfq_new_queue
_qfq_new_queue:                         ## @qfq_new_queue
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	(%rdi), %rax
	movq	8(%rdi), %r15
	movq	(%rax), %rax
	movq	(%rax), %rsi
	movq	8(%rax), %rax
	movq	%rax, (%rdi)
	testq	%rsi, %rsi
	je	LBB0_2
## %bb.1:
	movq	_QFQ_MAX_WEIGHT@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rsi
	jle	LBB0_3
LBB0_2:
	leaq	L_.str(%rip), %rdi
	callq	_D
	movl	$1, %esi
LBB0_3:
	movq	_ONE_FP@GOTPCREL(%rip), %r12
	movq	(%r12), %rcx
	movq	%rcx, %rax
	orq	%rsi, %rax
	shrq	$32, %rax
	je	LBB0_4
## %bb.5:
	movq	%rcx, %rax
	cqto
	idivq	%rsi
	movq	%rax, %rdi
	jmp	LBB0_6
LBB0_4:
	movl	%ecx, %eax
	xorl	%edx, %edx
	divl	%esi
	movl	%eax, %edi
LBB0_6:
	movq	%rdi, 8(%r14)
	movq	%rcx, %rax
	orq	%rdi, %rax
	shrq	$32, %rax
	je	LBB0_7
## %bb.8:
	movq	%rcx, %rax
	cqto
	idivq	%rdi
	movq	%rax, %rbx
	jmp	LBB0_9
LBB0_7:
	movl	%ecx, %eax
	xorl	%edx, %edx
	divl	%edi
	movl	%eax, %ebx
LBB0_9:
	movq	1(%r15), %rax
	addq	%rbx, %rax
	movq	_QFQ_MAX_WSUM@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jle	LBB0_11
## %bb.10:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_15
LBB0_11:
	movq	(%r14), %rsi
	callq	_qfq_calc_index
	cltq
	shlq	$2, %rax
	addq	17(%r15), %rax
	movq	%rax, 16(%r14)
	addq	1(%r15), %rbx
	movq	%rbx, 1(%r15)
	movq	(%r12), %rax
	movq	%rax, %rcx
	orq	%rbx, %rcx
	shrq	$32, %rcx
	je	LBB0_12
## %bb.13:
	cqto
	idivq	%rbx
	jmp	LBB0_14
LBB0_12:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ebx
                                        ## kill: def $eax killed $eax def $rax
LBB0_14:
	movq	%rax, 9(%r15)
	xorl	%eax, %eax
LBB0_15:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_QFQ_MAX_WEIGHT,8,3             ## @QFQ_MAX_WEIGHT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"rounding weight to 1"

	.comm	_ONE_FP,8,3                     ## @ONE_FP
	.comm	_QFQ_MAX_WSUM,8,3               ## @QFQ_MAX_WSUM
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_qfq_new_queue
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qfq_new_queue
_qfq_new_queue:                         ; @qfq_new_queue
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	ldp	x8, x20, [x0]
	ldr	x9, [x8]
	ldp	x8, x9, [x9]
	str	x9, [x0]
Lloh0:
	adrp	x9, _QFQ_MAX_WEIGHT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _QFQ_MAX_WEIGHT@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, #0
	ccmp	x8, x9, #0, ne
	b.le	LBB0_2
; %bb.1:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_D
	mov	w8, #1
LBB0_2:
Lloh5:
	adrp	x21, _ONE_FP@GOTPAGE
Lloh6:
	ldr	x21, [x21, _ONE_FP@GOTPAGEOFF]
	ldr	x9, [x21]
	sdiv	x0, x9, x8
	str	x0, [x19, #8]
	sdiv	x22, x9, x0
	ldur	x8, [x20, #1]
Lloh7:
	adrp	x9, _QFQ_MAX_WSUM@GOTPAGE
Lloh8:
	ldr	x9, [x9, _QFQ_MAX_WSUM@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	add	x8, x8, x22
	cmp	x8, x9
	b.le	LBB0_4
; %bb.3:
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	b	LBB0_5
LBB0_4:
	ldr	x1, [x19]
	bl	_qfq_calc_index
	mov	x8, x0
	mov	w0, #0
	ldur	x9, [x20, #17]
	add	x8, x9, w8, sxtw #2
	str	x8, [x19, #16]
	ldur	x8, [x20, #1]
	add	x8, x8, x22
	stur	x8, [x20, #1]
	ldr	x9, [x21]
	sdiv	x8, x9, x8
	stur	x8, [x20, #9]
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_QFQ_MAX_WEIGHT,8,3             ; @QFQ_MAX_WEIGHT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"rounding weight to 1"

	.comm	_ONE_FP,8,3                     ; @ONE_FP
	.comm	_QFQ_MAX_WSUM,8,3               ; @QFQ_MAX_WSUM
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_qfq_new_queue
.subsections_via_symbols
