	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dln2_gpio_set_direction
_dln2_gpio_set_direction:               ## @dln2_gpio_set_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	%edx, %r15d
	movl	%esi, %r14d
	callq	_gpiochip_get_data
	movq	%rax, %r12
	movl	%r15d, -40(%rbp)
	movl	%r14d, %edi
	callq	_cpu_to_le16
	movl	%eax, -36(%rbp)
	movl	4(%r12), %edi
	movq	_DLN2_GPIO_PIN_SET_DIRECTION@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-40(%rbp), %rdx
	movl	$8, %ecx
	callq	_dln2_transfer_tx
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_4
## %bb.1:
	movq	_DLN2_GPIO_DIRECTION_OUT@GOTPCREL(%rip), %rax
	movl	(%r12), %esi
	cmpl	%r15d, (%rax)
	jne	LBB0_3
## %bb.2:
	movl	%r14d, %edi
	callq	_set_bit
	jmp	LBB0_4
LBB0_3:
	movl	%r14d, %edi
	callq	_clear_bit
LBB0_4:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DLN2_GPIO_PIN_SET_DIRECTION,4,2 ## @DLN2_GPIO_PIN_SET_DIRECTION
	.comm	_DLN2_GPIO_DIRECTION_OUT,4,2    ## @DLN2_GPIO_DIRECTION_OUT
	.no_dead_strip	_dln2_gpio_set_direction
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dln2_gpio_set_direction
_dln2_gpio_set_direction:               ; @dln2_gpio_set_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	x20, x2
	mov	x19, x1
	bl	_gpiochip_get_data
	mov	x21, x0
	str	w20, [sp, #8]
	mov	x0, x19
	bl	_cpu_to_le16
	str	w0, [sp, #12]
	ldr	w0, [x21, #4]
Lloh0:
	adrp	x8, _DLN2_GPIO_PIN_SET_DIRECTION@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DLN2_GPIO_PIN_SET_DIRECTION@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	w3, #8
	bl	_dln2_transfer_tx
	mov	x22, x0
	tbnz	w0, #31, LBB0_4
; %bb.1:
Lloh3:
	adrp	x8, _DLN2_GPIO_DIRECTION_OUT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DLN2_GPIO_DIRECTION_OUT@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldr	w1, [x21]
	mov	x0, x19
	cmp	w8, w20
	b.ne	LBB0_3
; %bb.2:
	bl	_set_bit
	b	LBB0_4
LBB0_3:
	bl	_clear_bit
LBB0_4:
	mov	x0, x22
	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
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_DLN2_GPIO_PIN_SET_DIRECTION,4,2 ; @DLN2_GPIO_PIN_SET_DIRECTION
	.comm	_DLN2_GPIO_DIRECTION_OUT,4,2    ; @DLN2_GPIO_DIRECTION_OUT
	.no_dead_strip	_dln2_gpio_set_direction
.subsections_via_symbols
