	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function st_gpio_get_direction
_st_gpio_get_direction:                 ## @st_gpio_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	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	callq	_gpiochip_get_data
	movq	%rax, %r15
	movl	8(%rax), %eax
	movl	%eax, -40(%rbp)
	leaq	-40(%rbp), %rdi
	movl	%r14d, %esi
	callq	_st_pctl_get_pin_function
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	leaq	-40(%rbp), %rdi
	leaq	-48(%rbp), %rdx
	movl	%r14d, %esi
	callq	_st_pinconf_get_direction
	movq	-48(%rbp), %rdi
	callq	_ST_PINCONF_UNPACK_OE
	testl	%eax, %eax
	jmp	LBB0_3
LBB0_1:
	movq	(%r15), %rbx
	xorl	%edi, %edi
	callq	_REG_PIO_PC
	addq	%rax, %rbx
	movq	%rbx, %rdi
	callq	_readl
	xorl	%r12d, %r12d
	btl	%r14d, %eax
	setb	%r12b
	movq	(%r15), %rbx
	movl	$1, %edi
	callq	_REG_PIO_PC
	addq	%rax, %rbx
	movq	%rbx, %rdi
	callq	_readl
                                        ## kill: def $eax killed $eax def $rax
	movl	%r14d, %ecx
	shrl	%cl, %eax
	andl	$1, %eax
	leal	(%r12,%rax,2), %r12d
	movq	(%r15), %rbx
	movl	$2, %edi
	callq	_REG_PIO_PC
	addq	%rax, %rbx
	movq	%rbx, %rdi
	callq	_readl
                                        ## kill: def $eax killed $eax def $rax
	movl	%r14d, %ecx
	shrl	%cl, %eax
	andl	$1, %eax
	leal	(%r12,%rax,4), %eax
	movq	_ST_GPIO_DIRECTION_IN@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
LBB0_3:
	sete	%al
	movzbl	%al, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ST_GPIO_DIRECTION_IN,4,2       ## @ST_GPIO_DIRECTION_IN
	.no_dead_strip	_st_gpio_get_direction
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function st_gpio_get_direction
_st_gpio_get_direction:                 ; @st_gpio_get_direction
	.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, x1
	bl	_gpiochip_get_data
	mov	x20, x0
	ldr	w8, [x0, #8]
	str	w8, [sp, #8]
	add	x0, sp, #8
	mov	x1, x19
	bl	_st_pctl_get_pin_function
	cbz	w0, LBB0_2
; %bb.1:
	add	x0, sp, #8
	mov	x2, sp
	mov	x1, x19
	bl	_st_pinconf_get_direction
	ldr	x0, [sp]
	bl	_ST_PINCONF_UNPACK_OE
	cmp	w0, #0
	b	LBB0_3
LBB0_2:
	ldr	x21, [x20]
	bl	_REG_PIO_PC
	add	x0, x0, x21
	bl	_readl
	lsr	w8, w0, w19
	and	w21, w8, #0x1
	ldr	x22, [x20]
	mov	w0, #1
	bl	_REG_PIO_PC
	add	x0, x0, x22
	bl	_readl
	lsr	w8, w0, w19
	bfi	w21, w8, #1, #1
	ldr	x20, [x20]
	mov	w0, #2
	bl	_REG_PIO_PC
	add	x0, x0, x20
	bl	_readl
	lsr	w8, w0, w19
	bfi	w21, w8, #2, #1
Lloh0:
	adrp	x8, _ST_GPIO_DIRECTION_IN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ST_GPIO_DIRECTION_IN@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w21, w8
LBB0_3:
	cset	w0, eq
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ST_GPIO_DIRECTION_IN,4,2       ; @ST_GPIO_DIRECTION_IN
	.no_dead_strip	_st_gpio_get_direction
.subsections_via_symbols
