	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __gen6_gt_wait_for_thread_c0
___gen6_gt_wait_for_thread_c0:          ## @__gen6_gt_wait_for_thread_c0
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movl	(%rdi), %edi
	callq	_IS_HASWELL
	testq	%rax, %rax
	jne	LBB0_1
## %bb.2:
	movq	_GEN6_GT_THREAD_STATUS_CORE_MASK@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_GEN6_GT_THREAD_STATUS_CORE_MASK_HSW@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %ebx
	movq	_GEN6_GT_THREAD_STATUS_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_I915_READ_NOTRACE
	xorl	%edi, %edi
	testl	%ebx, %eax
	sete	%dil
	movl	$500, %esi                      ## imm = 0x1F4
	callq	_wait_for_atomic_us
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	leaq	L_.str(%rip), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_DRM_ERROR                      ## TAILCALL
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GEN6_GT_THREAD_STATUS_CORE_MASK_HSW,4,2 ## @GEN6_GT_THREAD_STATUS_CORE_MASK_HSW
	.comm	_GEN6_GT_THREAD_STATUS_CORE_MASK,4,2 ## @GEN6_GT_THREAD_STATUS_CORE_MASK
	.comm	_GEN6_GT_THREAD_STATUS_REG,4,2  ## @GEN6_GT_THREAD_STATUS_REG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"GT thread status wait timed out\n"

	.no_dead_strip	___gen6_gt_wait_for_thread_c0
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __gen6_gt_wait_for_thread_c0
___gen6_gt_wait_for_thread_c0:          ; @__gen6_gt_wait_for_thread_c0
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	w0, [x0]
	bl	_IS_HASWELL
Lloh0:
	adrp	x8, _GEN6_GT_THREAD_STATUS_CORE_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GEN6_GT_THREAD_STATUS_CORE_MASK@GOTPAGEOFF]
Lloh2:
	adrp	x9, _GEN6_GT_THREAD_STATUS_CORE_MASK_HSW@GOTPAGE
Lloh3:
	ldr	x9, [x9, _GEN6_GT_THREAD_STATUS_CORE_MASK_HSW@GOTPAGEOFF]
	cmp	x0, #0
	csel	x8, x8, x9, eq
	ldr	w19, [x8]
Lloh4:
	adrp	x8, _GEN6_GT_THREAD_STATUS_REG@GOTPAGE
Lloh5:
	ldr	x8, [x8, _GEN6_GT_THREAD_STATUS_REG@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
	bl	_I915_READ_NOTRACE
	tst	w0, w19
	cset	w0, eq
	mov	w1, #500
	bl	_wait_for_atomic_us
	cbz	x0, LBB0_2
; %bb.1:
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_DRM_ERROR
LBB0_2:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_GEN6_GT_THREAD_STATUS_CORE_MASK_HSW,4,2 ; @GEN6_GT_THREAD_STATUS_CORE_MASK_HSW
	.comm	_GEN6_GT_THREAD_STATUS_CORE_MASK,4,2 ; @GEN6_GT_THREAD_STATUS_CORE_MASK
	.comm	_GEN6_GT_THREAD_STATUS_REG,4,2  ; @GEN6_GT_THREAD_STATUS_REG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"GT thread status wait timed out\n"

	.no_dead_strip	___gen6_gt_wait_for_thread_c0
.subsections_via_symbols
