	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_partition_table
_read_partition_table:                  ## @read_partition_table
	.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	$2136, %rsp                     ## imm = 0x858
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r15
	movq	%rdx, %r13
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	testl	%r8d, %r8d
	je	LBB0_3
## %bb.1:
	cmpl	$1, %r8d
	jne	LBB0_4
## %bb.2:
	leaq	L_.str.1(%rip), %rax
	movq	%rax, -2136(%rbp)               ## 8-byte Spill
	jmp	LBB0_5
LBB0_3:
	leaq	L_.str(%rip), %rax
	movq	%rax, -2136(%rbp)               ## 8-byte Spill
	jmp	LBB0_5
LBB0_4:
	leaq	L_.str.2(%rip), %rdx
	xorl	%eax, %eax
	movq	%rax, -2136(%rbp)               ## 8-byte Spill
	movl	$1, %edi
	xorl	%esi, %esi
	callq	_error
LBB0_5:
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_fseek
	testq	%rax, %rax
	jns	LBB0_7
## %bb.6:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.3(%rip), %rdx
	movl	$1, %edi
	callq	_error
LBB0_7:
	leaq	-2096(%rbp), %rdi
	movl	$2048, %esi                     ## imm = 0x800
	movl	$1, %edx
	movq	%rbx, %rcx
	callq	_fread
	cmpl	$1, %eax
	je	LBB0_9
## %bb.8:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.4(%rip), %rdx
	movl	$1, %edi
	callq	_error
LBB0_9:
	movb	$0, -49(%rbp)
	movq	-2136(%rbp), %rbx               ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_strlen
	leaq	-2096(%rbp), %r12
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_memcmp
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.5(%rip), %rsi
	callq	_fprintf
	movl	$1, %ecx
	jmp	LBB0_29
LBB0_11:
	movq	%rbx, %rdi
	callq	_strlen
	xorl	%ecx, %ecx
	cmpl	$2047, %eax                     ## imm = 0x7FF
	jg	LBB0_29
## %bb.12:
	movq	%r13, -2152(%rbp)               ## 8-byte Spill
	movq	%r15, -2160(%rbp)               ## 8-byte Spill
	leaq	-48(%rbp), %r14
	movq	-2136(%rbp), %rbx               ## 8-byte Reload
	jmp	LBB0_15
LBB0_25:                                ##   in Loop: Header=BB0_15 Depth=1
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$1, %edi
	leaq	L_.str.6(%rip), %rdx
	callq	_error
LBB0_13:                                ##   in Loop: Header=BB0_15 Depth=1
	movq	%r12, %r14
LBB0_14:                                ##   in Loop: Header=BB0_15 Depth=1
	movq	-2136(%rbp), %rbx               ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_strlen
	cltq
	addq	%r14, %rax
	movq	%r14, %r12
	leaq	-48(%rbp), %r14
	cmpq	%r14, %rax
	jae	LBB0_28
LBB0_15:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_21 Depth 2
	movq	%rbx, %rdi
	callq	_strlen
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_memcmp
	testq	%rax, %rax
	jne	LBB0_28
## %bb.16:                              ##   in Loop: Header=BB0_15 Depth=1
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -2112(%rbp)
	movaps	%xmm0, -2128(%rbp)
	movl	%r14d, %edx
	subl	%r12d, %edx
	movq	%r12, %rdi
	movl	$10, %esi
	callq	_memchr
	testq	%rax, %rax
	je	LBB0_28
## %bb.17:                              ##   in Loop: Header=BB0_15 Depth=1
	movq	%rax, %r15
	cmpq	%r12, %rax
	jbe	LBB0_13
## %bb.18:                              ##   in Loop: Header=BB0_15 Depth=1
	leaq	1(%r15), %rax
	movq	%rax, -2168(%rbp)               ## 8-byte Spill
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	movq	%rax, -2144(%rbp)               ## 8-byte Spill
	leaq	LJTI0_0(%rip), %rbx
	jmp	LBB0_21
	.p2align	4, 0x90
LBB0_19:                                ##   in Loop: Header=BB0_21 Depth=2
	movq	%r14, %rbx
	subq	%r12, %rbx
	cmpq	$31, %rbx
	movl	$31, %eax
	cmovgeq	%rax, %rbx
	leaq	-2128(%rbp), %rdi
	movq	%r12, %rsi
	movl	%ebx, %edx
	callq	_strncpy
	movslq	%ebx, %rax
	leaq	LJTI0_0(%rip), %rbx
	movb	$0, -2128(%rbp,%rax)
LBB0_20:                                ##   in Loop: Header=BB0_21 Depth=2
	incq	%r14
	incl	%r13d
	movq	%r14, %r12
	cmpq	%r14, %r15
	jbe	LBB0_14
LBB0_21:                                ##   Parent Loop BB0_15 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%r15d, %edx
	subl	%r12d, %edx
	movq	%r12, %rdi
	movl	$32, %esi
	callq	_memchr
	testq	%rax, %rax
	je	LBB0_25
## %bb.22:                              ##   in Loop: Header=BB0_21 Depth=2
	cmpl	$4, %r13d
	ja	LBB0_13
## %bb.23:                              ##   in Loop: Header=BB0_21 Depth=2
	movq	%rax, %r14
	movl	%r13d, %eax
	movslq	(%rbx,%rax,4), %rax
	addq	%rbx, %rax
	jmpq	*%rax
LBB0_24:                                ##   in Loop: Header=BB0_21 Depth=2
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_strtoul
	movq	%rax, -2144(%rbp)               ## 8-byte Spill
	jmp	LBB0_20
LBB0_27:                                ##   in Loop: Header=BB0_15 Depth=1
	incq	%r14
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_strtoul
	movq	-2152(%rbp), %rdi               ## 8-byte Reload
	movq	-2160(%rbp), %rsi               ## 8-byte Reload
	leaq	-2128(%rbp), %rdx
	movq	-2144(%rbp), %rcx               ## 8-byte Reload
	movq	%rax, %r8
	callq	_add_flash_partition
	movq	-2168(%rbp), %r14               ## 8-byte Reload
	jmp	LBB0_14
LBB0_28:
	xorl	%ecx, %ecx
LBB0_29:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_31
## %bb.30:
	movl	%ecx, %eax
	addq	$2136, %rsp                     ## imm = 0x858
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_31:
	callq	___stack_chk_fail
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_20, LBB0_20-LJTI0_0
.set L0_0_set_19, LBB0_19-LJTI0_0
.set L0_0_set_24, LBB0_24-LJTI0_0
.set L0_0_set_27, LBB0_27-LJTI0_0
LJTI0_0:
	.long	L0_0_set_20
	.long	L0_0_set_19
	.long	L0_0_set_20
	.long	L0_0_set_24
	.long	L0_0_set_27
	.end_data_region
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"fwup-ptn"

L_.str.1:                               ## @.str.1
	.asciz	"partition"

L_.str.2:                               ## @.str.2
	.asciz	"Invalid partition table"

	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
	.comm	_errno,4,2                      ## @errno
L_.str.3:                               ## @.str.3
	.asciz	"Can not seek in the firmware"

L_.str.4:                               ## @.str.4
	.asciz	"Can not read fwup-ptn from the firmware"

	.comm	_stderr,4,2                     ## @stderr
L_.str.5:                               ## @.str.5
	.asciz	"DEBUG: can not find fwuphdr\n"

L_.str.6:                               ## @.str.6
	.asciz	"Ignoring the rest of the partition entries."

	.no_dead_strip	_read_partition_table
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_partition_table
_read_partition_table:                  ; @read_partition_table
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	sub	sp, sp, #2112
	mov	x20, x3
	mov	x24, x2
	mov	x23, x1
	mov	x22, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-96]
	cbz	w4, LBB0_3
; %bb.1:
	cmp	w4, #1
	b.ne	LBB0_4
; %bb.2:
Lloh3:
	adrp	x21, l_.str.1@PAGE
Lloh4:
	add	x21, x21, l_.str.1@PAGEOFF
	b	LBB0_5
LBB0_3:
Lloh5:
	adrp	x21, l_.str@PAGE
Lloh6:
	add	x21, x21, l_.str@PAGEOFF
	b	LBB0_5
LBB0_4:
Lloh7:
	adrp	x2, l_.str.2@PAGE
Lloh8:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	w0, #1
	mov	w1, #0
	bl	_error
	mov	x21, #0
LBB0_5:
Lloh9:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	mov	x0, x22
	mov	x1, x23
	bl	_fseek
	tbz	x0, #63, LBB0_7
; %bb.6:
Lloh12:
	adrp	x8, _errno@GOTPAGE
Lloh13:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
Lloh15:
	adrp	x2, l_.str.3@PAGE
Lloh16:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	w0, #1
	bl	_error
LBB0_7:
	add	x0, sp, #48
	mov	w1, #2048
	mov	w2, #1
	mov	x3, x22
	bl	_fread
	cmp	w0, #1
	b.eq	LBB0_9
; %bb.8:
Lloh17:
	adrp	x8, _errno@GOTPAGE
Lloh18:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
Lloh20:
	adrp	x2, l_.str.4@PAGE
Lloh21:
	add	x2, x2, l_.str.4@PAGEOFF
	mov	w0, #1
	bl	_error
LBB0_9:
	strb	wzr, [sp, #2095]
	mov	x0, x21
	bl	_strlen
	mov	x2, x0
	add	x19, sp, #48
	add	x0, sp, #48
	mov	x1, x21
	bl	_memcmp
	cbz	x0, LBB0_11
; %bb.10:
Lloh22:
	adrp	x8, _stderr@GOTPAGE
Lloh23:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
Lloh25:
	adrp	x1, l_.str.5@PAGE
Lloh26:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_fprintf
	mov	w0, #1
	b	LBB0_27
LBB0_11:
	mov	x0, x21
	bl	_strlen
	cmp	w0, #2047
	b.gt	LBB0_26
; %bb.12:
	stp	x24, x20, [sp]                  ; 16-byte Folded Spill
	add	x28, x19, #2048
	add	x23, sp, #48
Lloh27:
	adrp	x20, lJTI0_0@PAGE
Lloh28:
	add	x20, x20, lJTI0_0@PAGEOFF
	b	LBB0_15
LBB0_13:                                ;   in Loop: Header=BB0_15 Depth=1
Lloh29:
	adrp	x8, _errno@GOTPAGE
Lloh30:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
	mov	w0, #1
Lloh32:
	adrp	x2, l_.str.6@PAGE
Lloh33:
	add	x2, x2, l_.str.6@PAGEOFF
	bl	_error
LBB0_14:                                ;   in Loop: Header=BB0_15 Depth=1
	mov	x0, x21
	bl	_strlen
	add	x8, x23, w0, sxtw
	cmp	x8, x28
	b.hs	LBB0_26
LBB0_15:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_21 Depth 2
	mov	x0, x21
	bl	_strlen
	mov	x2, x0
	mov	x0, x23
	mov	x1, x21
	bl	_memcmp
	cbnz	x0, LBB0_26
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [sp, #16]
	sub	w2, w28, w23
	mov	x0, x23
	mov	w1, #10
	bl	_memchr
	cbz	x0, LBB0_27
; %bb.17:                               ;   in Loop: Header=BB0_15 Depth=1
	mov	x24, x0
	cmp	x0, x23
	b.ls	LBB0_14
; %bb.18:                               ;   in Loop: Header=BB0_15 Depth=1
	mov	w19, #0
	mov	x25, #0
	add	x22, x24, #1
	b	LBB0_21
LBB0_19:                                ;   in Loop: Header=BB0_21 Depth=2
	sub	x8, x26, x23
	cmp	x8, #31
	mov	w9, #31
	csel	x27, x8, x9, lt
	add	x0, sp, #16
	mov	x1, x23
	mov	x2, x27
	bl	_strncpy
	add	x8, sp, #16
	strb	wzr, [x8, w27, sxtw]
LBB0_20:                                ;   in Loop: Header=BB0_21 Depth=2
	add	x23, x26, #1
	add	w19, w19, #1
	cmp	x24, x23
	b.ls	LBB0_14
LBB0_21:                                ;   Parent Loop BB0_15 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	sub	w2, w24, w23
	mov	x0, x23
	mov	w1, #32
	bl	_memchr
	cbz	x0, LBB0_13
; %bb.22:                               ;   in Loop: Header=BB0_21 Depth=2
	cmp	w19, #4
	b.hi	LBB0_14
; %bb.23:                               ;   in Loop: Header=BB0_21 Depth=2
	mov	x26, x0
	mov	w8, w19
	adr	x9, LBB0_19
	ldrb	w10, [x20, x8]
	add	x9, x9, x10, lsl #2
	br	x9
LBB0_24:                                ;   in Loop: Header=BB0_21 Depth=2
	mov	x0, x23
	mov	x1, #0
	mov	w2, #16
	bl	_strtoul
	mov	x25, x0
	b	LBB0_20
LBB0_25:                                ;   in Loop: Header=BB0_15 Depth=1
	add	x0, x26, #1
	mov	x1, #0
	mov	w2, #16
	bl	_strtoul
	mov	x4, x0
	add	x2, sp, #16
	ldp	x0, x1, [sp]                    ; 16-byte Folded Reload
	mov	x3, x25
	bl	_add_flash_partition
	mov	x23, x22
	b	LBB0_14
LBB0_26:
	mov	w0, #0
LBB0_27:
	ldur	x8, [x29, #-96]
Lloh34:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh35:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh36:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_29
; %bb.28:
	add	sp, sp, #2112
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_29:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_20-LBB0_19)>>2
	.byte	(LBB0_19-LBB0_19)>>2
	.byte	(LBB0_20-LBB0_19)>>2
	.byte	(LBB0_24-LBB0_19)>>2
	.byte	(LBB0_25-LBB0_19)>>2
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"fwup-ptn"

l_.str.1:                               ; @.str.1
	.asciz	"partition"

l_.str.2:                               ; @.str.2
	.asciz	"Invalid partition table"

	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
	.comm	_errno,4,2                      ; @errno
l_.str.3:                               ; @.str.3
	.asciz	"Can not seek in the firmware"

l_.str.4:                               ; @.str.4
	.asciz	"Can not read fwup-ptn from the firmware"

	.comm	_stderr,4,2                     ; @stderr
l_.str.5:                               ; @.str.5
	.asciz	"DEBUG: can not find fwuphdr\n"

l_.str.6:                               ; @.str.6
	.asciz	"Ignoring the rest of the partition entries."

	.no_dead_strip	_read_partition_table
.subsections_via_symbols
