	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pmu_adb_autopoll
_pmu_adb_autopoll:                      ## @pmu_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	$88, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	callq	_device_get_softc
	movq	%rax, %r15
	movl	$0, -48(%rbp)
	movq	_PMU_SET_POLL_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)
	movzbl	%bh, %eax
	movl	%eax, -40(%rbp)
	movzbl	%bl, %eax
	movl	%eax, -36(%rbp)
	leaq	4(%r15), %r14
	movq	%r14, %rdi
	callq	_mtx_lock
	cmpl	%ebx, (%r15)
	je	LBB0_5
## %bb.1:
	movzwl	%bx, %eax
	movl	%eax, (%r15)
	testl	%ebx, %ebx
	je	LBB0_3
## %bb.2:
	movq	_PMU_ADB_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rcx
	leaq	-112(%rbp), %r9
	movq	%r15, %rdi
	movl	$4, %edx
	jmp	LBB0_4
LBB0_3:
	movq	_PMU_ADB_POLL_OFF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-112(%rbp), %r9
	movq	%r15, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
LBB0_4:
	movl	$16, %r8d
	callq	_pmu_send
LBB0_5:
	movq	%r14, %rdi
	callq	_mtx_unlock
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_7
## %bb.6:
	xorl	%eax, %eax
	addq	$88, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_PMU_SET_POLL_MASK,4,2          ## @PMU_SET_POLL_MASK
	.comm	_PMU_ADB_CMD,4,2                ## @PMU_ADB_CMD
	.comm	_PMU_ADB_POLL_OFF,4,2           ## @PMU_ADB_POLL_OFF
	.no_dead_strip	_pmu_adb_autopoll
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pmu_adb_autopoll
_pmu_adb_autopoll:                      ; @pmu_adb_autopoll
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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	x21, x1
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	bl	_device_get_softc
	mov	x20, x0
Lloh3:
	adrp	x8, _PMU_SET_POLL_MASK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PMU_SET_POLL_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	stp	wzr, w8, [x29, #-56]
	ubfx	w8, w21, #8, #8
	and	w9, w21, #0xff
	stp	w8, w9, [x29, #-48]
	add	x19, x0, #4
	mov	x0, x19
	bl	_mtx_lock
	ldr	w8, [x20]
	cmp	w8, w21
	b.eq	LBB0_5
; %bb.1:
	and	w8, w21, #0xffff
	str	w8, [x20]
	cbz	w21, LBB0_3
; %bb.2:
Lloh6:
	adrp	x8, _PMU_ADB_CMD@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PMU_ADB_CMD@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	sub	x3, x29, #56
	add	x5, sp, #8
	mov	x0, x20
	mov	w2, #4
	b	LBB0_4
LBB0_3:
Lloh9:
	adrp	x8, _PMU_ADB_POLL_OFF@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PMU_ADB_POLL_OFF@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	add	x5, sp, #8
	mov	x0, x20
	mov	w2, #0
	mov	x3, #0
LBB0_4:
	mov	w4, #16
	bl	_pmu_send
LBB0_5:
	mov	x0, x19
	bl	_mtx_unlock
	ldur	x8, [x29, #-40]
Lloh12:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh13:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_7
; %bb.6:
	mov	w0, #0
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_7:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_PMU_SET_POLL_MASK,4,2          ; @PMU_SET_POLL_MASK
	.comm	_PMU_ADB_CMD,4,2                ; @PMU_ADB_CMD
	.comm	_PMU_ADB_POLL_OFF,4,2           ; @PMU_ADB_POLL_OFF
	.no_dead_strip	_pmu_adb_autopoll
.subsections_via_symbols
