	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Lzma2EncProps_Normalize        ## -- Begin function Lzma2EncProps_Normalize
	.p2align	4, 0x90
_Lzma2EncProps_Normalize:               ## @Lzma2EncProps_Normalize
	.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, %rbx
	movl	24(%rdi), %eax
	movl	%eax, -48(%rbp)
	movq	16(%rdi), %rax
	movq	%rax, -56(%rbp)
	leaq	-56(%rbp), %rdi
	callq	_LzmaEncProps_Normalize
	movl	-56(%rbp), %esi
	movl	16(%rbx), %ecx
	movl	(%rbx), %r14d
	movl	4(%rbx), %r15d
	movq	_MTCODER__THREADS_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	cmpl	%edi, %r14d
	cmovgel	%edi, %r14d
	testl	%r15d, %r15d
	jle	LBB0_4
## %bb.1:
	testl	%r14d, %r14d
	jle	LBB0_6
## %bb.2:
	testl	%ecx, %ecx
	jg	LBB0_5
## %bb.3:
	movl	%r15d, %eax
	xorl	%edx, %edx
	divl	%r14d
	cmpl	%r15d, %r14d
	movl	$1, %ecx
	cmovbel	%eax, %ecx
	jmp	LBB0_7
LBB0_4:
	cmpl	$2, %r14d
	movl	$1, %eax
	cmovll	%eax, %r14d
LBB0_5:
	imull	%r14d, %esi
	movl	%esi, %r15d
	jmp	LBB0_7
LBB0_6:
	movl	%r15d, %eax
	cltd
	idivl	%esi
	movl	%eax, %r14d
	testl	%eax, %eax
	cmovel	%r15d, %r14d
	movl	$1, %eax
	cmovel	%eax, %ecx
	cmpl	%edi, %r14d
	cmovgel	%edi, %r14d
LBB0_7:
	leaq	16(%rbx), %rdi
	movl	%ecx, 16(%rbx)
	movl	8(%rbx), %eax
	movl	20(%rbx), %r12d
	movq	_LZMA2_ENC_PROPS__BLOCK_SIZE__SOLID@GOTPCREL(%rip), %r13
	movq	_LZMA2_ENC_PROPS__BLOCK_SIZE__AUTO@GOTPCREL(%rip), %rcx
	cmpl	(%r13), %eax
	je	LBB0_12
## %bb.8:
	cmpl	(%rcx), %eax
	je	LBB0_12
## %bb.9:
	cmpl	$-1, %r12d
	je	LBB0_11
## %bb.10:
	cmpl	%r12d, %eax
	jge	LBB0_12
LBB0_11:
	movl	%eax, 20(%rbx)
LBB0_12:
	callq	_LzmaEncProps_Normalize
	movl	%r12d, 20(%rbx)
	movl	8(%rbx), %esi
	movl	16(%rbx), %ecx
	movl	(%r13), %edx
	movl	$1, %eax
	cmpl	%edx, %esi
	jne	LBB0_14
## %bb.13:
	movl	%ecx, %r15d
	movl	$1, %r14d
	jmp	LBB0_24
LBB0_14:
	movq	_LZMA2_ENC_PROPS__BLOCK_SIZE__AUTO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %esi
	jne	LBB0_17
## %bb.15:
	cmpl	$1, %r14d
	jg	LBB0_17
## %bb.16:
	movl	%edx, 8(%rbx)
	jmp	LBB0_23
LBB0_17:
	cmpl	%eax, %esi
	jne	LBB0_19
## %bb.18:
	movl	24(%rbx), %eax
	leal	(,%rax,4), %edx
	cmpl	$1048577, %edx                  ## imm = 0x100001
	movl	$1048576, %edi                  ## imm = 0x100000
	cmovgel	%edx, %edi
	cmpl	$268435456, %edi                ## imm = 0x10000000
	movl	$268435456, %esi                ## imm = 0x10000000
	cmovbl	%edi, %esi
	cmpl	%eax, %esi
	cmovlel	%eax, %esi
	addl	$1048575, %esi                  ## imm = 0xFFFFF
	andl	$2146435072, %esi               ## imm = 0x7FF00000
	movl	%esi, 8(%rbx)
LBB0_19:
	cmpl	$2, %r14d
	jl	LBB0_23
## %bb.20:
	cmpl	$-1, %r12d
	je	LBB0_23
## %bb.21:
	movl	%r12d, %eax
	cltd
	idivl	%esi
	imull	%eax, %esi
	xorl	%edx, %edx
	cmpl	%r12d, %esi
	setne	%dl
	addl	%eax, %edx
	movl	$1, %eax
	cmovnel	%edx, %eax
	imull	%eax, %ecx
	cmpl	%r14d, %edx
	cmovbl	%ecx, %r15d
	cmovael	%r14d, %eax
	jmp	LBB0_24
LBB0_23:
	movl	%r14d, %eax
LBB0_24:
	movl	%r14d, (%rbx)
	movl	%eax, 12(%rbx)
	movl	%r15d, 4(%rbx)
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MTCODER__THREADS_MAX,4,2       ## @MTCODER__THREADS_MAX
	.comm	_LZMA2_ENC_PROPS__BLOCK_SIZE__SOLID,4,2 ## @LZMA2_ENC_PROPS__BLOCK_SIZE__SOLID
	.comm	_LZMA2_ENC_PROPS__BLOCK_SIZE__AUTO,4,2 ## @LZMA2_ENC_PROPS__BLOCK_SIZE__AUTO
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Lzma2EncProps_Normalize        ; -- Begin function Lzma2EncProps_Normalize
	.p2align	2
_Lzma2EncProps_Normalize:               ; @Lzma2EncProps_Normalize
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x19, x0
	mov	x20, x0
	ldr	x8, [x20, #16]!
	str	x8, [sp]
	ldr	w8, [x0, #24]
	str	w8, [sp, #8]
	mov	x0, sp
	bl	_LzmaEncProps_Normalize
	ldr	w8, [sp]
	ldr	w9, [x20]
	ldp	w10, w11, [x19]
Lloh0:
	adrp	x12, _MTCODER__THREADS_MAX@GOTPAGE
Lloh1:
	ldr	x12, [x12, _MTCODER__THREADS_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w12, [x12]
	cmp	w10, w12
	csel	w10, w10, w12, lt
	mul	w13, w10, w8
	udiv	w14, w11, w10
	cmp	w10, w11
	csinc	w14, w14, wzr, ls
	cmp	w9, #0
	csel	w13, w13, w11, gt
	csel	w14, w9, w14, gt
	sdiv	w15, w11, w8
	cmp	w15, #0
	csel	w15, w11, w15, eq
	csinc	w16, w9, wzr, ne
	cmp	w15, w12
	csel	w12, w15, w12, lt
	cmp	w10, #0
	csel	w13, w13, w11, gt
	csel	w12, w10, w12, gt
	csel	w14, w14, w16, gt
	cmp	w10, #1
	csinc	w10, w10, wzr, gt
	mul	w8, w10, w8
	cmp	w11, #0
	csel	w21, w13, w8, gt
	csel	w22, w12, w10, gt
	csel	w8, w14, w9, gt
	str	w8, [x19, #16]
	ldr	w23, [x19, #20]
	ldr	w8, [x19, #8]
Lloh3:
	adrp	x25, _LZMA2_ENC_PROPS__BLOCK_SIZE__SOLID@GOTPAGE
Lloh4:
	ldr	x25, [x25, _LZMA2_ENC_PROPS__BLOCK_SIZE__SOLID@GOTPAGEOFF]
	ldr	w9, [x25]
Lloh5:
	adrp	x24, _LZMA2_ENC_PROPS__BLOCK_SIZE__AUTO@GOTPAGE
Lloh6:
	ldr	x24, [x24, _LZMA2_ENC_PROPS__BLOCK_SIZE__AUTO@GOTPAGEOFF]
	ldr	w10, [x24]
	cmp	w8, w9
	ccmp	w8, w10, #4, ne
	b.eq	LBB0_4
; %bb.1:
	cmn	w23, #1
	b.eq	LBB0_3
; %bb.2:
	cmp	w8, w23
	b.ge	LBB0_4
LBB0_3:
	str	w8, [x19, #20]
LBB0_4:
	mov	x0, x20
	bl	_LzmaEncProps_Normalize
	str	w23, [x19, #20]
	ldr	w8, [x19, #16]
	ldr	w9, [x19, #8]
	ldr	w10, [x25]
	cmp	w9, w10
	b.ne	LBB0_6
; %bb.5:
	mov	w9, #1
	mov	x21, x8
	mov	w22, #1
	b	LBB0_14
LBB0_6:
	ldr	w11, [x24]
	cmp	w9, w11
	b.ne	LBB0_9
; %bb.7:
	cmp	w22, #1
	b.gt	LBB0_9
; %bb.8:
	str	w10, [x19, #8]
	mov	x9, x22
	b	LBB0_14
LBB0_9:
	cmp	w9, w11
	b.ne	LBB0_11
; %bb.10:
	ldr	w9, [x19, #24]
	lsl	w10, w9, #2
	mov	w11, #1048576
	cmp	w10, #256, lsl #12              ; =1048576
	csel	w10, w10, w11, gt
	mov	w11, #268435456
	cmp	w10, w11
	csel	w10, w10, w11, lo
	cmp	w10, w9
	csel	w9, w10, w9, gt
	mov	w10, #1048575
	add	w9, w9, w10
	and	w9, w9, #0x7ff00000
	str	w9, [x19, #8]
LBB0_11:
	cmp	w22, #2
	ccmn	w23, #1, #4, ge
	b.ne	LBB0_13
; %bb.12:
	mov	x9, x22
	b	LBB0_14
LBB0_13:
	sdiv	w10, w23, w9
	mul	w9, w10, w9
	cmp	w9, w23
	cinc	w9, w10, ne
	cmp	w9, #0
	csinc	w10, w9, wzr, ne
	mul	w8, w10, w8
	cmp	w9, w22
	csel	w21, w8, w21, lo
	csel	w9, w10, w22, lo
LBB0_14:
	str	w9, [x19, #12]
	stp	w22, w21, [x19]
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MTCODER__THREADS_MAX,4,2       ; @MTCODER__THREADS_MAX
	.comm	_LZMA2_ENC_PROPS__BLOCK_SIZE__SOLID,4,2 ; @LZMA2_ENC_PROPS__BLOCK_SIZE__SOLID
	.comm	_LZMA2_ENC_PROPS__BLOCK_SIZE__AUTO,4,2 ; @LZMA2_ENC_PROPS__BLOCK_SIZE__AUTO
.subsections_via_symbols
