	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function amdgpu_job_run
_amdgpu_job_run:                        ## @amdgpu_job_run
	.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
	movq	%rdi, %rbx
	movl	(%rdi), %edi
	callq	_to_amdgpu_ring
	movq	%rax, %r14
	movq	$0, -48(%rbp)
	movq	%rbx, %rdi
	callq	_to_amdgpu_job
	movq	%rax, %rbx
	movq	24(%rax), %r15
	leaq	20(%rax), %rdi
	xorl	%r12d, %r12d
	xorl	%esi, %esi
	callq	_amdgpu_sync_peek_fence
	movl	%eax, %edi
	callq	_BUG_ON
	movq	%rbx, %rdi
	callq	_trace_amdgpu_sched_run_job
	movq	(%rbx), %r13
	movq	(%r14), %rdi
	callq	_atomic_read
	cmpq	%rax, %r13
	je	LBB0_2
## %bb.1:
	movq	_ECANCELED@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
	movq	%r15, %rdi
	movl	%r12d, %esi
	callq	_dma_fence_set_error
LBB0_2:
	cmpq	$0, (%r15)
	js	LBB0_5
## %bb.3:
	movl	12(%rbx), %edx
	movl	16(%rbx), %esi
	leaq	-48(%rbp), %r8
	movq	%r14, %rdi
	movq	%rbx, %rcx
	callq	_amdgpu_ib_schedule
	testl	%eax, %eax
	je	LBB0_6
## %bb.4:
	movl	%eax, %r14d
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	callq	_DRM_ERROR
	jmp	LBB0_7
LBB0_5:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_INFO
LBB0_6:
	xorl	%r14d, %r14d
LBB0_7:
	movl	8(%rbx), %edi
	callq	_dma_fence_put
	movq	-48(%rbp), %rdi
	callq	_dma_fence_get
	movl	%eax, 8(%rbx)
	movq	%rbx, %rdi
	callq	_amdgpu_job_free_resources
	testl	%r14d, %r14d
	je	LBB0_9
## %bb.8:
	movl	%r14d, %edi
	callq	_ERR_PTR
	jmp	LBB0_10
LBB0_9:
	movq	-48(%rbp), %rax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ECANCELED,4,2                  ## @ECANCELED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Skip scheduling IBs!\n"

L_.str.1:                               ## @.str.1
	.asciz	"Error scheduling IBs (%d)\n"

	.no_dead_strip	_amdgpu_job_run
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function amdgpu_job_run
_amdgpu_job_run:                        ; @amdgpu_job_run
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	ldr	w0, [x0]
	bl	_to_amdgpu_ring
	mov	x20, x0
	str	xzr, [sp, #8]
	mov	x0, x19
	bl	_to_amdgpu_job
	mov	x19, x0
	ldr	x21, [x0, #24]
	add	x0, x0, #20
	mov	x1, #0
	bl	_amdgpu_sync_peek_fence
	bl	_BUG_ON
	mov	x0, x19
	bl	_trace_amdgpu_sched_run_job
	ldr	x22, [x19]
	ldr	x0, [x20]
	bl	_atomic_read
	cmp	x22, x0
	b.eq	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _ECANCELED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ECANCELED@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w1, w8
	mov	x0, x21
	bl	_dma_fence_set_error
LBB0_2:
	ldr	x8, [x21]
	tbnz	x8, #63, LBB0_5
; %bb.3:
	ldp	w2, w1, [x19, #12]
	add	x4, sp, #8
	mov	x0, x20
	mov	x3, x19
	bl	_amdgpu_ib_schedule
	mov	x20, x0
	cbz	w0, LBB0_6
; %bb.4:
Lloh3:
	adrp	x0, l_.str.1@PAGE
Lloh4:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x20
	bl	_DRM_ERROR
	b	LBB0_6
LBB0_5:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_INFO
	mov	w20, #0
LBB0_6:
	ldr	w0, [x19, #8]
	bl	_dma_fence_put
	ldr	x0, [sp, #8]
	bl	_dma_fence_get
	str	w0, [x19, #8]
	mov	x0, x19
	bl	_amdgpu_job_free_resources
	cbz	w20, LBB0_8
; %bb.7:
	mov	x0, x20
	bl	_ERR_PTR
	b	LBB0_9
LBB0_8:
	ldr	x0, [sp, #8]
LBB0_9:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_ECANCELED,4,2                  ; @ECANCELED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Skip scheduling IBs!\n"

l_.str.1:                               ; @.str.1
	.asciz	"Error scheduling IBs (%d)\n"

	.no_dead_strip	_amdgpu_job_run
.subsections_via_symbols
