	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tipc_reg_remove_port           ## -- Begin function tipc_reg_remove_port
	.p2align	4, 0x90
_tipc_reg_remove_port:                  ## @tipc_reg_remove_port
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rax
	xorl	%r14d, %r14d
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	movq	_MAX_USERID@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jle	LBB0_4
## %bb.2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_4:
	movq	_users@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_5
## %bb.6:
	movq	%rdi, %rbx
	movq	_reg_lock@GOTPCREL(%rip), %r15
	movq	%r15, %rdi
	callq	_spin_lock_bh
	addq	$8, %rbx
	movq	%rbx, %rdi
	callq	_list_del_init
	movq	%r15, %rdi
	callq	_spin_unlock_bh
	jmp	LBB0_7
LBB0_5:
	movq	_ENOPROTOOPT@GOTPCREL(%rip), %rax
LBB0_3:
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_7:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_USERID,8,3                 ## @MAX_USERID
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_users,4,2                      ## @users
	.comm	_ENOPROTOOPT,4,2                ## @ENOPROTOOPT
	.comm	_reg_lock,4,2                   ## @reg_lock
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tipc_reg_remove_port           ; -- Begin function tipc_reg_remove_port
	.p2align	2
_tipc_reg_remove_port:                  ; @tipc_reg_remove_port
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	x8, [x0]
	cbz	x8, LBB0_5
; %bb.1:
Lloh0:
	adrp	x9, _MAX_USERID@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MAX_USERID@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.le	LBB0_3
; %bb.2:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_7
LBB0_3:
Lloh5:
	adrp	x8, _users@GOTPAGE
Lloh6:
	ldr	x8, [x8, _users@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cbz	w8, LBB0_6
; %bb.4:
	mov	x19, x0
Lloh8:
	adrp	x20, _reg_lock@GOTPAGE
Lloh9:
	ldr	x20, [x20, _reg_lock@GOTPAGEOFF]
	mov	x0, x20
	bl	_spin_lock_bh
	add	x0, x19, #8
	bl	_list_del_init
	mov	x0, x20
	bl	_spin_unlock_bh
LBB0_5:
	mov	w0, #0
	b	LBB0_8
LBB0_6:
Lloh10:
	adrp	x8, _ENOPROTOOPT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOPROTOOPT@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_USERID,8,3                 ; @MAX_USERID
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_users,4,2                      ; @users
	.comm	_ENOPROTOOPT,4,2                ; @ENOPROTOOPT
	.comm	_reg_lock,4,2                   ; @reg_lock
.subsections_via_symbols
