	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function inspect_fw
_inspect_fw:                            ## @inspect_fw
	.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	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MD5SUM_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	leaq	(,%rbx,4), %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_inspect_info@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r13
	movq	_inspect_info@GOTPCREL(%rip), %r15
	movq	%r15, %rdi
	movq	%rax, %rsi
	callq	_read_to_buf
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_33
## %bb.3:
	movq	_custom_board@GOTPCREL(%rip), %rax
	movq	_FLAG_LE_KERNEL_LA_EP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_5
## %bb.4:
	movl	(%r13), %edi
	callq	_bswap_32
	movl	%eax, (%r13)
	movl	4(%r13), %edi
	callq	_bswap_32
	movl	%eax, 4(%r13)
LBB0_5:
	movq	8(%r15), %rsi
	leaq	L_.str.1(%rip), %rdi
	callq	_inspect_fw_pstr
	movl	(%r15), %esi
	leaq	L_.str.2(%rip), %rdi
	callq	_inspect_fw_phexdec
	movl	8(%r13), %edi
	callq	_ntohl
	movl	%eax, %edi
	callq	_bswap_32
	andl	$-2, %eax
	cmpl	$2, %eax
	jne	LBB0_6
## %bb.7:
	leaq	L_.str.4(%rip), %rdi
	movl	$112, %esi
	callq	_inspect_fw_phexdec
	movq	104(%r13), %rsi
	shll	$2, %ebx
	movq	%r12, %rdi
	movl	%ebx, %edx
	callq	_memcpy
	movl	12(%r13), %edi
	callq	_ntohl
	movq	104(%r13), %rdi
	testl	%eax, %eax
	jne	LBB0_8
## %bb.9:
	movq	_md5salt_normal@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_1:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_ERR
	jmp	LBB0_34
LBB0_6:
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_ERR
	jmp	LBB0_33
LBB0_8:
	movq	_md5salt_boot@GOTPCREL(%rip), %rax
LBB0_10:
	movq	(%rax), %rsi
	movl	%ebx, %edx
	callq	_memcpy
	movl	(%r15), %esi
	movq	104(%r13), %rdx
	movq	%r13, %rdi
	callq	_get_md5
	movq	104(%r13), %rsi
	movq	%r12, %rdi
	movl	%ebx, %edx
	callq	_memcmp
	leaq	L_.str.5(%rip), %rdi
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	leaq	L_.str.6(%rip), %rdx
	movq	%r12, %rsi
	callq	_inspect_fw_pmd5sum
	movq	104(%r13), %rsi
	leaq	L_.str.7(%rip), %rdi
	leaq	L_.str.8(%rip), %rdx
	jmp	LBB0_13
LBB0_12:
	leaq	L_.str.9(%rip), %rdx
	movq	%r12, %rsi
LBB0_13:
	callq	_inspect_fw_pmd5sum
	movl	16(%r13), %ebx
	movl	%ebx, %edi
	callq	_ntohl
	testl	%eax, %eax
	je	LBB0_15
## %bb.14:
	leaq	L_.str.10(%rip), %rdi
	movl	%ebx, %esi
	callq	_inspect_fw_phexdec
LBB0_15:
	movq	96(%r13), %rsi
	leaq	L_.str.11(%rip), %rdi
	leaq	L_.str.12(%rip), %rdx
	callq	_inspect_fw_pmd5sum
	movl	20(%r13), %ebx
	movl	%ebx, %edi
	callq	_ntohl
	cmpl	$-1, %eax
	je	LBB0_17
## %bb.16:
	leaq	L_.str.13(%rip), %rdi
	movl	%ebx, %esi
	callq	_inspect_fw_phexdec
LBB0_17:
	movl	24(%r13), %edi
	callq	_ntohs
	cmpl	$21930, %eax                    ## imm = 0x55AA
	je	LBB0_19
## %bb.18:
	movl	24(%r13), %esi
	leaq	L_.str.14(%rip), %rdi
	callq	_inspect_fw_phexdec
LBB0_19:
	movl	28(%r13), %esi
	cmpl	$165, %esi
	je	LBB0_21
## %bb.20:
	leaq	L_.str.15(%rip), %rdi
	callq	_inspect_fw_phexdec
LBB0_21:
	movl	$10, %edi
	callq	_putchar
	movq	32(%r13), %rsi
	leaq	L_.str.17(%rip), %rdi
	callq	_inspect_fw_pstr
	movl	40(%r13), %edi
	callq	_ntohl
	leaq	L_.str.18(%rip), %rdi
	movl	%eax, %esi
	callq	_inspect_fw_phex
	movl	44(%r13), %edi
	callq	_ntohl
	leaq	L_.str.19(%rip), %rdi
	movl	%eax, %esi
	callq	_inspect_fw_phex
	movl	48(%r13), %edi
	callq	_ntohl
	leaq	L_.str.20(%rip), %rdi
	movl	%eax, %esi
	callq	_inspect_fw_phex
	movl	52(%r13), %edx
	movl	56(%r13), %ecx
	movl	60(%r13), %r8d
	movl	64(%r13), %r9d
	movl	68(%r13), %ebx
	subq	$8, %rsp
	leaq	L_.str.21(%rip), %rdi
	leaq	L_.str.22(%rip), %rsi
	xorl	%eax, %eax
	pushq	%rbx
	callq	_printf
	addq	$16, %rsp
	movl	$10, %edi
	callq	_putchar
	movl	72(%r13), %edi
	callq	_ntohl
	leaq	L_.str.23(%rip), %rdi
	movl	%eax, %esi
	callq	_inspect_fw_phexdec
	movl	76(%r13), %edi
	callq	_ntohl
	leaq	L_.str.24(%rip), %rdi
	movl	%eax, %esi
	callq	_inspect_fw_phexdec
	movl	(%r13), %edi
	callq	_ntohl
	leaq	L_.str.25(%rip), %rdi
	movl	%eax, %esi
	callq	_inspect_fw_phex
	movl	4(%r13), %edi
	callq	_ntohl
	leaq	L_.str.26(%rip), %rdi
	movl	%eax, %esi
	callq	_inspect_fw_phex
	movl	80(%r13), %edi
	callq	_ntohl
	leaq	L_.str.27(%rip), %rdi
	movl	%eax, %esi
	callq	_inspect_fw_phexdec
	movl	84(%r13), %edi
	callq	_ntohl
	leaq	L_.str.28(%rip), %rdi
	movl	%eax, %esi
	callq	_inspect_fw_phexdec
	movl	88(%r13), %edi
	callq	_ntohl
	leaq	L_.str.29(%rip), %rdi
	movl	%eax, %esi
	callq	_inspect_fw_phexdec
	movl	12(%r13), %edi
	callq	_ntohl
	leaq	L_.str.30(%rip), %rdi
	movl	%eax, %esi
	callq	_inspect_fw_phexdec
	movl	92(%r13), %edi
	callq	_ntohl
	leaq	L_.str.31(%rip), %rdi
	movl	%eax, %esi
	callq	_inspect_fw_phexdec
	movq	_extract@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_33
## %bb.22:
	movl	$10, %edi
	callq	_putchar
	movq	8(%r15), %rdi
	callq	_strlen
                                        ## kill: def $eax killed $eax def $rax
	leal	8(%rax), %edi
	callq	_malloc
	movq	%rax, %r12
	movq	8(%r15), %rdx
	leaq	L_.str.32(%rip), %rsi
	movq	%rax, %rdi
	callq	_sprintf
	leaq	L_.str.33(%rip), %rdi
	movq	%r12, %rsi
	xorl	%eax, %eax
	callq	_printf
	leaq	L_.str.34(%rip), %rsi
	movq	%r12, %rdi
	callq	_fopen
	testq	%rax, %rax
	je	LBB0_26
## %bb.23:
	movq	%rax, %rbx
	movl	72(%r13), %edi
	callq	_ntohl
	movslq	%eax, %r15
	addq	%r13, %r15
	movl	76(%r13), %edi
	callq	_ntohl
	movq	%r15, %rdi
	movl	%eax, %esi
	movl	$1, %edx
	movq	%rbx, %rcx
	callq	_fwrite
	testl	%eax, %eax
	jne	LBB0_25
## %bb.24:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str.35(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_ERR
LBB0_25:
	movq	%rbx, %rdi
	callq	_fclose
	movq	_inspect_info@GOTPCREL(%rip), %r15
	jmp	LBB0_27
LBB0_26:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str.36(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_ERR
LBB0_27:
	movq	%r12, %rdi
	callq	_free
	movq	8(%r15), %rdi
	callq	_strlen
                                        ## kill: def $eax killed $eax def $rax
	leal	8(%rax), %edi
	callq	_malloc
	movq	%rax, %r12
	movq	8(%r15), %rdx
	leaq	L_.str.37(%rip), %rsi
	movq	%rax, %rdi
	callq	_sprintf
	leaq	L_.str.38(%rip), %rdi
	movq	%r12, %rsi
	xorl	%eax, %eax
	callq	_printf
	leaq	L_.str.34(%rip), %rsi
	movq	%r12, %rdi
	callq	_fopen
	testq	%rax, %rax
	je	LBB0_31
## %bb.28:
	movq	%rax, %r15
	movl	80(%r13), %edi
	callq	_ntohl
	cltq
	movq	%r13, %rbx
	addq	%rax, %rbx
	movl	84(%r13), %edi
	callq	_ntohl
	movq	%rbx, %rdi
	movl	%eax, %esi
	movl	$1, %edx
	movq	%r15, %rcx
	callq	_fwrite
	testl	%eax, %eax
	jne	LBB0_30
## %bb.29:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str.35(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_ERR
LBB0_30:
	movq	%r15, %rdi
	callq	_fclose
	jmp	LBB0_32
LBB0_31:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str.36(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_ERR
LBB0_32:
	movq	%r12, %rdi
	callq	_free
LBB0_33:
	movq	%r13, %rdi
	callq	_free
LBB0_34:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_36
## %bb.35:
	movl	%r14d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_36:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MD5SUM_LEN,4,2                 ## @MD5SUM_LEN
	.comm	_EXIT_FAILURE,4,2               ## @EXIT_FAILURE
	.comm	_inspect_info,16,3              ## @inspect_info
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"no memory for buffer!\n"

	.comm	_custom_board,4,2               ## @custom_board
	.comm	_FLAG_LE_KERNEL_LA_EP,4,2       ## @FLAG_LE_KERNEL_LA_EP
L_.str.1:                               ## @.str.1
	.asciz	"File name"

L_.str.2:                               ## @.str.2
	.asciz	"File size"

L_.str.3:                               ## @.str.3
	.asciz	"file does not seem to have V2/V3 header!\n"

L_.str.4:                               ## @.str.4
	.asciz	"Version 2 Header size"

	.comm	_md5salt_normal,8,3             ## @md5salt_normal
	.comm	_md5salt_boot,8,3               ## @md5salt_boot
L_.str.5:                               ## @.str.5
	.asciz	"Header MD5Sum1"

L_.str.6:                               ## @.str.6
	.asciz	"(*ERROR*)"

L_.str.7:                               ## @.str.7
	.asciz	"          --> expected"

L_.str.8:                               ## @.str.8
	.space	1

L_.str.9:                               ## @.str.9
	.asciz	"(ok)"

L_.str.10:                              ## @.str.10
	.asciz	"Unknown value 2"

L_.str.11:                              ## @.str.11
	.asciz	"Header MD5Sum2"

L_.str.12:                              ## @.str.12
	.asciz	"(purpose yet unknown, unchecked here)"

L_.str.13:                              ## @.str.13
	.asciz	"Unknown value 3"

L_.str.14:                              ## @.str.14
	.asciz	"Unknown value 4"

L_.str.15:                              ## @.str.15
	.asciz	"Unknown value 5"

L_.str.17:                              ## @.str.17
	.asciz	"Firmware version"

L_.str.18:                              ## @.str.18
	.asciz	"Hardware ID"

L_.str.19:                              ## @.str.19
	.asciz	"Hardware Revision"

L_.str.20:                              ## @.str.20
	.asciz	"Additional HW Version"

L_.str.21:                              ## @.str.21
	.asciz	"%-23s: %d.%d.%d-%d.%d\n"

L_.str.22:                              ## @.str.22
	.asciz	"Software version"

L_.str.23:                              ## @.str.23
	.asciz	"Kernel data offset"

L_.str.24:                              ## @.str.24
	.asciz	"Kernel data length"

L_.str.25:                              ## @.str.25
	.asciz	"Kernel load address"

L_.str.26:                              ## @.str.26
	.asciz	"Kernel entry point"

L_.str.27:                              ## @.str.27
	.asciz	"Rootfs data offset"

L_.str.28:                              ## @.str.28
	.asciz	"Rootfs data length"

L_.str.29:                              ## @.str.29
	.asciz	"Boot loader data offset"

L_.str.30:                              ## @.str.30
	.asciz	"Boot loader data length"

L_.str.31:                              ## @.str.31
	.asciz	"Total firmware length"

	.comm	_extract,8,3                    ## @extract
L_.str.32:                              ## @.str.32
	.asciz	"%s-kernel"

L_.str.33:                              ## @.str.33
	.asciz	"Extracting kernel to \"%s\"...\n"

L_.str.34:                              ## @.str.34
	.asciz	"w"

L_.str.35:                              ## @.str.35
	.asciz	"error in fwrite(): %s"

	.comm	_errno,4,2                      ## @errno
L_.str.36:                              ## @.str.36
	.asciz	"error in fopen(): %s"

L_.str.37:                              ## @.str.37
	.asciz	"%s-rootfs"

L_.str.38:                              ## @.str.38
	.asciz	"Extracting rootfs to \"%s\"...\n"

	.no_dead_strip	_inspect_fw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function inspect_fw
_inspect_fw:                            ; @inspect_fw
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	sub	sp, sp, #16
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
Lloh3:
	adrp	x8, _MD5SUM_LEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MD5SUM_LEN@GOTPAGEOFF]
Lloh5:
	ldr	w23, [x8]
	lsl	x8, x23, #2
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x22, x9, x8
	mov	sp, x22
Lloh8:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
Lloh10:
	ldr	w19, [x8]
Lloh11:
	adrp	x8, _inspect_info@GOTPAGE
Lloh12:
	ldr	x8, [x8, _inspect_info@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	bl	_malloc
	cbz	x0, LBB0_7
; %bb.1:
	mov	x20, x0
Lloh14:
	adrp	x21, _inspect_info@GOTPAGE
Lloh15:
	ldr	x21, [x21, _inspect_info@GOTPAGEOFF]
	mov	x0, x21
	mov	x1, x20
	bl	_read_to_buf
	mov	x19, x0
	cbnz	w0, LBB0_30
; %bb.2:
Lloh16:
	adrp	x8, _custom_board@GOTPAGE
Lloh17:
	ldr	x8, [x8, _custom_board@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
Lloh19:
	adrp	x9, _FLAG_LE_KERNEL_LA_EP@GOTPAGE
Lloh20:
	ldr	x9, [x9, _FLAG_LE_KERNEL_LA_EP@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.3:
	ldr	w0, [x20]
	bl	_bswap_32
	str	w0, [x20]
	ldr	w0, [x20, #4]
	bl	_bswap_32
	str	w0, [x20, #4]
LBB0_4:
	ldr	x1, [x21, #8]
Lloh22:
	adrp	x0, l_.str.1@PAGE
Lloh23:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_inspect_fw_pstr
	ldr	w1, [x21]
Lloh24:
	adrp	x0, l_.str.2@PAGE
Lloh25:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_inspect_fw_phexdec
	ldr	w0, [x20, #8]
	bl	_ntohl
	bl	_bswap_32
	and	w8, w0, #0xfffffffe
	cmp	w8, #2
	b.ne	LBB0_8
; %bb.5:
Lloh26:
	adrp	x0, l_.str.4@PAGE
Lloh27:
	add	x0, x0, l_.str.4@PAGEOFF
	mov	w1, #112
	bl	_inspect_fw_phexdec
	ldr	x1, [x20, #104]
	lsl	w23, w23, #2
	mov	x0, x22
	mov	x2, x23
	bl	_memcpy
	ldr	w0, [x20, #12]
	bl	_ntohl
Lloh28:
	adrp	x9, _md5salt_normal@GOTPAGE
Lloh29:
	ldr	x9, [x9, _md5salt_normal@GOTPAGEOFF]
	ldr	x8, [x20, #104]
Lloh30:
	adrp	x10, _md5salt_boot@GOTPAGE
Lloh31:
	ldr	x10, [x10, _md5salt_boot@GOTPAGEOFF]
	cmp	w0, #0
	csel	x9, x9, x10, eq
	ldr	x1, [x9]
	mov	x0, x8
	mov	x2, x23
	bl	_memcpy
	ldr	w1, [x21]
	ldr	x2, [x20, #104]
	mov	x0, x20
	bl	_get_md5
	ldr	x1, [x20, #104]
	mov	x0, x22
	mov	x2, x23
	bl	_memcmp
	cbz	x0, LBB0_9
; %bb.6:
Lloh32:
	adrp	x0, l_.str.5@PAGE
Lloh33:
	add	x0, x0, l_.str.5@PAGEOFF
Lloh34:
	adrp	x2, l_.str.6@PAGE
Lloh35:
	add	x2, x2, l_.str.6@PAGEOFF
	mov	x1, x22
	bl	_inspect_fw_pmd5sum
	ldr	x1, [x20, #104]
Lloh36:
	adrp	x0, l_.str.7@PAGE
Lloh37:
	add	x0, x0, l_.str.7@PAGEOFF
Lloh38:
	adrp	x2, l_.str.8@PAGE
Lloh39:
	add	x2, x2, l_.str.8@PAGEOFF
	b	LBB0_10
LBB0_7:
Lloh40:
	adrp	x0, l_.str@PAGE
Lloh41:
	add	x0, x0, l_.str@PAGEOFF
	bl	_ERR
	b	LBB0_31
LBB0_8:
Lloh42:
	adrp	x0, l_.str.3@PAGE
Lloh43:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_ERR
	b	LBB0_30
LBB0_9:
Lloh44:
	adrp	x0, l_.str.5@PAGE
Lloh45:
	add	x0, x0, l_.str.5@PAGEOFF
Lloh46:
	adrp	x2, l_.str.9@PAGE
Lloh47:
	add	x2, x2, l_.str.9@PAGEOFF
	mov	x1, x22
LBB0_10:
	bl	_inspect_fw_pmd5sum
	ldr	w22, [x20, #16]
	mov	x0, x22
	bl	_ntohl
	cbz	w0, LBB0_12
; %bb.11:
Lloh48:
	adrp	x0, l_.str.10@PAGE
Lloh49:
	add	x0, x0, l_.str.10@PAGEOFF
	mov	x1, x22
	bl	_inspect_fw_phexdec
LBB0_12:
	ldr	x1, [x20, #96]
Lloh50:
	adrp	x0, l_.str.11@PAGE
Lloh51:
	add	x0, x0, l_.str.11@PAGEOFF
Lloh52:
	adrp	x2, l_.str.12@PAGE
Lloh53:
	add	x2, x2, l_.str.12@PAGEOFF
	bl	_inspect_fw_pmd5sum
	ldr	w22, [x20, #20]
	mov	x0, x22
	bl	_ntohl
	cmn	w0, #1
	b.eq	LBB0_14
; %bb.13:
Lloh54:
	adrp	x0, l_.str.13@PAGE
Lloh55:
	add	x0, x0, l_.str.13@PAGEOFF
	mov	x1, x22
	bl	_inspect_fw_phexdec
LBB0_14:
	ldr	w0, [x20, #24]
	bl	_ntohs
	mov	w8, #21930
	cmp	w0, w8
	b.eq	LBB0_16
; %bb.15:
	ldr	w1, [x20, #24]
Lloh56:
	adrp	x0, l_.str.14@PAGE
Lloh57:
	add	x0, x0, l_.str.14@PAGEOFF
	bl	_inspect_fw_phexdec
LBB0_16:
	ldr	w1, [x20, #28]
	cmp	w1, #165
	b.eq	LBB0_18
; %bb.17:
Lloh58:
	adrp	x0, l_.str.15@PAGE
Lloh59:
	add	x0, x0, l_.str.15@PAGEOFF
	bl	_inspect_fw_phexdec
LBB0_18:
	mov	w0, #10
	bl	_putchar
	ldr	x1, [x20, #32]
Lloh60:
	adrp	x0, l_.str.17@PAGE
Lloh61:
	add	x0, x0, l_.str.17@PAGEOFF
	bl	_inspect_fw_pstr
	ldr	w0, [x20, #40]
	bl	_ntohl
	mov	x1, x0
Lloh62:
	adrp	x0, l_.str.18@PAGE
Lloh63:
	add	x0, x0, l_.str.18@PAGEOFF
	bl	_inspect_fw_phex
	ldr	w0, [x20, #44]
	bl	_ntohl
	mov	x1, x0
Lloh64:
	adrp	x0, l_.str.19@PAGE
Lloh65:
	add	x0, x0, l_.str.19@PAGEOFF
	bl	_inspect_fw_phex
	ldr	w0, [x20, #48]
	bl	_ntohl
	mov	x1, x0
Lloh66:
	adrp	x0, l_.str.20@PAGE
Lloh67:
	add	x0, x0, l_.str.20@PAGEOFF
	bl	_inspect_fw_phex
	ldp	w8, w9, [x20, #52]
	ldp	w10, w11, [x20, #60]
	ldr	w12, [x20, #68]
	sub	sp, sp, #48
	stp	x11, x12, [sp, #32]
Lloh68:
	adrp	x11, l_.str.22@PAGE
Lloh69:
	add	x11, x11, l_.str.22@PAGEOFF
	stp	x9, x10, [sp, #16]
	stp	x11, x8, [sp]
Lloh70:
	adrp	x0, l_.str.21@PAGE
Lloh71:
	add	x0, x0, l_.str.21@PAGEOFF
	bl	_printf
	add	sp, sp, #48
	mov	w0, #10
	bl	_putchar
	ldr	w0, [x20, #72]
	bl	_ntohl
	mov	x1, x0
Lloh72:
	adrp	x0, l_.str.23@PAGE
Lloh73:
	add	x0, x0, l_.str.23@PAGEOFF
	bl	_inspect_fw_phexdec
	ldr	w0, [x20, #76]
	bl	_ntohl
	mov	x1, x0
Lloh74:
	adrp	x0, l_.str.24@PAGE
Lloh75:
	add	x0, x0, l_.str.24@PAGEOFF
	bl	_inspect_fw_phexdec
	ldr	w0, [x20]
	bl	_ntohl
	mov	x1, x0
Lloh76:
	adrp	x0, l_.str.25@PAGE
Lloh77:
	add	x0, x0, l_.str.25@PAGEOFF
	bl	_inspect_fw_phex
	ldr	w0, [x20, #4]
	bl	_ntohl
	mov	x1, x0
Lloh78:
	adrp	x0, l_.str.26@PAGE
Lloh79:
	add	x0, x0, l_.str.26@PAGEOFF
	bl	_inspect_fw_phex
	ldr	w0, [x20, #80]
	bl	_ntohl
	mov	x1, x0
Lloh80:
	adrp	x0, l_.str.27@PAGE
Lloh81:
	add	x0, x0, l_.str.27@PAGEOFF
	bl	_inspect_fw_phexdec
	ldr	w0, [x20, #84]
	bl	_ntohl
	mov	x1, x0
Lloh82:
	adrp	x0, l_.str.28@PAGE
Lloh83:
	add	x0, x0, l_.str.28@PAGEOFF
	bl	_inspect_fw_phexdec
	ldr	w0, [x20, #88]
	bl	_ntohl
	mov	x1, x0
Lloh84:
	adrp	x0, l_.str.29@PAGE
Lloh85:
	add	x0, x0, l_.str.29@PAGEOFF
	bl	_inspect_fw_phexdec
	ldr	w0, [x20, #12]
	bl	_ntohl
	mov	x1, x0
Lloh86:
	adrp	x0, l_.str.30@PAGE
Lloh87:
	add	x0, x0, l_.str.30@PAGEOFF
	bl	_inspect_fw_phexdec
	ldr	w0, [x20, #92]
	bl	_ntohl
	mov	x1, x0
Lloh88:
	adrp	x0, l_.str.31@PAGE
Lloh89:
	add	x0, x0, l_.str.31@PAGEOFF
	bl	_inspect_fw_phexdec
Lloh90:
	adrp	x8, _extract@GOTPAGE
Lloh91:
	ldr	x8, [x8, _extract@GOTPAGEOFF]
Lloh92:
	ldr	x8, [x8]
	cbz	x8, LBB0_30
; %bb.19:
	mov	w0, #10
	bl	_putchar
	ldr	x0, [x21, #8]
	bl	_strlen
	add	w0, w0, #8
	bl	_malloc
	mov	x22, x0
	ldr	x2, [x21, #8]
Lloh93:
	adrp	x1, l_.str.32@PAGE
Lloh94:
	add	x1, x1, l_.str.32@PAGEOFF
	bl	_sprintf
	str	x22, [sp, #-16]!
Lloh95:
	adrp	x0, l_.str.33@PAGE
Lloh96:
	add	x0, x0, l_.str.33@PAGEOFF
	bl	_printf
	add	sp, sp, #16
Lloh97:
	adrp	x1, l_.str.34@PAGE
Lloh98:
	add	x1, x1, l_.str.34@PAGEOFF
	mov	x0, x22
	bl	_fopen
	cbz	x0, LBB0_23
; %bb.20:
	mov	x23, x0
	ldr	w0, [x20, #72]
	bl	_ntohl
	add	x24, x20, w0, sxtw
	ldr	w0, [x20, #76]
	bl	_ntohl
	mov	x1, x0
	mov	x0, x24
	mov	w2, #1
	mov	x3, x23
	bl	_fwrite
	cbnz	w0, LBB0_22
; %bb.21:
Lloh99:
	adrp	x8, _errno@GOTPAGE
Lloh100:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh101:
	ldr	w0, [x8]
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp, #-16]!
Lloh102:
	adrp	x0, l_.str.35@PAGE
Lloh103:
	add	x0, x0, l_.str.35@PAGEOFF
	bl	_ERR
	add	sp, sp, #16
LBB0_22:
	mov	x0, x23
	bl	_fclose
	b	LBB0_24
LBB0_23:
Lloh104:
	adrp	x8, _errno@GOTPAGE
Lloh105:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh106:
	ldr	w0, [x8]
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp, #-16]!
Lloh107:
	adrp	x0, l_.str.36@PAGE
Lloh108:
	add	x0, x0, l_.str.36@PAGEOFF
	bl	_ERR
	add	sp, sp, #16
LBB0_24:
	mov	x0, x22
	bl	_free
	ldr	x0, [x21, #8]
	bl	_strlen
	add	w0, w0, #8
	bl	_malloc
	mov	x22, x0
	ldr	x2, [x21, #8]
Lloh109:
	adrp	x1, l_.str.37@PAGE
Lloh110:
	add	x1, x1, l_.str.37@PAGEOFF
	bl	_sprintf
	str	x22, [sp, #-16]!
Lloh111:
	adrp	x0, l_.str.38@PAGE
Lloh112:
	add	x0, x0, l_.str.38@PAGEOFF
	bl	_printf
	add	sp, sp, #16
Lloh113:
	adrp	x1, l_.str.34@PAGE
Lloh114:
	add	x1, x1, l_.str.34@PAGEOFF
	mov	x0, x22
	bl	_fopen
	cbz	x0, LBB0_28
; %bb.25:
	mov	x21, x0
	ldr	w0, [x20, #80]
	bl	_ntohl
	add	x23, x20, w0, sxtw
	ldr	w0, [x20, #84]
	bl	_ntohl
	mov	x1, x0
	mov	x0, x23
	mov	w2, #1
	mov	x3, x21
	bl	_fwrite
	cbnz	w0, LBB0_27
; %bb.26:
Lloh115:
	adrp	x8, _errno@GOTPAGE
Lloh116:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh117:
	ldr	w0, [x8]
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp, #-16]!
Lloh118:
	adrp	x0, l_.str.35@PAGE
Lloh119:
	add	x0, x0, l_.str.35@PAGEOFF
	bl	_ERR
	add	sp, sp, #16
LBB0_27:
	mov	x0, x21
	bl	_fclose
	b	LBB0_29
LBB0_28:
Lloh120:
	adrp	x8, _errno@GOTPAGE
Lloh121:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh122:
	ldr	w0, [x8]
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp, #-16]!
Lloh123:
	adrp	x0, l_.str.36@PAGE
Lloh124:
	add	x0, x0, l_.str.36@PAGEOFF
	bl	_ERR
	add	sp, sp, #16
LBB0_29:
	mov	x0, x22
	bl	_free
LBB0_30:
	mov	x0, x20
	bl	_free
LBB0_31:
	ldur	x8, [x29, #-56]
Lloh125:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh126:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh127:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_33
; %bb.32:
	mov	x0, x19
	sub	sp, x29, #48
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_33:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpAdd	Lloh46, Lloh47
	.loh AdrpAdd	Lloh44, Lloh45
	.loh AdrpAdd	Lloh48, Lloh49
	.loh AdrpAdd	Lloh52, Lloh53
	.loh AdrpAdd	Lloh50, Lloh51
	.loh AdrpAdd	Lloh54, Lloh55
	.loh AdrpAdd	Lloh56, Lloh57
	.loh AdrpAdd	Lloh58, Lloh59
	.loh AdrpLdrGotLdr	Lloh90, Lloh91, Lloh92
	.loh AdrpAdd	Lloh88, Lloh89
	.loh AdrpAdd	Lloh86, Lloh87
	.loh AdrpAdd	Lloh84, Lloh85
	.loh AdrpAdd	Lloh82, Lloh83
	.loh AdrpAdd	Lloh80, Lloh81
	.loh AdrpAdd	Lloh78, Lloh79
	.loh AdrpAdd	Lloh76, Lloh77
	.loh AdrpAdd	Lloh74, Lloh75
	.loh AdrpAdd	Lloh72, Lloh73
	.loh AdrpAdd	Lloh70, Lloh71
	.loh AdrpAdd	Lloh68, Lloh69
	.loh AdrpAdd	Lloh66, Lloh67
	.loh AdrpAdd	Lloh64, Lloh65
	.loh AdrpAdd	Lloh62, Lloh63
	.loh AdrpAdd	Lloh60, Lloh61
	.loh AdrpAdd	Lloh97, Lloh98
	.loh AdrpAdd	Lloh95, Lloh96
	.loh AdrpAdd	Lloh93, Lloh94
	.loh AdrpAdd	Lloh102, Lloh103
	.loh AdrpLdrGotLdr	Lloh99, Lloh100, Lloh101
	.loh AdrpAdd	Lloh107, Lloh108
	.loh AdrpLdrGotLdr	Lloh104, Lloh105, Lloh106
	.loh AdrpAdd	Lloh113, Lloh114
	.loh AdrpAdd	Lloh111, Lloh112
	.loh AdrpAdd	Lloh109, Lloh110
	.loh AdrpAdd	Lloh118, Lloh119
	.loh AdrpLdrGotLdr	Lloh115, Lloh116, Lloh117
	.loh AdrpAdd	Lloh123, Lloh124
	.loh AdrpLdrGotLdr	Lloh120, Lloh121, Lloh122
	.loh AdrpLdrGotLdr	Lloh125, Lloh126, Lloh127
	.cfi_endproc
                                        ; -- End function
	.comm	_MD5SUM_LEN,4,2                 ; @MD5SUM_LEN
	.comm	_EXIT_FAILURE,4,2               ; @EXIT_FAILURE
	.comm	_inspect_info,16,3              ; @inspect_info
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"no memory for buffer!\n"

	.comm	_custom_board,4,2               ; @custom_board
	.comm	_FLAG_LE_KERNEL_LA_EP,4,2       ; @FLAG_LE_KERNEL_LA_EP
l_.str.1:                               ; @.str.1
	.asciz	"File name"

l_.str.2:                               ; @.str.2
	.asciz	"File size"

l_.str.3:                               ; @.str.3
	.asciz	"file does not seem to have V2/V3 header!\n"

l_.str.4:                               ; @.str.4
	.asciz	"Version 2 Header size"

	.comm	_md5salt_normal,8,3             ; @md5salt_normal
	.comm	_md5salt_boot,8,3               ; @md5salt_boot
l_.str.5:                               ; @.str.5
	.asciz	"Header MD5Sum1"

l_.str.6:                               ; @.str.6
	.asciz	"(*ERROR*)"

l_.str.7:                               ; @.str.7
	.asciz	"          --> expected"

l_.str.8:                               ; @.str.8
	.space	1

l_.str.9:                               ; @.str.9
	.asciz	"(ok)"

l_.str.10:                              ; @.str.10
	.asciz	"Unknown value 2"

l_.str.11:                              ; @.str.11
	.asciz	"Header MD5Sum2"

l_.str.12:                              ; @.str.12
	.asciz	"(purpose yet unknown, unchecked here)"

l_.str.13:                              ; @.str.13
	.asciz	"Unknown value 3"

l_.str.14:                              ; @.str.14
	.asciz	"Unknown value 4"

l_.str.15:                              ; @.str.15
	.asciz	"Unknown value 5"

l_.str.17:                              ; @.str.17
	.asciz	"Firmware version"

l_.str.18:                              ; @.str.18
	.asciz	"Hardware ID"

l_.str.19:                              ; @.str.19
	.asciz	"Hardware Revision"

l_.str.20:                              ; @.str.20
	.asciz	"Additional HW Version"

l_.str.21:                              ; @.str.21
	.asciz	"%-23s: %d.%d.%d-%d.%d\n"

l_.str.22:                              ; @.str.22
	.asciz	"Software version"

l_.str.23:                              ; @.str.23
	.asciz	"Kernel data offset"

l_.str.24:                              ; @.str.24
	.asciz	"Kernel data length"

l_.str.25:                              ; @.str.25
	.asciz	"Kernel load address"

l_.str.26:                              ; @.str.26
	.asciz	"Kernel entry point"

l_.str.27:                              ; @.str.27
	.asciz	"Rootfs data offset"

l_.str.28:                              ; @.str.28
	.asciz	"Rootfs data length"

l_.str.29:                              ; @.str.29
	.asciz	"Boot loader data offset"

l_.str.30:                              ; @.str.30
	.asciz	"Boot loader data length"

l_.str.31:                              ; @.str.31
	.asciz	"Total firmware length"

	.comm	_extract,8,3                    ; @extract
l_.str.32:                              ; @.str.32
	.asciz	"%s-kernel"

l_.str.33:                              ; @.str.33
	.asciz	"Extracting kernel to \"%s\"...\n"

l_.str.34:                              ; @.str.34
	.asciz	"w"

l_.str.35:                              ; @.str.35
	.asciz	"error in fwrite(): %s"

	.comm	_errno,4,2                      ; @errno
l_.str.36:                              ; @.str.36
	.asciz	"error in fopen(): %s"

l_.str.37:                              ; @.str.37
	.asciz	"%s-rootfs"

l_.str.38:                              ; @.str.38
	.asciz	"Extracting rootfs to \"%s\"...\n"

	.no_dead_strip	_inspect_fw
.subsections_via_symbols
