	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	cmpl	$2, %edi
	jg	LBB0_2
## %bb.1:
	leaq	L_str.19(%rip), %rdi
	callq	_puts
	movq	(%rbx), %rsi
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_printf
LBB0_2:
	movq	8(%rbx), %r12
	movq	16(%rbx), %rbx
	leaq	-56(%rbp), %rsi
	movq	%r12, %rdi
	callq	_stat
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	movl	-56(%rbp), %eax
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	movslq	%eax, %r14
	leaq	L_.str.2(%rip), %rdi
	xorl	%r15d, %r15d
	movq	%r12, %rsi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_printf
	movq	_HEADER_SIZE@GOTPCREL(%rip), %rax
	movslq	(%rax), %r13
	addq	%r14, %r13
	leaq	L_.str.3(%rip), %rdi
	movq	%r13, %rsi
	xorl	%eax, %eax
	callq	_printf
	movq	%r13, %rdi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%rax, %rdi
	xorl	%esi, %esi
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdx
	callq	_memset
	movq	_O_RDONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_open
	testl	%eax, %eax
	je	LBB0_7
## %bb.8:
	movl	%eax, %ebx
	movq	_HEADER_SIZE@GOTPCREL(%rip), %r12
	movslq	(%r12), %rsi
	addq	-48(%rbp), %rsi                 ## 8-byte Folded Reload
	movl	%eax, %edi
	movl	%r14d, %edx
	callq	_read
	cmpq	%r14, %rax
	jae	LBB0_11
## %bb.9:
	leaq	L_str.18(%rip), %rdi
	callq	_puts
	jmp	LBB0_16
LBB0_3:
	movl	%eax, %r15d
	jmp	LBB0_17
LBB0_5:
	leaq	L_str(%rip), %rdi
	callq	_puts
	jmp	LBB0_17
LBB0_7:
	leaq	L_str.15(%rip), %rdi
	callq	_puts
	jmp	LBB0_17
LBB0_11:
	movl	%ebx, %edi
	callq	_close
	movq	_OFFSET_MAGIC@GOTPCREL(%rip), %rax
	movslq	(%rax), %rdi
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	addq	%rbx, %rdi
	movq	_IH_MAGIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_be_wr
	movq	_OFFSET_TIME@GOTPCREL(%rip), %rax
	movslq	(%rax), %rdi
	addq	%rbx, %rdi
	movl	$1275491212, %esi               ## imm = 0x4C06738C
	callq	_be_wr
	movq	_OFFSET_SIZE@GOTPCREL(%rip), %rax
	movslq	(%rax), %rdi
	addq	%rbx, %rdi
	movl	-60(%rbp), %r13d                ## 4-byte Reload
	movl	%r13d, %esi
	callq	_be_wr
	movq	_OFFSET_LOAD@GOTPCREL(%rip), %rax
	movslq	(%rax), %rdi
	addq	%rbx, %rdi
	movl	$32768, %esi                    ## imm = 0x8000
	callq	_be_wr
	movq	_OFFSET_EP@GOTPCREL(%rip), %rax
	movslq	(%rax), %rdi
	addq	%rbx, %rdi
	movl	$32768, %esi                    ## imm = 0x8000
	callq	_be_wr
	movq	_OFFSET_OS@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movb	$5, (%rbx,%rax)
	movq	_OFFSET_ARCH@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movb	$2, (%rbx,%rax)
	movq	_OFFSET_TYPE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movb	$2, (%rbx,%rax)
	movq	_OFFSET_COMP@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movb	$1, (%rbx,%rax)
	movq	_OFFSET_NAME@GOTPCREL(%rip), %r14
	movslq	(%r14), %rdi
	addq	%rbx, %rdi
	movq	_NAME_LEN@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	leaq	L_.str.7(%rip), %rsi
	callq	_strncpy
	movl	(%r14), %eax
	movl	(%r15), %ecx
	addl	%ecx, %eax
	decl	%eax
	cltq
	movb	$0, (%rbx,%rax)
	movq	_OFFSET_MODEL@GOTPCREL(%rip), %r14
	movslq	(%r14), %rdi
	addq	%rbx, %rdi
	movq	_MODEL_LEN@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	leaq	L_.str.8(%rip), %rsi
	callq	_strncpy
	movl	(%r14), %eax
	movl	(%r15), %ecx
	addl	%ecx, %eax
	decl	%eax
	cltq
	movb	$0, (%rbx,%rax)
	movq	_OFFSET_VERSION@GOTPCREL(%rip), %r14
	movslq	(%r14), %rdi
	addq	%rbx, %rdi
	movq	_VERSION_LEN@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	leaq	L_.str.9(%rip), %rsi
	callq	_strncpy
	movl	(%r14), %eax
	movl	(%r15), %ecx
	addl	%ecx, %eax
	decl	%eax
	cltq
	movb	$0, (%rbx,%rax)
	movq	_OFFSET_MAC@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	$382238720, (%rbx,%rax)         ## imm = 0x16C88000
	movw	$26753, 4(%rbx,%rax)            ## imm = 0x6881
	movslq	(%r12), %rsi
	addq	%rbx, %rsi
	xorl	%r15d, %r15d
	xorl	%edi, %edi
	movl	%r13d, %edx
	callq	_crc32
	movl	%eax, %r14d
	movq	_OFFSET_DCRC@GOTPCREL(%rip), %rax
	movslq	(%rax), %rdi
	addq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_be_wr
	leaq	L_.str.10(%rip), %rdi
	movl	%r14d, %esi
	xorl	%eax, %eax
	callq	_printf
	movl	(%r12), %edx
	xorl	%edi, %edi
	movq	%rbx, %rsi
	callq	_crc32
	movl	%eax, %r14d
	movq	_OFFSET_HCRC@GOTPCREL(%rip), %rax
	movslq	(%rax), %rdi
	addq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_be_wr
	leaq	L_.str.11(%rip), %rdi
	movl	%r14d, %esi
	xorl	%eax, %eax
	callq	_printf
	leaq	L_.str.12(%rip), %rdi
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rsi
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_printf
	movq	_O_RDWR@GOTPCREL(%rip), %rax
	movq	_O_CREAT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	_O_TRUNC@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	_S_IRWXU@GOTPCREL(%rip), %rax
	movq	_S_IRGRP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_open
	testl	%eax, %eax
	je	LBB0_12
## %bb.13:
	movl	%eax, %ebx
	movl	%eax, %edi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	%r14, %rdx
	callq	_write
	cmpq	%r14, %rax
	jae	LBB0_15
## %bb.14:
	leaq	L_str.17(%rip), %rdi
	callq	_puts
	jmp	LBB0_16
LBB0_12:
	leaq	L_str.16(%rip), %rdi
	callq	_puts
	jmp	LBB0_17
LBB0_15:
	movl	%ebx, %edi
	callq	_close
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_free
LBB0_16:
	xorl	%r15d, %r15d
LBB0_17:
	movl	%r15d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str.1:                               ## @.str.1
	.asciz	"%s <infile> <outfile>\n"

L_.str.2:                               ## @.str.2
	.asciz	"INFILE: %s, size: %08x bytes\n"

	.comm	_HEADER_SIZE,4,2                ## @HEADER_SIZE
L_.str.3:                               ## @.str.3
	.asciz	"Allocate %08x bytes\n"

	.comm	_O_RDONLY,4,2                   ## @O_RDONLY
	.comm	_OFFSET_MAGIC,4,2               ## @OFFSET_MAGIC
	.comm	_IH_MAGIC,4,2                   ## @IH_MAGIC
	.comm	_OFFSET_TIME,4,2                ## @OFFSET_TIME
	.comm	_OFFSET_SIZE,4,2                ## @OFFSET_SIZE
	.comm	_OFFSET_LOAD,4,2                ## @OFFSET_LOAD
	.comm	_OFFSET_EP,4,2                  ## @OFFSET_EP
	.comm	_OFFSET_OS,8,3                  ## @OFFSET_OS
	.comm	_OFFSET_ARCH,8,3                ## @OFFSET_ARCH
	.comm	_OFFSET_TYPE,8,3                ## @OFFSET_TYPE
	.comm	_OFFSET_COMP,8,3                ## @OFFSET_COMP
	.comm	_OFFSET_NAME,4,2                ## @OFFSET_NAME
L_.str.7:                               ## @.str.7
	.asciz	"kernel.img"

	.comm	_NAME_LEN,4,2                   ## @NAME_LEN
	.comm	_OFFSET_MODEL,4,2               ## @OFFSET_MODEL
L_.str.8:                               ## @.str.8
	.asciz	"dns-313v3"

	.comm	_MODEL_LEN,4,2                  ## @MODEL_LEN
	.comm	_OFFSET_VERSION,4,2             ## @OFFSET_VERSION
L_.str.9:                               ## @.str.9
	.asciz	"2.01b04"

	.comm	_VERSION_LEN,4,2                ## @VERSION_LEN
	.comm	_OFFSET_MAC,8,3                 ## @OFFSET_MAC
	.comm	_OFFSET_DCRC,4,2                ## @OFFSET_DCRC
L_.str.10:                              ## @.str.10
	.asciz	"data checksum: 0x%08x\n"

	.comm	_OFFSET_HCRC,4,2                ## @OFFSET_HCRC
L_.str.11:                              ## @.str.11
	.asciz	"header checksum: 0x%08x\n"

L_.str.12:                              ## @.str.12
	.asciz	"OUTFILE: %s, size: %08x bytes\n"

	.comm	_O_RDWR,4,2                     ## @O_RDWR
	.comm	_O_CREAT,4,2                    ## @O_CREAT
	.comm	_O_TRUNC,4,2                    ## @O_TRUNC
	.comm	_S_IRWXU,4,2                    ## @S_IRWXU
	.comm	_S_IRGRP,4,2                    ## @S_IRGRP
L_str:                                  ## @str
	.asciz	"OOM: could not allocate buffer"

L_str.15:                               ## @str.15
	.asciz	"ERROR: could not open input file"

L_str.16:                               ## @str.16
	.asciz	"ERROR: could not open output file"

L_str.17:                               ## @str.17
	.asciz	"ERROR: could not write complete output file"

L_str.18:                               ## @str.18
	.asciz	"ERROR: could not read entire file"

L_str.19:                               ## @str.19
	.asciz	"Too few arguments."

.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, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x19, x1
	cmp	w0, #2
	b.gt	LBB0_2
; %bb.1:
Lloh0:
	adrp	x0, l_str.19@PAGE
Lloh1:
	add	x0, x0, l_str.19@PAGEOFF
	bl	_puts
	ldr	x8, [x19]
	str	x8, [sp]
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_printf
LBB0_2:
	ldp	x23, x19, [x19, #8]
	add	x1, sp, #24
	mov	x0, x23
	bl	_stat
	tbnz	w0, #31, LBB0_15
; %bb.3:
	ldrsw	x22, [sp, #24]
	stp	x23, x22, [sp]
Lloh4:
	adrp	x0, l_.str.2@PAGE
Lloh5:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_printf
Lloh6:
	adrp	x24, _HEADER_SIZE@GOTPAGE
Lloh7:
	ldr	x24, [x24, _HEADER_SIZE@GOTPAGEOFF]
	ldrsw	x8, [x24]
	add	x20, x8, x22
	str	x20, [sp]
Lloh8:
	adrp	x0, l_.str.3@PAGE
Lloh9:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_printf
	mov	x0, x20
	bl	_malloc
	cbz	x0, LBB0_7
; %bb.4:
	mov	x21, x0
	mov	w1, #0
	mov	x2, x20
	bl	_memset
Lloh10:
	adrp	x8, _O_RDONLY@GOTPAGE
Lloh11:
	ldr	x8, [x8, _O_RDONLY@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x0, x23
	bl	_open
	cbz	w0, LBB0_8
; %bb.5:
	mov	x23, x0
	ldrsw	x8, [x24]
	add	x1, x21, x8
	mov	x2, x22
	bl	_read
	cmp	x0, x22
	b.hs	LBB0_9
; %bb.6:
Lloh13:
	adrp	x0, l_str.18@PAGE
Lloh14:
	add	x0, x0, l_str.18@PAGEOFF
	bl	_puts
	b	LBB0_14
LBB0_7:
Lloh15:
	adrp	x0, l_str@PAGE
Lloh16:
	add	x0, x0, l_str@PAGEOFF
	bl	_puts
	b	LBB0_14
LBB0_8:
Lloh17:
	adrp	x0, l_str.15@PAGE
Lloh18:
	add	x0, x0, l_str.15@PAGEOFF
	bl	_puts
	b	LBB0_14
LBB0_9:
	mov	x0, x23
	bl	_close
Lloh19:
	adrp	x8, _OFFSET_MAGIC@GOTPAGE
Lloh20:
	ldr	x8, [x8, _OFFSET_MAGIC@GOTPAGEOFF]
Lloh21:
	ldrsw	x8, [x8]
	add	x0, x21, x8
Lloh22:
	adrp	x8, _IH_MAGIC@GOTPAGE
Lloh23:
	ldr	x8, [x8, _IH_MAGIC@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	bl	_be_wr
Lloh25:
	adrp	x8, _OFFSET_TIME@GOTPAGE
Lloh26:
	ldr	x8, [x8, _OFFSET_TIME@GOTPAGEOFF]
Lloh27:
	ldrsw	x8, [x8]
	add	x0, x21, x8
	mov	w1, #29580
	movk	w1, #19462, lsl #16
	bl	_be_wr
Lloh28:
	adrp	x8, _OFFSET_SIZE@GOTPAGE
Lloh29:
	ldr	x8, [x8, _OFFSET_SIZE@GOTPAGEOFF]
Lloh30:
	ldrsw	x8, [x8]
	add	x0, x21, x8
	mov	x1, x22
	bl	_be_wr
Lloh31:
	adrp	x8, _OFFSET_LOAD@GOTPAGE
Lloh32:
	ldr	x8, [x8, _OFFSET_LOAD@GOTPAGEOFF]
Lloh33:
	ldrsw	x8, [x8]
	add	x0, x21, x8
	mov	w1, #32768
	bl	_be_wr
Lloh34:
	adrp	x8, _OFFSET_EP@GOTPAGE
Lloh35:
	ldr	x8, [x8, _OFFSET_EP@GOTPAGEOFF]
Lloh36:
	ldrsw	x8, [x8]
	add	x0, x21, x8
	mov	w1, #32768
	bl	_be_wr
Lloh37:
	adrp	x8, _OFFSET_OS@GOTPAGE
Lloh38:
	ldr	x8, [x8, _OFFSET_OS@GOTPAGEOFF]
Lloh39:
	ldr	x8, [x8]
	mov	w9, #5
	strb	w9, [x21, x8]
Lloh40:
	adrp	x8, _OFFSET_ARCH@GOTPAGE
Lloh41:
	ldr	x8, [x8, _OFFSET_ARCH@GOTPAGEOFF]
Lloh42:
	ldr	x8, [x8]
	mov	w9, #2
	strb	w9, [x21, x8]
Lloh43:
	adrp	x8, _OFFSET_TYPE@GOTPAGE
Lloh44:
	ldr	x8, [x8, _OFFSET_TYPE@GOTPAGEOFF]
Lloh45:
	ldr	x8, [x8]
	strb	w9, [x21, x8]
Lloh46:
	adrp	x8, _OFFSET_COMP@GOTPAGE
Lloh47:
	ldr	x8, [x8, _OFFSET_COMP@GOTPAGEOFF]
Lloh48:
	ldr	x8, [x8]
	mov	w9, #1
	strb	w9, [x21, x8]
Lloh49:
	adrp	x23, _OFFSET_NAME@GOTPAGE
Lloh50:
	ldr	x23, [x23, _OFFSET_NAME@GOTPAGEOFF]
	ldrsw	x8, [x23]
	add	x0, x21, x8
Lloh51:
	adrp	x25, _NAME_LEN@GOTPAGE
Lloh52:
	ldr	x25, [x25, _NAME_LEN@GOTPAGEOFF]
	ldr	w2, [x25]
Lloh53:
	adrp	x1, l_.str.7@PAGE
Lloh54:
	add	x1, x1, l_.str.7@PAGEOFF
	bl	_strncpy
	ldr	w8, [x23]
	ldr	w9, [x25]
	add	w8, w8, w9
	sub	w8, w8, #1
	strb	wzr, [x21, w8, sxtw]
Lloh55:
	adrp	x23, _OFFSET_MODEL@GOTPAGE
Lloh56:
	ldr	x23, [x23, _OFFSET_MODEL@GOTPAGEOFF]
	ldrsw	x8, [x23]
	add	x0, x21, x8
Lloh57:
	adrp	x25, _MODEL_LEN@GOTPAGE
Lloh58:
	ldr	x25, [x25, _MODEL_LEN@GOTPAGEOFF]
	ldr	w2, [x25]
Lloh59:
	adrp	x1, l_.str.8@PAGE
Lloh60:
	add	x1, x1, l_.str.8@PAGEOFF
	bl	_strncpy
	ldr	w8, [x23]
	ldr	w9, [x25]
	add	w8, w8, w9
	sub	w8, w8, #1
	strb	wzr, [x21, w8, sxtw]
Lloh61:
	adrp	x23, _OFFSET_VERSION@GOTPAGE
Lloh62:
	ldr	x23, [x23, _OFFSET_VERSION@GOTPAGEOFF]
	ldrsw	x8, [x23]
	add	x0, x21, x8
Lloh63:
	adrp	x25, _VERSION_LEN@GOTPAGE
Lloh64:
	ldr	x25, [x25, _VERSION_LEN@GOTPAGEOFF]
	ldr	w2, [x25]
Lloh65:
	adrp	x1, l_.str.9@PAGE
Lloh66:
	add	x1, x1, l_.str.9@PAGEOFF
	bl	_strncpy
	ldr	w8, [x23]
	ldr	w9, [x25]
	add	w8, w8, w9
	sub	w8, w8, #1
	strb	wzr, [x21, w8, sxtw]
Lloh67:
	adrp	x8, _OFFSET_MAC@GOTPAGE
Lloh68:
	ldr	x8, [x8, _OFFSET_MAC@GOTPAGEOFF]
Lloh69:
	ldr	x8, [x8]
	add	x8, x21, x8
	mov	w9, #32768
	movk	w9, #5832, lsl #16
	str	w9, [x8]
	mov	w9, #26753
	strh	w9, [x8, #4]
	ldrsw	x8, [x24]
	add	x1, x21, x8
	mov	w0, #0
	mov	x2, x22
	bl	_crc32
	mov	x22, x0
Lloh70:
	adrp	x8, _OFFSET_DCRC@GOTPAGE
Lloh71:
	ldr	x8, [x8, _OFFSET_DCRC@GOTPAGEOFF]
Lloh72:
	ldrsw	x8, [x8]
	add	x0, x21, x8
	mov	x1, x22
	bl	_be_wr
	str	x22, [sp]
Lloh73:
	adrp	x0, l_.str.10@PAGE
Lloh74:
	add	x0, x0, l_.str.10@PAGEOFF
	bl	_printf
	ldr	w2, [x24]
	mov	w0, #0
	mov	x1, x21
	bl	_crc32
	mov	x22, x0
Lloh75:
	adrp	x8, _OFFSET_HCRC@GOTPAGE
Lloh76:
	ldr	x8, [x8, _OFFSET_HCRC@GOTPAGEOFF]
Lloh77:
	ldrsw	x8, [x8]
	add	x0, x21, x8
	mov	x1, x22
	bl	_be_wr
	str	x22, [sp]
Lloh78:
	adrp	x0, l_.str.11@PAGE
Lloh79:
	add	x0, x0, l_.str.11@PAGEOFF
	bl	_printf
	stp	x19, x20, [sp]
Lloh80:
	adrp	x0, l_.str.12@PAGE
Lloh81:
	add	x0, x0, l_.str.12@PAGEOFF
	bl	_printf
Lloh82:
	adrp	x8, _O_RDWR@GOTPAGE
Lloh83:
	ldr	x8, [x8, _O_RDWR@GOTPAGEOFF]
Lloh84:
	ldr	w8, [x8]
Lloh85:
	adrp	x9, _O_CREAT@GOTPAGE
Lloh86:
	ldr	x9, [x9, _O_CREAT@GOTPAGEOFF]
Lloh87:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh88:
	adrp	x9, _O_TRUNC@GOTPAGE
Lloh89:
	ldr	x9, [x9, _O_TRUNC@GOTPAGEOFF]
Lloh90:
	ldr	w9, [x9]
Lloh91:
	adrp	x10, _S_IRWXU@GOTPAGE
Lloh92:
	ldr	x10, [x10, _S_IRWXU@GOTPAGEOFF]
	orr	w1, w8, w9
Lloh93:
	ldr	w8, [x10]
Lloh94:
	adrp	x9, _S_IRGRP@GOTPAGE
Lloh95:
	ldr	x9, [x9, _S_IRGRP@GOTPAGEOFF]
Lloh96:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	x8, [sp]
	mov	x0, x19
	bl	_open
	cbz	w0, LBB0_12
; %bb.10:
	mov	x19, x0
	mov	x1, x21
	mov	x2, x20
	bl	_write
	cmp	x0, x20
	b.hs	LBB0_13
; %bb.11:
Lloh97:
	adrp	x0, l_str.17@PAGE
Lloh98:
	add	x0, x0, l_str.17@PAGEOFF
	bl	_puts
	b	LBB0_14
LBB0_12:
Lloh99:
	adrp	x0, l_str.16@PAGE
Lloh100:
	add	x0, x0, l_str.16@PAGEOFF
	bl	_puts
	b	LBB0_14
LBB0_13:
	mov	x0, x19
	bl	_close
	mov	x0, x21
	bl	_free
LBB0_14:
	mov	w0, #0
LBB0_15:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh94, Lloh95, Lloh96
	.loh AdrpLdrGotLdr	Lloh91, Lloh92, Lloh93
	.loh AdrpLdrGotLdr	Lloh88, Lloh89, Lloh90
	.loh AdrpLdrGotLdr	Lloh85, Lloh86, Lloh87
	.loh AdrpLdrGotLdr	Lloh82, Lloh83, Lloh84
	.loh AdrpAdd	Lloh80, Lloh81
	.loh AdrpAdd	Lloh78, Lloh79
	.loh AdrpLdrGotLdr	Lloh75, Lloh76, Lloh77
	.loh AdrpAdd	Lloh73, Lloh74
	.loh AdrpLdrGotLdr	Lloh70, Lloh71, Lloh72
	.loh AdrpLdrGotLdr	Lloh67, Lloh68, Lloh69
	.loh AdrpAdd	Lloh65, Lloh66
	.loh AdrpLdrGot	Lloh63, Lloh64
	.loh AdrpLdrGot	Lloh61, Lloh62
	.loh AdrpAdd	Lloh59, Lloh60
	.loh AdrpLdrGot	Lloh57, Lloh58
	.loh AdrpLdrGot	Lloh55, Lloh56
	.loh AdrpAdd	Lloh53, Lloh54
	.loh AdrpLdrGot	Lloh51, Lloh52
	.loh AdrpLdrGot	Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh97, Lloh98
	.loh AdrpAdd	Lloh99, Lloh100
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str.1:                               ; @.str.1
	.asciz	"%s <infile> <outfile>\n"

l_.str.2:                               ; @.str.2
	.asciz	"INFILE: %s, size: %08x bytes\n"

	.comm	_HEADER_SIZE,4,2                ; @HEADER_SIZE
l_.str.3:                               ; @.str.3
	.asciz	"Allocate %08x bytes\n"

	.comm	_O_RDONLY,4,2                   ; @O_RDONLY
	.comm	_OFFSET_MAGIC,4,2               ; @OFFSET_MAGIC
	.comm	_IH_MAGIC,4,2                   ; @IH_MAGIC
	.comm	_OFFSET_TIME,4,2                ; @OFFSET_TIME
	.comm	_OFFSET_SIZE,4,2                ; @OFFSET_SIZE
	.comm	_OFFSET_LOAD,4,2                ; @OFFSET_LOAD
	.comm	_OFFSET_EP,4,2                  ; @OFFSET_EP
	.comm	_OFFSET_OS,8,3                  ; @OFFSET_OS
	.comm	_OFFSET_ARCH,8,3                ; @OFFSET_ARCH
	.comm	_OFFSET_TYPE,8,3                ; @OFFSET_TYPE
	.comm	_OFFSET_COMP,8,3                ; @OFFSET_COMP
	.comm	_OFFSET_NAME,4,2                ; @OFFSET_NAME
l_.str.7:                               ; @.str.7
	.asciz	"kernel.img"

	.comm	_NAME_LEN,4,2                   ; @NAME_LEN
	.comm	_OFFSET_MODEL,4,2               ; @OFFSET_MODEL
l_.str.8:                               ; @.str.8
	.asciz	"dns-313v3"

	.comm	_MODEL_LEN,4,2                  ; @MODEL_LEN
	.comm	_OFFSET_VERSION,4,2             ; @OFFSET_VERSION
l_.str.9:                               ; @.str.9
	.asciz	"2.01b04"

	.comm	_VERSION_LEN,4,2                ; @VERSION_LEN
	.comm	_OFFSET_MAC,8,3                 ; @OFFSET_MAC
	.comm	_OFFSET_DCRC,4,2                ; @OFFSET_DCRC
l_.str.10:                              ; @.str.10
	.asciz	"data checksum: 0x%08x\n"

	.comm	_OFFSET_HCRC,4,2                ; @OFFSET_HCRC
l_.str.11:                              ; @.str.11
	.asciz	"header checksum: 0x%08x\n"

l_.str.12:                              ; @.str.12
	.asciz	"OUTFILE: %s, size: %08x bytes\n"

	.comm	_O_RDWR,4,2                     ; @O_RDWR
	.comm	_O_CREAT,4,2                    ; @O_CREAT
	.comm	_O_TRUNC,4,2                    ; @O_TRUNC
	.comm	_S_IRWXU,4,2                    ; @S_IRWXU
	.comm	_S_IRGRP,4,2                    ; @S_IRGRP
l_str:                                  ; @str
	.asciz	"OOM: could not allocate buffer"

l_str.15:                               ; @str.15
	.asciz	"ERROR: could not open input file"

l_str.16:                               ; @str.16
	.asciz	"ERROR: could not open output file"

l_str.17:                               ; @str.17
	.asciz	"ERROR: could not write complete output file"

l_str.18:                               ; @str.18
	.asciz	"ERROR: could not read entire file"

l_str.19:                               ; @str.19
	.asciz	"Too few arguments."

.subsections_via_symbols
