	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cal_irq
_cal_irq:                               ## @cal_irq
	.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, %r14
	movl	$2, %edi
	callq	_CAL_HL_IRQSTATUS
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_reg_read
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	movq	%rax, %rbx
	movl	$2, %edi
	callq	_CAL_HL_IRQSTATUS
	movq	%r14, %rdi
	movl	%eax, %esi
	movq	%rbx, %rdx
	callq	_reg_write
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_isportirqset
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movq	(%r14), %rax
	movq	(%rax), %rdi
	movq	(%rdi), %rax
	cmpq	8(%rdi), %rax
	je	LBB0_4
## %bb.3:
	callq	_cal_process_buffer_complete
LBB0_4:
	movq	%rbx, %rdi
	movl	$2, %esi
	callq	_isportirqset
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:
	movq	(%r14), %rax
	movq	8(%rax), %rdi
	movq	(%rdi), %rax
	cmpq	8(%rdi), %rax
	je	LBB0_7
## %bb.6:
	callq	_cal_process_buffer_complete
LBB0_7:
	movl	$3, %edi
	callq	_CAL_HL_IRQSTATUS
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_reg_read
	testq	%rax, %rax
	je	LBB0_18
## %bb.8:
	movq	%rax, %rbx
	movl	$3, %edi
	callq	_CAL_HL_IRQSTATUS
	movq	%r14, %rdi
	movl	%eax, %esi
	movq	%rbx, %rdx
	callq	_reg_write
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_isportirqset
	testq	%rax, %rax
	je	LBB0_13
## %bb.9:
	movq	(%r14), %rax
	movq	(%rax), %r12
	leaq	16(%r12), %r15
	movq	%r15, %rdi
	callq	_spin_lock
	leaq	20(%r12), %rdi
	callq	_list_empty
	testl	%eax, %eax
	jne	LBB0_12
## %bb.10:
	movq	(%r12), %rax
	cmpq	8(%r12), %rax
	jne	LBB0_12
## %bb.11:
	movq	%r12, %rdi
	callq	_cal_schedule_next_buffer
LBB0_12:
	movq	%r15, %rdi
	callq	_spin_unlock
LBB0_13:
	movq	%rbx, %rdi
	movl	$2, %esi
	callq	_isportirqset
	testq	%rax, %rax
	je	LBB0_18
## %bb.14:
	movq	(%r14), %rax
	movq	8(%rax), %rbx
	leaq	16(%rbx), %r14
	movq	%r14, %rdi
	callq	_spin_lock
	leaq	20(%rbx), %rdi
	callq	_list_empty
	testl	%eax, %eax
	jne	LBB0_17
## %bb.15:
	movq	(%rbx), %rax
	cmpq	8(%rbx), %rax
	jne	LBB0_17
## %bb.16:
	movq	%rbx, %rdi
	callq	_cal_schedule_next_buffer
LBB0_17:
	movq	%r14, %rdi
	callq	_spin_unlock
LBB0_18:
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.no_dead_strip	_cal_irq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cal_irq
_cal_irq:                               ; @cal_irq
	.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	w0, #2
	bl	_CAL_HL_IRQSTATUS
	mov	x1, x0
	mov	x0, x19
	bl	_reg_read
	cbz	x0, LBB0_7
; %bb.1:
	mov	x20, x0
	mov	w0, #2
	bl	_CAL_HL_IRQSTATUS
	mov	x1, x0
	mov	x0, x19
	mov	x2, x20
	bl	_reg_write
	mov	x0, x20
	mov	w1, #1
	bl	_isportirqset
	cbz	x0, LBB0_4
; %bb.2:
	ldr	x8, [x19]
	ldr	x0, [x8]
	ldp	x8, x9, [x0]
	cmp	x8, x9
	b.eq	LBB0_4
; %bb.3:
	bl	_cal_process_buffer_complete
LBB0_4:
	mov	x0, x20
	mov	w1, #2
	bl	_isportirqset
	cbz	x0, LBB0_7
; %bb.5:
	ldr	x8, [x19]
	ldr	x0, [x8, #8]
	ldp	x8, x9, [x0]
	cmp	x8, x9
	b.eq	LBB0_7
; %bb.6:
	bl	_cal_process_buffer_complete
LBB0_7:
	mov	w0, #3
	bl	_CAL_HL_IRQSTATUS
	mov	x1, x0
	mov	x0, x19
	bl	_reg_read
	cbz	x0, LBB0_18
; %bb.8:
	mov	x20, x0
	mov	w0, #3
	bl	_CAL_HL_IRQSTATUS
	mov	x1, x0
	mov	x0, x19
	mov	x2, x20
	bl	_reg_write
	mov	x0, x20
	mov	w1, #1
	bl	_isportirqset
	cbz	x0, LBB0_13
; %bb.9:
	ldr	x8, [x19]
	ldr	x22, [x8]
	add	x21, x22, #16
	mov	x0, x21
	bl	_spin_lock
	add	x0, x22, #20
	bl	_list_empty
	cbnz	w0, LBB0_12
; %bb.10:
	ldp	x8, x9, [x22]
	cmp	x8, x9
	b.ne	LBB0_12
; %bb.11:
	mov	x0, x22
	bl	_cal_schedule_next_buffer
LBB0_12:
	mov	x0, x21
	bl	_spin_unlock
LBB0_13:
	mov	x0, x20
	mov	w1, #2
	bl	_isportirqset
	cbz	x0, LBB0_18
; %bb.14:
	ldr	x8, [x19]
	ldr	x20, [x8, #8]
	add	x19, x20, #16
	mov	x0, x19
	bl	_spin_lock
	add	x0, x20, #20
	bl	_list_empty
	cbnz	w0, LBB0_17
; %bb.15:
	ldp	x8, x9, [x20]
	cmp	x8, x9
	b.ne	LBB0_17
; %bb.16:
	mov	x0, x20
	bl	_cal_schedule_next_buffer
LBB0_17:
	mov	x0, x19
	bl	_spin_unlock
LBB0_18:
Lloh0:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
Lloh2:
	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	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.no_dead_strip	_cal_irq
.subsections_via_symbols
