	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sx_shutdown_port
_sx_shutdown_port:                      ## @sx_shutdown_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r13
	movq	%rdi, %r14
	xorl	%eax, %eax
	callq	_func_enter
	movq	_ASYNC_INITIALIZED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r13)
	je	LBB0_12
## %bb.1:
	movq	_sx_debug@GOTPCREL(%rip), %rax
	movq	_SX_DEBUG_FIFO@GOTPCREL(%rip), %r12
	movl	(%r12), %ebx
	testl	%ebx, (%rax)
	je	LBB0_3
## %bb.2:
	movq	%r14, %rdi
	callq	_board_No
	movl	%eax, %r15d
	movq	%r13, %rdi
	callq	_port_No
	movl	40(%r13), %r8d
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edi
	movl	%r15d, %edx
	movq	%rax, %rcx
	xorl	%eax, %eax
	callq	_dprintk
	movl	(%r12), %edi
	movq	32(%r13), %rax
	movl	(%rax), %edx
	leaq	L_.str.1(%rip), %r15
	movq	%r15, %rsi
	xorl	%eax, %eax
	callq	_dprintk
	movl	(%r12), %edi
	movq	32(%r13), %rax
	movl	4(%rax), %edx
	movq	%r15, %rsi
	xorl	%eax, %eax
	callq	_dprintk
	movl	(%r12), %edi
	movq	32(%r13), %rax
	movl	8(%rax), %edx
	movq	%r15, %rsi
	xorl	%eax, %eax
	callq	_dprintk
	movl	(%r12), %edi
	movq	32(%r13), %rax
	movl	12(%rax), %edx
	movq	%r15, %rsi
	xorl	%eax, %eax
	callq	_dprintk
	movl	(%r12), %edi
	movq	32(%r13), %rax
	movl	16(%rax), %edx
	movq	%r15, %rsi
	xorl	%eax, %eax
	callq	_dprintk
	movl	(%r12), %edi
	movq	32(%r13), %rax
	movl	20(%rax), %edx
	movq	%r15, %rsi
	xorl	%eax, %eax
	callq	_dprintk
	movl	(%r12), %edi
	movq	32(%r13), %rax
	movl	24(%rax), %edx
	movq	%r15, %rsi
	xorl	%eax, %eax
	callq	_dprintk
	movl	(%r12), %edi
	movq	32(%r13), %rax
	movl	28(%rax), %edx
	movq	%r15, %rsi
	xorl	%eax, %eax
	callq	_dprintk
	movl	(%r12), %edi
	movq	32(%r13), %rax
	movl	32(%rax), %edx
	movq	%r15, %rsi
	xorl	%eax, %eax
	callq	_dprintk
	movl	(%r12), %edi
	movq	32(%r13), %rax
	movl	36(%rax), %edx
	movq	%r15, %rsi
	xorl	%eax, %eax
	callq	_dprintk
	movl	(%r12), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_dprintk
LBB0_3:
	movq	24(%r13), %rdi
	testq	%rdi, %rdi
	je	LBB0_5
## %bb.4:
	callq	_free_page
	movq	$0, 24(%r13)
LBB0_5:
	leaq	4(%r14), %r15
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	movq	_CD186x_CAR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r13, %rdi
	callq	_port_No
	movq	%r14, %rdi
	movl	%ebx, %esi
	movq	%rax, %rdx
	callq	_sx_out
	movq	8(%r13), %r12
	testq	%r12, %r12
	je	LBB0_7
## %bb.6:
	movq	%r12, %rdi
	callq	_C_HUPCL
	testq	%rax, %rax
	je	LBB0_8
LBB0_7:
	movq	_CD186x_MSVDTR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_sx_out
LBB0_8:
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	movq	%r14, %rdi
	callq	_sx_wait_CCR
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	movq	_CD186x_CCR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_CCR_SOFTRESET@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	%r14, %rdi
	callq	_sx_out
	movq	$0, 16(%r13)
	movq	_CD186x_IER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_sx_out
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	testq	%r12, %r12
	je	LBB0_10
## %bb.9:
	movq	_TTY_IO_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r12, %rsi
	callq	_set_bit
LBB0_10:
	movq	_ASYNC_INITIALIZED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, (%r13)
	cmpl	$0, (%r14)
	jne	LBB0_12
## %bb.11:
	movq	%r14, %rdi
	callq	_sx_shutdown_board
LBB0_12:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_func_exit                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ASYNC_INITIALIZED,4,2          ## @ASYNC_INITIALIZED
	.comm	_sx_debug,4,2                   ## @sx_debug
	.comm	_SX_DEBUG_FIFO,4,2              ## @SX_DEBUG_FIFO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"sx%d: port %d: %ld overruns, FIFO hits [ "

L_.str.1:                               ## @.str.1
	.asciz	"%ld "

L_.str.2:                               ## @.str.2
	.asciz	"].\n"

	.comm	_CD186x_CAR,4,2                 ## @CD186x_CAR
	.comm	_CD186x_MSVDTR,4,2              ## @CD186x_MSVDTR
	.comm	_CD186x_CCR,4,2                 ## @CD186x_CCR
	.comm	_CCR_SOFTRESET,8,3              ## @CCR_SOFTRESET
	.comm	_CD186x_IER,4,2                 ## @CD186x_IER
	.comm	_TTY_IO_ERROR,4,2               ## @TTY_IO_ERROR
	.no_dead_strip	_sx_shutdown_port
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sx_shutdown_port
_sx_shutdown_port:                      ; @sx_shutdown_port
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x1
	mov	x19, x0
	bl	_func_enter
	ldr	w8, [x20]
Lloh0:
	adrp	x23, _ASYNC_INITIALIZED@GOTPAGE
Lloh1:
	ldr	x23, [x23, _ASYNC_INITIALIZED@GOTPAGEOFF]
	ldr	w9, [x23]
	tst	w9, w8
	b.eq	LBB0_12
; %bb.1:
Lloh2:
	adrp	x8, _sx_debug@GOTPAGE
Lloh3:
	ldr	x8, [x8, _sx_debug@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x24, _SX_DEBUG_FIFO@GOTPAGE
Lloh6:
	ldr	x24, [x24, _SX_DEBUG_FIFO@GOTPAGEOFF]
	ldr	w21, [x24]
	tst	w21, w8
	b.eq	LBB0_3
; %bb.2:
	mov	x0, x19
	bl	_board_No
	mov	x22, x0
	mov	x0, x20
	bl	_port_No
	ldr	w8, [x20, #40]
	stp	x0, x8, [sp, #8]
	str	x22, [sp]
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_dprintk
	ldr	w0, [x24]
	ldr	x8, [x20, #32]
	ldr	w8, [x8]
	str	x8, [sp]
Lloh9:
	adrp	x21, l_.str.1@PAGE
Lloh10:
	add	x21, x21, l_.str.1@PAGEOFF
	mov	x1, x21
	bl	_dprintk
	ldr	w0, [x24]
	ldr	x8, [x20, #32]
	ldr	w8, [x8, #4]
	str	x8, [sp]
	mov	x1, x21
	bl	_dprintk
	ldr	w0, [x24]
	ldr	x8, [x20, #32]
	ldr	w8, [x8, #8]
	str	x8, [sp]
	mov	x1, x21
	bl	_dprintk
	ldr	w0, [x24]
	ldr	x8, [x20, #32]
	ldr	w8, [x8, #12]
	str	x8, [sp]
	mov	x1, x21
	bl	_dprintk
	ldr	w0, [x24]
	ldr	x8, [x20, #32]
	ldr	w8, [x8, #16]
	str	x8, [sp]
	mov	x1, x21
	bl	_dprintk
	ldr	w0, [x24]
	ldr	x8, [x20, #32]
	ldr	w8, [x8, #20]
	str	x8, [sp]
	mov	x1, x21
	bl	_dprintk
	ldr	w0, [x24]
	ldr	x8, [x20, #32]
	ldr	w8, [x8, #24]
	str	x8, [sp]
	mov	x1, x21
	bl	_dprintk
	ldr	w0, [x24]
	ldr	x8, [x20, #32]
	ldr	w8, [x8, #28]
	str	x8, [sp]
	mov	x1, x21
	bl	_dprintk
	ldr	w0, [x24]
	ldr	x8, [x20, #32]
	ldr	w8, [x8, #32]
	str	x8, [sp]
	mov	x1, x21
	bl	_dprintk
	ldr	w0, [x24]
	ldr	x8, [x20, #32]
	ldr	w8, [x8, #36]
	str	x8, [sp]
	mov	x1, x21
	bl	_dprintk
	ldr	w0, [x24]
Lloh11:
	adrp	x1, l_.str.2@PAGE
Lloh12:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dprintk
LBB0_3:
	ldr	x0, [x20, #24]
	cbz	x0, LBB0_5
; %bb.4:
	bl	_free_page
	str	xzr, [x20, #24]
LBB0_5:
	add	x21, x19, #4
	mov	x0, x21
	bl	_spin_lock_irqsave
Lloh13:
	adrp	x8, _CD186x_CAR@GOTPAGE
Lloh14:
	ldr	x8, [x8, _CD186x_CAR@GOTPAGEOFF]
Lloh15:
	ldr	w22, [x8]
	mov	x0, x20
	bl	_port_No
	mov	x2, x0
	mov	x0, x19
	mov	x1, x22
	bl	_sx_out
	ldr	x22, [x20, #8]
	cbz	x22, LBB0_7
; %bb.6:
	mov	x0, x22
	bl	_C_HUPCL
	cbz	x0, LBB0_8
LBB0_7:
Lloh16:
	adrp	x8, _CD186x_MSVDTR@GOTPAGE
Lloh17:
	ldr	x8, [x8, _CD186x_MSVDTR@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, #0
	bl	_sx_out
LBB0_8:
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	mov	x0, x19
	bl	_sx_wait_CCR
	mov	x0, x21
	bl	_spin_lock_irqsave
Lloh19:
	adrp	x8, _CD186x_CCR@GOTPAGE
Lloh20:
	ldr	x8, [x8, _CD186x_CCR@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
Lloh22:
	adrp	x8, _CCR_SOFTRESET@GOTPAGE
Lloh23:
	ldr	x8, [x8, _CCR_SOFTRESET@GOTPAGEOFF]
Lloh24:
	ldr	x2, [x8]
	mov	x0, x19
	bl	_sx_out
	str	xzr, [x20, #16]
Lloh25:
	adrp	x8, _CD186x_IER@GOTPAGE
Lloh26:
	ldr	x8, [x8, _CD186x_IER@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, #0
	bl	_sx_out
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	cbz	x22, LBB0_10
; %bb.9:
Lloh28:
	adrp	x8, _TTY_IO_ERROR@GOTPAGE
Lloh29:
	ldr	x8, [x8, _TTY_IO_ERROR@GOTPAGEOFF]
Lloh30:
	ldr	w0, [x8]
	mov	x1, x22
	bl	_set_bit
LBB0_10:
	ldr	w8, [x23]
	ldr	w9, [x20]
	bic	w8, w9, w8
	str	w8, [x20]
	ldr	w8, [x19]
	cbnz	w8, LBB0_12
; %bb.11:
	mov	x0, x19
	bl	_sx_shutdown_board
LBB0_12:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	b	_func_exit
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_ASYNC_INITIALIZED,4,2          ; @ASYNC_INITIALIZED
	.comm	_sx_debug,4,2                   ; @sx_debug
	.comm	_SX_DEBUG_FIFO,4,2              ; @SX_DEBUG_FIFO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"sx%d: port %d: %ld overruns, FIFO hits [ "

l_.str.1:                               ; @.str.1
	.asciz	"%ld "

l_.str.2:                               ; @.str.2
	.asciz	"].\n"

	.comm	_CD186x_CAR,4,2                 ; @CD186x_CAR
	.comm	_CD186x_MSVDTR,4,2              ; @CD186x_MSVDTR
	.comm	_CD186x_CCR,4,2                 ; @CD186x_CCR
	.comm	_CCR_SOFTRESET,8,3              ; @CCR_SOFTRESET
	.comm	_CD186x_IER,4,2                 ; @CD186x_IER
	.comm	_TTY_IO_ERROR,4,2               ; @TTY_IO_ERROR
	.no_dead_strip	_sx_shutdown_port
.subsections_via_symbols
