	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hsw_disable_ips                ## -- Begin function hsw_disable_ips
	.p2align	4, 0x90
_hsw_disable_ips:                       ## @hsw_disable_ips
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movl	4(%rdi), %edi
	callq	_to_intel_crtc
	movq	%rax, %r14
	movq	8(%rax), %rdi
	callq	_to_i915
	cmpl	$0, (%rbx)
	je	LBB0_6
## %bb.1:
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_IS_BROADWELL
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movq	_DISPLAY_IPS_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_sandybridge_pcode_write
	movl	%eax, %edi
	callq	_WARN_ON
	movq	_IPS_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_IPS_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	$100, %ecx
	callq	_intel_de_wait_for_clear
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
	jmp	LBB0_5
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	_IPS_CTL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	xorl	%esi, %esi
	callq	_I915_WRITE
	movl	(%rbx), %edi
	callq	_POSTING_READ
LBB0_5:
	movl	(%r14), %esi
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_intel_wait_for_vblank          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_DISPLAY_IPS_CONTROL,4,2        ## @DISPLAY_IPS_CONTROL
	.comm	_IPS_CTL,4,2                    ## @IPS_CTL
	.comm	_IPS_ENABLE,4,2                 ## @IPS_ENABLE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Timed out waiting for IPS disable\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hsw_disable_ips                ; -- Begin function hsw_disable_ips
	.p2align	2
_hsw_disable_ips:                       ; @hsw_disable_ips
	.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
	mov	x21, x0
	ldr	w0, [x0, #4]
	bl	_to_intel_crtc
	mov	x19, x0
	ldr	x0, [x0, #8]
	bl	_to_i915
	ldr	w8, [x21]
	cbz	w8, LBB0_4
; %bb.1:
	mov	x20, x0
	bl	_IS_BROADWELL
	cbz	x0, LBB0_5
; %bb.2:
Lloh0:
	adrp	x8, _DISPLAY_IPS_CONTROL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DISPLAY_IPS_CONTROL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #0
	bl	_sandybridge_pcode_write
	bl	_WARN_ON
Lloh3:
	adrp	x8, _IPS_CTL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IPS_CTL@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _IPS_ENABLE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IPS_ENABLE@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x0, x20
	mov	w3, #100
	bl	_intel_de_wait_for_clear
	cbz	x0, LBB0_6
; %bb.3:
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
	b	LBB0_6
LBB0_4:
	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_5:
Lloh11:
	adrp	x21, _IPS_CTL@GOTPAGE
Lloh12:
	ldr	x21, [x21, _IPS_CTL@GOTPAGEOFF]
	ldr	w0, [x21]
	mov	w1, #0
	bl	_I915_WRITE
	ldr	w0, [x21]
	bl	_POSTING_READ
LBB0_6:
	ldr	w1, [x19]
	mov	x0, x20
	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
	b	_intel_wait_for_vblank
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_DISPLAY_IPS_CONTROL,4,2        ; @DISPLAY_IPS_CONTROL
	.comm	_IPS_CTL,4,2                    ; @IPS_CTL
	.comm	_IPS_ENABLE,4,2                 ; @IPS_ENABLE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Timed out waiting for IPS disable\n"

.subsections_via_symbols
