	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function amdgpu_cs_process_fence_dep
_amdgpu_cs_process_fence_dep:           ## @amdgpu_cs_process_fence_dep
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movslq	(%rsi), %rax
	shlq	$2, %rax
	movabsq	$-3689348814741910323, %rcx     ## imm = 0xCCCCCCCCCCCCCCCD
	mulq	%rcx
	shrq	$4, %rdx
	testl	%edx, %edx
	je	LBB0_13
## %bb.1:
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	16(%rdi), %rax
	movq	(%rax), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	16(%rsi), %r15
	movl	%edx, %eax
	shlq	$2, %rax
	leaq	(%rax,%rax,4), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	xorl	%r13d, %r13d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	8(%rax), %edi
	movq	(%rax), %rsi
	movq	%rbx, %rdx
	movl	$1, %ecx
	callq	_amdgpu_sync_fence
	movl	%eax, %r12d
	movq	%rbx, %rdi
	callq	_dma_fence_put
	testl	%r12d, %r12d
	jne	LBB0_14
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	addq	$20, %r13
	cmpq	%r13, -64(%rbp)                 ## 8-byte Folded Reload
	je	LBB0_13
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	16(%r15,%r13), %esi
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_amdgpu_ctx_get
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, %r14
	movl	12(%r15,%r13), %esi
	movl	4(%r15,%r13), %ecx
	movl	8(%r15,%r13), %edx
	movq	%rax, %rdi
	leaq	-80(%rbp), %r8
	callq	_amdgpu_ctx_get_entity
	testl	%eax, %eax
	jne	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-80(%rbp), %rsi
	movl	(%r15,%r13), %edx
	movq	%r14, %rdi
	callq	_amdgpu_ctx_get_fence
	movq	%rax, %rbx
	movq	%r14, %rdi
	callq	_amdgpu_ctx_put
	movq	%rbx, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	jne	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	testq	%rbx, %rbx
	je	LBB0_12
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rax
	movq	_AMDGPU_CHUNK_ID_SCHEDULED_DEPENDENCIES@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	callq	_to_drm_sched_fence
	movq	%rax, %rdi
	callq	_dma_fence_get
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_dma_fence_put
	movq	%r14, %rbx
	jmp	LBB0_11
LBB0_13:
	xorl	%r12d, %r12d
	jmp	LBB0_14
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_14
LBB0_5:
	movl	%eax, %r12d
	movq	%r14, %rdi
	callq	_amdgpu_ctx_put
	jmp	LBB0_14
LBB0_7:
	movq	%rbx, %rdi
	callq	_PTR_ERR
	movl	%eax, %r12d
LBB0_14:
	movl	%r12d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_AMDGPU_CHUNK_ID_SCHEDULED_DEPENDENCIES,8,3 ## @AMDGPU_CHUNK_ID_SCHEDULED_DEPENDENCIES
	.no_dead_strip	_amdgpu_cs_process_fence_dep
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function amdgpu_cs_process_fence_dep
_amdgpu_cs_process_fence_dep:           ; @amdgpu_cs_process_fence_dep
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	ldrsw	x8, [x1]
	lsl	x8, x8, #2
	mov	x9, #-3689348814741910324
	movk	x9, #52429
	umulh	x8, x8, x9
	lsr	x8, x8, #4
	cbz	w8, LBB0_10
; %bb.1:
	mov	x19, x1
	mov	x20, x0
	ldr	x9, [x0, #16]
	ldr	x21, [x9]
	ldr	x9, [x1, #16]
	and	x25, x8, #0xffffffff
	add	x26, x9, #8
Lloh0:
	adrp	x27, _AMDGPU_CHUNK_ID_SCHEDULED_DEPENDENCIES@GOTPAGE
Lloh1:
	ldr	x27, [x27, _AMDGPU_CHUNK_ID_SCHEDULED_DEPENDENCIES@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x20, #8]
	ldr	x1, [x20]
	mov	x2, x22
	mov	w3, #1
	bl	_amdgpu_sync_fence
	mov	x23, x0
	mov	x0, x22
	bl	_dma_fence_put
	cbnz	w23, LBB0_14
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x26, x26, #20
	subs	x25, x25, #1
	b.eq	LBB0_10
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x26, #8]
	mov	x0, x21
	bl	_amdgpu_ctx_get
	cbz	x0, LBB0_11
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x24, x0
	ldp	w2, w1, [x26]
	ldur	w3, [x26, #-4]
	add	x4, sp, #8
	bl	_amdgpu_ctx_get_entity
	cbnz	w0, LBB0_12
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x1, [sp, #8]
	ldur	w2, [x26, #-8]
	mov	x0, x24
	bl	_amdgpu_ctx_get_fence
	mov	x22, x0
	mov	x0, x24
	bl	_amdgpu_ctx_put
	mov	x0, x22
	bl	_IS_ERR
	cbnz	x0, LBB0_13
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	cbz	x22, LBB0_3
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x19, #8]
	ldr	x9, [x27]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x22
	bl	_to_drm_sched_fence
	bl	_dma_fence_get
	mov	x23, x0
	mov	x0, x22
	bl	_dma_fence_put
	mov	x22, x23
	b	LBB0_2
LBB0_10:
	mov	w23, #0
	b	LBB0_14
LBB0_11:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_14
LBB0_12:
	mov	x23, x0
	mov	x0, x24
	bl	_amdgpu_ctx_put
	b	LBB0_14
LBB0_13:
	mov	x0, x22
	bl	_PTR_ERR
	mov	x23, x0
LBB0_14:
	mov	x0, x23
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_AMDGPU_CHUNK_ID_SCHEDULED_DEPENDENCIES,8,3 ; @AMDGPU_CHUNK_ID_SCHEDULED_DEPENDENCIES
	.no_dead_strip	_amdgpu_cs_process_fence_dep
.subsections_via_symbols
