	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rsi, %rdi
	callq	_netdev_priv
	movq	_IRQ_NONE@GOTPCREL(%rip), %r12
	testq	%r15, %r15
	je	LBB0_20
## %bb.1:
	movq	%rax, %r14
	testq	%rax, %rax
	je	LBB0_20
## %bb.2:
	movq	(%r14), %rax
	movq	_HDLCDRV_MAGIC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_20
## %bb.3:
	movl	(%r15), %edi
	callq	_IIR
	movl	%eax, %edi
	callq	_inb
	testb	$1, %al
	jne	LBB0_20
## %bb.4:
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_baycom_int_freq
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	(%r15), %edi
	callq	_MSR
LBB0_15:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	%eax, %edi
	callq	_inb
LBB0_16:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	(%r15), %edi
	callq	_IIR
	movl	%eax, %edi
	callq	_inb
	movl	%eax, %ebx
	testb	$1, %al
	jne	LBB0_17
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	andb	$6, %bl
	cmpb	$2, %bl
	je	LBB0_10
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movzbl	%bl, %eax
	cmpl	$4, %eax
	je	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	cmpl	$6, %eax
	jne	LBB0_14
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	(%r15), %edi
	callq	_LSR
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	%r14, %rdi
	callq	_hdlcdrv_ptt
	movq	%r15, %rdi
	movq	%r14, %rsi
	testl	%eax, %eax
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_5 Depth=1
	callq	_ser12_tx
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_5 Depth=1
	movl	(%r15), %edi
	callq	_RBR
	jmp	LBB0_15
LBB0_12:                                ##   in Loop: Header=BB0_5 Depth=1
	callq	_ser12_rx
	decq	8(%r14)
LBB0_13:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	(%r15), %edi
	callq	_THR
	xorl	%edi, %edi
	movl	%eax, %esi
	callq	_outb
	jmp	LBB0_16
LBB0_17:
	cmpq	$0, 8(%r14)
	jg	LBB0_19
## %bb.18:
	movq	%r14, %rdi
	callq	_SER12_ARB_DIVIDER
	movq	%rax, 8(%r14)
	xorl	%eax, %eax
	callq	_local_irq_enable
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_hdlcdrv_arbitrate
LBB0_19:
	xorl	%eax, %eax
	callq	_local_irq_enable
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_hdlcdrv_transmitter
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_hdlcdrv_receiver
	xorl	%eax, %eax
	callq	_local_irq_disable
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %r12
LBB0_20:
	movl	(%r12), %eax
	popq	%rbx
	popq	%r12
	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:
	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, x1
	mov	x0, x1
	bl	_netdev_priv
Lloh0:
	adrp	x8, _IRQ_NONE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IRQ_NONE@GOTPAGEOFF]
	cbz	x19, LBB0_21
; %bb.1:
	mov	x20, x0
	cbz	x0, LBB0_21
; %bb.2:
	ldr	x8, [x20]
Lloh2:
	adrp	x9, _HDLCDRV_MAGIC@GOTPAGE
Lloh3:
	ldr	x9, [x9, _HDLCDRV_MAGIC@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_17
; %bb.3:
	ldr	w0, [x19]
	bl	_IIR
	bl	_inb
	tbnz	w0, #0, LBB0_17
; %bb.4:
	mov	x21, x0
	mov	x0, x20
	bl	_baycom_int_freq
	b	LBB0_8
LBB0_5:                                 ;   in Loop: Header=BB0_8 Depth=1
	ldr	w0, [x19]
	bl	_MSR
LBB0_6:                                 ;   in Loop: Header=BB0_8 Depth=1
	bl	_inb
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	ldr	w0, [x19]
	bl	_IIR
	bl	_inb
	mov	x21, x0
	tbnz	w0, #0, LBB0_18
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	and	w8, w21, #0x6
	cmp	w8, #2
	b.eq	LBB0_12
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	cmp	w8, #4
	b.eq	LBB0_14
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
	cmp	w8, #6
	b.ne	LBB0_5
; %bb.11:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	w0, [x19]
	bl	_LSR
	b	LBB0_6
LBB0_12:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	x0, x20
	bl	_hdlcdrv_ptt
	cbz	w0, LBB0_15
; %bb.13:                               ;   in Loop: Header=BB0_8 Depth=1
	mov	x0, x19
	mov	x1, x20
	bl	_ser12_tx
	b	LBB0_16
LBB0_14:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	w0, [x19]
	bl	_RBR
	b	LBB0_6
LBB0_15:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	x0, x19
	mov	x1, x20
	bl	_ser12_rx
	ldr	x8, [x20, #8]
	sub	x8, x8, #1
	str	x8, [x20, #8]
LBB0_16:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	w0, [x19]
	bl	_THR
	mov	x1, x0
	mov	w0, #0
	bl	_outb
	b	LBB0_7
LBB0_17:
Lloh5:
	adrp	x8, _IRQ_NONE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _IRQ_NONE@GOTPAGEOFF]
	b	LBB0_21
LBB0_18:
	ldr	x8, [x20, #8]
	cmp	x8, #0
	b.gt	LBB0_20
; %bb.19:
	mov	x0, x20
	bl	_SER12_ARB_DIVIDER
	str	x0, [x20, #8]
	bl	_local_irq_enable
	mov	x0, x19
	mov	x1, x20
	bl	_hdlcdrv_arbitrate
LBB0_20:
	bl	_local_irq_enable
	mov	x0, x19
	mov	x1, x20
	bl	_hdlcdrv_transmitter
	mov	x0, x19
	mov	x1, x20
	bl	_hdlcdrv_receiver
	bl	_local_irq_disable
Lloh7:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh8:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
LBB0_21:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.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
