	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gpiod_get_from_of_node         ## -- Begin function gpiod_get_from_of_node
	.p2align	4, 0x90
_gpiod_get_from_of_node:                ## @gpiod_get_from_of_node
	.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	%r8, %r12
	movl	%ecx, %r14d
	movq	%rsi, %r15
	movq	_GPIO_LOOKUP_FLAGS_DEFAULT@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	leaq	-64(%rbp), %rcx
	callq	_of_get_named_gpiod_flags
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	jne	LBB0_20
## %bb.3:
	movl	-64(%rbp), %eax
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	movq	_OF_GPIO_ACTIVE_LOW@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	_OF_GPIO_SINGLE_ENDED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movq	_OF_GPIO_OPEN_DRAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	_OF_GPIO_TRANSITORY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_gpiod_request
	movl	%eax, %r12d
	movq	_EBUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%r12d, %eax
	jne	LBB0_5
## %bb.4:
	movq	_GPIOD_FLAGS_BIT_NONEXCLUSIVE@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	jne	LBB0_20
LBB0_5:
	testl	%r12d, %r12d
	je	LBB0_6
LBB0_19:
	movl	%r12d, %edi
	callq	_ERR_PTR
	movq	%rax, %rbx
	jmp	LBB0_20
LBB0_1:
	xorl	%ebx, %ebx
LBB0_20:
	movq	%rbx, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movl	-60(%rbp), %edx                 ## 4-byte Reload
	testl	%edx, -52(%rbp)                 ## 4-byte Folded Reload
	je	LBB0_7
## %bb.8:
	movq	_GPIO_ACTIVE_LOW@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	jmp	LBB0_9
LBB0_7:
	xorl	%eax, %eax
LBB0_9:
	orq	%r13, %rax
	testl	%edx, -56(%rbp)                 ## 4-byte Folded Reload
	je	LBB0_14
## %bb.10:
	testl	%edx, -48(%rbp)                 ## 4-byte Folded Reload
	je	LBB0_12
## %bb.11:
	movq	_GPIO_OPEN_DRAIN@GOTPCREL(%rip), %rcx
	jmp	LBB0_13
LBB0_12:
	movq	_GPIO_OPEN_SOURCE@GOTPCREL(%rip), %rcx
LBB0_13:
	orq	(%rcx), %rax
LBB0_14:
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	testl	%edx, %ecx
	je	LBB0_15
## %bb.16:
	movq	_GPIO_TRANSITORY@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	jmp	LBB0_17
LBB0_15:
	xorl	%edx, %edx
LBB0_17:
	orq	%rax, %rdx
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movl	%r14d, %ecx
	callq	_gpiod_configure_flags
	testl	%eax, %eax
	jns	LBB0_20
## %bb.18:
	movl	%eax, %r12d
	movq	%rbx, %rdi
	callq	_gpiod_put
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.comm	_GPIO_LOOKUP_FLAGS_DEFAULT,8,3  ## @GPIO_LOOKUP_FLAGS_DEFAULT
	.comm	_OF_GPIO_ACTIVE_LOW,4,2         ## @OF_GPIO_ACTIVE_LOW
	.comm	_OF_GPIO_SINGLE_ENDED,4,2       ## @OF_GPIO_SINGLE_ENDED
	.comm	_OF_GPIO_OPEN_DRAIN,4,2         ## @OF_GPIO_OPEN_DRAIN
	.comm	_OF_GPIO_TRANSITORY,4,2         ## @OF_GPIO_TRANSITORY
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_GPIOD_FLAGS_BIT_NONEXCLUSIVE,4,2 ## @GPIOD_FLAGS_BIT_NONEXCLUSIVE
	.comm	_GPIO_ACTIVE_LOW,8,3            ## @GPIO_ACTIVE_LOW
	.comm	_GPIO_OPEN_DRAIN,8,3            ## @GPIO_OPEN_DRAIN
	.comm	_GPIO_OPEN_SOURCE,8,3           ## @GPIO_OPEN_SOURCE
	.comm	_GPIO_TRANSITORY,8,3            ## @GPIO_TRANSITORY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gpiod_get_from_of_node         ; -- Begin function gpiod_get_from_of_node
	.p2align	2
_gpiod_get_from_of_node:                ; @gpiod_get_from_of_node
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x22, x4
	mov	x20, x3
	mov	x21, x1
Lloh0:
	adrp	x8, _GPIO_LOOKUP_FLAGS_DEFAULT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GPIO_LOOKUP_FLAGS_DEFAULT@GOTPAGEOFF]
Lloh2:
	ldr	x23, [x8]
	add	x3, sp, #12
	bl	_of_get_named_gpiod_flags
	mov	x19, x0
	cbz	x0, LBB0_12
; %bb.1:
	mov	x0, x19
	bl	_IS_ERR
	cbnz	x0, LBB0_12
; %bb.2:
	ldr	w24, [sp, #12]
Lloh3:
	adrp	x8, _OF_GPIO_ACTIVE_LOW@GOTPAGE
Lloh4:
	ldr	x8, [x8, _OF_GPIO_ACTIVE_LOW@GOTPAGEOFF]
Lloh5:
	ldr	w27, [x8]
Lloh6:
	adrp	x8, _OF_GPIO_SINGLE_ENDED@GOTPAGE
Lloh7:
	ldr	x8, [x8, _OF_GPIO_SINGLE_ENDED@GOTPAGEOFF]
Lloh8:
	ldr	w26, [x8]
Lloh9:
	adrp	x8, _OF_GPIO_OPEN_DRAIN@GOTPAGE
Lloh10:
	ldr	x8, [x8, _OF_GPIO_OPEN_DRAIN@GOTPAGEOFF]
Lloh11:
	ldr	w25, [x8]
Lloh12:
	adrp	x8, _OF_GPIO_TRANSITORY@GOTPAGE
Lloh13:
	ldr	x8, [x8, _OF_GPIO_TRANSITORY@GOTPAGEOFF]
Lloh14:
	ldr	w28, [x8]
	mov	x0, x19
	mov	x1, x22
	bl	_gpiod_request
	mov	x22, x0
Lloh15:
	adrp	x8, _EBUSY@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	cmn	w0, w8
	b.ne	LBB0_4
; %bb.3:
Lloh18:
	adrp	x8, _GPIOD_FLAGS_BIT_NONEXCLUSIVE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _GPIOD_FLAGS_BIT_NONEXCLUSIVE@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	tst	w8, w20
	b.ne	LBB0_12
LBB0_4:
	cbz	w22, LBB0_6
LBB0_5:
	mov	x0, x22
	bl	_ERR_PTR
	mov	x19, x0
	b	LBB0_12
LBB0_6:
	and	w9, w27, w24
Lloh21:
	adrp	x10, _GPIO_ACTIVE_LOW@GOTPAGE
Lloh22:
	ldr	x10, [x10, _GPIO_ACTIVE_LOW@GOTPAGEOFF]
	and	w8, w28, w24
Lloh23:
	ldr	x10, [x10]
	cmp	w9, #0
	csel	x9, xzr, x10, eq
	orr	x9, x9, x23
	and	w10, w26, w24
	cbz	w10, LBB0_11
; %bb.7:
	and	w10, w25, w24
	cbz	w10, LBB0_9
; %bb.8:
Lloh24:
	adrp	x10, _GPIO_OPEN_DRAIN@GOTPAGE
Lloh25:
	ldr	x10, [x10, _GPIO_OPEN_DRAIN@GOTPAGEOFF]
	b	LBB0_10
LBB0_9:
Lloh26:
	adrp	x10, _GPIO_OPEN_SOURCE@GOTPAGE
Lloh27:
	ldr	x10, [x10, _GPIO_OPEN_SOURCE@GOTPAGEOFF]
LBB0_10:
	ldr	x10, [x10]
	orr	x9, x10, x9
LBB0_11:
Lloh28:
	adrp	x10, _GPIO_TRANSITORY@GOTPAGE
Lloh29:
	ldr	x10, [x10, _GPIO_TRANSITORY@GOTPAGEOFF]
Lloh30:
	ldr	x10, [x10]
	cmp	w8, #0
	csel	x8, xzr, x10, eq
	orr	x2, x8, x9
	mov	x0, x19
	mov	x1, x21
	mov	x3, x20
	bl	_gpiod_configure_flags
	tbnz	w0, #31, LBB0_13
LBB0_12:
	mov	x0, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_13:
	mov	x22, x0
	mov	x0, x19
	bl	_gpiod_put
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_GPIO_LOOKUP_FLAGS_DEFAULT,8,3  ; @GPIO_LOOKUP_FLAGS_DEFAULT
	.comm	_OF_GPIO_ACTIVE_LOW,4,2         ; @OF_GPIO_ACTIVE_LOW
	.comm	_OF_GPIO_SINGLE_ENDED,4,2       ; @OF_GPIO_SINGLE_ENDED
	.comm	_OF_GPIO_OPEN_DRAIN,4,2         ; @OF_GPIO_OPEN_DRAIN
	.comm	_OF_GPIO_TRANSITORY,4,2         ; @OF_GPIO_TRANSITORY
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_GPIOD_FLAGS_BIT_NONEXCLUSIVE,4,2 ; @GPIOD_FLAGS_BIT_NONEXCLUSIVE
	.comm	_GPIO_ACTIVE_LOW,8,3            ; @GPIO_ACTIVE_LOW
	.comm	_GPIO_OPEN_DRAIN,8,3            ; @GPIO_OPEN_DRAIN
	.comm	_GPIO_OPEN_SOURCE,8,3           ; @GPIO_OPEN_SOURCE
	.comm	_GPIO_TRANSITORY,8,3            ; @GPIO_TRANSITORY
.subsections_via_symbols
