	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_BZ2_compressBlock              ## -- Begin function BZ2_compressBlock
	.p2align	4, 0x90
_BZ2_compressBlock:                     ## @BZ2_compressBlock
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	cmpq	$0, (%rdi)
	je	LBB0_1
## %bb.2:
	movl	8(%rbx), %edi
	callq	_BZ_FINALISE_CRC
	movl	8(%rbx), %edx
	movl	12(%rbx), %ecx
	leal	(%rcx,%rcx), %eax
	sarl	$31, %ecx
	orl	%eax, %ecx
	xorl	%edx, %ecx
	movl	%ecx, 12(%rbx)
	movl	16(%rbx), %esi
	cmpl	$2, %esi
	jl	LBB0_4
## %bb.3:
	movq	$0, 56(%rbx)
LBB0_4:
	cmpl	$2, 20(%rbx)
	jl	LBB0_6
## %bb.5:
	movq	(%rbx), %r8
	leaq	L_.str(%rip), %rdi
                                        ## kill: def $ecx killed $ecx killed $rcx
	callq	_VPrintf4
LBB0_6:
	movq	%rbx, %rdi
	callq	_BZ2_blockSort
	movq	(%rbx), %rax
	jmp	LBB0_7
LBB0_1:
	xorl	%eax, %eax
LBB0_7:
	leaq	(,%rax,4), %rcx
	addq	48(%rbx), %rcx
	movq	%rcx, 24(%rbx)
	cmpl	$1, 16(%rbx)
	jne	LBB0_9
## %bb.8:
	movq	%rbx, %rdi
	callq	_BZ2_bsInitWrite
	movq	_BZ_HDR_B@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_bsPutUChar
	movq	_BZ_HDR_Z@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_bsPutUChar
	movq	_BZ_HDR_h@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_bsPutUChar
	movq	_BZ_HDR_0@GOTPCREL(%rip), %rax
	movl	40(%rbx), %esi
	addl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_bsPutUChar
	movq	(%rbx), %rax
LBB0_9:
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movq	%rbx, %rdi
	movl	$49, %esi
	callq	_bsPutUChar
	movq	%rbx, %rdi
	movl	$65, %esi
	callq	_bsPutUChar
	movq	%rbx, %rdi
	movl	$89, %esi
	callq	_bsPutUChar
	movq	%rbx, %rdi
	movl	$38, %esi
	callq	_bsPutUChar
	movq	%rbx, %rdi
	movl	$83, %esi
	callq	_bsPutUChar
	movq	%rbx, %rdi
	movl	$89, %esi
	callq	_bsPutUChar
	movl	8(%rbx), %esi
	movq	%rbx, %rdi
	callq	_bsPutUInt32
	movq	%rbx, %rdi
	movl	$1, %esi
	xorl	%edx, %edx
	callq	_bsW
	movl	32(%rbx), %edx
	movq	%rbx, %rdi
	movl	$24, %esi
	callq	_bsW
	movq	%rbx, %rdi
	callq	_generateMTFValues
	movq	%rbx, %rdi
	callq	_sendMTFValues
LBB0_11:
	testq	%r14, %r14
	je	LBB0_15
## %bb.12:
	movq	%rbx, %rdi
	movl	$23, %esi
	callq	_bsPutUChar
	movq	%rbx, %rdi
	movl	$114, %esi
	callq	_bsPutUChar
	movq	%rbx, %rdi
	movl	$69, %esi
	callq	_bsPutUChar
	movq	%rbx, %rdi
	movl	$56, %esi
	callq	_bsPutUChar
	movq	%rbx, %rdi
	movl	$80, %esi
	callq	_bsPutUChar
	movq	%rbx, %rdi
	movl	$144, %esi
	callq	_bsPutUChar
	movl	12(%rbx), %esi
	movq	%rbx, %rdi
	callq	_bsPutUInt32
	cmpl	$2, 20(%rbx)
	jl	LBB0_14
## %bb.13:
	movl	12(%rbx), %esi
	leaq	L_.str.1(%rip), %rdi
	callq	_VPrintf1
LBB0_14:
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_bsFinishWrite                  ## TAILCALL
LBB0_15:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"    block %d: crc = 0x%08x, combined CRC = 0x%08x, size = %d\n"

	.comm	_BZ_HDR_B,4,2                   ## @BZ_HDR_B
	.comm	_BZ_HDR_Z,4,2                   ## @BZ_HDR_Z
	.comm	_BZ_HDR_h,4,2                   ## @BZ_HDR_h
	.comm	_BZ_HDR_0,8,3                   ## @BZ_HDR_0
L_.str.1:                               ## @.str.1
	.asciz	"    final combined CRC = 0x%08x\n   "

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_BZ2_compressBlock              ; -- Begin function BZ2_compressBlock
	.p2align	2
_BZ2_compressBlock:                     ; @BZ2_compressBlock
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x0]
	cbz	x8, LBB0_6
; %bb.1:
	ldr	w0, [x19, #8]
	bl	_BZ_FINALISE_CRC
	ldp	w2, w8, [x19, #8]
	lsl	w9, w8, #1
	orr	w8, w9, w8, asr #31
	eor	w3, w8, w2
	str	w3, [x19, #12]
	ldr	w1, [x19, #16]
	cmp	w1, #2
	b.lt	LBB0_3
; %bb.2:
	str	xzr, [x19, #56]
LBB0_3:
	ldr	w8, [x19, #20]
	cmp	w8, #2
	b.lt	LBB0_5
; %bb.4:
	ldr	x4, [x19]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_VPrintf4
LBB0_5:
	mov	x0, x19
	bl	_BZ2_blockSort
	ldr	x8, [x19]
LBB0_6:
	ldr	x9, [x19, #48]
	add	x9, x9, x8, lsl #2
	str	x9, [x19, #24]
	ldr	w9, [x19, #16]
	cmp	w9, #1
	b.ne	LBB0_8
; %bb.7:
	mov	x0, x19
	bl	_BZ2_bsInitWrite
Lloh2:
	adrp	x8, _BZ_HDR_B@GOTPAGE
Lloh3:
	ldr	x8, [x8, _BZ_HDR_B@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_bsPutUChar
Lloh5:
	adrp	x8, _BZ_HDR_Z@GOTPAGE
Lloh6:
	ldr	x8, [x8, _BZ_HDR_Z@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_bsPutUChar
Lloh8:
	adrp	x8, _BZ_HDR_h@GOTPAGE
Lloh9:
	ldr	x8, [x8, _BZ_HDR_h@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_bsPutUChar
Lloh11:
	adrp	x8, _BZ_HDR_0@GOTPAGE
Lloh12:
	ldr	x8, [x8, _BZ_HDR_0@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	ldr	w9, [x19, #40]
	add	w1, w9, w8
	mov	x0, x19
	bl	_bsPutUChar
	ldr	x8, [x19]
LBB0_8:
	cbz	x8, LBB0_10
; %bb.9:
	mov	x0, x19
	mov	w1, #49
	bl	_bsPutUChar
	mov	x0, x19
	mov	w1, #65
	bl	_bsPutUChar
	mov	x0, x19
	mov	w1, #89
	bl	_bsPutUChar
	mov	x0, x19
	mov	w1, #38
	bl	_bsPutUChar
	mov	x0, x19
	mov	w1, #83
	bl	_bsPutUChar
	mov	x0, x19
	mov	w1, #89
	bl	_bsPutUChar
	ldr	w1, [x19, #8]
	mov	x0, x19
	bl	_bsPutUInt32
	mov	x0, x19
	mov	w1, #1
	mov	w2, #0
	bl	_bsW
	ldr	w2, [x19, #32]
	mov	x0, x19
	mov	w1, #24
	bl	_bsW
	mov	x0, x19
	bl	_generateMTFValues
	mov	x0, x19
	bl	_sendMTFValues
LBB0_10:
	cbz	x20, LBB0_14
; %bb.11:
	mov	x0, x19
	mov	w1, #23
	bl	_bsPutUChar
	mov	x0, x19
	mov	w1, #114
	bl	_bsPutUChar
	mov	x0, x19
	mov	w1, #69
	bl	_bsPutUChar
	mov	x0, x19
	mov	w1, #56
	bl	_bsPutUChar
	mov	x0, x19
	mov	w1, #80
	bl	_bsPutUChar
	mov	x0, x19
	mov	w1, #144
	bl	_bsPutUChar
	ldr	w1, [x19, #12]
	mov	x0, x19
	bl	_bsPutUInt32
	ldr	w8, [x19, #20]
	cmp	w8, #2
	b.lt	LBB0_13
; %bb.12:
	ldr	w1, [x19, #12]
Lloh14:
	adrp	x0, l_.str.1@PAGE
Lloh15:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_VPrintf1
LBB0_13:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_bsFinishWrite
LBB0_14:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"    block %d: crc = 0x%08x, combined CRC = 0x%08x, size = %d\n"

	.comm	_BZ_HDR_B,4,2                   ; @BZ_HDR_B
	.comm	_BZ_HDR_Z,4,2                   ; @BZ_HDR_Z
	.comm	_BZ_HDR_h,4,2                   ; @BZ_HDR_h
	.comm	_BZ_HDR_0,8,3                   ; @BZ_HDR_0
l_.str.1:                               ; @.str.1
	.asciz	"    final combined CRC = 0x%08x\n   "

.subsections_via_symbols
