	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	16(%rdi), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	24(%rdi), %r13d
	movl	$921600, 24(%rdi)               ## imm = 0xE1000
	movq	$0, 16(%rdi)
	leaq	28(%rdi), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	%rbx, %rdi
	callq	_async_mode
	movq	_IRQ_TXIDLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_slgt_irq_on
	movq	_TCR@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_rd_reg16
	movzwl	%ax, %eax
	movq	_BIT1@GOTPCREL(%rip), %rcx
	movzwl	(%rcx), %edx
	orl	%eax, %edx
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_wr_reg16
	movq	_TDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_wr_reg16
	movq	_DiagStatus_IrqFailure@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movq	%rax, 8(%rbx)
	movl	$0, (%rbx)
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movq	$-100, %r12
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$0, (%rbx)
	jne	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$10, %edi
	callq	_msleep_interruptible
	incq	%r12
	jne	LBB0_1
LBB0_3:
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	%rbx, %rdi
	callq	_reset_port
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movl	%r13d, 24(%rbx)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 16(%rbx)
	movl	(%rbx), %edx
	xorl	%ecx, %ecx
	testl	%edx, %edx
	jne	LBB0_4
## %bb.5:
	movq	(%r15), %rax
	jmp	LBB0_6
LBB0_4:
	xorl	%eax, %eax
LBB0_6:
	movq	%rax, 8(%rbx)
	movq	_ENODEV@GOTPCREL(%rip), %rsi
	xorl	%eax, %eax
	subl	(%rsi), %eax
	testl	%edx, %edx
	cmovnel	%ecx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IRQ_TXIDLE,4,2                 ## @IRQ_TXIDLE
	.comm	_TCR,4,2                        ## @TCR
	.comm	_BIT1,4,2                       ## @BIT1
	.comm	_TDR,4,2                        ## @TDR
	.comm	_DiagStatus_IrqFailure,8,3      ## @DiagStatus_IrqFailure
	.comm	_ENODEV,4,2                     ## @ENODEV
	.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	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x0
	ldr	x22, [x0, #16]
	ldr	w23, [x0, #24]
	mov	w8, #4096
	movk	w8, #14, lsl #16
	str	w8, [x0, #24]
	str	xzr, [x0, #16]
	add	x20, x0, #28
	mov	x0, x20
	bl	_spin_lock_irqsave
	mov	x0, x19
	bl	_async_mode
Lloh0:
	adrp	x8, _IRQ_TXIDLE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IRQ_TXIDLE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_slgt_irq_on
Lloh3:
	adrp	x8, _TCR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TCR@GOTPAGEOFF]
Lloh5:
	ldr	w21, [x8]
	mov	x0, x19
	mov	x1, x21
	bl	_rd_reg16
	and	w8, w0, #0xffff
Lloh6:
	adrp	x9, _BIT1@GOTPAGE
Lloh7:
	ldr	x9, [x9, _BIT1@GOTPAGEOFF]
	ldrh	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x19
	mov	x1, x21
	bl	_wr_reg16
Lloh8:
	adrp	x8, _TDR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _TDR@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_wr_reg16
Lloh11:
	adrp	x21, _DiagStatus_IrqFailure@GOTPAGE
Lloh12:
	ldr	x21, [x21, _DiagStatus_IrqFailure@GOTPAGEOFF]
	ldr	x8, [x21]
	str	x8, [x19, #8]
	str	wzr, [x19]
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	mov	x24, #-100
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x19]
	cbnz	w8, LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w0, #10
	bl	_msleep_interruptible
	adds	x24, x24, #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
	str	w23, [x19, #24]
	ldr	w8, [x19]
	ldr	x9, [x21]
	cmp	w8, #0
	csel	x8, x9, xzr, eq
	stp	x8, x22, [x19, #8]
Lloh13:
	adrp	x8, _ENODEV@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	csneg	w0, wzr, w8, ne
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_IRQ_TXIDLE,4,2                 ; @IRQ_TXIDLE
	.comm	_TCR,4,2                        ; @TCR
	.comm	_BIT1,4,2                       ; @BIT1
	.comm	_TDR,4,2                        ; @TDR
	.comm	_DiagStatus_IrqFailure,8,3      ; @DiagStatus_IrqFailure
	.comm	_ENODEV,4,2                     ; @ENODEV
	.no_dead_strip	_irq_test
.subsections_via_symbols
