	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i915_wait_irq
_i915_wait_irq:                         ## @i915_wait_irq
	.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
	movl	%esi, %ebx
	movq	(%rdi), %rax
	movq	8(%rdi), %r14
	movq	(%rax), %rax
	movq	(%rax), %r12
	movq	%r14, %rdi
	callq	_LP_RING
	movq	%rax, %r15
	movq	%r14, %rdi
	callq	_READ_BREADCRUMB
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_DRM_DEBUG_DRIVER
	movq	%r14, %rdi
	callq	_READ_BREADCRUMB
	movq	(%r12), %rcx
	cmpl	%ebx, %eax
	jge	LBB0_1
## %bb.3:
	testq	%rcx, %rcx
	je	LBB0_5
## %bb.4:
	movq	_I915_BOX_WAIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 4(%rcx)
LBB0_5:
	movq	%r15, %rdi
	callq	*16(%r15)
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movl	8(%r15), %r12d
	movq	_DRM_HZ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leal	(%rax,%rax,2), %r13d
	movq	%r14, %rdi
	callq	_READ_BREADCRUMB
	xorl	%ecx, %ecx
	cmpl	%ebx, %eax
	setge	%cl
	xorl	%ebx, %ebx
	xorl	%edi, %edi
	movl	%r12d, %esi
	movl	%r13d, %edx
	callq	_DRM_WAIT_ON
	movq	%r15, %rdi
	callq	*(%r15)
	jmp	LBB0_10
LBB0_1:
	xorl	%ebx, %ebx
	testq	%rcx, %rcx
	je	LBB0_12
## %bb.2:
	movq	%r14, %rdi
	callq	_READ_BREADCRUMB
	movq	(%r12), %rcx
	movl	%eax, (%rcx)
	jmp	LBB0_12
LBB0_7:
	movq	%r14, %rdi
	callq	_READ_BREADCRUMB
	xorl	%edi, %edi
	cmpl	%ebx, %eax
	setge	%dil
	movl	$3000, %esi                     ## imm = 0xBB8
	callq	_wait_for
	testq	%rax, %rax
	je	LBB0_8
## %bb.9:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_10
LBB0_8:
	xorl	%ebx, %ebx
LBB0_10:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%ebx, %eax
	jne	LBB0_12
## %bb.11:
	movq	%r14, %rdi
	callq	_READ_BREADCRUMB
	movl	(%r14), %edx
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	callq	_DRM_ERROR
LBB0_12:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"irq_nr=%d breadcrumb=%d\n"

	.comm	_I915_BOX_WAIT,4,2              ## @I915_BOX_WAIT
	.comm	_DRM_HZ,4,2                     ## @DRM_HZ
	.comm	_EBUSY,4,2                      ## @EBUSY
L_.str.1:                               ## @.str.1
	.asciz	"EBUSY -- rec: %d emitted: %d\n"

	.no_dead_strip	_i915_wait_irq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i915_wait_irq
_i915_wait_irq:                         ; @i915_wait_irq
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x1
	ldp	x8, x19, [x0]
	ldr	x8, [x8]
	ldr	x22, [x8]
	mov	x0, x19
	bl	_LP_RING
	mov	x21, x0
	mov	x0, x19
	bl	_READ_BREADCRUMB
	mov	x2, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_DRM_DEBUG_DRIVER
	mov	x0, x19
	bl	_READ_BREADCRUMB
	ldr	x8, [x22]
	cmp	w0, w20
	b.ge	LBB0_6
; %bb.1:
	cbz	x8, LBB0_3
; %bb.2:
Lloh2:
	adrp	x9, _I915_BOX_WAIT@GOTPAGE
Lloh3:
	ldr	x9, [x9, _I915_BOX_WAIT@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	ldr	w10, [x8, #4]
	orr	w9, w10, w9
	str	w9, [x8, #4]
LBB0_3:
	ldr	x8, [x21, #16]
	mov	x0, x21
	blr	x8
Lloh5:
	adrp	x24, _EBUSY@GOTPAGE
Lloh6:
	ldr	x24, [x24, _EBUSY@GOTPAGEOFF]
	cbz	x0, LBB0_8
; %bb.4:
	ldr	w22, [x21, #8]
Lloh7:
	adrp	x8, _DRM_HZ@GOTPAGE
Lloh8:
	ldr	x8, [x8, _DRM_HZ@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	add	w23, w8, w8, lsl #1
	mov	x0, x19
	bl	_READ_BREADCRUMB
	cmp	w0, w20
	cset	w3, ge
	mov	w0, #0
	mov	x1, x22
	mov	x2, x23
	bl	_DRM_WAIT_ON
	ldr	x8, [x21]
	mov	x0, x21
	blr	x8
LBB0_5:
	mov	w20, #0
	b	LBB0_10
LBB0_6:
	cbz	x8, LBB0_12
; %bb.7:
	mov	x0, x19
	bl	_READ_BREADCRUMB
	mov	w20, #0
	ldr	x8, [x22]
	str	w0, [x8]
	b	LBB0_13
LBB0_8:
	mov	x0, x19
	bl	_READ_BREADCRUMB
	cmp	w0, w20
	cset	w0, ge
	mov	w1, #3000
	bl	_wait_for
	cbz	x0, LBB0_5
; %bb.9:
	ldr	w8, [x24]
	neg	w20, w8
LBB0_10:
	ldr	w8, [x24]
	cmn	w20, w8
	b.ne	LBB0_13
; %bb.11:
	mov	x0, x19
	bl	_READ_BREADCRUMB
	mov	x1, x0
	ldr	w2, [x19]
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_ERROR
	b	LBB0_13
LBB0_12:
	mov	w20, #0
LBB0_13:
	mov	x0, x20
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"irq_nr=%d breadcrumb=%d\n"

	.comm	_I915_BOX_WAIT,4,2              ; @I915_BOX_WAIT
	.comm	_DRM_HZ,4,2                     ; @DRM_HZ
	.comm	_EBUSY,4,2                      ; @EBUSY
l_.str.1:                               ; @.str.1
	.asciz	"EBUSY -- rec: %d emitted: %d\n"

	.no_dead_strip	_i915_wait_irq
.subsections_via_symbols
