	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function igt_request_rewind
_igt_request_rewind:                    ## @igt_request_rewind
	.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	%rdi, %r12
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	callq	_mutex_lock
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	callq	_mock_context
	movq	_RCS0@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%rax, %rdi
	callq	_i915_gem_context_get_engine
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	movl	%eax, %edi
	callq	_GEM_BUG_ON
	movq	_HZ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	addl	%esi, %esi
	movq	%rbx, %rdi
	callq	_mock_request
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_intel_context_put
	testq	%r15, %r15
	je	LBB0_1
## %bb.2:
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	movq	%r15, %rdi
	callq	_i915_request_get
	movq	%r15, %rdi
	callq	_i915_request_add
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	callq	_mock_context
	movq	_RCS0@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	%rax, %rdi
	callq	_i915_gem_context_get_engine
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	movl	%eax, %edi
	callq	_GEM_BUG_ON
	xorl	%r14d, %r14d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_mock_request
	movq	%rax, %r13
	movq	%rbx, %rdi
	callq	_intel_context_put
	testq	%r13, %r13
	je	LBB0_3
## %bb.4:
	movq	%r15, %rdi
	callq	_mock_cancel_request
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	movq	%r13, %rdi
	callq	_i915_request_get
	movq	%r13, %rdi
	callq	_i915_request_add
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_rcu_read_lock
	movq	(%r15), %rax
	movq	%r15, %rdi
	callq	*(%rax)
	xorl	%eax, %eax
	callq	_rcu_read_unlock
	movq	%r12, %rdi
	callq	_mutex_unlock
	movq	_HZ@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_i915_request_wait
	movq	_ETIME@GOTPCREL(%rip), %rcx
	addl	(%rcx), %eax
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	jne	LBB0_8
## %bb.7:
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_10
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r13d
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_13
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	movl	%r14d, %r13d
	jmp	LBB0_12
LBB0_5:
	leaq	L_.str.2(%rip), %rdi
	callq	_pr_err
	movq	%r13, %rdi
	callq	_i915_request_add
	movl	-44(%rbp), %r13d                ## 4-byte Reload
	jmp	LBB0_12
LBB0_8:
	movq	%r15, %rdi
	callq	_i915_request_completed
	testq	%rax, %rax
	je	LBB0_11
## %bb.9:
	leaq	L_.str.4(%rip), %rdi
LBB0_10:
	callq	_pr_err
	movl	%r14d, %ebx
LBB0_11:
	movq	%r13, %rdi
	callq	_i915_request_put
	movq	%r12, %rdi
	callq	_mutex_lock
	movl	%ebx, %r13d
LBB0_12:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_mock_context_close
	movq	%r15, %rdi
	callq	_i915_request_put
LBB0_13:
	movq	%rbx, %rdi
	callq	_mock_context_close
	movq	%r12, %rdi
	callq	_mock_device_flush
	movq	%r12, %rdi
	callq	_mutex_unlock
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"A"

	.comm	_RCS0,4,2                       ## @RCS0
	.comm	_HZ,4,2                         ## @HZ
	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"B"

L_.str.2:                               ## @.str.2
	.asciz	"failed to cancel request (already executed)!\n"

	.comm	_ETIME,4,2                      ## @ETIME
L_.str.3:                               ## @.str.3
	.asciz	"timed out waiting for high priority request\n"

L_.str.4:                               ## @.str.4
	.asciz	"low priority request already completed\n"

	.no_dead_strip	_igt_request_rewind
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function igt_request_rewind
_igt_request_rewind:                    ; @igt_request_rewind
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x19, x0
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w26, [x8]
	bl	_mutex_lock
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_mock_context
	mov	x20, x0
Lloh5:
	adrp	x23, _RCS0@GOTPAGE
Lloh6:
	ldr	x23, [x23, _RCS0@GOTPAGEOFF]
	ldr	w1, [x23]
	bl	_i915_gem_context_get_engine
	mov	x22, x0
	bl	_IS_ERR
	bl	_GEM_BUG_ON
Lloh7:
	adrp	x25, _HZ@GOTPAGE
Lloh8:
	ldr	x25, [x25, _HZ@GOTPAGEOFF]
	ldr	w8, [x25]
	lsl	w1, w8, #1
	mov	x0, x22
	bl	_mock_request
	mov	x21, x0
	mov	x0, x22
	bl	_intel_context_put
	cbz	x21, LBB0_5
; %bb.1:
	mov	x0, x21
	bl	_i915_request_get
	mov	x0, x21
	bl	_i915_request_add
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_mock_context
	mov	x22, x0
	ldr	w1, [x23]
	bl	_i915_gem_context_get_engine
	mov	x23, x0
	bl	_IS_ERR
	bl	_GEM_BUG_ON
	mov	x0, x23
	mov	w1, #0
	bl	_mock_request
	mov	x24, x0
	mov	x0, x23
	bl	_intel_context_put
	cbz	x24, LBB0_6
; %bb.2:
	neg	w23, w26
	mov	x0, x21
	bl	_mock_cancel_request
	cbz	w0, LBB0_7
; %bb.3:
	mov	x0, x24
	bl	_i915_request_get
	mov	x0, x24
	bl	_i915_request_add
	bl	_rcu_read_lock
	ldr	x8, [x21]
	ldr	x8, [x8]
	mov	x0, x21
	blr	x8
	bl	_rcu_read_unlock
	mov	x0, x19
	bl	_mutex_unlock
	ldr	w2, [x25]
	mov	x0, x24
	mov	w1, #0
	bl	_i915_request_wait
Lloh11:
	adrp	x8, _ETIME@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ETIME@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	cmn	w0, w8
	b.ne	LBB0_8
; %bb.4:
Lloh14:
	adrp	x0, l_.str.3@PAGE
Lloh15:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_10
LBB0_5:
Lloh16:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_14
LBB0_6:
Lloh19:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_13
LBB0_7:
Lloh22:
	adrp	x0, l_.str.2@PAGE
Lloh23:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_err
	mov	x0, x24
	bl	_i915_request_add
	b	LBB0_13
LBB0_8:
	mov	x0, x21
	bl	_i915_request_completed
	cbz	x0, LBB0_11
; %bb.9:
Lloh24:
	adrp	x0, l_.str.4@PAGE
Lloh25:
	add	x0, x0, l_.str.4@PAGEOFF
LBB0_10:
	bl	_pr_err
	b	LBB0_12
LBB0_11:
	mov	w23, #0
LBB0_12:
	mov	x0, x24
	bl	_i915_request_put
	mov	x0, x19
	bl	_mutex_lock
LBB0_13:
	mov	x0, x22
	bl	_mock_context_close
	mov	x0, x21
	bl	_i915_request_put
LBB0_14:
	mov	x0, x20
	bl	_mock_context_close
	mov	x0, x19
	bl	_mock_device_flush
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x23
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"A"

	.comm	_RCS0,4,2                       ; @RCS0
	.comm	_HZ,4,2                         ; @HZ
	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"B"

l_.str.2:                               ; @.str.2
	.asciz	"failed to cancel request (already executed)!\n"

	.comm	_ETIME,4,2                      ; @ETIME
l_.str.3:                               ; @.str.3
	.asciz	"timed out waiting for high priority request\n"

l_.str.4:                               ; @.str.4
	.asciz	"low priority request already completed\n"

	.no_dead_strip	_igt_request_rewind
.subsections_via_symbols
