	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function REBAR_LayoutRow
_REBAR_LayoutRow:                       ## @REBAR_LayoutRow
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -72(%rbp)                  ## 8-byte Spill
	movq	%r8, %r12
	movl	%edx, %ebx
	movl	%esi, %r13d
	movq	%rdi, %r15
	leaq	L_.str(%rip), %rdi
	xorl	%r14d, %r14d
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	xorl	%eax, %eax
	callq	_TRACE
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	cmpl	%ebx, %r13d
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	%r12, -80(%rbp)                 ## 8-byte Spill
	jge	LBB0_8
## %bb.1:
	movl	%r13d, -60(%rbp)                ## 4-byte Spill
	movl	%r13d, %ebx
	movl	-44(%rbp), %r13d                ## 4-byte Reload
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %r15d
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%ebx, %esi
	callq	_REBAR_GetBand
	movl	%r15d, (%rax)
	incl	%ebx
	cmpl	%ebx, %r13d
	jne	LBB0_2
## %bb.3:
	movl	-60(%rbp), %eax                 ## 4-byte Reload
	cmpl	%r13d, %eax
	movl	%eax, %r13d
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	jge	LBB0_8
## %bb.4:
	xorl	%ebx, %ebx
	movl	%r13d, %r12d
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	addl	%eax, %ebx
	movl	16(%r15), %esi
	movl	20(%r15), %edi
	callq	_max
	movq	%rax, %r14
	movq	%rax, 8(%r15)
	addl	%ebx, %r14d
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	movl	%r12d, %esi
	callq	_next_visible
	movl	%eax, %r12d
	movl	%r14d, %ebx
	cmpl	-44(%rbp), %eax                 ## 4-byte Folded Reload
	jge	LBB0_8
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movl	%r12d, %esi
	callq	_REBAR_GetBand
	movq	%rax, %r15
	movl	$0, %eax
	cmpl	%r13d, %r12d
	jle	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	_SEP_WIDTH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_7
LBB0_8:
	leaq	L_.str.1(%rip), %rdi
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %esi
	subl	%r14d, %esi
	xorl	%eax, %eax
	callq	_TRACE
	subl	%r14d, %ebx
	js	LBB0_9
## %bb.12:
	movl	%ebx, %r14d
	movq	%r15, %rbx
	movq	-80(%rbp), %r15                 ## 8-byte Reload
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	je	LBB0_14
## %bb.13:
	movq	%rbx, %rdi
	movl	%r13d, %esi
	movl	%r12d, %edx
	callq	_REBAR_FindBandToGrow
	movl	%r14d, %ecx
	addq	%rcx, 8(%rax)
	jmp	LBB0_14
LBB0_9:
	negl	%ebx
	movq	_FALSE@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r15, %rdi
	movl	%r13d, %esi
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	movl	%r12d, %edx
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	movl	%ebx, %ecx
	callq	_REBAR_ShrinkBandsRTL
	testl	%eax, %eax
	movq	%r15, %rbx
	movq	-80(%rbp), %r15                 ## 8-byte Reload
	jle	LBB0_14
## %bb.10:
	movl	%eax, %r14d
	movq	%rbx, %rdi
	movl	%r13d, %esi
	callq	_next_visible
	cmpl	%r12d, %eax
	je	LBB0_14
## %bb.11:
	movl	(%r15), %esi
	leaq	L_.str.2(%rip), %rdi
	movl	%r14d, %edx
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	callq	_ERR
LBB0_14:
	movq	%rbx, %rdi
	movl	%r13d, %esi
	movl	%r12d, %edx
	callq	_REBAR_SetRowRectsX
	movq	_RBS_VARHEIGHT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_19
## %bb.15:
	cmpl	$0, (%r15)
	jle	LBB0_16
## %bb.17:
	movq	_SEP_WIDTH@GOTPCREL(%rip), %rax
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movl	(%rbx), %ecx
	addl	(%rax), %ecx
	movl	%ecx, (%rbx)
	jmp	LBB0_18
LBB0_16:
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movl	(%rbx), %ecx
LBB0_18:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r13d, %esi
	movl	%r12d, %edx
	callq	_REBAR_SetBandsHeight
	movl	%eax, (%rbx)
LBB0_19:
	incl	(%r15)
	addq	$40, %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	"Adjusting row [%d;%d). Width: %d\n"

	.comm	_SEP_WIDTH,8,3                  ## @SEP_WIDTH
L_.str.1:                               ## @.str.1
	.asciz	"Extra space: %d\n"

	.comm	_FALSE,4,2                      ## @FALSE
L_.str.2:                               ## @.str.2
	.asciz	"Error layouting row %d - couldn't shrink for %d pixels (%d total shrink)\n"

	.comm	_RBS_VARHEIGHT,4,2              ## @RBS_VARHEIGHT
	.no_dead_strip	_REBAR_LayoutRow
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function REBAR_LayoutRow
_REBAR_LayoutRow:                       ; @REBAR_LayoutRow
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x5
	mov	x19, x4
	mov	x24, x3
	mov	x21, x2
	mov	x22, x1
	mov	x23, x0
	stp	x21, x24, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_TRACE
	cmp	w22, w21
	b.ge	LBB0_6
; %bb.1:
	mov	x25, x22
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w26, [x19]
	mov	x0, x23
	mov	x1, x25
	bl	_REBAR_GetBand
	str	w26, [x0]
	add	w25, w25, #1
	cmp	w21, w25
	b.ne	LBB0_2
; %bb.3:
	cmp	w22, w21
	b.ge	LBB0_6
; %bb.4:
	mov	w27, #0
Lloh2:
	adrp	x28, _SEP_WIDTH@GOTPAGE
Lloh3:
	ldr	x28, [x28, _SEP_WIDTH@GOTPAGEOFF]
	mov	x25, x22
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x23
	mov	x1, x25
	bl	_REBAR_GetBand
	mov	x26, x0
	ldr	w8, [x28]
	cmp	w25, w22
	csel	w8, w8, wzr, gt
	add	w27, w8, w27
	ldr	w0, [x0, #20]
	ldr	w1, [x26, #16]
	bl	_max
	str	x0, [x26, #8]
	add	w27, w27, w0
	mov	x0, x23
	mov	x1, x25
	bl	_next_visible
	mov	x25, x0
	cmp	w0, w21
	b.lt	LBB0_5
	b	LBB0_7
LBB0_6:
	mov	w27, #0
LBB0_7:
	sub	w25, w24, w27
Lloh4:
	adrp	x0, l_.str.1@PAGE
Lloh5:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x25
	bl	_TRACE
	tbnz	w25, #31, LBB0_10
; %bb.8:
	cmp	w27, w24
	b.eq	LBB0_13
; %bb.9:
	mov	x0, x23
	mov	x1, x22
	mov	x2, x21
	bl	_REBAR_FindBandToGrow
	ldr	x8, [x0, #8]
	add	x8, x8, w25, uxtw
	str	x8, [x0, #8]
	b	LBB0_13
LBB0_10:
	neg	w24, w25
Lloh6:
	adrp	x8, _FALSE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh8:
	ldr	w4, [x8]
	mov	x0, x23
	mov	x1, x22
	mov	x2, x21
	mov	x3, x24
	bl	_REBAR_ShrinkBandsRTL
	cmp	w0, #1
	b.lt	LBB0_13
; %bb.11:
	mov	x25, x0
	mov	x0, x23
	mov	x1, x22
	bl	_next_visible
	cmp	w0, w21
	b.eq	LBB0_13
; %bb.12:
	ldr	w1, [x19]
Lloh9:
	adrp	x0, l_.str.2@PAGE
Lloh10:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x2, x25
	mov	x3, x24
	bl	_ERR
LBB0_13:
	mov	x0, x23
	mov	x1, x22
	mov	x2, x21
	bl	_REBAR_SetRowRectsX
	ldr	w8, [x23]
Lloh11:
	adrp	x9, _RBS_VARHEIGHT@GOTPAGE
Lloh12:
	ldr	x9, [x9, _RBS_VARHEIGHT@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_18
; %bb.14:
	ldr	w8, [x19]
	cmp	w8, #0
	b.le	LBB0_16
; %bb.15:
Lloh14:
	adrp	x8, _SEP_WIDTH@GOTPAGE
Lloh15:
	ldr	x8, [x8, _SEP_WIDTH@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	ldr	w9, [x20]
	add	w3, w9, w8
	str	w3, [x20]
	b	LBB0_17
LBB0_16:
	ldr	w3, [x20]
LBB0_17:
	mov	x0, x23
	mov	x1, x22
	mov	x2, x21
	bl	_REBAR_SetBandsHeight
	str	w0, [x20]
LBB0_18:
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
	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
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Adjusting row [%d;%d). Width: %d\n"

	.comm	_SEP_WIDTH,8,3                  ; @SEP_WIDTH
l_.str.1:                               ; @.str.1
	.asciz	"Extra space: %d\n"

	.comm	_FALSE,4,2                      ; @FALSE
l_.str.2:                               ; @.str.2
	.asciz	"Error layouting row %d - couldn't shrink for %d pixels (%d total shrink)\n"

	.comm	_RBS_VARHEIGHT,4,2              ; @RBS_VARHEIGHT
	.no_dead_strip	_REBAR_LayoutRow
.subsections_via_symbols
