	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_ras_error_inject        ## -- Begin function amdgpu_ras_error_inject
	.p2align	4, 0x90
_amdgpu_ras_error_inject:               ## @amdgpu_ras_error_inject
	.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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	callq	_amdgpu_ras_find_obj
	movq	%rax, %r15
	movl	12(%rbx), %eax
	movl	%eax, -48(%rbp)
	movl	16(%rbx), %eax
	movl	%eax, -44(%rbp)
	movl	4(%rbx), %eax
	movl	%eax, -40(%rbp)
	movl	8(%rbx), %edi
	callq	_amdgpu_ras_error_to_ta
	movl	%eax, -36(%rbp)
	movl	(%rbx), %edi
	callq	_amdgpu_ras_block_to_ta
	movl	%eax, -32(%rbp)
	testq	%r15, %r15
	je	LBB0_3
## %bb.1:
	movl	(%rbx), %edi
	leal	-128(%rdi), %eax
	cmpl	$2, %eax
	jae	LBB0_4
## %bb.2:
	leaq	-48(%rbp), %rsi
	movq	%r14, %rdi
	callq	_psp_ras_trigger_error
	jmp	LBB0_7
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_12
LBB0_4:
	cmpl	$130, %edi
	jne	LBB0_9
## %bb.5:
	movq	8(%r14), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_10
## %bb.6:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	*%rax
LBB0_7:
	movl	%eax, %r14d
	testl	%r14d, %r14d
	je	LBB0_8
LBB0_11:
	movl	(%rbx), %edi
	callq	_ras_block_str
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	movl	%r14d, %edx
	callq	_DRM_ERROR
	jmp	LBB0_12
LBB0_9:
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_ras_block_str
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_DRM_INFO
LBB0_10:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	testl	%r14d, %r14d
	jne	LBB0_11
LBB0_8:
	xorl	%r14d, %r14d
LBB0_12:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s error injection is not supported yet\n"

L_.str.1:                               ## @.str.1
	.asciz	"RAS ERROR: inject %s error failed ret %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_ras_error_inject        ; -- Begin function amdgpu_ras_error_inject
	.p2align	2
_amdgpu_ras_error_inject:               ; @amdgpu_ras_error_inject
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	bl	_amdgpu_ras_find_obj
	mov	x21, x0
	ldur	d0, [x19, #12]
	str	d0, [sp, #8]
	ldp	w8, w0, [x19, #4]
	str	w8, [sp, #16]
	bl	_amdgpu_ras_error_to_ta
	str	w0, [sp, #20]
	ldr	w0, [x19]
	bl	_amdgpu_ras_block_to_ta
	str	w0, [sp, #24]
	cbz	x21, LBB0_3
; %bb.1:
	ldr	w0, [x19]
	sub	w8, w0, #128
	cmp	w8, #2
	b.hs	LBB0_4
; %bb.2:
	add	x1, sp, #8
	mov	x0, x20
	bl	_psp_ras_trigger_error
	mov	x20, x0
	b	LBB0_9
LBB0_3:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_11
LBB0_4:
	cmp	w0, #130
	b.ne	LBB0_7
; %bb.5:
	ldr	x8, [x20, #8]
	ldr	x8, [x8]
	cbz	x8, LBB0_8
; %bb.6:
	mov	x0, x20
	mov	x1, x19
	blr	x8
	mov	x20, x0
	b	LBB0_9
LBB0_7:
	bl	_ras_block_str
	mov	x1, x0
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_INFO
LBB0_8:
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_9:
	cbz	w20, LBB0_11
; %bb.10:
	ldr	w0, [x19]
	bl	_ras_block_str
	mov	x1, x0
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x2, x20
	bl	_DRM_ERROR
LBB0_11:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s error injection is not supported yet\n"

l_.str.1:                               ; @.str.1
	.asciz	"RAS ERROR: inject %s error failed ret %d\n"

.subsections_via_symbols
