	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___direction_register_cb        ## -- Begin function __direction_register_cb
	.p2align	4, 0x90
___direction_register_cb:               ## @__direction_register_cb
	.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
	movl	%esi, %ebx
	movq	%rdi, %r14
	movq	16(%rdi), %rdi
	callq	___get_cur_panel
	movq	8(%r14), %rcx
	movl	(%rcx), %edx
	testl	%edx, %edx
	movl	$3, %ecx
	cmovgl	%edx, %ecx
	movq	(%rax), %rax
	movl	$1, (%rax)
	addl	$-128, %ebx
	cmpl	$3, %ebx
	ja	LBB0_15
## %bb.1:
	leaq	LJTI0_0(%rip), %rdx
	movslq	(%rdx,%rbx,4), %rsi
	addq	%rdx, %rsi
	jmpq	*%rsi
LBB0_2:
	movq	(%r14), %rax
	cmpl	$0, 4(%rax)
	je	LBB0_15
## %bb.3:
	movl	(%rax), %edx
	subl	%ecx, %edx
	js	LBB0_15
## %bb.4:
	movl	%edx, (%rax)
	jmp	LBB0_15
LBB0_5:
	movq	(%r14), %rcx
	cmpl	$0, 4(%rcx)
	je	LBB0_11
## %bb.6:
	movq	%r14, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	___cursor_right                 ## TAILCALL
LBB0_7:
	movq	(%r14), %rcx
	cmpl	$0, 4(%rcx)
	je	LBB0_12
## %bb.8:
	movq	%r14, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	___cursor_left                  ## TAILCALL
LBB0_9:
	movq	(%r14), %rax
	cmpl	$0, 4(%rax)
	je	LBB0_15
## %bb.10:
	addl	%ecx, (%rax)
	jmp	LBB0_15
LBB0_11:
	incl	4(%rax)
	jmp	LBB0_14
LBB0_12:
	movl	4(%rax), %ecx
	testl	%ecx, %ecx
	jle	LBB0_15
## %bb.13:
	decl	%ecx
	movl	%ecx, 4(%rax)
LBB0_14:
	movl	$1, (%rax)
LBB0_15:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
LJTI0_0:
	.long	L0_0_set_2
	.long	L0_0_set_5
	.long	L0_0_set_7
	.long	L0_0_set_9
	.end_data_region
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___direction_register_cb        ; -- Begin function __direction_register_cb
	.p2align	2
___direction_register_cb:               ; @__direction_register_cb
	.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	x20, x1
	mov	x19, x0
	ldr	x0, [x0, #16]
	bl	___get_cur_panel
	ldr	x8, [x19, #8]
	ldr	w8, [x8]
	mov	w9, #3
	cmp	w8, #0
	csel	w9, w8, w9, gt
	ldr	x8, [x0]
	mov	w10, #1
	str	w10, [x8]
	sub	w10, w20, #128
	cmp	w10, #3
	b.hi	LBB0_14
; %bb.1:
Lloh0:
	adrp	x11, lJTI0_0@PAGE
Lloh1:
	add	x11, x11, lJTI0_0@PAGEOFF
	adr	x12, LBB0_2
	ldrb	w13, [x11, x10]
	add	x12, x12, x13, lsl #2
	br	x12
LBB0_2:
	ldr	x8, [x19]
	ldr	w10, [x8, #4]
	cbz	w10, LBB0_14
; %bb.3:
	ldr	w10, [x8]
	subs	w9, w10, w9
	b.pl	LBB0_10
	b	LBB0_14
LBB0_4:
	ldr	x9, [x19]
	ldr	w9, [x9, #4]
	cbz	w9, LBB0_11
; %bb.5:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	___cursor_right
LBB0_6:
	ldr	x9, [x19]
	ldr	w9, [x9, #4]
	cbz	w9, LBB0_12
; %bb.7:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	___cursor_left
LBB0_8:
	ldr	x8, [x19]
	ldr	w10, [x8, #4]
	cbz	w10, LBB0_14
; %bb.9:
	ldr	w10, [x8]
	add	w9, w10, w9
LBB0_10:
	str	w9, [x8]
	b	LBB0_14
LBB0_11:
	ldr	w9, [x8, #4]
	add	w9, w9, #1
	b	LBB0_13
LBB0_12:
	ldr	w9, [x8, #4]
	subs	w9, w9, #1
	b.lt	LBB0_14
LBB0_13:
	mov	w10, #1
	stp	w10, w9, [x8]
LBB0_14:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_8-LBB0_2)>>2
                                        ; -- End function
.subsections_via_symbols
