	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function TOOLBAR_CalcStrings
_TOOLBAR_CalcStrings:                   ## @TOOLBAR_CalcStrings
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rsi)
	cmpq	$0, (%rdi)
	je	LBB0_13
## %bb.1:
	movq	%rsi, %r14
	movq	%rdi, %r13
	movl	24(%rdi), %edi
	callq	_GetDC
	movl	%eax, %r15d
	movl	40(%r13), %esi
	movl	%eax, %edi
	callq	_SelectObject
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	8(%r13), %rax
	testq	%rax, %rax
	je	LBB0_2
## %bb.4:
	testq	%rax, %rax
	jg	LBB0_5
	jmp	LBB0_12
LBB0_2:
	cmpq	$0, 16(%r13)
	jle	LBB0_12
## %bb.3:
	leaq	-64(%rbp), %rsi
	movl	%r15d, %edi
	callq	_GetTextMetricsW
	movq	-64(%rbp), %rax
	movq	%rax, 8(%r14)
	movq	8(%r13), %rax
	testq	%rax, %rax
	jle	LBB0_12
LBB0_5:
	movq	32(%r13), %rbx
	xorl	%r12d, %r12d
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_6 Depth=1
	incq	%r12
	addq	$4, %rbx
	cmpq	8(%r13), %r12
	jge	LBB0_12
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_TOOLBAR_GetText
	testq	%rax, %rax
	je	LBB0_11
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movl	%r15d, %edx
	leaq	-64(%rbp), %rcx
	callq	_TOOLBAR_MeasureString
	movq	-64(%rbp), %rax
	cmpq	(%r14), %rax
	jle	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	%rax, (%r14)
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=1
	movq	-56(%rbp), %rax
	cmpq	8(%r14), %rax
	jle	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	%rax, 8(%r14)
	jmp	LBB0_11
LBB0_12:
	movl	%r15d, %edi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_SelectObject
	movl	24(%r13), %edi
	movl	%r15d, %esi
	callq	_ReleaseDC
	movq	(%r14), %rsi
	movq	8(%r14), %rdx
	leaq	L_.str(%rip), %rdi
	callq	_TRACE
LBB0_13:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"max string size %d x %d\n"

	.no_dead_strip	_TOOLBAR_CalcStrings
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function TOOLBAR_CalcStrings
_TOOLBAR_CalcStrings:                   ; @TOOLBAR_CalcStrings
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	stp	xzr, xzr, [x1]
	ldr	x8, [x0]
	cbz	x8, LBB0_13
; %bb.1:
	mov	x19, x1
	mov	x20, x0
	ldr	w0, [x0, #24]
	bl	_GetDC
	mov	x21, x0
	ldr	w1, [x20, #40]
	bl	_SelectObject
	mov	x22, x0
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_3
; %bb.2:
	cmp	x8, #1
	b.ge	LBB0_5
	b	LBB0_12
LBB0_3:
	ldr	x8, [x20, #16]
	cmp	x8, #1
	b.lt	LBB0_12
; %bb.4:
	mov	x1, sp
	mov	x0, x21
	bl	_GetTextMetricsW
	ldr	x8, [sp]
	str	x8, [x19, #8]
	ldr	x8, [x20, #8]
	cmp	x8, #1
	b.lt	LBB0_12
LBB0_5:
	mov	x24, #0
	ldr	x23, [x20, #32]
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	x24, x24, #1
	add	x23, x23, #4
	ldr	x8, [x20, #8]
	cmp	x24, x8
	b.ge	LBB0_12
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x23
	bl	_TOOLBAR_GetText
	cbz	x0, LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x3, sp
	mov	x0, x20
	mov	x1, x23
	mov	x2, x21
	bl	_TOOLBAR_MeasureString
	ldr	x8, [sp]
	ldr	x9, [x19]
	cmp	x8, x9
	b.le	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	str	x8, [x19]
LBB0_10:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [sp, #8]
	ldr	x9, [x19, #8]
	cmp	x8, x9
	b.le	LBB0_6
; %bb.11:                               ;   in Loop: Header=BB0_7 Depth=1
	str	x8, [x19, #8]
	b	LBB0_6
LBB0_12:
	mov	x0, x21
	mov	x1, x22
	bl	_SelectObject
	ldr	w0, [x20, #24]
	mov	x1, x21
	bl	_ReleaseDC
	ldp	x1, x2, [x19]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_TRACE
LBB0_13:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"max string size %d x %d\n"

	.no_dead_strip	_TOOLBAR_CalcStrings
.subsections_via_symbols
