	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __tmc_etr_enable_hw
___tmc_etr_enable_hw:                   ## @__tmc_etr_enable_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	8(%rdi), %rdi
	movq	16(%r12), %r14
	callq	_CS_UNLOCK
	movq	%r12, %rdi
	callq	_tmc_wait_for_tmcready
	movl	(%r14), %eax
	leal	3(%rax), %edi
	testl	%eax, %eax
	cmovnsl	%eax, %edi
	sarl	$2, %edi
	movq	_TMC_RSZ@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%r12), %rsi
	callq	_writel_relaxed
	movq	_TMC_MODE_CIRCULAR_BUFFER@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_TMC_MODE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%r12), %rsi
	callq	_writel_relaxed
	movq	_TMC_AXICTL@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	addq	8(%r12), %rdi
	callq	_readl_relaxed
	movq	_TMC_AXICTL_CLEAR_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	notl	%ebx
	andl	%eax, %ebx
	movq	_TMC_AXICTL_PROT_CTL_B1@GOTPCREL(%rip), %rax
	movq	_TMC_AXICTL_WR_BURST_16@GOTPCREL(%rip), %rcx
	movq	_TMC_AXICTL_AXCACHE_OS@GOTPCREL(%rip), %rdx
	orl	(%rax), %ebx
	orl	(%rcx), %ebx
	orl	(%rdx), %ebx
	movq	_TMC_ETR_AXI_ARCACHE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_tmc_etr_has_cap
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_TMC_AXICTL_ARCACHE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, %ebx
	movq	_TMC_AXICTL_ARCACHE_OS@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
LBB0_2:
	movq	8(%r14), %rax
	movq	_ETR_MODE_ETR_SG@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.3:
	movq	_TMC_AXICTL_SCT_GAT_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
LBB0_4:
	orl	%ebx, %edi
	movq	(%r15), %rsi
	addq	8(%r12), %rsi
	callq	_writel_relaxed
	movl	16(%r14), %esi
	movq	%r12, %rdi
	callq	_tmc_write_dba
	movq	_TMC_ETR_SAVE_RESTORE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_tmc_etr_has_cap
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movl	16(%r14), %esi
	movq	%r12, %rdi
	callq	_tmc_write_rrp
	movl	16(%r14), %esi
	movq	%r12, %rdi
	callq	_tmc_write_rwp
	movq	_TMC_STS@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	addq	8(%r12), %rdi
	callq	_readl_relaxed
	movq	_TMC_STS_FULL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	notl	%edi
	andl	%eax, %edi
	movq	(%rbx), %rsi
	addq	8(%r12), %rsi
	callq	_writel_relaxed
LBB0_6:
	movq	_TMC_FFCR_EN_FMT@GOTPCREL(%rip), %rax
	movq	_TMC_FFCR_EN_TI@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	(%rax), %edi
	movq	_TMC_FFCR_FON_FLIN@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	movq	_TMC_FFCR_FON_TRIG_EVT@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	movq	_TMC_FFCR_TRIGON_TRIGIN@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	movq	_TMC_FFCR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%r12), %rsi
	callq	_writel_relaxed
	movl	(%r12), %edi
	movq	_TMC_TRG@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%r12), %rsi
	callq	_writel_relaxed
	movq	%r12, %rdi
	callq	_tmc_enable_hw
	movq	8(%r12), %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_CS_LOCK                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_TMC_RSZ,8,3                    ## @TMC_RSZ
	.comm	_TMC_MODE_CIRCULAR_BUFFER,4,2   ## @TMC_MODE_CIRCULAR_BUFFER
	.comm	_TMC_MODE,8,3                   ## @TMC_MODE
	.comm	_TMC_AXICTL,8,3                 ## @TMC_AXICTL
	.comm	_TMC_AXICTL_CLEAR_MASK,4,2      ## @TMC_AXICTL_CLEAR_MASK
	.comm	_TMC_AXICTL_PROT_CTL_B1,4,2     ## @TMC_AXICTL_PROT_CTL_B1
	.comm	_TMC_AXICTL_WR_BURST_16,4,2     ## @TMC_AXICTL_WR_BURST_16
	.comm	_TMC_AXICTL_AXCACHE_OS,4,2      ## @TMC_AXICTL_AXCACHE_OS
	.comm	_TMC_ETR_AXI_ARCACHE,4,2        ## @TMC_ETR_AXI_ARCACHE
	.comm	_TMC_AXICTL_ARCACHE_MASK,4,2    ## @TMC_AXICTL_ARCACHE_MASK
	.comm	_TMC_AXICTL_ARCACHE_OS,4,2      ## @TMC_AXICTL_ARCACHE_OS
	.comm	_ETR_MODE_ETR_SG,8,3            ## @ETR_MODE_ETR_SG
	.comm	_TMC_AXICTL_SCT_GAT_MODE,4,2    ## @TMC_AXICTL_SCT_GAT_MODE
	.comm	_TMC_ETR_SAVE_RESTORE,4,2       ## @TMC_ETR_SAVE_RESTORE
	.comm	_TMC_STS,8,3                    ## @TMC_STS
	.comm	_TMC_STS_FULL,4,2               ## @TMC_STS_FULL
	.comm	_TMC_FFCR_EN_FMT,4,2            ## @TMC_FFCR_EN_FMT
	.comm	_TMC_FFCR_EN_TI,4,2             ## @TMC_FFCR_EN_TI
	.comm	_TMC_FFCR_FON_FLIN,4,2          ## @TMC_FFCR_FON_FLIN
	.comm	_TMC_FFCR_FON_TRIG_EVT,4,2      ## @TMC_FFCR_FON_TRIG_EVT
	.comm	_TMC_FFCR_TRIGON_TRIGIN,4,2     ## @TMC_FFCR_TRIGON_TRIGIN
	.comm	_TMC_FFCR,8,3                   ## @TMC_FFCR
	.comm	_TMC_TRG,8,3                    ## @TMC_TRG
	.no_dead_strip	___tmc_etr_enable_hw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __tmc_etr_enable_hw
___tmc_etr_enable_hw:                   ; @__tmc_etr_enable_hw
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x19, x0
	ldp	x0, x20, [x0, #8]
	bl	_CS_UNLOCK
	mov	x0, x19
	bl	_tmc_wait_for_tmcready
	ldr	w8, [x20]
	add	w9, w8, #3
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w0, w8, #2
	ldr	x8, [x19, #8]
Lloh0:
	adrp	x9, _TMC_RSZ@GOTPAGE
Lloh1:
	ldr	x9, [x9, _TMC_RSZ@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel_relaxed
Lloh3:
	adrp	x8, _TMC_MODE_CIRCULAR_BUFFER@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TMC_MODE_CIRCULAR_BUFFER@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	ldr	x8, [x19, #8]
Lloh6:
	adrp	x9, _TMC_MODE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _TMC_MODE@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel_relaxed
	ldr	x8, [x19, #8]
Lloh9:
	adrp	x21, _TMC_AXICTL@GOTPAGE
Lloh10:
	ldr	x21, [x21, _TMC_AXICTL@GOTPAGEOFF]
	ldr	x9, [x21]
	add	x0, x9, x8
	bl	_readl_relaxed
Lloh11:
	adrp	x8, _TMC_AXICTL_CLEAR_MASK@GOTPAGE
Lloh12:
	ldr	x8, [x8, _TMC_AXICTL_CLEAR_MASK@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	bic	w8, w0, w8
Lloh14:
	adrp	x9, _TMC_AXICTL_PROT_CTL_B1@GOTPAGE
Lloh15:
	ldr	x9, [x9, _TMC_AXICTL_PROT_CTL_B1@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
Lloh17:
	adrp	x10, _TMC_AXICTL_WR_BURST_16@GOTPAGE
Lloh18:
	ldr	x10, [x10, _TMC_AXICTL_WR_BURST_16@GOTPAGEOFF]
Lloh19:
	ldr	w10, [x10]
Lloh20:
	adrp	x11, _TMC_AXICTL_AXCACHE_OS@GOTPAGE
Lloh21:
	ldr	x11, [x11, _TMC_AXICTL_AXCACHE_OS@GOTPAGEOFF]
Lloh22:
	ldr	w11, [x11]
	orr	w8, w8, w9
	orr	w8, w8, w10
	orr	w22, w8, w11
Lloh23:
	adrp	x8, _TMC_ETR_AXI_ARCACHE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _TMC_ETR_AXI_ARCACHE@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_tmc_etr_has_cap
	cbz	x0, LBB0_2
; %bb.1:
Lloh26:
	adrp	x8, _TMC_AXICTL_ARCACHE_MASK@GOTPAGE
Lloh27:
	ldr	x8, [x8, _TMC_AXICTL_ARCACHE_MASK@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	bic	w8, w22, w8
Lloh29:
	adrp	x9, _TMC_AXICTL_ARCACHE_OS@GOTPAGE
Lloh30:
	ldr	x9, [x9, _TMC_AXICTL_ARCACHE_OS@GOTPAGEOFF]
Lloh31:
	ldr	w9, [x9]
	orr	w22, w8, w9
LBB0_2:
	ldr	x8, [x20, #8]
Lloh32:
	adrp	x9, _ETR_MODE_ETR_SG@GOTPAGE
Lloh33:
	ldr	x9, [x9, _ETR_MODE_ETR_SG@GOTPAGEOFF]
Lloh34:
	ldr	x9, [x9]
Lloh35:
	adrp	x10, _TMC_AXICTL_SCT_GAT_MODE@GOTPAGE
Lloh36:
	ldr	x10, [x10, _TMC_AXICTL_SCT_GAT_MODE@GOTPAGEOFF]
Lloh37:
	ldr	w10, [x10]
	cmp	x8, x9
	csel	w8, w10, wzr, eq
	orr	w0, w8, w22
	ldr	x8, [x19, #8]
	ldr	x9, [x21]
	add	x1, x9, x8
	bl	_writel_relaxed
	ldr	w1, [x20, #16]
	mov	x0, x19
	bl	_tmc_write_dba
Lloh38:
	adrp	x8, _TMC_ETR_SAVE_RESTORE@GOTPAGE
Lloh39:
	ldr	x8, [x8, _TMC_ETR_SAVE_RESTORE@GOTPAGEOFF]
Lloh40:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_tmc_etr_has_cap
	cbz	x0, LBB0_4
; %bb.3:
	ldr	w1, [x20, #16]
	mov	x0, x19
	bl	_tmc_write_rrp
	ldr	w1, [x20, #16]
	mov	x0, x19
	bl	_tmc_write_rwp
	ldr	x8, [x19, #8]
Lloh41:
	adrp	x20, _TMC_STS@GOTPAGE
Lloh42:
	ldr	x20, [x20, _TMC_STS@GOTPAGEOFF]
	ldr	x9, [x20]
	add	x0, x9, x8
	bl	_readl_relaxed
Lloh43:
	adrp	x8, _TMC_STS_FULL@GOTPAGE
Lloh44:
	ldr	x8, [x8, _TMC_STS_FULL@GOTPAGEOFF]
Lloh45:
	ldr	w8, [x8]
	bic	w0, w0, w8
	ldr	x8, [x19, #8]
	ldr	x9, [x20]
	add	x1, x9, x8
	bl	_writel_relaxed
LBB0_4:
Lloh46:
	adrp	x8, _TMC_FFCR_EN_FMT@GOTPAGE
Lloh47:
	ldr	x8, [x8, _TMC_FFCR_EN_FMT@GOTPAGEOFF]
Lloh48:
	ldr	w8, [x8]
Lloh49:
	adrp	x9, _TMC_FFCR_EN_TI@GOTPAGE
Lloh50:
	ldr	x9, [x9, _TMC_FFCR_EN_TI@GOTPAGEOFF]
Lloh51:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh52:
	adrp	x9, _TMC_FFCR_FON_FLIN@GOTPAGE
Lloh53:
	ldr	x9, [x9, _TMC_FFCR_FON_FLIN@GOTPAGEOFF]
Lloh54:
	ldr	w9, [x9]
Lloh55:
	adrp	x10, _TMC_FFCR_FON_TRIG_EVT@GOTPAGE
Lloh56:
	ldr	x10, [x10, _TMC_FFCR_FON_TRIG_EVT@GOTPAGEOFF]
	orr	w8, w8, w9
Lloh57:
	ldr	w9, [x10]
	orr	w8, w8, w9
Lloh58:
	adrp	x9, _TMC_FFCR_TRIGON_TRIGIN@GOTPAGE
Lloh59:
	ldr	x9, [x9, _TMC_FFCR_TRIGON_TRIGIN@GOTPAGEOFF]
Lloh60:
	ldr	w9, [x9]
	orr	w0, w8, w9
	ldr	x8, [x19, #8]
Lloh61:
	adrp	x9, _TMC_FFCR@GOTPAGE
Lloh62:
	ldr	x9, [x9, _TMC_FFCR@GOTPAGEOFF]
Lloh63:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel_relaxed
	ldr	w0, [x19]
	ldr	x8, [x19, #8]
Lloh64:
	adrp	x9, _TMC_TRG@GOTPAGE
Lloh65:
	ldr	x9, [x9, _TMC_TRG@GOTPAGEOFF]
Lloh66:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel_relaxed
	mov	x0, x19
	bl	_tmc_enable_hw
	ldr	x0, [x19, #8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_CS_LOCK
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGot	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh64, Lloh65, Lloh66
	.loh AdrpLdrGotLdr	Lloh61, Lloh62, Lloh63
	.loh AdrpLdrGotLdr	Lloh58, Lloh59, Lloh60
	.loh AdrpLdrGotLdr	Lloh55, Lloh56, Lloh57
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.cfi_endproc
                                        ; -- End function
	.comm	_TMC_RSZ,8,3                    ; @TMC_RSZ
	.comm	_TMC_MODE_CIRCULAR_BUFFER,4,2   ; @TMC_MODE_CIRCULAR_BUFFER
	.comm	_TMC_MODE,8,3                   ; @TMC_MODE
	.comm	_TMC_AXICTL,8,3                 ; @TMC_AXICTL
	.comm	_TMC_AXICTL_CLEAR_MASK,4,2      ; @TMC_AXICTL_CLEAR_MASK
	.comm	_TMC_AXICTL_PROT_CTL_B1,4,2     ; @TMC_AXICTL_PROT_CTL_B1
	.comm	_TMC_AXICTL_WR_BURST_16,4,2     ; @TMC_AXICTL_WR_BURST_16
	.comm	_TMC_AXICTL_AXCACHE_OS,4,2      ; @TMC_AXICTL_AXCACHE_OS
	.comm	_TMC_ETR_AXI_ARCACHE,4,2        ; @TMC_ETR_AXI_ARCACHE
	.comm	_TMC_AXICTL_ARCACHE_MASK,4,2    ; @TMC_AXICTL_ARCACHE_MASK
	.comm	_TMC_AXICTL_ARCACHE_OS,4,2      ; @TMC_AXICTL_ARCACHE_OS
	.comm	_ETR_MODE_ETR_SG,8,3            ; @ETR_MODE_ETR_SG
	.comm	_TMC_AXICTL_SCT_GAT_MODE,4,2    ; @TMC_AXICTL_SCT_GAT_MODE
	.comm	_TMC_ETR_SAVE_RESTORE,4,2       ; @TMC_ETR_SAVE_RESTORE
	.comm	_TMC_STS,8,3                    ; @TMC_STS
	.comm	_TMC_STS_FULL,4,2               ; @TMC_STS_FULL
	.comm	_TMC_FFCR_EN_FMT,4,2            ; @TMC_FFCR_EN_FMT
	.comm	_TMC_FFCR_EN_TI,4,2             ; @TMC_FFCR_EN_TI
	.comm	_TMC_FFCR_FON_FLIN,4,2          ; @TMC_FFCR_FON_FLIN
	.comm	_TMC_FFCR_FON_TRIG_EVT,4,2      ; @TMC_FFCR_FON_TRIG_EVT
	.comm	_TMC_FFCR_TRIGON_TRIGIN,4,2     ; @TMC_FFCR_TRIGON_TRIGIN
	.comm	_TMC_FFCR,8,3                   ; @TMC_FFCR
	.comm	_TMC_TRG,8,3                    ; @TMC_TRG
	.no_dead_strip	___tmc_etr_enable_hw
.subsections_via_symbols
