	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_LzmaDec_Allocate               ## -- Begin function LzmaDec_Allocate
	.p2align	4, 0x90
_LzmaDec_Allocate:                      ## @LzmaDec_Allocate
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r14d
	movq	%rdi, %r15
	leaq	-32(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_LzmaProps_Decode
	movl	%eax, %edi
	callq	_RINOK
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	%r14d, %edx
	callq	_LzmaDec_AllocateProbs2
	movl	%eax, %edi
	callq	_RINOK
	movl	-32(%rbp), %eax
	cmpl	$4194304, %eax                  ## imm = 0x400000
	movl	$1048575, %ecx                  ## imm = 0xFFFFF
	movl	$4095, %edx                     ## imm = 0xFFF
	cmovgel	%ecx, %edx
	cmpl	$1073741824, %eax               ## imm = 0x40000000
	movl	$4194303, %ebx                  ## imm = 0x3FFFFF
	cmovll	%edx, %ebx
	leal	(%rbx,%rax), %ecx
	notl	%ebx
	andl	%ecx, %ebx
	cmpl	%eax, %ebx
	cmovlel	%eax, %ebx
	cmpq	$0, 8(%r15)
	je	LBB0_2
## %bb.1:
	cmpl	(%r15), %ebx
	je	LBB0_4
LBB0_2:
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_LzmaDec_FreeDict
	movl	%r14d, %edi
	movl	%ebx, %esi
	callq	_ISzAlloc_Alloc
	movq	%rax, 8(%r15)
	testq	%rax, %rax
	je	LBB0_6
## %bb.3:
	movl	-32(%rbp), %eax
LBB0_4:
	movl	%ebx, (%r15)
	movl	%eax, 4(%r15)
	movq	_SZ_OK@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_6:
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_LzmaDec_FreeProbs
	movq	_SZ_ERROR_MEM@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SZ_ERROR_MEM,4,2               ## @SZ_ERROR_MEM
	.comm	_SZ_OK,4,2                      ## @SZ_OK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_LzmaDec_Allocate               ; -- Begin function LzmaDec_Allocate
	.p2align	2
_LzmaDec_Allocate:                      ; @LzmaDec_Allocate
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x3
	mov	x19, x0
	add	x0, sp, #8
	bl	_LzmaProps_Decode
	bl	_RINOK
	add	x1, sp, #8
	mov	x0, x19
	mov	x2, x20
	bl	_LzmaDec_AllocateProbs2
	bl	_RINOK
	ldr	w8, [sp, #8]
	mov	w9, #4095
	mov	w10, #1048575
	cmp	w8, #1024, lsl #12              ; =4194304
	csel	w9, w10, w9, ge
	mov	w10, #1073741823
	mov	w11, #4194303
	cmp	w8, w10
	csel	w9, w11, w9, gt
	add	w10, w9, w8
	bic	w9, w10, w9
	cmp	w9, w8
	csel	w21, w9, w8, gt
	ldr	x9, [x19, #8]
	cbz	x9, LBB0_2
; %bb.1:
	ldr	w9, [x19]
	cmp	w21, w9
	b.eq	LBB0_4
LBB0_2:
	mov	x0, x19
	mov	x1, x20
	bl	_LzmaDec_FreeDict
	mov	x0, x20
	mov	x1, x21
	bl	_ISzAlloc_Alloc
	str	x0, [x19, #8]
	cbz	x0, LBB0_5
; %bb.3:
	ldr	w8, [sp, #8]
LBB0_4:
	stp	w21, w8, [x19]
Lloh0:
	adrp	x8, _SZ_OK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SZ_OK@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
	mov	x0, x19
	mov	x1, x20
	bl	_LzmaDec_FreeProbs
Lloh2:
	adrp	x8, _SZ_ERROR_MEM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SZ_ERROR_MEM@GOTPAGEOFF]
LBB0_6:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_SZ_ERROR_MEM,4,2               ; @SZ_ERROR_MEM
	.comm	_SZ_OK,4,2                      ; @SZ_OK
.subsections_via_symbols
