	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vorbis_encode_map_n_res_setup
_vorbis_encode_map_n_res_setup:         ## @vorbis_encode_map_n_res_setup
	.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
	cvttsd2si	%xmm0, %eax
	movq	(%rdi), %rbx
	cltq
	shlq	$4, %rax
	movq	(%rsi,%rax), %rcx
	movq	8(%rsi,%rax), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	__mode_template@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	(%rbx), %rax
	movq	(%rax), %rsi
	xorl	%edx, %edx
	cmpq	8(%rax), %rsi
	sete	%dl
	movl	$2, %eax
	subq	%rdx, %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_1 Depth=1
	incq	%r15
	cmpq	-64(%rbp), %r15                 ## 8-byte Folded Reload
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	je	LBB0_9
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_7 Depth 2
	movq	%rdi, %r13
	movl	$1, %edi
	movl	$16, %esi
	callq	__ogg_calloc
	movq	16(%rbx), %rcx
	movq	%rax, (%rcx,%r15,8)
	movl	$1, %edi
	movl	$16, %esi
	callq	__ogg_calloc
	movq	32(%rbx), %rcx
	movq	%rax, (%rcx,%r15,8)
	movq	32(%rbx), %rax
	movq	(%rax,%r15,8), %rdi
	movq	%r15, %r14
	shlq	$4, %r14
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%r14), %rsi
	movl	$16, %edx
	callq	_memcpy
	movslq	8(%rbx), %rax
	cmpq	%rax, %r15
	jl	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	leal	1(%r15), %eax
	movl	%eax, 8(%rbx)
LBB0_3:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	24(%rbx), %rax
	movq	$0, (%rax,%r15,8)
	movq	16(%rbx), %rax
	movq	(%rax,%r15,8), %rdi
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%r14), %r12
	movq	%r12, %rsi
	movl	$16, %edx
	callq	_memcpy
	movslq	12(%rbx), %rax
	cmpq	%rax, %r15
	jl	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	leal	1(%r15), %eax
	movl	%eax, 12(%rbx)
LBB0_5:                                 ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$0, (%r12)
	movq	%r13, %rdi
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	jle	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%r14), %rbx
	addq	$8, %rbx
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_7:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%rbx), %rax
	movslq	(%rax,%r14,4), %rsi
	leaq	(%rcx,%rsi,4), %rcx
	movq	%r13, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	movl	%r15d, %edx
	callq	_vorbis_encode_residue_setup
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%r13, %rdi
	incq	%r14
	movslq	(%r12), %rax
	cmpq	%rax, %r14
	jl	LBB0_7
	jmp	LBB0_8
LBB0_9:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	__mode_template,8,3             ## @_mode_template
	.no_dead_strip	_vorbis_encode_map_n_res_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vorbis_encode_map_n_res_setup
_vorbis_encode_map_n_res_setup:         ; @vorbis_encode_map_n_res_setup
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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, x0
	mov	x20, #0
	ldr	x22, [x0]
	fcvtzs	w8, d0
	add	x8, x1, w8, sxtw #4
Lloh0:
	adrp	x9, __mode_template@GOTPAGE
Lloh1:
	ldr	x9, [x9, __mode_template@GOTPAGEOFF]
Lloh2:
	ldr	x23, [x9]
	ldr	x9, [x22]
	ldp	x10, x9, [x9]
	cmp	x10, x9
	ldp	x25, x24, [x8]
	mov	w8, #1
	cinc	x26, x8, ne
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	add	x20, x20, #1
	cmp	x20, x26
	b.eq	LBB0_9
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
	mov	w0, #1
	mov	w1, #16
	bl	__ogg_calloc
	ldr	x8, [x22, #16]
	lsl	x21, x20, #3
	str	x0, [x8, x21]
	mov	w0, #1
	mov	w1, #16
	bl	__ogg_calloc
	ldr	x8, [x22, #32]
	str	x0, [x8, x21]
	ldr	x8, [x22, #32]
	ldr	x0, [x8, x21]
	add	x1, x23, x20, lsl #4
	mov	w2, #16
	bl	_memcpy
	ldrsw	x8, [x22, #8]
	cmp	x20, x8
	b.lt	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	w8, w20, #1
	str	w8, [x22, #8]
LBB0_4:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldp	x9, x8, [x22, #16]
	str	xzr, [x8, x21]
	ldr	x0, [x9, x21]
	add	x21, x24, x20, lsl #4
	mov	x1, x21
	mov	w2, #16
	bl	_memcpy
	ldrsw	x8, [x22, #12]
	cmp	x20, x8
	b.lt	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	add	w8, w20, #1
	str	w8, [x22, #12]
LBB0_6:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_1
; %bb.7:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x27, #0
	add	x8, x24, x20, lsl #4
	add	x28, x8, #8
LBB0_8:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x28]
	ldrsw	x1, [x8, x27, lsl #2]
	add	x3, x25, x1, lsl #2
	mov	x0, x19
                                        ; kill: def $w1 killed $w1 killed $x1
	mov	x2, x20
	bl	_vorbis_encode_residue_setup
	add	x27, x27, #1
	ldrsw	x8, [x21]
	cmp	x27, x8
	b.lt	LBB0_8
	b	LBB0_1
LBB0_9:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	__mode_template,8,3             ; @_mode_template
	.no_dead_strip	_vorbis_encode_map_n_res_setup
.subsections_via_symbols
