	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i915_gem_wait_ioctl            ## -- Begin function i915_gem_wait_ioctl
	.p2align	4, 0x90
_i915_gem_wait_ioctl:                   ## @i915_gem_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %r13
	movq	8(%rdi), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	(%rsi), %rdi
	testq	%rdi, %rdi
	js	LBB0_1
## %bb.2:
	callq	_ns_to_timespec
	movl	%eax, -48(%rbp)
	leaq	-48(%rbp), %r12
	jmp	LBB0_3
LBB0_1:
	xorl	%r12d, %r12d
LBB0_3:
	movq	%r13, %rdi
	callq	_i915_mutex_lock_interruptible
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_12
## %bb.4:
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movl	8(%r15), %edx
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_drm_gem_object_lookup
	movl	%eax, %edi
	callq	_to_intel_bo
	movq	%rax, %r12
	leaq	8(%rax), %r14
	movq	%rax, %rdi
	callq	_i915_gem_object_flush_active
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_5
LBB0_9:
	movq	%r14, %rdi
	callq	_drm_gem_object_unreference
	movq	%r13, %rdi
	callq	_mutex_unlock
LBB0_12:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	xorl	%ebx, %ebx
	cmpq	$0, 24(%r12)
	je	LBB0_9
## %bb.6:
	movq	(%r12), %rax
	testq	%rax, %rax
	je	LBB0_9
## %bb.7:
	cmpq	$0, (%r15)
	je	LBB0_8
## %bb.10:
	movq	16(%r12), %r12
	movq	%r14, %rdi
	movq	%rax, %r14
	callq	_drm_gem_object_unreference
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_atomic_read
	movl	%eax, %ebx
	movq	%r13, %rdi
	callq	_mutex_unlock
	movq	%r12, %rdi
	movq	%r14, %rsi
	movl	%ebx, %edx
	movl	$1, %ecx
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %r8
	callq	___wait_seqno
	movl	%eax, %ebx
	testq	%r14, %r14
	je	LBB0_12
## %bb.11:
	movq	%r14, %rdi
	callq	_timespec_valid
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_WARN_ON
	movq	%r14, %rdi
	callq	_timespec_to_ns
	movq	%rax, (%r15)
	jmp	LBB0_12
LBB0_8:
	movq	_ETIME@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_ETIME,4,2                      ## @ETIME
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i915_gem_wait_ioctl            ; -- Begin function i915_gem_wait_ioctl
	.p2align	2
_i915_gem_wait_ioctl:                   ; @i915_gem_wait_ioctl
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x24, x2
	mov	x19, x1
	mov	x20, x0
	ldr	x22, [x0, #8]
	ldr	x0, [x1]
	tbnz	x0, #63, LBB0_2
; %bb.1:
	bl	_ns_to_timespec
	str	w0, [sp, #8]
	add	x21, sp, #8
	b	LBB0_3
LBB0_2:
	mov	x21, #0
LBB0_3:
	mov	x0, x20
	bl	_i915_mutex_lock_interruptible
	mov	x23, x0
	cbnz	w0, LBB0_6
; %bb.4:
	ldr	w2, [x19, #8]
	mov	x0, x20
	mov	x1, x24
	bl	_drm_gem_object_lookup
	bl	_to_intel_bo
	mov	x25, x0
	add	x24, x0, #8
	bl	_i915_gem_object_flush_active
	mov	x23, x0
	cbz	w0, LBB0_7
LBB0_5:
	mov	x0, x24
	bl	_drm_gem_object_unreference
	mov	x0, x20
	bl	_mutex_unlock
LBB0_6:
	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
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_7:
	ldr	x8, [x25, #24]
	cbz	x8, LBB0_12
; %bb.8:
	ldr	x23, [x25]
	cbz	x23, LBB0_5
; %bb.9:
	ldr	x8, [x19]
	cbz	x8, LBB0_13
; %bb.10:
	ldr	x25, [x25, #16]
	mov	x0, x24
	bl	_drm_gem_object_unreference
	mov	x0, x22
	bl	_atomic_read
	mov	x22, x0
	mov	x0, x20
	bl	_mutex_unlock
	mov	x0, x25
	mov	x1, x23
	mov	x2, x22
	mov	w3, #1
	mov	x4, x21
	bl	___wait_seqno
	mov	x23, x0
	cbz	x21, LBB0_6
; %bb.11:
	mov	x0, x21
	bl	_timespec_valid
	cmp	w0, #0
	cset	w0, eq
	bl	_WARN_ON
	mov	x0, x21
	bl	_timespec_to_ns
	str	x0, [x19]
	b	LBB0_6
LBB0_12:
	mov	w23, #0
	b	LBB0_5
LBB0_13:
Lloh0:
	adrp	x8, _ETIME@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ETIME@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_ETIME,4,2                      ; @ETIME
.subsections_via_symbols
