	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function chapter_keypress
_chapter_keypress:                      ## @chapter_keypress
	.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
	movq	%rsi, %rbx
	movq	_GDK_KEY_Return@GOTPCREL(%rip), %r13
	movq	_GDK_KEY_Down@GOTPCREL(%rip), %r14
	movq	_GDK_KEY_Up@GOTPCREL(%rip), %rax
	movq	_FALSE@GOTPCREL(%rip), %r12
	cmpq	%rsi, (%r13)
	je	LBB0_3
## %bb.1:
	cmpq	%rbx, (%r14)
	je	LBB0_3
## %bb.2:
	cmpq	%rbx, (%rax)
	jne	LBB0_10
LBB0_3:
	callq	_list_box_get_row
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_GTK_WIDGET
	movl	%eax, %edi
	callq	_gtk_widget_get_parent
	movl	%eax, %edi
	callq	_GTK_LIST_BOX
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	callq	_gtk_list_box_row_get_index
	movl	$1, %ecx
	cmpq	%rbx, (%r13)
	je	LBB0_6
## %bb.4:
	cmpq	%rbx, (%r14)
	je	LBB0_6
## %bb.5:
	movq	_GDK_KEY_Up@GOTPCREL(%rip), %rcx
	cmpq	%rbx, (%rcx)
	sete	%cl
	testl	%eax, %eax
	setg	%dl
	andb	%cl, %dl
	movzbl	%dl, %ecx
	negl	%ecx
LBB0_6:
	addl	%ecx, %eax
	js	LBB0_10
## %bb.7:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %esi
	callq	_gtk_list_box_get_row_at_index
	testq	%rax, %rax
	je	LBB0_10
## %bb.8:
	movq	%rax, %rdi
	callq	_GTK_WIDGET
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	callq	_find_widget
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	%rax, %rdi
	callq	_gtk_widget_grab_focus
	movq	_TRUE@GOTPCREL(%rip), %r12
LBB0_10:
	movl	(%r12), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GDK_KEY_Return,8,3             ## @GDK_KEY_Return
	.comm	_GDK_KEY_Down,8,3               ## @GDK_KEY_Down
	.comm	_GDK_KEY_Up,8,3                 ## @GDK_KEY_Up
	.comm	_FALSE,4,2                      ## @FALSE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"chapter_entry"

	.comm	_TRUE,4,2                       ## @TRUE
	.no_dead_strip	_chapter_keypress
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function chapter_keypress
_chapter_keypress:                      ; @chapter_keypress
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
Lloh0:
	adrp	x23, _GDK_KEY_Return@GOTPAGE
Lloh1:
	ldr	x23, [x23, _GDK_KEY_Return@GOTPAGEOFF]
	ldr	x8, [x23]
Lloh2:
	adrp	x24, _GDK_KEY_Down@GOTPAGE
Lloh3:
	ldr	x24, [x24, _GDK_KEY_Down@GOTPAGEOFF]
	ldr	x9, [x24]
Lloh4:
	adrp	x22, _GDK_KEY_Up@GOTPAGE
Lloh5:
	ldr	x22, [x22, _GDK_KEY_Up@GOTPAGEOFF]
	ldr	x10, [x22]
	cmp	x8, x1
	ccmp	x9, x1, #4, ne
	ccmp	x10, x1, #4, ne
	b.ne	LBB0_7
; %bb.1:
	mov	x19, x1
	bl	_list_box_get_row
	mov	x21, x0
	bl	_GTK_WIDGET
	bl	_gtk_widget_get_parent
	bl	_GTK_LIST_BOX
	mov	x20, x0
	mov	x0, x21
	bl	_gtk_list_box_row_get_index
	ldr	x8, [x23]
	ldr	x9, [x24]
	cmp	x8, x19
	ccmp	x9, x19, #4, ne
	b.ne	LBB0_3
; %bb.2:
	mov	w8, #1
	adds	w1, w0, w8
	b.pl	LBB0_4
	b	LBB0_7
LBB0_3:
	ldr	x8, [x22]
	cmp	x8, x19
	ccmp	w0, #0, #4, eq
	cset	w8, gt
	sbfx	w8, w8, #0, #1
	adds	w1, w0, w8
	b.mi	LBB0_7
LBB0_4:
	mov	x0, x20
	bl	_gtk_list_box_get_row_at_index
	cbz	x0, LBB0_7
; %bb.5:
	bl	_GTK_WIDGET
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_find_widget
	cbz	x0, LBB0_7
; %bb.6:
	bl	_gtk_widget_grab_focus
Lloh8:
	adrp	x8, _TRUE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh10:
	adrp	x8, _FALSE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
LBB0_8:
	ldr	w0, [x8]
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_GDK_KEY_Return,8,3             ; @GDK_KEY_Return
	.comm	_GDK_KEY_Down,8,3               ; @GDK_KEY_Down
	.comm	_GDK_KEY_Up,8,3                 ; @GDK_KEY_Up
	.comm	_FALSE,4,2                      ; @FALSE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"chapter_entry"

	.comm	_TRUE,4,2                       ; @TRUE
	.no_dead_strip	_chapter_keypress
.subsections_via_symbols
