	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function SAIS_BWT
LCPI0_0:
	.byte	0                               ## 0x0
	.byte	4                               ## 0x4
	.byte	8                               ## 0x8
	.byte	12                              ## 0xc
	.space	1
	.space	1
	.space	1
	.space	1
	.space	1
	.space	1
	.space	1
	.space	1
	.space	1
	.space	1
	.space	1
	.space	1
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_SAIS_BWT
	.p2align	4, 0x90
_SAIS_BWT:                              ## @SAIS_BWT
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movl	%esi, %r15d
	movq	%rdi, %r14
	leal	(,%r15,4), %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_10
## %bb.1:
	movq	%rax, %rbx
	movq	%r14, %rdi
	movq	%rax, %rsi
	movl	%r15d, %edx
	movl	%r12d, %ecx
	callq	_SAIS_MAIN
	testl	%eax, %eax
	jne	LBB0_32
## %bb.2:
	testl	%r15d, %r15d
	jle	LBB0_31
## %bb.3:
	movl	%r15d, %r8d
	cmpl	$1, %r15d
	jne	LBB0_11
## %bb.4:
	xorl	%ecx, %ecx
LBB0_5:
	testb	$1, %r8b
	je	LBB0_8
## %bb.6:
	movslq	(%rbx,%rcx,4), %rdx
	testq	%rdx, %rdx
	je	LBB0_8
## %bb.7:
	movzbl	-1(%rdx,%r14), %edx
	movl	%edx, (%rbx,%rcx,4)
LBB0_8:
	cmpl	$8, %r15d
	jb	LBB0_9
## %bb.17:
	leaq	(%rbx,%r8,4), %rcx
	cmpq	%r14, %rcx
	jbe	LBB0_20
## %bb.18:
	leaq	(%r14,%r8), %rcx
	cmpq	%rbx, %rcx
	jbe	LBB0_20
LBB0_9:
	xorl	%ecx, %ecx
LBB0_27:
	movq	%rcx, %rdx
	notq	%rdx
	addq	%r8, %rdx
	movq	%r8, %rsi
	andq	$3, %rsi
	je	LBB0_29
	.p2align	4, 0x90
LBB0_28:                                ## =>This Inner Loop Header: Depth=1
	movzbl	(%rbx,%rcx,4), %eax
	movb	%al, (%r14,%rcx)
	incq	%rcx
	decq	%rsi
	jne	LBB0_28
LBB0_29:
	cmpq	$3, %rdx
	jb	LBB0_31
	.p2align	4, 0x90
LBB0_30:                                ## =>This Inner Loop Header: Depth=1
	movzbl	(%rbx,%rcx,4), %eax
	movb	%al, (%r14,%rcx)
	movzbl	4(%rbx,%rcx,4), %eax
	movb	%al, 1(%r14,%rcx)
	movzbl	8(%rbx,%rcx,4), %eax
	movb	%al, 2(%r14,%rcx)
	movzbl	12(%rbx,%rcx,4), %eax
	movb	%al, 3(%r14,%rcx)
	addq	$4, %rcx
	cmpq	%rcx, %r8
	jne	LBB0_30
	jmp	LBB0_31
LBB0_10:
	movl	$-1, %eax
	jmp	LBB0_32
LBB0_11:
	movl	%r8d, %edx
	andl	$-2, %edx
	xorl	%ecx, %ecx
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_13 Depth=1
	addq	$2, %rcx
	cmpq	%rcx, %rdx
	je	LBB0_5
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movslq	(%rbx,%rcx,4), %rsi
	testq	%rsi, %rsi
	je	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	movzbl	-1(%rsi,%r14), %eax
	movl	%eax, (%rbx,%rcx,4)
LBB0_15:                                ##   in Loop: Header=BB0_13 Depth=1
	movslq	4(%rbx,%rcx,4), %rsi
	testq	%rsi, %rsi
	je	LBB0_12
## %bb.16:                              ##   in Loop: Header=BB0_13 Depth=1
	movzbl	-1(%rsi,%r14), %eax
	movl	%eax, 4(%rbx,%rcx,4)
	jmp	LBB0_12
LBB0_20:
	movl	%r8d, %ecx
	andl	$-8, %ecx
	leaq	-8(%rcx), %rdx
	movq	%rdx, %rsi
	shrq	$3, %rsi
	incq	%rsi
	testq	%rdx, %rdx
	je	LBB0_23
## %bb.21:
	movq	%rsi, %rdi
	andq	$-2, %rdi
	xorl	%edx, %edx
	movdqa	LCPI0_0(%rip), %xmm0            ## xmm0 = <0,4,8,12,u,u,u,u,u,u,u,u,u,u,u,u>
	.p2align	4, 0x90
LBB0_22:                                ## =>This Inner Loop Header: Depth=1
	movdqu	(%rbx,%rdx,4), %xmm1
	movdqu	16(%rbx,%rdx,4), %xmm2
	pshufb	%xmm0, %xmm1
	pshufb	%xmm0, %xmm2
	movd	%xmm1, (%r14,%rdx)
	movd	%xmm2, 4(%r14,%rdx)
	movdqu	32(%rbx,%rdx,4), %xmm1
	movdqu	48(%rbx,%rdx,4), %xmm2
	pshufb	%xmm0, %xmm1
	pshufb	%xmm0, %xmm2
	movd	%xmm1, 8(%r14,%rdx)
	movd	%xmm2, 12(%r14,%rdx)
	addq	$16, %rdx
	addq	$-2, %rdi
	jne	LBB0_22
	jmp	LBB0_24
LBB0_23:
	xorl	%edx, %edx
LBB0_24:
	testb	$1, %sil
	je	LBB0_26
## %bb.25:
	movdqu	(%rbx,%rdx,4), %xmm0
	movdqu	16(%rbx,%rdx,4), %xmm1
	movdqa	LCPI0_0(%rip), %xmm2            ## xmm2 = <0,4,8,12,u,u,u,u,u,u,u,u,u,u,u,u>
	pshufb	%xmm2, %xmm0
	pshufb	%xmm2, %xmm1
	movd	%xmm0, (%r14,%rdx)
	movd	%xmm1, 4(%r14,%rdx)
LBB0_26:
	cmpq	%r8, %rcx
	jne	LBB0_27
LBB0_31:
	movq	%rbx, %rdi
	callq	_free
	xorl	%eax, %eax
LBB0_32:
	popq	%rbx
	popq	%r12
	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
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ; -- Begin function SAIS_BWT
lCPI0_0:
	.byte	0                               ; 0x0
	.byte	4                               ; 0x4
	.byte	8                               ; 0x8
	.byte	12                              ; 0xc
	.byte	16                              ; 0x10
	.byte	20                              ; 0x14
	.byte	24                              ; 0x18
	.byte	28                              ; 0x1c
	.byte	32                              ; 0x20
	.byte	36                              ; 0x24
	.byte	40                              ; 0x28
	.byte	44                              ; 0x2c
	.byte	48                              ; 0x30
	.byte	52                              ; 0x34
	.byte	56                              ; 0x38
	.byte	60                              ; 0x3c
lCPI0_1:
	.byte	0                               ; 0x0
	.byte	4                               ; 0x4
	.byte	8                               ; 0x8
	.byte	12                              ; 0xc
	.byte	16                              ; 0x10
	.byte	20                              ; 0x14
	.byte	24                              ; 0x18
	.byte	28                              ; 0x1c
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_SAIS_BWT
	.p2align	2
_SAIS_BWT:                              ; @SAIS_BWT
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x22, x2
	mov	x21, x1
	mov	x20, x0
	lsl	w0, w1, #2
	bl	_malloc
	cbz	x0, LBB0_7
; %bb.1:
	mov	x19, x0
	mov	x0, x20
	mov	x1, x19
	mov	x2, x21
	mov	x3, x22
	bl	_SAIS_MAIN
	cbnz	w0, LBB0_15
; %bb.2:
	cmp	w21, #1
	b.lt	LBB0_14
; %bb.3:
	mov	w8, w21
	mov	x9, x8
	mov	x10, x19
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x10, x10, #4
	subs	x9, x9, #1
	b.eq	LBB0_8
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldrsw	x11, [x10]
	cbz	w11, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x11, x11, x20
	ldurb	w11, [x11, #-1]
	str	w11, [x10]
	b	LBB0_4
LBB0_7:
	mov	w0, #-1
	b	LBB0_15
LBB0_8:
	cmp	w21, #8
	b.lo	LBB0_11
; %bb.9:
	add	x9, x19, x8, lsl #2
	cmp	x9, x20
	b.ls	LBB0_16
; %bb.10:
	add	x9, x20, x8
	cmp	x9, x19
	b.ls	LBB0_16
LBB0_11:
	mov	x9, #0
LBB0_12:
	add	x10, x20, x9
	add	x11, x19, x9, lsl #2
	sub	x8, x8, x9
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	w9, [x11], #4
	strb	w9, [x10], #1
	subs	x8, x8, #1
	b.ne	LBB0_13
LBB0_14:
	mov	x0, x19
	bl	_free
	mov	w0, #0
LBB0_15:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_16:
	cmp	w21, #64
	b.hs	LBB0_18
; %bb.17:
	mov	x9, #0
	b	LBB0_22
LBB0_18:
	and	x9, x8, #0xffffffc0
	add	x10, x20, #32
	add	x11, x19, #128
Lloh0:
	adrp	x12, lCPI0_0@PAGE
Lloh1:
	ldr	q0, [x12, lCPI0_0@PAGEOFF]
	mov	x12, x9
LBB0_19:                                ; =>This Inner Loop Header: Depth=1
	ldp	q1, q2, [x11, #-128]
	ldp	q3, q4, [x11, #-96]
	ldp	q16, q17, [x11, #-64]
	tbl.16b	v1, { v1, v2, v3, v4 }, v0
	ldp	q18, q19, [x11, #-32]
	tbl.16b	v2, { v16, v17, v18, v19 }, v0
	ldp	q3, q4, [x11]
	ldp	q5, q6, [x11, #32]
	ldp	q16, q17, [x11, #64]
	tbl.16b	v3, { v3, v4, v5, v6 }, v0
	ldp	q18, q19, [x11, #96]
	tbl.16b	v4, { v16, v17, v18, v19 }, v0
	stp	q1, q2, [x10, #-32]
	stp	q3, q4, [x10], #64
	add	x11, x11, #256
	subs	x12, x12, #64
	b.ne	LBB0_19
; %bb.20:
	cmp	x9, x8
	b.eq	LBB0_14
; %bb.21:
	tst	x8, #0x38
	b.eq	LBB0_12
LBB0_22:
	mov	x12, x9
	and	x9, x8, #0xfffffff8
	add	x10, x19, x12, lsl #2
	add	x11, x20, x12
	sub	x12, x12, x9
Lloh2:
	adrp	x13, lCPI0_1@PAGE
Lloh3:
	ldr	q0, [x13, lCPI0_1@PAGEOFF]
LBB0_23:                                ; =>This Inner Loop Header: Depth=1
	ldp	q1, q2, [x10], #32
	tbl.16b	v1, { v1, v2 }, v0
	str	d1, [x11], #8
	adds	x12, x12, #8
	b.ne	LBB0_23
; %bb.24:
	cmp	x9, x8
	b.eq	LBB0_14
	b	LBB0_12
	.loh AdrpLdr	Lloh0, Lloh1
	.loh AdrpLdr	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
