	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lha_read_data_lzh
_lha_read_data_lzh:                     ## @lha_read_data_lzh
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r12
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %r13
	movq	8(%rdi), %rax
	movq	(%rax), %rbx
	cmpl	$0, (%rbx)
	je	LBB0_9
LBB0_1:
	leaq	-48(%rbp), %rdx
	movq	%r13, %rdi
	movl	$1, %esi
	callq	___archive_read_ahead
	movl	%eax, 80(%rbx)
	movq	-48(%rbp), %rax
	testq	%rax, %rax
	jle	LBB0_12
## %bb.2:
	leaq	48(%rbx), %rdi
	movq	8(%rbx), %rcx
	cmpq	%rcx, %rax
	jle	LBB0_4
## %bb.3:
	movq	%rcx, -48(%rbp)
	movq	%rcx, %rax
LBB0_4:
	movl	%eax, 56(%rbx)
	movq	$0, 64(%rbx)
	movq	$0, 48(%rbx)
	xorl	%esi, %esi
	cmpq	%rcx, %rax
	sete	%sil
	callq	_lzh_decode
	cmpl	$128, %eax
	je	LBB0_7
## %bb.5:
	cmpl	$130, %eax
	jne	LBB0_13
## %bb.6:
	movl	$1, 16(%rbx)
LBB0_7:
	movq	32(%rbx), %rax
	movq	64(%rbx), %rcx
	movq	%rcx, 24(%rbx)
	subq	%rcx, 8(%rbx)
	cmpq	$0, 48(%rbx)
	movq	%rax, (%r12)
	je	LBB0_19
## %bb.8:
	movq	48(%rbx), %rdx
	movq	%rdx, (%r14)
	movq	72(%rbx), %rsi
	movq	%rsi, (%r15)
	movl	40(%rbx), %edi
	callq	_lha_crc16
	movl	%eax, 40(%rbx)
	movq	(%r14), %rax
	addq	%rax, 32(%rbx)
	movl	$128, %eax
	jmp	LBB0_18
LBB0_9:
	leaq	48(%rbx), %rdi
	movq	96(%rbx), %rsi
	callq	_lzh_decode_init
	cmpl	$128, %eax
	je	LBB0_14
## %bb.10:
	cmpl	$129, %eax
	jne	LBB0_15
## %bb.11:
	movq	$0, (%r15)
	movq	$0, (%r14)
	movq	$0, (%r12)
	movq	_ARCHIVE_ERRNO_FILE_FORMAT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	96(%rbx), %rax
	movl	(%rax), %ecx
	movl	4(%rax), %r8d
	movl	8(%rax), %r9d
	leaq	L_.str(%rip), %rdx
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_archive_set_error
	movq	%r13, %rdi
	callq	_archive_read_format_lha_read_data_skip
	movq	_ARCHIVE_WARN@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_12:
	movq	_ARCHIVE_ERRNO_FILE_FORMAT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	jmp	LBB0_16
LBB0_13:
	movq	_ARCHIVE_ERRNO_MISC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.3(%rip), %rdx
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_archive_set_error
	movl	$129, %eax
	jmp	LBB0_18
LBB0_14:
	movl	$1, (%rbx)
	movq	$0, 48(%rbx)
	movq	$0, 88(%rbx)
	jmp	LBB0_1
LBB0_15:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
LBB0_16:
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_archive_set_error
	movq	_ARCHIVE_FATAL@GOTPCREL(%rip), %rax
LBB0_17:
	movl	(%rax), %eax
LBB0_18:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	movq	$0, (%r14)
	movq	$0, (%r15)
	cmpl	$0, 16(%rbx)
	je	LBB0_21
## %bb.20:
	movq	%r13, %rdi
	callq	_lha_end_of_entry
	jmp	LBB0_18
LBB0_21:
	movl	$128, %eax
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.comm	_ARCHIVE_ERRNO_FILE_FORMAT,4,2  ## @ARCHIVE_ERRNO_FILE_FORMAT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unsupported lzh compression method -%c%c%c-"

	.comm	_ARCHIVE_WARN,4,2               ## @ARCHIVE_WARN
	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"Couldn't allocate memory for lzh decompression"

	.comm	_ARCHIVE_FATAL,4,2              ## @ARCHIVE_FATAL
L_.str.2:                               ## @.str.2
	.asciz	"Truncated LHa file body"

	.comm	_ARCHIVE_ERRNO_MISC,4,2         ## @ARCHIVE_ERRNO_MISC
L_.str.3:                               ## @.str.3
	.asciz	"Bad lzh data"

	.no_dead_strip	_lha_read_data_lzh
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lha_read_data_lzh
_lha_read_data_lzh:                     ; @lha_read_data_lzh
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x22, x3
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	ldr	x8, [x0, #8]
	ldr	x23, [x8]
	ldr	w8, [x23]
	cbz	w8, LBB0_9
LBB0_1:
	add	x2, sp, #24
	mov	x0, x19
	mov	w1, #1
	bl	___archive_read_ahead
	str	w0, [x23, #80]
	ldr	x8, [sp, #24]
	cmp	x8, #0
	b.le	LBB0_12
; %bb.2:
	add	x0, x23, #48
	ldr	x9, [x23, #8]
	cmp	x8, x9
	b.le	LBB0_4
; %bb.3:
	str	x9, [sp, #24]
	mov	x8, x9
LBB0_4:
	str	w8, [x23, #56]
	str	xzr, [x23, #64]
	str	xzr, [x23, #48]
	cmp	x8, x9
	cset	w1, eq
	bl	_lzh_decode
	cmp	w0, #128
	b.eq	LBB0_7
; %bb.5:
	cmp	w0, #130
	b.ne	LBB0_13
; %bb.6:
	mov	w8, #1
	str	w8, [x23, #16]
LBB0_7:
	ldr	x8, [x23, #64]
	str	x8, [x23, #24]
	ldr	x9, [x23, #8]
	sub	x8, x9, x8
	str	x8, [x23, #8]
	ldr	x8, [x23, #48]
	ldr	x9, [x23, #32]
	str	x9, [x22]
	cbz	x8, LBB0_19
; %bb.8:
	ldr	x2, [x23, #48]
	str	x2, [x20]
	ldr	x1, [x23, #72]
	str	x1, [x21]
	ldr	w0, [x23, #40]
	bl	_lha_crc16
	str	w0, [x23, #40]
	ldr	x8, [x20]
	ldr	x9, [x23, #32]
	add	x8, x9, x8
	str	x8, [x23, #32]
	mov	w0, #128
	b	LBB0_18
LBB0_9:
	add	x0, x23, #48
	ldr	x1, [x23, #96]
	bl	_lzh_decode_init
	cmp	w0, #128
	b.eq	LBB0_14
; %bb.10:
	cmp	w0, #129
	b.ne	LBB0_15
; %bb.11:
	str	xzr, [x21]
	str	xzr, [x20]
Lloh0:
	adrp	x8, _ARCHIVE_ERRNO_FILE_FORMAT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ARCHIVE_ERRNO_FILE_FORMAT@GOTPAGEOFF]
	str	xzr, [x22]
Lloh2:
	ldr	w1, [x8]
	ldr	x8, [x23, #96]
	ldp	w9, w10, [x8]
	ldr	w8, [x8, #8]
	stp	x10, x8, [sp, #8]
	str	x9, [sp]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_archive_set_error
	mov	x0, x19
	bl	_archive_read_format_lha_read_data_skip
Lloh5:
	adrp	x8, _ARCHIVE_WARN@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ARCHIVE_WARN@GOTPAGEOFF]
	b	LBB0_17
LBB0_12:
Lloh7:
	adrp	x8, _ARCHIVE_ERRNO_FILE_FORMAT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ARCHIVE_ERRNO_FILE_FORMAT@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
Lloh10:
	adrp	x2, l_.str.2@PAGE
Lloh11:
	add	x2, x2, l_.str.2@PAGEOFF
	b	LBB0_16
LBB0_13:
Lloh12:
	adrp	x8, _ARCHIVE_ERRNO_MISC@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ARCHIVE_ERRNO_MISC@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
Lloh15:
	adrp	x2, l_.str.3@PAGE
Lloh16:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_archive_set_error
	mov	w0, #129
	b	LBB0_18
LBB0_14:
	mov	w8, #1
	str	w8, [x23]
	str	xzr, [x23, #48]
	str	xzr, [x23, #88]
	b	LBB0_1
LBB0_15:
Lloh17:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
Lloh20:
	adrp	x2, l_.str.1@PAGE
Lloh21:
	add	x2, x2, l_.str.1@PAGEOFF
LBB0_16:
	mov	x0, x19
	bl	_archive_set_error
Lloh22:
	adrp	x8, _ARCHIVE_FATAL@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ARCHIVE_FATAL@GOTPAGEOFF]
LBB0_17:
	ldr	w0, [x8]
LBB0_18:
	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
	add	sp, sp, #96
	ret
LBB0_19:
	str	xzr, [x20]
	str	xzr, [x21]
	ldr	w8, [x23, #16]
	cbz	w8, LBB0_21
; %bb.20:
	mov	x0, x19
	bl	_lha_end_of_entry
	b	LBB0_18
LBB0_21:
	mov	w0, #128
	b	LBB0_18
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_ARCHIVE_ERRNO_FILE_FORMAT,4,2  ; @ARCHIVE_ERRNO_FILE_FORMAT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unsupported lzh compression method -%c%c%c-"

	.comm	_ARCHIVE_WARN,4,2               ; @ARCHIVE_WARN
	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"Couldn't allocate memory for lzh decompression"

	.comm	_ARCHIVE_FATAL,4,2              ; @ARCHIVE_FATAL
l_.str.2:                               ; @.str.2
	.asciz	"Truncated LHa file body"

	.comm	_ARCHIVE_ERRNO_MISC,4,2         ; @ARCHIVE_ERRNO_MISC
l_.str.3:                               ; @.str.3
	.asciz	"Bad lzh data"

	.no_dead_strip	_lha_read_data_lzh
.subsections_via_symbols
