	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lpc_ich_init_gpio
_lpc_ich_init_gpio:                     ## @lpc_ich_init_gpio
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	callq	_pci_get_drvdata
	movq	%rax, %r14
	movl	12(%rax), %esi
	leaq	-44(%rbp), %rdx
	movq	%r15, %rdi
	callq	_pci_read_config_dword
	movl	-44(%rbp), %eax
	andl	$65408, %eax                    ## imm = 0xFF80
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	_gpio_ich_res@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	_ICH_RES_GPE0@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	shlq	$4, %rdx
	leaq	(%rcx,%rdx), %rdi
	movq	_ACPIBASE_GPE_OFF@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	addl	%eax, %esi
	movl	%esi, (%rcx,%rdx)
	movq	_ACPIBASE_GPE_END@GOTPCREL(%rip), %rsi
	addq	(%rsi), %rax
	movq	%rax, 8(%rcx,%rdx)
	callq	_acpi_check_resource_conflict
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movq	_lpc_ich_gpio_cell@GOTPCREL(%rip), %rax
	decl	4(%rax)
	xorl	%r12d, %r12d
	jmp	LBB0_6
LBB0_1:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_notice
	movq	_lpc_ich_gpio_cell@GOTPCREL(%rip), %rax
	decl	4(%rax)
	jmp	LBB0_5
LBB0_4:
	movq	%r15, %rdi
	callq	_lpc_ich_enable_acpi_space
LBB0_5:
	movb	$1, %r12b
LBB0_6:
	movl	8(%r14), %esi
	leaq	-44(%rbp), %rdx
	movq	%r15, %rdi
	callq	_pci_read_config_dword
	movl	-44(%rbp), %eax
	andl	$65408, %eax                    ## imm = 0xFF80
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movq	_gpio_ich_res@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	_ICH_RES_GPIO@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	shlq	$4, %rdx
	leaq	(%rcx,%rdx), %rdi
	movl	%eax, (%rcx,%rdx)
	movq	_lpc_chipset_info@GOTPCREL(%rip), %r13
	movq	(%r13), %rsi
	movq	(%r14), %rbx
	movl	(%rsi,%rbx,8), %esi
	andl	$-2, %esi
	xorl	%ebx, %ebx
	cmpl	$128, %esi
	sete	%bl
	shll	$6, %ebx
	orl	$63, %ebx
	orq	%rax, %rbx
	movq	%rbx, 8(%rcx,%rdx)
	callq	_lpc_ich_check_conflict_gpio
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_11
## %bb.9:
	movq	(%r13), %rax
	movq	(%r14), %rcx
	movl	%ebx, 4(%rax,%rcx,8)
	movq	%r15, %rdi
	callq	_lpc_ich_enable_gpio_space
	movq	%r15, %rdi
	callq	_lpc_ich_finalize_gpio_cell
	movq	_PLATFORM_DEVID_AUTO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	$0, (%rsp)
	movq	_lpc_ich_gpio_cell@GOTPCREL(%rip), %rdx
	movq	%r15, %rdi
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_mfd_add_devices
	movl	%eax, %ebx
	testb	%r12b, %r12b
	je	LBB0_11
	jmp	LBB0_12
LBB0_7:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_notice
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	testb	%r12b, %r12b
	jne	LBB0_12
LBB0_11:
	movq	_lpc_ich_gpio_cell@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdi
	callq	_pr_warn
LBB0_12:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"I/O space for ACPI uninitialized\n"

	.comm	_lpc_ich_gpio_cell,8,2          ## @lpc_ich_gpio_cell
	.comm	_gpio_ich_res,8,3               ## @gpio_ich_res
	.comm	_ICH_RES_GPE0,8,3               ## @ICH_RES_GPE0
	.comm	_ACPIBASE_GPE_OFF,4,2           ## @ACPIBASE_GPE_OFF
	.comm	_ACPIBASE_GPE_END,8,3           ## @ACPIBASE_GPE_END
L_.str.1:                               ## @.str.1
	.asciz	"I/O space for GPIO uninitialized\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_ICH_RES_GPIO,8,3               ## @ICH_RES_GPIO
	.comm	_lpc_chipset_info,8,3           ## @lpc_chipset_info
	.comm	_PLATFORM_DEVID_AUTO,4,2        ## @PLATFORM_DEVID_AUTO
L_.str.2:                               ## @.str.2
	.asciz	"Resource conflict(s) found affecting %s\n"

	.no_dead_strip	_lpc_ich_init_gpio
.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_gpio
_lpc_ich_init_gpio:                     ; @lpc_ich_init_gpio
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	bl	_pci_get_drvdata
	mov	x20, x0
	ldr	w1, [x0, #12]
	add	x2, sp, #12
	mov	x0, x19
	bl	_pci_read_config_dword
	ldr	w8, [sp, #12]
Lloh0:
	adrp	x21, _gpio_ich_res@GOTPAGE
Lloh1:
	ldr	x21, [x21, _gpio_ich_res@GOTPAGEOFF]
Lloh2:
	adrp	x22, _lpc_ich_gpio_cell@GOTPAGE
Lloh3:
	ldr	x22, [x22, _lpc_ich_gpio_cell@GOTPAGEOFF]
	and	x8, x8, #0xff80
	cbz	w8, LBB0_3
; %bb.1:
	ldr	x9, [x21]
Lloh4:
	adrp	x10, _ICH_RES_GPE0@GOTPAGE
Lloh5:
	ldr	x10, [x10, _ICH_RES_GPE0@GOTPAGEOFF]
Lloh6:
	ldr	x10, [x10]
	add	x0, x9, x10, lsl #4
Lloh7:
	adrp	x9, _ACPIBASE_GPE_OFF@GOTPAGE
Lloh8:
	ldr	x9, [x9, _ACPIBASE_GPE_OFF@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	add	w9, w9, w8
	str	w9, [x0]
Lloh10:
	adrp	x9, _ACPIBASE_GPE_END@GOTPAGE
Lloh11:
	ldr	x9, [x9, _ACPIBASE_GPE_END@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	add	x8, x9, x8
	str	x8, [x0, #8]
	bl	_acpi_check_resource_conflict
	cbz	w0, LBB0_4
; %bb.2:
	mov	w23, #0
	ldr	w8, [x22, #4]
	sub	w8, w8, #1
	str	w8, [x22, #4]
	b	LBB0_6
LBB0_3:
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_notice
	ldr	w8, [x22, #4]
	sub	w8, w8, #1
	str	w8, [x22, #4]
	b	LBB0_5
LBB0_4:
	mov	x0, x19
	bl	_lpc_ich_enable_acpi_space
LBB0_5:
	mov	w23, #1
LBB0_6:
	ldr	w1, [x20, #8]
	add	x2, sp, #12
	mov	x0, x19
	bl	_pci_read_config_dword
	ldr	w8, [sp, #12]
	and	x8, x8, #0xff80
	cbz	w8, LBB0_9
; %bb.7:
Lloh15:
	adrp	x9, _ICH_RES_GPIO@GOTPAGE
Lloh16:
	ldr	x9, [x9, _ICH_RES_GPIO@GOTPAGEOFF]
	ldr	x10, [x21]
Lloh17:
	ldr	x9, [x9]
	add	x0, x10, x9, lsl #4
	str	w8, [x0]
Lloh18:
	adrp	x24, _lpc_chipset_info@GOTPAGE
Lloh19:
	ldr	x24, [x24, _lpc_chipset_info@GOTPAGEOFF]
	ldr	x9, [x24]
	ldr	x10, [x20]
	lsl	x10, x10, #3
	ldr	w9, [x9, x10]
	and	w9, w9, #0xfffffffe
	mov	w10, #63
	mov	w11, #127
	cmp	w9, #128
	csel	w9, w11, w10, eq
	orr	x8, x8, x9
	str	x8, [x0, #8]
	bl	_lpc_ich_check_conflict_gpio
	mov	x21, x0
	tbnz	w0, #31, LBB0_10
; %bb.8:
	ldr	x8, [x24]
	ldr	x9, [x20]
	add	x8, x8, x9, lsl #3
	str	w21, [x8, #4]
	mov	x0, x19
	bl	_lpc_ich_enable_gpio_space
	mov	x0, x19
	bl	_lpc_ich_finalize_gpio_cell
Lloh20:
	adrp	x8, _PLATFORM_DEVID_AUTO@GOTPAGE
Lloh21:
	ldr	x8, [x8, _PLATFORM_DEVID_AUTO@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
Lloh23:
	adrp	x2, _lpc_ich_gpio_cell@GOTPAGE
Lloh24:
	ldr	x2, [x2, _lpc_ich_gpio_cell@GOTPAGEOFF]
	mov	x0, x19
	mov	w3, #1
	mov	x4, #0
	mov	w5, #0
	mov	x6, #0
	bl	_mfd_add_devices
	mov	x21, x0
	tbz	w23, #0, LBB0_10
	b	LBB0_11
LBB0_9:
Lloh25:
	adrp	x1, l_.str.1@PAGE
Lloh26:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_notice
Lloh27:
	adrp	x8, _ENODEV@GOTPAGE
Lloh28:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	neg	w21, w8
	tbnz	w23, #0, LBB0_11
LBB0_10:
	ldr	w1, [x22]
Lloh30:
	adrp	x0, l_.str.2@PAGE
Lloh31:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_warn
LBB0_11:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"I/O space for ACPI uninitialized\n"

	.comm	_lpc_ich_gpio_cell,8,2          ; @lpc_ich_gpio_cell
	.comm	_gpio_ich_res,8,3               ; @gpio_ich_res
	.comm	_ICH_RES_GPE0,8,3               ; @ICH_RES_GPE0
	.comm	_ACPIBASE_GPE_OFF,4,2           ; @ACPIBASE_GPE_OFF
	.comm	_ACPIBASE_GPE_END,8,3           ; @ACPIBASE_GPE_END
l_.str.1:                               ; @.str.1
	.asciz	"I/O space for GPIO uninitialized\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_ICH_RES_GPIO,8,3               ; @ICH_RES_GPIO
	.comm	_lpc_chipset_info,8,3           ; @lpc_chipset_info
	.comm	_PLATFORM_DEVID_AUTO,4,2        ; @PLATFORM_DEVID_AUTO
l_.str.2:                               ; @.str.2
	.asciz	"Resource conflict(s) found affecting %s\n"

	.no_dead_strip	_lpc_ich_init_gpio
.subsections_via_symbols
