	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_BZ2_blockSort                  ## -- Begin function BZ2_blockSort
	.p2align	4, 0x90
_BZ2_blockSort:                         ## @BZ2_blockSort
	.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
	movq	%rdi, %r14
	movq	40(%rdi), %rbx
	movq	24(%rdi), %rcx
	movl	(%rdi), %r12d
	movl	4(%rdi), %r15d
	cmpl	$9999, %r12d                    ## imm = 0x270F
	jg	LBB0_2
## %bb.1:
	movl	16(%r14), %esi
	movl	20(%r14), %edi
	movq	%rcx, %rdx
	jmp	LBB0_8
LBB0_2:
	movq	32(%r14), %rsi
	movl	8(%r14), %eax
	movq	_BZ_N_OVERSHOOT@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edi
	addl	%r12d, %edi
	movl	%edi, %edx
	andl	$1, %edx
	addl	%edi, %edx
	movslq	%edx, %rdx
	leaq	(%rsi,%rdx,4), %rdx
	cmpl	$2, %eax
	movl	$1, %edi
	cmovgel	%eax, %edi
	cmpl	$100, %edi
	movl	$100, %eax
	cmovbl	%edi, %eax
	decb	%al
	movzbl	%al, %eax
	imull	$171, %eax, %r13d
	shrl	$9, %r13d
	imull	%r12d, %r13d
	movl	%r13d, -44(%rbp)
	leaq	-44(%rbp), %rax
	movq	%rax, (%rsp)
	movq	%rbx, %rdi
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movl	%r12d, %r8d
	movl	%r15d, %r9d
	callq	_mainSort
	cmpl	$3, %r15d
	jl	LBB0_4
## %bb.3:
	subl	-44(%rbp), %r13d
	cvtsi2ss	%r13d, %xmm0
	cvtsi2ss	%r12d, %xmm1
	divss	%xmm1, %xmm0
	leaq	L_.str(%rip), %rdi
	movl	%r13d, %esi
	movl	%r12d, %edx
	callq	_VPrintf3
LBB0_4:
	cmpl	$0, -44(%rbp)
	jns	LBB0_9
## %bb.5:
	cmpl	$2, %r15d
	jl	LBB0_7
## %bb.6:
	leaq	L_.str.1(%rip), %rdi
	callq	_VPrintf0
LBB0_7:
	movl	16(%r14), %esi
	movl	20(%r14), %edi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
LBB0_8:
	movl	%r12d, %ecx
	movl	%r15d, %r8d
	callq	_fallbackSort
LBB0_9:
	movl	$-1, 12(%r14)
	movl	(%r14), %eax
	testl	%eax, %eax
	jle	LBB0_14
## %bb.10:
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%rbx,%rcx,8)
	je	LBB0_12
## %bb.13:                              ##   in Loop: Header=BB0_11 Depth=1
	incq	%rcx
	cmpq	%rcx, %rax
	jne	LBB0_11
LBB0_14:
	xorl	%edi, %edi
	jmp	LBB0_15
LBB0_12:
	movl	%ecx, 12(%r14)
	xorl	%edi, %edi
	cmpl	$-1, %ecx
	setne	%dil
LBB0_15:
	movl	$1003, %esi                     ## imm = 0x3EB
	callq	_AssertH
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BZ_N_OVERSHOOT,4,2             ## @BZ_N_OVERSHOOT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"      %d work, %d block, ratio %5.2f\n"

L_.str.1:                               ## @.str.1
	.asciz	"    too repetitive; using fallback sorting algorithm\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_BZ2_blockSort                  ; -- Begin function BZ2_blockSort
	.p2align	2
_BZ2_blockSort:                         ; @BZ2_blockSort
	.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
	mov	x19, x0
	ldr	x20, [x0, #40]
	ldr	x21, [x0, #24]
	ldp	w22, w23, [x0]
	mov	w8, #9999
	cmp	w22, w8
	b.gt	LBB0_2
LBB0_1:
	ldp	w1, w0, [x19, #16]
	mov	x2, x21
	mov	x3, x22
	mov	x4, x23
	bl	_fallbackSort
	b	LBB0_5
LBB0_2:
	ldr	x1, [x19, #32]
Lloh0:
	adrp	x8, _BZ_N_OVERSHOOT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BZ_N_OVERSHOOT@GOTPAGEOFF]
	ldr	w9, [x19, #8]
Lloh2:
	ldr	w8, [x8]
	add	w8, w8, w22
	and	w10, w8, #0x1
	add	w8, w10, w8
	add	x2, x1, w8, sxtw #2
	cmp	w9, #1
	csinc	w8, w9, wzr, gt
	mov	w9, #100
	cmp	w8, #100
	csel	w8, w8, w9, lo
	sub	w8, w8, #1
	and	w8, w8, #0xff
	mov	w9, #171
	mul	w8, w8, w9
	lsr	w8, w8, #9
	mul	w24, w22, w8
	str	w24, [sp, #12]
	add	x6, sp, #12
	mov	x0, x20
	mov	x3, x21
	mov	x4, x22
	mov	x5, x23
	bl	_mainSort
	cmp	w23, #3
	b.lt	LBB0_4
; %bb.3:
	ldr	w8, [sp, #12]
	sub	w1, w24, w8
	scvtf	s0, w1
	scvtf	s1, w22
	fdiv	s0, s0, s1
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x22
	bl	_VPrintf3
LBB0_4:
	ldr	w8, [sp, #12]
	tbnz	w8, #31, LBB0_12
LBB0_5:
	mov	w8, #-1
	str	w8, [x19, #12]
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.6:
	mov	x9, #0
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x20, x9, lsl #3]
	cbz	x10, LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	add	x9, x9, #1
	cmp	x8, x9
	b.ne	LBB0_7
LBB0_9:
	mov	w0, #0
	b	LBB0_11
LBB0_10:
	str	w9, [x19, #12]
	cmn	w9, #1
	cset	w0, ne
LBB0_11:
	mov	w1, #1003
	bl	_AssertH
	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_12:
	cmp	w23, #2
	b.lt	LBB0_1
; %bb.13:
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_VPrintf0
	b	LBB0_1
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_BZ_N_OVERSHOOT,4,2             ; @BZ_N_OVERSHOOT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"      %d work, %d block, ratio %5.2f\n"

l_.str.1:                               ; @.str.1
	.asciz	"    too repetitive; using fallback sorting algorithm\n"

.subsections_via_symbols
