	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lpc_ich_init_wdt
_lpc_ich_init_wdt:                      ## @lpc_ich_init_wdt
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_pci_get_drvdata
	movq	%rax, %r15
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_acpi_has_watchdog
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_16
LBB0_2:
	movl	8(%r15), %esi
	leaq	-28(%rbp), %rdx
	movq	%r14, %rdi
	callq	_pci_read_config_dword
	movl	-28(%rbp), %ebx
	andq	$65408, %rbx                    ## imm = 0xFF80
	je	LBB0_3
## %bb.5:
	movq	_ICH_RES_IO_TCO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_wdt_io_res
	movq	_ACPIBASE_TCO_OFF@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	addq	%rbx, %rcx
	movq	%rcx, 8(%rax)
	movq	_ACPIBASE_TCO_END@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	addq	%rbx, %rcx
	movq	%rcx, (%rax)
	movq	_ICH_RES_IO_SMI@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_wdt_io_res
	movq	_ACPIBASE_SMI_OFF@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	addq	%rbx, %rcx
	movq	%rcx, 8(%rax)
	movq	_ACPIBASE_SMI_END@GOTPCREL(%rip), %rcx
	addq	(%rcx), %rbx
	movq	%rbx, (%rax)
	movq	%r14, %rdi
	callq	_lpc_ich_enable_acpi_space
	movq	_lpc_chipset_info@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%r15), %rcx
	movl	(%rax,%rcx,4), %eax
	cmpl	$3, %eax
	je	LBB0_12
## %bb.6:
	cmpl	$2, %eax
	je	LBB0_9
## %bb.7:
	cmpl	$1, %eax
	jne	LBB0_14
## %bb.8:
	movq	_lpc_ich_wdt_cell@GOTPCREL(%rip), %rax
	decl	(%rax)
	jmp	LBB0_14
LBB0_3:
	leaq	L_.str(%rip), %rsi
LBB0_4:
	movq	%r14, %rdi
	callq	_dev_notice
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_16
LBB0_12:
	movq	%r14, %rdi
	callq	_lpc_ich_enable_pmc_space
	movq	_ACPICTRL_PMCBASE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-28(%rbp), %rdx
	movq	%r14, %rdi
	callq	_pci_read_config_dword
	movslq	-28(%rbp), %rbx
	andq	$-512, %rbx                     ## imm = 0xFE00
	movq	_ICH_RES_MEM_GCS_PMC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_wdt_mem_res
	movq	_ACPIBASE_PMC_OFF@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	addq	%rbx, %rcx
	movq	%rcx, 8(%rax)
	movq	_ACPIBASE_PMC_END@GOTPCREL(%rip), %rcx
	jmp	LBB0_13
LBB0_9:
	movq	_RCBABASE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-28(%rbp), %rdx
	movq	%r14, %rdi
	callq	_pci_read_config_dword
	movslq	-28(%rbp), %rbx
	testb	$1, %bl
	jne	LBB0_11
## %bb.10:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_4
LBB0_11:
	andq	$-16384, %rbx                   ## imm = 0xC000
	movq	_ICH_RES_MEM_GCS_PMC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_wdt_mem_res
	movq	_ACPIBASE_GCS_OFF@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	addq	%rbx, %rcx
	movq	%rcx, 8(%rax)
	movq	_ACPIBASE_GCS_END@GOTPCREL(%rip), %rcx
LBB0_13:
	addq	(%rcx), %rbx
	movq	%rbx, (%rax)
LBB0_14:
	movq	%r14, %rdi
	callq	_lpc_ich_finalize_wdt_cell
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_16
## %bb.15:
	movq	_PLATFORM_DEVID_AUTO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	$0, (%rsp)
	movq	_lpc_ich_wdt_cell@GOTPCREL(%rip), %rdx
	movq	%r14, %rdi
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_mfd_add_devices
	movl	%eax, %ebx
LBB0_16:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"I/O space for ACPI uninitialized\n"

	.comm	_ICH_RES_IO_TCO,4,2             ## @ICH_RES_IO_TCO
	.comm	_ACPIBASE_TCO_OFF,8,3           ## @ACPIBASE_TCO_OFF
	.comm	_ACPIBASE_TCO_END,8,3           ## @ACPIBASE_TCO_END
	.comm	_ICH_RES_IO_SMI,4,2             ## @ICH_RES_IO_SMI
	.comm	_ACPIBASE_SMI_OFF,8,3           ## @ACPIBASE_SMI_OFF
	.comm	_ACPIBASE_SMI_END,8,3           ## @ACPIBASE_SMI_END
	.comm	_lpc_chipset_info,8,3           ## @lpc_chipset_info
	.comm	_lpc_ich_wdt_cell,4,2           ## @lpc_ich_wdt_cell
	.comm	_RCBABASE,4,2                   ## @RCBABASE
L_.str.1:                               ## @.str.1
	.asciz	"RCBA is disabled by hardware/BIOS, device disabled\n"

	.comm	_ICH_RES_MEM_GCS_PMC,4,2        ## @ICH_RES_MEM_GCS_PMC
	.comm	_ACPIBASE_GCS_OFF,8,3           ## @ACPIBASE_GCS_OFF
	.comm	_ACPIBASE_GCS_END,8,3           ## @ACPIBASE_GCS_END
	.comm	_ACPICTRL_PMCBASE,4,2           ## @ACPICTRL_PMCBASE
	.comm	_ACPIBASE_PMC_OFF,8,3           ## @ACPIBASE_PMC_OFF
	.comm	_ACPIBASE_PMC_END,8,3           ## @ACPIBASE_PMC_END
	.comm	_PLATFORM_DEVID_AUTO,4,2        ## @PLATFORM_DEVID_AUTO
	.no_dead_strip	_lpc_ich_init_wdt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lpc_ich_init_wdt
_lpc_ich_init_wdt:                      ; @lpc_ich_init_wdt
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	bl	_pci_get_drvdata
	mov	x20, x0
	bl	_acpi_has_watchdog
	cbnz	x0, LBB0_8
; %bb.1:
	ldr	w1, [x20, #8]
	add	x2, sp, #12
	mov	x0, x19
	bl	_pci_read_config_dword
	ldr	w8, [sp, #12]
	and	x21, x8, #0xff80
	cbz	w21, LBB0_6
; %bb.2:
Lloh0:
	adrp	x8, _ICH_RES_IO_TCO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ICH_RES_IO_TCO@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_wdt_io_res
Lloh3:
	adrp	x8, _ACPIBASE_TCO_OFF@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ACPIBASE_TCO_OFF@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	add	x8, x8, x21
Lloh6:
	adrp	x9, _ACPIBASE_TCO_END@GOTPAGE
Lloh7:
	ldr	x9, [x9, _ACPIBASE_TCO_END@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	add	x9, x9, x21
	stp	x9, x8, [x0]
Lloh9:
	adrp	x8, _ICH_RES_IO_SMI@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ICH_RES_IO_SMI@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	bl	_wdt_io_res
Lloh12:
	adrp	x8, _ACPIBASE_SMI_OFF@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ACPIBASE_SMI_OFF@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	add	x8, x8, x21
Lloh15:
	adrp	x9, _ACPIBASE_SMI_END@GOTPAGE
Lloh16:
	ldr	x9, [x9, _ACPIBASE_SMI_END@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	add	x9, x9, x21
	stp	x9, x8, [x0]
	mov	x0, x19
	bl	_lpc_ich_enable_acpi_space
Lloh18:
	adrp	x8, _lpc_chipset_info@GOTPAGE
Lloh19:
	ldr	x8, [x8, _lpc_chipset_info@GOTPAGEOFF]
Lloh20:
	ldr	x8, [x8]
	ldr	x9, [x20]
	ldr	w8, [x8, x9, lsl #2]
	cmp	w8, #3
	b.eq	LBB0_10
; %bb.3:
	cmp	w8, #2
	b.eq	LBB0_11
; %bb.4:
	cmp	w8, #1
	b.ne	LBB0_15
; %bb.5:
Lloh21:
	adrp	x8, _lpc_ich_wdt_cell@GOTPAGE
Lloh22:
	ldr	x8, [x8, _lpc_ich_wdt_cell@GOTPAGEOFF]
	ldr	w9, [x8]
	sub	w9, w9, #1
	str	w9, [x8]
	b	LBB0_15
LBB0_6:
Lloh23:
	adrp	x1, l_.str@PAGE
Lloh24:
	add	x1, x1, l_.str@PAGEOFF
LBB0_7:
	mov	x0, x19
	bl	_dev_notice
LBB0_8:
Lloh25:
	adrp	x8, _ENODEV@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	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
	add	sp, sp, #64
	ret
LBB0_10:
	mov	x0, x19
	bl	_lpc_ich_enable_pmc_space
Lloh28:
	adrp	x8, _ACPICTRL_PMCBASE@GOTPAGE
Lloh29:
	ldr	x8, [x8, _ACPICTRL_PMCBASE@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x19
	bl	_pci_read_config_dword
	ldrsw	x8, [sp, #12]
	and	x20, x8, #0xfffffffffffffe00
Lloh31:
	adrp	x8, _ICH_RES_MEM_GCS_PMC@GOTPAGE
Lloh32:
	ldr	x8, [x8, _ICH_RES_MEM_GCS_PMC@GOTPAGEOFF]
Lloh33:
	ldr	w0, [x8]
	bl	_wdt_mem_res
Lloh34:
	adrp	x8, _ACPIBASE_PMC_OFF@GOTPAGE
Lloh35:
	ldr	x8, [x8, _ACPIBASE_PMC_OFF@GOTPAGEOFF]
Lloh36:
	ldr	x8, [x8]
	add	x8, x8, x20
Lloh37:
	adrp	x9, _ACPIBASE_PMC_END@GOTPAGE
Lloh38:
	ldr	x9, [x9, _ACPIBASE_PMC_END@GOTPAGEOFF]
	b	LBB0_14
LBB0_11:
Lloh39:
	adrp	x8, _RCBABASE@GOTPAGE
Lloh40:
	ldr	x8, [x8, _RCBABASE@GOTPAGEOFF]
Lloh41:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x19
	bl	_pci_read_config_dword
	ldrsw	x8, [sp, #12]
	tbnz	w8, #0, LBB0_13
; %bb.12:
Lloh42:
	adrp	x1, l_.str.1@PAGE
Lloh43:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_7
LBB0_13:
	and	x20, x8, #0xffffffffffffc000
Lloh44:
	adrp	x8, _ICH_RES_MEM_GCS_PMC@GOTPAGE
Lloh45:
	ldr	x8, [x8, _ICH_RES_MEM_GCS_PMC@GOTPAGEOFF]
Lloh46:
	ldr	w0, [x8]
	bl	_wdt_mem_res
Lloh47:
	adrp	x8, _ACPIBASE_GCS_OFF@GOTPAGE
Lloh48:
	ldr	x8, [x8, _ACPIBASE_GCS_OFF@GOTPAGEOFF]
Lloh49:
	ldr	x8, [x8]
	add	x8, x8, x20
Lloh50:
	adrp	x9, _ACPIBASE_GCS_END@GOTPAGE
Lloh51:
	ldr	x9, [x9, _ACPIBASE_GCS_END@GOTPAGEOFF]
LBB0_14:
	ldr	x9, [x9]
	add	x9, x9, x20
	stp	x9, x8, [x0]
LBB0_15:
	mov	x0, x19
	bl	_lpc_ich_finalize_wdt_cell
	cbnz	w0, LBB0_9
; %bb.16:
Lloh52:
	adrp	x8, _PLATFORM_DEVID_AUTO@GOTPAGE
Lloh53:
	ldr	x8, [x8, _PLATFORM_DEVID_AUTO@GOTPAGEOFF]
Lloh54:
	ldr	w1, [x8]
Lloh55:
	adrp	x2, _lpc_ich_wdt_cell@GOTPAGE
Lloh56:
	ldr	x2, [x2, _lpc_ich_wdt_cell@GOTPAGEOFF]
	mov	x0, x19
	mov	w3, #1
	mov	x4, #0
	mov	w5, #0
	mov	x6, #0
	bl	_mfd_add_devices
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpLdrGot	Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGot	Lloh55, Lloh56
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"I/O space for ACPI uninitialized\n"

	.comm	_ICH_RES_IO_TCO,4,2             ; @ICH_RES_IO_TCO
	.comm	_ACPIBASE_TCO_OFF,8,3           ; @ACPIBASE_TCO_OFF
	.comm	_ACPIBASE_TCO_END,8,3           ; @ACPIBASE_TCO_END
	.comm	_ICH_RES_IO_SMI,4,2             ; @ICH_RES_IO_SMI
	.comm	_ACPIBASE_SMI_OFF,8,3           ; @ACPIBASE_SMI_OFF
	.comm	_ACPIBASE_SMI_END,8,3           ; @ACPIBASE_SMI_END
	.comm	_lpc_chipset_info,8,3           ; @lpc_chipset_info
	.comm	_lpc_ich_wdt_cell,4,2           ; @lpc_ich_wdt_cell
	.comm	_RCBABASE,4,2                   ; @RCBABASE
l_.str.1:                               ; @.str.1
	.asciz	"RCBA is disabled by hardware/BIOS, device disabled\n"

	.comm	_ICH_RES_MEM_GCS_PMC,4,2        ; @ICH_RES_MEM_GCS_PMC
	.comm	_ACPIBASE_GCS_OFF,8,3           ; @ACPIBASE_GCS_OFF
	.comm	_ACPIBASE_GCS_END,8,3           ; @ACPIBASE_GCS_END
	.comm	_ACPICTRL_PMCBASE,4,2           ; @ACPICTRL_PMCBASE
	.comm	_ACPIBASE_PMC_OFF,8,3           ; @ACPIBASE_PMC_OFF
	.comm	_ACPIBASE_PMC_END,8,3           ; @ACPIBASE_PMC_END
	.comm	_PLATFORM_DEVID_AUTO,4,2        ; @PLATFORM_DEVID_AUTO
	.no_dead_strip	_lpc_ich_init_wdt
.subsections_via_symbols
