	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lha_read_file_header_2
_lha_read_file_header_2:                ## @lha_read_file_header_2
	.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	%rsi, %r15
	movq	%rdi, %r14
	movq	_H2_FIXED_SIZE@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	xorl	%edx, %edx
	callq	___archive_read_ahead
	testq	%rax, %rax
	je	LBB0_12
## %bb.1:
	movq	%rax, %rbx
	movq	_H2_HEADER_SIZE_OFFSET@GOTPCREL(%rip), %rax
	movslq	(%rax), %rdi
	addq	%rbx, %rdi
	callq	_archive_le16dec
	movq	%rax, (%r15)
	movq	_H2_COMP_SIZE_OFFSET@GOTPCREL(%rip), %rax
	movslq	(%rax), %rdi
	addq	%rbx, %rdi
	callq	_archive_le32dec
	movq	%rax, 48(%r15)
	movq	_H2_ORIG_SIZE_OFFSET@GOTPCREL(%rip), %rax
	movslq	(%rax), %rdi
	addq	%rbx, %rdi
	callq	_archive_le32dec
	movq	%rax, 40(%r15)
	movq	_H2_TIME_OFFSET@GOTPCREL(%rip), %rax
	movslq	(%rax), %rdi
	addq	%rbx, %rdi
	callq	_archive_le32dec
	movq	%rax, 32(%r15)
	movq	_H2_CRC_OFFSET@GOTPCREL(%rip), %rax
	movslq	(%rax), %rdi
	addq	%rbx, %rdi
	callq	_archive_le16dec
	movq	%rax, 24(%r15)
	movq	_CRC_IS_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 16(%r15)
	movq	(%r13), %rdx
	cmpq	%rdx, (%r15)
	jge	LBB0_3
## %bb.2:
	movq	_ARCHIVE_ERRNO_FILE_FORMAT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
LBB0_10:
	movq	%r14, %rdi
	callq	_archive_set_error
	movq	_ARCHIVE_FATAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_11
LBB0_12:
	movq	%r14, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_truncated_error                ## TAILCALL
LBB0_3:
	xorl	%edi, %edi
	movq	%rbx, %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_lha_crc16
	movq	%rax, -48(%rbp)
	movl	(%r13), %esi
	movq	%r14, %rdi
	callq	___archive_read_consume
	movq	(%r15), %r8
	subq	(%r13), %r8
	leaq	-48(%rbp), %rdx
	leaq	-56(%rbp), %r9
	movq	%r14, %rdi
	movq	%r15, %rsi
	movl	$2, %ecx
	callq	_lha_read_file_extended_header
	movl	%eax, %ebx
	movq	_ARCHIVE_WARN@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jl	LBB0_11
## %bb.4:
	movl	(%r15), %r12d
	movl	-56(%rbp), %eax
	addl	(%r13), %eax
	subl	%eax, %r12d
	jle	LBB0_8
## %bb.5:
	movq	%r14, %rdi
	movl	%r12d, %esi
	xorl	%edx, %edx
	callq	___archive_read_ahead
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movq	-48(%rbp), %rdi
	movq	%rax, %rsi
	movl	%r12d, %edx
	callq	_lha_crc16
	movq	%rax, -48(%rbp)
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	___archive_read_consume
LBB0_8:
	movq	-48(%rbp), %rax
	cmpq	8(%r15), %rax
	je	LBB0_11
## %bb.9:
	movq	_ARCHIVE_ERRNO_FILE_FORMAT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	jmp	LBB0_10
LBB0_6:
	movq	%r14, %rdi
	callq	_truncated_error
	movl	%eax, %ebx
LBB0_11:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_H2_FIXED_SIZE,8,3              ## @H2_FIXED_SIZE
	.comm	_H2_HEADER_SIZE_OFFSET,4,2      ## @H2_HEADER_SIZE_OFFSET
	.comm	_H2_COMP_SIZE_OFFSET,4,2        ## @H2_COMP_SIZE_OFFSET
	.comm	_H2_ORIG_SIZE_OFFSET,4,2        ## @H2_ORIG_SIZE_OFFSET
	.comm	_H2_TIME_OFFSET,4,2             ## @H2_TIME_OFFSET
	.comm	_H2_CRC_OFFSET,4,2              ## @H2_CRC_OFFSET
	.comm	_CRC_IS_SET,4,2                 ## @CRC_IS_SET
	.comm	_ARCHIVE_ERRNO_FILE_FORMAT,4,2  ## @ARCHIVE_ERRNO_FILE_FORMAT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid LHa header size"

	.comm	_ARCHIVE_FATAL,4,2              ## @ARCHIVE_FATAL
	.comm	_ARCHIVE_WARN,4,2               ## @ARCHIVE_WARN
L_.str.1:                               ## @.str.1
	.asciz	"LHa header CRC error"

	.no_dead_strip	_lha_read_file_header_2
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lha_read_file_header_2
_lha_read_file_header_2:                ; @lha_read_file_header_2
	.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, x1
	mov	x19, x0
Lloh0:
	adrp	x22, _H2_FIXED_SIZE@GOTPAGE
Lloh1:
	ldr	x22, [x22, _H2_FIXED_SIZE@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x2, #0
	bl	___archive_read_ahead
	cbz	x0, LBB0_4
; %bb.1:
	mov	x21, x0
Lloh2:
	adrp	x8, _H2_HEADER_SIZE_OFFSET@GOTPAGE
Lloh3:
	ldr	x8, [x8, _H2_HEADER_SIZE_OFFSET@GOTPAGEOFF]
Lloh4:
	ldrsw	x8, [x8]
	add	x0, x0, x8
	bl	_archive_le16dec
	str	x0, [x20]
Lloh5:
	adrp	x8, _H2_COMP_SIZE_OFFSET@GOTPAGE
Lloh6:
	ldr	x8, [x8, _H2_COMP_SIZE_OFFSET@GOTPAGEOFF]
Lloh7:
	ldrsw	x8, [x8]
	add	x0, x21, x8
	bl	_archive_le32dec
	str	x0, [x20, #48]
Lloh8:
	adrp	x8, _H2_ORIG_SIZE_OFFSET@GOTPAGE
Lloh9:
	ldr	x8, [x8, _H2_ORIG_SIZE_OFFSET@GOTPAGEOFF]
Lloh10:
	ldrsw	x8, [x8]
	add	x0, x21, x8
	bl	_archive_le32dec
	str	x0, [x20, #40]
Lloh11:
	adrp	x8, _H2_TIME_OFFSET@GOTPAGE
Lloh12:
	ldr	x8, [x8, _H2_TIME_OFFSET@GOTPAGEOFF]
Lloh13:
	ldrsw	x8, [x8]
	add	x0, x21, x8
	bl	_archive_le32dec
	str	x0, [x20, #32]
Lloh14:
	adrp	x8, _H2_CRC_OFFSET@GOTPAGE
Lloh15:
	ldr	x8, [x8, _H2_CRC_OFFSET@GOTPAGEOFF]
Lloh16:
	ldrsw	x8, [x8]
	add	x0, x21, x8
	bl	_archive_le16dec
	str	x0, [x20, #24]
Lloh17:
	adrp	x8, _CRC_IS_SET@GOTPAGE
Lloh18:
	ldr	x8, [x8, _CRC_IS_SET@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	ldr	w9, [x20, #16]
	orr	w8, w9, w8
	str	w8, [x20, #16]
	ldr	x8, [x20]
	ldr	x2, [x22]
	cmp	x8, x2
	b.ge	LBB0_5
; %bb.2:
Lloh20:
	adrp	x8, _ARCHIVE_ERRNO_FILE_FORMAT@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ARCHIVE_ERRNO_FILE_FORMAT@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
Lloh23:
	adrp	x2, l_.str@PAGE
Lloh24:
	add	x2, x2, l_.str@PAGEOFF
LBB0_3:
	mov	x0, x19
	bl	_archive_set_error
Lloh25:
	adrp	x8, _ARCHIVE_FATAL@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ARCHIVE_FATAL@GOTPAGEOFF]
Lloh27:
	ldr	w21, [x8]
	b	LBB0_12
LBB0_4:
	mov	x0, x19
	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
	b	_truncated_error
LBB0_5:
	mov	x0, #0
	mov	x1, x21
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_lha_crc16
	str	x0, [sp]
	ldr	w1, [x22]
	mov	x0, x19
	bl	___archive_read_consume
	ldr	x8, [x20]
	ldr	x9, [x22]
	sub	x4, x8, x9
	mov	x2, sp
	add	x5, sp, #8
	mov	x0, x19
	mov	x1, x20
	mov	w3, #2
	bl	_lha_read_file_extended_header
	mov	x21, x0
Lloh28:
	adrp	x8, _ARCHIVE_WARN@GOTPAGE
Lloh29:
	ldr	x8, [x8, _ARCHIVE_WARN@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	cmp	w0, w8
	b.lt	LBB0_12
; %bb.6:
	ldr	w8, [x20]
	ldr	w9, [x22]
	ldr	w10, [sp, #8]
	add	w9, w10, w9
	sub	w22, w8, w9
	cmp	w22, #1
	b.lt	LBB0_9
; %bb.7:
	mov	x0, x19
	mov	x1, x22
	mov	x2, #0
	bl	___archive_read_ahead
	cbz	x0, LBB0_11
; %bb.8:
	mov	x1, x0
	ldr	x0, [sp]
	mov	x2, x22
	bl	_lha_crc16
	str	x0, [sp]
	mov	x0, x19
	mov	x1, x22
	bl	___archive_read_consume
LBB0_9:
	ldr	x8, [sp]
	ldr	x9, [x20, #8]
	cmp	x8, x9
	b.eq	LBB0_12
; %bb.10:
Lloh31:
	adrp	x8, _ARCHIVE_ERRNO_FILE_FORMAT@GOTPAGE
Lloh32:
	ldr	x8, [x8, _ARCHIVE_ERRNO_FILE_FORMAT@GOTPAGEOFF]
Lloh33:
	ldr	w1, [x8]
Lloh34:
	adrp	x2, l_.str.1@PAGE
Lloh35:
	add	x2, x2, l_.str.1@PAGEOFF
	b	LBB0_3
LBB0_11:
	mov	x0, x19
	bl	_truncated_error
	mov	x21, x0
LBB0_12:
	mov	x0, x21
	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 AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_H2_FIXED_SIZE,8,3              ; @H2_FIXED_SIZE
	.comm	_H2_HEADER_SIZE_OFFSET,4,2      ; @H2_HEADER_SIZE_OFFSET
	.comm	_H2_COMP_SIZE_OFFSET,4,2        ; @H2_COMP_SIZE_OFFSET
	.comm	_H2_ORIG_SIZE_OFFSET,4,2        ; @H2_ORIG_SIZE_OFFSET
	.comm	_H2_TIME_OFFSET,4,2             ; @H2_TIME_OFFSET
	.comm	_H2_CRC_OFFSET,4,2              ; @H2_CRC_OFFSET
	.comm	_CRC_IS_SET,4,2                 ; @CRC_IS_SET
	.comm	_ARCHIVE_ERRNO_FILE_FORMAT,4,2  ; @ARCHIVE_ERRNO_FILE_FORMAT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid LHa header size"

	.comm	_ARCHIVE_FATAL,4,2              ; @ARCHIVE_FATAL
	.comm	_ARCHIVE_WARN,4,2               ; @ARCHIVE_WARN
l_.str.1:                               ; @.str.1
	.asciz	"LHa header CRC error"

	.no_dead_strip	_lha_read_file_header_2
.subsections_via_symbols
