	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_goya_debug_coresight           ## -- Begin function goya_debug_coresight
	.p2align	4, 0x90
_goya_debug_coresight:                  ## @goya_debug_coresight
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movl	(%rsi), %edx
	leal	-128(%rdx), %eax
	cmpl	$6, %eax
	ja	LBB0_7
## %bb.1:
	xorl	%ebx, %ebx
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_8:
	callq	_goya_config_stm
	jmp	LBB0_9
LBB0_7:
	movl	(%rdi), %edi
	leaq	L_.str(%rip), %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_11
LBB0_6:
	callq	_goya_config_spmu
	jmp	LBB0_9
LBB0_4:
	callq	_goya_config_funnel
	jmp	LBB0_9
LBB0_3:
	callq	_goya_config_etr
	jmp	LBB0_9
LBB0_2:
	callq	_goya_config_etf
	jmp	LBB0_9
LBB0_5:
	callq	_goya_config_bmon
LBB0_9:
	movl	%eax, %ebx
LBB0_10:
	movq	_mmPCIE_DBI_DEVICE_ID_VENDOR_ID_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_RREG32
LBB0_11:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
LJTI0_0:
	.long	L0_0_set_10
	.long	L0_0_set_8
	.long	L0_0_set_6
	.long	L0_0_set_4
	.long	L0_0_set_3
	.long	L0_0_set_2
	.long	L0_0_set_5
	.end_data_region
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unknown coresight id %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_mmPCIE_DBI_DEVICE_ID_VENDOR_ID_REG,4,2 ## @mmPCIE_DBI_DEVICE_ID_VENDOR_ID_REG
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_goya_debug_coresight           ; -- Begin function goya_debug_coresight
	.p2align	2
_goya_debug_coresight:                  ; @goya_debug_coresight
	.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
	ldr	w2, [x1]
	sub	w8, w2, #128
	cmp	w8, #6
	b.hi	LBB0_3
; %bb.1:
	mov	w19, #0
Lloh0:
	adrp	x9, lJTI0_0@PAGE
Lloh1:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
	bl	_goya_config_stm
	b	LBB0_9
LBB0_3:
	ldr	w0, [x0]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w19, w8
	b	LBB0_11
LBB0_4:
	bl	_goya_config_spmu
	b	LBB0_9
LBB0_5:
	bl	_goya_config_funnel
	b	LBB0_9
LBB0_6:
	bl	_goya_config_etr
	b	LBB0_9
LBB0_7:
	bl	_goya_config_etf
	b	LBB0_9
LBB0_8:
	bl	_goya_config_bmon
LBB0_9:
	mov	x19, x0
LBB0_10:
Lloh7:
	adrp	x8, _mmPCIE_DBI_DEVICE_ID_VENDOR_ID_REG@GOTPAGE
Lloh8:
	ldr	x8, [x8, _mmPCIE_DBI_DEVICE_ID_VENDOR_ID_REG@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	bl	_RREG32
LBB0_11:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_10-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_5-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_7-LBB0_2)>>2
	.byte	(LBB0_8-LBB0_2)>>2
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unknown coresight id %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_mmPCIE_DBI_DEVICE_ID_VENDOR_ID_REG,4,2 ; @mmPCIE_DBI_DEVICE_ID_VENDOR_ID_REG
.subsections_via_symbols
