	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function copy_from_lzss_window
_copy_from_lzss_window:                 ## @copy_from_lzss_window
	.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
	movl	%ecx, %r15d
	movl	%edx, %r14d
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movq	8(%rdi), %rax
	movq	(%rax), %r13
	cmpq	$0, (%r13)
	jne	LBB0_4
## %bb.1:
	movl	8(%r13), %edi
	callq	_malloc
	movq	%rax, (%r13)
	testq	%rax, %rax
	je	LBB0_2
LBB0_4:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	leaq	24(%r13), %rbx
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_lzss_offset_for_position
	movl	%eax, %r14d
	leal	(%r14,%r15), %r12d
	movq	%rbx, %rdi
	callq	_lzss_size
	cmpl	%eax, %r12d
	jle	LBB0_5
## %bb.6:
	movq	%rbx, %rdi
	callq	_lzss_size
	cmpl	%r15d, %eax
	jl	LBB0_8
## %bb.7:
	movq	%rbx, %rdi
	callq	_lzss_size
	movl	%eax, %ebx
	subl	%r14d, %ebx
	js	LBB0_8
## %bb.9:
	movq	(%r13), %rdi
	addq	16(%r13), %rdi
	movslq	%r14d, %rsi
	shlq	$2, %rsi
	addq	24(%r13), %rsi
	cmpl	%r15d, %ebx
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	jge	LBB0_11
## %bb.10:
	movl	%ebx, %edx
	callq	_memcpy
	movl	%ebx, %edi
	addq	16(%r13), %rdi
	addq	(%r13), %rdi
	movq	24(%r13), %rsi
	movl	%r15d, %edx
	subl	%ebx, %edx
	jmp	LBB0_12
LBB0_5:
	movq	(%r13), %rdi
	addq	16(%r13), %rdi
	movslq	%r14d, %rsi
	shlq	$2, %rsi
	addq	24(%r13), %rsi
	movl	%r15d, %edx
	callq	_memcpy
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_13
LBB0_8:
	movq	_ARCHIVE_ERRNO_FILE_FORMAT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	jmp	LBB0_3
LBB0_2:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%rbx, %rdi
LBB0_3:
	callq	_archive_set_error
	movq	_ARCHIVE_FATAL@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_11:
	movl	%r15d, %edx
LBB0_12:
	callq	_memcpy
LBB0_13:
	movslq	%r15d, %rax
	addq	16(%r13), %rax
	movq	%rax, 16(%r13)
	movslq	8(%r13), %rcx
	cmpq	%rcx, %rax
	jae	LBB0_15
## %bb.14:
	xorl	%eax, %eax
	jmp	LBB0_16
LBB0_15:
	movq	(%r13), %rax
LBB0_16:
	movq	%rax, (%r14)
	movq	_ARCHIVE_OK@GOTPCREL(%rip), %rax
LBB0_17:
	movl	(%rax), %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unable to allocate memory for uncompressed data."

	.comm	_ARCHIVE_FATAL,4,2              ## @ARCHIVE_FATAL
	.comm	_ARCHIVE_ERRNO_FILE_FORMAT,4,2  ## @ARCHIVE_ERRNO_FILE_FORMAT
L_.str.1:                               ## @.str.1
	.asciz	"Bad RAR file data"

	.comm	_ARCHIVE_OK,4,2                 ## @ARCHIVE_OK
	.no_dead_strip	_copy_from_lzss_window
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function copy_from_lzss_window
_copy_from_lzss_window:                 ; @copy_from_lzss_window
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x20, x3
	mov	x22, x2
	mov	x19, x1
	mov	x21, x0
	ldr	x8, [x0, #8]
	ldr	x24, [x8]
	ldr	x8, [x24]
	cbnz	x8, LBB0_2
; %bb.1:
	ldr	w0, [x24, #8]
	bl	_malloc
	str	x0, [x24]
	cbz	x0, LBB0_14
LBB0_2:
	add	x23, x24, #24
	mov	x0, x23
	mov	x1, x22
	bl	_lzss_offset_for_position
	mov	x22, x0
	add	w25, w0, w20
	mov	x0, x23
	bl	_lzss_size
	cmp	w25, w0
	b.le	LBB0_7
; %bb.3:
	mov	x0, x23
	bl	_lzss_size
	cmp	w0, w20
	b.lt	LBB0_11
; %bb.4:
	mov	x0, x23
	bl	_lzss_size
	subs	w23, w0, w22
	b.mi	LBB0_11
; %bb.5:
	ldr	x8, [x24]
	ldp	x9, x10, [x24, #16]
	add	x0, x8, x9
	add	x1, x10, w22, sxtw #2
	cmp	w23, w20
	b.ge	LBB0_8
; %bb.6:
	mov	x2, x23
	bl	_memcpy
	ldr	x8, [x24]
	ldp	x9, x1, [x24, #16]
	add	x9, x9, w23, uxtw
	add	x0, x8, x9
	sub	w2, w20, w23
	b	LBB0_9
LBB0_7:
	ldr	x8, [x24]
	ldp	x9, x10, [x24, #16]
	add	x0, x8, x9
	add	x1, x10, w22, sxtw #2
LBB0_8:
	mov	x2, x20
LBB0_9:
	bl	_memcpy
	ldr	x8, [x24, #16]
	add	x8, x8, w20, sxtw
	str	x8, [x24, #16]
	ldrsw	x9, [x24, #8]
	cmp	x8, x9
	b.hs	LBB0_12
; %bb.10:
	mov	x8, #0
	b	LBB0_13
LBB0_11:
Lloh0:
	adrp	x8, _ARCHIVE_ERRNO_FILE_FORMAT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ARCHIVE_ERRNO_FILE_FORMAT@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x2, l_.str.1@PAGE
Lloh4:
	add	x2, x2, l_.str.1@PAGEOFF
	b	LBB0_15
LBB0_12:
	ldr	x8, [x24]
LBB0_13:
	str	x8, [x19]
Lloh5:
	adrp	x8, _ARCHIVE_OK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ARCHIVE_OK@GOTPAGEOFF]
	b	LBB0_16
LBB0_14:
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
Lloh10:
	adrp	x2, l_.str@PAGE
Lloh11:
	add	x2, x2, l_.str@PAGEOFF
LBB0_15:
	mov	x0, x21
	bl	_archive_set_error
Lloh12:
	adrp	x8, _ARCHIVE_FATAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ARCHIVE_FATAL@GOTPAGEOFF]
LBB0_16:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unable to allocate memory for uncompressed data."

	.comm	_ARCHIVE_FATAL,4,2              ; @ARCHIVE_FATAL
	.comm	_ARCHIVE_ERRNO_FILE_FORMAT,4,2  ; @ARCHIVE_ERRNO_FILE_FORMAT
l_.str.1:                               ; @.str.1
	.asciz	"Bad RAR file data"

	.comm	_ARCHIVE_OK,4,2                 ; @ARCHIVE_OK
	.no_dead_strip	_copy_from_lzss_window
.subsections_via_symbols
