	.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	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	leaq	16(%rdi), %r14
	movq	16(%rdi), %rax
	movq	%rax, -24(%rbp)
	leaq	-24(%rbp), %rdi
	callq	_LzmaEncProps_Normalize
	movl	-24(%rbp), %esi
	movl	16(%rbx), %r8d
	movl	(%rbx), %ecx
	movl	4(%rbx), %r9d
	movq	_NUM_MT_CODER_THREADS_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	cmpl	%edi, %ecx
	cmovgel	%edi, %ecx
	testl	%r9d, %r9d
	jle	LBB0_1
## %bb.3:
	testl	%ecx, %ecx
	jle	LBB0_4
## %bb.5:
	testl	%r8d, %r8d
	jg	LBB0_2
## %bb.6:
	movl	%r9d, %eax
	xorl	%edx, %edx
	divl	%ecx
	cmpl	%r9d, %ecx
	movl	$1, %r8d
	cmovbel	%eax, %r8d
	jmp	LBB0_7
LBB0_1:
	cmpl	$2, %ecx
	movl	$1, %eax
	cmovll	%eax, %ecx
LBB0_2:
	imull	%ecx, %esi
	movl	%esi, %r9d
	jmp	LBB0_7
LBB0_4:
	movl	%r9d, %eax
	cltd
	idivl	%esi
	movl	%eax, %ecx
	testl	%eax, %eax
	cmovel	%r9d, %ecx
	movl	$1, %eax
	cmovel	%eax, %r8d
	cmpl	%edi, %ecx
	cmovgel	%edi, %ecx
LBB0_7:
	movl	%r8d, 16(%rbx)
	movl	%ecx, (%rbx)
	movl	%r9d, 4(%rbx)
	movq	%r14, %rdi
	callq	_LzmaEncProps_Normalize
	cmpq	$0, 8(%rbx)
	jne	LBB0_9
## %bb.8:
	movl	20(%rbx), %eax
	leal	(,%rax,4), %ecx
	cmpl	$1048577, %ecx                  ## imm = 0x100001
	movl	$1048576, %edx                  ## imm = 0x100000
	cmovgel	%ecx, %edx
	cmpl	$268435456, %edx                ## imm = 0x10000000
	movl	$268435456, %ecx                ## imm = 0x10000000
	cmovbl	%edx, %ecx
	cmpl	%eax, %ecx
	cmovlel	%eax, %ecx
	movq	%rcx, 8(%rbx)
LBB0_9:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NUM_MT_CODER_THREADS_MAX,4,2   ## @NUM_MT_CODER_THREADS_MAX
.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, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	mov	x20, x0
	ldr	x8, [x20, #16]!
	str	x8, [sp, #8]
	add	x0, sp, #8
	bl	_LzmaEncProps_Normalize
	ldr	w8, [sp, #8]
	ldr	w9, [x20]
	ldp	w10, w11, [x19]
Lloh0:
	adrp	x12, _NUM_MT_CODER_THREADS_MAX@GOTPAGE
Lloh1:
	ldr	x12, [x12, _NUM_MT_CODER_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	w8, w13, w8, gt
	csel	w9, w14, w9, gt
	str	w9, [x19, #16]
	csel	w9, w12, w10, gt
	stp	w9, w8, [x19]
	mov	x0, x20
	bl	_LzmaEncProps_Normalize
	ldr	x8, [x19, #8]
	cbnz	x8, LBB0_2
; %bb.1:
	ldr	w8, [x19, #20]
	lsl	w9, w8, #2
	mov	w10, #1048576
	cmp	w9, #256, lsl #12               ; =1048576
	csel	w9, w9, w10, gt
	mov	w10, #268435456
	cmp	w9, w10
	csel	w9, w9, w10, lo
	cmp	w9, w8
	csel	w8, w9, w8, gt
	str	x8, [x19, #8]
LBB0_2:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_NUM_MT_CODER_THREADS_MAX,4,2   ; @NUM_MT_CODER_THREADS_MAX
.subsections_via_symbols
