	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function merge_group
_merge_group:                           ## @merge_group
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movq	%rdx, %rbx
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%r8, -72(%rbp)
	movq	%r9, -64(%rbp)
	leaq	-72(%rbp), %rdi
	callq	_bounds_valid
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	cmpl	$0, (%rbx)
	jle	LBB0_15
## %bb.1:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	addq	$4, %rax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	xorl	%ecx, %ecx
	leaq	24(%rbp), %r14
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	incq	%rcx
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	movslq	(%rbx), %rax
	cmpq	%rax, %rcx
	jge	LBB0_15
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
                                        ##       Child Loop BB0_6 Depth 3
	movq	8(%rbx), %r15
	movq	%rcx, -88(%rbp)                 ## 8-byte Spill
	leaq	(%rcx,%rcx,2), %rbx
	movl	16(%r15,%rbx,8), %esi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_view_emplace_layer
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	cmpl	$0, (%r15,%rbx,8)
	jle	LBB0_14
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	(%r15,%rbx,8), %r12
	xorl	%ebx, %ebx
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_4 Depth=2
	incq	%rbx
	movslq	(%r12), %rax
	cmpq	%rax, %rbx
	jge	LBB0_14
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_6 Depth 3
	movq	-104(%rbp), %rdi                ## 8-byte Reload
	callq	_layer_add_element
	movq	%rax, %r13
	leaq	(,%rbx,4), %rsi
	addq	8(%r12), %rsi
	movq	%rax, %rdi
	callq	_element_copy
	cmpl	$0, (%r13)
	jle	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=2
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_6:                                 ##   Parent Loop BB0_2 Depth=1
                                        ##     Parent Loop BB0_4 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movq	16(%r13), %rdi
	movq	%r14, %rsi
	callq	_color_mod
	incl	%r15d
	cmpl	(%r13), %r15d
	jl	LBB0_6
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=2
	movl	16(%rbp), %esi
	testl	%esi, %esi
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=2
	movq	%r13, %rdi
	callq	_element_apply_orientation
LBB0_9:                                 ##   in Loop: Header=BB0_4 Depth=2
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_4 Depth=2
	leaq	4(%r13), %rdi
	leaq	-72(%rbp), %rsi
	callq	_bounds_scale
	movl	-64(%rbp), %eax
	addl	%eax, 8(%r13)
	movl	-72(%rbp), %eax
	addl	%eax, 4(%r13)
LBB0_11:                                ##   in Loop: Header=BB0_4 Depth=2
	cmpl	$0, -48(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_4 Depth=2
	addq	$4, %r13
	movq	-96(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_bounds_union
	movl	%eax, (%r15)
	jmp	LBB0_13
LBB0_15:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_merge_group
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function merge_group
_merge_group:                           ; @merge_group
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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	x19, x6
	mov	x20, x3
	mov	x21, x2
	str	x1, [sp, #8]                    ; 8-byte Folded Spill
	stp	x4, x5, [sp, #32]
	str	w7, [sp, #28]
	add	x0, sp, #32
	bl	_bounds_valid
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_15
; %bb.1:
	mov	x23, x0
	mov	x9, #0
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	add	x24, x8, #4
	str	x21, [sp]                       ; 8-byte Folded Spill
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x9, [sp, #16]                   ; 8-byte Folded Reload
	add	x9, x9, #1
	ldr	x21, [sp]                       ; 8-byte Folded Reload
	ldrsw	x8, [x21]
	cmp	x9, x8
	b.ge	LBB0_15
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
                                        ;       Child Loop BB0_8 Depth 3
	ldr	x21, [x21, #8]
	str	x9, [sp, #16]                   ; 8-byte Folded Spill
	mov	w8, #24
	madd	x28, x9, x8, x21
	ldr	w1, [x28, #16]
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
	bl	_view_emplace_layer
	ldr	w8, [x28]
	cmp	w8, #1
	b.lt	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x25, x0
	mov	x22, #0
	ldr	x8, [sp, #16]                   ; 8-byte Folded Reload
	mov	w9, #24
	madd	x8, x8, x9, x21
	add	x21, x8, #8
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=2
	add	x22, x22, #1
	ldrsw	x8, [x28]
	cmp	x22, x8
	b.ge	LBB0_2
LBB0_6:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_8 Depth 3
	mov	x0, x25
	bl	_layer_add_element
	mov	x26, x0
	ldr	x8, [x21]
	add	x1, x8, x22, lsl #2
	bl	_element_copy
	ldr	w8, [x26]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	mov	w27, #0
LBB0_8:                                 ;   Parent Loop BB0_3 Depth=1
                                        ;     Parent Loop BB0_6 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldr	x0, [x26, #16]
	add	x1, sp, #28
	bl	_color_mod
	add	w27, w27, #1
	ldr	w8, [x26]
	cmp	w27, w8
	b.lt	LBB0_8
LBB0_9:                                 ;   in Loop: Header=BB0_6 Depth=2
	cbz	w19, LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=2
	mov	x0, x26
	mov	x1, x19
	bl	_element_apply_orientation
LBB0_11:                                ;   in Loop: Header=BB0_6 Depth=2
	cbz	w23, LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_6 Depth=2
	add	x0, x26, #4
	add	x1, sp, #32
	bl	_bounds_scale
	ldr	q0, [sp, #32]
	ldur	d1, [x26, #4]
	xtn.2s	v0, v0
	add.2s	v0, v1, v0
	stur	d0, [x26, #4]
LBB0_13:                                ;   in Loop: Header=BB0_6 Depth=2
	cbnz	w20, LBB0_5
; %bb.14:                               ;   in Loop: Header=BB0_6 Depth=2
	add	x1, x26, #4
	mov	x0, x24
	bl	_bounds_union
	str	w0, [x24]
	b	LBB0_5
LBB0_15:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_merge_group
.subsections_via_symbols
