	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_acpi_node_get_gpiod            ## -- Begin function acpi_node_get_gpiod
	.p2align	4, 0x90
_acpi_node_get_gpiod:                   ## @acpi_node_get_gpiod
	.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	%rcx, %r14
	movl	%edx, %r15d
	movq	%rsi, %r12
	movq	%rdi, %rbx
	callq	_to_acpi_device_node
	testq	%rax, %rax
	je	LBB0_1
## %bb.11:
	movq	%rax, %rdi
	movq	%r12, %rsi
	movl	%r15d, %edx
	movq	%r14, %rcx
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_acpi_get_gpiod_by_index        ## TAILCALL
LBB0_1:
	movq	%rbx, %rdi
	callq	_is_acpi_data_node
	testl	%eax, %eax
	je	LBB0_2
## %bb.4:
	testq	%r12, %r12
	je	LBB0_5
## %bb.6:
	leaq	-56(%rbp), %r13
	movq	%r13, %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	movl	%r15d, -56(%rbp)
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movl	%r15d, %edx
	movq	%r13, %rcx
	callq	_acpi_gpio_property_lookup
	testl	%eax, %eax
	jne	LBB0_7
## %bb.8:
	leaq	-56(%rbp), %rdi
	movq	%r14, %rsi
	callq	_acpi_gpio_resource_lookup
	testl	%eax, %eax
	je	LBB0_9
LBB0_7:
	movl	%eax, %edi
	callq	_ERR_PTR
LBB0_10:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_3:
	xorl	%edi, %edi
	subl	(%rax), %edi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_9:
	movq	-48(%rbp), %rax
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_acpi_node_get_gpiod            ; -- Begin function acpi_node_get_gpiod
	.p2align	2
_acpi_node_get_gpiod:                   ; @acpi_node_get_gpiod
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	bl	_to_acpi_device_node
	cbz	x0, LBB0_2
; %bb.1:
	mov	x1, x21
	mov	x2, x20
	mov	x3, x19
	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
	add	sp, sp, #64
	b	_acpi_get_gpiod_by_index
LBB0_2:
	mov	x0, x22
	bl	_is_acpi_data_node
	cbz	w0, LBB0_8
; %bb.3:
	cbz	x21, LBB0_9
; %bb.4:
	mov	x0, sp
	mov	w1, #0
	mov	w2, #16
	bl	_memset
	str	w20, [sp]
	mov	x3, sp
	mov	x0, x22
	mov	x1, x21
	mov	x2, x20
	bl	_acpi_gpio_property_lookup
	cbnz	w0, LBB0_6
; %bb.5:
	mov	x0, sp
	mov	x1, x19
	bl	_acpi_gpio_resource_lookup
	cbz	w0, LBB0_11
LBB0_6:
	bl	_ERR_PTR
LBB0_7:
	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
	add	sp, sp, #64
	ret
LBB0_8:
Lloh0:
	adrp	x8, _ENODEV@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_10
LBB0_9:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	neg	w0, w8
	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
	add	sp, sp, #64
	b	_ERR_PTR
LBB0_11:
	ldr	x0, [sp, #8]
	b	LBB0_7
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
