	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function goya_coresight_timeout
_goya_coresight_timeout:                ## @goya_coresight_timeout
	.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
	movl	%edx, %r15d
	movl	%esi, %r12d
	movq	%rdi, %rbx
	cmpq	$0, 8(%rdi)
	jne	LBB0_1
## %bb.2:
	movq	_CORESIGHT_TIMEOUT_USEC@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_GOYA_PLDM_CORESIGHT_TIMEOUT_USEC@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %r13d
	xorl	%r14d, %r14d
	testl	%ecx, %ecx
	sete	%r14b
	movl	%r15d, %edi
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	callq	_BIT
	movq	%rbx, %rdi
	movl	%r12d, %esi
	movl	%r14d, %ecx
	movl	$1000, %r8d                     ## imm = 0x3E8
	movl	%r13d, %r9d
	callq	_hl_poll_timeout
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	movl	(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r12d, %edx
	movl	%r15d, %ecx
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	callq	_dev_err
	movq	_EFAULT@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_6
LBB0_4:
	xorl	%eax, %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GOYA_PLDM_CORESIGHT_TIMEOUT_USEC,4,2 ## @GOYA_PLDM_CORESIGHT_TIMEOUT_USEC
	.comm	_CORESIGHT_TIMEOUT_USEC,4,2     ## @CORESIGHT_TIMEOUT_USEC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Timeout while waiting for coresight, addr: 0x%llx, position: %d, up: %d\n"

	.comm	_EFAULT,4,2                     ## @EFAULT
	.no_dead_strip	_goya_coresight_timeout
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function goya_coresight_timeout
_goya_coresight_timeout:                ; @goya_coresight_timeout
	.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	x19, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
Lloh0:
	adrp	x8, _CORESIGHT_TIMEOUT_USEC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CORESIGHT_TIMEOUT_USEC@GOTPAGEOFF]
Lloh2:
	adrp	x9, _GOYA_PLDM_CORESIGHT_TIMEOUT_USEC@GOTPAGE
Lloh3:
	ldr	x9, [x9, _GOYA_PLDM_CORESIGHT_TIMEOUT_USEC@GOTPAGEOFF]
	ldr	x10, [x0, #8]
	cmp	x10, #0
	csel	x8, x8, x9, eq
	ldr	w23, [x8]
	cmp	w3, #0
	cset	w24, eq
	mov	x0, x2
	bl	_BIT
	mov	x0, x22
	mov	x1, x21
	mov	x3, x24
	mov	w4, #1000
	mov	x5, x23
	bl	_hl_poll_timeout
	cbz	w0, LBB0_2
; %bb.1:
	ldr	w0, [x22]
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	mov	x3, x20
	mov	x4, x19
	bl	_dev_err
Lloh6:
	adrp	x8, _EFAULT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_2:
	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
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_GOYA_PLDM_CORESIGHT_TIMEOUT_USEC,4,2 ; @GOYA_PLDM_CORESIGHT_TIMEOUT_USEC
	.comm	_CORESIGHT_TIMEOUT_USEC,4,2     ; @CORESIGHT_TIMEOUT_USEC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Timeout while waiting for coresight, addr: 0x%llx, position: %d, up: %d\n"

	.comm	_EFAULT,4,2                     ; @EFAULT
	.no_dead_strip	_goya_coresight_timeout
.subsections_via_symbols
