	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tmc_sync_etr_buf
_tmc_sync_etr_buf:                      ## @tmc_sync_etr_buf
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	16(%rdi), %r12
	callq	_tmc_read_rrp
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_tmc_read_rwp
	movl	%eax, %r15d
	movq	_TMC_STS@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%rbx), %rdi
	callq	_readl_relaxed
	movl	%eax, %r13d
	movq	_TMC_STS_MEMERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	andl	%r13d, %edi
	callq	_WARN_ON_ONCE
	testq	%rax, %rax
	je	LBB0_1
## %bb.5:
	movq	(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_dbg
	movq	$0, 16(%r12)
	movl	$0, (%r12)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	_TMC_STS_FULL@GOTPCREL(%rip), %rax
	andl	(%rax), %r13d
	movl	%r13d, (%r12)
	movq	8(%r12), %rax
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	xorl	%edi, %edi
	cmpq	$0, (%rax)
	sete	%dil
	jmp	LBB0_4
LBB0_2:
	movl	$1, %edi
LBB0_4:
	callq	_WARN_ON
	movq	8(%r12), %rax
	movq	(%rax), %rax
	movq	%r12, %rdi
	movl	%r14d, %esi
	movl	%r15d, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmpq	*%rax                           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_TMC_STS,8,3                    ## @TMC_STS
	.comm	_TMC_STS_MEMERR,4,2             ## @TMC_STS_MEMERR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"tmc memory error detected, truncating buffer\n"

	.comm	_TMC_STS_FULL,4,2               ## @TMC_STS_FULL
	.no_dead_strip	_tmc_sync_etr_buf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tmc_sync_etr_buf
_tmc_sync_etr_buf:                      ; @tmc_sync_etr_buf
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x22, x0
	ldr	x19, [x0, #16]
	bl	_tmc_read_rrp
	mov	x20, x0
	mov	x0, x22
	bl	_tmc_read_rwp
	mov	x21, x0
	ldr	x8, [x22, #8]
Lloh0:
	adrp	x9, _TMC_STS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _TMC_STS@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl_relaxed
	mov	x23, x0
Lloh3:
	adrp	x8, _TMC_STS_MEMERR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TMC_STS_MEMERR@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	and	w0, w8, w0
	bl	_WARN_ON_ONCE
	cbz	x0, LBB0_2
; %bb.1:
	ldr	x0, [x22]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
	str	xzr, [x19, #16]
	str	wzr, [x19]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_2:
Lloh8:
	adrp	x8, _TMC_STS_FULL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _TMC_STS_FULL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	and	w8, w8, w23
	str	w8, [x19]
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_4
; %bb.3:
	ldr	x8, [x8]
	cmp	x8, #0
	cset	w0, eq
	b	LBB0_5
LBB0_4:
	mov	w0, #1
LBB0_5:
	bl	_WARN_ON
	ldr	x8, [x19, #8]
	ldr	x3, [x8]
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	br	x3
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_TMC_STS,8,3                    ; @TMC_STS
	.comm	_TMC_STS_MEMERR,4,2             ; @TMC_STS_MEMERR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"tmc memory error detected, truncating buffer\n"

	.comm	_TMC_STS_FULL,4,2               ; @TMC_STS_FULL
	.no_dead_strip	_tmc_sync_etr_buf
.subsections_via_symbols
