	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_permutate_all                  ## -- Begin function permutate_all
	.p2align	4, 0x90
_permutate_all:                         ## @permutate_all
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	$0, -32(%rbp)
	movq	$0, (%rsi)
	movl	(%rdi), %edi
	movl	$8, %esi
	callq	_ecalloc
	movq	%rax, %r15
	movl	(%rbx), %r8d
	testl	%r8d, %r8d
	jle	LBB0_7
## %bb.1:
	leaq	-1(%r8), %rcx
	movl	%r8d, %eax
	andl	$3, %eax
	cmpq	$3, %rcx
	jae	LBB0_3
## %bb.2:
	xorl	%ecx, %ecx
	jmp	LBB0_5
LBB0_3:
	movl	%r8d, %edx
	andl	$-4, %edx
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%rbx), %rsi
	movq	(%rsi,%rcx,8), %rsi
	movq	%rsi, (%r15,%rcx,8)
	movq	8(%rbx), %rsi
	movq	8(%rsi,%rcx,8), %rsi
	movq	%rsi, 8(%r15,%rcx,8)
	movq	8(%rbx), %rsi
	movq	16(%rsi,%rcx,8), %rsi
	movq	%rsi, 16(%r15,%rcx,8)
	movq	8(%rbx), %rsi
	movq	24(%rsi,%rcx,8), %rsi
	movq	%rsi, 24(%r15,%rcx,8)
	addq	$4, %rcx
	cmpq	%rcx, %rdx
	jne	LBB0_4
LBB0_5:
	testq	%rax, %rax
	je	LBB0_7
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%rbx), %rdx
	movq	(%rdx,%rcx,8), %rdx
	movq	%rdx, (%r15,%rcx,8)
	incq	%rcx
	decq	%rax
	jne	LBB0_6
LBB0_7:
	leaq	-32(%rbp), %rdi
	movq	%r14, %rsi
	movq	%r15, %rdx
	xorl	%ecx, %ecx
                                        ## kill: def $r8d killed $r8d killed $r8
	callq	_permute
	movq	%r15, %rdi
	callq	_free
	movq	-32(%rbp), %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_permutate_all                  ; -- Begin function permutate_all
	.p2align	2
_permutate_all:                         ; @permutate_all
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x19, x1
	mov	x21, x0
	str	xzr, [sp, #8]
	str	xzr, [x1]
	ldr	w0, [x0]
	mov	w1, #8
	bl	_ecalloc
	mov	x20, x0
	ldr	w4, [x21]
	cmp	w4, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x8, #0
	lsl	x9, x4, #3
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x21, #8]
	ldr	x10, [x10, x8]
	str	x10, [x20, x8]
	add	x8, x8, #8
	cmp	x9, x8
	b.ne	LBB0_2
LBB0_3:
	add	x0, sp, #8
	mov	x1, x19
	mov	x2, x20
	mov	w3, #0
                                        ; kill: def $w4 killed $w4 killed $x4
	bl	_permute
	mov	x0, x20
	bl	_free
	ldr	x0, [sp, #8]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
