	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_acpi_gpio_count                ## -- Begin function acpi_gpio_count
	.p2align	4, 0x90
_acpi_gpio_count:                       ## @acpi_gpio_count
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	callq	_ACPI_COMPANION
	movq	%rax, %r14
	movq	_ENOENT@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	movq	_gpio_suffixes@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	je	LBB0_19
## %bb.1:
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_13 Depth 2
	movq	(%r15), %rax
	movq	(%rax,%r12,8), %r8
	movq	%rbx, %r15
	testq	%rbx, %rbx
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	leaq	-80(%rbp), %rbx
	movq	%rbx, %rdi
	movl	$32, %esi
	leaq	L_.str(%rip), %rdx
	movq	%r15, %rcx
	xorl	%eax, %eax
	callq	_snprintf
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	leaq	-80(%rbp), %rbx
	movq	%rbx, %rdi
	movl	$32, %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r8, %rcx
	xorl	%eax, %eax
	callq	_snprintf
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	_ACPI_TYPE_ANY@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	leaq	-104(%rbp), %rcx
	callq	_acpi_dev_get_property
	testl	%eax, %eax
	je	LBB0_7
## %bb.11:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	%r15, %rbx
	movl	%r13d, -84(%rbp)                ## 4-byte Spill
	movq	%r14, %r15
	movq	(%r14), %r14
	testq	%r14, %r14
	je	LBB0_16
## %bb.12:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	8(%r14), %rsi
	testq	%rsi, %rsi
	leaq	-80(%rbp), %r13
	je	LBB0_16
	.p2align	4, 0x90
LBB0_13:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r13, %rdi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_14
## %bb.15:                              ##   in Loop: Header=BB0_13 Depth=2
	movq	24(%r14), %rsi
	addq	$16, %r14
	testq	%rsi, %rsi
	jne	LBB0_13
LBB0_16:                                ##   in Loop: Header=BB0_3 Depth=1
	movl	-84(%rbp), %eax                 ## 4-byte Reload
LBB0_17:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	%r15, %r14
	movq	%rbx, %r15
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	-104(%rbp), %rdi
	movq	(%rdi), %rcx
	movq	_ACPI_TYPE_LOCAL_REFERENCE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rcx
	je	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%r13d, %eax
	movq	_ACPI_TYPE_PACKAGE@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_18
## %bb.10:                              ##   in Loop: Header=BB0_3 Depth=1
	callq	_acpi_gpio_package_count
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_3 Depth=1
	testl	%eax, %eax
	jg	LBB0_24
## %bb.2:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r15, %rbx
	movl	%eax, %r13d
	incq	%r12
	movq	_gpio_suffixes@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	callq	_ARRAY_SIZE
	movl	%eax, %eax
	cmpq	%rax, %r12
	jb	LBB0_3
	jmp	LBB0_19
LBB0_14:                                ##   in Loop: Header=BB0_3 Depth=1
	movl	(%r14), %eax
	jmp	LBB0_17
LBB0_19:
	testl	%r13d, %r13d
	js	LBB0_20
## %bb.23:
	movl	%r13d, %eax
	xorl	%edx, %edx
	movq	_ENOENT@GOTPCREL(%rip), %rcx
	subl	(%rcx), %edx
	testl	%r13d, %r13d
	cmovel	%edx, %eax
	jmp	LBB0_24
LBB0_20:
	movl	$0, -88(%rbp)
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_acpi_can_fallback_to_crs
	testl	%eax, %eax
	je	LBB0_21
## %bb.22:
	leaq	-96(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_INIT_LIST_HEAD
	movq	_acpi_find_gpio_count@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-88(%rbp), %rcx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_acpi_dev_get_resources
	movq	%rbx, %rdi
	callq	_acpi_dev_free_resource_list
	movl	-88(%rbp), %ecx
	testl	%ecx, %ecx
	movl	%r13d, %eax
	cmovnel	%ecx, %eax
	jmp	LBB0_24
LBB0_8:
	movl	$1, %eax
	jmp	LBB0_24
LBB0_21:
	movl	%r13d, %eax
LBB0_24:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_26
## %bb.25:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_26:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_gpio_suffixes,8,3              ## @gpio_suffixes
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s-%s"

L_.str.1:                               ## @.str.1
	.asciz	"%s"

	.comm	_ACPI_TYPE_ANY,4,2              ## @ACPI_TYPE_ANY
	.comm	_ACPI_TYPE_LOCAL_REFERENCE,8,3  ## @ACPI_TYPE_LOCAL_REFERENCE
	.comm	_ACPI_TYPE_PACKAGE,8,3          ## @ACPI_TYPE_PACKAGE
	.comm	_acpi_find_gpio_count,4,2       ## @acpi_find_gpio_count
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_acpi_gpio_count                ; -- Begin function acpi_gpio_count
	.p2align	2
_acpi_gpio_count:                       ; @acpi_gpio_count
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #176
	.cfi_def_cfa_offset 176
	stp	x28, x27, [sp, #80]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #96]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #112]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #128]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #144]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #160]            ; 16-byte Folded Spill
	add	x29, sp, #160
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x1
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #72]
	bl	_ACPI_COMPANION
	mov	x20, x0
Lloh3:
	adrp	x8, _ENOENT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w19, w8
Lloh6:
	adrp	x25, _gpio_suffixes@GOTPAGE
Lloh7:
	ldr	x25, [x25, _gpio_suffixes@GOTPAGEOFF]
	ldr	x0, [x25]
	bl	_ARRAY_SIZE
	cbz	w0, LBB0_16
; %bb.1:
	mov	x26, #0
Lloh8:
	adrp	x27, _ACPI_TYPE_ANY@GOTPAGE
Lloh9:
	ldr	x27, [x27, _ACPI_TYPE_ANY@GOTPAGEOFF]
Lloh10:
	adrp	x28, _ACPI_TYPE_LOCAL_REFERENCE@GOTPAGE
Lloh11:
	ldr	x28, [x28, _ACPI_TYPE_LOCAL_REFERENCE@GOTPAGEOFF]
Lloh12:
	adrp	x24, _ACPI_TYPE_PACKAGE@GOTPAGE
Lloh13:
	ldr	x24, [x24, _ACPI_TYPE_PACKAGE@GOTPAGEOFF]
Lloh14:
	adrp	x23, l_.str@PAGE
Lloh15:
	add	x23, x23, l_.str@PAGEOFF
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
	ldr	x8, [x25]
	ldr	x3, [x8, x26, lsl #3]
	cbz	x21, LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	str	x3, [sp]
	add	x0, sp, #40
	mov	w1, #32
	mov	x2, x23
	mov	x3, x21
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_2 Depth=1
	add	x0, sp, #40
	mov	w1, #32
Lloh16:
	adrp	x2, l_.str.1@PAGE
Lloh17:
	add	x2, x2, l_.str.1@PAGEOFF
LBB0_5:                                 ;   in Loop: Header=BB0_2 Depth=1
	bl	_snprintf
	ldr	w2, [x27]
	add	x1, sp, #40
	add	x3, sp, #32
	mov	x0, x20
	bl	_acpi_dev_get_property
	cbz	w0, LBB0_10
; %bb.6:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x22, [x20]
	cbz	x22, LBB0_14
; %bb.7:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x1, [x22, #8]
	cbz	x1, LBB0_14
LBB0_8:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	x0, sp, #40
	bl	_strcmp
	cbz	x0, LBB0_13
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=2
	ldr	x1, [x22, #24]
	add	x22, x22, #16
	cbnz	x1, LBB0_8
	b	LBB0_14
LBB0_10:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x0, [sp, #32]
	ldr	x8, [x0]
	ldr	x9, [x28]
	cmp	x8, x9
	b.eq	LBB0_20
; %bb.11:                               ;   in Loop: Header=BB0_2 Depth=1
	ldr	x9, [x24]
	cmp	x8, x9
	b.ne	LBB0_14
; %bb.12:                               ;   in Loop: Header=BB0_2 Depth=1
	bl	_acpi_gpio_package_count
	mov	x19, x0
	b	LBB0_14
LBB0_13:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w19, [x22]
LBB0_14:                                ;   in Loop: Header=BB0_2 Depth=1
	cmp	w19, #0
	b.gt	LBB0_21
; %bb.15:                               ;   in Loop: Header=BB0_2 Depth=1
	add	x26, x26, #1
	ldr	x0, [x25]
	bl	_ARRAY_SIZE
	cmp	x26, w0, uxtw
	b.lo	LBB0_2
LBB0_16:
	tbnz	w19, #31, LBB0_18
; %bb.17:
Lloh18:
	adrp	x8, _ENOENT@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	cmp	w19, #0
	csneg	w19, w19, w8, ne
	b	LBB0_21
LBB0_18:
	str	wzr, [sp, #20]
	mov	x0, x20
	mov	x1, x21
	bl	_acpi_can_fallback_to_crs
	cbz	w0, LBB0_21
; %bb.19:
	add	x0, sp, #24
	bl	_INIT_LIST_HEAD
Lloh21:
	adrp	x8, _acpi_find_gpio_count@GOTPAGE
Lloh22:
	ldr	x8, [x8, _acpi_find_gpio_count@GOTPAGEOFF]
Lloh23:
	ldr	w2, [x8]
	add	x1, sp, #24
	add	x3, sp, #20
	mov	x0, x20
	bl	_acpi_dev_get_resources
	add	x0, sp, #24
	bl	_acpi_dev_free_resource_list
	ldr	w8, [sp, #20]
	cmp	w8, #0
	csel	w19, w19, w8, eq
	b	LBB0_21
LBB0_20:
	mov	w19, #1
LBB0_21:
	ldr	x8, [sp, #72]
Lloh24:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh25:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh26:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_23
; %bb.22:
	mov	x0, x19
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #112]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #96]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #176
	ret
LBB0_23:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_gpio_suffixes,8,3              ; @gpio_suffixes
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s-%s"

l_.str.1:                               ; @.str.1
	.asciz	"%s"

	.comm	_ACPI_TYPE_ANY,4,2              ; @ACPI_TYPE_ANY
	.comm	_ACPI_TYPE_LOCAL_REFERENCE,8,3  ; @ACPI_TYPE_LOCAL_REFERENCE
	.comm	_ACPI_TYPE_PACKAGE,8,3          ; @ACPI_TYPE_PACKAGE
	.comm	_acpi_find_gpio_count,4,2       ; @acpi_find_gpio_count
.subsections_via_symbols
