	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function prepare_cube_out
_prepare_cube_out:                      ## @prepare_cube_out
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_NB_FACES@GOTPCREL(%rip), %r15
	cmpl	$0, (%r15)
	jle	LBB0_17
## %bb.1:
	movq	%rdi, %r14
	movq	(%rdi), %r12
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rax
	movsbl	(%rax,%rbx), %r13d
	testl	%r13d, %r13d
	je	LBB0_3
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	%r13d, %edi
	callq	_get_direction
	cmpl	$-1, %eax
	je	LBB0_11
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%r12), %rcx
	movl	%eax, (%rcx,%rbx,4)
	incq	%rbx
	movslq	(%r15), %rax
	cmpq	%rax, %rbx
	jl	LBB0_2
## %bb.6:
	testl	%eax, %eax
	jle	LBB0_17
## %bb.7:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r12), %rax
	movsbl	(%rax,%rbx), %r13d
	testl	%r13d, %r13d
	je	LBB0_9
## %bb.14:                              ##   in Loop: Header=BB0_8 Depth=1
	movl	%r13d, %edi
	callq	_get_rotation
	cmpl	$-1, %eax
	je	LBB0_15
## %bb.16:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	24(%r12), %rcx
	movl	%eax, (%rcx,%rbx,4)
	incq	%rbx
	movslq	(%r15), %rax
	cmpq	%rax, %rbx
	jl	LBB0_8
LBB0_17:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
LBB0_4:
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_13
LBB0_11:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
LBB0_12:
	movq	%r14, %rdi
	movl	%r13d, %ecx
	xorl	%eax, %eax
	callq	_av_log
LBB0_13:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_9:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	jmp	LBB0_4
LBB0_15:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.3(%rip), %rdx
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_NB_FACES,4,2                   ## @NB_FACES
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Incomplete out_forder option. Direction for all 6 faces should be specified.\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"Incorrect direction symbol '%c' in out_forder option.\n"

L_.str.2:                               ## @.str.2
	.asciz	"Incomplete out_frot option. Rotation for all 6 faces should be specified.\n"

L_.str.3:                               ## @.str.3
	.asciz	"Incorrect rotation symbol '%c' in out_frot option.\n"

	.no_dead_strip	_prepare_cube_out
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function prepare_cube_out
_prepare_cube_out:                      ; @prepare_cube_out
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
Lloh0:
	adrp	x21, _NB_FACES@GOTPAGE
Lloh1:
	ldr	x21, [x21, _NB_FACES@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.1:
	mov	x19, x0
	mov	x23, #0
	ldr	x22, [x0]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22]
	ldrsb	w20, [x8, x23]
	cbz	w20, LBB0_11
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x20
	bl	_get_direction
	cmn	w0, #1
	b.eq	LBB0_12
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x22, #8]
	str	w0, [x8, x23, lsl #2]
	add	x23, x23, #1
	ldrsw	x8, [x21]
	cmp	x23, x8
	b.lt	LBB0_2
; %bb.5:
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.6:
	mov	x23, #0
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22, #16]
	ldrsb	w20, [x8, x23]
	cbz	w20, LBB0_14
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x20
	bl	_get_rotation
	cmn	w0, #1
	b.eq	LBB0_15
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x22, #24]
	str	w0, [x8, x23, lsl #2]
	add	x23, x23, #1
	ldrsw	x8, [x21]
	cmp	x23, x8
	b.lt	LBB0_7
LBB0_10:
	mov	w0, #0
	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
	add	sp, sp, #80
	ret
LBB0_11:
Lloh2:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x2, l_.str@PAGE
Lloh6:
	add	x2, x2, l_.str@PAGEOFF
	b	LBB0_13
LBB0_12:
Lloh7:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh8:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	str	x20, [sp]
Lloh10:
	adrp	x2, l_.str.1@PAGE
Lloh11:
	add	x2, x2, l_.str.1@PAGEOFF
LBB0_13:
	mov	x0, x19
	bl	_av_log
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	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
	add	sp, sp, #80
	b	_AVERROR
LBB0_14:
Lloh15:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
Lloh18:
	adrp	x2, l_.str.2@PAGE
Lloh19:
	add	x2, x2, l_.str.2@PAGEOFF
	b	LBB0_13
LBB0_15:
Lloh20:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh21:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	str	x20, [sp]
Lloh23:
	adrp	x2, l_.str.3@PAGE
Lloh24:
	add	x2, x2, l_.str.3@PAGEOFF
	b	LBB0_13
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_NB_FACES,4,2                   ; @NB_FACES
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Incomplete out_forder option. Direction for all 6 faces should be specified.\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"Incorrect direction symbol '%c' in out_forder option.\n"

l_.str.2:                               ; @.str.2
	.asciz	"Incomplete out_frot option. Rotation for all 6 faces should be specified.\n"

l_.str.3:                               ; @.str.3
	.asciz	"Incorrect rotation symbol '%c' in out_frot option.\n"

	.no_dead_strip	_prepare_cube_out
.subsections_via_symbols
