	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tipc_ref_acquire               ## -- Begin function tipc_ref_acquire
	.p2align	4, 0x90
_tipc_ref_acquire:                      ## @tipc_ref_acquire
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.3:
	movq	_tipc_ref_table@GOTPCREL(%rip), %r12
	cmpq	$0, 40(%r12)
	je	LBB0_4
## %bb.5:
	movq	%rsi, %r13
	movq	%rdi, %r15
	movq	_ref_table_lock@GOTPCREL(%rip), %rdi
	callq	_write_lock_bh
	movslq	(%r12), %r14
	testq	%r14, %r14
	je	LBB0_7
## %bb.6:
	movq	8(%r12), %rbx
	movq	40(%r12), %r12
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	leaq	(%r14,%r14,2), %r13
	leaq	(%r12,%r13,8), %rdi
	addq	$8, %rdi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_spin_lock_bh
	movq	(%r12,%r13,8), %rax
	movl	%ebx, %ecx
	andl	%eax, %ecx
	movq	_tipc_ref_table@GOTPCREL(%rip), %rdx
	movl	%ecx, (%rdx)
	notq	%rbx
	andq	%rax, %rbx
	addq	%r14, %rbx
	movq	%rbx, (%r12,%r13,8)
	leaq	(%r12,%r13,8), %rax
	addq	$16, %rax
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	jmp	LBB0_10
LBB0_1:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_2
LBB0_4:
	leaq	L_.str.1(%rip), %rdi
LBB0_2:
	callq	_err
	xorl	%ebx, %ebx
	jmp	LBB0_12
LBB0_7:
	movq	16(%r12), %rbx
	cmpq	24(%r12), %rbx
	jge	LBB0_8
## %bb.9:
	leaq	1(%rbx), %rax
	movq	%rax, 16(%r12)
	movq	40(%r12), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	leaq	(%rbx,%rbx,2), %r12
	leaq	(%rax,%r12,8), %r14
	addq	$8, %r14
	movq	%r14, %rdi
	callq	_spin_lock_init
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	callq	_spin_lock_bh
	movq	_tipc_ref_table@GOTPCREL(%rip), %rax
	addq	32(%rax), %rbx
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rbx, (%rax,%r12,8)
	leaq	(%rax,%r12,8), %rax
	addq	$16, %rax
LBB0_10:
	movq	%r15, (%rax)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, (%r13)
	jmp	LBB0_11
LBB0_8:
	xorl	%ebx, %ebx
LBB0_11:
	movq	_ref_table_lock@GOTPCREL(%rip), %rdi
	callq	_write_unlock_bh
LBB0_12:
	movq	%rbx, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Attempt to acquire reference to non-existent object\n"

	.comm	_tipc_ref_table,48,3            ## @tipc_ref_table
L_.str.1:                               ## @.str.1
	.asciz	"Reference table not found during acquisition attempt\n"

	.comm	_ref_table_lock,4,2             ## @ref_table_lock
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tipc_ref_acquire               ; -- Begin function tipc_ref_acquire
	.p2align	2
_tipc_ref_acquire:                      ; @tipc_ref_acquire
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	cbz	x0, LBB0_4
; %bb.1:
Lloh0:
	adrp	x22, _tipc_ref_table@GOTPAGE
Lloh1:
	ldr	x22, [x22, _tipc_ref_table@GOTPAGEOFF]
	ldr	x8, [x22, #40]
	cbz	x8, LBB0_5
; %bb.2:
	mov	x19, x1
	mov	x20, x0
Lloh2:
	adrp	x0, _ref_table_lock@GOTPAGE
Lloh3:
	ldr	x0, [x0, _ref_table_lock@GOTPAGEOFF]
	bl	_write_lock_bh
	ldrsw	x24, [x22]
	cbz	w24, LBB0_7
; %bb.3:
	ldr	x8, [x22, #40]
	ldr	x25, [x22, #8]
	mov	w9, #24
	madd	x23, x24, x9, x8
	add	x21, x23, #8
	mov	x0, x21
	bl	_spin_lock_bh
	ldr	x8, [x23]
	and	w9, w8, w25
	str	w9, [x22]
	bic	x8, x8, x25
	b	LBB0_9
LBB0_4:
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_6
LBB0_5:
Lloh6:
	adrp	x0, l_.str.1@PAGE
Lloh7:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_6:
	bl	_err
	mov	x22, #0
	b	LBB0_12
LBB0_7:
	ldp	x24, x8, [x22, #16]
	cmp	x24, x8
	b.ge	LBB0_10
; %bb.8:
	add	x8, x24, #1
	str	x8, [x22, #16]
	ldr	x8, [x22, #40]
	mov	w9, #24
	madd	x23, x24, x9, x8
	add	x21, x23, #8
	mov	x0, x21
	bl	_spin_lock_init
	mov	x0, x21
	bl	_spin_lock_bh
	ldr	x8, [x22, #32]
LBB0_9:
	add	x22, x8, x24
	str	x22, [x23], #16
	str	x20, [x23]
	str	x21, [x19]
	b	LBB0_11
LBB0_10:
	mov	x22, #0
LBB0_11:
Lloh8:
	adrp	x0, _ref_table_lock@GOTPAGE
Lloh9:
	ldr	x0, [x0, _ref_table_lock@GOTPAGEOFF]
	bl	_write_unlock_bh
LBB0_12:
	mov	x0, x22
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Attempt to acquire reference to non-existent object\n"

	.comm	_tipc_ref_table,48,3            ; @tipc_ref_table
l_.str.1:                               ; @.str.1
	.asciz	"Reference table not found during acquisition attempt\n"

	.comm	_ref_table_lock,4,2             ; @ref_table_lock
.subsections_via_symbols
