	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gpiod_get_direction            ## -- Begin function gpiod_get_direction
	.p2align	4, 0x90
_gpiod_get_direction:                   ## @gpiod_get_direction
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	callq	_gpiod_to_chip
	movq	%rax, %rbx
	movq	%r14, %rdi
	callq	_gpio_chip_hwgpio
	movq	(%rbx), %rcx
	testq	%rcx, %rcx
	je	LBB0_1
## %bb.2:
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	*%rcx
	testl	%eax, %eax
	jle	LBB0_4
## %bb.3:
	movq	_FLAG_IS_OUT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	_clear_bit
	movl	$1, %eax
	jmp	LBB0_6
LBB0_1:
	movq	_ENOTSUPP@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_6
LBB0_4:
	jne	LBB0_6
## %bb.5:
	movq	_FLAG_IS_OUT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	_set_bit
	xorl	%eax, %eax
LBB0_6:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOTSUPP,4,2                   ## @ENOTSUPP
	.comm	_FLAG_IS_OUT,4,2                ## @FLAG_IS_OUT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gpiod_get_direction            ; -- Begin function gpiod_get_direction
	.p2align	2
_gpiod_get_direction:                   ; @gpiod_get_direction
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	_gpiod_to_chip
	mov	x20, x0
	mov	x0, x19
	bl	_gpio_chip_hwgpio
	ldr	x8, [x20]
	cbz	x8, LBB0_3
; %bb.1:
	mov	x1, x0
	mov	x0, x20
	blr	x8
	cmp	w0, #1
	b.lt	LBB0_4
; %bb.2:
Lloh0:
	adrp	x8, _FLAG_IS_OUT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FLAG_IS_OUT@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_clear_bit
	mov	w0, #1
	b	LBB0_6
LBB0_3:
Lloh3:
	adrp	x8, _ENOTSUPP@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOTSUPP@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_4:
	cbnz	w0, LBB0_6
; %bb.5:
Lloh6:
	adrp	x8, _FLAG_IS_OUT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _FLAG_IS_OUT@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_set_bit
	mov	w0, #0
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOTSUPP,4,2                   ; @ENOTSUPP
	.comm	_FLAG_IS_OUT,4,2                ; @FLAG_IS_OUT
.subsections_via_symbols
