	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_set_power_well           ## -- Begin function intel_set_power_well
	.p2align	4, 0x90
_intel_set_power_well:                  ## @intel_set_power_well
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	callq	_IS_HASWELL
	testl	%eax, %eax
	je	LBB0_9
## %bb.1:
	movq	_i915_disable_power_well@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%ebx, %eax
	je	LBB0_9
## %bb.2:
	movq	_HSW_PWR_WELL_DRIVER@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_I915_READ
	movl	%eax, %r14d
	movq	_HSW_PWR_WELL_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	testl	%ebx, %ebx
	je	LBB0_8
## %bb.3:
	movq	_HSW_PWR_WELL_STATE@GOTPCREL(%rip), %r12
	movl	(%r12), %ebx
	testl	%r14d, %esi
	je	LBB0_4
## %bb.5:
	testl	%r14d, %ebx
	jne	LBB0_9
	jmp	LBB0_6
LBB0_8:
	testl	%r14d, %esi
	je	LBB0_9
## %bb.10:
	movl	(%r15), %edi
	xorl	%esi, %esi
	callq	_I915_WRITE
	leaq	L_.str.2(%rip), %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_DRM_DEBUG_KMS                  ## TAILCALL
LBB0_4:
	movl	(%r15), %edi
	callq	_I915_WRITE
	testl	%r14d, %ebx
	jne	LBB0_9
LBB0_6:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_DEBUG_KMS
	movl	(%r15), %edi
	callq	_I915_READ
	andl	(%r12), %eax
	movl	%eax, %edi
	movl	$20, %esi
	callq	_wait_for
	testq	%rax, %rax
	je	LBB0_9
## %bb.7:
	leaq	L_.str.1(%rip), %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_DRM_ERROR                      ## TAILCALL
LBB0_9:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_i915_disable_power_well,4,2    ## @i915_disable_power_well
	.comm	_HSW_PWR_WELL_DRIVER,4,2        ## @HSW_PWR_WELL_DRIVER
	.comm	_HSW_PWR_WELL_STATE,4,2         ## @HSW_PWR_WELL_STATE
	.comm	_HSW_PWR_WELL_ENABLE,4,2        ## @HSW_PWR_WELL_ENABLE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Enabling power well\n"

L_.str.1:                               ## @.str.1
	.asciz	"Timeout enabling power well\n"

L_.str.2:                               ## @.str.2
	.asciz	"Requesting to disable the power well\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_set_power_well           ; -- Begin function intel_set_power_well
	.p2align	2
_intel_set_power_well:                  ; @intel_set_power_well
	.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	x19, x1
	bl	_IS_HASWELL
	cbz	w0, LBB0_10
; %bb.1:
Lloh0:
	adrp	x8, _i915_disable_power_well@GOTPAGE
Lloh1:
	ldr	x8, [x8, _i915_disable_power_well@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	orr	w8, w8, w19
	cbz	w8, LBB0_10
; %bb.2:
Lloh3:
	adrp	x20, _HSW_PWR_WELL_DRIVER@GOTPAGE
Lloh4:
	ldr	x20, [x20, _HSW_PWR_WELL_DRIVER@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_I915_READ
Lloh5:
	adrp	x8, _HSW_PWR_WELL_ENABLE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _HSW_PWR_WELL_ENABLE@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	and	w8, w1, w0
	cbz	w19, LBB0_5
; %bb.3:
Lloh8:
	adrp	x19, _HSW_PWR_WELL_STATE@GOTPAGE
Lloh9:
	ldr	x19, [x19, _HSW_PWR_WELL_STATE@GOTPAGEOFF]
	ldr	w9, [x19]
	and	w21, w9, w0
	cbz	w8, LBB0_7
; %bb.4:
	cbnz	w21, LBB0_10
	b	LBB0_8
LBB0_5:
	cbz	w8, LBB0_10
; %bb.6:
	ldr	w0, [x20]
	mov	w1, #0
	bl	_I915_WRITE
Lloh10:
	adrp	x0, l_.str.2@PAGE
Lloh11:
	add	x0, x0, l_.str.2@PAGEOFF
	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	_DRM_DEBUG_KMS
LBB0_7:
	ldr	w0, [x20]
	bl	_I915_WRITE
	cbnz	w21, LBB0_10
LBB0_8:
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG_KMS
	ldr	w0, [x20]
	bl	_I915_READ
	ldr	w8, [x19]
	and	w0, w8, w0
	mov	w1, #20
	bl	_wait_for
	cbz	x0, LBB0_10
; %bb.9:
Lloh14:
	adrp	x0, l_.str.1@PAGE
Lloh15:
	add	x0, x0, l_.str.1@PAGEOFF
	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	_DRM_ERROR
LBB0_10:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_i915_disable_power_well,4,2    ; @i915_disable_power_well
	.comm	_HSW_PWR_WELL_DRIVER,4,2        ; @HSW_PWR_WELL_DRIVER
	.comm	_HSW_PWR_WELL_STATE,4,2         ; @HSW_PWR_WELL_STATE
	.comm	_HSW_PWR_WELL_ENABLE,4,2        ; @HSW_PWR_WELL_ENABLE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Enabling power well\n"

l_.str.1:                               ; @.str.1
	.asciz	"Timeout enabling power well\n"

l_.str.2:                               ; @.str.2
	.asciz	"Requesting to disable the power well\n"

.subsections_via_symbols
