	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function acpi_populate_gpio_lookup
_acpi_populate_gpio_lookup:             ## @acpi_populate_gpio_lookup
	.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), %rax
	movq	_ACPI_RESOURCE_TYPE_GPIO@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_11
## %bb.1:
	movq	%rsi, %r14
	cmpl	$0, 40(%rsi)
	jne	LBB0_11
## %bb.2:
	movq	%rdi, %rbx
	movq	8(%rdi), %r15
	movq	_ACPI_RESOURCE_GPIO_TYPE_INT@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	xorl	%r13d, %r13d
	cmpq	%r12, %r15
	sete	%al
	movq	_ACPI_GPIO_QUIRK_ONLY_GPIOIO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	(%r14), %rcx
	testl	%edx, 16(%r14)
	je	LBB0_5
## %bb.3:
	cmpq	%r12, %r15
	jne	LBB0_5
## %bb.4:
	incq	%rcx
	movq	%rcx, (%r14)
LBB0_5:
	movslq	44(%r14), %rdx
	leal	1(%rdx), %esi
	movl	%esi, 44(%r14)
	cmpq	%rdx, %rcx
	jne	LBB0_11
## %bb.6:
	movslq	8(%r14), %rcx
	cmpl	16(%rbx), %ecx
	jge	LBB0_11
## %bb.7:
	movb	%al, %r13b
	movl	40(%rbx), %edi
	movq	32(%rbx), %rax
	movl	(%rax,%rcx,4), %esi
	callq	_acpi_get_gpiod
	movl	%eax, 40(%r14)
	movl	28(%rbx), %eax
	movl	%eax, 36(%r14)
	movl	%r13d, 20(%r14)
	cmpq	%r12, %r15
	jne	LBB0_9
## %bb.8:
	movq	_GPIOD_IN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%r14)
	movl	24(%rbx), %eax
	movl	%eax, 24(%r14)
	addq	$20, %rbx
	movl	$32, %eax
	jmp	LBB0_10
LBB0_9:
	addq	$8, %rbx
	movq	%rbx, %rdi
	callq	_acpi_gpio_to_gpiod_flags
	movl	%eax, 28(%r14)
	leaq	12(%r14), %rbx
	movl	$24, %eax
LBB0_10:
	movl	(%rbx), %ecx
	movl	%ecx, (%r14,%rax)
LBB0_11:
	movl	$1, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ACPI_RESOURCE_TYPE_GPIO,8,3    ## @ACPI_RESOURCE_TYPE_GPIO
	.comm	_ACPI_RESOURCE_GPIO_TYPE_INT,8,3 ## @ACPI_RESOURCE_GPIO_TYPE_INT
	.comm	_ACPI_GPIO_QUIRK_ONLY_GPIOIO,4,2 ## @ACPI_GPIO_QUIRK_ONLY_GPIOIO
	.comm	_GPIOD_IN,4,2                   ## @GPIOD_IN
	.no_dead_strip	_acpi_populate_gpio_lookup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function acpi_populate_gpio_lookup
_acpi_populate_gpio_lookup:             ; @acpi_populate_gpio_lookup
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _ACPI_RESOURCE_TYPE_GPIO@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ACPI_RESOURCE_TYPE_GPIO@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.1:
	mov	x19, x1
	ldr	w8, [x1, #40]
	cbnz	w8, LBB0_10
; %bb.2:
	mov	x20, x0
	mov	x21, x0
	ldr	x22, [x21, #8]!
Lloh3:
	adrp	x8, _ACPI_RESOURCE_GPIO_TYPE_INT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ACPI_RESOURCE_GPIO_TYPE_INT@GOTPAGEOFF]
Lloh5:
	ldr	x23, [x8]
	cmp	x22, x23
	cset	w24, eq
Lloh6:
	adrp	x8, _ACPI_GPIO_QUIRK_ONLY_GPIOIO@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ACPI_GPIO_QUIRK_ONLY_GPIOIO@GOTPAGEOFF]
	ldr	w9, [x19, #16]
Lloh8:
	ldr	w8, [x8]
	and	w9, w8, w9
	ldr	x8, [x19]
	cmp	w9, #0
	ccmp	x22, x23, #0, ne
	b.ne	LBB0_4
; %bb.3:
	add	x8, x8, #1
	str	x8, [x19]
LBB0_4:
	ldrsw	x9, [x19, #44]
	add	w10, w9, #1
	str	w10, [x19, #44]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.5:
	ldrsw	x8, [x19, #8]
	ldr	w9, [x20, #16]
	cmp	w8, w9
	b.ge	LBB0_10
; %bb.6:
	ldr	w0, [x20, #40]
	ldr	x9, [x20, #32]
	ldr	w1, [x9, x8, lsl #2]
	bl	_acpi_get_gpiod
	ldr	w8, [x20, #28]
	stp	w8, w0, [x19, #36]
	str	w24, [x19, #20]
	cmp	x22, x23
	b.ne	LBB0_8
; %bb.7:
Lloh9:
	adrp	x8, _GPIOD_IN@GOTPAGE
Lloh10:
	ldr	x8, [x8, _GPIOD_IN@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	ldr	w9, [x20, #24]
	stp	w9, w8, [x19, #24]
	add	x8, x20, #20
	mov	w9, #32
	b	LBB0_9
LBB0_8:
	mov	x0, x21
	bl	_acpi_gpio_to_gpiod_flags
	str	w0, [x19, #28]
	add	x8, x19, #12
	mov	w9, #24
LBB0_9:
	ldr	w8, [x8]
	str	w8, [x19, x9]
LBB0_10:
	mov	w0, #1
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_ACPI_RESOURCE_TYPE_GPIO,8,3    ; @ACPI_RESOURCE_TYPE_GPIO
	.comm	_ACPI_RESOURCE_GPIO_TYPE_INT,8,3 ; @ACPI_RESOURCE_GPIO_TYPE_INT
	.comm	_ACPI_GPIO_QUIRK_ONLY_GPIOIO,4,2 ; @ACPI_GPIO_QUIRK_ONLY_GPIOIO
	.comm	_GPIOD_IN,4,2                   ; @GPIOD_IN
	.no_dead_strip	_acpi_populate_gpio_lookup
.subsections_via_symbols
