	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function irq_test
_irq_test:                              ## @irq_test
	.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	%rdi, %r12
	testb	$1, (%rdi)
	jne	LBB0_1
## %bb.2:
	movq	_TIMER0@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_TIMER2@GOTPCREL(%rip), %rax
LBB0_3:
	movb	(%rax), %r15b
	leaq	8(%r12), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	%r12, %rdi
	callq	_reset_port
	movq	_DiagStatus_IrqFailure@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r12)
	movl	$0, 4(%r12)
	movq	_IER2@GOTPCREL(%rip), %rax
	movzbl	(%rax), %esi
	testb	$1, (%r12)
	jne	LBB0_4
## %bb.5:
	movq	_BIT4@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_4:
	movq	_BIT6@GOTPCREL(%rip), %rax
LBB0_6:
	movzbl	(%rax), %edx
	movq	%r12, %rdi
	callq	_write_reg
	movq	_TEPR@GOTPCREL(%rip), %rax
	movb	(%rax), %al
	addb	%r15b, %al
	movzbl	%al, %esi
	movq	%r12, %rdi
	xorl	%edx, %edx
	callq	_write_reg
	movq	_TCONR@GOTPCREL(%rip), %rax
	movb	(%rax), %al
	addb	%r15b, %al
	movzbl	%al, %esi
	movq	%r12, %rdi
	movl	$1, %edx
	callq	_write_reg16
	movq	_TMCS@GOTPCREL(%rip), %rax
	addb	(%rax), %r15b
	movzbl	%r15b, %esi
	movq	%r12, %rdi
	movl	$80, %edx
	callq	_write_reg
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movq	$-100, %rbx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$0, 4(%r12)
	jne	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movl	$10, %edi
	callq	_msleep_interruptible
	incq	%rbx
	jne	LBB0_7
LBB0_9:
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	%r12, %rdi
	callq	_reset_port
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movl	4(%r12), %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TIMER2,1,0                     ## @TIMER2
	.comm	_TIMER0,1,0                     ## @TIMER0
	.comm	_DiagStatus_IrqFailure,4,2      ## @DiagStatus_IrqFailure
	.comm	_IER2,1,0                       ## @IER2
	.comm	_BIT6,8,3                       ## @BIT6
	.comm	_BIT4,8,3                       ## @BIT4
	.comm	_TEPR,8,3                       ## @TEPR
	.comm	_TCONR,8,3                      ## @TCONR
	.comm	_TMCS,8,3                       ## @TMCS
	.no_dead_strip	_irq_test
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function irq_test
_irq_test:                              ; @irq_test
	.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]
Lloh0:
	adrp	x9, _TIMER2@GOTPAGE
Lloh1:
	ldr	x9, [x9, _TIMER2@GOTPAGEOFF]
Lloh2:
	adrp	x10, _TIMER0@GOTPAGE
Lloh3:
	ldr	x10, [x10, _TIMER0@GOTPAGEOFF]
	tst	w8, #0x1
	csel	x8, x10, x9, eq
	ldrb	w21, [x8]
	add	x20, x0, #8
	mov	x0, x20
	bl	_spin_lock_irqsave
	mov	x0, x19
	bl	_reset_port
Lloh4:
	adrp	x8, _DiagStatus_IrqFailure@GOTPAGE
Lloh5:
	ldr	x8, [x8, _DiagStatus_IrqFailure@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	str	w8, [x19, #12]
	str	wzr, [x19, #4]
Lloh7:
	adrp	x8, _IER2@GOTPAGE
Lloh8:
	ldr	x8, [x8, _IER2@GOTPAGEOFF]
	ldrb	w1, [x8]
Lloh9:
	adrp	x8, _BIT6@GOTPAGE
Lloh10:
	ldr	x8, [x8, _BIT6@GOTPAGEOFF]
	ldr	w9, [x19]
Lloh11:
	adrp	x10, _BIT4@GOTPAGE
Lloh12:
	ldr	x10, [x10, _BIT4@GOTPAGEOFF]
	tst	w9, #0x1
	csel	x8, x10, x8, eq
	ldrb	w2, [x8]
	mov	x0, x19
	bl	_write_reg
Lloh13:
	adrp	x8, _TEPR@GOTPAGE
Lloh14:
	ldr	x8, [x8, _TEPR@GOTPAGEOFF]
	ldrb	w8, [x8]
	add	w8, w21, w8
	and	w1, w8, #0xff
	mov	x0, x19
	mov	w2, #0
	bl	_write_reg
Lloh15:
	adrp	x8, _TCONR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _TCONR@GOTPAGEOFF]
	ldrb	w8, [x8]
	add	w8, w21, w8
	and	w1, w8, #0xff
	mov	x0, x19
	mov	w2, #1
	bl	_write_reg16
Lloh17:
	adrp	x8, _TMCS@GOTPAGE
Lloh18:
	ldr	x8, [x8, _TMCS@GOTPAGEOFF]
	ldrb	w8, [x8]
	add	w8, w21, w8
	and	w1, w8, #0xff
	mov	x0, x19
	mov	w2, #80
	bl	_write_reg
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	mov	x21, #-100
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x19, #4]
	cbnz	w8, LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w0, #10
	bl	_msleep_interruptible
	adds	x21, x21, #1
	b.lo	LBB0_1
LBB0_3:
	mov	x0, x20
	bl	_spin_lock_irqsave
	mov	x0, x19
	bl	_reset_port
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	ldr	w0, [x19, #4]
	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	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_TIMER2,1,0                     ; @TIMER2
	.comm	_TIMER0,1,0                     ; @TIMER0
	.comm	_DiagStatus_IrqFailure,4,2      ; @DiagStatus_IrqFailure
	.comm	_IER2,1,0                       ; @IER2
	.comm	_BIT6,8,3                       ; @BIT6
	.comm	_BIT4,8,3                       ; @BIT4
	.comm	_TEPR,8,3                       ; @TEPR
	.comm	_TCONR,8,3                      ; @TCONR
	.comm	_TMCS,8,3                       ; @TMCS
	.no_dead_strip	_irq_test
.subsections_via_symbols
