	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hfsc_graft_class
_hfsc_graft_class:                      ## @hfsc_graft_class
	.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
	cmpq	$0, (%rsi)
	jle	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_6
LBB0_2:
	movq	%rcx, %r14
	movq	%rdx, %r12
	movq	%rsi, %rbx
	movq	%rdi, %r15
	testq	%rdx, %rdx
	jne	LBB0_5
## %bb.3:
	movq	%r15, %rdi
	callq	_qdisc_dev
	movl	(%r15), %esi
	movl	16(%rbx), %ecx
	movq	_pfifo_qdisc_ops@GOTPCREL(%rip), %rdx
	movl	%eax, %edi
	callq	_qdisc_create_dflt
	movq	%rax, %r12
	testq	%rax, %rax
	jne	LBB0_5
## %bb.4:
	movq	_noop_qdisc@GOTPCREL(%rip), %r12
LBB0_5:
	movq	%r15, %rdi
	callq	_sch_tree_lock
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_hfsc_purge_queue
	movq	8(%rbx), %rax
	movq	%rax, (%r14)
	movq	%r12, 8(%rbx)
	movq	%r15, %rdi
	callq	_sch_tree_unlock
	xorl	%eax, %eax
LBB0_6:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_pfifo_qdisc_ops,4,2            ## @pfifo_qdisc_ops
	.comm	_noop_qdisc,4,2                 ## @noop_qdisc
	.no_dead_strip	_hfsc_graft_class
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hfsc_graft_class
_hfsc_graft_class:                      ; @hfsc_graft_class
	.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
	ldr	x8, [x1]
	cmp	x8, #1
	b.lt	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_5
LBB0_2:
	mov	x20, x3
	mov	x22, x2
	mov	x21, x1
	mov	x19, x0
	cbnz	x2, LBB0_4
; %bb.3:
	mov	x0, x19
	bl	_qdisc_dev
	ldr	w1, [x19]
	ldr	w3, [x21, #16]
Lloh3:
	adrp	x2, _pfifo_qdisc_ops@GOTPAGE
Lloh4:
	ldr	x2, [x2, _pfifo_qdisc_ops@GOTPAGEOFF]
	bl	_qdisc_create_dflt
Lloh5:
	adrp	x8, _noop_qdisc@GOTPAGE
Lloh6:
	ldr	x8, [x8, _noop_qdisc@GOTPAGEOFF]
	cmp	x0, #0
	csel	x22, x8, x0, eq
LBB0_4:
	mov	x0, x19
	bl	_sch_tree_lock
	mov	x0, x19
	mov	x1, x21
	bl	_hfsc_purge_queue
	ldr	x8, [x21, #8]
	str	x8, [x20]
	str	x22, [x21, #8]
	mov	x0, x19
	bl	_sch_tree_unlock
	mov	w0, #0
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 AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_pfifo_qdisc_ops,4,2            ; @pfifo_qdisc_ops
	.comm	_noop_qdisc,4,2                 ; @noop_qdisc
	.no_dead_strip	_hfsc_graft_class
.subsections_via_symbols
