	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function goya_config_funnel
_goya_config_funnel:                    ## @goya_config_funnel
	.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	%rsi, %r14
	movq	%rdi, %r12
	movq	(%rsi), %rbx
	movq	_debug_funnel_regs@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	callq	_ARRAY_SIZE
	cmpq	%rax, %rbx
	jae	LBB0_1
## %bb.2:
	movq	(%r15), %rax
	movq	(%r14), %rcx
	movq	(%rax,%rcx,8), %r15
	movq	_CFG_BASE@GOTPCREL(%rip), %rax
	subq	(%rax), %r15
	leaq	4016(%r15), %rdi
	movq	_CORESIGHT_UNLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_WREG32
	xorl	%ebx, %ebx
	cmpq	$0, 8(%r14)
	movl	$831, %esi                      ## imm = 0x33F
	cmovel	%ebx, %esi
	movq	%r15, %rdi
	callq	_WREG32
	jmp	LBB0_3
LBB0_1:
	movl	(%r12), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_3:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_debug_funnel_regs,8,3          ## @debug_funnel_regs
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid register index in FUNNEL\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_CFG_BASE,8,3                   ## @CFG_BASE
	.comm	_CORESIGHT_UNLOCK,4,2           ## @CORESIGHT_UNLOCK
	.no_dead_strip	_goya_config_funnel
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function goya_config_funnel
_goya_config_funnel:                    ; @goya_config_funnel
	.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, x1
	mov	x20, x0
	ldr	x22, [x1]
Lloh0:
	adrp	x21, _debug_funnel_regs@GOTPAGE
Lloh1:
	ldr	x21, [x21, _debug_funnel_regs@GOTPAGEOFF]
	ldr	x0, [x21]
	bl	_ARRAY_SIZE
	cmp	x22, x0
	b.hs	LBB0_2
; %bb.1:
	ldr	x8, [x21]
	ldr	x9, [x19]
	ldr	x8, [x8, x9, lsl #3]
Lloh2:
	adrp	x9, _CFG_BASE@GOTPAGE
Lloh3:
	ldr	x9, [x9, _CFG_BASE@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	sub	x20, x8, x9
	add	x0, x20, #4016
Lloh5:
	adrp	x8, _CORESIGHT_UNLOCK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _CORESIGHT_UNLOCK@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	bl	_WREG32
	ldr	x8, [x19, #8]
	cmp	x8, #0
	mov	w8, #831
	csel	w1, wzr, w8, eq
	mov	x0, x20
	bl	_WREG32
	mov	w0, #0
	b	LBB0_3
LBB0_2:
	ldr	w0, [x20]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	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
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_debug_funnel_regs,8,3          ; @debug_funnel_regs
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid register index in FUNNEL\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_CFG_BASE,8,3                   ; @CFG_BASE
	.comm	_CORESIGHT_UNLOCK,4,2           ; @CORESIGHT_UNLOCK
	.no_dead_strip	_goya_config_funnel
.subsections_via_symbols
