	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function add_chan
_add_chan:                              ## @add_chan
	.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
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	_chan_lock@GOTPCREL(%rip), %rdi
	callq	_spin_lock
	movl	(%r15), %edi
	movq	_callid_bitmap@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	testl	%edi, %edi
	je	LBB0_1
## %bb.4:
	callq	_test_bit
	movl	$-1, %ebx
	testq	%rax, %rax
	jne	LBB0_7
## %bb.5:
	movl	(%r15), %eax
	jmp	LBB0_6
LBB0_1:
	movq	_MAX_CALLID@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	movl	_add_chan.call_id(%rip), %edx
	incl	%edx
	movl	%esi, %edi
	movl	%eax, %esi
	callq	_find_next_zero_bit
	movl	%eax, _add_chan.call_id(%rip)
	cmpl	(%r13), %eax
	jne	LBB0_3
## %bb.2:
	movl	(%r12), %edi
	movl	%eax, %esi
	movl	$1, %edx
	callq	_find_next_zero_bit
	movl	%eax, _add_chan.call_id(%rip)
	movl	$-1, %ebx
	cmpl	(%r13), %eax
	je	LBB0_7
LBB0_3:
	movl	%eax, (%r15)
LBB0_6:
	movl	%eax, (%r14)
	movl	(%r15), %edi
	movl	(%r12), %esi
	callq	_set_bit
	movq	_callid_sock@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	(%r15), %rcx
	movl	(%rax,%rcx,4), %edi
	movq	%r14, %rsi
	callq	_rcu_assign_pointer
	xorl	%ebx, %ebx
LBB0_7:
	movq	_chan_lock@GOTPCREL(%rip), %rdi
	callq	_spin_unlock
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_add_chan.call_id,4,2 ## @add_chan.call_id
	.comm	_chan_lock,4,2                  ## @chan_lock
	.comm	_callid_bitmap,4,2              ## @callid_bitmap
	.comm	_MAX_CALLID,4,2                 ## @MAX_CALLID
	.comm	_callid_sock,8,3                ## @callid_sock
	.no_dead_strip	_add_chan
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function add_chan
_add_chan:                              ; @add_chan
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x0, _chan_lock@GOTPAGE
Lloh1:
	ldr	x0, [x0, _chan_lock@GOTPAGEOFF]
	bl	_spin_lock
	ldr	w0, [x20]
Lloh2:
	adrp	x21, _callid_bitmap@GOTPAGE
Lloh3:
	ldr	x21, [x21, _callid_bitmap@GOTPAGEOFF]
	ldr	w1, [x21]
	cbz	w0, LBB0_3
; %bb.1:
	bl	_test_bit
	cbz	x0, LBB0_6
LBB0_2:
	mov	w19, #-1
	b	LBB0_8
LBB0_3:
Lloh4:
	adrp	x22, _MAX_CALLID@GOTPAGE
Lloh5:
	ldr	x22, [x22, _MAX_CALLID@GOTPAGEOFF]
	ldr	w8, [x22]
	adrp	x23, _add_chan.call_id@PAGE
	ldr	w9, [x23, _add_chan.call_id@PAGEOFF]
	add	w2, w9, #1
	mov	x0, x1
	mov	x1, x8
	bl	_find_next_zero_bit
	mov	x1, x0
	str	w0, [x23, _add_chan.call_id@PAGEOFF]
	ldr	w8, [x22]
	cmp	w1, w8
	b.ne	LBB0_5
; %bb.4:
	ldr	w0, [x21]
	mov	w2, #1
	bl	_find_next_zero_bit
	mov	x1, x0
	str	w0, [x23, _add_chan.call_id@PAGEOFF]
	ldr	w8, [x22]
	cmp	w0, w8
	b.eq	LBB0_2
LBB0_5:
	str	w1, [x20]
	b	LBB0_7
LBB0_6:
	ldr	w1, [x20]
LBB0_7:
	str	w1, [x19]
	ldr	w0, [x20]
	ldr	w1, [x21]
	bl	_set_bit
Lloh6:
	adrp	x8, _callid_sock@GOTPAGE
Lloh7:
	ldr	x8, [x8, _callid_sock@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	ldrsw	x9, [x20]
	ldr	w0, [x8, x9, lsl #2]
	mov	x1, x19
	bl	_rcu_assign_pointer
	mov	w19, #0
LBB0_8:
Lloh9:
	adrp	x0, _chan_lock@GOTPAGE
Lloh10:
	ldr	x0, [x0, _chan_lock@GOTPAGEOFF]
	bl	_spin_unlock
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_add_chan.call_id,4,2 ; @add_chan.call_id
	.comm	_chan_lock,4,2                  ; @chan_lock
	.comm	_callid_bitmap,4,2              ; @callid_bitmap
	.comm	_MAX_CALLID,4,2                 ; @MAX_CALLID
	.comm	_callid_sock,8,3                ; @callid_sock
	.no_dead_strip	_add_chan
.subsections_via_symbols
