	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tipc_deleteport                ## -- Begin function tipc_deleteport
	.p2align	4, 0x90
_tipc_deleteport:                       ## @tipc_deleteport
	.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
	movl	%edi, %r14d
	xorl	%r15d, %r15d
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_tipc_withdraw
	movl	%r14d, %edi
	callq	_tipc_port_lock
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movl	%r14d, %edi
	callq	_tipc_ref_discard
	movq	%rbx, %rdi
	callq	_tipc_port_unlock
	movq	%rbx, %rdi
	callq	_k_cancel_timer
	cmpq	$0, 32(%rbx)
	je	LBB0_3
## %bb.4:
	movq	_TIPC_ERR_NO_PORT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_port_build_peer_abort_msg
	movq	%rax, %r15
	leaq	24(%rbx), %rdi
	callq	_tipc_nodesub_unsubscribe
	jmp	LBB0_5
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_8
LBB0_3:
	xorl	%r15d, %r15d
LBB0_5:
	movq	16(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.6:
	callq	_tipc_reg_remove_port
	movq	16(%rbx), %rdi
	callq	_kfree
LBB0_7:
	movq	_tipc_port_list_lock@GOTPCREL(%rip), %r12
	movq	%r12, %rdi
	callq	_spin_lock_bh
	leaq	8(%rbx), %rdi
	callq	_list_del
	movq	%rbx, %rdi
	addq	$4, %rdi
	callq	_list_del
	movq	%r12, %rdi
	callq	_spin_unlock_bh
	movq	%rbx, %rdi
	callq	_k_term_timer
	movq	%rbx, %rdi
	callq	_kfree
	leaq	L_.str(%rip), %rdi
	movl	%r14d, %esi
	callq	_dbg
	movq	%r15, %rdi
	callq	_tipc_net_route_msg
	xorl	%r15d, %r15d
LBB0_8:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_TIPC_ERR_NO_PORT,4,2           ## @TIPC_ERR_NO_PORT
	.comm	_tipc_port_list_lock,4,2        ## @tipc_port_list_lock
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Deleted port %u\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tipc_deleteport                ; -- Begin function tipc_deleteport
	.p2align	2
_tipc_deleteport:                       ; @tipc_deleteport
	.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
	mov	x19, x0
	mov	w1, #0
	mov	x2, #0
	bl	_tipc_withdraw
	mov	x0, x19
	bl	_tipc_port_lock
	cbz	x0, LBB0_5
; %bb.1:
	mov	x20, x0
	mov	x0, x19
	bl	_tipc_ref_discard
	mov	x0, x20
	bl	_tipc_port_unlock
	mov	x0, x20
	bl	_k_cancel_timer
	ldr	x8, [x20, #32]
	cbz	x8, LBB0_7
; %bb.2:
Lloh0:
	adrp	x8, _TIPC_ERR_NO_PORT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TIPC_ERR_NO_PORT@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_port_build_peer_abort_msg
	mov	x21, x0
	add	x0, x20, #24
	bl	_tipc_nodesub_unsubscribe
	ldr	x0, [x20, #16]
	cbz	x0, LBB0_4
LBB0_3:
	bl	_tipc_reg_remove_port
	ldr	x0, [x20, #16]
	bl	_kfree
LBB0_4:
Lloh3:
	adrp	x22, _tipc_port_list_lock@GOTPAGE
Lloh4:
	ldr	x22, [x22, _tipc_port_list_lock@GOTPAGEOFF]
	mov	x0, x22
	bl	_spin_lock_bh
	add	x0, x20, #8
	bl	_list_del
	add	x0, x20, #4
	bl	_list_del
	mov	x0, x22
	bl	_spin_unlock_bh
	mov	x0, x20
	bl	_k_term_timer
	mov	x0, x20
	bl	_kfree
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_dbg
	mov	x0, x21
	bl	_tipc_net_route_msg
	mov	w0, #0
	b	LBB0_6
LBB0_5:
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	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
LBB0_7:
	mov	x21, #0
	ldr	x0, [x20, #16]
	cbnz	x0, LBB0_3
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_TIPC_ERR_NO_PORT,4,2           ; @TIPC_ERR_NO_PORT
	.comm	_tipc_port_list_lock,4,2        ; @tipc_port_list_lock
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Deleted port %u\n"

.subsections_via_symbols
