	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function amdgpu_job_dependency
_amdgpu_job_dependency:                 ## @amdgpu_job_dependency
	.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	%rsi, %r13
	movq	%rdi, %rbx
	movq	(%rsi), %rax
	movl	(%rax), %edi
	callq	_to_amdgpu_ring
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_to_amdgpu_job
	movq	%rax, %rbx
	movq	24(%rax), %r12
	movl	$0, -44(%rbp)
	leaq	-44(%rbp), %rsi
	movq	%rax, %rdi
	callq	_amdgpu_sync_get_fence
	movq	%rax, %r14
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	cmpl	$0, -44(%rbp)
	je	LBB0_5
## %bb.2:
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_drm_sched_dependency_optimized
	testq	%rax, %rax
	je	LBB0_13
## %bb.3:
	movl	(%r15), %edi
	addq	$20, %rbx
	movq	%rbx, %rsi
	movq	%r14, %rdx
	xorl	%ecx, %ecx
	callq	_amdgpu_sync_fence
	testl	%eax, %eax
	je	LBB0_13
## %bb.4:
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_DRM_ERROR
	jmp	LBB0_13
LBB0_5:
	testq	%r14, %r14
	jne	LBB0_13
## %bb.6:
	testq	%r12, %r12
	je	LBB0_13
## %bb.7:
	xorl	%r14d, %r14d
	leaq	L_.str.1(%rip), %r13
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_amdgpu_sync_get_fence
	testq	%rax, %rax
	jne	LBB0_12
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$0, 16(%rbx)
	jne	LBB0_13
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movq	8(%rbx), %rcx
	movq	%r12, %rdi
	movq	%r15, %rsi
	movq	%rbx, %rdx
	movq	%rbx, %r8
	callq	_amdgpu_vmid_grab
	testl	%eax, %eax
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_DRM_ERROR
	jmp	LBB0_11
LBB0_12:
	movq	%rax, %r14
LBB0_13:
	movq	%r14, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error adding fence (%d)\n"

L_.str.1:                               ## @.str.1
	.asciz	"Error getting VM ID (%d)\n"

	.no_dead_strip	_amdgpu_job_dependency
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function amdgpu_job_dependency
_amdgpu_job_dependency:                 ; @amdgpu_job_dependency
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x23, x1
	mov	x20, x0
	ldr	x8, [x1]
	ldr	w0, [x8]
	bl	_to_amdgpu_ring
	mov	x19, x0
	mov	x0, x20
	bl	_to_amdgpu_job
	mov	x20, x0
	ldr	x22, [x0, #24]
	str	wzr, [sp, #12]
	add	x1, sp, #12
	bl	_amdgpu_sync_get_fence
	mov	x21, x0
	cbz	x0, LBB0_5
; %bb.1:
	ldr	w8, [sp, #12]
	cbz	w8, LBB0_5
; %bb.2:
	mov	x0, x21
	mov	x1, x23
	bl	_drm_sched_dependency_optimized
	cbz	x0, LBB0_14
; %bb.3:
	ldr	w0, [x19]
	add	x1, x20, #20
	mov	x2, x21
	mov	w3, #0
	bl	_amdgpu_sync_fence
	cbz	w0, LBB0_14
; %bb.4:
	mov	x1, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
	b	LBB0_14
LBB0_5:
	cbnz	x21, LBB0_14
; %bb.6:
	cbz	x22, LBB0_14
; %bb.7:
Lloh2:
	adrp	x23, l_.str.1@PAGE
Lloh3:
	add	x23, x23, l_.str.1@PAGEOFF
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	mov	x0, x20
	mov	x1, #0
	bl	_amdgpu_sync_get_fence
	cbnz	x0, LBB0_13
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x20, #16]
	cbnz	w8, LBB0_12
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	x3, [x20, #8]
	mov	x0, x22
	mov	x1, x19
	mov	x2, x20
	mov	x4, x20
	bl	_amdgpu_vmid_grab
	cbz	w0, LBB0_8
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	x1, x0
	mov	x0, x23
	bl	_DRM_ERROR
	b	LBB0_8
LBB0_12:
	mov	x21, #0
	b	LBB0_14
LBB0_13:
	mov	x21, x0
LBB0_14:
	mov	x0, x21
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error adding fence (%d)\n"

l_.str.1:                               ; @.str.1
	.asciz	"Error getting VM ID (%d)\n"

	.no_dead_strip	_amdgpu_job_dependency
.subsections_via_symbols
