	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function LISTBOX_InsertItem
_LISTBOX_InsertItem:                    ## @LISTBOX_InsertItem
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movl	(%rdi), %r13d
	cmpl	$-1, %esi
	je	LBB0_3
## %bb.1:
	movl	%esi, %r14d
	movq	_LB_ERR@GOTPCREL(%rip), %rax
	testl	%esi, %esi
	js	LBB0_29
## %bb.2:
	movl	4(%r12), %ebx
	cmpl	%r14d, %ebx
	jge	LBB0_4
	jmp	LBB0_29
LBB0_3:
	movl	4(%r12), %ebx
	movl	%ebx, %r14d
LBB0_4:
	cmpq	$0, 32(%r12)
	movq	%rdx, -96(%rbp)                 ## 8-byte Spill
	movq	%rcx, -88(%rbp)                 ## 8-byte Spill
	je	LBB0_8
## %bb.5:
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movq	32(%r12), %rdx
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_HeapSize
	cltq
	movabsq	$-6148914691236517205, %rcx     ## imm = 0xAAAAAAAAAAAAAAAB
	mulq	%rcx
	shrq	$4, %rdx
	movl	4(%r12), %ebx
	cmpl	%edx, %ebx
	jne	LBB0_9
LBB0_6:
	movq	_LB_ARRAY_GRANULARITY@GOTPCREL(%rip), %rax
	addl	(%rax), %ebx
	movq	32(%r12), %r15
	xorl	%eax, %eax
	callq	_GetProcessHeap
	testq	%r15, %r15
	je	LBB0_10
## %bb.7:
	movq	32(%r12), %rdx
	shll	$3, %ebx
	leal	(%rbx,%rbx,2), %ecx
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_HeapReAlloc
	jmp	LBB0_11
LBB0_8:
	xorl	%edx, %edx
	cmpl	%edx, %ebx
	je	LBB0_6
LBB0_9:
	movl	%r13d, -44(%rbp)                ## 4-byte Spill
	movq	32(%r12), %r15
	jmp	LBB0_13
LBB0_10:
	shll	$3, %ebx
	leal	(%rbx,%rbx,2), %edx
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_HeapAlloc
LBB0_11:
	movq	%rax, %r15
	testq	%rax, %rax
	je	LBB0_26
## %bb.12:
	movl	%r13d, -44(%rbp)                ## 4-byte Spill
	movq	%r15, 32(%r12)
LBB0_13:
	movslq	%r14d, %rcx
	leaq	(%rcx,%rcx,2), %rbx
	leaq	(%r15,%rbx,8), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	4(%r12), %eax
	subl	%ecx, %eax
	jle	LBB0_15
## %bb.14:
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	leaq	24(%rsi), %rdi
	shll	$3, %eax
	leal	(%rax,%rax,2), %edx
	callq	_RtlMoveMemory
LBB0_15:
	movq	-96(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, 16(%r15,%rbx,8)
	movq	%r12, %rdi
	callq	_HAS_STRINGS
	xorl	%ecx, %ecx
	testq	%rax, %rax
	movq	-88(%rbp), %rdx                 ## 8-byte Reload
	cmoveq	%rdx, %rcx
	movq	%rcx, 8(%r15,%rbx,8)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	$0, (%rax)
	movq	_FALSE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r15,%rbx,8)
	incl	4(%r12)
	movq	_LBS_OWNERDRAWVARIABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 8(%r12)
	je	LBB0_20
## %bb.16:
	movl	20(%r12), %edi
	movq	_GWLP_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rdx, %rbx
	callq	_GetWindowLongPtrW
	movq	_ODT_LISTBOX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, -60(%rbp)
	movl	%eax, -64(%rbp)
	movl	%r14d, -80(%rbp)
	movq	%rbx, -72(%rbp)
	movl	12(%r12), %ecx
	movl	%ecx, -76(%rbp)
	movl	24(%r12), %edi
	movq	_WM_MEASUREITEM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	-80(%rbp), %rcx
	movl	%eax, %edx
                                        ## kill: def $ecx killed $ecx killed $rcx
	callq	_SendMessageW
	movl	-76(%rbp), %eax
	testl	%eax, %eax
	movl	$1, %r8d
	cmovnel	%eax, %r8d
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	%r8d, (%rax)
	movl	20(%r12), %r15d
	testq	%r13, %r13
	je	LBB0_18
## %bb.17:
	movq	%r13, %rdi
	callq	_debugstr_w
	movq	%rax, %rcx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %r8d
	jmp	LBB0_19
LBB0_18:
	leaq	L_.str.1(%rip), %rcx
LBB0_19:
	leaq	L_.str(%rip), %rdi
	movl	%r15d, %esi
	movl	%r14d, %edx
	callq	_TRACE
LBB0_20:
	movq	%r12, %rdi
	callq	_LISTBOX_UpdateScroll
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_LISTBOX_InvalidateItems
	cmpl	$1, 4(%r12)
	jne	LBB0_22
## %bb.21:
	movq	_FALSE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_LISTBOX_SetCaretIndex
	jmp	LBB0_28
LBB0_22:
	movq	_ISWIN31@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_24
## %bb.23:
	movq	%r12, %rdi
	callq	_IS_MULTISELECT
	testl	%eax, %eax
	je	LBB0_27
LBB0_24:
	movl	16(%r12), %ecx
	movq	_LB_OKAY@GOTPCREL(%rip), %rax
	cmpl	%ecx, %r14d
	jg	LBB0_29
## %bb.25:
	incl	%ecx
	movl	%ecx, 16(%r12)
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	%ecx, (%r12)
	jmp	LBB0_29
LBB0_26:
	movq	_LBN_ERRSPACE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_SEND_NOTIFICATION
	movq	_LB_ERRSPACE@GOTPCREL(%rip), %rax
	jmp	LBB0_29
LBB0_27:
	movl	16(%r12), %esi
	leal	1(%rsi), %eax
	movl	%eax, 16(%r12)
	movq	_TRUE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_FALSE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r12, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_LISTBOX_SetSelection
LBB0_28:
	movq	_LB_OKAY@GOTPCREL(%rip), %rax
LBB0_29:
	movl	(%rax), %eax
	addq	$56, %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	_LB_ARRAY_GRANULARITY,8,3       ## @LB_ARRAY_GRANULARITY
	.comm	_LBN_ERRSPACE,4,2               ## @LBN_ERRSPACE
	.comm	_LB_ERRSPACE,4,2                ## @LB_ERRSPACE
	.comm	_FALSE,4,2                      ## @FALSE
	.comm	_LBS_OWNERDRAWVARIABLE,4,2      ## @LBS_OWNERDRAWVARIABLE
	.comm	_GWLP_ID,4,2                    ## @GWLP_ID
	.comm	_ODT_LISTBOX,4,2                ## @ODT_LISTBOX
	.comm	_WM_MEASUREITEM,4,2             ## @WM_MEASUREITEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[%p]: measure item %d (%s) = %d\n"

L_.str.1:                               ## @.str.1
	.space	1

	.comm	_ISWIN31,8,3                    ## @ISWIN31
	.comm	_TRUE,4,2                       ## @TRUE
	.comm	_LB_OKAY,4,2                    ## @LB_OKAY
	.no_dead_strip	_LISTBOX_InsertItem
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function LISTBOX_InsertItem
_LISTBOX_InsertItem:                    ; @LISTBOX_InsertItem
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x22, x3
	mov	x21, x2
	mov	x19, x0
	ldr	w25, [x0]
	cmn	w1, #1
	b.eq	LBB0_4
; %bb.1:
	mov	x20, x1
	tbnz	w1, #31, LBB0_3
; %bb.2:
	ldr	w8, [x19, #4]
	cmp	w8, w20
	b.ge	LBB0_5
LBB0_3:
Lloh0:
	adrp	x8, _LB_ERR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LB_ERR@GOTPAGEOFF]
	b	LBB0_29
LBB0_4:
	ldr	w8, [x19, #4]
	mov	x20, x8
LBB0_5:
	ldr	x9, [x19, #32]
	cbz	x9, LBB0_7
; %bb.6:
	bl	_GetProcessHeap
	ldr	x2, [x19, #32]
	mov	w1, #0
	bl	_HeapSize
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x8, w0
	mov	x9, #-6148914691236517206
	movk	x9, #43691
	umulh	x8, x8, x9
	lsr	x9, x8, #4
	ldr	w8, [x19, #4]
LBB0_7:
	cmp	w8, w9
	b.ne	LBB0_11
; %bb.8:
Lloh2:
	adrp	x9, _LB_ARRAY_GRANULARITY@GOTPAGE
Lloh3:
	ldr	x9, [x9, _LB_ARRAY_GRANULARITY@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	add	w23, w8, w9
	ldr	x24, [x19, #32]
	bl	_GetProcessHeap
	cbz	x24, LBB0_17
; %bb.9:
	ldr	x2, [x19, #32]
	add	w8, w23, w23, lsl #1
	lsl	w3, w8, #3
	mov	w1, #0
	bl	_HeapReAlloc
	mov	x24, x0
	cbz	x0, LBB0_18
LBB0_10:
	str	x24, [x19, #32]
	b	LBB0_12
LBB0_11:
	ldr	x24, [x19, #32]
LBB0_12:
	sxtw	x26, w20
	mov	w8, #24
	smaddl	x23, w20, w8, x24
	ldr	w8, [x19, #4]
	subs	w8, w8, w20
	b.le	LBB0_14
; %bb.13:
	add	x0, x23, #24
	add	w8, w8, w8, lsl #1
	lsl	w2, w8, #3
	mov	x1, x23
	bl	_RtlMoveMemory
LBB0_14:
	mov	w8, #24
	madd	x26, x26, x8, x24
	str	x21, [x26, #16]
	mov	x0, x19
	bl	_HAS_STRINGS
	cmp	x0, #0
	csel	x8, x22, xzr, eq
	str	x8, [x26, #8]
	str	wzr, [x23]
Lloh5:
	adrp	x24, _FALSE@GOTPAGE
Lloh6:
	ldr	x24, [x24, _FALSE@GOTPAGEOFF]
	ldr	w8, [x24]
	str	w8, [x26, #4]
	ldp	w8, w9, [x19, #4]
	add	w8, w8, #1
	str	w8, [x19, #4]
Lloh7:
	adrp	x8, _LBS_OWNERDRAWVARIABLE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _LBS_OWNERDRAWVARIABLE@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	tst	w8, w9
	b.eq	LBB0_21
; %bb.15:
	ldr	w0, [x19, #20]
Lloh10:
	adrp	x8, _GWLP_ID@GOTPAGE
Lloh11:
	ldr	x8, [x8, _GWLP_ID@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	bl	_GetWindowLongPtrW
	mov	x2, x0
Lloh13:
	adrp	x8, _ODT_LISTBOX@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ODT_LISTBOX@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	stp	w0, w8, [sp, #24]
	str	x22, [sp, #16]
	ldr	w8, [x19, #12]
	stp	w20, w8, [sp, #8]
	ldr	w0, [x19, #24]
Lloh16:
	adrp	x8, _WM_MEASUREITEM@GOTPAGE
Lloh17:
	ldr	x8, [x8, _WM_MEASUREITEM@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	add	x3, sp, #8
	bl	_SendMessageW
	ldr	w8, [sp, #12]
	cmp	w8, #0
	csinc	w4, w8, wzr, ne
	str	w4, [x23]
	ldr	w22, [x19, #20]
	cbz	x21, LBB0_19
; %bb.16:
	mov	x0, x21
	bl	_debugstr_w
	mov	x3, x0
	ldr	w4, [x23]
	b	LBB0_20
LBB0_17:
	add	w8, w23, w23, lsl #1
	lsl	w2, w8, #3
	mov	w1, #0
	bl	_HeapAlloc
	mov	x24, x0
	cbnz	x0, LBB0_10
LBB0_18:
Lloh19:
	adrp	x8, _LBN_ERRSPACE@GOTPAGE
Lloh20:
	ldr	x8, [x8, _LBN_ERRSPACE@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_SEND_NOTIFICATION
Lloh22:
	adrp	x8, _LB_ERRSPACE@GOTPAGE
Lloh23:
	ldr	x8, [x8, _LB_ERRSPACE@GOTPAGEOFF]
	b	LBB0_29
LBB0_19:
Lloh24:
	adrp	x3, l_.str.1@PAGE
Lloh25:
	add	x3, x3, l_.str.1@PAGEOFF
LBB0_20:
Lloh26:
	adrp	x0, l_.str@PAGE
Lloh27:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x22
	mov	x2, x20
	bl	_TRACE
LBB0_21:
	mov	x0, x19
	bl	_LISTBOX_UpdateScroll
	mov	x0, x19
	mov	x1, x20
	bl	_LISTBOX_InvalidateItems
	ldr	w8, [x19, #4]
	cmp	w8, #1
	b.ne	LBB0_23
; %bb.22:
	ldr	w2, [x24]
	mov	x0, x19
	mov	w1, #0
	bl	_LISTBOX_SetCaretIndex
	b	LBB0_28
LBB0_23:
Lloh28:
	adrp	x8, _ISWIN31@GOTPAGE
Lloh29:
	ldr	x8, [x8, _ISWIN31@GOTPAGEOFF]
Lloh30:
	ldr	x8, [x8]
	cbz	x8, LBB0_25
; %bb.24:
	mov	x0, x19
	bl	_IS_MULTISELECT
	cbz	w0, LBB0_27
LBB0_25:
	ldr	w8, [x19, #16]
	cmp	w20, w8
	b.gt	LBB0_28
; %bb.26:
	add	w8, w8, #1
	str	w8, [x19, #16]
	str	w25, [x19]
	b	LBB0_28
LBB0_27:
	ldr	w1, [x19, #16]
	add	w8, w1, #1
	str	w8, [x19, #16]
Lloh31:
	adrp	x8, _TRUE@GOTPAGE
Lloh32:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh33:
	ldr	w2, [x8]
	ldr	w3, [x24]
	mov	x0, x19
	bl	_LISTBOX_SetSelection
LBB0_28:
Lloh34:
	adrp	x8, _LB_OKAY@GOTPAGE
Lloh35:
	ldr	x8, [x8, _LB_OKAY@GOTPAGEOFF]
LBB0_29:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_LB_ERR,4,2                     ; @LB_ERR
	.comm	_LB_ARRAY_GRANULARITY,8,3       ; @LB_ARRAY_GRANULARITY
	.comm	_LBN_ERRSPACE,4,2               ; @LBN_ERRSPACE
	.comm	_LB_ERRSPACE,4,2                ; @LB_ERRSPACE
	.comm	_FALSE,4,2                      ; @FALSE
	.comm	_LBS_OWNERDRAWVARIABLE,4,2      ; @LBS_OWNERDRAWVARIABLE
	.comm	_GWLP_ID,4,2                    ; @GWLP_ID
	.comm	_ODT_LISTBOX,4,2                ; @ODT_LISTBOX
	.comm	_WM_MEASUREITEM,4,2             ; @WM_MEASUREITEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[%p]: measure item %d (%s) = %d\n"

l_.str.1:                               ; @.str.1
	.space	1

	.comm	_ISWIN31,8,3                    ; @ISWIN31
	.comm	_TRUE,4,2                       ; @TRUE
	.comm	_LB_OKAY,4,2                    ; @LB_OKAY
	.no_dead_strip	_LISTBOX_InsertItem
.subsections_via_symbols
