	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rt1310_gpio_pin_setflags
_rt1310_gpio_pin_setflags:              ## @rt1310_gpio_pin_setflags
	.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
	movl	%edx, %r15d
	movl	%esi, %ebx
	callq	_device_get_softc
	movq	%rax, %r14
	movq	_RT_GPIO_NPINS@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	jge	LBB0_2
## %bb.1:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_10
LBB0_2:
	movl	%ebx, %edi
	callq	_rt1310_gpio_get_pinmap
	movq	%rax, %r12
	movl	(%rax), %eax
	movq	_GPIO_PIN_INPUT@GOTPCREL(%rip), %rdx
	movq	_GPIO_PIN_OUTPUT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rdx), %ecx
	notl	%eax
	testl	%eax, %ecx
	jne	LBB0_3
## %bb.4:
	movl	4(%r12), %eax
	cmpl	$128, %eax
	je	LBB0_7
## %bb.5:
                                        ## implicit-def: $ecx
	cmpl	$129, %eax
	jne	LBB0_9
## %bb.6:
	movq	_RT_GPIO_OFF_PADIR@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_3:
	movq	_ENOTSUP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_10
LBB0_7:
	movq	_RT_GPIO_OFF_PBDIR@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %ecx
LBB0_9:
	movq	%r14, %rdi
	movl	%ecx, %esi
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	callq	_rt1310_gpio_read_4
	movl	%eax, %r13d
	movq	_GPIO_PIN_INPUT@GOTPCREL(%rip), %rax
	andl	(%rax), %r15d
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_RT_GPIO_PIN_IDX
	movl	%r13d, %ecx
	btrl	%eax, %ecx
	btsl	%eax, %r13d
	testl	%r15d, %r15d
	cmovnel	%ecx, %r13d
	movq	%r14, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	%r13d, %edx
	callq	_rt1310_gpio_write_4
	xorl	%eax, %eax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RT_GPIO_NPINS,4,2              ## @RT_GPIO_NPINS
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_GPIO_PIN_INPUT,4,2             ## @GPIO_PIN_INPUT
	.comm	_GPIO_PIN_OUTPUT,4,2            ## @GPIO_PIN_OUTPUT
	.comm	_ENOTSUP,4,2                    ## @ENOTSUP
	.comm	_RT_GPIO_OFF_PADIR,4,2          ## @RT_GPIO_OFF_PADIR
	.comm	_RT_GPIO_OFF_PBDIR,4,2          ## @RT_GPIO_OFF_PBDIR
	.no_dead_strip	_rt1310_gpio_pin_setflags
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rt1310_gpio_pin_setflags
_rt1310_gpio_pin_setflags:              ; @rt1310_gpio_pin_setflags
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x2
	mov	x21, x1
	bl	_device_get_softc
Lloh0:
	adrp	x8, _RT_GPIO_NPINS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RT_GPIO_NPINS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w21
	b.ge	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _ENODEV@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	b	LBB0_10
LBB0_2:
	mov	x20, x0
	mov	x0, x21
	bl	_rt1310_gpio_get_pinmap
	ldr	w8, [x0]
Lloh6:
	adrp	x25, _GPIO_PIN_INPUT@GOTPAGE
Lloh7:
	ldr	x25, [x25, _GPIO_PIN_INPUT@GOTPAGEOFF]
	ldr	w9, [x25]
Lloh8:
	adrp	x10, _GPIO_PIN_OUTPUT@GOTPAGE
Lloh9:
	ldr	x10, [x10, _GPIO_PIN_OUTPUT@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
	orr	w9, w10, w9
	bics	wzr, w9, w8
	b.ne	LBB0_6
; %bb.3:
	mov	x22, x0
	ldr	w8, [x0, #4]
	cmp	w8, #128
	b.eq	LBB0_7
; %bb.4:
                                        ; implicit-def: $w23
	cmp	w8, #129
	b.ne	LBB0_9
; %bb.5:
Lloh11:
	adrp	x8, _RT_GPIO_OFF_PADIR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _RT_GPIO_OFF_PADIR@GOTPAGEOFF]
	b	LBB0_8
LBB0_6:
Lloh13:
	adrp	x8, _ENOTSUP@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOTSUP@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	b	LBB0_10
LBB0_7:
Lloh16:
	adrp	x8, _RT_GPIO_OFF_PBDIR@GOTPAGE
Lloh17:
	ldr	x8, [x8, _RT_GPIO_OFF_PBDIR@GOTPAGEOFF]
LBB0_8:
	ldr	w23, [x8]
LBB0_9:
	mov	x0, x20
	mov	x1, x23
	bl	_rt1310_gpio_read_4
	mov	x24, x0
	ldr	w25, [x25]
	mov	x0, x22
	mov	x1, x21
	bl	_RT_GPIO_PIN_IDX
	mov	w8, #1
	lsl	w8, w8, w0
	bic	w9, w24, w8
	orr	w8, w8, w24
	tst	w25, w19
	csel	w2, w8, w9, eq
	mov	x0, x20
	mov	x1, x23
	bl	_rt1310_gpio_write_4
	mov	w0, #0
LBB0_10:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_RT_GPIO_NPINS,4,2              ; @RT_GPIO_NPINS
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_GPIO_PIN_INPUT,4,2             ; @GPIO_PIN_INPUT
	.comm	_GPIO_PIN_OUTPUT,4,2            ; @GPIO_PIN_OUTPUT
	.comm	_ENOTSUP,4,2                    ; @ENOTSUP
	.comm	_RT_GPIO_OFF_PADIR,4,2          ; @RT_GPIO_OFF_PADIR
	.comm	_RT_GPIO_OFF_PBDIR,4,2          ; @RT_GPIO_OFF_PBDIR
	.no_dead_strip	_rt1310_gpio_pin_setflags
.subsections_via_symbols
