	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stbrp__skyline_pack_rectangle
_stbrp__skyline_pack_rectangle:         ## @stbrp__skyline_pack_rectangle
	.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
	movl	%ecx, %r12d
	movl	%edx, %r15d
	movq	%rsi, %rbx
	movq	%rdi, %r14
	callq	_stbrp__skyline_find_best_pos
	movq	16(%r14), %rsi
	testq	%rsi, %rsi
	je	LBB0_9
## %bb.1:
	movslq	%r12d, %rax
	addq	(%r14), %rax
	cmpq	(%rbx), %rax
	jg	LBB0_9
## %bb.2:
	movq	8(%rbx), %r8
	testq	%r8, %r8
	je	LBB0_9
## %bb.3:
	movq	8(%r14), %rcx
	movq	%rcx, (%r8)
	movq	%rax, 16(%r8)
	movq	8(%r8), %rax
	movq	%rax, 8(%rbx)
	movq	(%rsi), %rdx
	cmpq	%rcx, (%rdx)
	jge	LBB0_5
## %bb.4:
	movq	8(%rdx), %rax
	addq	$8, %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdx
LBB0_5:
	movq	%r8, (%rsi)
	movq	8(%rdx), %rdi
	movslq	%r15d, %rax
	addq	%rax, %rcx
	testq	%rdi, %rdi
	je	LBB0_12
## %bb.6:
	leaq	8(%rdx), %rax
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%rcx, (%rdi)
	jg	LBB0_12
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	%rdi, %rsi
	movq	8(%rbx), %rdi
	movq	%rdi, (%rax)
	movq	%rdx, 8(%rbx)
	leaq	8(%rsi), %rax
	movq	8(%rsi), %rdi
	movq	%rsi, %rdx
	testq	%rdi, %rdi
	jne	LBB0_7
	jmp	LBB0_13
LBB0_9:
	movq	$0, 16(%r14)
LBB0_10:
	movq	%r14, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movq	%rdx, %rsi
LBB0_13:
	movq	%rsi, 8(%r8)
	cmpq	%rcx, (%rsi)
	jge	LBB0_10
## %bb.14:
	movq	%rcx, (%rsi)
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_stbrp__skyline_pack_rectangle
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stbrp__skyline_pack_rectangle
_stbrp__skyline_pack_rectangle:         ; @stbrp__skyline_pack_rectangle
	.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	x22, x2
	mov	x20, x1
	mov	x19, x0
	mov	x21, x8
	bl	_stbrp__skyline_find_best_pos
	ldr	x10, [x21, #16]
	cbz	x10, LBB0_8
; %bb.1:
	ldr	x8, [x21]
	add	x9, x8, w22, sxtw
	ldr	x8, [x19]
	cmp	x9, x8
	b.gt	LBB0_8
; %bb.2:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_8
; %bb.3:
	ldr	x11, [x21, #8]
	str	x11, [x8]
	str	x9, [x8, #16]
	ldr	x9, [x8, #8]
	str	x9, [x19, #8]
	ldr	x9, [x10]
	ldr	x12, [x9]
	cmp	x12, x11
	b.ge	LBB0_5
; %bb.4:
	ldr	x12, [x9, #8]!
	mov	x10, x9
	mov	x9, x12
LBB0_5:
	str	x8, [x10]
	mov	x12, x9
	ldr	x13, [x12, #8]!
	add	x10, x11, w20, sxtw
	cbz	x13, LBB0_10
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	x11, x13
	ldr	x13, [x13]
	cmp	x13, x10
	b.gt	LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x13, [x19, #8]
	str	x13, [x12]
	str	x9, [x19, #8]
	mov	x12, x11
	ldr	x13, [x12, #8]!
	mov	x9, x11
	cbnz	x13, LBB0_6
	b	LBB0_11
LBB0_8:
	str	xzr, [x21, #16]
LBB0_9:
	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
LBB0_10:
	mov	x11, x9
LBB0_11:
	str	x11, [x8, #8]
	ldr	x8, [x11]
	cmp	x8, x10
	b.ge	LBB0_9
; %bb.12:
	str	x10, [x11]
	b	LBB0_9
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_stbrp__skyline_pack_rectangle
.subsections_via_symbols
