	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_NOTEPAD_FindNext               ## -- Begin function NOTEPAD_FindNext
	.p2align	4, 0x90
_NOTEPAD_FindNext:                      ## @NOTEPAD_FindNext
	.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
	subq	$1080, %rsp                     ## imm = 0x438
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -1120(%rbp)               ## 8-byte Spill
	movq	%rsi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_FALSE@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	movq	%rdi, -1080(%rbp)               ## 8-byte Spill
	movq	8(%rdi), %rdi
	callq	__tcslen
	movq	%rax, -1112(%rbp)               ## 8-byte Spill
	movq	_Globals@GOTPCREL(%rip), %r14
	movl	8(%r14), %edi
	callq	_GetWindowTextLength
	movl	%eax, %r13d
	testl	%eax, %eax
	jle	LBB0_1
## %bb.2:
	xorl	%eax, %eax
	callq	_GetProcessHeap
	leal	4(,%r13,4), %edx
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_HeapAlloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %rbx
	leal	1(%r13), %edx
	movl	8(%r14), %edi
	movq	%rax, %rsi
	callq	_GetWindowText
	jmp	LBB0_5
LBB0_1:
	xorl	%ebx, %ebx
LBB0_5:
	movl	8(%r14), %edi
	movq	_EM_GETSEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-1096(%rbp), %rdx
	leaq	-1104(%rbp), %rcx
	callq	_SendMessage
	testq	%r15, %r15
	je	LBB0_6
## %bb.7:
	movq	-1104(%rbp), %rax
	movq	-1096(%rbp), %rcx
	subq	%rcx, %rax
	movslq	-1112(%rbp), %rdx               ## 4-byte Folded Reload
	cmpq	%rdx, %rax
	jne	LBB0_6
## %bb.8:
	movq	-1080(%rbp), %r15               ## 8-byte Reload
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	%r13d, %edx
	callq	_NOTEPAD_FindTextAt
	testq	%rax, %rax
	je	LBB0_6
## %bb.9:
	movl	8(%r14), %edi
	movq	_EM_REPLACESEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_TRUE@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	16(%r15), %rcx
	callq	_SendMessage
	movq	16(%r15), %rdi
	callq	__tcslen
	subq	-1104(%rbp), %rax
	addq	-1096(%rbp), %rax
	jmp	LBB0_10
LBB0_6:
	xorl	%eax, %eax
LBB0_10:
	movq	%rax, -1088(%rbp)               ## 8-byte Spill
	movq	_FR_DOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-1080(%rbp), %rcx               ## 8-byte Reload
	testl	%eax, (%rcx)
	je	LBB0_19
## %bb.11:
	movq	%rbx, %r14
	movq	-1104(%rbp), %r15
	movslq	%r13d, %rbx
	cmpq	%rbx, %r15
	jge	LBB0_12
## %bb.13:
	movq	-1080(%rbp), %r12               ## 8-byte Reload
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movq	%r14, %rsi
	movl	%r13d, %edx
	movq	%r15, %rcx
	callq	_NOTEPAD_FindTextAt
	testq	%rax, %rax
	jne	LBB0_24
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
	incq	%r15
	cmpq	%r15, %rbx
	jne	LBB0_14
	jmp	LBB0_16
LBB0_19:
	movq	-1096(%rbp), %r14
	testq	%r14, %r14
	jle	LBB0_20
	.p2align	4, 0x90
LBB0_21:                                ## =>This Inner Loop Header: Depth=1
	leaq	-1(%r14), %r15
	movq	-1080(%rbp), %rdi               ## 8-byte Reload
	movq	%rbx, %rsi
	movl	%r13d, %edx
	movq	%r15, %rcx
	callq	_NOTEPAD_FindTextAt
	movq	%rax, %r12
	testq	%rax, %rax
	jne	LBB0_23
## %bb.22:                              ##   in Loop: Header=BB0_21 Depth=1
	cmpq	$1, %r14
	movq	%r15, %r14
	ja	LBB0_21
	jmp	LBB0_23
LBB0_12:
	movq	%r14, %rbx
	jmp	LBB0_23
LBB0_3:
	movq	_FALSE@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	jmp	LBB0_27
LBB0_20:
	movq	%r14, %r15
LBB0_23:
	movq	%rbx, %r14
	testq	%r12, %r12
	movq	-1080(%rbp), %r12               ## 8-byte Reload
	je	LBB0_16
LBB0_24:
	xorl	%eax, %eax
	cmpq	-1096(%rbp), %r15
	movq	-1088(%rbp), %rdx               ## 8-byte Reload
	cmovleq	%rax, %rdx
	addq	%r15, %rdx
	movq	_Globals@GOTPCREL(%rip), %rbx
	movl	8(%rbx), %edi
	movq	_EM_SETSEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movslq	-1112(%rbp), %rcx               ## 4-byte Folded Reload
	addq	%rdx, %rcx
	callq	_SendMessage
	movl	8(%rbx), %edi
	movq	_EM_SCROLLCARET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_SendMessage
	movq	_TRUE@GOTPCREL(%rip), %rax
	jmp	LBB0_25
LBB0_16:
	cmpq	$0, -1120(%rbp)                 ## 8-byte Folded Reload
	je	LBB0_18
## %bb.17:
	movq	_Globals@GOTPCREL(%rip), %rax
	movl	4(%rax), %r15d
	movq	_STRING_CANNOTFIND@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r12, %r13
	leaq	-560(%rbp), %r12
	movq	%r12, %rdi
	callq	_ARRAY_SIZE
	movl	%r15d, %edi
	movl	%ebx, %esi
	movq	%r12, %rdx
	movl	%eax, %ecx
	callq	_LoadString
	leaq	-1072(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_ARRAY_SIZE
	movq	8(%r13), %rcx
	movq	%rbx, %rdi
	movl	%eax, %esi
	movq	%r12, %rdx
	callq	__sntprintf
	movq	_Globals@GOTPCREL(%rip), %r15
	movl	4(%r15), %r13d
	movq	_STRING_NOTEPAD@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r12, %rdi
	callq	_ARRAY_SIZE
	movl	%r13d, %edi
	movl	%ebx, %esi
	movq	%r12, %rdx
	movl	%eax, %ecx
	callq	_LoadString
	movl	(%r15), %edi
	movq	_MB_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-1072(%rbp), %rsi
	movq	%r12, %rdx
	callq	_MessageBox
LBB0_18:
	movq	_FALSE@GOTPCREL(%rip), %rax
LBB0_25:
	movq	(%rax), %rbx
	testq	%r14, %r14
	je	LBB0_27
## %bb.26:
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movl	%eax, %edi
	xorl	%esi, %esi
	movq	%r14, %rdx
	callq	_HeapFree
LBB0_27:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_29
## %bb.28:
	movq	%rbx, %rax
	addq	$1080, %rsp                     ## imm = 0x438
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_29:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_FALSE,8,3                      ## @FALSE
	.comm	_Globals,12,2                   ## @Globals
	.comm	_EM_GETSEL,4,2                  ## @EM_GETSEL
	.comm	_EM_REPLACESEL,4,2              ## @EM_REPLACESEL
	.comm	_TRUE,8,3                       ## @TRUE
	.comm	_FR_DOWN,4,2                    ## @FR_DOWN
	.comm	_EM_SETSEL,4,2                  ## @EM_SETSEL
	.comm	_EM_SCROLLCARET,4,2             ## @EM_SCROLLCARET
	.comm	_STRING_CANNOTFIND,4,2          ## @STRING_CANNOTFIND
	.comm	_STRING_NOTEPAD,4,2             ## @STRING_NOTEPAD
	.comm	_MB_OK,4,2                      ## @MB_OK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_NOTEPAD_FindNext               ; -- Begin function NOTEPAD_FindNext
	.p2align	2
_NOTEPAD_FindNext:                      ; @NOTEPAD_FindNext
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #1056
	mov	x22, x2
	mov	x25, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-96]
Lloh3:
	adrp	x28, _FALSE@GOTPAGE
Lloh4:
	ldr	x28, [x28, _FALSE@GOTPAGEOFF]
	ldr	x24, [x28]
	ldr	x0, [x0, #8]
	bl	__tcslen
	mov	x21, x0
Lloh5:
	adrp	x27, _Globals@GOTPAGE
Lloh6:
	ldr	x27, [x27, _Globals@GOTPAGEOFF]
	ldr	w0, [x27, #8]
	bl	_GetWindowTextLength
	mov	x23, x0
	cmp	w0, #1
	b.lt	LBB0_3
; %bb.1:
	bl	_GetProcessHeap
	add	w26, w23, #1
	lsl	w2, w26, #2
	mov	w1, #0
	bl	_HeapAlloc
	cbz	x0, LBB0_18
; %bb.2:
	mov	x19, x0
	ldr	w0, [x27, #8]
	mov	x1, x19
	mov	x2, x26
	bl	_GetWindowText
	b	LBB0_4
LBB0_3:
	mov	x19, #0
LBB0_4:
	ldr	w0, [x27, #8]
Lloh7:
	adrp	x8, _EM_GETSEL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EM_GETSEL@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x3, sp
	bl	_SendMessage
	cbz	x25, LBB0_8
; %bb.5:
	ldp	x8, x3, [sp]
	sub	x8, x8, x3
	cmp	x8, w21, sxtw
	b.ne	LBB0_8
; %bb.6:
	mov	x0, x20
	mov	x1, x19
	mov	x2, x23
	bl	_NOTEPAD_FindTextAt
	cbz	x0, LBB0_8
; %bb.7:
Lloh10:
	adrp	x8, _EM_REPLACESEL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EM_REPLACESEL@GOTPAGEOFF]
	ldr	w0, [x27, #8]
Lloh12:
	ldr	w1, [x8]
Lloh13:
	adrp	x8, _TRUE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh15:
	ldr	x2, [x8]
	ldr	x3, [x20, #16]
	bl	_SendMessage
	ldr	x0, [x20, #16]
	bl	__tcslen
	ldp	x8, x9, [sp]
	sub	x8, x0, x8
	add	x26, x8, x9
	b	LBB0_9
LBB0_8:
	mov	x26, #0
LBB0_9:
	ldr	w8, [x20]
Lloh16:
	adrp	x9, _FR_DOWN@GOTPAGE
Lloh17:
	ldr	x9, [x9, _FR_DOWN@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_13
; %bb.10:
	ldr	x25, [sp]
	sxtw	x28, w23
	cmp	x25, x28
	b.ge	LBB0_16
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x19
	mov	x2, x23
	mov	x3, x25
	bl	_NOTEPAD_FindTextAt
	cbnz	x0, LBB0_17
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	add	x25, x25, #1
	cmp	x28, x25
	b.ne	LBB0_11
	b	LBB0_20
LBB0_13:
	ldr	x28, [sp, #8]
	cmp	x28, #1
	b.lt	LBB0_19
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	sub	x25, x28, #1
	mov	x0, x20
	mov	x1, x19
	mov	x2, x23
	mov	x3, x25
	bl	_NOTEPAD_FindTextAt
	mov	x24, x0
	cbnz	x0, LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	cmp	x28, #1
	mov	x28, x25
	b.hi	LBB0_14
LBB0_16:
	cbz	x24, LBB0_20
LBB0_17:
	ldr	x8, [sp, #8]
	cmp	x25, x8
	csel	x8, x26, xzr, gt
	add	x2, x8, x25
	ldr	w0, [x27, #8]
Lloh19:
	adrp	x8, _EM_SETSEL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EM_SETSEL@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	add	x3, x2, w21, sxtw
	bl	_SendMessage
	ldr	w0, [x27, #8]
Lloh22:
	adrp	x8, _EM_SCROLLCARET@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EM_SCROLLCARET@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	mov	x2, #0
	mov	x3, #0
	bl	_SendMessage
Lloh25:
	adrp	x8, _TRUE@GOTPAGE
Lloh26:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh27:
	ldr	x20, [x8]
	cbnz	x19, LBB0_23
	b	LBB0_24
LBB0_18:
	ldr	x20, [x28]
	b	LBB0_24
LBB0_19:
	mov	x25, x28
	cbnz	x24, LBB0_17
LBB0_20:
	cbz	x22, LBB0_22
; %bb.21:
	ldr	w21, [x27, #4]
Lloh28:
	adrp	x8, _STRING_CANNOTFIND@GOTPAGE
Lloh29:
	ldr	x8, [x8, _STRING_CANNOTFIND@GOTPAGEOFF]
Lloh30:
	ldr	w22, [x8]
	add	x0, sp, #528
	bl	_ARRAY_SIZE
	mov	x3, x0
	add	x2, sp, #528
	mov	x0, x21
	mov	x1, x22
	bl	_LoadString
	add	x0, sp, #16
	bl	_ARRAY_SIZE
	mov	x1, x0
	ldr	x3, [x20, #8]
	add	x0, sp, #16
	add	x2, sp, #528
	bl	__sntprintf
	ldr	w20, [x27, #4]
Lloh31:
	adrp	x8, _STRING_NOTEPAD@GOTPAGE
Lloh32:
	ldr	x8, [x8, _STRING_NOTEPAD@GOTPAGEOFF]
Lloh33:
	ldr	w21, [x8]
	add	x0, sp, #528
	bl	_ARRAY_SIZE
	mov	x3, x0
	add	x2, sp, #528
	mov	x0, x20
	mov	x1, x21
	bl	_LoadString
	ldr	w0, [x27]
Lloh34:
	adrp	x8, _MB_OK@GOTPAGE
Lloh35:
	ldr	x8, [x8, _MB_OK@GOTPAGEOFF]
Lloh36:
	ldr	w3, [x8]
	add	x1, sp, #16
	add	x2, sp, #528
	bl	_MessageBox
LBB0_22:
Lloh37:
	adrp	x8, _FALSE@GOTPAGE
Lloh38:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh39:
	ldr	x20, [x8]
	cbz	x19, LBB0_24
LBB0_23:
	bl	_GetProcessHeap
	mov	w1, #0
	mov	x2, x19
	bl	_HeapFree
LBB0_24:
	ldur	x8, [x29, #-96]
Lloh40:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh41:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh42:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_26
; %bb.25:
	mov	x0, x20
	add	sp, sp, #1056
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_26:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.cfi_endproc
                                        ; -- End function
	.comm	_FALSE,8,3                      ; @FALSE
	.comm	_Globals,12,2                   ; @Globals
	.comm	_EM_GETSEL,4,2                  ; @EM_GETSEL
	.comm	_EM_REPLACESEL,4,2              ; @EM_REPLACESEL
	.comm	_TRUE,8,3                       ; @TRUE
	.comm	_FR_DOWN,4,2                    ; @FR_DOWN
	.comm	_EM_SETSEL,4,2                  ; @EM_SETSEL
	.comm	_EM_SCROLLCARET,4,2             ; @EM_SCROLLCARET
	.comm	_STRING_CANNOTFIND,4,2          ; @STRING_CANNOTFIND
	.comm	_STRING_NOTEPAD,4,2             ; @STRING_NOTEPAD
	.comm	_MB_OK,4,2                      ; @MB_OK
.subsections_via_symbols
