	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function generate_factory_image
_generate_factory_image:                ## @generate_factory_image
	.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	%rdx, %r13
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	$6164, (%rdx)                   ## imm = 0x1814
	cmpq	$0, 8(%rsi)
	je	LBB0_1
## %bb.2:
	movl	$6164, %ebx                     ## imm = 0x1814
	movq	%r14, %rax
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	addq	(%rax), %rbx
	movq	%rbx, (%r13)
	cmpq	$0, 24(%rax)
	leaq	16(%rax), %rax
	jne	LBB0_3
	jmp	LBB0_4
LBB0_1:
	movl	$6164, %ebx                     ## imm = 0x1814
LBB0_4:
	movq	%rbx, %rdi
	callq	_malloc
	movq	%rax, %r12
	testq	%rax, %rax
	jne	LBB0_6
## %bb.5:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movl	$1, %edi
	callq	_error
	movq	(%r13), %rbx
LBB0_6:
	movq	%r12, %rdi
	movl	$255, %esi
	movq	%rbx, %rdx
	callq	_memset
	movq	(%r13), %rsi
	movq	%r12, %rdi
	callq	_put32
	movl	4(%r15), %edi
	testl	%edi, %edi
	je	LBB0_8
## %bb.7:
	callq	_strlen
	movq	%rax, %rbx
	leaq	20(%r12), %rdi
	movq	%rax, %rsi
	callq	_put32
	leaq	24(%r12), %rdi
	movl	4(%r15), %esi
	movq	%rbx, %rdx
	callq	_memcpy
LBB0_8:
	leaq	4116(%r12), %rdi
	movl	(%r15), %esi
	movq	%r14, %rdx
	callq	_put_partitions
	leaq	4(%r12), %rdi
	movq	%r12, %rsi
	addq	$20, %rsi
	movq	(%r13), %rdx
	addq	$-20, %rdx
	callq	_put_md5
	movq	%r12, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_errno,4,2                      ## @errno
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"malloc"

	.no_dead_strip	_generate_factory_image
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function generate_factory_image
_generate_factory_image:                ; @generate_factory_image
	.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
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	mov	w23, #6164
	str	x23, [x2]
	ldr	x8, [x1, #8]
	cbz	x8, LBB0_3
; %bb.1:
	mov	w23, #6164
	mov	x8, x20
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x8]
	add	x23, x23, x9
	str	x23, [x19]
	ldr	x9, [x8, #24]
	add	x8, x8, #16
	cbnz	x9, LBB0_2
LBB0_3:
	mov	x0, x23
	bl	_malloc
	mov	x22, x0
	cbnz	x0, LBB0_5
; %bb.4:
Lloh0:
	adrp	x8, _errno@GOTPAGE
Lloh1:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	mov	w0, #1
	bl	_error
	ldr	x23, [x19]
LBB0_5:
	mov	x0, x22
	mov	w1, #255
	mov	x2, x23
	bl	_memset
	ldr	x1, [x19]
	mov	x0, x22
	bl	_put32
	ldr	w0, [x21, #4]
	cbz	w0, LBB0_7
; %bb.6:
	bl	_strlen
	mov	x23, x0
	add	x0, x22, #20
	mov	x1, x23
	bl	_put32
	add	x0, x22, #24
	ldr	w1, [x21, #4]
	mov	x2, x23
	bl	_memcpy
LBB0_7:
	mov	w8, #4116
	add	x0, x22, x8
	ldr	w1, [x21]
	mov	x2, x20
	bl	_put_partitions
	add	x0, x22, #4
	add	x1, x22, #20
	ldr	x8, [x19]
	sub	x2, x8, #20
	bl	_put_md5
	mov	x0, x22
	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
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_errno,4,2                      ; @errno
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"malloc"

	.no_dead_strip	_generate_factory_image
.subsections_via_symbols
