	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_syncobj_find_fence         ## -- Begin function drm_syncobj_find_fence
	.p2align	4, 0x90
_drm_syncobj_find_fence:                ## @drm_syncobj_find_fence
	.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
	movq	%r8, %r14
	movq	%rcx, %r13
	movq	%rdx, %r12
	callq	_drm_syncobj_find
	movq	%rax, %r15
	movq	_DRM_SYNCOBJ_WAIT_FOR_SUBMIT_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_nsecs_to_jiffies64
	testq	%r15, %r15
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	%r15, %rdi
	callq	_drm_syncobj_fence_get
	movq	%rax, (%r14)
	movq	%r15, %rdi
	callq	_drm_syncobj_put
	cmpq	$0, (%r14)
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	je	LBB0_6
## %bb.3:
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_dma_fence_chain_find_seqno
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	movl	%eax, %r12d
	movq	(%r14), %rdi
	callq	_dma_fence_put
	jmp	LBB0_7
LBB0_1:
	movq	_ENOENT@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_15
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_7:
	movq	_DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT@GOTPCREL(%rip), %rax
	testq	%r13, (%rax)
	je	LBB0_15
## %bb.8:
	leaq	-80(%rbp), %r13
	xorl	%r12d, %r12d
	movq	%r13, %rdi
	xorl	%esi, %esi
	movl	$32, %edx
	callq	_memset
	movq	_current@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, -64(%rbp)
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_drm_syncobj_fence_add_wait
	movq	_TASK_INTERRUPTIBLE@GOTPCREL(%rip), %r13
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %edi
	callq	_set_current_state
	cmpq	$0, -72(%rbp)
	jne	LBB0_13
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	testq	%rbx, %rbx
	je	LBB0_11
## %bb.16:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	_current@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_signal_pending
	testq	%rax, %rax
	jne	LBB0_17
## %bb.18:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	%rbx, %rdi
	callq	_schedule_timeout
	movq	%rax, %rbx
	jmp	LBB0_9
LBB0_4:
	xorl	%r12d, %r12d
	jmp	LBB0_15
LBB0_11:
	movq	_ETIME@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_17:
	movq	_ERESTARTSYS@GOTPCREL(%rip), %rax
LBB0_12:
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_13:
	movq	_TASK_RUNNING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	___set_current_state
	movq	-72(%rbp), %rax
	movq	%rax, (%r14)
	cmpq	$0, -80(%rbp)
	je	LBB0_15
## %bb.14:
	leaq	-80(%rbp), %rsi
	movq	%r15, %rdi
	callq	_drm_syncobj_remove_wait
LBB0_15:
	movl	%r12d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DRM_SYNCOBJ_WAIT_FOR_SUBMIT_TIMEOUT,4,2 ## @DRM_SYNCOBJ_WAIT_FOR_SUBMIT_TIMEOUT
	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT,8,3 ## @DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT
	.comm	_current,4,2                    ## @current
	.comm	_TASK_INTERRUPTIBLE,4,2         ## @TASK_INTERRUPTIBLE
	.comm	_ETIME,4,2                      ## @ETIME
	.comm	_ERESTARTSYS,4,2                ## @ERESTARTSYS
	.comm	_TASK_RUNNING,4,2               ## @TASK_RUNNING
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_syncobj_find_fence         ; -- Begin function drm_syncobj_find_fence
	.p2align	2
_drm_syncobj_find_fence:                ; @drm_syncobj_find_fence
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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, x4
	mov	x24, x3
	mov	x22, x2
	bl	_drm_syncobj_find
	mov	x20, x0
Lloh0:
	adrp	x8, _DRM_SYNCOBJ_WAIT_FOR_SUBMIT_TIMEOUT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DRM_SYNCOBJ_WAIT_FOR_SUBMIT_TIMEOUT@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_nsecs_to_jiffies64
	cbz	x20, LBB0_4
; %bb.1:
	mov	x21, x0
	mov	x0, x20
	bl	_drm_syncobj_fence_get
	str	x0, [x19]
	mov	x0, x20
	bl	_drm_syncobj_put
	ldr	x8, [x19]
	cbz	x8, LBB0_5
; %bb.2:
	mov	x0, x19
	mov	x1, x22
	bl	_dma_fence_chain_find_seqno
	mov	x23, x0
	cbz	w0, LBB0_17
; %bb.3:
	ldr	x0, [x19]
	bl	_dma_fence_put
	b	LBB0_6
LBB0_4:
Lloh3:
	adrp	x8, _ENOENT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_17
LBB0_5:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_6:
Lloh9:
	adrp	x8, _DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	tst	x8, x24
	b.eq	LBB0_17
; %bb.7:
	mov	x0, sp
	mov	w1, #0
	mov	w2, #32
	bl	_memset
Lloh12:
	adrp	x24, _current@GOTPAGE
Lloh13:
	ldr	x24, [x24, _current@GOTPAGEOFF]
	ldr	w8, [x24]
	str	w8, [sp, #24]
	str	x22, [sp, #16]
	mov	x1, sp
	mov	x0, x20
	bl	_drm_syncobj_fence_add_wait
Lloh14:
	adrp	x22, _TASK_INTERRUPTIBLE@GOTPAGE
Lloh15:
	ldr	x22, [x22, _TASK_INTERRUPTIBLE@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_set_current_state
	mov	w23, #0
	ldr	x8, [sp, #8]
	cbnz	x8, LBB0_15
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	cbz	x21, LBB0_12
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	w0, [x24]
	bl	_signal_pending
	cbnz	x0, LBB0_13
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
	mov	x0, x21
	bl	_schedule_timeout
	mov	x21, x0
	ldr	w0, [x22]
	bl	_set_current_state
	ldr	x8, [sp, #8]
	cbz	x8, LBB0_8
; %bb.11:
	mov	w23, #0
	b	LBB0_15
LBB0_12:
Lloh16:
	adrp	x8, _ETIME@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ETIME@GOTPAGEOFF]
	b	LBB0_14
LBB0_13:
Lloh18:
	adrp	x8, _ERESTARTSYS@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ERESTARTSYS@GOTPAGEOFF]
LBB0_14:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_15:
Lloh20:
	adrp	x8, _TASK_RUNNING@GOTPAGE
Lloh21:
	ldr	x8, [x8, _TASK_RUNNING@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
	bl	___set_current_state
	ldp	x9, x8, [sp]
	str	x8, [x19]
	cbz	x9, LBB0_17
; %bb.16:
	mov	x1, sp
	mov	x0, x20
	bl	_drm_syncobj_remove_wait
LBB0_17:
	mov	x0, x23
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_DRM_SYNCOBJ_WAIT_FOR_SUBMIT_TIMEOUT,4,2 ; @DRM_SYNCOBJ_WAIT_FOR_SUBMIT_TIMEOUT
	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT,8,3 ; @DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT
	.comm	_current,4,2                    ; @current
	.comm	_TASK_INTERRUPTIBLE,4,2         ; @TASK_INTERRUPTIBLE
	.comm	_ETIME,4,2                      ; @ETIME
	.comm	_ERESTARTSYS,4,2                ; @ERESTARTSYS
	.comm	_TASK_RUNNING,4,2               ; @TASK_RUNNING
.subsections_via_symbols
