	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function etb_dump_hw
_etb_dump_hw:                           ## @etb_dump_hw
	.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
	movq	%rdi, %r13
	movq	8(%rdi), %rdi
	movq	24(%r13), %r14
	callq	_CS_UNLOCK
	movq	_ETB_RAM_READ_POINTER@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%r13), %rdi
	callq	_readl_relaxed
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	_ETB_RAM_WRITE_POINTER@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%r13), %rdi
	callq	_readl_relaxed
	movl	%eax, %r12d
	movq	_ETB_FRAME_SIZE_WORDS@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%r12d, %eax
	cltd
	idivl	%ecx
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movl	%ecx, %r15d
	subl	%edx, %r15d
	testl	%edx, %edx
	movl	%edx, -48(%rbp)                 ## 4-byte Spill
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	je	LBB0_2
## %bb.1:
	movl	%edx, %ebx
	movslq	%r12d, %rdx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movslq	%ebx, %rdx
	movslq	%r15d, %rcx
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	addl	%r15d, %r12d
LBB0_2:
	movq	_ETB_STATUS_REG@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%r13), %rdi
	callq	_readl_relaxed
	movl	%eax, %r14d
	movq	_ETB_STATUS_RAM_FULL@GOTPCREL(%rip), %rax
	movq	_ETB_RAM_READ_POINTER@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	addq	8(%r13), %rsi
	xorl	%edi, %edi
	andl	(%rax), %r14d
	cmovnel	%r12d, %edi
	callq	_writel_relaxed
	movl	(%r13), %r12d
	movq	16(%r13), %rbx
	testl	%r12d, %r12d
	jle	LBB0_5
## %bb.3:
	movq	_ETB_RAM_READ_DATA_REG@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rdi
	addq	8(%r13), %rdi
	callq	_readl_relaxed
	movl	%eax, (%rbx)
	addq	$16, %rbx
	decl	%r12d
	jne	LBB0_4
LBB0_5:
	testl	%r14d, %r14d
	je	LBB0_7
## %bb.6:
	movq	16(%r13), %rdi
	callq	_coresight_insert_barrier_packet
LBB0_7:
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	testl	%ecx, %ecx
	movq	_ETB_RAM_READ_POINTER@GOTPCREL(%rip), %r14
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	je	LBB0_10
## %bb.8:
	testl	%eax, %eax
	jle	LBB0_10
## %bb.9:
	shll	$2, %eax
	cltq
	shlq	$2, %rax
	subq	%rax, %rbx
	notl	%ecx
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	addl	%ecx, %esi
	shlq	$4, %rsi
	addq	$16, %rsi
	movq	%rbx, %rdi
	callq	___bzero
LBB0_10:
	movq	(%r14), %rsi
	addq	8(%r13), %rsi
	movl	-52(%rbp), %edi                 ## 4-byte Reload
	callq	_writel_relaxed
	movq	8(%r13), %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_CS_LOCK                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ETB_RAM_READ_POINTER,8,3       ## @ETB_RAM_READ_POINTER
	.comm	_ETB_RAM_WRITE_POINTER,8,3      ## @ETB_RAM_WRITE_POINTER
	.comm	_ETB_FRAME_SIZE_WORDS,4,2       ## @ETB_FRAME_SIZE_WORDS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"write_ptr: %lu not aligned to formatter frame size\n"

L_.str.1:                               ## @.str.1
	.asciz	"frameoff: %lu, frame_endoff: %lu\n"

	.comm	_ETB_STATUS_REG,8,3             ## @ETB_STATUS_REG
	.comm	_ETB_STATUS_RAM_FULL,4,2        ## @ETB_STATUS_RAM_FULL
	.comm	_ETB_RAM_READ_DATA_REG,8,3      ## @ETB_RAM_READ_DATA_REG
	.no_dead_strip	_etb_dump_hw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function etb_dump_hw
_etb_dump_hw:                           ; @etb_dump_hw
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	ldr	x22, [x0, #24]
	ldr	x0, [x0, #8]
	bl	_CS_UNLOCK
	ldr	x8, [x19, #8]
Lloh0:
	adrp	x23, _ETB_RAM_READ_POINTER@GOTPAGE
Lloh1:
	ldr	x23, [x23, _ETB_RAM_READ_POINTER@GOTPAGEOFF]
	ldr	x9, [x23]
	add	x0, x9, x8
	bl	_readl_relaxed
	mov	x20, x0
	ldr	x8, [x19, #8]
Lloh2:
	adrp	x9, _ETB_RAM_WRITE_POINTER@GOTPAGE
Lloh3:
	ldr	x9, [x9, _ETB_RAM_WRITE_POINTER@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl_relaxed
	mov	x21, x0
Lloh5:
	adrp	x8, _ETB_FRAME_SIZE_WORDS@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ETB_FRAME_SIZE_WORDS@GOTPAGEOFF]
Lloh7:
	ldr	w24, [x8]
	sdiv	w8, w0, w24
	msub	w25, w8, w24, w0
	sub	w26, w24, w25
	cbz	w25, LBB0_2
; %bb.1:
	sxtw	x2, w21
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	bl	_dev_err
	sxtw	x2, w25
	sxtw	x8, w26
	str	x8, [sp]
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x22
	bl	_dev_err
	add	w21, w26, w21
LBB0_2:
	ldr	x8, [x19, #8]
Lloh12:
	adrp	x9, _ETB_STATUS_REG@GOTPAGE
Lloh13:
	ldr	x9, [x9, _ETB_STATUS_REG@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl_relaxed
Lloh15:
	adrp	x8, _ETB_STATUS_RAM_FULL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ETB_STATUS_RAM_FULL@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	ands	w22, w8, w0
	ldr	x8, [x19, #8]
	ldr	x9, [x23]
	add	x1, x9, x8
	csel	w0, wzr, w21, eq
	bl	_writel_relaxed
	ldr	w27, [x19]
	ldr	x21, [x19, #16]
	cmp	w27, #1
	b.lt	LBB0_5
; %bb.3:
Lloh18:
	adrp	x28, _ETB_RAM_READ_DATA_REG@GOTPAGE
Lloh19:
	ldr	x28, [x28, _ETB_RAM_READ_DATA_REG@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	x9, [x28]
	add	x0, x9, x8
	bl	_readl_relaxed
	str	w0, [x21], #16
	subs	w27, w27, #1
	b.ne	LBB0_4
LBB0_5:
	cbz	w22, LBB0_7
; %bb.6:
	ldr	x0, [x19, #16]
	bl	_coresight_insert_barrier_packet
LBB0_7:
	cbz	w25, LBB0_10
; %bb.8:
	cmp	w26, #1
	b.lt	LBB0_10
; %bb.9:
	lsl	w8, w26, #2
	sub	x0, x21, w8, sxtw #2
	mvn	w8, w25
	add	w8, w24, w8
	lsl	x8, x8, #4
	add	x1, x8, #16
	bl	_bzero
LBB0_10:
	ldr	x8, [x19, #8]
	ldr	x9, [x23]
	add	x1, x9, x8
	mov	x0, x20
	bl	_writel_relaxed
	ldr	x0, [x19, #8]
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_CS_LOCK
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_ETB_RAM_READ_POINTER,8,3       ; @ETB_RAM_READ_POINTER
	.comm	_ETB_RAM_WRITE_POINTER,8,3      ; @ETB_RAM_WRITE_POINTER
	.comm	_ETB_FRAME_SIZE_WORDS,4,2       ; @ETB_FRAME_SIZE_WORDS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"write_ptr: %lu not aligned to formatter frame size\n"

l_.str.1:                               ; @.str.1
	.asciz	"frameoff: %lu, frame_endoff: %lu\n"

	.comm	_ETB_STATUS_REG,8,3             ; @ETB_STATUS_REG
	.comm	_ETB_STATUS_RAM_FULL,4,2        ; @ETB_STATUS_RAM_FULL
	.comm	_ETB_RAM_READ_DATA_REG,8,3      ; @ETB_RAM_READ_DATA_REG
	.no_dead_strip	_etb_dump_hw
.subsections_via_symbols
