	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_create_img_file                ## -- Begin function create_img_file
	.p2align	4, 0x90
_create_img_file:                       ## @create_img_file
	.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	$104, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -136(%rbp)                ## 8-byte Spill
	movq	%rsi, -128(%rbp)                ## 8-byte Spill
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_img_hdr@GOTPCREL(%rip), %r13
	movq	(%r13), %rdi
	addq	$50, %rdi
	movq	_fw_version@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$2, %edx
	callq	_memcpy
	movl	$480, %edi                      ## imm = 0x1E0
	addq	(%r13), %rdi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	leaq	-120(%rbp), %r12
	movq	%r12, %rdi
	callq	_md5_init
	movq	_DEBUG_LVL2@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_lprintf
	movq	_EOF@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rax
	movzbl	(%rax,%rbx), %edi
	movq	%r14, %rsi
	callq	_fputc
	cmpl	(%r15), %eax
	je	LBB0_8
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	(%r13), %rsi
	addq	%rbx, %rsi
	movq	%r12, %rdi
	movl	$1, %edx
	callq	_md5_append
	incq	%rbx
	cmpq	$512, %rbx                      ## imm = 0x200
	jne	LBB0_1
	jmp	LBB0_3
LBB0_8:
	movq	%r14, %rdi
	callq	_ferror
	movl	%eax, %r12d
	movl	%eax, %edi
	callq	_strerror
	leaq	L_.str.1(%rip), %rdi
	movq	-128(%rbp), %rsi                ## 8-byte Reload
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	_printf
	testl	%r12d, %r12d
	je	LBB0_3
## %bb.9:
                                        ## implicit-def: $r13
	jmp	LBB0_19
LBB0_3:
	movq	_DEBUG_LVL2@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_lprintf
	leaq	L_.str.3(%rip), %rsi
	movq	-136(%rbp), %rbx                ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_fopen
	movq	%rax, %r13
	testq	%rax, %rax
	je	LBB0_14
## %bb.4:
	movq	%r13, %rdi
	callq	_fgetc
	xorl	%r12d, %r12d
	cmpl	(%r15), %eax
	je	LBB0_12
## %bb.5:
	leaq	-120(%rbp), %rbx
	leaq	-113(%rbp), %r12
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movb	%al, -113(%rbp)
	movzbl	%al, %edi
	movq	%r14, %rsi
	callq	_fputc
	cmpl	(%r15), %eax
	je	LBB0_7
## %bb.10:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movl	$1, %edx
	callq	_md5_append
	movq	%r13, %rdi
	callq	_fgetc
	cmpl	(%r15), %eax
	jne	LBB0_6
## %bb.11:
	xorl	%r12d, %r12d
	jmp	LBB0_12
LBB0_14:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	%r12d, %edi
	callq	_strerror
	leaq	L_.str.4(%rip), %rdi
	movq	%rbx, %rsi
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	_printf
	jmp	LBB0_15
LBB0_7:
	movq	%r14, %rdi
	callq	_ferror
	movl	%eax, %r12d
	movl	%eax, %edi
	callq	_strerror
	leaq	L_.str.1(%rip), %rdi
	movq	-128(%rbp), %rsi                ## 8-byte Reload
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	_printf
LBB0_12:
	movq	%r13, %rdi
	callq	_ferror
	testl	%eax, %eax
	je	LBB0_15
## %bb.13:
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_strerror
	leaq	L_.str.4(%rip), %rdi
	movq	-136(%rbp), %rsi                ## 8-byte Reload
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	_printf
	movl	%ebx, %r12d
	jmp	LBB0_19
LBB0_15:
	testl	%r12d, %r12d
	jne	LBB0_19
## %bb.16:
	movq	_DEBUG_LVL2@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.5(%rip), %rsi
	callq	_lprintf
	movq	_img_eof@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	movzbl	(%rax), %edi
	movq	%r14, %rsi
	callq	_fputc
	xorl	%r12d, %r12d
	cmpl	(%r15), %eax
	jne	LBB0_18
## %bb.17:
	movq	%r14, %rdi
	callq	_ferror
	movl	%eax, %r12d
	movl	%eax, %edi
	callq	_strerror
	leaq	L_.str.1(%rip), %rdi
	movq	-128(%rbp), %rsi                ## 8-byte Reload
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	_printf
LBB0_18:
	movq	(%rbx), %rsi
	leaq	-120(%rbp), %rdi
	movl	$1, %edx
	callq	_md5_append
LBB0_19:
	leaq	L_.str.6(%rip), %rsi
	leaq	-120(%rbp), %rbx
	movq	%rbx, %rdi
	movl	$17, %edx
	callq	_md5_append
	leaq	-112(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_md5_finish
	testl	%r12d, %r12d
	jne	LBB0_28
## %bb.20:
	movq	_DEBUG_LVL2@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.7(%rip), %rsi
	callq	_lprintf
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	$480, %esi                      ## imm = 0x1E0
	callq	_fseek
	cmpl	$-1, %eax
	je	LBB0_21
## %bb.22:
	leaq	-112(%rbp), %rdi
	movl	$16, %esi
	movl	$1, %edx
	movq	%r14, %rcx
	callq	_fwrite
	xorl	%r12d, %r12d
	testl	%eax, %eax
	jg	LBB0_27
## %bb.23:
	movq	%r14, %rdi
	callq	_ferror
	testl	%eax, %eax
	je	LBB0_26
## %bb.24:
	movl	%eax, %r12d
	jmp	LBB0_25
LBB0_21:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
LBB0_25:
	movl	%r12d, %edi
	callq	_strerror
	leaq	L_.str.1(%rip), %rdi
	movq	-128(%rbp), %rsi                ## 8-byte Reload
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	_printf
LBB0_27:
	movq	%r13, %rdi
	callq	_fclose
LBB0_28:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_30
## %bb.29:
	movl	%r12d, %eax
	addq	$104, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_26:
	leaq	L_.str.8(%rip), %rdi
	movq	-128(%rbp), %rsi                ## 8-byte Reload
	xorl	%eax, %eax
	callq	_printf
	movl	$1, %r12d
	jmp	LBB0_27
LBB0_30:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_img_hdr,8,3                    ## @img_hdr
	.comm	_fw_version,4,2                 ## @fw_version
	.comm	_DEBUG_LVL2,4,2                 ## @DEBUG_LVL2
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	" adding img header\n"

	.comm	_EOF,4,2                        ## @EOF
L_.str.1:                               ## @.str.1
	.asciz	"output file %s: %s\n"

L_.str.2:                               ## @.str.2
	.asciz	" adding zip file\n"

L_.str.3:                               ## @.str.3
	.asciz	"rb"

	.comm	_errno,4,2                      ## @errno
L_.str.4:                               ## @.str.4
	.asciz	"input file %s: %s\n"

L_.str.5:                               ## @.str.5
	.asciz	" adding img eof byte\n"

	.comm	_img_eof,8,3                    ## @img_eof
L_.str.6:                               ## @.str.6
	.asciz	"A^gU*<>?RFY@#DR&Z"

L_.str.7:                               ## @.str.7
	.asciz	" writing md5 checksum into img header of file\n"

	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
L_.str.8:                               ## @.str.8
	.asciz	"output file %s: unspecified write error\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_create_img_file                ; -- Begin function create_img_file
	.p2align	2
_create_img_file:                       ; @create_img_file
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #176
	.cfi_def_cfa_offset 176
	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
	mov	x22, x2
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x21, _img_hdr@GOTPAGE
Lloh4:
	ldr	x21, [x21, _img_hdr@GOTPAGEOFF]
	stur	x8, [x29, #-72]
	ldr	x8, [x21]
	add	x0, x8, #50
Lloh5:
	adrp	x8, _fw_version@GOTPAGE
Lloh6:
	ldr	x8, [x8, _fw_version@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	w2, #2
	bl	_memcpy
	ldr	x8, [x21]
	add	x0, x8, #480
	mov	w1, #0
	mov	w2, #16
	bl	_memset
	add	x0, sp, #20
	bl	_md5_init
Lloh8:
	adrp	x25, _DEBUG_LVL2@GOTPAGE
Lloh9:
	ldr	x25, [x25, _DEBUG_LVL2@GOTPAGEOFF]
	ldr	w0, [x25]
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	bl	_lprintf
	mov	x23, #0
Lloh12:
	adrp	x26, _EOF@GOTPAGE
Lloh13:
	ldr	x26, [x26, _EOF@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21]
	ldrb	w0, [x8, x23]
	mov	x1, x20
	bl	_fputc
	ldr	w8, [x26]
	cmp	w0, w8
	b.eq	LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x8, [x21]
	add	x1, x8, x23
	add	x0, sp, #20
	mov	w2, #1
	bl	_md5_append
	add	x23, x23, #1
	cmp	x23, #512
	b.ne	LBB0_1
	b	LBB0_5
LBB0_3:
	mov	x0, x20
	bl	_ferror
	mov	x23, x0
	bl	_strerror
	str	x0, [sp]
Lloh14:
	adrp	x0, l_.str.1@PAGE
Lloh15:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x19
	bl	_printf
	cbz	w23, LBB0_5
; %bb.4:
                                        ; implicit-def: $x21
	b	LBB0_19
LBB0_5:
	ldr	w0, [x25]
Lloh16:
	adrp	x1, l_.str.2@PAGE
Lloh17:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_lprintf
Lloh18:
	adrp	x1, l_.str.3@PAGE
Lloh19:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x22
	bl	_fopen
	mov	x21, x0
	cbz	x0, LBB0_10
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_fgetc
	ldr	w8, [x26]
	cmp	w0, w8
	b.eq	LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	strb	w0, [sp, #19]
	and	w0, w0, #0xff
	mov	x1, x20
	bl	_fputc
	ldr	w8, [x26]
	cmp	w0, w8
	b.eq	LBB0_11
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	add	x0, sp, #20
	add	x1, sp, #19
	mov	w2, #1
	bl	_md5_append
	b	LBB0_6
LBB0_9:
	mov	w23, #0
	b	LBB0_12
LBB0_10:
Lloh20:
	adrp	x8, _errno@GOTPAGE
Lloh21:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh22:
	ldr	w23, [x8]
	mov	x0, x23
	bl	_strerror
	str	x0, [sp]
Lloh23:
	adrp	x0, l_.str.4@PAGE
Lloh24:
	add	x0, x0, l_.str.4@PAGEOFF
	mov	x1, x22
	bl	_printf
	b	LBB0_14
LBB0_11:
	mov	x0, x20
	bl	_ferror
	mov	x23, x0
	bl	_strerror
	str	x0, [sp]
Lloh25:
	adrp	x0, l_.str.1@PAGE
Lloh26:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x19
	bl	_printf
LBB0_12:
	mov	x0, x21
	bl	_ferror
	cbz	w0, LBB0_14
; %bb.13:
	mov	x24, x0
	bl	_strerror
	str	x0, [sp]
Lloh27:
	adrp	x0, l_.str.4@PAGE
Lloh28:
	add	x0, x0, l_.str.4@PAGEOFF
	mov	x1, x22
	bl	_printf
	mov	x23, x24
	b	LBB0_19
LBB0_14:
	cbnz	w23, LBB0_19
; %bb.15:
	ldr	w0, [x25]
Lloh29:
	adrp	x1, l_.str.5@PAGE
Lloh30:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_lprintf
Lloh31:
	adrp	x22, _img_eof@GOTPAGE
Lloh32:
	ldr	x22, [x22, _img_eof@GOTPAGEOFF]
	ldr	x8, [x22]
	ldrb	w0, [x8]
	mov	x1, x20
	bl	_fputc
	ldr	w8, [x26]
	cmp	w0, w8
	b.ne	LBB0_17
; %bb.16:
	mov	x0, x20
	bl	_ferror
	mov	x23, x0
	bl	_strerror
	str	x0, [sp]
Lloh33:
	adrp	x0, l_.str.1@PAGE
Lloh34:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x19
	bl	_printf
	b	LBB0_18
LBB0_17:
	mov	w23, #0
LBB0_18:
	ldr	x1, [x22]
	add	x0, sp, #20
	mov	w2, #1
	bl	_md5_append
LBB0_19:
Lloh35:
	adrp	x1, l_.str.6@PAGE
Lloh36:
	add	x1, x1, l_.str.6@PAGEOFF
	add	x0, sp, #20
	mov	w2, #17
	bl	_md5_append
	add	x0, sp, #20
	add	x1, sp, #24
	bl	_md5_finish
	cbnz	w23, LBB0_28
; %bb.20:
	ldr	w0, [x25]
Lloh37:
	adrp	x1, l_.str.7@PAGE
Lloh38:
	add	x1, x1, l_.str.7@PAGEOFF
	bl	_lprintf
Lloh39:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh40:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh41:
	ldr	w2, [x8]
	mov	x0, x20
	mov	w1, #480
	bl	_fseek
	cmn	w0, #1
	b.eq	LBB0_23
; %bb.21:
	add	x0, sp, #24
	mov	w1, #16
	mov	w2, #1
	mov	x3, x20
	bl	_fwrite
	cmp	w0, #0
	b.le	LBB0_24
; %bb.22:
	mov	w23, #0
	b	LBB0_27
LBB0_23:
Lloh42:
	adrp	x8, _errno@GOTPAGE
Lloh43:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh44:
	ldr	w23, [x8]
	b	LBB0_26
LBB0_24:
	mov	x0, x20
	bl	_ferror
	cbz	w0, LBB0_30
; %bb.25:
	mov	x23, x0
LBB0_26:
	mov	x0, x23
	bl	_strerror
	str	x0, [sp]
Lloh45:
	adrp	x0, l_.str.1@PAGE
Lloh46:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x19
	bl	_printf
LBB0_27:
	mov	x0, x21
	bl	_fclose
LBB0_28:
	ldur	x8, [x29, #-72]
Lloh47:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh48:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh49:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_31
; %bb.29:
	mov	x0, x23
	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
	add	sp, sp, #176
	ret
LBB0_30:
Lloh50:
	adrp	x0, l_.str.8@PAGE
Lloh51:
	add	x0, x0, l_.str.8@PAGEOFF
	mov	x1, x19
	bl	_printf
	mov	w23, #1
	b	LBB0_27
LBB0_31:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpAdd	Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpAdd	Lloh50, Lloh51
	.cfi_endproc
                                        ; -- End function
	.comm	_img_hdr,8,3                    ; @img_hdr
	.comm	_fw_version,4,2                 ; @fw_version
	.comm	_DEBUG_LVL2,4,2                 ; @DEBUG_LVL2
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	" adding img header\n"

	.comm	_EOF,4,2                        ; @EOF
l_.str.1:                               ; @.str.1
	.asciz	"output file %s: %s\n"

l_.str.2:                               ; @.str.2
	.asciz	" adding zip file\n"

l_.str.3:                               ; @.str.3
	.asciz	"rb"

	.comm	_errno,4,2                      ; @errno
l_.str.4:                               ; @.str.4
	.asciz	"input file %s: %s\n"

l_.str.5:                               ; @.str.5
	.asciz	" adding img eof byte\n"

	.comm	_img_eof,8,3                    ; @img_eof
l_.str.6:                               ; @.str.6
	.asciz	"A^gU*<>?RFY@#DR&Z"

l_.str.7:                               ; @.str.7
	.asciz	" writing md5 checksum into img header of file\n"

	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
l_.str.8:                               ; @.str.8
	.asciz	"output file %s: unspecified write error\n"

.subsections_via_symbols
