	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ax25_release
_ax25_release:                          ## @ax25_release
	.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), %rbx
	testq	%rbx, %rbx
	je	LBB0_13
## %bb.1:
	movq	%rdi, %r14
	movq	%rbx, %rdi
	callq	_sock_hold
	movq	%rbx, %rdi
	callq	_sock_orphan
	movq	%rbx, %rdi
	callq	_lock_sock
	movq	%rbx, %rdi
	callq	_ax25_sk
	movq	%rax, %r15
	movq	(%rbx), %rax
	movq	_SOCK_SEQPACKET@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
## %bb.2:
	movl	(%r15), %eax
	leal	-128(%rax), %ecx
	cmpl	$2, %ecx
	jb	LBB0_7
## %bb.3:
	leal	-130(%rax), %ecx
	cmpl	$2, %ecx
	jae	LBB0_4
## %bb.6:
	movq	_AX25_DISC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AX25_POLLON@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_AX25_COMMAND@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	callq	_ax25_send_control
	jmp	LBB0_5
LBB0_10:
	movq	_TCP_CLOSE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 24(%rbx)
	movq	_SEND_SHUTDOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 16(%rbx)
	movq	%rbx, %rdi
	callq	*8(%rbx)
	jmp	LBB0_11
LBB0_7:
	movq	%r15, %rdi
	callq	_ax25_clear_queues
	movl	$0, 16(%r15)
	movq	8(%r15), %rax
	movq	(%rax), %rax
	movq	_AX25_VALUES_PROTOCOL@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	$-133, %edx
	addl	(%rax,%rcx,4), %edx
	cmpl	$1, %edx
	ja	LBB0_9
## %bb.8:
	movq	_AX25_DISC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AX25_POLLON@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_AX25_COMMAND@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	callq	_ax25_send_control
	movq	%r15, %rdi
	callq	_ax25_stop_t2timer
	movq	%r15, %rdi
	callq	_ax25_stop_t3timer
	movq	%r15, %rdi
	callq	_ax25_stop_idletimer
LBB0_9:
	movq	%r15, %rdi
	callq	_ax25_calculate_t1
	movq	%r15, %rdi
	callq	_ax25_start_t1timer
	movl	$130, (%r15)
	movq	_TCP_CLOSE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 24(%rbx)
	movq	_SEND_SHUTDOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 16(%rbx)
	movq	%rbx, %rdi
	callq	*8(%rbx)
	movq	_SOCK_DESTROY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_sock_set_flag
	jmp	LBB0_12
LBB0_4:
	cmpl	$132, %eax
	jne	LBB0_12
LBB0_5:
	movq	%rbx, %rdi
	callq	_release_sock
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_ax25_disconnect
	movq	%rbx, %rdi
	callq	_lock_sock
LBB0_11:
	movq	%r15, %rdi
	callq	_ax25_destroy_socket
LBB0_12:
	movq	$0, (%r14)
	movq	%rbx, %rdi
	callq	_release_sock
	movq	%rbx, %rdi
	callq	_sock_put
LBB0_13:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SOCK_SEQPACKET,8,3             ## @SOCK_SEQPACKET
	.comm	_AX25_DISC,4,2                  ## @AX25_DISC
	.comm	_AX25_POLLON,4,2                ## @AX25_POLLON
	.comm	_AX25_COMMAND,4,2               ## @AX25_COMMAND
	.comm	_AX25_VALUES_PROTOCOL,8,3       ## @AX25_VALUES_PROTOCOL
	.comm	_TCP_CLOSE,8,3                  ## @TCP_CLOSE
	.comm	_SEND_SHUTDOWN,4,2              ## @SEND_SHUTDOWN
	.comm	_SOCK_DESTROY,4,2               ## @SOCK_DESTROY
	.no_dead_strip	_ax25_release
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ax25_release
_ax25_release:                          ; @ax25_release
	.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
	ldr	x19, [x0]
	cbz	x19, LBB0_13
; %bb.1:
	mov	x20, x0
	mov	x0, x19
	bl	_sock_hold
	mov	x0, x19
	bl	_sock_orphan
	mov	x0, x19
	bl	_lock_sock
	mov	x0, x19
	bl	_ax25_sk
	mov	x21, x0
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _SOCK_SEQPACKET@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SOCK_SEQPACKET@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.2:
	ldr	w8, [x21]
	sub	w9, w8, #128
	cmp	w9, #2
	b.lo	LBB0_6
; %bb.3:
	sub	w9, w8, #130
	cmp	w9, #2
	b.hs	LBB0_9
; %bb.4:
Lloh3:
	adrp	x8, _AX25_DISC@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AX25_DISC@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _AX25_POLLON@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AX25_POLLON@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
Lloh9:
	adrp	x8, _AX25_COMMAND@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AX25_COMMAND@GOTPAGEOFF]
Lloh11:
	ldr	w3, [x8]
	mov	x0, x21
	bl	_ax25_send_control
	b	LBB0_10
LBB0_5:
Lloh12:
	adrp	x8, _TCP_CLOSE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _TCP_CLOSE@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
Lloh15:
	adrp	x9, _SEND_SHUTDOWN@GOTPAGE
Lloh16:
	ldr	x9, [x9, _SEND_SHUTDOWN@GOTPAGEOFF]
	str	x8, [x19, #24]
Lloh17:
	ldr	w8, [x9]
	ldr	w9, [x19, #16]
	orr	w8, w9, w8
	str	w8, [x19, #16]
	ldr	x8, [x19, #8]
	mov	x0, x19
	blr	x8
	b	LBB0_11
LBB0_6:
	mov	x0, x21
	bl	_ax25_clear_queues
	str	wzr, [x21, #16]
	ldr	x8, [x21, #8]
Lloh18:
	adrp	x9, _AX25_VALUES_PROTOCOL@GOTPAGE
Lloh19:
	ldr	x9, [x9, _AX25_VALUES_PROTOCOL@GOTPAGEOFF]
	ldr	x8, [x8]
Lloh20:
	ldr	x9, [x9]
	ldr	w8, [x8, x9, lsl #2]
	sub	w8, w8, #133
	cmp	w8, #1
	b.hi	LBB0_8
; %bb.7:
Lloh21:
	adrp	x8, _AX25_DISC@GOTPAGE
Lloh22:
	ldr	x8, [x8, _AX25_DISC@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
Lloh24:
	adrp	x8, _AX25_POLLON@GOTPAGE
Lloh25:
	ldr	x8, [x8, _AX25_POLLON@GOTPAGEOFF]
Lloh26:
	ldr	w2, [x8]
Lloh27:
	adrp	x8, _AX25_COMMAND@GOTPAGE
Lloh28:
	ldr	x8, [x8, _AX25_COMMAND@GOTPAGEOFF]
Lloh29:
	ldr	w3, [x8]
	mov	x0, x21
	bl	_ax25_send_control
	mov	x0, x21
	bl	_ax25_stop_t2timer
	mov	x0, x21
	bl	_ax25_stop_t3timer
	mov	x0, x21
	bl	_ax25_stop_idletimer
LBB0_8:
	mov	x0, x21
	bl	_ax25_calculate_t1
	mov	x0, x21
	bl	_ax25_start_t1timer
	mov	w8, #130
	str	w8, [x21]
Lloh30:
	adrp	x8, _TCP_CLOSE@GOTPAGE
Lloh31:
	ldr	x8, [x8, _TCP_CLOSE@GOTPAGEOFF]
Lloh32:
	ldr	x8, [x8]
Lloh33:
	adrp	x9, _SEND_SHUTDOWN@GOTPAGE
Lloh34:
	ldr	x9, [x9, _SEND_SHUTDOWN@GOTPAGEOFF]
	str	x8, [x19, #24]
Lloh35:
	ldr	w8, [x9]
	ldr	w9, [x19, #16]
	orr	w8, w9, w8
	str	w8, [x19, #16]
	ldr	x8, [x19, #8]
	mov	x0, x19
	blr	x8
Lloh36:
	adrp	x8, _SOCK_DESTROY@GOTPAGE
Lloh37:
	ldr	x8, [x8, _SOCK_DESTROY@GOTPAGEOFF]
Lloh38:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_sock_set_flag
	b	LBB0_12
LBB0_9:
	cmp	w8, #132
	b.ne	LBB0_12
LBB0_10:
	mov	x0, x19
	bl	_release_sock
	mov	x0, x21
	mov	w1, #0
	bl	_ax25_disconnect
	mov	x0, x19
	bl	_lock_sock
LBB0_11:
	mov	x0, x21
	bl	_ax25_destroy_socket
LBB0_12:
	str	xzr, [x20]
	mov	x0, x19
	bl	_release_sock
	mov	x0, x19
	bl	_sock_put
LBB0_13:
	mov	w0, #0
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_SOCK_SEQPACKET,8,3             ; @SOCK_SEQPACKET
	.comm	_AX25_DISC,4,2                  ; @AX25_DISC
	.comm	_AX25_POLLON,4,2                ; @AX25_POLLON
	.comm	_AX25_COMMAND,4,2               ; @AX25_COMMAND
	.comm	_AX25_VALUES_PROTOCOL,8,3       ; @AX25_VALUES_PROTOCOL
	.comm	_TCP_CLOSE,8,3                  ; @TCP_CLOSE
	.comm	_SEND_SHUTDOWN,4,2              ; @SEND_SHUTDOWN
	.comm	_SOCK_DESTROY,4,2               ; @SOCK_DESTROY
	.no_dead_strip	_ax25_release
.subsections_via_symbols
