	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function CBUpdateLBox
_CBUpdateLBox:                          ## @CBUpdateLBox
	.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, %r15
	movq	%rdi, %r14
	movq	_LB_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movl	4(%rdi), %edi
	movq	_WM_GETTEXTLENGTH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_SendMessageW
	movl	%eax, %ebx
	testl	%eax, %eax
	jle	LBB0_1
## %bb.2:
	leal	4(,%rbx,4), %edi
	callq	_heap_alloc
	movq	%rax, %r12
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	callq	_TRACE
	testq	%r12, %r12
	je	LBB0_4
## %bb.3:
	movl	4(%r14), %edi
	incl	%ebx
	movq	%r12, %rsi
	movl	%ebx, %edx
	callq	_GetWindowTextW
	movl	(%r14), %edi
	movq	_LB_FINDSTRING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$-1, %edx
	movl	%r12d, %ecx
	callq	_SendMessageW
	movl	%eax, %r13d
	movq	%r12, %rdi
	callq	_heap_free
	jmp	LBB0_4
LBB0_1:
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	callq	_TRACE
LBB0_4:
	movl	(%r14), %edi
	movq	_LB_SETCURSEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%ebx, %ebx
	cmpq	$1, %r15
	movl	$0, %edx
	sbbl	%edx, %edx
	orl	%r13d, %edx
	xorl	%ecx, %ecx
	callq	_SendMessageW
	movl	(%r14), %edi
	movq	_LB_SETCARETINDEX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	testl	%r13d, %r13d
	cmovgl	%r13d, %ebx
	movl	%ebx, %edx
	xorl	%ecx, %ecx
	callq	_SendMessageW
	movl	(%r14), %edi
	movq	_LB_SETTOPINDEX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edx
	xorl	%ecx, %ecx
	callq	_SendMessageW
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LB_ERR,4,2                     ## @LB_ERR
	.comm	_WM_GETTEXTLENGTH,4,2           ## @WM_GETTEXTLENGTH
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"\t edit text length %i\n"

	.comm	_LB_FINDSTRING,4,2              ## @LB_FINDSTRING
	.comm	_LB_SETCURSEL,4,2               ## @LB_SETCURSEL
	.comm	_LB_SETCARETINDEX,4,2           ## @LB_SETCARETINDEX
	.comm	_LB_SETTOPINDEX,4,2             ## @LB_SETTOPINDEX
	.no_dead_strip	_CBUpdateLBox
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function CBUpdateLBox
_CBUpdateLBox:                          ; @CBUpdateLBox
	.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
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _LB_ERR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LB_ERR@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
	ldr	w0, [x0, #4]
Lloh3:
	adrp	x8, _WM_GETTEXTLENGTH@GOTPAGE
Lloh4:
	ldr	x8, [x8, _WM_GETTEXTLENGTH@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	w2, #0
	mov	w3, #0
	bl	_SendMessageW
	mov	x23, x0
	cmp	w0, #0
	b.le	LBB0_3
; %bb.1:
	lsl	w8, w23, #2
	add	w0, w8, #4
	bl	_heap_alloc
	mov	x22, x0
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x23
	bl	_TRACE
	cbz	x22, LBB0_4
; %bb.2:
	ldr	w0, [x19, #4]
	add	w2, w23, #1
	mov	x1, x22
	bl	_GetWindowTextW
	ldr	w0, [x19]
Lloh8:
	adrp	x8, _LB_FINDSTRING@GOTPAGE
Lloh9:
	ldr	x8, [x8, _LB_FINDSTRING@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	w2, #-1
	mov	x3, x22
	bl	_SendMessageW
	mov	x20, x0
	mov	x0, x22
	bl	_heap_free
	b	LBB0_4
LBB0_3:
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x23
	bl	_TRACE
LBB0_4:
	ldr	w0, [x19]
Lloh13:
	adrp	x8, _LB_SETCURSEL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _LB_SETCURSEL@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	cmp	x21, #0
	csinv	w2, w20, wzr, ne
	mov	w3, #0
	bl	_SendMessageW
	ldr	w0, [x19]
Lloh16:
	adrp	x8, _LB_SETCARETINDEX@GOTPAGE
Lloh17:
	ldr	x8, [x8, _LB_SETCARETINDEX@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	cmp	w20, #0
	csel	w21, w20, wzr, gt
	mov	x2, x21
	mov	w3, #0
	bl	_SendMessageW
	ldr	w0, [x19]
Lloh19:
	adrp	x8, _LB_SETTOPINDEX@GOTPAGE
Lloh20:
	ldr	x8, [x8, _LB_SETTOPINDEX@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	mov	x2, x21
	mov	w3, #0
	bl	_SendMessageW
	mov	x0, x20
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_LB_ERR,4,2                     ; @LB_ERR
	.comm	_WM_GETTEXTLENGTH,4,2           ; @WM_GETTEXTLENGTH
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"\t edit text length %i\n"

	.comm	_LB_FINDSTRING,4,2              ; @LB_FINDSTRING
	.comm	_LB_SETCURSEL,4,2               ; @LB_SETCURSEL
	.comm	_LB_SETCARETINDEX,4,2           ; @LB_SETCARETINDEX
	.comm	_LB_SETTOPINDEX,4,2             ; @LB_SETTOPINDEX
	.no_dead_strip	_CBUpdateLBox
.subsections_via_symbols
