	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pglz_compress                  ## -- Begin function pglz_compress
	.p2align	4, 0x90
_pglz_compress:                         ## @pglz_compress
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -88(%rbp)                 ## 8-byte Spill
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movb	$0, -41(%rbp)
	testq	%rcx, %rcx
	jne	LBB0_2
## %bb.1:
	movq	_PGLZ_strategy_default@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
LBB0_2:
	movq	(%rcx), %rdx
	movl	$-1, %eax
	testq	%rdx, %rdx
	jle	LBB0_27
## %bb.3:
	cmpl	%r15d, 8(%rcx)
	jg	LBB0_27
## %bb.4:
	cmpl	%r15d, 12(%rcx)
	jl	LBB0_27
## %bb.5:
	movq	_PGLZ_MAX_MATCH@GOTPCREL(%rip), %rax
	cmpl	$18, %edx
	movl	$17, %esi
	cmovgel	%edx, %esi
	movl	(%rax), %eax
	cmpl	%edx, %eax
	cmovll	%eax, %esi
	movl	%esi, -64(%rbp)                 ## 4-byte Spill
	movl	16(%rcx), %eax
	movq	%rcx, -96(%rbp)                 ## 8-byte Spill
	movl	20(%rcx), %ecx
	cmpl	$100, %eax
	movl	$100, %edx
	cmovgel	%edx, %eax
	xorl	%esi, %esi
	testl	%eax, %eax
	cmovgl	%eax, %esi
	movl	%esi, -60(%rbp)                 ## 4-byte Spill
	cmpl	$99, %ecx
	movl	$99, %eax
	cmovll	%ecx, %eax
	movl	$100, %esi
	subl	%eax, %esi
	testl	%ecx, %ecx
	cmovsl	%edx, %esi
	movslq	%r15d, %rdx
	movq	_INT_MAX@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	imulq	$1374389535, %rax, %rax         ## imm = 0x51EB851F
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$37, %rax
	addl	%ecx, %eax
	cmpl	%edx, %eax
	jge	LBB0_7
## %bb.6:
	imulq	$1374389535, %rdx, %rax         ## imm = 0x51EB851F
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$37, %rax
	addl	%ecx, %eax
	imull	%eax, %esi
	jmp	LBB0_8
LBB0_7:
	imull	%r15d, %esi
	movslq	%esi, %rax
	imulq	$1374389535, %rax, %rsi         ## imm = 0x51EB851F
	movq	%rsi, %rax
	shrq	$63, %rax
	sarq	$37, %rsi
	addl	%eax, %esi
LBB0_8:
	movq	%rdx, %r14
	movq	%rsi, -80(%rbp)                 ## 8-byte Spill
	movl	$512, %ecx                      ## imm = 0x200
	cmpl	$128, %r15d
	jl	LBB0_12
## %bb.9:
	movl	$1024, %ecx                     ## imm = 0x400
	cmpl	$256, %r15d                     ## imm = 0x100
	jb	LBB0_12
## %bb.10:
	movl	$2048, %ecx                     ## imm = 0x800
	cmpl	$512, %r15d                     ## imm = 0x200
	jb	LBB0_12
## %bb.11:
	xorl	%ecx, %ecx
	cmpl	$1024, %r15d                    ## imm = 0x400
	setae	%cl
	shll	$12, %ecx
	addl	$4096, %ecx                     ## imm = 0x1000
LBB0_12:
	movq	_hist_start@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	leal	(,%rcx,4), %edx
	xorl	%esi, %esi
	callq	_memset
	testl	%r15d, %r15d
	jle	LBB0_24
## %bb.13:
	cmpl	$0, -80(%rbp)                   ## 4-byte Folded Reload
	jle	LBB0_26
## %bb.14:
	movq	%r14, %rdx
	addq	%rbx, %rdx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	decl	%eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
	movq	_hist_entries@GOTPCREL(%rip), %r12
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_18 Depth=1
	movsbl	(%rbx), %r8d
	leaq	-41(%rbp), %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	callq	_pglz_out_literal
	movq	_hist_start@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r12), %esi
	movl	%r14d, (%rsp)
	movl	$1, %edx
	xorl	%ecx, %ecx
	movq	%rbx, %r8
	movq	%r13, %r9
	callq	_pglz_hist_add
	incq	%rbx
LBB0_16:                                ##   in Loop: Header=BB0_18 Depth=1
	movq	%r13, %rdx
LBB0_17:                                ##   in Loop: Header=BB0_18 Depth=1
	cmpq	%rdx, %rbx
	movq	_hist_entries@GOTPCREL(%rip), %r12
	jae	LBB0_24
LBB0_18:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_23 Depth 2
	testl	%r15d, %r15d
	jne	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_18 Depth=1
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	cmpl	$0, 24(%rax)
	jle	LBB0_26
LBB0_20:                                ##   in Loop: Header=BB0_18 Depth=1
	movq	_hist_start@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r14d, 8(%rsp)
	movl	-60(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%rsp)
	movq	%rbx, %rsi
	leaq	-48(%rbp), %rcx
	leaq	-68(%rbp), %r8
	movq	%rdx, %r13
	movl	-64(%rbp), %r9d                 ## 4-byte Reload
	callq	_pglz_find_match
	testq	%rax, %rax
	je	LBB0_15
## %bb.21:                              ##   in Loop: Header=BB0_18 Depth=1
	movl	-48(%rbp), %r8d
	movl	-68(%rbp), %r9d
	leaq	-41(%rbp), %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	callq	_pglz_out_tag
	movl	$1, %r15d
	subl	$1, -48(%rbp)
	jb	LBB0_16
## %bb.22:                              ##   in Loop: Header=BB0_18 Depth=1
	movq	_hist_start@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_23:                                ##   Parent Loop BB0_18 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r12), %edi
	movq	_hist_entries@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, (%rsp)
	movl	$1, %r15d
	movl	$1, %edx
	xorl	%ecx, %ecx
	movq	%rbx, %r8
	movq	%r13, %r9
	callq	_pglz_hist_add
	movq	%r13, %rdx
	incq	%rbx
	subl	$1, -48(%rbp)
	jae	LBB0_23
	jmp	LBB0_17
LBB0_24:
	xorl	%eax, %eax
	cmpl	$0, -80(%rbp)                   ## 4-byte Folded Reload
	setle	%al
	negl	%eax
	jmp	LBB0_27
LBB0_26:
	movl	$-1, %eax
LBB0_27:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PGLZ_strategy_default,8,3      ## @PGLZ_strategy_default
	.comm	_PGLZ_MAX_MATCH,4,2             ## @PGLZ_MAX_MATCH
	.comm	_INT_MAX,4,2                    ## @INT_MAX
	.comm	_hist_start,4,2                 ## @hist_start
	.comm	_hist_entries,4,2               ## @hist_entries
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pglz_compress                  ; -- Begin function pglz_compress
	.p2align	2
_pglz_compress:                         ; @pglz_compress
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
Lloh0:
	adrp	x8, _PGLZ_strategy_default@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PGLZ_strategy_default@GOTPAGEOFF]
	strb	wzr, [sp, #31]
Lloh2:
	ldr	x8, [x8]
	cmp	x3, #0
	csel	x25, x8, x3, eq
	ldr	x8, [x25]
	cmp	x8, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x23, x1
	ldr	w9, [x25, #8]
	cmp	w9, w1
	b.gt	LBB0_3
; %bb.2:
	ldr	w9, [x25, #12]
	cmp	w9, w23
	b.ge	LBB0_5
LBB0_3:
	mov	w0, #-1
LBB0_4:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_5:
	mov	x19, x2
	mov	x20, x0
Lloh3:
	adrp	x9, _PGLZ_MAX_MATCH@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PGLZ_MAX_MATCH@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	mov	w10, #17
	cmp	w8, #17
	csel	w10, w8, w10, gt
	cmp	w9, w8
	csel	w21, w9, w10, lt
	mov	w8, #100
	ldp	w9, w10, [x25, #16]
	cmp	w9, #100
	csel	w9, w9, w8, lt
	cmp	w9, #0
	csel	w22, w9, wzr, gt
	mov	w9, #99
	cmp	w10, #99
	csel	w9, w10, w9, lt
	sub	w9, w8, w9
	cmp	w10, #0
	csel	w8, w8, w9, lt
Lloh6:
	adrp	x9, _INT_MAX@GOTPAGE
Lloh7:
	ldr	x9, [x9, _INT_MAX@GOTPAGEOFF]
Lloh8:
	ldrsw	x9, [x9]
	mov	w10, #34079
	movk	w10, #20971, lsl #16
	mul	x9, x9, x10
	lsr	x11, x9, #63
	asr	x9, x9, #37
	add	w9, w9, w11
	cmp	w9, w23
	mul	w9, w8, w23
	smull	x9, w9, w10
	lsr	x11, x9, #63
	asr	x9, x9, #37
	add	w9, w9, w11
	smull	x10, w23, w10
	lsr	x11, x10, #63
	asr	x10, x10, #37
	add	w10, w10, w11
	mul	w8, w8, w10
	csel	w8, w9, w8, ge
	str	w8, [sp, #12]                   ; 4-byte Folded Spill
	cmp	w23, #128
	b.ge	LBB0_7
; %bb.6:
	mov	w24, #512
	b	LBB0_12
LBB0_7:
	cmp	w23, #256
	b.hs	LBB0_9
; %bb.8:
	mov	w24, #1024
	b	LBB0_12
LBB0_9:
	cmp	w23, #512
	b.hs	LBB0_11
; %bb.10:
	mov	w24, #2048
	b	LBB0_12
LBB0_11:
	mov	w8, #8192
	mov	w9, #4096
	cmp	w23, #1024
	csel	w24, w9, w8, lo
LBB0_12:
Lloh9:
	adrp	x27, _hist_start@GOTPAGE
Lloh10:
	ldr	x27, [x27, _hist_start@GOTPAGEOFF]
	ldr	w0, [x27]
	lsl	w2, w24, #2
	mov	w1, #0
	bl	_memset
	cmp	w23, #1
	b.lt	LBB0_23
; %bb.13:
	ldr	w8, [sp, #12]                   ; 4-byte Folded Reload
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.14:
	mov	w26, #0
	sub	w24, w24, #1
Lloh11:
	adrp	x28, _hist_entries@GOTPAGE
Lloh12:
	ldr	x28, [x28, _hist_entries@GOTPAGEOFF]
	add	x23, x20, w23, sxtw
	str	w22, [sp, #16]                  ; 4-byte Folded Spill
	b	LBB0_17
LBB0_15:                                ;   in Loop: Header=BB0_17 Depth=1
	mov	x22, x21
	mov	x21, x20
	ldrsb	w4, [x21], #1
	add	x0, sp, #31
	mov	w1, #0
	mov	w2, #0
	mov	x3, x19
	bl	_pglz_out_literal
	ldr	w0, [x27]
	ldr	w1, [x28]
	mov	w2, #1
	mov	w3, #0
	mov	x4, x20
	mov	x5, x23
	mov	x6, x24
	bl	_pglz_hist_add
	mov	x20, x21
	mov	x21, x22
	ldr	w22, [sp, #16]                  ; 4-byte Folded Reload
LBB0_16:                                ;   in Loop: Header=BB0_17 Depth=1
	cmp	x20, x23
	b.hs	LBB0_23
LBB0_17:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_21 Depth 2
	cbnz	w26, LBB0_19
; %bb.18:                               ;   in Loop: Header=BB0_17 Depth=1
	ldr	w8, [x25, #24]
	cmp	w8, #1
	b.lt	LBB0_3
LBB0_19:                                ;   in Loop: Header=BB0_17 Depth=1
	ldr	w0, [x27]
	add	x3, sp, #24
	add	x4, sp, #20
	mov	x1, x20
	mov	x2, x23
	mov	x5, x21
	mov	x6, x22
	mov	x7, x24
	bl	_pglz_find_match
	cbz	x0, LBB0_15
; %bb.20:                               ;   in Loop: Header=BB0_17 Depth=1
	ldp	w5, w4, [sp, #20]
	add	x0, sp, #31
	mov	w1, #0
	mov	w2, #0
	mov	x3, x19
	bl	_pglz_out_tag
	ldr	w8, [sp, #24]
	sub	w9, w8, #1
	str	w9, [sp, #24]
	cbz	w8, LBB0_22
LBB0_21:                                ;   Parent Loop BB0_17 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w0, [x27]
	ldr	w1, [x28]
	mov	w26, #1
	mov	w2, #1
	mov	w3, #0
	mov	x4, x20
	mov	x5, x23
	mov	x6, x24
	bl	_pglz_hist_add
	add	x20, x20, #1
	ldr	w8, [sp, #24]
	sub	w9, w8, #1
	str	w9, [sp, #24]
	cbnz	w8, LBB0_21
	b	LBB0_16
LBB0_22:                                ;   in Loop: Header=BB0_17 Depth=1
	mov	w26, #1
	b	LBB0_16
LBB0_23:
	ldr	w8, [sp, #12]                   ; 4-byte Folded Reload
	cmp	w8, #1
	csetm	w0, lt
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_PGLZ_strategy_default,8,3      ; @PGLZ_strategy_default
	.comm	_PGLZ_MAX_MATCH,4,2             ; @PGLZ_MAX_MATCH
	.comm	_INT_MAX,4,2                    ; @INT_MAX
	.comm	_hist_start,4,2                 ; @hist_start
	.comm	_hist_entries,4,2               ; @hist_entries
.subsections_via_symbols
