	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_divbwt                         ## -- Begin function divbwt
	.p2align	4, 0x90
_divbwt:                                ## @divbwt
	.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
	movl	$-1, %r13d
	testq	%rdi, %rdi
	je	LBB0_40
## %bb.1:
	movq	%rsi, %r15
	testq	%rsi, %rsi
	je	LBB0_40
## %bb.2:
	movl	%ecx, %ebx
	testl	%ecx, %ecx
	js	LBB0_40
## %bb.3:
	movq	%rdi, %r14
	cmpl	$1, %ebx
	ja	LBB0_6
## %bb.4:
	xorl	%r13d, %r13d
	cmpl	$1, %ebx
	jne	LBB0_40
## %bb.5:
	movq	(%r14), %rax
	movq	%rax, (%r15)
	movl	$1, %r13d
	jmp	LBB0_40
LBB0_6:
	movq	%rdx, %r12
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	testq	%rdx, %rdx
	jne	LBB0_8
## %bb.7:
	leal	4(,%rbx,4), %edi
	callq	_malloc
	movq	%rax, %r12
LBB0_8:
	movq	_BUCKET_A_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	shll	$2, %edi
	callq	_malloc
	movq	%rax, %r13
	movq	_BUCKET_B_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	shll	$2, %edi
	callq	_malloc
	testq	%r12, %r12
	je	LBB0_18
## %bb.9:
	testq	%r13, %r13
	movq	%r13, %rdx
	je	LBB0_19
## %bb.10:
	testq	%rax, %rax
	movl	$-2, %r13d
	je	LBB0_38
## %bb.11:
	movq	%r14, %rdi
	movq	%r12, %rsi
	movq	%rax, %rcx
	movl	%ebx, %r8d
	movq	%rdx, %r13
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	callq	_sort_typeBstar
	movq	%r14, %rdi
	movq	%r12, %rsi
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdx
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	%ebx, %r8d
	movl	%eax, %r9d
	callq	_construct_BWT
	movl	%eax, %r13d
	leal	-1(%rbx), %eax
	movq	(%r14,%rax,8), %rax
	movq	%rax, (%r15)
	testl	%r13d, %r13d
	jle	LBB0_14
## %bb.12:
	movl	%r13d, %eax
	cmpl	$4, %r13d
	jae	LBB0_15
## %bb.13:
	xorl	%ecx, %ecx
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	jmp	LBB0_24
LBB0_14:
	xorl	%ecx, %ecx
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	jmp	LBB0_26
LBB0_15:
	movl	%eax, %ecx
	andl	$-4, %ecx
	leaq	-4(%rcx), %rdx
	movq	%rdx, %r8
	shrq	$2, %r8
	incq	%r8
	testq	%rdx, %rdx
	je	LBB0_20
## %bb.16:
	movq	%r8, %rdi
	andq	$-2, %rdi
	xorl	%esi, %esi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	pmovsxdq	(%r12,%rsi,4), %xmm0
	pmovsxdq	8(%r12,%rsi,4), %xmm1
	movdqu	%xmm0, 8(%r15,%rsi,8)
	movdqu	%xmm1, 24(%r15,%rsi,8)
	pmovsxdq	16(%r12,%rsi,4), %xmm0
	pmovsxdq	24(%r12,%rsi,4), %xmm1
	movdqu	%xmm0, 40(%r15,%rsi,8)
	movdqu	%xmm1, 56(%r15,%rsi,8)
	addq	$8, %rsi
	addq	$-2, %rdi
	jne	LBB0_17
	jmp	LBB0_21
LBB0_18:
	movq	%r13, %rdx
LBB0_19:
	movl	$-2, %r13d
	jmp	LBB0_38
LBB0_20:
	xorl	%esi, %esi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
LBB0_21:
	testb	$1, %r8b
	je	LBB0_23
## %bb.22:
	pmovsxdq	(%r12,%rsi,4), %xmm0
	pmovsxdq	8(%r12,%rsi,4), %xmm1
	shlq	$3, %rsi
	orq	$8, %rsi
	movdqu	%xmm0, (%r15,%rsi)
	movdqu	%xmm1, 16(%r15,%rsi)
LBB0_23:
	cmpq	%rax, %rcx
	je	LBB0_25
	.p2align	4, 0x90
LBB0_24:                                ## =>This Inner Loop Header: Depth=1
	movslq	(%r12,%rcx,4), %rsi
	movq	%rsi, 8(%r15,%rcx,8)
	incq	%rcx
	cmpq	%rcx, %rax
	jne	LBB0_24
LBB0_25:
	movl	%r13d, %ecx
LBB0_26:
	leal	1(%rcx), %eax
	cmpl	%ebx, %eax
	jge	LBB0_37
## %bb.27:
	movl	%ecx, %edi
	leaq	1(%rdi), %rax
	movl	%ebx, %r10d
	subl	%ecx, %r10d
	addl	$-2, %r10d
	cmpl	$3, %r10d
	jb	LBB0_36
## %bb.28:
	movq	%rbx, %r11
	incq	%r10
	movq	%r10, %r8
	andq	$-4, %r8
	leaq	-4(%r8), %rcx
	movq	%rcx, %r9
	shrq	$2, %r9
	incq	%r9
	testq	%rcx, %rcx
	je	LBB0_31
## %bb.29:
	movq	%r9, %rsi
	andq	$-2, %rsi
	leaq	(%r15,%rdi,8), %rbx
	addq	$56, %rbx
	leaq	(%r12,%rdi,4), %rcx
	addq	$28, %rcx
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_30:                                ## =>This Inner Loop Header: Depth=1
	pmovsxdq	-24(%rcx,%rdi,4), %xmm0
	pmovsxdq	-16(%rcx,%rdi,4), %xmm1
	movdqu	%xmm0, -48(%rbx,%rdi,8)
	movdqu	%xmm1, -32(%rbx,%rdi,8)
	pmovsxdq	-8(%rcx,%rdi,4), %xmm0
	pmovsxdq	(%rcx,%rdi,4), %xmm1
	movdqu	%xmm0, -16(%rbx,%rdi,8)
	movdqu	%xmm1, (%rbx,%rdi,8)
	addq	$8, %rdi
	addq	$-2, %rsi
	jne	LBB0_30
	jmp	LBB0_32
LBB0_31:
	xorl	%edi, %edi
LBB0_32:
	testb	$1, %r9b
	movq	%r11, %rbx
	je	LBB0_34
## %bb.33:
	addq	%rax, %rdi
	pmovsxdq	(%r12,%rdi,4), %xmm0
	pmovsxdq	8(%r12,%rdi,4), %xmm1
	movdqu	%xmm0, (%r15,%rdi,8)
	movdqu	%xmm1, 16(%r15,%rdi,8)
LBB0_34:
	cmpq	%r8, %r10
	je	LBB0_37
## %bb.35:
	addq	%r8, %rax
	.p2align	4, 0x90
LBB0_36:                                ## =>This Inner Loop Header: Depth=1
	movslq	(%r12,%rax,4), %rcx
	movq	%rcx, (%r15,%rax,8)
	incq	%rax
	cmpl	%ebx, %eax
	jl	LBB0_36
LBB0_37:
	incl	%r13d
	movq	-56(%rbp), %rax                 ## 8-byte Reload
LBB0_38:
	movq	%rax, %rdi
	movq	%rdx, %rbx
	callq	_free
	movq	%rbx, %rdi
	callq	_free
	cmpq	$0, -64(%rbp)                   ## 8-byte Folded Reload
	jne	LBB0_40
## %bb.39:
	movq	%r12, %rdi
	callq	_free
LBB0_40:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BUCKET_A_SIZE,4,2              ## @BUCKET_A_SIZE
	.comm	_BUCKET_B_SIZE,4,2              ## @BUCKET_B_SIZE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_divbwt                         ; -- Begin function divbwt
	.p2align	2
_divbwt:                                ; @divbwt
	.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	w26, #-1
	cbz	x0, LBB0_30
; %bb.1:
	mov	x20, x1
	cbz	x1, LBB0_30
; %bb.2:
	mov	x21, x3
	tbnz	w3, #31, LBB0_30
; %bb.3:
	mov	x25, x0
	subs	w27, w21, #1
	b.hi	LBB0_6
; %bb.4:
	b.ne	LBB0_13
; %bb.5:
	ldr	x8, [x25]
	str	x8, [x20]
	mov	w26, #1
	b	LBB0_30
LBB0_6:
	mov	x19, x2
	mov	x22, x2
	cbnz	x2, LBB0_8
; %bb.7:
	lsl	w8, w21, #2
	add	w0, w8, #4
	bl	_malloc
	mov	x22, x0
LBB0_8:
Lloh0:
	adrp	x8, _BUCKET_A_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BUCKET_A_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	lsl	w0, w8, #2
	bl	_malloc
	mov	x23, x0
Lloh3:
	adrp	x8, _BUCKET_B_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BUCKET_B_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	lsl	w0, w8, #2
	bl	_malloc
	mov	x24, x0
	mov	w26, #-2
	cbz	x22, LBB0_28
; %bb.9:
	cmp	x23, #0
	ccmp	x24, #0, #4, ne
	b.eq	LBB0_28
; %bb.10:
	mov	x0, x25
	mov	x1, x22
	mov	x2, x23
	mov	x3, x24
	mov	x4, x21
	bl	_sort_typeBstar
	mov	x5, x0
	mov	x0, x25
	mov	x1, x22
	mov	x2, x23
	mov	x3, x24
	mov	x4, x21
	bl	_construct_BWT
	ldr	x8, [x25, w27, uxtw #3]
	str	x8, [x20]
	cmp	w0, #1
	b.lt	LBB0_14
; %bb.11:
	mov	w8, w0
	cmp	w0, #8
	b.hs	LBB0_15
; %bb.12:
	mov	x9, #0
	b	LBB0_18
LBB0_13:
	mov	w26, #0
	b	LBB0_30
LBB0_14:
	mov	w9, #0
	b	LBB0_21
LBB0_15:
	and	x9, x8, #0xfffffff8
	add	x10, x20, #40
	add	x11, x22, #16
	mov	x12, x9
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	ldp	d0, d1, [x11, #-16]
	ldp	d2, d3, [x11], #32
	sshll.2d	v0, v0, #0
	sshll.2d	v1, v1, #0
	sshll.2d	v2, v2, #0
	sshll.2d	v3, v3, #0
	stp	q0, q1, [x10, #-32]
	stp	q2, q3, [x10], #64
	subs	x12, x12, #8
	b.ne	LBB0_16
; %bb.17:
	cmp	x9, x8
	b.eq	LBB0_20
LBB0_18:
	add	x10, x22, x9, lsl #2
	sub	x8, x8, x9
	add	x9, x20, x9, lsl #3
	add	x9, x9, #8
LBB0_19:                                ; =>This Inner Loop Header: Depth=1
	ldrsw	x11, [x10], #4
	str	x11, [x9], #8
	subs	x8, x8, #1
	b.ne	LBB0_19
LBB0_20:
	mov	x9, x0
LBB0_21:
	add	w8, w9, #1
	cmp	w8, w21
	b.ge	LBB0_27
; %bb.22:
	mov	w11, w9
	add	x8, x11, #1
	sub	w9, w21, w9
	sub	w9, w9, #2
	cmp	w9, #7
	b.lo	LBB0_26
; %bb.23:
	add	x9, x9, #1
	and	x10, x9, #0x1fffffff8
	add	x8, x8, x10
	add	x12, x11, #5
	add	x11, x20, x12, lsl #3
	add	x12, x22, x12, lsl #2
	mov	x13, x10
LBB0_24:                                ; =>This Inner Loop Header: Depth=1
	ldp	d0, d1, [x12, #-16]
	ldp	d2, d3, [x12], #32
	sshll.2d	v0, v0, #0
	sshll.2d	v1, v1, #0
	sshll.2d	v2, v2, #0
	sshll.2d	v3, v3, #0
	stp	q0, q1, [x11, #-32]
	stp	q2, q3, [x11], #64
	subs	x13, x13, #8
	b.ne	LBB0_24
; %bb.25:
	cmp	x9, x10
	b.eq	LBB0_27
LBB0_26:                                ; =>This Inner Loop Header: Depth=1
	ldrsw	x9, [x22, x8, lsl #2]
	str	x9, [x20, x8, lsl #3]
	add	x8, x8, #1
	cmp	w8, w21
	b.lt	LBB0_26
LBB0_27:
	add	w26, w0, #1
LBB0_28:
	mov	x0, x24
	bl	_free
	mov	x0, x23
	bl	_free
	cbnz	x19, LBB0_30
; %bb.29:
	mov	x0, x22
	bl	_free
LBB0_30:
	mov	x0, x26
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_BUCKET_A_SIZE,4,2              ; @BUCKET_A_SIZE
	.comm	_BUCKET_B_SIZE,4,2              ; @BUCKET_B_SIZE
.subsections_via_symbols
