	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cuda_intr
_cuda_intr:                             ## @cuda_intr
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	callq	_device_get_softc
	movq	%rax, %rbx
	leaq	40(%rax), %r14
	movq	%r14, %rdi
	callq	_mtx_lock
	movq	_vIFR@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_cuda_read_reg
	movq	_vSR_INT@GOTPCREL(%rip), %rcx
	notl	%eax
	testl	%eax, (%rcx)
	jne	LBB0_33
## %bb.1:
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	movl	(%r15), %esi
	movq	%rbx, %rdi
	movl	$127, %edx
	callq	_cuda_write_reg
	leaq	48(%rbx), %r12
	movq	%rbx, %rax
	addq	$44, %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	movq	_vSR@GOTPCREL(%rip), %r13
	movabsq	$4294967427, %r15               ## imm = 0x100000083
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %eax
	cmpl	$128, %eax
	jne	LBB0_3
## %bb.22:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_cuda_read_reg
	incq	8(%rbx)
	movq	%rbx, %rdi
	callq	_cuda_intr_state
	testl	%eax, %eax
	je	LBB0_24
## %bb.23:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	callq	_cuda_in
	movq	%rbx, %rdi
	callq	_cuda_idle
	movq	$0, 8(%rbx)
	movq	%r15, (%rbx)
	movl	$0, 24(%rbx)
	movl	$150, %edi
	callq	_DELAY
	jmp	LBB0_2
LBB0_3:                                 ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$130, %eax
	jne	LBB0_4
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_cuda_read_reg
	movq	56(%rbx), %rdx
	movslq	24(%rbx), %rcx
	movq	%rax, (%rdx,%rcx,8)
	cmpq	$256, %rcx                      ## imm = 0x100
	jl	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$256, %ecx                      ## imm = 0x100
	jne	LBB0_13
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	leaq	L_.str(%rip), %rsi
	callq	_device_printf
	movb	$1, %r12b
	jmp	LBB0_14
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	leal	1(%rcx), %eax
	movl	%eax, 24(%rbx)
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	xorl	%r12d, %r12d
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	callq	_cuda_intr_state
	testl	%eax, %eax
	je	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	callq	_cuda_toggle_ack
	testb	%r12b, %r12b
	je	LBB0_27
LBB0_16:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	callq	_cuda_idle
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_STAILQ_FIRST
	testq	%rax, %rax
	je	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, %r12
	movl	24(%rbx), %edx
	addl	$-2, %edx
	movl	%edx, (%rax)
	movq	56(%rbx), %rsi
	movq	8(%rsi), %rax
	movq	%rax, 8(%r12)
	movl	4(%r12), %edi
	addq	$16, %rsi
	callq	_memcpy
	movq	_pkt_q@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_STAILQ_REMOVE_HEAD
	movq	_pkt_q@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	callq	_STAILQ_INSERT_TAIL
	movl	$1, -44(%rbp)                   ## 4-byte Folded Spill
LBB0_18:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	$131, (%rbx)
	movl	$0, 24(%rbx)
	cmpl	$1, 4(%rbx)
	jne	LBB0_27
## %bb.19:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	$1500, %edi                     ## imm = 0x5DC
	callq	_DELAY
	movq	$0, 8(%rbx)
	movl	$128, (%rbx)
	movq	%rbx, %rdi
	callq	_cuda_intr_state
	movq	%rbx, %rdi
	testl	%eax, %eax
	je	LBB0_20
## %bb.21:                              ##   in Loop: Header=BB0_2 Depth=1
	callq	_cuda_in
	movq	%rbx, %rdi
	callq	_cuda_idle
	movq	$0, 8(%rbx)
	movl	$131, (%rbx)
	movl	$0, 24(%rbx)
	movl	$150, %edi
	callq	_DELAY
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	jmp	LBB0_2
LBB0_4:
	cmpl	$131, %eax
	jne	LBB0_27
## %bb.5:
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_cuda_read_reg
	movq	56(%rbx), %rcx
	movq	%rax, 8(%rcx)
	movq	%rbx, %rdi
	callq	_cuda_intr_state
	testl	%eax, %eax
	je	LBB0_6
## %bb.8:
	movq	%rbx, %rdi
	callq	_cuda_in
	movq	%rbx, %rdi
	callq	_cuda_tip
	movl	$1, 24(%rbx)
	movl	$130, (%rbx)
	jmp	LBB0_27
LBB0_24:
	movq	8(%rbx), %rax
	cmpq	%rax, 32(%rbx)
	jne	LBB0_26
## %bb.25:
	movq	$131, (%rbx)
	movq	%rbx, %rdi
	callq	_cuda_in
	movq	%rbx, %rdi
	callq	_cuda_idle
	jmp	LBB0_27
LBB0_26:
	movl	(%r13), %esi
	movq	16(%rbx), %rcx
	movl	(%rcx,%rax,4), %edx
	movq	%rbx, %rdi
	callq	_cuda_write_reg
	movq	%rbx, %rdi
	callq	_cuda_toggle_ack
LBB0_27:
	movl	-44(%rbp), %r15d                ## 4-byte Reload
LBB0_28:
	movq	%r14, %rdi
	callq	_mtx_unlock
	testl	%r15d, %r15d
	je	LBB0_30
## %bb.29:
	movq	%rbx, %rdi
	callq	_cuda_send_inbound
LBB0_30:
	movq	%r14, %rdi
	callq	_mtx_lock
	cmpl	$0, 4(%rbx)
	jne	LBB0_33
## %bb.31:
	cmpl	$131, (%rbx)
	jne	LBB0_33
## %bb.32:
	movq	%rbx, %rdi
	callq	_cuda_send_outbound
LBB0_33:
	movq	%r14, %rdi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mtx_unlock                     ## TAILCALL
LBB0_6:
	cmpl	$0, 4(%rbx)
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	je	LBB0_28
## %bb.7:
	movl	$150, %edi
	callq	_DELAY
	movl	$128, (%rbx)
	movq	$0, 8(%rbx)
	movq	%rbx, %rdi
	callq	_cuda_out
	movl	(%r13), %esi
	movq	16(%rbx), %rax
	movl	4(%rax), %edx
	movq	%rbx, %rdi
	callq	_cuda_write_reg
	movq	%rbx, %rdi
	callq	_cuda_ack_off
	movq	%rbx, %rdi
	callq	_cuda_tip
	jmp	LBB0_28
LBB0_20:
	callq	_cuda_out
	movl	(%r13), %esi
	movq	8(%rbx), %rax
	movq	16(%rbx), %rcx
	movl	(%rcx,%rax,4), %edx
	movq	%rbx, %rdi
	callq	_cuda_write_reg
	movq	%rbx, %rdi
	callq	_cuda_ack_off
	movq	%rbx, %rdi
	callq	_cuda_tip
	jmp	LBB0_27
	.cfi_endproc
                                        ## -- End function
	.comm	_vIFR,4,2                       ## @vIFR
	.comm	_vSR_INT,4,2                    ## @vSR_INT
	.comm	_vSR,4,2                        ## @vSR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"input overflow\n"

	.comm	_pkt_q,4,2                      ## @pkt_q
	.no_dead_strip	_cuda_intr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function cuda_intr
lCPI0_0:
	.long	131                             ; 0x83
	.long	1                               ; 0x1
lCPI0_1:
	.long	131                             ; 0x83
	.long	0                               ; 0x0
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_cuda_intr:                             ; @cuda_intr
	.cfi_startproc
; %bb.0:
	stp	d9, d8, [sp, #-112]!            ; 16-byte Folded Spill
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	.cfi_offset b8, -104
	.cfi_offset b9, -112
	mov	x21, x0
	bl	_device_get_softc
	mov	x20, x0
	add	x19, x0, #40
	mov	x0, x19
	bl	_mtx_lock
Lloh0:
	adrp	x22, _vIFR@GOTPAGE
Lloh1:
	ldr	x22, [x22, _vIFR@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x20
	bl	_cuda_read_reg
Lloh2:
	adrp	x8, _vSR_INT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _vSR_INT@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	bics	wzr, w8, w0
	b.ne	LBB0_32
; %bb.1:
	ldr	w1, [x22]
	mov	x0, x20
	mov	w2, #127
	bl	_cuda_write_reg
	mov	w26, #0
	add	x22, x20, #48
	add	x23, x20, #44
Lloh5:
	adrp	x27, _vSR@GOTPAGE
Lloh6:
	ldr	x27, [x27, _vSR@GOTPAGEOFF]
Lloh7:
	adrp	x8, lCPI0_0@PAGE
Lloh8:
	ldr	d8, [x8, lCPI0_0@PAGEOFF]
Lloh9:
	adrp	x28, _pkt_q@GOTPAGE
Lloh10:
	ldr	x28, [x28, _pkt_q@GOTPAGEOFF]
Lloh11:
	adrp	x25, l_.str@PAGE
Lloh12:
	add	x25, x25, l_.str@PAGEOFF
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x20]
	cmp	w8, #128
	b.ne	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w1, [x27]
	mov	x0, x20
	bl	_cuda_read_reg
	ldr	x8, [x20, #8]
	add	x8, x8, #1
	str	x8, [x20, #8]
	mov	x0, x20
	bl	_cuda_intr_state
	cbz	w0, LBB0_21
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x20
	bl	_cuda_in
	mov	x0, x20
	bl	_cuda_idle
	str	xzr, [x20, #8]
	str	wzr, [x20, #24]
	str	d8, [x20]
	mov	w0, #150
	bl	_DELAY
	b	LBB0_2
LBB0_5:                                 ;   in Loop: Header=BB0_2 Depth=1
	cmp	w8, #130
	b.ne	LBB0_18
; %bb.6:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w1, [x27]
	mov	x0, x20
	bl	_cuda_read_reg
	ldr	x9, [x20, #56]
	ldrsw	x8, [x20, #24]
	str	x0, [x9, x8, lsl #3]
	cmp	w8, #256
	b.lt	LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_2 Depth=1
	b.ne	LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x21
	mov	x24, x25
	mov	x1, x25
	bl	_device_printf
	mov	w25, #1
	b	LBB0_11
LBB0_9:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	x24, x25
	mov	w25, #0
	add	w8, w8, #1
	str	w8, [x20, #24]
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x24, x25
	mov	w25, #0
LBB0_11:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x20
	bl	_cuda_intr_state
	cbz	w0, LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x20
	bl	_cuda_toggle_ack
	cbz	w25, LBB0_27
LBB0_13:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x20
	bl	_cuda_idle
	mov	x0, x22
	bl	_STAILQ_FIRST
	cbz	x0, LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_2 Depth=1
	mov	x25, x0
	ldr	w8, [x20, #24]
	sub	w2, w8, #2
	str	w2, [x0]
	ldr	x8, [x20, #56]
	ldr	x9, [x8, #8]
	str	x9, [x0, #8]
	ldr	w0, [x0, #4]
	add	x1, x8, #16
	bl	_memcpy
	mov	x26, x28
	ldr	w1, [x28]
	mov	x0, x22
	bl	_STAILQ_REMOVE_HEAD
	ldr	w2, [x28]
	mov	x0, x23
	mov	x1, x25
	bl	_STAILQ_INSERT_TAIL
	mov	w26, #1
LBB0_15:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w8, #131
	str	w8, [x20]
	str	wzr, [x20, #24]
	ldr	w8, [x20, #4]
	cmp	w8, #1
	b.ne	LBB0_27
; %bb.16:                               ;   in Loop: Header=BB0_2 Depth=1
	mov	w0, #1500
	bl	_DELAY
	str	xzr, [x20, #8]
	mov	w8, #128
	str	w8, [x20]
	mov	x0, x20
	bl	_cuda_intr_state
	cbz	w0, LBB0_33
; %bb.17:                               ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x20
	bl	_cuda_in
	mov	x0, x20
	bl	_cuda_idle
	str	xzr, [x20, #8]
	mov	w8, #131
	str	w8, [x20]
	str	wzr, [x20, #24]
	mov	w0, #150
	bl	_DELAY
	mov	x25, x24
	b	LBB0_2
LBB0_18:
	cmp	w8, #131
	b.ne	LBB0_27
; %bb.19:
	ldr	w1, [x27]
	mov	x0, x20
	bl	_cuda_read_reg
	ldr	x8, [x20, #56]
	str	x0, [x8, #8]
	mov	x0, x20
	bl	_cuda_intr_state
	cbz	w0, LBB0_24
; %bb.20:
	mov	x0, x20
	bl	_cuda_in
	mov	x0, x20
	bl	_cuda_tip
	mov	w8, #1
	str	w8, [x20, #24]
	mov	w8, #130
	str	w8, [x20]
	b	LBB0_27
LBB0_21:
	ldr	x9, [x20, #32]
	ldr	x8, [x20, #8]
	cmp	x9, x8
	b.ne	LBB0_23
; %bb.22:
Lloh13:
	adrp	x8, lCPI0_1@PAGE
Lloh14:
	ldr	d0, [x8, lCPI0_1@PAGEOFF]
	str	d0, [x20]
	mov	x0, x20
	bl	_cuda_in
	mov	x0, x20
	bl	_cuda_idle
	b	LBB0_27
LBB0_23:
	ldr	w1, [x27]
	ldr	x9, [x20, #16]
	ldr	w2, [x9, x8, lsl #2]
	mov	x0, x20
	bl	_cuda_write_reg
	mov	x0, x20
	bl	_cuda_toggle_ack
	b	LBB0_27
LBB0_24:
	ldr	w8, [x20, #4]
	cbz	w8, LBB0_27
; %bb.25:
	mov	w0, #150
	bl	_DELAY
	mov	w8, #128
	str	w8, [x20]
	str	xzr, [x20, #8]
	mov	x0, x20
	bl	_cuda_out
	ldr	w1, [x27]
	ldr	x8, [x20, #16]
	ldr	w2, [x8, #4]
LBB0_26:
	mov	x0, x20
	bl	_cuda_write_reg
	mov	x0, x20
	bl	_cuda_ack_off
	mov	x0, x20
	bl	_cuda_tip
LBB0_27:
	mov	x0, x19
	bl	_mtx_unlock
	cbz	w26, LBB0_29
; %bb.28:
	mov	x0, x20
	bl	_cuda_send_inbound
LBB0_29:
	mov	x0, x19
	bl	_mtx_lock
	ldr	w8, [x20, #4]
	cbnz	w8, LBB0_32
; %bb.30:
	ldr	w8, [x20]
	cmp	w8, #131
	b.ne	LBB0_32
; %bb.31:
	mov	x0, x20
	bl	_cuda_send_outbound
LBB0_32:
	mov	x0, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp], #112              ; 16-byte Folded Reload
	b	_mtx_unlock
LBB0_33:
	mov	x0, x20
	bl	_cuda_out
	ldr	w1, [x27]
	ldp	x9, x8, [x20, #8]
	ldr	w2, [x8, x9, lsl #2]
	b	LBB0_26
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdr	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdr	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_vIFR,4,2                       ; @vIFR
	.comm	_vSR_INT,4,2                    ; @vSR_INT
	.comm	_vSR,4,2                        ; @vSR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"input overflow\n"

	.comm	_pkt_q,4,2                      ; @pkt_q
	.no_dead_strip	_cuda_intr
.subsections_via_symbols
