	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function LISTBOX_SetCount
_LISTBOX_SetCount:                      ## @LISTBOX_SetCount
	.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
	movq	%rsi, %r14
	movq	%rdi, %rbx
	callq	_HAS_STRINGS
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_ERROR_SETCOUNT_ON_BAD_LB@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_SetLastError
	movq	_LB_ERR@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_2:
	movq	(%rbx), %rsi
	cmpq	%r14, %rsi
	jge	LBB0_5
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movl	$-1, %esi
	xorl	%edx, %edx
	callq	_LISTBOX_InsertString
	testl	%eax, %eax
	js	LBB0_10
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpq	%r14, (%rbx)
	jl	LBB0_3
	jmp	LBB0_8
LBB0_5:
	jle	LBB0_8
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	decq	%rsi
	movq	%rbx, %rdi
	callq	_LISTBOX_RemoveItem
	testl	%eax, %eax
	js	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	(%rbx), %rsi
	cmpq	%r14, %rsi
	jg	LBB0_6
LBB0_8:
	movl	8(%rbx), %edi
	movq	_TRUE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	callq	_InvalidateRect
	movq	_LB_OKAY@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %eax
LBB0_10:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ERROR_SETCOUNT_ON_BAD_LB,4,2   ## @ERROR_SETCOUNT_ON_BAD_LB
	.comm	_LB_ERR,4,2                     ## @LB_ERR
	.comm	_TRUE,4,2                       ## @TRUE
	.comm	_LB_OKAY,4,2                    ## @LB_OKAY
	.no_dead_strip	_LISTBOX_SetCount
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function LISTBOX_SetCount
_LISTBOX_SetCount:                      ; @LISTBOX_SetCount
	.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
	bl	_HAS_STRINGS
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _ERROR_SETCOUNT_ON_BAD_LB@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ERROR_SETCOUNT_ON_BAD_LB@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_SetLastError
Lloh3:
	adrp	x8, _LB_ERR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _LB_ERR@GOTPAGEOFF]
	b	LBB0_9
LBB0_2:
	ldr	x8, [x19]
	cmp	x8, x20
	b.ge	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	w1, #-1
	mov	w2, #0
	bl	_LISTBOX_InsertString
	tbnz	w0, #31, LBB0_10
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x19]
	cmp	x8, x20
	b.lt	LBB0_3
	b	LBB0_8
LBB0_5:
	b.le	LBB0_8
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	sub	x1, x8, #1
	mov	x0, x19
	bl	_LISTBOX_RemoveItem
	tbnz	w0, #31, LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x19]
	cmp	x8, x20
	b.gt	LBB0_6
LBB0_8:
	ldr	w0, [x19, #8]
Lloh5:
	adrp	x8, _TRUE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	x1, #0
	bl	_InvalidateRect
Lloh8:
	adrp	x8, _LB_OKAY@GOTPAGE
Lloh9:
	ldr	x8, [x8, _LB_OKAY@GOTPAGEOFF]
LBB0_9:
	ldr	w0, [x8]
LBB0_10:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_ERROR_SETCOUNT_ON_BAD_LB,4,2   ; @ERROR_SETCOUNT_ON_BAD_LB
	.comm	_LB_ERR,4,2                     ; @LB_ERR
	.comm	_TRUE,4,2                       ; @TRUE
	.comm	_LB_OKAY,4,2                    ; @LB_OKAY
	.no_dead_strip	_LISTBOX_SetCount
.subsections_via_symbols
