	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function floor1_pack
_floor1_pack:                           ## @floor1_pack
	.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
	movq	%rsi, %r14
	movq	%rdi, %r13
	movq	(%rdi), %rax
	movl	4(%rax), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	8(%rdi), %esi
	movq	%r14, %rdi
	movl	$5, %edx
	callq	_oggpack_write
	cmpl	$0, 8(%r13)
	jle	LBB0_10
## %bb.1:
	movq	16(%r13), %rax
	movl	$-1, %r12d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r12d, %r15d
	movl	(%rax,%rbx,4), %esi
	movq	%r14, %rdi
	movl	$4, %edx
	callq	_oggpack_write
	movq	16(%r13), %rax
	movl	(%rax,%rbx,4), %r12d
	cmpl	%r12d, %r15d
	cmovgl	%r15d, %r12d
	incq	%rbx
	movslq	8(%r13), %rcx
	cmpq	%rcx, %rbx
	jl	LBB0_2
## %bb.3:
	testl	%r12d, %r12d
	js	LBB0_10
## %bb.4:
	incl	%r12d
	xorl	%ebx, %ebx
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_5 Depth=1
	incq	%rbx
	cmpq	%r12, %rbx
	je	LBB0_10
LBB0_5:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_8 Depth 2
	movq	24(%r13), %rax
	movl	(%rax,%rbx,4), %esi
	decl	%esi
	movq	%r14, %rdi
	movl	$3, %edx
	callq	_oggpack_write
	movq	32(%r13), %rax
	movl	(%rax,%rbx,4), %esi
	movq	%r14, %rdi
	movl	$2, %edx
	callq	_oggpack_write
	movq	32(%r13), %rax
	cmpl	$0, (%rax,%rbx,4)
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	40(%r13), %rax
	movl	(%rax,%rbx,4), %esi
	movq	%r14, %rdi
	movl	$8, %edx
	callq	_oggpack_write
	movq	32(%r13), %rax
	cmpl	$31, (%rax,%rbx,4)
	je	LBB0_9
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_8:                                 ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	48(%r13), %rax
	movq	(%rax,%rbx,8), %rax
	movl	(%rax,%r15,4), %esi
	incl	%esi
	movq	%r14, %rdi
	movl	$8, %edx
	callq	_oggpack_write
	movq	32(%r13), %rax
	movzbl	(%rax,%rbx,4), %ecx
	movl	$1, %eax
	shll	%cl, %eax
	incq	%r15
	cltq
	cmpq	%rax, %r15
	jl	LBB0_8
	jmp	LBB0_9
LBB0_10:
	movl	56(%r13), %esi
	decl	%esi
	movq	%r14, %rdi
	movl	$2, %edx
	callq	_oggpack_write
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %edi
	callq	_ilog2
	movq	%r14, %rdi
	movl	%eax, %esi
	movl	$4, %edx
	callq	_oggpack_write
	movl	%ebx, %edi
	callq	_ilog2
	movl	%eax, %r15d
	movl	8(%r13), %eax
	testl	%eax, %eax
	jle	LBB0_17
## %bb.11:
	xorl	%ebx, %ebx
	xorl	%ecx, %ecx
	xorl	%edx, %edx
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_12 Depth=1
	incq	%rbx
	movslq	%eax, %rsi
	movl	%edi, %edx
	cmpq	%rsi, %rbx
	jge	LBB0_17
LBB0_12:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_14 Depth 2
	movq	16(%r13), %rsi
	movq	24(%r13), %rdi
	movslq	(%rsi,%rbx,4), %rsi
	movl	(%rdi,%rsi,4), %r12d
	leal	(%r12,%rdx), %edi
	cmpl	%edi, %ecx
	jge	LBB0_16
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	movl	%edi, -52(%rbp)                 ## 4-byte Spill
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movslq	%ecx, %rbx
	addq	$2, %rbx
	addl	%edx, %r12d
	subl	%ecx, %r12d
	.p2align	4, 0x90
LBB0_14:                                ##   Parent Loop BB0_12 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%r13), %rax
	movl	(%rax,%rbx,4), %esi
	movq	%r14, %rdi
	movl	%r15d, %edx
	callq	_oggpack_write
	incq	%rbx
	decl	%r12d
	jne	LBB0_14
## %bb.15:                              ##   in Loop: Header=BB0_12 Depth=1
	movl	8(%r13), %eax
	movl	-52(%rbp), %edi                 ## 4-byte Reload
	movl	%edi, %ecx
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_16
LBB0_17:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_floor1_pack
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function floor1_pack
_floor1_pack:                           ; @floor1_pack
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x1
	mov	x20, x0
	ldr	x8, [x0]
	ldr	w21, [x8, #4]
	ldr	w1, [x0, #8]
	mov	x0, x19
	mov	w2, #5
	bl	_oggpack_write
	ldr	w8, [x20, #8]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.1:
	mov	x22, #0
	ldr	x8, [x20, #16]
	mov	w23, #-1
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	lsl	x24, x22, #2
	ldr	w1, [x8, x24]
	mov	x0, x19
	mov	w2, #4
	bl	_oggpack_write
	ldr	x8, [x20, #16]
	ldr	w9, [x8, x24]
	cmp	w23, w9
	csel	w23, w23, w9, gt
	add	x22, x22, #1
	ldrsw	x9, [x20, #8]
	cmp	x22, x9
	b.lt	LBB0_2
; %bb.3:
	tbnz	w23, #31, LBB0_10
; %bb.4:
	mov	x22, #0
	add	w23, w23, #1
	mov	w24, #1
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x22, x22, #1
	cmp	x22, x23
	b.eq	LBB0_10
LBB0_6:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_9 Depth 2
	ldr	x8, [x20, #24]
	lsl	x25, x22, #2
	ldr	w8, [x8, x25]
	sub	w1, w8, #1
	mov	x0, x19
	mov	w2, #3
	bl	_oggpack_write
	ldr	x8, [x20, #32]
	ldr	w1, [x8, x25]
	mov	x0, x19
	mov	w2, #2
	bl	_oggpack_write
	ldr	x8, [x20, #32]
	ldr	w8, [x8, x25]
	cbz	w8, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x20, #40]
	ldr	w1, [x8, x25]
	mov	x0, x19
	mov	w2, #8
	bl	_oggpack_write
	ldr	x8, [x20, #32]
	ldr	w8, [x8, x25]
	cmp	w8, #31
	b.eq	LBB0_5
LBB0_8:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	x25, #0
LBB0_9:                                 ;   Parent Loop BB0_6 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x20, #48]
	ldr	x8, [x8, x22, lsl #3]
	ldr	w8, [x8, x25, lsl #2]
	add	w1, w8, #1
	mov	x0, x19
	mov	w2, #8
	bl	_oggpack_write
	add	x25, x25, #1
	ldr	x8, [x20, #32]
	ldr	w8, [x8, x22, lsl #2]
	lsl	w8, w24, w8
	cmp	x25, w8, sxtw
	b.lt	LBB0_9
	b	LBB0_5
LBB0_10:
	ldr	w8, [x20, #56]
	sub	w1, w8, #1
	mov	x0, x19
	mov	w2, #2
	bl	_oggpack_write
	mov	x0, x21
	bl	_ilog2
	mov	x1, x0
	mov	x0, x19
	mov	w2, #4
	bl	_oggpack_write
	mov	x0, x21
	bl	_ilog2
	ldr	w8, [x20, #8]
	cmp	w8, #1
	b.lt	LBB0_17
; %bb.11:
	mov	x21, x0
	mov	x22, #0
	mov	w9, #0
	mov	w10, #0
	b	LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_13 Depth=1
	add	x22, x22, #1
	cmp	x22, w8, sxtw
	mov	x10, x23
	b.ge	LBB0_17
LBB0_13:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_15 Depth 2
	ldp	x12, x11, [x20, #16]
	ldrsw	x12, [x12, x22, lsl #2]
	ldr	w11, [x11, x12, lsl #2]
	add	w23, w11, w10
	cmp	w9, w23
	b.ge	LBB0_12
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	sbfiz	x8, x9, #2, #32
	add	x24, x8, #8
	add	w8, w10, w11
	sub	w25, w8, w9
LBB0_15:                                ;   Parent Loop BB0_13 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x20]
	ldr	w1, [x8, x24]
	mov	x0, x19
	mov	x2, x21
	bl	_oggpack_write
	add	x24, x24, #4
	subs	w25, w25, #1
	b.ne	LBB0_15
; %bb.16:                               ;   in Loop: Header=BB0_13 Depth=1
	ldr	w8, [x20, #8]
	mov	x9, x23
	b	LBB0_12
LBB0_17:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_floor1_pack
.subsections_via_symbols
