	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fst_close
_fst_close:                             ## @fst_close
	.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
	movq	%rdi, %r12
	callq	_dev_to_port
	movq	%rax, %r14
	movq	8(%rax), %rbx
	movq	_DMACSR1@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%rbx), %rdi
	callq	_inb
	movl	%eax, %r15d
	movq	_DMACSR0@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%rbx), %rdi
	callq	_inb
	movq	_DBG_OPEN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movl	(%rbx), %r8d
	movl	4(%rbx), %edx
	movzbl	%r15b, %ecx
	movzbl	%al, %r9d
	leaq	L_.str(%rip), %rsi
	callq	_dbg
	movq	%r12, %rdi
	callq	_netif_stop_queue
	movq	%r12, %rdi
	callq	_dev_to_port
	movq	%rax, %rdi
	callq	_fst_closeport
	movq	(%r14), %rax
	movq	_FST_RAW@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_2
## %bb.1:
	movq	%r12, %rdi
	callq	_hdlc_close
LBB0_2:
	movq	_THIS_MODULE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_module_put
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DMACSR1,8,3                    ## @DMACSR1
	.comm	_DMACSR0,8,3                    ## @DMACSR0
	.comm	_DBG_OPEN,4,2                   ## @DBG_OPEN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Port Close: tx_dma_in_progress = %d (%x) rx_dma_in_progress = %d (%x)\n"

	.comm	_FST_RAW,8,3                    ## @FST_RAW
	.comm	_THIS_MODULE,4,2                ## @THIS_MODULE
	.no_dead_strip	_fst_close
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fst_close
_fst_close:                             ; @fst_close
	.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
	bl	_dev_to_port
	mov	x20, x0
	ldr	x22, [x0, #8]
	ldr	x8, [x22, #8]
Lloh0:
	adrp	x9, _DMACSR1@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DMACSR1@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_inb
	mov	x21, x0
	ldr	x8, [x22, #8]
Lloh3:
	adrp	x9, _DMACSR0@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DMACSR0@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_inb
	mov	x5, x0
Lloh6:
	adrp	x8, _DBG_OPEN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DBG_OPEN@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	ldp	w4, w2, [x22]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x3, x21
	bl	_dbg
	mov	x0, x19
	bl	_netif_stop_queue
	mov	x0, x19
	bl	_dev_to_port
	bl	_fst_closeport
	ldr	x8, [x20]
Lloh11:
	adrp	x9, _FST_RAW@GOTPAGE
Lloh12:
	ldr	x9, [x9, _FST_RAW@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_hdlc_close
LBB0_2:
Lloh14:
	adrp	x8, _THIS_MODULE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _THIS_MODULE@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	bl	_module_put
	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	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_DMACSR1,8,3                    ; @DMACSR1
	.comm	_DMACSR0,8,3                    ; @DMACSR0
	.comm	_DBG_OPEN,4,2                   ; @DBG_OPEN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Port Close: tx_dma_in_progress = %d (%x) rx_dma_in_progress = %d (%x)\n"

	.comm	_FST_RAW,8,3                    ; @FST_RAW
	.comm	_THIS_MODULE,4,2                ; @THIS_MODULE
	.no_dead_strip	_fst_close
.subsections_via_symbols
