	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pt_tcal_update_mtc             ## -- Begin function pt_tcal_update_mtc
	.p2align	4, 0x90
_pt_tcal_update_mtc:                    ## @pt_tcal_update_mtc
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.1:
	testq	%rsi, %rsi
	je	LBB0_8
## %bb.2:
	movq	%rdx, %r15
	testq	%rdx, %rdx
	je	LBB0_8
## %bb.3:
	movq	%rdi, %rbx
	movl	(%rdi), %edx
	movq	8(%rdi), %r13
	movl	16(%rdi), %r12d
	movl	$0, 16(%rdi)
	movl	(%rsi), %esi
	movb	(%r15), %cl
	shll	%cl, %esi
	cmpl	$0, 4(%rdi)
	je	LBB0_9
## %bb.4:
	xorl	%r14d, %r14d
	testq	%r13, %r13
	je	LBB0_12
## %bb.5:
	movl	$1, 4(%rbx)
	movq	$0, 8(%rbx)
	movl	%esi, (%rbx)
	incq	32(%rbx)
	leaq	-44(%rbp), %rdi
	movq	%r15, %rcx
	callq	_pt_time_ctc_delta
	testl	%eax, %eax
	js	LBB0_11
## %bb.6:
	movl	-44(%rbp), %esi
	leaq	-56(%rbp), %rdi
	movq	%r15, %rdx
	callq	_pt_time_ctc_fc
	testl	%eax, %eax
	js	LBB0_11
## %bb.7:
	movq	_pt_tcal_fcr_shr@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rcx
	movq	$-1, %rdx
	shrq	%cl, %rdx
	movq	-56(%rbp), %rax
	notq	%rdx
	testq	%rdx, %rax
	je	LBB0_13
LBB0_8:
	movq	_pte_internal@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_12
LBB0_9:
	movq	$0, 8(%rbx)
	movl	%esi, (%rbx)
	movl	$1, 4(%rbx)
	xorl	%r14d, %r14d
	jmp	LBB0_12
LBB0_13:
                                        ## kill: def $cl killed $cl killed $rcx
	shlq	%cl, %rax
	movq	%rax, %rcx
	orq	%r13, %rcx
	shrq	$32, %rcx
	je	LBB0_15
## %bb.14:
	xorl	%edx, %edx
	divq	%r13
	movq	%rax, %rdx
	jmp	LBB0_16
LBB0_15:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%r13d
	movl	%eax, %edx
LBB0_16:
	testl	%r12d, %r12d
	je	LBB0_21
## %bb.17:
	movl	(%r15), %ecx
	movl	$1, %eax
	shll	%cl, %eax
	cmpl	-44(%rbp), %eax
	jb	LBB0_12
## %bb.18:
	cmpl	$9, %ecx
	ja	LBB0_21
## %bb.19:
	movq	%rbx, %rdi
	movq	%rsi, %r15
	movq	%rdx, %r12
	callq	_pt_tcal_have_fcr
	movq	%r12, %rdx
	testq	%rax, %rax
	je	LBB0_21
## %bb.20:
	movq	%r15, %rcx
	addq	$3840, %r13                     ## imm = 0xF00
	imulq	24(%rbx), %r13
	movb	(%r15), %cl
	shrq	%cl, %r13
	cmpq	-56(%rbp), %r13
	jb	LBB0_12
LBB0_21:
	movq	%rbx, %rdi
	movq	%rdx, %rsi
	callq	_pt_tcal_set_fcr
	testl	%eax, %eax
	js	LBB0_11
## %bb.22:
	movq	$0, 32(%rbx)
	jmp	LBB0_12
LBB0_11:
	movl	%eax, %r14d
LBB0_12:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_pte_internal,4,2               ## @pte_internal
	.comm	_pt_tcal_fcr_shr,8,3            ## @pt_tcal_fcr_shr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pt_tcal_update_mtc             ; -- Begin function pt_tcal_update_mtc
	.p2align	2
_pt_tcal_update_mtc:                    ; @pt_tcal_update_mtc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	cbz	x0, LBB0_8
; %bb.1:
	cbz	x1, LBB0_8
; %bb.2:
	mov	x20, x2
	cbz	x2, LBB0_8
; %bb.3:
	mov	x19, x0
	ldp	w2, w8, [x0]
	ldr	x21, [x0, #8]
	ldr	w22, [x0, #16]
	str	wzr, [x0, #16]
	ldr	w9, [x1]
	ldr	w10, [x20]
	lsl	w1, w9, w10
	cbz	w8, LBB0_9
; %bb.4:
	cbz	x21, LBB0_12
; %bb.5:
	mov	w8, #1
	str	xzr, [x19, #8]
	stp	w1, w8, [x19]
	ldr	x8, [x19, #32]
	add	x8, x8, #1
	str	x8, [x19, #32]
	add	x0, sp, #12
	mov	x3, x20
	bl	_pt_time_ctc_delta
	tbnz	w0, #31, LBB0_13
; %bb.6:
	ldr	w1, [sp, #12]
	mov	x0, sp
	mov	x2, x20
	bl	_pt_time_ctc_fc
	tbnz	w0, #31, LBB0_13
; %bb.7:
	ldr	x23, [sp]
Lloh0:
	adrp	x25, _pt_tcal_fcr_shr@GOTPAGE
Lloh1:
	ldr	x25, [x25, _pt_tcal_fcr_shr@GOTPAGEOFF]
	ldr	x24, [x25]
	mov	x8, #-1
	lsr	x8, x8, x24
	bics	xzr, x23, x8
	b.eq	LBB0_10
LBB0_8:
Lloh2:
	adrp	x8, _pte_internal@GOTPAGE
Lloh3:
	ldr	x8, [x8, _pte_internal@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_13
LBB0_9:
	mov	w0, #0
	str	xzr, [x19, #8]
	mov	w8, #1
	stp	w1, w8, [x19]
	b	LBB0_13
LBB0_10:
	cbz	w22, LBB0_17
; %bb.11:
	ldr	w8, [x20]
	mov	w9, #1
	lsl	w9, w9, w8
	ldr	w10, [sp, #12]
	cmp	w9, w10
	b.hs	LBB0_14
LBB0_12:
	mov	w0, #0
LBB0_13:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_14:
	cmp	w8, #9
	b.hi	LBB0_17
; %bb.15:
	mov	x0, x19
	bl	_pt_tcal_have_fcr
	cbz	x0, LBB0_17
; %bb.16:
	ldr	x8, [x19, #24]
	add	x9, x21, #3840
	mul	x8, x8, x9
	ldr	x9, [x25]
	lsr	x8, x8, x9
	ldr	x9, [sp]
	cmp	x8, x9
	b.lo	LBB0_12
LBB0_17:
	lsl	x8, x23, x24
	udiv	x1, x8, x21
	mov	x0, x19
	bl	_pt_tcal_set_fcr
	tbnz	w0, #31, LBB0_13
; %bb.18:
	mov	w0, #0
	str	xzr, [x19, #32]
	b	LBB0_13
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_pte_internal,4,2               ; @pte_internal
	.comm	_pt_tcal_fcr_shr,8,3            ; @pt_tcal_fcr_shr
.subsections_via_symbols
