	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hvc_iucv_hangup
_hvc_iucv_hangup:                       ## @hvc_iucv_hangup
	.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
	leaq	16(%rdi), %r15
	movq	%r15, %rdi
	callq	_spin_lock
	movq	(%rbx), %rax
	movq	_IUCV_CONNECTED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.1:
	movq	8(%rbx), %rax
	movq	32(%rbx), %r14
	movq	$0, 32(%rbx)
	movq	_IUCV_SEVERED@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, (%rbx)
	movq	_TTY_CLOSED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.2:
	movq	%rbx, %rdi
	callq	_hvc_iucv_cleanup
	jmp	LBB0_6
LBB0_8:
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock                    ## TAILCALL
LBB0_3:
	cmpq	$0, 24(%rbx)
	je	LBB0_5
## %bb.4:
	movq	%rbx, %rdi
	callq	_hvc_iucv_cleanup
	movq	_TTY_OPENED@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%rbx)
	jmp	LBB0_6
LBB0_5:
	xorl	%eax, %eax
	callq	_hvc_kick
LBB0_6:
	movq	%r15, %rdi
	callq	_spin_unlock
	testq	%r14, %r14
	je	LBB0_7
## %bb.9:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_iucv_path_sever
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_iucv_path_free                 ## TAILCALL
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IUCV_CONNECTED,8,3             ## @IUCV_CONNECTED
	.comm	_IUCV_SEVERED,8,3               ## @IUCV_SEVERED
	.comm	_TTY_CLOSED,8,3                 ## @TTY_CLOSED
	.comm	_TTY_OPENED,8,3                 ## @TTY_OPENED
	.no_dead_strip	_hvc_iucv_hangup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hvc_iucv_hangup
_hvc_iucv_hangup:                       ; @hvc_iucv_hangup
	.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	x21, x0
	add	x19, x0, #16
	mov	x0, x19
	bl	_spin_lock
	ldr	x8, [x21]
Lloh0:
	adrp	x9, _IUCV_CONNECTED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IUCV_CONNECTED@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.1:
	ldr	x20, [x21, #32]
	str	xzr, [x21, #32]
Lloh3:
	adrp	x8, _IUCV_SEVERED@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IUCV_SEVERED@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	str	x8, [x21]
	ldr	x8, [x21, #8]
Lloh6:
	adrp	x9, _TTY_CLOSED@GOTPAGE
Lloh7:
	ldr	x9, [x9, _TTY_CLOSED@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.2:
	mov	x0, x21
	bl	_hvc_iucv_cleanup
	b	LBB0_7
LBB0_3:
	mov	x0, x19
	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
	b	_spin_unlock
LBB0_4:
	ldr	x8, [x21, #24]
	cbz	x8, LBB0_6
; %bb.5:
	mov	x0, x21
	bl	_hvc_iucv_cleanup
Lloh9:
	adrp	x8, _TTY_OPENED@GOTPAGE
Lloh10:
	ldr	x8, [x8, _TTY_OPENED@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	str	x8, [x21, #8]
	b	LBB0_7
LBB0_6:
	bl	_hvc_kick
LBB0_7:
	mov	x0, x19
	bl	_spin_unlock
	cbz	x20, LBB0_9
; %bb.8:
	mov	x0, x20
	mov	x1, #0
	bl	_iucv_path_sever
	mov	x0, x20
	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
	b	_iucv_path_free
LBB0_9:
	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	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_IUCV_CONNECTED,8,3             ; @IUCV_CONNECTED
	.comm	_IUCV_SEVERED,8,3               ; @IUCV_SEVERED
	.comm	_TTY_CLOSED,8,3                 ; @TTY_CLOSED
	.comm	_TTY_OPENED,8,3                 ; @TTY_OPENED
	.no_dead_strip	_hvc_iucv_hangup
.subsections_via_symbols
