	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hwt_read                       ## -- Begin function hwt_read
	.p2align	4, 0x90
_hwt_read:                              ## @hwt_read
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	cmpq	$0, 16(%rdi)
	je	LBB0_1
## %bb.2:
	movq	%rbx, %rdi
	callq	_hwt_stop
	movq	_B2_TI_VAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ADDR
	movl	%eax, %edi
	callq	_inpd
	cltq
	imulq	$1374389535, %rax, %rax         ## imm = 0x51EB851F
	movq	%rax, %rcx
	shrq	$63, %rcx
	shrq	$38, %rax
	addl	%ecx, %eax
	movzwl	%ax, %r14d
	xorl	%eax, %eax
	callq	_GET_ISR
	movl	%eax, %ecx
	movq	(%rbx), %rax
	subq	%r14, %rax
	jl	LBB0_4
## %bb.3:
	movq	_IS_TIMINT@GOTPCREL(%rip), %rdx
	testl	%ecx, (%rdx)
	je	LBB0_5
LBB0_4:
	movq	%rbx, %rdi
	callq	_hwt_restart
	movq	(%rbx), %rax
LBB0_5:
	movq	%rax, 8(%rbx)
	jmp	LBB0_6
LBB0_1:
	movq	8(%rbx), %rax
LBB0_6:
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_B2_TI_VAL,4,2                  ## @B2_TI_VAL
	.comm	_IS_TIMINT,4,2                  ## @IS_TIMINT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hwt_read                       ; -- Begin function hwt_read
	.p2align	2
_hwt_read:                              ; @hwt_read
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	x8, [x0, #16]
	cbz	x8, LBB0_5
; %bb.1:
	mov	x0, x19
	bl	_hwt_stop
Lloh0:
	adrp	x8, _B2_TI_VAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _B2_TI_VAL@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_ADDR
	bl	_inpd
	mov	w8, #34079
	movk	w8, #20971, lsl #16
	smull	x8, w0, w8
	lsr	x9, x8, #63
	lsr	x8, x8, #38
	add	w8, w8, w9
	and	w20, w8, #0xffff
	bl	_GET_ISR
	mov	x8, x0
	ldr	x9, [x19]
	subs	x0, x9, x20
	b.lt	LBB0_3
; %bb.2:
Lloh3:
	adrp	x9, _IS_TIMINT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _IS_TIMINT@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
LBB0_3:
	mov	x0, x19
	bl	_hwt_restart
	ldr	x0, [x19]
LBB0_4:
	str	x0, [x19, #8]
	b	LBB0_6
LBB0_5:
	ldr	x0, [x19, #8]
LBB0_6:
                                        ; kill: def $w0 killed $w0 killed $x0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_B2_TI_VAL,4,2                  ; @B2_TI_VAL
	.comm	_IS_TIMINT,4,2                  ; @IS_TIMINT
.subsections_via_symbols
