	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i915_do_reset
_i915_do_reset:                         ## @i915_do_reset
	.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), %rax
	movq	(%rax), %rbx
	movq	_I915_GDRST@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	_GRDOM_RESET_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_pci_write_config_byte
	movl	$50, %edi
	callq	_udelay
	movq	%rbx, %rdi
	callq	_i915_in_reset
	movl	%eax, %edi
	movl	$50, %esi
	callq	_wait_for_atomic
	movl	%eax, %r14d
	movl	(%r15), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_pci_write_config_byte
	movl	$50, %edi
	callq	_udelay
	testl	%r14d, %r14d
	je	LBB0_2
## %bb.1:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	%rbx, %rdi
	callq	_i915_in_reset
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	movl	$50, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_wait_for_atomic                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_I915_GDRST,4,2                 ## @I915_GDRST
	.comm	_GRDOM_RESET_ENABLE,4,2         ## @GRDOM_RESET_ENABLE
	.no_dead_strip	_i915_do_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i915_do_reset
_i915_do_reset:                         ; @i915_do_reset
	.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
	ldr	x8, [x0]
	ldr	x19, [x8]
Lloh0:
	adrp	x21, _I915_GDRST@GOTPAGE
Lloh1:
	ldr	x21, [x21, _I915_GDRST@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh2:
	adrp	x8, _GRDOM_RESET_ENABLE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GRDOM_RESET_ENABLE@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_pci_write_config_byte
	mov	w0, #50
	bl	_udelay
	mov	x0, x19
	bl	_i915_in_reset
	mov	w1, #50
	bl	_wait_for_atomic
	mov	x20, x0
	ldr	w1, [x21]
	mov	x0, x19
	mov	w2, #0
	bl	_pci_write_config_byte
	mov	w0, #50
	bl	_udelay
	cbz	w20, LBB0_2
; %bb.1:
	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
	ret
LBB0_2:
	mov	x0, x19
	bl	_i915_in_reset
	cmp	w0, #0
	cset	w0, eq
	mov	w1, #50
	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	_wait_for_atomic
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_I915_GDRST,4,2                 ; @I915_GDRST
	.comm	_GRDOM_RESET_ENABLE,4,2         ; @GRDOM_RESET_ENABLE
	.no_dead_strip	_i915_do_reset
.subsections_via_symbols
