	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function UnloadLineDiscipline
_UnloadLineDiscipline:                  ## @UnloadLineDiscipline
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movl	16(%rdi), %edi
	callq	_device2tty
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_isngtty
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	movq	32(%rbx), %rsi
	movq	%r14, %rdi
	callq	_physical_SetSpeed
	testl	%eax, %eax
	jne	LBB0_3
## %bb.2:
	movq	_LogWARN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	32(%rbx), %rdx
	leaq	L_.str(%rip), %rsi
	callq	_log_Printf
LBB0_3:
	movq	$0, 32(%rbx)
	movl	(%r14), %edi
	callq	_close
	movl	24(%rbx), %eax
	movl	%eax, (%r14)
	movl	$-1, 24(%rbx)
	movl	(%rbx), %edi
	callq	_close
	movl	$-1, (%rbx)
	movq	8(%rbx), %rax
	movb	$0, (%rax)
	movl	(%r14), %edi
	movq	_TIOCSETD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdx
	addq	$28, %rdx
	callq	_ID0ioctl
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	leaq	L_.str.2(%rip), %rsi
	movq	_LogWARN@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_7:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_5:
	movl	16(%rbx), %esi
	movq	_PHYSICAL_NOFORCE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_physical_SetupStack
	leaq	L_.str.1(%rip), %rsi
	movq	_LogPHASE@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %edi
	movq	8(%r14), %rdx
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_log_Printf                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_LogWARN,4,2                    ## @LogWARN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Couldn't reset tty speed to %d\n"

	.comm	_TIOCSETD,4,2                   ## @TIOCSETD
	.comm	_PHYSICAL_NOFORCE,4,2           ## @PHYSICAL_NOFORCE
	.comm	_LogPHASE,4,2                   ## @LogPHASE
L_.str.1:                               ## @.str.1
	.asciz	"%s: Unloaded netgraph tty line discipline\n"

L_.str.2:                               ## @.str.2
	.asciz	"%s: Failed to unload netgraph tty line discipline\n"

	.no_dead_strip	_UnloadLineDiscipline
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function UnloadLineDiscipline
_UnloadLineDiscipline:                  ; @UnloadLineDiscipline
	.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
	ldr	w0, [x0, #16]
	bl	_device2tty
	mov	x20, x0
	bl	_isngtty
	cbz	x0, LBB0_5
; %bb.1:
	ldr	x1, [x20, #32]
	mov	x0, x19
	bl	_physical_SetSpeed
	cbnz	w0, LBB0_3
; %bb.2:
Lloh0:
	adrp	x8, _LogWARN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LogWARN@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	ldr	x2, [x20, #32]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_log_Printf
LBB0_3:
	str	xzr, [x20, #32]
	ldr	w0, [x19]
	bl	_close
	ldr	w8, [x20, #24]
	str	w8, [x19]
	mov	w21, #-1
	str	w21, [x20, #24]
	ldr	w0, [x20]
	bl	_close
	str	w21, [x20]
	ldr	x8, [x20, #8]
	strb	wzr, [x8]
	ldr	w0, [x19]
Lloh5:
	adrp	x8, _TIOCSETD@GOTPAGE
Lloh6:
	ldr	x8, [x8, _TIOCSETD@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	add	x2, x20, #28
	bl	_ID0ioctl
	cbz	x0, LBB0_6
; %bb.4:
Lloh8:
	adrp	x1, l_.str.2@PAGE
Lloh9:
	add	x1, x1, l_.str.2@PAGEOFF
Lloh10:
	adrp	x8, _LogWARN@GOTPAGE
Lloh11:
	ldr	x8, [x8, _LogWARN@GOTPAGEOFF]
	b	LBB0_7
LBB0_5:
	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_6:
	ldr	w1, [x20, #16]
Lloh12:
	adrp	x8, _PHYSICAL_NOFORCE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _PHYSICAL_NOFORCE@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_physical_SetupStack
Lloh15:
	adrp	x1, l_.str.1@PAGE
Lloh16:
	add	x1, x1, l_.str.1@PAGEOFF
Lloh17:
	adrp	x8, _LogPHASE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _LogPHASE@GOTPAGEOFF]
LBB0_7:
	ldr	w0, [x8]
	ldr	x2, [x19, #8]
	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	_log_Printf
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_LogWARN,4,2                    ; @LogWARN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Couldn't reset tty speed to %d\n"

	.comm	_TIOCSETD,4,2                   ; @TIOCSETD
	.comm	_PHYSICAL_NOFORCE,4,2           ; @PHYSICAL_NOFORCE
	.comm	_LogPHASE,4,2                   ; @LogPHASE
l_.str.1:                               ; @.str.1
	.asciz	"%s: Unloaded netgraph tty line discipline\n"

l_.str.2:                               ; @.str.2
	.asciz	"%s: Failed to unload netgraph tty line discipline\n"

	.no_dead_strip	_UnloadLineDiscipline
.subsections_via_symbols
