	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gpiod_count                    ## -- Begin function gpiod_count
	.p2align	4, 0x90
_gpiod_count:                           ## @gpiod_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	_ENOENT@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	movq	_CONFIG_OF@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_IS_ENABLED
	testq	%r15, %r15
	je	LBB0_4
## %bb.1:
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	cmpq	$0, (%r15)
	je	LBB0_4
## %bb.3:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_of_gpio_get_count
	jmp	LBB0_8
LBB0_4:
	movq	_CONFIG_ACPI@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_IS_ENABLED
	testq	%r15, %r15
	je	LBB0_9
## %bb.5:
	testq	%rax, %rax
	je	LBB0_9
## %bb.6:
	movq	%r15, %rdi
	callq	_ACPI_HANDLE
	testq	%rax, %rax
	je	LBB0_9
## %bb.7:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_acpi_gpio_count
LBB0_8:
	movl	%eax, %ebx
LBB0_9:
	testl	%ebx, %ebx
	js	LBB0_11
## %bb.10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	%r15, %rdi
	movq	%r14, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_platform_gpio_count            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_CONFIG_OF,4,2                  ## @CONFIG_OF
	.comm	_CONFIG_ACPI,4,2                ## @CONFIG_ACPI
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gpiod_count                    ; -- Begin function gpiod_count
	.p2align	2
_gpiod_count:                           ; @gpiod_count
	.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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _ENOENT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
Lloh3:
	adrp	x8, _CONFIG_OF@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CONFIG_OF@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_IS_ENABLED
	cbz	x20, LBB0_4
; %bb.1:
	cbz	x0, LBB0_4
; %bb.2:
	ldr	x8, [x20]
	cbz	x8, LBB0_4
; %bb.3:
	mov	x0, x20
	mov	x1, x19
	bl	_of_gpio_get_count
	b	LBB0_8
LBB0_4:
	neg	w21, w21
Lloh6:
	adrp	x8, _CONFIG_ACPI@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CONFIG_ACPI@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_IS_ENABLED
	cbz	x20, LBB0_9
; %bb.5:
	cbz	x0, LBB0_9
; %bb.6:
	mov	x0, x20
	bl	_ACPI_HANDLE
	cbz	x0, LBB0_9
; %bb.7:
	mov	x0, x20
	mov	x1, x19
	bl	_acpi_gpio_count
LBB0_8:
	mov	x21, x0
LBB0_9:
	tbnz	w21, #31, LBB0_11
; %bb.10:
	mov	x0, x21
	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_11:
	mov	x0, x20
	mov	x1, x19
	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	_platform_gpio_count
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_CONFIG_OF,4,2                  ; @CONFIG_OF
	.comm	_CONFIG_ACPI,4,2                ; @CONFIG_ACPI
.subsections_via_symbols
