	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cd2401_tx_interrupt
_cd2401_tx_interrupt:                   ## @cd2401_tx_interrupt
	.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	_BASE_ADDR@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	movq	_CyLICR@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movzbl	(%r15,%rax), %eax
	shrq	$2, %rax
	movq	_NR_PORTS@GOTPCREL(%rip), %rcx
	cmpl	%eax, (%rcx)
	jle	LBB0_1
## %bb.2:
	movq	_cy_port@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r11
	movq	_jiffies@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	leaq	(%rax,%rax,2), %rsi
	shlq	$4, %rsi
	movl	%ecx, 40(%r11,%rsi)
	cmpq	$0, 32(%r11,%rsi)
	je	LBB0_1
## %bb.3:
	movq	_CyTFTC@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movzbl	(%r15,%rax), %r14d
	movl	(%r11,%rsi), %eax
	movl	%r14d, %ebx
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	leaq	(%r11,%rsi), %rcx
	movq	_CyTDR@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movb	%al, (%r15,%rdx)
	leal	-1(%r14), %ebx
	movl	$0, (%rcx)
LBB0_5:
	cmpl	$0, 4(%r11,%rsi)
	je	LBB0_7
## %bb.6:
	leaq	(%r11,%rsi), %rcx
	addq	$4, %rcx
	movq	_CyTDR@GOTPCREL(%rip), %rdi
	movq	(%rdi), %rax
	movb	$0, (%r15,%rax)
	movq	(%rdi), %rax
	movb	$-127, (%r15,%rax)
	movq	(%rdi), %rax
	movb	$0, (%r15,%rax)
	movq	(%rdi), %rax
	movb	$-126, (%r15,%rax)
	imull	$200, (%rcx), %eax
	movq	_HZ@GOTPCREL(%rip), %r8
	cltd
	idivl	(%r8)
	movq	(%rdi), %rdx
	movb	%al, (%r15,%rdx)
	movq	(%rdi), %rax
	movb	$0, (%r15,%rax)
	movq	(%rdi), %rax
	movb	$-125, (%r15,%rax)
	addl	$-7, %ebx
	movl	$0, (%rcx)
LBB0_7:
	leaq	(%r11,%rsi), %r10
	addq	$32, %r10
	testl	%ebx, %ebx
	jle	LBB0_19
## %bb.8:
	leaq	(%r11,%rsi), %rdx
	addq	$8, %rdx
	movq	_PAGE_SIZE@GOTPCREL(%rip), %r8
	movq	_CyTDR@GOTPCREL(%rip), %r9
	jmp	LBB0_9
LBB0_1:
	movq	_CyTxMpty@GOTPCREL(%rip), %rax
	movb	(%rax), %al
	movq	_CyTxRdy@GOTPCREL(%rip), %rcx
	orb	(%rcx), %al
	notb	%al
	movq	_CyIER@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	andb	%al, (%r15,%rcx)
	movq	_CyNOTRANS@GOTPCREL(%rip), %rax
	movb	(%rax), %al
	jmp	LBB0_22
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_9 Depth=1
	decq	%rdi
	movq	%rdi, (%rdx)
	incq	%rcx
	movslq	(%r8), %rdi
	decq	%rdi
	andq	%rcx, %rdi
	movq	%rdi, 16(%rdx)
	movl	$-1, %ecx
LBB0_17:                                ##   in Loop: Header=BB0_9 Depth=1
	movq	(%r9), %rdi
	movb	%al, (%r15,%rdi)
	addl	%ecx, %ebx
	jle	LBB0_19
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rdx), %rdi
	testq	%rdi, %rdi
	je	LBB0_18
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	8(%rdx), %rax
	testq	%rax, %rax
	je	LBB0_18
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	(%r10), %rcx
	cmpq	$0, 8(%rcx)
	jne	LBB0_18
## %bb.12:                              ##   in Loop: Header=BB0_9 Depth=1
	cmpq	$0, (%rcx)
	jne	LBB0_18
## %bb.13:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	16(%rdx), %rcx
	movl	(%rax,%rcx,4), %eax
	testl	%eax, %eax
	jne	LBB0_14
## %bb.15:                              ##   in Loop: Header=BB0_9 Depth=1
	cmpl	$2, %ebx
	jl	LBB0_19
## %bb.16:                              ##   in Loop: Header=BB0_9 Depth=1
	decq	%rdi
	movq	%rdi, (%rdx)
	incq	%rcx
	movslq	(%r8), %rax
	decq	%rax
	andq	%rcx, %rax
	movq	%rax, 16(%rdx)
	movq	(%r9), %rax
	movb	$0, (%r15,%rax)
	movl	$-2, %ecx
	xorl	%eax, %eax
	jmp	LBB0_17
LBB0_18:
	movq	_CyTxMpty@GOTPCREL(%rip), %rax
	movb	(%rax), %al
	movq	_CyTxRdy@GOTPCREL(%rip), %rcx
	orb	(%rcx), %al
	notb	%al
	movq	_CyIER@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	andb	%al, (%r15,%rcx)
LBB0_19:
	movq	8(%r11,%rsi), %rax
	movq	_WAKEUP_CHARS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_21
## %bb.20:
	movq	(%r10), %rdi
	callq	_tty_wakeup
LBB0_21:
	xorl	%ecx, %ecx
	cmpl	%r14d, %ebx
	movq	_CyNOTRANS@GOTPCREL(%rip), %rax
	movzbl	(%rax), %eax
	cmovnel	%ecx, %eax
LBB0_22:
	movq	_CyTEOIR@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movb	%al, (%r15,%rcx)
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BASE_ADDR,8,3                  ## @BASE_ADDR
	.comm	_CyLICR,8,3                     ## @CyLICR
	.comm	_NR_PORTS,4,2                   ## @NR_PORTS
	.comm	_CyTxMpty,1,0                   ## @CyTxMpty
	.comm	_CyTxRdy,1,0                    ## @CyTxRdy
	.comm	_CyIER,8,3                      ## @CyIER
	.comm	_CyNOTRANS,1,0                  ## @CyNOTRANS
	.comm	_CyTEOIR,8,3                    ## @CyTEOIR
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.comm	_cy_port,8,3                    ## @cy_port
	.comm	_jiffies,4,2                    ## @jiffies
	.comm	_CyTFTC,8,3                     ## @CyTFTC
	.comm	_CyTDR,8,3                      ## @CyTDR
	.comm	_HZ,4,2                         ## @HZ
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_WAKEUP_CHARS,8,3               ## @WAKEUP_CHARS
	.comm	_DEBUG_PORT,4,2                 ## @DEBUG_PORT
	.no_dead_strip	_cd2401_tx_interrupt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cd2401_tx_interrupt
_cd2401_tx_interrupt:                   ; @cd2401_tx_interrupt
	.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
Lloh0:
	adrp	x8, _BASE_ADDR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BASE_ADDR@GOTPAGEOFF]
Lloh2:
	ldr	x19, [x8]
Lloh3:
	adrp	x8, _CyLICR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CyLICR@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	ldrb	w8, [x19, x8]
	lsr	x8, x8, #2
Lloh6:
	adrp	x9, _NR_PORTS@GOTPAGE
Lloh7:
	ldr	x9, [x9, _NR_PORTS@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	cmp	w9, w8
	b.le	LBB0_4
; %bb.1:
Lloh9:
	adrp	x9, _cy_port@GOTPAGE
Lloh10:
	ldr	x9, [x9, _cy_port@GOTPAGEOFF]
Lloh11:
	ldr	x10, [x9]
Lloh12:
	adrp	x9, _jiffies@GOTPAGE
Lloh13:
	ldr	x9, [x9, _jiffies@GOTPAGEOFF]
Lloh14:
	ldr	w11, [x9]
	mov	w9, #48
	madd	x9, x8, x9, x10
	ldr	x12, [x9, #32]!
	str	w11, [x9, #8]
	cbz	x12, LBB0_4
; %bb.2:
Lloh15:
	adrp	x11, _CyTFTC@GOTPAGE
Lloh16:
	ldr	x11, [x11, _CyTFTC@GOTPAGEOFF]
Lloh17:
	ldr	x11, [x11]
	ldrb	w20, [x19, x11]
	mov	w11, #48
	madd	x12, x8, x11, x10
	ldr	w13, [x12]
Lloh18:
	adrp	x11, _CyTDR@GOTPAGE
Lloh19:
	ldr	x11, [x11, _CyTDR@GOTPAGEOFF]
	cbz	w13, LBB0_5
; %bb.3:
	ldr	x14, [x11]
	strb	w13, [x19, x14]
	sub	w21, w20, #1
	str	wzr, [x12]
	b	LBB0_6
LBB0_4:
Lloh20:
	adrp	x8, _CyTxMpty@GOTPAGE
Lloh21:
	ldr	x8, [x8, _CyTxMpty@GOTPAGEOFF]
	ldrb	w8, [x8]
Lloh22:
	adrp	x9, _CyTxRdy@GOTPAGE
Lloh23:
	ldr	x9, [x9, _CyTxRdy@GOTPAGEOFF]
	ldrb	w9, [x9]
	orr	w8, w9, w8
Lloh24:
	adrp	x9, _CyIER@GOTPAGE
Lloh25:
	ldr	x9, [x9, _CyIER@GOTPAGEOFF]
Lloh26:
	ldr	x9, [x9]
	ldrb	w10, [x19, x9]
	bic	w8, w10, w8
	strb	w8, [x19, x9]
Lloh27:
	adrp	x8, _CyNOTRANS@GOTPAGE
Lloh28:
	ldr	x8, [x8, _CyNOTRANS@GOTPAGEOFF]
	ldrb	w8, [x8]
	b	LBB0_23
LBB0_5:
	mov	x21, x20
LBB0_6:
	mov	w12, #48
	madd	x12, x8, x12, x10
	ldr	w13, [x12, #4]!
	cbz	w13, LBB0_8
; %bb.7:
	ldr	x13, [x11]
	strb	wzr, [x19, x13]
	ldr	x13, [x11]
	mov	w14, #129
	strb	w14, [x19, x13]
	ldr	x13, [x11]
	strb	wzr, [x19, x13]
	ldr	x13, [x11]
	mov	w14, #130
	strb	w14, [x19, x13]
	ldr	w13, [x12]
	mov	w14, #200
	mul	w13, w13, w14
Lloh29:
	adrp	x14, _HZ@GOTPAGE
Lloh30:
	ldr	x14, [x14, _HZ@GOTPAGEOFF]
Lloh31:
	ldr	w14, [x14]
	sdiv	w13, w13, w14
	ldr	x14, [x11]
	strb	w13, [x19, x14]
	ldr	x13, [x11]
	strb	wzr, [x19, x13]
	ldr	x13, [x11]
	mov	w14, #131
	strb	w14, [x19, x13]
	sub	w21, w21, #7
	str	wzr, [x12]
LBB0_8:
	cmp	w21, #1
	b.lt	LBB0_20
; %bb.9:
	mov	w12, #48
	madd	x14, x8, x12, x10
	add	x12, x14, #8
	add	x13, x14, #16
	add	x14, x14, #24
Lloh32:
	adrp	x15, _PAGE_SIZE@GOTPAGE
Lloh33:
	ldr	x15, [x15, _PAGE_SIZE@GOTPAGEOFF]
	b	LBB0_12
LBB0_10:                                ;   in Loop: Header=BB0_12 Depth=1
	sub	x17, x17, #1
	str	x17, [x12]
	add	x17, x0, #1
	ldrsw	x0, [x15]
	sub	x0, x0, #1
	and	x17, x17, x0
	str	x17, [x14]
	mov	w17, #-1
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	ldr	x0, [x11]
	strb	w16, [x19, x0]
	add	w21, w21, w17
	cmp	w21, #0
	b.le	LBB0_20
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	x17, [x12]
	cbz	x17, LBB0_19
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	x16, [x13]
	cbz	x16, LBB0_19
; %bb.14:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	x0, [x9]
	ldr	x1, [x0, #8]
	cbnz	x1, LBB0_19
; %bb.15:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	x0, [x0]
	cbnz	x0, LBB0_19
; %bb.16:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	x0, [x14]
	ldr	w16, [x16, x0, lsl #2]
	cbnz	w16, LBB0_10
; %bb.17:                               ;   in Loop: Header=BB0_12 Depth=1
	cmp	w21, #2
	b.lt	LBB0_20
; %bb.18:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	w16, #0
	sub	x17, x17, #1
	str	x17, [x12]
	add	x17, x0, #1
	ldrsw	x0, [x15]
	sub	x0, x0, #1
	and	x17, x17, x0
	str	x17, [x14]
	ldr	x17, [x11]
	strb	wzr, [x19, x17]
	mov	w17, #-2
	b	LBB0_11
LBB0_19:
Lloh34:
	adrp	x11, _CyTxMpty@GOTPAGE
Lloh35:
	ldr	x11, [x11, _CyTxMpty@GOTPAGEOFF]
	ldrb	w11, [x11]
Lloh36:
	adrp	x12, _CyTxRdy@GOTPAGE
Lloh37:
	ldr	x12, [x12, _CyTxRdy@GOTPAGEOFF]
	ldrb	w12, [x12]
	orr	w11, w12, w11
Lloh38:
	adrp	x12, _CyIER@GOTPAGE
Lloh39:
	ldr	x12, [x12, _CyIER@GOTPAGEOFF]
Lloh40:
	ldr	x12, [x12]
	ldrb	w13, [x19, x12]
	bic	w11, w13, w11
	strb	w11, [x19, x12]
LBB0_20:
	mov	w11, #48
	mul	x8, x8, x11
	add	x8, x10, x8
	ldr	x8, [x8, #8]
Lloh41:
	adrp	x10, _WAKEUP_CHARS@GOTPAGE
Lloh42:
	ldr	x10, [x10, _WAKEUP_CHARS@GOTPAGEOFF]
Lloh43:
	ldr	x10, [x10]
	cmp	x8, x10
	b.ge	LBB0_22
; %bb.21:
	ldr	x0, [x9]
	bl	_tty_wakeup
LBB0_22:
Lloh44:
	adrp	x8, _CyNOTRANS@GOTPAGE
Lloh45:
	ldr	x8, [x8, _CyNOTRANS@GOTPAGEOFF]
	ldrb	w8, [x8]
	cmp	w21, w20
	csel	w8, w8, wzr, eq
LBB0_23:
Lloh46:
	adrp	x9, _CyTEOIR@GOTPAGE
Lloh47:
	ldr	x9, [x9, _CyTEOIR@GOTPAGEOFF]
Lloh48:
	ldr	x9, [x9]
	strb	w8, [x19, x9]
Lloh49:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh50:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
Lloh51:
	ldr	w0, [x8]
	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	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGot	Lloh36, Lloh37
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGot	Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.cfi_endproc
                                        ; -- End function
	.comm	_BASE_ADDR,8,3                  ; @BASE_ADDR
	.comm	_CyLICR,8,3                     ; @CyLICR
	.comm	_NR_PORTS,4,2                   ; @NR_PORTS
	.comm	_CyTxMpty,1,0                   ; @CyTxMpty
	.comm	_CyTxRdy,1,0                    ; @CyTxRdy
	.comm	_CyIER,8,3                      ; @CyIER
	.comm	_CyNOTRANS,1,0                  ; @CyNOTRANS
	.comm	_CyTEOIR,8,3                    ; @CyTEOIR
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.comm	_cy_port,8,3                    ; @cy_port
	.comm	_jiffies,4,2                    ; @jiffies
	.comm	_CyTFTC,8,3                     ; @CyTFTC
	.comm	_CyTDR,8,3                      ; @CyTDR
	.comm	_HZ,4,2                         ; @HZ
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_WAKEUP_CHARS,8,3               ; @WAKEUP_CHARS
	.comm	_DEBUG_PORT,4,2                 ; @DEBUG_PORT
	.no_dead_strip	_cd2401_tx_interrupt
.subsections_via_symbols
