	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cuda_adb_autopoll
_cuda_adb_autopoll:                     ## @cuda_adb_autopoll
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	callq	_device_get_softc
	movq	%rax, %r15
	movq	_CUDA_PSEUDO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)
	movq	_CMD_AUTOPOLL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -40(%rbp)
	xorl	%ebx, %ebx
	testl	%r14d, %r14d
	setne	%bl
	movl	%ebx, -36(%rbp)
	leaq	4(%r15), %r14
	movq	%r14, %rdi
	callq	_mtx_lock
	cmpl	%ebx, (%r15)
	je	LBB0_2
## %bb.1:
	movl	$-1, (%r15)
	leaq	-44(%rbp), %rcx
	movq	%r15, %rdi
	movl	$1, %esi
	movl	$3, %edx
	callq	_cuda_send
LBB0_2:
	movq	%r14, %rdi
	callq	_mtx_unlock
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_4
## %bb.3:
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_CUDA_PSEUDO,4,2                ## @CUDA_PSEUDO
	.comm	_CMD_AUTOPOLL,4,2               ## @CMD_AUTOPOLL
	.no_dead_strip	_cuda_adb_autopoll
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cuda_adb_autopoll
_cuda_adb_autopoll:                     ; @cuda_adb_autopoll
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x20, x1
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	bl	_device_get_softc
	mov	x19, x0
Lloh3:
	adrp	x8, _CUDA_PSEUDO@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CUDA_PSEUDO@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _CMD_AUTOPOLL@GOTPAGE
Lloh7:
	ldr	x9, [x9, _CMD_AUTOPOLL@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	stp	w8, w9, [sp, #12]
	cmp	w20, #0
	cset	w21, ne
	str	w21, [sp, #20]
	add	x20, x0, #4
	mov	x0, x20
	bl	_mtx_lock
	ldr	w8, [x19]
	cmp	w8, w21
	b.eq	LBB0_2
; %bb.1:
	mov	w8, #-1
	str	w8, [x19]
	add	x3, sp, #12
	mov	x0, x19
	mov	w1, #1
	mov	w2, #3
	bl	_cuda_send
LBB0_2:
	mov	x0, x20
	bl	_mtx_unlock
	ldr	x8, [sp, #24]
Lloh9:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh10:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_4
; %bb.3:
	mov	w0, #0
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_4:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_CUDA_PSEUDO,4,2                ; @CUDA_PSEUDO
	.comm	_CMD_AUTOPOLL,4,2               ; @CMD_AUTOPOLL
	.no_dead_strip	_cuda_adb_autopoll
.subsections_via_symbols
