	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tipc_ref_discard               ## -- Begin function tipc_ref_discard
	.p2align	4, 0x90
_tipc_ref_discard:                      ## @tipc_ref_discard
	.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	_tipc_ref_table@GOTPCREL(%rip), %r14
	movq	24(%r14), %rbx
	testq	%rbx, %rbx
	je	LBB0_10
## %bb.1:
	movq	%rdi, %r15
	movq	(%r14), %r13
	movq	%r13, %r12
	andq	%rdi, %r12
	movq	_ref_table_lock@GOTPCREL(%rip), %rdi
	callq	_write_lock_bh
	movq	%r12, %rax
	shlq	$4, %rax
	cmpq	$0, 8(%rbx,%rax)
	je	LBB0_2
## %bb.3:
	cmpq	%r15, (%rbx,%rax)
	jne	LBB0_4
## %bb.5:
	leaq	(%rbx,%rax), %rcx
	addq	$8, %rcx
	addq	%rax, %rbx
	movq	$0, (%rcx)
	movq	%r13, %rax
	notq	%rax
	andq	%r15, %rax
	addq	%r13, %rax
	incq	%rax
	movq	%rax, (%rbx)
	cmpq	$0, 8(%r14)
	je	LBB0_6
## %bb.7:
	movq	16(%r14), %rax
	movq	24(%r14), %rcx
	shlq	$4, %rax
	orq	%r12, (%rcx,%rax)
	jmp	LBB0_8
LBB0_10:
	leaq	L_.str(%rip), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_err                            ## TAILCALL
LBB0_2:
	leaq	L_.str.1(%rip), %rdi
	callq	_err
	jmp	LBB0_9
LBB0_4:
	leaq	L_.str.2(%rip), %rdi
	callq	_err
	jmp	LBB0_9
LBB0_6:
	movq	%r12, 8(%r14)
LBB0_8:
	movq	%r12, 16(%r14)
LBB0_9:
	movq	_ref_table_lock@GOTPCREL(%rip), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_write_unlock_bh                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_tipc_ref_table,32,3            ## @tipc_ref_table
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Reference table not found during discard attempt\n"

	.comm	_ref_table_lock,4,2             ## @ref_table_lock
L_.str.1:                               ## @.str.1
	.asciz	"Attempt to discard reference to non-existent object\n"

L_.str.2:                               ## @.str.2
	.asciz	"Attempt to discard non-existent reference\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tipc_ref_discard               ; -- Begin function tipc_ref_discard
	.p2align	2
_tipc_ref_discard:                      ; @tipc_ref_discard
	.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
Lloh0:
	adrp	x20, _tipc_ref_table@GOTPAGE
Lloh1:
	ldr	x20, [x20, _tipc_ref_table@GOTPAGEOFF]
	ldr	x23, [x20, #24]
	cbz	x23, LBB0_5
; %bb.1:
	mov	x19, x0
	ldr	x22, [x20]
	and	x21, x22, x0
Lloh2:
	adrp	x0, _ref_table_lock@GOTPAGE
Lloh3:
	ldr	x0, [x0, _ref_table_lock@GOTPAGEOFF]
	bl	_write_lock_bh
	add	x8, x23, x21, lsl #4
	mov	x9, x8
	ldr	x10, [x9, #8]!
	cbz	x10, LBB0_6
; %bb.2:
	ldr	x10, [x8]
	cmp	x10, x19
	b.ne	LBB0_7
; %bb.3:
	str	xzr, [x9]
	bic	x9, x19, x22
	add	x9, x22, x9
	add	x9, x9, #1
	str	x9, [x8]
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_8
; %bb.4:
	ldp	x9, x8, [x20, #16]
	lsl	x9, x9, #4
	ldr	x10, [x8, x9]
	orr	x10, x10, x21
	str	x10, [x8, x9]
	b	LBB0_9
LBB0_5:
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	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
	b	_err
LBB0_6:
Lloh6:
	adrp	x0, l_.str.1@PAGE
Lloh7:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_err
	b	LBB0_10
LBB0_7:
Lloh8:
	adrp	x0, l_.str.2@PAGE
Lloh9:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_err
	b	LBB0_10
LBB0_8:
	str	x21, [x20, #8]
LBB0_9:
	str	x21, [x20, #16]
LBB0_10:
Lloh10:
	adrp	x0, _ref_table_lock@GOTPAGE
Lloh11:
	ldr	x0, [x0, _ref_table_lock@GOTPAGEOFF]
	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
	b	_write_unlock_bh
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_tipc_ref_table,32,3            ; @tipc_ref_table
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Reference table not found during discard attempt\n"

	.comm	_ref_table_lock,4,2             ; @ref_table_lock
l_.str.1:                               ; @.str.1
	.asciz	"Attempt to discard reference to non-existent object\n"

l_.str.2:                               ; @.str.2
	.asciz	"Attempt to discard non-existent reference\n"

.subsections_via_symbols
