	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___gen6_gt_wait_for_fifo        ## -- Begin function __gen6_gt_wait_for_fifo
	.p2align	4, 0x90
___gen6_gt_wait_for_fifo:               ## @__gen6_gt_wait_for_fifo
	.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
	movq	%rdi, %r14
	movq	(%rdi), %r12
	movq	_GT_FIFO_NUM_RESERVED_ENTRIES@GOTPCREL(%rip), %r15
	xorl	%eax, %eax
	cmpq	(%r15), %r12
	jge	LBB0_8
## %bb.1:
	movq	_GT_FIFO_FREE_ENTRIES@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	callq	_I915_READ_NOTRACE
	movq	%rax, %r12
	movq	(%r15), %rax
	cmpq	%rax, %r12
	jle	LBB0_5
## %bb.2:
	movl	$500, %ebx                      ## imm = 0x1F4
	jmp	LBB0_7
LBB0_5:
	movl	$499, %ebx                      ## imm = 0x1F3
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	$10, %edi
	callq	_udelay
	movl	(%r13), %edi
	callq	_I915_READ_NOTRACE
	movq	%rax, %r12
	movq	(%r15), %rax
	cmpq	%rax, %r12
	jg	LBB0_7
## %bb.3:                               ##   in Loop: Header=BB0_6 Depth=1
	addl	$-1, %ebx
	jb	LBB0_6
## %bb.4:
	movl	$-1, %ebx
LBB0_7:
	testl	%ebx, %ebx
	sets	%cl
	cmpq	%rax, %r12
	setle	%al
	andb	%cl, %al
	movzbl	%al, %edi
	callq	_WARN_ON
	movq	%rax, %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	setne	%al
LBB0_8:
	decq	%r12
	movq	%r12, (%r14)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GT_FIFO_NUM_RESERVED_ENTRIES,8,3 ## @GT_FIFO_NUM_RESERVED_ENTRIES
	.comm	_GT_FIFO_FREE_ENTRIES,4,2       ## @GT_FIFO_FREE_ENTRIES
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___gen6_gt_wait_for_fifo        ; -- Begin function __gen6_gt_wait_for_fifo
	.p2align	2
___gen6_gt_wait_for_fifo:               ; @__gen6_gt_wait_for_fifo
	.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	x19, x0
	ldr	x20, [x0]
Lloh0:
	adrp	x22, _GT_FIFO_NUM_RESERVED_ENTRIES@GOTPAGE
Lloh1:
	ldr	x22, [x22, _GT_FIFO_NUM_RESERVED_ENTRIES@GOTPAGEOFF]
	ldr	x8, [x22]
	cmp	x20, x8
	b.ge	LBB0_3
; %bb.1:
Lloh2:
	adrp	x23, _GT_FIFO_FREE_ENTRIES@GOTPAGE
Lloh3:
	ldr	x23, [x23, _GT_FIFO_FREE_ENTRIES@GOTPAGEOFF]
	ldr	w0, [x23]
	bl	_I915_READ_NOTRACE
	ldr	x8, [x22]
	cmp	x0, x8
	b.le	LBB0_4
; %bb.2:
	mov	x20, x0
	mov	w21, #500
	b	LBB0_7
LBB0_3:
	mov	w0, #0
	b	LBB0_8
LBB0_4:
	mov	w21, #499
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #10
	bl	_udelay
	ldr	w0, [x23]
	bl	_I915_READ_NOTRACE
	mov	x20, x0
	ldr	x8, [x22]
	cmp	x0, x8
	b.gt	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	sub	w21, w21, #1
	cmn	w21, #1
	b.ne	LBB0_5
LBB0_7:
	cmp	w21, #0
	ccmp	x20, x8, #0, lt
	cset	w0, le
	bl	_WARN_ON
	cmp	x0, #0
	cset	w0, ne
LBB0_8:
	sub	x8, x20, #1
	str	x8, [x19]
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_GT_FIFO_NUM_RESERVED_ENTRIES,8,3 ; @GT_FIFO_NUM_RESERVED_ENTRIES
	.comm	_GT_FIFO_FREE_ENTRIES,4,2       ; @GT_FIFO_FREE_ENTRIES
.subsections_via_symbols
