	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	leaq	8(%rdi), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	%r15, %rdi
	callq	_reset_device
	movl	$1, (%r15)
	movq	%r15, %rdi
	callq	_hdlc_mode
	movl	$0, 4(%r15)
	movq	_CHA@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rsi
	movq	_IRQ_TIMER@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_irq_enable
	movq	_TIMR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%rbx), %rsi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_write_reg
	movq	(%rbx), %rsi
	movq	_CMD_START_TIMER@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_issue_command
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movq	$-100, %rbx
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$0, 4(%r15)
	jne	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$10, %edi
	callq	_msleep_interruptible
	incq	%rbx
	jne	LBB0_1
LBB0_3:
	movl	$0, (%r15)
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	%r15, %rdi
	callq	_reset_device
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movl	4(%r15), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CHA,8,3                        ## @CHA
	.comm	_IRQ_TIMER,4,2                  ## @IRQ_TIMER
	.comm	_TIMR,8,3                       ## @TIMR
	.comm	_CMD_START_TIMER,4,2            ## @CMD_START_TIMER
	.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
	add	x20, x0, #8
	mov	x0, x20
	bl	_spin_lock_irqsave
	mov	x0, x19
	bl	_reset_device
	mov	w8, #1
	str	w8, [x19]
	mov	x0, x19
	bl	_hdlc_mode
	str	wzr, [x19, #4]
Lloh0:
	adrp	x21, _CHA@GOTPAGE
Lloh1:
	ldr	x21, [x21, _CHA@GOTPAGEOFF]
	ldr	x1, [x21]
Lloh2:
	adrp	x8, _IRQ_TIMER@GOTPAGE
Lloh3:
	ldr	x8, [x8, _IRQ_TIMER@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_irq_enable
	ldr	x8, [x21]
Lloh5:
	adrp	x9, _TIMR@GOTPAGE
Lloh6:
	ldr	x9, [x9, _TIMR@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	x0, x19
	mov	w2, #0
	bl	_write_reg
	ldr	x1, [x21]
Lloh8:
	adrp	x8, _CMD_START_TIMER@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CMD_START_TIMER@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_issue_command
	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:
	str	wzr, [x19]
	mov	x0, x20
	bl	_spin_lock_irqsave
	mov	x0, x19
	bl	_reset_device
	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 AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_CHA,8,3                        ; @CHA
	.comm	_IRQ_TIMER,4,2                  ; @IRQ_TIMER
	.comm	_TIMR,8,3                       ; @TIMR
	.comm	_CMD_START_TIMER,4,2            ; @CMD_START_TIMER
	.no_dead_strip	_irq_test
.subsections_via_symbols
