	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ser12_interrupt
_ser12_interrupt:                       ## @ser12_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r13
	movq	%rsi, %rdi
	callq	_netdev_priv
	movq	_IRQ_NONE@GOTPCREL(%rip), %r15
	testq	%rax, %rax
	je	LBB0_32
## %bb.1:
	movq	%rax, %r14
	movq	8(%rax), %rax
	movq	_HDLCDRV_MAGIC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_32
## %bb.2:
	movl	(%r13), %edi
	callq	_IIR
	movl	%eax, %edi
	callq	_inb
	testb	$1, %al
	jne	LBB0_32
## %bb.3:
	movl	%eax, %ebx
	movq	%r14, %rax
	addq	$8, %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	leaq	-56(%rbp), %rdi
	callq	_ktime_get_ts64
	movl	(%r13), %edi
	callq	_MSR
	movl	%eax, %edi
	callq	_inb
	movl	%eax, %r12d
	testb	$8, %al
	je	LBB0_6
## %bb.4:
	movb	(%r14), %al
	testb	%al, %al
	je	LBB0_6
## %bb.5:
	xorb	%r12b, %al
	notb	%al
	shrb	$7, %al
	movzbl	%al, %esi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_hdlcdrv_setdcd
LBB0_6:
	xorl	%r15d, %r15d
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_7 Depth=1
	movl	(%r13), %edi
	callq	_LSR
LBB0_11:                                ##   in Loop: Header=BB0_7 Depth=1
	movl	%eax, %edi
	callq	_inb
LBB0_20:                                ##   in Loop: Header=BB0_7 Depth=1
	movl	(%r13), %edi
	callq	_IIR
	movl	%eax, %edi
	callq	_inb
	movl	%eax, %ebx
	testb	$1, %al
	jne	LBB0_21
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	andb	$6, %bl
	cmpb	$2, %bl
	je	LBB0_13
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movzbl	%bl, %eax
	cmpl	$4, %eax
	je	LBB0_12
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	cmpl	$6, %eax
	je	LBB0_10
## %bb.17:                              ##   in Loop: Header=BB0_7 Depth=1
	movl	(%r13), %edi
	callq	_MSR
	movl	%eax, %edi
	callq	_inb
	movl	%eax, %r12d
	testb	$8, %al
	je	LBB0_20
## %bb.18:                              ##   in Loop: Header=BB0_7 Depth=1
	movzbl	(%r14), %eax
	testb	%al, %al
	je	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_7 Depth=1
	movl	%r12d, %ecx
	xorb	%al, %cl
	notb	%cl
	shrb	$7, %cl
	movzbl	%cl, %esi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_hdlcdrv_setdcd
	jmp	LBB0_20
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_7 Depth=1
	movl	(%r13), %edi
	callq	_THR
	xorl	%edi, %edi
	movl	%eax, %esi
	callq	_outb
	movq	%r14, %rdi
	callq	_baycom_int_freq
	incl	%r15d
	cmpl	$0, 16(%r14)
	je	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_7 Depth=1
	xorl	%ebx, %ebx
	cmpl	$0, 20(%r14)
	setne	%bl
	orl	$14, %ebx
	movl	(%r13), %edi
	callq	_MCR
	movl	%ebx, %edi
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_7 Depth=1
	movl	(%r13), %edi
	callq	_RBR
	jmp	LBB0_11
LBB0_15:                                ##   in Loop: Header=BB0_7 Depth=1
	movl	(%r13), %edi
	callq	_MCR
	movl	$13, %edi
LBB0_16:                                ##   in Loop: Header=BB0_7 Depth=1
	movl	%eax, %esi
	callq	_outb
	jmp	LBB0_20
LBB0_21:
	andb	$16, %r12b
	movzbl	%r12b, %ecx
	leaq	-56(%rbp), %rdx
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_ser12_rx
	cmpl	$0, 16(%r14)
	je	LBB0_27
## %bb.22:
	testl	%r15d, %r15d
	je	LBB0_27
## %bb.23:
	movl	24(%r14), %eax
	cmpl	$1, %eax
	jg	LBB0_26
## %bb.24:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_hdlcdrv_getbits
	orl	$65536, %eax                    ## imm = 0x10000
	movl	%eax, 24(%r14)
	movq	%rbx, %rdi
	callq	_hdlcdrv_ptt
	testq	%rax, %rax
	je	LBB0_33
## %bb.25:
	movl	24(%r14), %eax
LBB0_26:
	movl	%eax, %ecx
	andl	$1, %ecx
	xorl	%edx, %edx
	cmpl	%ecx, 20(%r14)
	sete	%dl
	movl	%edx, 20(%r14)
	sarl	%eax
	movl	%eax, 24(%r14)
	jmp	LBB0_27
LBB0_33:
	movq	%r13, %rdi
	movl	$144, %esi
	callq	_ser12_set_divisor
	movl	$0, 16(%r14)
LBB0_27:
	xorl	%eax, %eax
	callq	_local_irq_enable
	cmpl	$0, 16(%r14)
	jne	LBB0_31
## %bb.28:
	testl	%r15d, %r15d
	je	LBB0_31
## %bb.29:
	movq	%r13, %rdi
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rsi
	callq	_hdlcdrv_arbitrate
	movq	%rbx, %rdi
	callq	_hdlcdrv_ptt
	testq	%rax, %rax
	je	LBB0_31
## %bb.30:
	movl	4(%r14), %esi
	movq	%r13, %rdi
	callq	_ser12_set_divisor
	movl	$1, 24(%r14)
	movl	$1, 16(%r14)
LBB0_31:
	movq	%r13, %rdi
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rsi
	callq	_hdlcdrv_transmitter
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_hdlcdrv_receiver
	xorl	%eax, %eax
	callq	_local_irq_disable
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %r15
LBB0_32:
	movl	(%r15), %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HDLCDRV_MAGIC,8,3              ## @HDLCDRV_MAGIC
	.comm	_IRQ_NONE,4,2                   ## @IRQ_NONE
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.no_dead_strip	_ser12_interrupt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ser12_interrupt
_ser12_interrupt:                       ; @ser12_interrupt
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x19, x1
	mov	x0, x1
	bl	_netdev_priv
	cbz	x0, LBB0_20
; %bb.1:
	mov	x21, x0
	mov	x20, x0
	ldr	x8, [x20, #8]!
Lloh0:
	adrp	x9, _HDLCDRV_MAGIC@GOTPAGE
Lloh1:
	ldr	x9, [x9, _HDLCDRV_MAGIC@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_20
; %bb.2:
	ldr	w0, [x19]
	bl	_IIR
	bl	_inb
	tbnz	w0, #0, LBB0_20
; %bb.3:
	mov	x23, x0
	add	x0, sp, #8
	bl	_ktime_get_ts64
	ldr	w0, [x19]
	bl	_MSR
	bl	_inb
	mov	x22, x0
	tbz	w0, #3, LBB0_6
; %bb.4:
	ldrb	w8, [x21]
	cbz	w8, LBB0_6
; %bb.5:
	eon	w8, w22, w8
	ubfx	w1, w8, #7, #1
	mov	x0, x20
	bl	_hdlcdrv_setdcd
LBB0_6:
	mov	w24, #0
	b	LBB0_10
LBB0_7:                                 ;   in Loop: Header=BB0_10 Depth=1
	ldr	w0, [x19]
	bl	_RBR
LBB0_8:                                 ;   in Loop: Header=BB0_10 Depth=1
	bl	_inb
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	ldr	w0, [x19]
	bl	_IIR
	bl	_inb
	mov	x23, x0
	tbnz	w0, #0, LBB0_22
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	and	w8, w23, #0x6
	cmp	w8, #2
	b.eq	LBB0_14
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	cmp	w8, #4
	b.eq	LBB0_7
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=1
	cmp	w8, #6
	b.ne	LBB0_16
; %bb.13:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	w0, [x19]
	bl	_LSR
	b	LBB0_8
LBB0_14:                                ;   in Loop: Header=BB0_10 Depth=1
	ldr	w0, [x19]
	bl	_THR
	mov	x1, x0
	mov	w0, #0
	bl	_outb
	mov	x0, x21
	bl	_baycom_int_freq
	add	w24, w24, #1
	ldr	w8, [x21, #16]
	cbz	w8, LBB0_19
; %bb.15:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	w8, [x21, #20]
	cmp	w8, #0
	cset	w8, ne
	orr	w23, w8, #0xe
	ldr	w0, [x19]
	bl	_MCR
	mov	x1, x0
	mov	x0, x23
	bl	_outb
	b	LBB0_9
LBB0_16:                                ;   in Loop: Header=BB0_10 Depth=1
	ldr	w0, [x19]
	bl	_MSR
	bl	_inb
	mov	x22, x0
	tbz	w0, #3, LBB0_9
; %bb.17:                               ;   in Loop: Header=BB0_10 Depth=1
	ldrb	w8, [x21]
	cbz	w8, LBB0_9
; %bb.18:                               ;   in Loop: Header=BB0_10 Depth=1
	eon	w8, w22, w8
	ubfx	w1, w8, #7, #1
	mov	x0, x20
	bl	_hdlcdrv_setdcd
	b	LBB0_9
LBB0_19:                                ;   in Loop: Header=BB0_10 Depth=1
	ldr	w0, [x19]
	bl	_MCR
	mov	x1, x0
	mov	w0, #13
	bl	_outb
	b	LBB0_9
LBB0_20:
Lloh3:
	adrp	x8, _IRQ_NONE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IRQ_NONE@GOTPAGEOFF]
LBB0_21:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_22:
	and	w3, w22, #0x10
	add	x2, sp, #8
	mov	x0, x19
	mov	x1, x21
	bl	_ser12_rx
	ldr	w8, [x21, #16]
	cbz	w8, LBB0_29
; %bb.23:
	cbz	w24, LBB0_29
; %bb.24:
	ldr	w8, [x21, #24]
	cmp	w8, #1
	b.gt	LBB0_27
; %bb.25:
	mov	x0, x20
	bl	_hdlcdrv_getbits
	orr	w8, w0, #0x10000
	str	w8, [x21, #24]
	mov	x0, x20
	bl	_hdlcdrv_ptt
	cbz	x0, LBB0_28
; %bb.26:
	ldr	w8, [x21, #24]
LBB0_27:
	ldr	w9, [x21, #20]
	and	w10, w8, #0x1
	cmp	w9, w10
	cset	w9, eq
	asr	w8, w8, #1
	stp	w9, w8, [x21, #20]
	b	LBB0_29
LBB0_28:
	mov	x0, x19
	mov	w1, #144
	bl	_ser12_set_divisor
	str	wzr, [x21, #16]
LBB0_29:
	bl	_local_irq_enable
	ldr	w8, [x21, #16]
	cbnz	w8, LBB0_33
; %bb.30:
	cbz	w24, LBB0_33
; %bb.31:
	mov	x0, x19
	mov	x1, x20
	bl	_hdlcdrv_arbitrate
	mov	x0, x20
	bl	_hdlcdrv_ptt
	cbz	x0, LBB0_33
; %bb.32:
	ldr	w1, [x21, #4]
	mov	x0, x19
	bl	_ser12_set_divisor
	mov	w8, #1
	str	w8, [x21, #24]
	str	w8, [x21, #16]
LBB0_33:
	mov	x0, x19
	mov	x1, x20
	bl	_hdlcdrv_transmitter
	mov	x0, x19
	mov	x1, x20
	bl	_hdlcdrv_receiver
	bl	_local_irq_disable
Lloh5:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh6:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
	b	LBB0_21
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_HDLCDRV_MAGIC,8,3              ; @HDLCDRV_MAGIC
	.comm	_IRQ_NONE,4,2                   ; @IRQ_NONE
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.no_dead_strip	_ser12_interrupt
.subsections_via_symbols
