	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ## -- Begin function main
	.p2align	4, 0x90
_main:                                  ## @main
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rsi), %rdx
	movq	_app_name@GOTPCREL(%rip), %rax
	movq	%rdx, (%rax)
	cmpl	$2, %edi
	jl	LBB0_28
## %bb.1:
	movq	%rsi, %r14
	movl	%edi, %r15d
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movl	$1, %r13d
	leaq	L_.str(%rip), %r12
	xorl	%eax, %eax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	movl	$0, -52(%rbp)                   ## 4-byte Folded Spill
	movl	$0, -56(%rbp)                   ## 4-byte Folded Spill
	movl	$0, -68(%rbp)                   ## 4-byte Folded Spill
	movl	$0, -60(%rbp)                   ## 4-byte Folded Spill
	movl	$0, -64(%rbp)                   ## 4-byte Folded Spill
	movl	$0, -72(%rbp)                   ## 4-byte Folded Spill
	xorl	%eax, %eax
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	xorl	%eax, %eax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	$1, -72(%rbp)                   ## 4-byte Folded Spill
LBB0_26:                                ##   in Loop: Header=BB0_2 Depth=1
	incl	%r13d
	cmpl	%r15d, %r13d
	jge	LBB0_27
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movslq	%r13d, %rax
	movq	(%r14,%rax,8), %rbx
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	leaq	L_.str.2(%rip), %rsi
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_7
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	leaq	L_.str.4(%rip), %rsi
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_12
## %bb.14:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	leaq	L_.str.5(%rip), %rsi
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_15
## %bb.17:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	leaq	L_.str.6(%rip), %rsi
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_18
## %bb.20:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	leaq	L_.str.7(%rip), %rsi
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_21
## %bb.23:                              ##   in Loop: Header=BB0_2 Depth=1
	cmpq	$0, -80(%rbp)                   ## 8-byte Folded Reload
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	je	LBB0_26
	jmp	LBB0_24
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	incl	%r13d
	cmpl	%r15d, %r13d
	jge	LBB0_8
## %bb.25:                              ##   in Loop: Header=BB0_2 Depth=1
	movslq	%r13d, %rax
	movq	(%r14,%rax,8), %rax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	movl	$1, -60(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_26
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	incl	%r13d
	cmpl	%r15d, %r13d
	jge	LBB0_8
## %bb.13:                              ##   in Loop: Header=BB0_2 Depth=1
	movslq	%r13d, %rax
	movq	(%r14,%rax,8), %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movl	$1, -56(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_26
LBB0_15:                                ##   in Loop: Header=BB0_2 Depth=1
	incl	%r13d
	cmpl	%r15d, %r13d
	jge	LBB0_8
## %bb.16:                              ##   in Loop: Header=BB0_2 Depth=1
	movslq	%r13d, %rax
	movq	(%r14,%rax,8), %rax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	movl	$1, -68(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_26
LBB0_18:                                ##   in Loop: Header=BB0_2 Depth=1
	incl	%r13d
	cmpl	%r15d, %r13d
	jge	LBB0_8
## %bb.19:                              ##   in Loop: Header=BB0_2 Depth=1
	movslq	%r13d, %rax
	movq	(%r14,%rax,8), %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movl	$1, -52(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_26
LBB0_21:                                ##   in Loop: Header=BB0_2 Depth=1
	incl	%r13d
	cmpl	%r15d, %r13d
	jge	LBB0_8
## %bb.22:                              ##   in Loop: Header=BB0_2 Depth=1
	movslq	%r13d, %rax
	movq	(%r14,%rax,8), %rax
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	movl	$1, -64(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_26
LBB0_3:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_print_usage
	jmp	LBB0_49
LBB0_27:
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	testq	%rbx, %rbx
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	je	LBB0_28
## %bb.29:
	movl	-68(%rbp), %r12d                ## 4-byte Reload
	testl	%r12d, %r12d
	je	LBB0_31
## %bb.30:
	cmpl	$0, -60(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_33
LBB0_31:
	cmpl	$0, -52(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_34
## %bb.32:
	cmpl	$0, -56(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_34
LBB0_33:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.9(%rip), %rsi
	jmp	LBB0_10
LBB0_28:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
LBB0_10:
	callq	_fprintf
	movl	$-1, %ebx
LBB0_49:
	movl	%ebx, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
LBB0_9:
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	jmp	LBB0_10
LBB0_34:
	leaq	L_str(%rip), %rdi
	callq	_puts
	movq	%rbx, %rdi
	callq	_read_img
	movq	%rax, %r13
	leaq	4063165(%rax), %rsi
	leaq	L_.str.11(%rip), %rdi
	xorl	%eax, %eax
	callq	_printf
	movzbl	4063211(%r13), %esi
	andl	$127, %esi
	movzbl	4063212(%r13), %edx
	leaq	L_.str.12(%rip), %rdi
	xorl	%eax, %eax
	callq	_printf
	cmpl	$0, -60(%rbp)                   ## 4-byte Folded Reload
	movq	-96(%rbp), %r15                 ## 8-byte Reload
	je	LBB0_36
## %bb.35:
	leaq	L_str.28(%rip), %rdi
	callq	_puts
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	_write_rootfs
LBB0_36:
	cmpl	$0, -56(%rbp)                   ## 4-byte Folded Reload
	movl	-72(%rbp), %ebx                 ## 4-byte Reload
	movq	-88(%rbp), %r14                 ## 8-byte Reload
	je	LBB0_38
## %bb.37:
	leaq	L_str.27(%rip), %rdi
	callq	_puts
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_write_kernel
LBB0_38:
	testl	%r12d, %r12d
	je	LBB0_40
## %bb.39:
	leaq	L_str.26(%rip), %rdi
	callq	_puts
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	_read_rootfs
	movl	$1, %ebx
LBB0_40:
	cmpl	$0, -52(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_42
## %bb.41:
	leaq	L_str.25(%rip), %rdi
	callq	_puts
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_read_kernel
	movl	$1, %ebx
LBB0_42:
	movq	%r13, %rdi
	callq	_get_checksum
	movl	%eax, %r14d
	movq	%r13, %rdi
	callq	_compute_checksum
	movl	%eax, %r15d
	movzwl	%r14w, %esi
	leaq	L_.str.17(%rip), %rdi
	xorl	%eax, %eax
	callq	_printf
	movzwl	%r15w, %r12d
	leaq	L_.str.18(%rip), %rdi
	movl	%r12d, %esi
	xorl	%eax, %eax
	callq	_printf
	testl	%ebx, %ebx
	je	LBB0_46
## %bb.43:
	cmpw	%r15w, %r14w
	jne	LBB0_44
## %bb.45:
	leaq	L_str.23(%rip), %rdi
	callq	_puts
	jmp	LBB0_46
LBB0_24:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.8(%rip), %rsi
	jmp	LBB0_9
LBB0_44:
	leaq	L_str.24(%rip), %rdi
	callq	_puts
	movq	%r13, %rdi
	movl	%r12d, %esi
	callq	_set_checksum
LBB0_46:
	cmpl	$0, -64(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_48
## %bb.47:
	leaq	L_str.22(%rip), %rdi
	callq	_puts
	movq	%r13, %rdi
	movq	-104(%rbp), %rsi                ## 8-byte Reload
	callq	_write_img
LBB0_48:
	movq	%r13, %rdi
	callq	_free
	xorl	%ebx, %ebx
	jmp	LBB0_49
	.cfi_endproc
                                        ## -- End function
	.comm	_app_name,8,3                   ## @app_name
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"-h"

L_.str.1:                               ## @.str.1
	.asciz	"-f"

L_.str.2:                               ## @.str.2
	.asciz	"-x"

	.comm	_stderr,4,2                     ## @stderr
L_.str.3:                               ## @.str.3
	.asciz	"%s: missing argument\n"

L_.str.4:                               ## @.str.4
	.asciz	"-xk"

L_.str.5:                               ## @.str.5
	.asciz	"-m"

L_.str.6:                               ## @.str.6
	.asciz	"-k"

L_.str.7:                               ## @.str.7
	.asciz	"-w"

L_.str.8:                               ## @.str.8
	.asciz	"%s: too many arguments\n"

L_.str.9:                               ## @.str.9
	.asciz	"%s: conflictuous options\n"

L_.str.11:                              ## @.str.11
	.asciz	"Firmware product: %s\n"

L_.str.12:                              ## @.str.12
	.asciz	"Firmware version: 1.%02d.%02d\n"

L_.str.17:                              ## @.str.17
	.asciz	"image checksum = %04x\n"

L_.str.18:                              ## @.str.18
	.asciz	"real checksum  = %04x\n"

L_str:                                  ## @str
	.asciz	"** Read firmware file"

L_str.22:                               ## @str.22
	.asciz	"** Write image file"

L_str.23:                               ## @str.23
	.asciz	"** Checksum is correct, good"

L_str.24:                               ## @str.24
	.asciz	"** Bad Checksum, fix it"

L_str.25:                               ## @str.25
	.asciz	"** Read kernel file"

L_str.26:                               ## @str.26
	.asciz	"** Read rootfs file"

L_str.27:                               ## @str.27
	.asciz	"** Write kernel file"

L_str.28:                               ## @str.28
	.asciz	"** Write rootfs file"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ; -- Begin function main
	.p2align	2
_main:                                  ; @main
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #176
	.cfi_def_cfa_offset 176
	stp	x28, x27, [sp, #80]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #96]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #112]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #128]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #144]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #160]            ; 16-byte Folded Spill
	add	x29, sp, #160
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	ldr	x2, [x1]
Lloh0:
	adrp	x8, _app_name@GOTPAGE
Lloh1:
	ldr	x8, [x8, _app_name@GOTPAGEOFF]
Lloh2:
	str	x2, [x8]
	cmp	w0, #2
	b.lt	LBB0_30
; %bb.1:
	mov	x23, x1
	mov	x24, x0
	str	x2, [sp, #32]                   ; 8-byte Folded Spill
	mov	x19, #0
	str	xzr, [sp, #72]                  ; 8-byte Folded Spill
	str	wzr, [sp, #44]                  ; 4-byte Folded Spill
	stp	xzr, xzr, [sp, #48]             ; 16-byte Folded Spill
	str	wzr, [sp, #68]                  ; 4-byte Folded Spill
	str	wzr, [sp, #28]                  ; 4-byte Folded Spill
	mov	w21, #0
	str	xzr, [sp, #16]                  ; 8-byte Folded Spill
	mov	w22, #1
Lloh3:
	adrp	x25, l_.str@PAGE
Lloh4:
	add	x25, x25, l_.str@PAGEOFF
Lloh5:
	adrp	x26, l_.str.1@PAGE
Lloh6:
	add	x26, x26, l_.str.1@PAGEOFF
Lloh7:
	adrp	x27, l_.str.2@PAGE
Lloh8:
	add	x27, x27, l_.str.2@PAGEOFF
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x28, x19
	ldr	x19, [x23, w22, sxtw #3]
	mov	x0, x19
	mov	x1, x25
	bl	_strcmp
	cbz	w0, LBB0_32
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x19
	mov	x1, x26
	bl	_strcmp
	cbz	w0, LBB0_10
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x8, x22
	sxtw	x20, w8
	mov	x0, x19
	mov	x1, x27
	bl	_strcmp
	cbz	w0, LBB0_11
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x19
Lloh9:
	adrp	x1, l_.str.4@PAGE
Lloh10:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_strcmp
	cbz	w0, LBB0_13
; %bb.6:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x19
Lloh11:
	adrp	x1, l_.str.5@PAGE
Lloh12:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_strcmp
	cbz	w0, LBB0_15
; %bb.7:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x19
Lloh13:
	adrp	x1, l_.str.6@PAGE
Lloh14:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_strcmp
	cbz	w0, LBB0_17
; %bb.8:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x19
Lloh15:
	adrp	x1, l_.str.7@PAGE
Lloh16:
	add	x1, x1, l_.str.7@PAGEOFF
	bl	_strcmp
	cbz	w0, LBB0_19
; %bb.9:                                ;   in Loop: Header=BB0_2 Depth=1
	cbz	x28, LBB0_23
	b	LBB0_48
LBB0_10:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w21, #1
	b	LBB0_22
LBB0_11:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x22, x20, #1
	cmp	w22, w24
	b.ge	LBB0_35
; %bb.12:                               ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x23, x22, lsl #3]
	str	x8, [sp, #72]                   ; 8-byte Folded Spill
	mov	w8, #1
	str	w8, [sp, #68]                   ; 4-byte Folded Spill
	b	LBB0_22
LBB0_13:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x22, x20, #1
	cmp	w22, w24
	b.ge	LBB0_35
; %bb.14:                               ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x23, x22, lsl #3]
	str	x8, [sp, #56]                   ; 8-byte Folded Spill
	mov	w8, #1
	str	w8, [sp, #52]                   ; 4-byte Folded Spill
	b	LBB0_21
LBB0_15:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x22, x20, #1
	cmp	w22, w24
	b.ge	LBB0_35
; %bb.16:                               ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x23, x22, lsl #3]
	str	x8, [sp, #72]                   ; 8-byte Folded Spill
	mov	w8, #1
	str	w8, [sp, #48]                   ; 4-byte Folded Spill
	b	LBB0_21
LBB0_17:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x22, x20, #1
	cmp	w22, w24
	b.ge	LBB0_35
; %bb.18:                               ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x23, x22, lsl #3]
	str	x8, [sp, #56]                   ; 8-byte Folded Spill
	mov	w8, #1
	str	w8, [sp, #44]                   ; 4-byte Folded Spill
	b	LBB0_21
LBB0_19:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x22, x20, #1
	cmp	w22, w24
	b.ge	LBB0_35
; %bb.20:                               ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x23, x22, lsl #3]
	str	x8, [sp, #16]                   ; 8-byte Folded Spill
	mov	w8, #1
	str	w8, [sp, #28]                   ; 4-byte Folded Spill
LBB0_21:                                ;   in Loop: Header=BB0_2 Depth=1
                                        ; kill: def $w22 killed $w22 killed $x22 def $x22
LBB0_22:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x19, x28
LBB0_23:                                ;   in Loop: Header=BB0_2 Depth=1
	add	w22, w22, #1
	cmp	w22, w24
	b.lt	LBB0_2
; %bb.24:
	ldr	x2, [sp, #32]                   ; 8-byte Folded Reload
	cbz	x19, LBB0_30
; %bb.25:
	ldr	w23, [sp, #48]                  ; 4-byte Folded Reload
	cbz	w23, LBB0_27
; %bb.26:
	ldr	w8, [sp, #68]                   ; 4-byte Folded Reload
	cbnz	w8, LBB0_29
LBB0_27:
	ldr	w8, [sp, #44]                   ; 4-byte Folded Reload
	cbz	w8, LBB0_37
; %bb.28:
	ldr	w8, [sp, #52]                   ; 4-byte Folded Reload
	cbz	w8, LBB0_37
LBB0_29:
Lloh17:
	adrp	x8, _stderr@GOTPAGE
Lloh18:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
Lloh20:
	adrp	x1, l_.str.9@PAGE
Lloh21:
	add	x1, x1, l_.str.9@PAGEOFF
	b	LBB0_31
LBB0_30:
Lloh22:
	adrp	x8, _stderr@GOTPAGE
Lloh23:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
Lloh25:
	adrp	x1, l_.str.3@PAGE
Lloh26:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_31:
	bl	_fprintf
	mov	w0, #-1
	b	LBB0_34
LBB0_32:
	bl	_print_usage
LBB0_33:
	mov	w0, #0
LBB0_34:
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #112]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #96]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #176
	ret
LBB0_35:
Lloh27:
	adrp	x8, _stderr@GOTPAGE
Lloh28:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh29:
	ldr	w0, [x8]
Lloh30:
	adrp	x1, l_.str.3@PAGE
Lloh31:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_36:
	ldr	x2, [sp, #32]                   ; 8-byte Folded Reload
	b	LBB0_31
LBB0_37:
Lloh32:
	adrp	x0, l_str@PAGE
Lloh33:
	add	x0, x0, l_str@PAGEOFF
	bl	_puts
	mov	x0, x19
	bl	_read_img
	mov	x19, x0
	add	x8, x0, #991, lsl #12           ; =4059136
	add	x20, x8, #4075
	add	x8, x0, #991, lsl #12           ; =4059136
	add	x8, x8, #4029
	str	x8, [sp]
Lloh34:
	adrp	x0, l_.str.11@PAGE
Lloh35:
	add	x0, x0, l_.str.11@PAGEOFF
	bl	_printf
	ldrb	w8, [x20]
	and	w8, w8, #0x7f
	ldrb	w9, [x20, #1]
	stp	x8, x9, [sp]
Lloh36:
	adrp	x0, l_.str.12@PAGE
Lloh37:
	add	x0, x0, l_.str.12@PAGEOFF
	bl	_printf
	ldr	x22, [sp, #72]                  ; 8-byte Folded Reload
	ldr	w8, [sp, #68]                   ; 4-byte Folded Reload
	cbz	w8, LBB0_39
; %bb.38:
Lloh38:
	adrp	x0, l_str.28@PAGE
Lloh39:
	add	x0, x0, l_str.28@PAGEOFF
	bl	_puts
	mov	x0, x19
	mov	x1, x22
	bl	_write_rootfs
LBB0_39:
	mov	x20, x21
	ldr	x21, [sp, #56]                  ; 8-byte Folded Reload
	ldr	w8, [sp, #52]                   ; 4-byte Folded Reload
	cbz	w8, LBB0_41
; %bb.40:
Lloh40:
	adrp	x0, l_str.27@PAGE
Lloh41:
	add	x0, x0, l_str.27@PAGEOFF
	bl	_puts
	mov	x0, x19
	mov	x1, x21
	bl	_write_kernel
LBB0_41:
	cbz	w23, LBB0_43
; %bb.42:
Lloh42:
	adrp	x0, l_str.26@PAGE
Lloh43:
	add	x0, x0, l_str.26@PAGEOFF
	bl	_puts
	mov	x0, x19
	mov	x1, x22
	bl	_read_rootfs
	mov	w20, #1
LBB0_43:
	ldr	w8, [sp, #44]                   ; 4-byte Folded Reload
	cbz	w8, LBB0_45
; %bb.44:
Lloh44:
	adrp	x0, l_str.25@PAGE
Lloh45:
	add	x0, x0, l_str.25@PAGEOFF
	bl	_puts
	mov	x0, x19
	mov	x1, x21
	bl	_read_kernel
	mov	w20, #1
LBB0_45:
	mov	x0, x19
	bl	_get_checksum
	mov	x21, x0
	mov	x0, x19
	bl	_compute_checksum
	mov	x22, x0
	mov	w8, w21
	str	x8, [sp]
Lloh46:
	adrp	x0, l_.str.17@PAGE
Lloh47:
	add	x0, x0, l_.str.17@PAGEOFF
	bl	_printf
	mov	w8, w22
	str	x8, [sp]
Lloh48:
	adrp	x0, l_.str.18@PAGE
Lloh49:
	add	x0, x0, l_.str.18@PAGEOFF
	bl	_printf
	cbz	w20, LBB0_50
; %bb.46:
	cmp	w21, w22
	b.ne	LBB0_49
; %bb.47:
Lloh50:
	adrp	x0, l_str.23@PAGE
Lloh51:
	add	x0, x0, l_str.23@PAGEOFF
	bl	_puts
	b	LBB0_50
LBB0_48:
Lloh52:
	adrp	x8, _stderr@GOTPAGE
Lloh53:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh54:
	ldr	w0, [x8]
Lloh55:
	adrp	x1, l_.str.8@PAGE
Lloh56:
	add	x1, x1, l_.str.8@PAGEOFF
	b	LBB0_36
LBB0_49:
Lloh57:
	adrp	x0, l_str.24@PAGE
Lloh58:
	add	x0, x0, l_str.24@PAGEOFF
	bl	_puts
	mov	x0, x19
	mov	x1, x22
	bl	_set_checksum
LBB0_50:
	ldr	w8, [sp, #28]                   ; 4-byte Folded Reload
	cbz	w8, LBB0_52
; %bb.51:
Lloh59:
	adrp	x0, l_str.22@PAGE
Lloh60:
	add	x0, x0, l_str.22@PAGEOFF
	bl	_puts
	mov	x0, x19
	ldr	x1, [sp, #16]                   ; 8-byte Folded Reload
	bl	_write_img
LBB0_52:
	mov	x0, x19
	bl	_free
	b	LBB0_33
	.loh AdrpLdrGotStr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpAdd	Lloh44, Lloh45
	.loh AdrpAdd	Lloh48, Lloh49
	.loh AdrpAdd	Lloh46, Lloh47
	.loh AdrpAdd	Lloh50, Lloh51
	.loh AdrpAdd	Lloh55, Lloh56
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpAdd	Lloh57, Lloh58
	.loh AdrpAdd	Lloh59, Lloh60
	.cfi_endproc
                                        ; -- End function
	.comm	_app_name,8,3                   ; @app_name
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"-h"

l_.str.1:                               ; @.str.1
	.asciz	"-f"

l_.str.2:                               ; @.str.2
	.asciz	"-x"

	.comm	_stderr,4,2                     ; @stderr
l_.str.3:                               ; @.str.3
	.asciz	"%s: missing argument\n"

l_.str.4:                               ; @.str.4
	.asciz	"-xk"

l_.str.5:                               ; @.str.5
	.asciz	"-m"

l_.str.6:                               ; @.str.6
	.asciz	"-k"

l_.str.7:                               ; @.str.7
	.asciz	"-w"

l_.str.8:                               ; @.str.8
	.asciz	"%s: too many arguments\n"

l_.str.9:                               ; @.str.9
	.asciz	"%s: conflictuous options\n"

l_.str.11:                              ; @.str.11
	.asciz	"Firmware product: %s\n"

l_.str.12:                              ; @.str.12
	.asciz	"Firmware version: 1.%02d.%02d\n"

l_.str.17:                              ; @.str.17
	.asciz	"image checksum = %04x\n"

l_.str.18:                              ; @.str.18
	.asciz	"real checksum  = %04x\n"

l_str:                                  ; @str
	.asciz	"** Read firmware file"

l_str.22:                               ; @str.22
	.asciz	"** Write image file"

l_str.23:                               ; @str.23
	.asciz	"** Checksum is correct, good"

l_str.24:                               ; @str.24
	.asciz	"** Bad Checksum, fix it"

l_str.25:                               ; @str.25
	.asciz	"** Read kernel file"

l_str.26:                               ; @str.26
	.asciz	"** Read rootfs file"

l_str.27:                               ; @str.27
	.asciz	"** Write kernel file"

l_str.28:                               ; @str.28
	.asciz	"** Write rootfs file"

.subsections_via_symbols
