	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movl	%edi, %ebx
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	(%rsi), %rdi
	callq	_basename
	movq	_progname@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	leaq	L_.str(%rip), %r12
	leaq	LJTI0_0(%rip), %r13
	movq	_optarg@GOTPCREL(%rip), %r15
	jmp	LBB0_1
LBB0_13:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	(%r15), %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_strtoul
	movq	_offset@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	movq	%r14, %rsi
	movq	%r12, %rdx
	callq	_getopt
                                        ## kill: def $eax killed $eax def $rax
	leal	-66(%rax), %ecx
	cmpl	$52, %ecx
	ja	LBB0_2
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	movslq	(%r13,%rcx,4), %rax
	addq	%r13, %rax
	jmpq	*%rax
LBB0_6:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	(%r15), %rax
	movq	_buildno@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	jmp	LBB0_1
LBB0_5:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	_big_endian@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
	jmp	LBB0_1
LBB0_7:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	(%r15), %rax
	movq	_devname@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	jmp	LBB0_1
LBB0_14:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	_EXIT_SUCCESS@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_8:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	(%r15), %rax
	movq	_ifname@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	jmp	LBB0_1
LBB0_9:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	(%r15), %rax
	movq	_model@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	jmp	LBB0_1
LBB0_10:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	(%r15), %rax
	movq	_ofname@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	jmp	LBB0_1
LBB0_11:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	(%r15), %rax
	movq	_signature@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	jmp	LBB0_1
LBB0_12:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	(%r15), %rax
	movq	_version@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	jmp	LBB0_1
LBB0_2:                                 ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$-1, %eax
	je	LBB0_16
LBB0_3:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
LBB0_15:                                ##   in Loop: Header=BB0_1 Depth=1
	movl	(%rax), %edi
	callq	_usage
	jmp	LBB0_1
LBB0_16:
	movq	_signature@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_17
## %bb.18:
	movq	_ifname@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	movl	-44(%rbp), %r13d                ## 4-byte Reload
	je	LBB0_19
## %bb.20:
	movq	_ofname@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_21
## %bb.22:
	movq	_devname@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_23
## %bb.24:
	movq	_model@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_25
## %bb.26:
	movq	_buildno@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_27
## %bb.28:
	movq	_version@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_29
## %bb.30:
	leaq	-72(%rbp), %rsi
	callq	_stat
	testl	%eax, %eax
	je	LBB0_32
## %bb.31:
	movq	(%rbx), %rsi
	leaq	L_.str.8(%rip), %rdi
	callq	_ERRS
	jmp	LBB0_49
LBB0_17:
	leaq	L_.str.1(%rip), %rdi
	callq	_ERR
	movl	-44(%rbp), %r13d                ## 4-byte Reload
	jmp	LBB0_49
LBB0_19:
	leaq	L_.str.2(%rip), %rdi
	callq	_ERR
	jmp	LBB0_49
LBB0_21:
	leaq	L_.str.3(%rip), %rdi
	callq	_ERR
	jmp	LBB0_49
LBB0_23:
	leaq	L_.str.4(%rip), %rdi
	callq	_ERR
	jmp	LBB0_49
LBB0_25:
	leaq	L_.str.5(%rip), %rdi
	callq	_ERR
	jmp	LBB0_49
LBB0_27:
	leaq	L_.str.6(%rip), %rdi
	callq	_ERR
	jmp	LBB0_49
LBB0_29:
	leaq	L_.str.7(%rip), %rdi
	callq	_ERR
	jmp	LBB0_49
LBB0_32:
	movl	-72(%rbp), %r14d
	leal	44(%r14), %ebx
	movl	%ebx, %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_33
## %bb.34:
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movl	%ebx, -76(%rbp)                 ## 4-byte Spill
	movq	_ifname@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	leaq	L_.str.10(%rip), %rsi
	callq	_fopen
	testq	%rax, %rax
	je	LBB0_35
## %bb.36:
	movq	_errno@GOTPCREL(%rip), %r12
	movq	$0, (%r12)
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	leaq	44(%rbx), %rdi
	movq	%rdi, -88(%rbp)                 ## 8-byte Spill
	movl	%r14d, %esi
	movl	$1, %edx
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%rax, %rcx
	callq	_fread
	cmpq	$0, (%r12)
	je	LBB0_38
## %bb.37:
	movq	_ifname@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	leaq	L_.str.12(%rip), %rdi
LBB0_40:
	callq	_ERRS
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	jmp	LBB0_47
LBB0_33:
	leaq	L_.str.9(%rip), %rdi
	callq	_ERR
	jmp	LBB0_49
LBB0_35:
	movq	(%r12), %rsi
	leaq	L_.str.11(%rip), %rdi
	callq	_ERRS
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_48
LBB0_38:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$44, %edx
	callq	_memset
	movl	40(%rbx), %edi
	movq	_signature@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	$4, %edx
	callq	_strncpy
	leaq	36(%rbx), %rdi
	movq	_WRGG03_MAGIC@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	xorl	%edx, %edx
	callq	_put_u32
	leaq	32(%rbx), %rdi
	movl	(%r15), %esi
	xorl	%edx, %edx
	callq	_put_u32
	movl	28(%rbx), %edi
	movq	_version@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	$4, %edx
	callq	_strncpy
	movl	24(%rbx), %edi
	movq	_model@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	$4, %edx
	callq	_strncpy
	leaq	20(%rbx), %rdi
	movq	_flag@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_put_u32
	leaq	16(%rbx), %rdi
	movq	_reserve@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_put_u32
	movl	12(%rbx), %edi
	movq	_buildno@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	$4, %edx
	callq	_strncpy
	leaq	8(%rbx), %rdi
	movq	_big_endian@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	movl	%r14d, %esi
	callq	_put_u32
	movq	%rbx, %rdi
	addq	$4, %rdi
	movq	_offset@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r15), %edx
	callq	_put_u32
	movl	(%rbx), %edi
	movq	_devname@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	$4, %edx
	callq	_strncpy
	movq	%rbx, %rdi
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	movl	%r14d, %edx
	movq	_ofname@GOTPCREL(%rip), %r14
	callq	_get_digest
	movq	(%r14), %rdi
	leaq	L_.str.13(%rip), %rsi
	callq	_fopen
	testq	%rax, %rax
	je	LBB0_39
## %bb.41:
	movq	%rax, %r15
	movq	$0, (%r12)
	movq	%rbx, %rdi
	movl	-76(%rbp), %esi                 ## 4-byte Reload
	movl	$1, %edx
	movq	%rax, %rcx
	callq	_fwrite
	cmpq	$0, (%r12)
	je	LBB0_43
## %bb.42:
	movq	_ofname@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	leaq	L_.str.15(%rip), %rdi
	callq	_ERRS
	movq	_EXIT_SUCCESS@GOTPCREL(%rip), %r12
	jmp	LBB0_44
LBB0_39:
	movq	(%r14), %rsi
	leaq	L_.str.14(%rip), %rdi
	jmp	LBB0_40
LBB0_43:
	movq	%r15, %rdi
	callq	_fflush
	movq	_EXIT_SUCCESS@GOTPCREL(%rip), %r12
	movl	(%r12), %r13d
LBB0_44:
	movq	%r15, %rdi
	callq	_fclose
	cmpl	(%r12), %r13d
	je	LBB0_46
## %bb.45:
	movq	_ofname@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_unlink
LBB0_46:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
LBB0_47:
	callq	_fclose
LBB0_48:
	movq	%rbx, %rdi
	callq	_free
LBB0_49:
	movl	%r13d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_13, LBB0_13-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_14, LBB0_14-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
LJTI0_0:
	.long	L0_0_set_6
	.long	L0_0_set_3
	.long	L0_0_set_3
	.long	L0_0_set_3
	.long	L0_0_set_3
	.long	L0_0_set_3
	.long	L0_0_set_3
	.long	L0_0_set_3
	.long	L0_0_set_3
	.long	L0_0_set_3
	.long	L0_0_set_3
	.long	L0_0_set_3
	.long	L0_0_set_3
	.long	L0_0_set_13
	.long	L0_0_set_3
	.long	L0_0_set_3
	.long	L0_0_set_3
	.long	L0_0_set_3
	.long	L0_0_set_3
	.long	L0_0_set_3
	.long	L0_0_set_3
	.long	L0_0_set_3
	.long	L0_0_set_3
	.long	L0_0_set_3
	.long	L0_0_set_3
	.long	L0_0_set_3
	.long	L0_0_set_3
	.long	L0_0_set_3
	.long	L0_0_set_3
	.long	L0_0_set_3
	.long	L0_0_set_3
	.long	L0_0_set_3
	.long	L0_0_set_5
	.long	L0_0_set_3
	.long	L0_0_set_7
	.long	L0_0_set_3
	.long	L0_0_set_3
	.long	L0_0_set_3
	.long	L0_0_set_14
	.long	L0_0_set_8
	.long	L0_0_set_3
	.long	L0_0_set_3
	.long	L0_0_set_3
	.long	L0_0_set_9
	.long	L0_0_set_3
	.long	L0_0_set_10
	.long	L0_0_set_3
	.long	L0_0_set_3
	.long	L0_0_set_3
	.long	L0_0_set_11
	.long	L0_0_set_3
	.long	L0_0_set_3
	.long	L0_0_set_12
	.end_data_region
                                        ## -- End function
	.comm	_EXIT_FAILURE,4,2               ## @EXIT_FAILURE
	.comm	_progname,4,2                   ## @progname
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"bd:i:m:o:s:v:B:O:h"

	.comm	_big_endian,4,2                 ## @big_endian
	.comm	_optarg,8,3                     ## @optarg
	.comm	_buildno,8,3                    ## @buildno
	.comm	_devname,8,3                    ## @devname
	.comm	_ifname,8,3                     ## @ifname
	.comm	_model,8,3                      ## @model
	.comm	_ofname,8,3                     ## @ofname
	.comm	_signature,8,3                  ## @signature
	.comm	_version,8,3                    ## @version
	.comm	_offset,4,2                     ## @offset
	.comm	_EXIT_SUCCESS,4,2               ## @EXIT_SUCCESS
L_.str.1:                               ## @.str.1
	.asciz	"no signature specified"

L_.str.2:                               ## @.str.2
	.asciz	"no input file specified"

L_.str.3:                               ## @.str.3
	.asciz	"no output file specified"

L_.str.4:                               ## @.str.4
	.asciz	"no device name specified"

L_.str.5:                               ## @.str.5
	.asciz	"no model name specified"

L_.str.6:                               ## @.str.6
	.asciz	"no build number specified"

L_.str.7:                               ## @.str.7
	.asciz	"no version specified"

L_.str.8:                               ## @.str.8
	.asciz	"stat failed on %s"

L_.str.9:                               ## @.str.9
	.asciz	"no memory for buffer\n"

L_.str.10:                              ## @.str.10
	.asciz	"r"

L_.str.11:                              ## @.str.11
	.asciz	"could not open \"%s\" for reading"

	.comm	_errno,8,3                      ## @errno
L_.str.12:                              ## @.str.12
	.asciz	"unable to read from file %s"

	.comm	_WRGG03_MAGIC,4,2               ## @WRGG03_MAGIC
	.comm	_flag,4,2                       ## @flag
	.comm	_reserve,4,2                    ## @reserve
L_.str.13:                              ## @.str.13
	.asciz	"w"

L_.str.14:                              ## @.str.14
	.asciz	"could not open \"%s\" for writing"

L_.str.15:                              ## @.str.15
	.asciz	"unable to write to file %s"

.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	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x28, _EXIT_FAILURE@GOTPAGE
Lloh1:
	ldr	x28, [x28, _EXIT_FAILURE@GOTPAGEOFF]
	ldr	w8, [x28]
	str	w8, [sp, #4]                    ; 4-byte Folded Spill
	ldr	x0, [x1]
	bl	_basename
Lloh2:
	adrp	x8, _progname@GOTPAGE
Lloh3:
	ldr	x8, [x8, _progname@GOTPAGEOFF]
Lloh4:
	adrp	x24, _optarg@GOTPAGE
Lloh5:
	ldr	x24, [x24, _optarg@GOTPAGEOFF]
Lloh6:
	adrp	x22, l_.str@PAGE
Lloh7:
	add	x22, x22, l_.str@PAGEOFF
Lloh8:
	adrp	x23, lJTI0_0@PAGE
Lloh9:
	add	x23, x23, lJTI0_0@PAGEOFF
Lloh10:
	str	w0, [x8]
	mov	w19, #1
Lloh11:
	adrp	x27, _ifname@GOTPAGE
Lloh12:
	ldr	x27, [x27, _ifname@GOTPAGEOFF]
Lloh13:
	adrp	x26, _ofname@GOTPAGE
Lloh14:
	ldr	x26, [x26, _ofname@GOTPAGEOFF]
Lloh15:
	adrp	x25, _signature@GOTPAGE
Lloh16:
	ldr	x25, [x25, _signature@GOTPAGEOFF]
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
Lloh17:
	adrp	x8, _EXIT_SUCCESS@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EXIT_SUCCESS@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	bl	_usage
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	mov	x1, x20
	mov	x2, x22
	bl	_getopt
	sub	w8, w0, #66
	cmp	w8, #52
	b.hi	LBB0_13
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	adr	x9, LBB0_1
	ldrb	w10, [x23, x8]
	add	x9, x9, x10, lsl #2
	br	x9
LBB0_4:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x24]
Lloh20:
	adrp	x9, _buildno@GOTPAGE
Lloh21:
	ldr	x9, [x9, _buildno@GOTPAGEOFF]
Lloh22:
	str	x8, [x9]
	b	LBB0_2
LBB0_5:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	x0, [x24]
	mov	x1, #0
	mov	w2, #0
	bl	_strtoul
Lloh23:
	adrp	x8, _offset@GOTPAGE
Lloh24:
	ldr	x8, [x8, _offset@GOTPAGEOFF]
Lloh25:
	str	w0, [x8]
	b	LBB0_2
LBB0_6:                                 ;   in Loop: Header=BB0_2 Depth=1
Lloh26:
	adrp	x8, _big_endian@GOTPAGE
Lloh27:
	ldr	x8, [x8, _big_endian@GOTPAGEOFF]
Lloh28:
	str	w19, [x8]
	b	LBB0_2
LBB0_7:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x24]
Lloh29:
	adrp	x9, _devname@GOTPAGE
Lloh30:
	ldr	x9, [x9, _devname@GOTPAGEOFF]
Lloh31:
	str	x8, [x9]
	b	LBB0_2
LBB0_8:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x24]
	str	x8, [x27]
	b	LBB0_2
LBB0_9:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x24]
Lloh32:
	adrp	x9, _model@GOTPAGE
Lloh33:
	ldr	x9, [x9, _model@GOTPAGEOFF]
Lloh34:
	str	x8, [x9]
	b	LBB0_2
LBB0_10:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x24]
	str	x8, [x26]
	b	LBB0_2
LBB0_11:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x24]
	str	x8, [x25]
	b	LBB0_2
LBB0_12:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x24]
Lloh35:
	adrp	x9, _version@GOTPAGE
Lloh36:
	ldr	x9, [x9, _version@GOTPAGEOFF]
Lloh37:
	str	x8, [x9]
	b	LBB0_2
LBB0_13:                                ;   in Loop: Header=BB0_2 Depth=1
	cmn	w0, #1
	b.eq	LBB0_15
LBB0_14:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x28]
	bl	_usage
	b	LBB0_2
LBB0_15:
	ldr	x8, [x25]
	cbz	x8, LBB0_24
; %bb.16:
	ldr	x0, [x27]
	cbz	x0, LBB0_25
; %bb.17:
	ldr	x8, [x26]
	cbz	x8, LBB0_26
; %bb.18:
Lloh38:
	adrp	x8, _devname@GOTPAGE
Lloh39:
	ldr	x8, [x8, _devname@GOTPAGEOFF]
Lloh40:
	ldr	x8, [x8]
	cbz	x8, LBB0_27
; %bb.19:
Lloh41:
	adrp	x8, _model@GOTPAGE
Lloh42:
	ldr	x8, [x8, _model@GOTPAGEOFF]
Lloh43:
	ldr	x8, [x8]
	cbz	x8, LBB0_28
; %bb.20:
Lloh44:
	adrp	x8, _buildno@GOTPAGE
Lloh45:
	ldr	x8, [x8, _buildno@GOTPAGEOFF]
Lloh46:
	ldr	x8, [x8]
	cbz	x8, LBB0_29
; %bb.21:
Lloh47:
	adrp	x8, _version@GOTPAGE
Lloh48:
	ldr	x8, [x8, _version@GOTPAGEOFF]
Lloh49:
	ldr	x8, [x8]
	cbz	x8, LBB0_30
; %bb.22:
	mov	x24, x26
	add	x1, sp, #8
	bl	_stat
	cbz	w0, LBB0_34
; %bb.23:
	ldr	x1, [x27]
Lloh50:
	adrp	x0, l_.str.8@PAGE
Lloh51:
	add	x0, x0, l_.str.8@PAGEOFF
	bl	_ERRS
	b	LBB0_32
LBB0_24:
Lloh52:
	adrp	x0, l_.str.1@PAGE
Lloh53:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_31
LBB0_25:
Lloh54:
	adrp	x0, l_.str.2@PAGE
Lloh55:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_31
LBB0_26:
Lloh56:
	adrp	x0, l_.str.3@PAGE
Lloh57:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_31
LBB0_27:
Lloh58:
	adrp	x0, l_.str.4@PAGE
Lloh59:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_31
LBB0_28:
Lloh60:
	adrp	x0, l_.str.5@PAGE
Lloh61:
	add	x0, x0, l_.str.5@PAGEOFF
	b	LBB0_31
LBB0_29:
Lloh62:
	adrp	x0, l_.str.6@PAGE
Lloh63:
	add	x0, x0, l_.str.6@PAGEOFF
	b	LBB0_31
LBB0_30:
Lloh64:
	adrp	x0, l_.str.7@PAGE
Lloh65:
	add	x0, x0, l_.str.7@PAGEOFF
LBB0_31:
	bl	_ERR
LBB0_32:
	ldr	w19, [sp, #4]                   ; 4-byte Folded Reload
LBB0_33:
	mov	x0, x19
	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
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_34:
	ldr	w21, [sp, #8]
	add	w22, w21, #44
	mov	x0, x22
	bl	_malloc
	cbz	x0, LBB0_40
; %bb.35:
	mov	x20, x0
	ldr	x0, [x27]
Lloh66:
	adrp	x1, l_.str.10@PAGE
Lloh67:
	add	x1, x1, l_.str.10@PAGEOFF
	bl	_fopen
	cbz	x0, LBB0_41
; %bb.36:
	mov	x26, x0
Lloh68:
	adrp	x28, _errno@GOTPAGE
Lloh69:
	ldr	x28, [x28, _errno@GOTPAGEOFF]
	str	xzr, [x28]
	add	x23, x20, #44
	mov	x0, x23
	mov	x1, x21
	mov	w2, #1
	mov	x3, x26
	bl	_fread
	ldr	x8, [x28]
	cbz	x8, LBB0_43
; %bb.37:
	ldr	x1, [x27]
Lloh70:
	adrp	x0, l_.str.12@PAGE
Lloh71:
	add	x0, x0, l_.str.12@PAGEOFF
LBB0_38:
	bl	_ERRS
	ldr	w19, [sp, #4]                   ; 4-byte Folded Reload
LBB0_39:
	mov	x0, x26
	bl	_fclose
	b	LBB0_42
LBB0_40:
Lloh72:
	adrp	x0, l_.str.9@PAGE
Lloh73:
	add	x0, x0, l_.str.9@PAGEOFF
	b	LBB0_31
LBB0_41:
	ldr	x1, [x27]
Lloh74:
	adrp	x0, l_.str.11@PAGE
Lloh75:
	add	x0, x0, l_.str.11@PAGEOFF
	bl	_ERRS
	ldr	w19, [sp, #4]                   ; 4-byte Folded Reload
LBB0_42:
	mov	x0, x20
	bl	_free
	b	LBB0_33
LBB0_43:
	mov	x0, x20
	mov	w1, #0
	mov	w2, #44
	bl	_memset
	ldr	w0, [x20, #40]
	ldr	x1, [x25]
	mov	w2, #4
	bl	_strncpy
	add	x0, x20, #36
Lloh76:
	adrp	x19, _WRGG03_MAGIC@GOTPAGE
Lloh77:
	ldr	x19, [x19, _WRGG03_MAGIC@GOTPAGEOFF]
	ldr	w1, [x19]
	mov	w2, #0
	bl	_put_u32
	add	x0, x20, #32
	ldr	w1, [x19]
	mov	w2, #0
	bl	_put_u32
	ldr	w0, [x20, #28]
Lloh78:
	adrp	x8, _version@GOTPAGE
Lloh79:
	ldr	x8, [x8, _version@GOTPAGEOFF]
Lloh80:
	ldr	x1, [x8]
	mov	w2, #4
	bl	_strncpy
	ldr	w0, [x20, #24]
Lloh81:
	adrp	x8, _model@GOTPAGE
Lloh82:
	ldr	x8, [x8, _model@GOTPAGEOFF]
Lloh83:
	ldr	x1, [x8]
	mov	w2, #4
	bl	_strncpy
	add	x0, x20, #20
Lloh84:
	adrp	x8, _flag@GOTPAGE
Lloh85:
	ldr	x8, [x8, _flag@GOTPAGEOFF]
Lloh86:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_put_u32
	add	x0, x20, #16
Lloh87:
	adrp	x8, _reserve@GOTPAGE
Lloh88:
	ldr	x8, [x8, _reserve@GOTPAGEOFF]
Lloh89:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_put_u32
	ldr	w0, [x20, #12]
Lloh90:
	adrp	x8, _buildno@GOTPAGE
Lloh91:
	ldr	x8, [x8, _buildno@GOTPAGEOFF]
Lloh92:
	ldr	x1, [x8]
	mov	w2, #4
	bl	_strncpy
	add	x0, x20, #8
Lloh93:
	adrp	x19, _big_endian@GOTPAGE
Lloh94:
	ldr	x19, [x19, _big_endian@GOTPAGEOFF]
	ldr	w2, [x19]
	mov	x1, x21
	bl	_put_u32
	add	x0, x20, #4
Lloh95:
	adrp	x8, _offset@GOTPAGE
Lloh96:
	ldr	x8, [x8, _offset@GOTPAGEOFF]
Lloh97:
	ldr	w1, [x8]
	ldr	w2, [x19]
	bl	_put_u32
	ldr	w0, [x20]
Lloh98:
	adrp	x8, _devname@GOTPAGE
Lloh99:
	ldr	x8, [x8, _devname@GOTPAGEOFF]
Lloh100:
	ldr	x1, [x8]
	mov	w2, #4
	bl	_strncpy
	mov	x0, x20
	mov	x1, x23
	mov	x2, x21
	bl	_get_digest
	ldr	x0, [x24]
Lloh101:
	adrp	x1, l_.str.13@PAGE
Lloh102:
	add	x1, x1, l_.str.13@PAGEOFF
	bl	_fopen
	cbz	x0, LBB0_46
; %bb.44:
	mov	x23, x0
	str	xzr, [x28]
	mov	x0, x20
	mov	x1, x22
	mov	w2, #1
	mov	x3, x23
	bl	_fwrite
	ldr	x8, [x28]
	ldr	w19, [sp, #4]                   ; 4-byte Folded Reload
	cbz	x8, LBB0_47
; %bb.45:
	ldr	x1, [x24]
Lloh103:
	adrp	x0, l_.str.15@PAGE
Lloh104:
	add	x0, x0, l_.str.15@PAGEOFF
	bl	_ERRS
Lloh105:
	adrp	x21, _EXIT_SUCCESS@GOTPAGE
Lloh106:
	ldr	x21, [x21, _EXIT_SUCCESS@GOTPAGEOFF]
	b	LBB0_48
LBB0_46:
	ldr	x1, [x24]
Lloh107:
	adrp	x0, l_.str.14@PAGE
Lloh108:
	add	x0, x0, l_.str.14@PAGEOFF
	b	LBB0_38
LBB0_47:
	mov	x0, x23
	bl	_fflush
Lloh109:
	adrp	x21, _EXIT_SUCCESS@GOTPAGE
Lloh110:
	ldr	x21, [x21, _EXIT_SUCCESS@GOTPAGEOFF]
	ldr	w19, [x21]
LBB0_48:
	mov	x0, x23
	bl	_fclose
	ldr	w8, [x21]
	cmp	w19, w8
	b.eq	LBB0_39
; %bb.49:
	ldr	x0, [x24]
	bl	_unlink
	b	LBB0_39
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotStr	Lloh2, Lloh3, Lloh10
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotStr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotStr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotStr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotStr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotStr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotStr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpAdd	Lloh50, Lloh51
	.loh AdrpAdd	Lloh52, Lloh53
	.loh AdrpAdd	Lloh54, Lloh55
	.loh AdrpAdd	Lloh56, Lloh57
	.loh AdrpAdd	Lloh58, Lloh59
	.loh AdrpAdd	Lloh60, Lloh61
	.loh AdrpAdd	Lloh62, Lloh63
	.loh AdrpAdd	Lloh64, Lloh65
	.loh AdrpAdd	Lloh66, Lloh67
	.loh AdrpLdrGot	Lloh68, Lloh69
	.loh AdrpAdd	Lloh70, Lloh71
	.loh AdrpAdd	Lloh72, Lloh73
	.loh AdrpAdd	Lloh74, Lloh75
	.loh AdrpAdd	Lloh101, Lloh102
	.loh AdrpLdrGotLdr	Lloh98, Lloh99, Lloh100
	.loh AdrpLdrGotLdr	Lloh95, Lloh96, Lloh97
	.loh AdrpLdrGot	Lloh93, Lloh94
	.loh AdrpLdrGotLdr	Lloh90, Lloh91, Lloh92
	.loh AdrpLdrGotLdr	Lloh87, Lloh88, Lloh89
	.loh AdrpLdrGotLdr	Lloh84, Lloh85, Lloh86
	.loh AdrpLdrGotLdr	Lloh81, Lloh82, Lloh83
	.loh AdrpLdrGotLdr	Lloh78, Lloh79, Lloh80
	.loh AdrpLdrGot	Lloh76, Lloh77
	.loh AdrpLdrGot	Lloh105, Lloh106
	.loh AdrpAdd	Lloh103, Lloh104
	.loh AdrpAdd	Lloh107, Lloh108
	.loh AdrpLdrGot	Lloh109, Lloh110
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_4-LBB0_1)>>2
	.byte	(LBB0_14-LBB0_1)>>2
	.byte	(LBB0_14-LBB0_1)>>2
	.byte	(LBB0_14-LBB0_1)>>2
	.byte	(LBB0_14-LBB0_1)>>2
	.byte	(LBB0_14-LBB0_1)>>2
	.byte	(LBB0_14-LBB0_1)>>2
	.byte	(LBB0_14-LBB0_1)>>2
	.byte	(LBB0_14-LBB0_1)>>2
	.byte	(LBB0_14-LBB0_1)>>2
	.byte	(LBB0_14-LBB0_1)>>2
	.byte	(LBB0_14-LBB0_1)>>2
	.byte	(LBB0_14-LBB0_1)>>2
	.byte	(LBB0_5-LBB0_1)>>2
	.byte	(LBB0_14-LBB0_1)>>2
	.byte	(LBB0_14-LBB0_1)>>2
	.byte	(LBB0_14-LBB0_1)>>2
	.byte	(LBB0_14-LBB0_1)>>2
	.byte	(LBB0_14-LBB0_1)>>2
	.byte	(LBB0_14-LBB0_1)>>2
	.byte	(LBB0_14-LBB0_1)>>2
	.byte	(LBB0_14-LBB0_1)>>2
	.byte	(LBB0_14-LBB0_1)>>2
	.byte	(LBB0_14-LBB0_1)>>2
	.byte	(LBB0_14-LBB0_1)>>2
	.byte	(LBB0_14-LBB0_1)>>2
	.byte	(LBB0_14-LBB0_1)>>2
	.byte	(LBB0_14-LBB0_1)>>2
	.byte	(LBB0_14-LBB0_1)>>2
	.byte	(LBB0_14-LBB0_1)>>2
	.byte	(LBB0_14-LBB0_1)>>2
	.byte	(LBB0_14-LBB0_1)>>2
	.byte	(LBB0_6-LBB0_1)>>2
	.byte	(LBB0_14-LBB0_1)>>2
	.byte	(LBB0_7-LBB0_1)>>2
	.byte	(LBB0_14-LBB0_1)>>2
	.byte	(LBB0_14-LBB0_1)>>2
	.byte	(LBB0_14-LBB0_1)>>2
	.byte	(LBB0_1-LBB0_1)>>2
	.byte	(LBB0_8-LBB0_1)>>2
	.byte	(LBB0_14-LBB0_1)>>2
	.byte	(LBB0_14-LBB0_1)>>2
	.byte	(LBB0_14-LBB0_1)>>2
	.byte	(LBB0_9-LBB0_1)>>2
	.byte	(LBB0_14-LBB0_1)>>2
	.byte	(LBB0_10-LBB0_1)>>2
	.byte	(LBB0_14-LBB0_1)>>2
	.byte	(LBB0_14-LBB0_1)>>2
	.byte	(LBB0_14-LBB0_1)>>2
	.byte	(LBB0_11-LBB0_1)>>2
	.byte	(LBB0_14-LBB0_1)>>2
	.byte	(LBB0_14-LBB0_1)>>2
	.byte	(LBB0_12-LBB0_1)>>2
                                        ; -- End function
	.comm	_EXIT_FAILURE,4,2               ; @EXIT_FAILURE
	.comm	_progname,4,2                   ; @progname
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"bd:i:m:o:s:v:B:O:h"

	.comm	_big_endian,4,2                 ; @big_endian
	.comm	_optarg,8,3                     ; @optarg
	.comm	_buildno,8,3                    ; @buildno
	.comm	_devname,8,3                    ; @devname
	.comm	_ifname,8,3                     ; @ifname
	.comm	_model,8,3                      ; @model
	.comm	_ofname,8,3                     ; @ofname
	.comm	_signature,8,3                  ; @signature
	.comm	_version,8,3                    ; @version
	.comm	_offset,4,2                     ; @offset
	.comm	_EXIT_SUCCESS,4,2               ; @EXIT_SUCCESS
l_.str.1:                               ; @.str.1
	.asciz	"no signature specified"

l_.str.2:                               ; @.str.2
	.asciz	"no input file specified"

l_.str.3:                               ; @.str.3
	.asciz	"no output file specified"

l_.str.4:                               ; @.str.4
	.asciz	"no device name specified"

l_.str.5:                               ; @.str.5
	.asciz	"no model name specified"

l_.str.6:                               ; @.str.6
	.asciz	"no build number specified"

l_.str.7:                               ; @.str.7
	.asciz	"no version specified"

l_.str.8:                               ; @.str.8
	.asciz	"stat failed on %s"

l_.str.9:                               ; @.str.9
	.asciz	"no memory for buffer\n"

l_.str.10:                              ; @.str.10
	.asciz	"r"

l_.str.11:                              ; @.str.11
	.asciz	"could not open \"%s\" for reading"

	.comm	_errno,8,3                      ; @errno
l_.str.12:                              ; @.str.12
	.asciz	"unable to read from file %s"

	.comm	_WRGG03_MAGIC,4,2               ; @WRGG03_MAGIC
	.comm	_flag,4,2                       ; @flag
	.comm	_reserve,4,2                    ; @reserve
l_.str.13:                              ; @.str.13
	.asciz	"w"

l_.str.14:                              ; @.str.14
	.asciz	"could not open \"%s\" for writing"

l_.str.15:                              ; @.str.15
	.asciz	"unable to write to file %s"

.subsections_via_symbols
