	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpq	$0, (%rsi)
	je	LBB0_3
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_13
LBB0_3:
	movq	%rsi, %r15
	movl	16(%rsi), %esi
	movq	%rdx, %rdi
	callq	_i915_gem_object_lookup
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %r14
	xorl	%eax, %eax
	callq	_ktime_get
	movl	%eax, %r12d
	movq	_I915_WAIT_INTERRUPTIBLE@GOTPCREL(%rip), %rax
	movq	_I915_WAIT_PRIORITY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	orl	(%rax), %ebx
	movq	_I915_WAIT_ALL@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	8(%r15), %rdi
	callq	_to_wait_timeout
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_i915_gem_object_wait
	movq	%rax, %rbx
	cmpq	$0, 8(%r15)
	jle	LBB0_12
## %bb.6:
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	callq	_ktime_get
	movl	%eax, %edi
	movl	%r12d, %esi
	callq	_ktime_sub
	movl	%eax, %edi
	callq	_ktime_to_ns
	movq	8(%r15), %rcx
	subq	%rax, %rcx
	testq	%rcx, %rcx
	cmovgq	%rcx, %r13
	movq	%r13, 8(%r15)
	movq	_ETIME@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	addq	%rbx, %rax
	jne	LBB0_9
## %bb.7:
	movq	%r13, %rdi
	callq	_nsecs_to_jiffies
	testl	%eax, %eax
	jne	LBB0_9
## %bb.8:
	movq	$0, 8(%r15)
LBB0_9:
	movq	(%r12), %rax
	addq	%rbx, %rax
	jne	LBB0_12
## %bb.10:
	cmpq	$0, 8(%r15)
	je	LBB0_12
## %bb.11:
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subq	(%rax), %rbx
LBB0_12:
	movq	%r14, %rdi
	callq	_i915_gem_object_put
LBB0_13:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	_ENOENT@GOTPCREL(%rip), %rax
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_I915_WAIT_INTERRUPTIBLE,4,2    ## @I915_WAIT_INTERRUPTIBLE
	.comm	_I915_WAIT_PRIORITY,4,2         ## @I915_WAIT_PRIORITY
	.comm	_I915_WAIT_ALL,4,2              ## @I915_WAIT_ALL
	.comm	_ETIME,8,3                      ## @ETIME
	.comm	_EAGAIN,8,3                     ## @EAGAIN
.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:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	x8, [x1]
	cbz	x8, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_12
LBB0_3:
	mov	x20, x1
	ldr	w1, [x1, #16]
	mov	x0, x2
	bl	_i915_gem_object_lookup
	cbz	x0, LBB0_13
; %bb.4:
	mov	x19, x0
	bl	_ktime_get
	mov	x22, x0
Lloh2:
	adrp	x8, _I915_WAIT_INTERRUPTIBLE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _I915_WAIT_INTERRUPTIBLE@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _I915_WAIT_PRIORITY@GOTPAGE
Lloh6:
	ldr	x9, [x9, _I915_WAIT_PRIORITY@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh8:
	adrp	x9, _I915_WAIT_ALL@GOTPAGE
Lloh9:
	ldr	x9, [x9, _I915_WAIT_ALL@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w21, w8, w9
	ldr	x0, [x20, #8]
	bl	_to_wait_timeout
	mov	x2, x0
	mov	x0, x19
	mov	x1, x21
	bl	_i915_gem_object_wait
	mov	x21, x0
	ldr	x8, [x20, #8]
	cmp	x8, #1
	b.lt	LBB0_11
; %bb.5:
	bl	_ktime_get
	mov	x1, x22
	bl	_ktime_sub
	bl	_ktime_to_ns
	ldr	x8, [x20, #8]
	sub	x8, x8, x0
	cmp	x8, #0
	csel	x0, x8, xzr, gt
	str	x0, [x20, #8]
Lloh11:
	adrp	x22, _ETIME@GOTPAGE
Lloh12:
	ldr	x22, [x22, _ETIME@GOTPAGEOFF]
	ldr	x8, [x22]
	cmn	x21, x8
	b.ne	LBB0_8
; %bb.6:
	bl	_nsecs_to_jiffies
	cbnz	w0, LBB0_8
; %bb.7:
	str	xzr, [x20, #8]
LBB0_8:
	ldr	x8, [x22]
	cmn	x21, x8
	b.ne	LBB0_11
; %bb.9:
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_11
; %bb.10:
Lloh13:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	neg	x21, x8
LBB0_11:
	mov	x0, x19
	bl	_i915_gem_object_put
LBB0_12:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_13:
Lloh16:
	adrp	x8, _ENOENT@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
	b	LBB0_2
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_I915_WAIT_INTERRUPTIBLE,4,2    ; @I915_WAIT_INTERRUPTIBLE
	.comm	_I915_WAIT_PRIORITY,4,2         ; @I915_WAIT_PRIORITY
	.comm	_I915_WAIT_ALL,4,2              ; @I915_WAIT_ALL
	.comm	_ETIME,8,3                      ; @ETIME
	.comm	_EAGAIN,8,3                     ; @EAGAIN
.subsections_via_symbols
