	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ichx_gpio_probe
_ichx_gpio_probe:                       ## @ichx_gpio_probe
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	leaq	4(%rdi), %r14
	movq	%r14, %rdi
	callq	_dev_get_platdata
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r12
	movl	(%rax), %eax
	addl	$-128, %eax
	cmpl	$8, %eax
	jae	LBB0_1
## %bb.3:
	cltq
	leaq	l_switch.table.ichx_gpio_probe(%rip), %rcx
	movq	(%rcx,%rax,8), %rax
	movq	_ichx_priv@GOTPCREL(%rip), %rcx
	movq	%rax, 24(%rcx)
	movq	%r14, 56(%rcx)
	leaq	48(%rcx), %rdi
	callq	_spin_lock_init
	movq	_IORESOURCE_IO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ICH_RES_GPIO@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_platform_get_resource
	movq	%rax, %r13
	movl	(%r15), %edx
	movl	4(%r12), %ecx
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_ichx_gpio_request_regions
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_14
## %bb.4:
	movq	_IORESOURCE_IO@GOTPCREL(%rip), %rdx
	movq	_ichx_priv@GOTPCREL(%rip), %rcx
	movq	%r13, 40(%rcx)
	movl	4(%r12), %eax
	movl	%eax, 32(%rcx)
	movq	24(%rcx), %rax
	cmpl	$0, (%rax)
	je	LBB0_11
## %bb.5:
	movq	%rcx, %r13
	movl	(%rdx), %esi
	movq	_ICH_RES_GPE0@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_platform_get_resource
	testq	%rax, %rax
	je	LBB0_6
## %bb.8:
	movq	%rax, %rbx
	movl	(%rax), %r12d
	movq	%rax, %rdi
	callq	_resource_size
	movl	(%r15), %ecx
	movq	%r14, %rdi
	movl	%r12d, %esi
	movl	%eax, %edx
	callq	_devm_request_region
	testl	%eax, %eax
	je	LBB0_9
## %bb.10:
	movq	%rbx, 16(%r13)
	jmp	LBB0_11
LBB0_1:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_14:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_7
LBB0_9:
	leaq	L_.str.1(%rip), %rsi
LBB0_7:
	movq	%r14, %rdi
	callq	_dev_warn
LBB0_11:
	movq	_ichx_priv@GOTPCREL(%rip), %r15
	movq	%r15, %rdi
	callq	_ichx_gpiolib_setup
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_gpiochip_add_data
	testl	%eax, %eax
	je	LBB0_13
## %bb.12:
	movl	%eax, %r12d
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	movl	%r12d, %ebx
	jmp	LBB0_14
LBB0_13:
	movq	(%r15), %rax
	movq	8(%r15), %rdx
	leaq	(%rdx,%rax), %rcx
	decq	%rcx
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_info
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_i3100_desc,4,2                 ## @i3100_desc
	.comm	_ichx_priv,64,3                 ## @ichx_priv
	.comm	_intel5_desc,4,2                ## @intel5_desc
	.comm	_ich6_desc,4,2                  ## @ich6_desc
	.comm	_ich7_desc,4,2                  ## @ich7_desc
	.comm	_ich9_desc,4,2                  ## @ich9_desc
	.comm	_ich10_corp_desc,4,2            ## @ich10_corp_desc
	.comm	_ich10_cons_desc,4,2            ## @ich10_cons_desc
	.comm	_avoton_desc,4,2                ## @avoton_desc
	.comm	_IORESOURCE_IO,4,2              ## @IORESOURCE_IO
	.comm	_ICH_RES_GPIO,4,2               ## @ICH_RES_GPIO
	.comm	_ICH_RES_GPE0,4,2               ## @ICH_RES_GPE0
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ACPI BAR is unavailable, GPI 0 - 15 unavailable\n"

L_.str.1:                               ## @.str.1
	.asciz	"ACPI BAR is busy, GPI 0 - 15 unavailable\n"

L_.str.2:                               ## @.str.2
	.asciz	"Failed to register GPIOs\n"

L_.str.3:                               ## @.str.3
	.asciz	"GPIO from %d to %d\n"

	.no_dead_strip	_ichx_gpio_probe
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.ichx_gpio_probe
l_switch.table.ichx_gpio_probe:
	.quad	_ich9_desc
	.quad	_ich7_desc
	.quad	_ich6_desc
	.quad	_intel5_desc
	.quad	_ich10_corp_desc
	.quad	_ich10_cons_desc
	.quad	_i3100_desc
	.quad	_avoton_desc

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ichx_gpio_probe
_ichx_gpio_probe:                       ; @ichx_gpio_probe
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x0
	add	x19, x0, #4
	mov	x0, x19
	bl	_dev_get_platdata
	cbz	x0, LBB0_7
; %bb.1:
	mov	x21, x0
	ldr	w8, [x0]
	sub	w8, w8, #128
	cmp	w8, #8
	b.hs	LBB0_7
; %bb.2:
Lloh0:
	adrp	x9, l_switch.table.ichx_gpio_probe@PAGE
Lloh1:
	add	x9, x9, l_switch.table.ichx_gpio_probe@PAGEOFF
	ldr	x8, [x9, w8, sxtw #3]
Lloh2:
	adrp	x24, _ichx_priv@GOTPAGE
Lloh3:
	ldr	x24, [x24, _ichx_priv@GOTPAGEOFF]
	str	x8, [x24, #24]
	str	x19, [x24, #56]
	add	x0, x24, #48
	bl	_spin_lock_init
Lloh4:
	adrp	x25, _IORESOURCE_IO@GOTPAGE
Lloh5:
	ldr	x25, [x25, _IORESOURCE_IO@GOTPAGEOFF]
	ldr	w1, [x25]
Lloh6:
	adrp	x8, _ICH_RES_GPIO@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ICH_RES_GPIO@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_platform_get_resource
	mov	x23, x0
	ldr	w2, [x20]
	ldr	w3, [x21, #4]
	mov	x0, x19
	mov	x1, x23
	bl	_ichx_gpio_request_regions
	mov	x22, x0
	cbnz	w0, LBB0_8
; %bb.3:
	str	x23, [x24, #40]
	ldr	w8, [x21, #4]
	str	w8, [x24, #32]
	ldr	x8, [x24, #24]
	ldr	w8, [x8]
	cbz	w8, LBB0_12
; %bb.4:
	ldr	w1, [x25]
Lloh9:
	adrp	x8, _ICH_RES_GPE0@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ICH_RES_GPE0@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_platform_get_resource
	cbz	x0, LBB0_9
; %bb.5:
	mov	x21, x0
	ldr	w22, [x0]
	bl	_resource_size
	mov	x2, x0
	ldr	w3, [x20]
	mov	x0, x19
	mov	x1, x22
	bl	_devm_request_region
	cbz	w0, LBB0_10
; %bb.6:
	str	x21, [x24, #16]
	b	LBB0_12
LBB0_7:
Lloh12:
	adrp	x8, _ENODEV@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_8:
	mov	x0, x22
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_9:
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_11
LBB0_10:
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_11:
	mov	x0, x19
	bl	_dev_warn
LBB0_12:
Lloh19:
	adrp	x20, _ichx_priv@GOTPAGE
Lloh20:
	ldr	x20, [x20, _ichx_priv@GOTPAGEOFF]
	mov	x0, x20
	bl	_ichx_gpiolib_setup
	mov	x0, x20
	mov	x1, #0
	bl	_gpiochip_add_data
	mov	x22, x0
	cbz	w0, LBB0_14
; %bb.13:
Lloh21:
	adrp	x1, l_.str.2@PAGE
Lloh22:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	b	LBB0_8
LBB0_14:
	ldp	x8, x2, [x20]
	add	x8, x2, x8
	sub	x3, x8, #1
Lloh23:
	adrp	x1, l_.str.3@PAGE
Lloh24:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_dev_info
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_i3100_desc,4,2                 ; @i3100_desc
	.comm	_ichx_priv,64,3                 ; @ichx_priv
	.comm	_intel5_desc,4,2                ; @intel5_desc
	.comm	_ich6_desc,4,2                  ; @ich6_desc
	.comm	_ich7_desc,4,2                  ; @ich7_desc
	.comm	_ich9_desc,4,2                  ; @ich9_desc
	.comm	_ich10_corp_desc,4,2            ; @ich10_corp_desc
	.comm	_ich10_cons_desc,4,2            ; @ich10_cons_desc
	.comm	_avoton_desc,4,2                ; @avoton_desc
	.comm	_IORESOURCE_IO,4,2              ; @IORESOURCE_IO
	.comm	_ICH_RES_GPIO,4,2               ; @ICH_RES_GPIO
	.comm	_ICH_RES_GPE0,4,2               ; @ICH_RES_GPE0
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ACPI BAR is unavailable, GPI 0 - 15 unavailable\n"

l_.str.1:                               ; @.str.1
	.asciz	"ACPI BAR is busy, GPI 0 - 15 unavailable\n"

l_.str.2:                               ; @.str.2
	.asciz	"Failed to register GPIOs\n"

l_.str.3:                               ; @.str.3
	.asciz	"GPIO from %d to %d\n"

	.no_dead_strip	_ichx_gpio_probe
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.ichx_gpio_probe
l_switch.table.ichx_gpio_probe:
	.quad	_ich9_desc
	.quad	_ich7_desc
	.quad	_ich6_desc
	.quad	_intel5_desc
	.quad	_ich10_corp_desc
	.quad	_ich10_cons_desc
	.quad	_i3100_desc
	.quad	_avoton_desc

.subsections_via_symbols
