	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function port_reset
_port_reset:                            ## @port_reset
	.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	%rdi, %r13
	cmpl	$0, (%rdi)
	jle	LBB0_3
## %bb.1:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r13), %rdi
	addq	%rbx, %rdi
	callq	_rxq_disable
	incq	%rbx
	movslq	(%r13), %rax
	cmpq	%rax, %rbx
	jl	LBB0_2
LBB0_3:
	cmpl	$0, 4(%r13)
	jle	LBB0_6
## %bb.4:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r13), %rdi
	addq	%rbx, %rdi
	callq	_txq_disable
	incq	%rbx
	movslq	4(%r13), %rax
	cmpq	%rax, %rbx
	jl	LBB0_5
LBB0_6:
	movq	_PORT_STATUS@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%r13, %rdi
	callq	_rdlp
	movq	_TX_IN_PROGRESS@GOTPCREL(%rip), %r15
	movq	_TX_FIFO_EMPTY@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %ecx
	movl	(%r15), %edx
	orl	%ecx, %edx
	andl	%eax, %edx
	cmpl	%ecx, %edx
	je	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_8 Depth=1
	movl	$10, %edi
	callq	_udelay
	movl	(%r14), %esi
	movq	%r13, %rdi
	callq	_rdlp
	jmp	LBB0_8
LBB0_9:
	movq	_PORT_SERIAL_CONTROL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r13, %rdi
	callq	_rdlp
	movq	_SERIAL_PORT_ENABLE@GOTPCREL(%rip), %rcx
	movq	_DO_NOT_FORCE_LINK_FAIL@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	movq	_FORCE_LINK_PASS@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edx
	notl	%edx
	andl	%eax, %edx
	movl	(%rbx), %esi
	movq	%r13, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_wrlp                           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_PORT_STATUS,4,2                ## @PORT_STATUS
	.comm	_TX_IN_PROGRESS,4,2             ## @TX_IN_PROGRESS
	.comm	_TX_FIFO_EMPTY,4,2              ## @TX_FIFO_EMPTY
	.comm	_PORT_SERIAL_CONTROL,4,2        ## @PORT_SERIAL_CONTROL
	.comm	_SERIAL_PORT_ENABLE,4,2         ## @SERIAL_PORT_ENABLE
	.comm	_DO_NOT_FORCE_LINK_FAIL,4,2     ## @DO_NOT_FORCE_LINK_FAIL
	.comm	_FORCE_LINK_PASS,4,2            ## @FORCE_LINK_PASS
	.no_dead_strip	_port_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function port_reset
_port_reset:                            ; @port_reset
	.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	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x20, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #16]
	add	x0, x20, x8
	bl	_rxq_disable
	add	x20, x20, #1
	ldrsw	x8, [x19]
	cmp	x20, x8
	b.lt	LBB0_2
LBB0_3:
	ldr	w8, [x19, #4]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.4:
	mov	x20, #0
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	add	x0, x20, x8
	bl	_txq_disable
	add	x20, x20, #1
	ldrsw	x8, [x19, #4]
	cmp	x20, x8
	b.lt	LBB0_5
LBB0_6:
Lloh0:
	adrp	x20, _PORT_STATUS@GOTPAGE
Lloh1:
	ldr	x20, [x20, _PORT_STATUS@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_rdlp
Lloh2:
	adrp	x21, _TX_IN_PROGRESS@GOTPAGE
Lloh3:
	ldr	x21, [x21, _TX_IN_PROGRESS@GOTPAGEOFF]
	ldr	w8, [x21]
Lloh4:
	adrp	x22, _TX_FIFO_EMPTY@GOTPAGE
Lloh5:
	ldr	x22, [x22, _TX_FIFO_EMPTY@GOTPAGEOFF]
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w9, [x22]
	orr	w8, w9, w8
	and	w8, w8, w0
	cmp	w8, w9
	b.eq	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	w0, #10
	bl	_udelay
	ldr	w1, [x20]
	mov	x0, x19
	bl	_rdlp
	ldr	w8, [x21]
	b	LBB0_7
LBB0_9:
Lloh6:
	adrp	x20, _PORT_SERIAL_CONTROL@GOTPAGE
Lloh7:
	ldr	x20, [x20, _PORT_SERIAL_CONTROL@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_rdlp
Lloh8:
	adrp	x8, _SERIAL_PORT_ENABLE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SERIAL_PORT_ENABLE@GOTPAGEOFF]
Lloh10:
	adrp	x9, _DO_NOT_FORCE_LINK_FAIL@GOTPAGE
Lloh11:
	ldr	x9, [x9, _DO_NOT_FORCE_LINK_FAIL@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
Lloh13:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh14:
	adrp	x9, _FORCE_LINK_PASS@GOTPAGE
Lloh15:
	ldr	x9, [x9, _FORCE_LINK_PASS@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	orr	w8, w8, w9
	bic	w2, w0, w8
	ldr	w1, [x20]
	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	_wrlp
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh12
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_PORT_STATUS,4,2                ; @PORT_STATUS
	.comm	_TX_IN_PROGRESS,4,2             ; @TX_IN_PROGRESS
	.comm	_TX_FIFO_EMPTY,4,2              ; @TX_FIFO_EMPTY
	.comm	_PORT_SERIAL_CONTROL,4,2        ; @PORT_SERIAL_CONTROL
	.comm	_SERIAL_PORT_ENABLE,4,2         ; @SERIAL_PORT_ENABLE
	.comm	_DO_NOT_FORCE_LINK_FAIL,4,2     ; @DO_NOT_FORCE_LINK_FAIL
	.comm	_FORCE_LINK_PASS,4,2            ; @FORCE_LINK_PASS
	.no_dead_strip	_port_reset
.subsections_via_symbols
