	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_syncobj_wait_ioctl         ## -- Begin function drm_syncobj_wait_ioctl
	.p2align	4, 0x90
_drm_syncobj_wait_ioctl:                ## @drm_syncobj_wait_ioctl
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %r12
	movq	_DRIVER_SYNCOBJ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_drm_core_check_feature
	testl	%eax, %eax
	je	LBB0_1
## %bb.3:
	movq	_DRM_SYNCOBJ_WAIT_FLAGS_WAIT_ALL@GOTPCREL(%rip), %rax
	movq	_DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	notl	%ecx
	testl	%ecx, (%r15)
	je	LBB0_5
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_1:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	cmpq	$0, 8(%r15)
	je	LBB0_4
## %bb.6:
	movl	16(%r15), %edi
	callq	_u64_to_user_ptr
	movq	8(%r15), %rdx
	leaq	-40(%rbp), %rcx
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_drm_syncobj_array_find
	testl	%eax, %eax
	js	LBB0_7
## %bb.8:
	movq	-40(%rbp), %r8
	movq	%r12, %rdi
	movq	%r14, %rsi
	movq	%r15, %rdx
	xorl	%ecx, %ecx
	xorl	%r9d, %r9d
	callq	_drm_syncobj_array_wait
	movl	%eax, %ebx
	movq	-40(%rbp), %rdi
	movq	8(%r15), %rsi
	callq	_drm_syncobj_array_free
	jmp	LBB0_9
LBB0_7:
	movl	%eax, %ebx
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_DRIVER_SYNCOBJ,4,2             ## @DRIVER_SYNCOBJ
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_DRM_SYNCOBJ_WAIT_FLAGS_WAIT_ALL,4,2 ## @DRM_SYNCOBJ_WAIT_FLAGS_WAIT_ALL
	.comm	_DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT,4,2 ## @DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT
	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_syncobj_wait_ioctl         ; -- Begin function drm_syncobj_wait_ioctl
	.p2align	2
_drm_syncobj_wait_ioctl:                ; @drm_syncobj_wait_ioctl
	.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	x20, x2
	mov	x19, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _DRIVER_SYNCOBJ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DRIVER_SYNCOBJ@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_drm_core_check_feature
	cbz	w0, LBB0_3
; %bb.1:
	ldr	w8, [x19]
Lloh3:
	adrp	x9, _DRM_SYNCOBJ_WAIT_FLAGS_WAIT_ALL@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DRM_SYNCOBJ_WAIT_FLAGS_WAIT_ALL@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
Lloh6:
	adrp	x10, _DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT@GOTPAGE
Lloh7:
	ldr	x10, [x10, _DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	orr	w9, w10, w9
	bics	wzr, w8, w9
	b.eq	LBB0_6
LBB0_2:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:
Lloh11:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_5:
	mov	x0, x22
	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
LBB0_6:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_2
; %bb.7:
	ldr	w0, [x19, #16]
	bl	_u64_to_user_ptr
	mov	x1, x0
	ldr	x2, [x19, #8]
	add	x3, sp, #8
	mov	x0, x20
	bl	_drm_syncobj_array_find
	tbnz	w0, #31, LBB0_9
; %bb.8:
	ldr	x4, [sp, #8]
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	mov	x3, #0
	mov	w5, #0
	bl	_drm_syncobj_array_wait
	mov	x22, x0
	ldr	x0, [sp, #8]
	ldr	x1, [x19, #8]
	bl	_drm_syncobj_array_free
	b	LBB0_5
LBB0_9:
	mov	x22, x0
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_DRIVER_SYNCOBJ,4,2             ; @DRIVER_SYNCOBJ
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_DRM_SYNCOBJ_WAIT_FLAGS_WAIT_ALL,4,2 ; @DRM_SYNCOBJ_WAIT_FLAGS_WAIT_ALL
	.comm	_DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT,4,2 ; @DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT
	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
