	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function REBAR_NCCalcSize
_REBAR_NCCalcSize:                      ## @REBAR_NCCalcSize
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	_WS_BORDER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdi)
	je	LBB0_2
## %bb.1:
	movq	(%rbx), %r14
	movq	_SM_CXEDGE@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_GetSystemMetrics
	addq	%rax, %r14
	movq	8(%rbx), %rsi
	movq	%r14, %rdi
	callq	_min
	movq	%rax, (%rbx)
	movq	8(%rbx), %r14
	movl	(%r15), %edi
	callq	_GetSystemMetrics
	subq	%rax, %r14
	movq	(%rbx), %rsi
	movq	%r14, %rdi
	callq	_max
	movq	%rax, 8(%rbx)
	movq	16(%rbx), %r14
	movq	_SM_CYEDGE@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	_GetSystemMetrics
	addq	%rax, %r14
	leaq	24(%rbx), %r15
	movq	24(%rbx), %rsi
	movq	%r14, %rdi
	callq	_min
	movq	%rax, 16(%rbx)
	movq	24(%rbx), %r14
	movl	(%r12), %edi
	callq	_GetSystemMetrics
	subq	%rax, %r14
	movq	16(%rbx), %rsi
	movq	%r14, %rdi
	callq	_max
	jmp	LBB0_4
LBB0_2:
	movl	4(%rdi), %edi
	callq	_GetWindowTheme
	testl	%eax, %eax
	je	LBB0_5
## %bb.3:
	leaq	16(%rbx), %r15
	movq	16(%rbx), %rdi
	movq	24(%rbx), %rsi
	incq	%rdi
	callq	_min
LBB0_4:
	movq	%rax, (%r15)
LBB0_5:
	movq	%rbx, %rdi
	callq	_wine_dbgstr_rect
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_TRACE
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WS_BORDER,4,2                  ## @WS_BORDER
	.comm	_SM_CXEDGE,4,2                  ## @SM_CXEDGE
	.comm	_SM_CYEDGE,4,2                  ## @SM_CYEDGE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"new client=(%s)\n"

	.no_dead_strip	_REBAR_NCCalcSize
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function REBAR_NCCalcSize
_REBAR_NCCalcSize:                      ; @REBAR_NCCalcSize
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x1
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _WS_BORDER@GOTPAGE
Lloh1:
	ldr	x9, [x9, _WS_BORDER@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	ldr	x20, [x19]
Lloh3:
	adrp	x21, _SM_CXEDGE@GOTPAGE
Lloh4:
	ldr	x21, [x21, _SM_CXEDGE@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_GetSystemMetrics
	add	x0, x0, x20
	ldr	x1, [x19, #8]
	bl	_min
	str	x0, [x19]
	ldr	x20, [x19, #8]
	ldr	w0, [x21]
	bl	_GetSystemMetrics
	sub	x0, x20, x0
	ldr	x1, [x19]
	bl	_max
	str	x0, [x19, #8]
	ldr	x20, [x19, #16]
Lloh5:
	adrp	x21, _SM_CYEDGE@GOTPAGE
Lloh6:
	ldr	x21, [x21, _SM_CYEDGE@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_GetSystemMetrics
	add	x0, x0, x20
	mov	x20, x19
	ldr	x1, [x20, #24]!
	bl	_min
	str	x0, [x19, #16]
	ldr	x22, [x20]
	ldr	w0, [x21]
	bl	_GetSystemMetrics
	sub	x0, x22, x0
	ldr	x1, [x19, #16]
	bl	_max
	b	LBB0_4
LBB0_2:
	ldr	w0, [x0, #4]
	bl	_GetWindowTheme
	cbz	w0, LBB0_5
; %bb.3:
	mov	x20, x19
	ldp	x8, x1, [x20, #16]!
	add	x0, x8, #1
	bl	_min
LBB0_4:
	str	x0, [x20]
LBB0_5:
	mov	x0, x19
	bl	_wine_dbgstr_rect
	mov	x1, x0
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	bl	_TRACE
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_WS_BORDER,4,2                  ; @WS_BORDER
	.comm	_SM_CXEDGE,4,2                  ; @SM_CXEDGE
	.comm	_SM_CYEDGE,4,2                  ; @SM_CYEDGE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"new client=(%s)\n"

	.no_dead_strip	_REBAR_NCCalcSize
.subsections_via_symbols
