	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gptbootfailed                  ## -- Begin function gptbootfailed
	.p2align	4, 0x90
_gptbootfailed:                         ## @gptbootfailed
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_gpttable@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	_curent@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	movq	_GPT_ENT_ATTR_BOOTONCE@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	testl	%edx, (%rcx,%rax,4)
	je	LBB0_4
## %bb.1:
	movq	%rdi, %rbx
	movq	_hdr_primary_lba@GOTPCREL(%rip), %rcx
	cmpq	$0, (%rcx)
	jle	LBB0_3
## %bb.2:
	notl	%edx
	movq	_table_primary@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	andl	(%rcx,%rax,4), %edx
	movl	%edx, (%rcx,%rax,4)
	movq	_GPT_ENT_ATTR_BOOTFAILED@GOTPCREL(%rip), %rsi
	orl	(%rsi), %edx
	movl	%edx, (%rcx,%rax,4)
	leaq	L_.str(%rip), %rdi
	movq	_hdr_primary@GOTPCREL(%rip), %rdx
	movq	%rbx, %rsi
	callq	_gptupdate
LBB0_3:
	movq	_hdr_backup_lba@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jle	LBB0_4
## %bb.5:
	movl	(%r15), %eax
	notl	%eax
	movq	_table_backup@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%r14), %rdx
	andl	(%rcx,%rdx,4), %eax
	movl	%eax, (%rcx,%rdx,4)
	movq	_GPT_ENT_ATTR_BOOTFAILED@GOTPCREL(%rip), %rsi
	orl	(%rsi), %eax
	movl	%eax, (%rcx,%rdx,4)
	leaq	L_.str.1(%rip), %rdi
	movq	_hdr_backup@GOTPCREL(%rip), %rdx
	movq	%rbx, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_gptupdate                      ## TAILCALL
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_gpttable,8,3                   ## @gpttable
	.comm	_curent,8,3                     ## @curent
	.comm	_GPT_ENT_ATTR_BOOTONCE,4,2      ## @GPT_ENT_ATTR_BOOTONCE
	.comm	_hdr_primary_lba,8,3            ## @hdr_primary_lba
	.comm	_table_primary,8,3              ## @table_primary
	.comm	_GPT_ENT_ATTR_BOOTFAILED,4,2    ## @GPT_ENT_ATTR_BOOTFAILED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"primary"

	.comm	_hdr_primary,4,2                ## @hdr_primary
	.comm	_hdr_backup_lba,8,3             ## @hdr_backup_lba
	.comm	_table_backup,8,3               ## @table_backup
L_.str.1:                               ## @.str.1
	.asciz	"backup"

	.comm	_hdr_backup,4,2                 ## @hdr_backup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gptbootfailed                  ; -- Begin function gptbootfailed
	.p2align	2
_gptbootfailed:                         ; @gptbootfailed
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
Lloh0:
	adrp	x8, _gpttable@GOTPAGE
Lloh1:
	ldr	x8, [x8, _gpttable@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x8]
Lloh3:
	adrp	x20, _curent@GOTPAGE
Lloh4:
	ldr	x20, [x20, _curent@GOTPAGEOFF]
	ldr	x8, [x20]
	ldr	w10, [x9, x8, lsl #2]
Lloh5:
	adrp	x21, _GPT_ENT_ATTR_BOOTONCE@GOTPAGE
Lloh6:
	ldr	x21, [x21, _GPT_ENT_ATTR_BOOTONCE@GOTPAGEOFF]
	ldr	w9, [x21]
	tst	w9, w10
	b.eq	LBB0_5
; %bb.1:
	mov	x19, x0
Lloh7:
	adrp	x10, _hdr_primary_lba@GOTPAGE
Lloh8:
	ldr	x10, [x10, _hdr_primary_lba@GOTPAGEOFF]
Lloh9:
	ldr	x10, [x10]
Lloh10:
	adrp	x22, _GPT_ENT_ATTR_BOOTFAILED@GOTPAGE
Lloh11:
	ldr	x22, [x22, _GPT_ENT_ATTR_BOOTFAILED@GOTPAGEOFF]
	cmp	x10, #1
	b.lt	LBB0_3
; %bb.2:
Lloh12:
	adrp	x10, _table_primary@GOTPAGE
Lloh13:
	ldr	x10, [x10, _table_primary@GOTPAGEOFF]
Lloh14:
	ldr	x3, [x10]
	lsl	x8, x8, #2
	ldr	w10, [x3, x8]
	bic	w9, w10, w9
	str	w9, [x3, x8]
	ldr	w10, [x22]
	orr	w9, w10, w9
	str	w9, [x3, x8]
Lloh15:
	adrp	x0, l_.str@PAGE
Lloh16:
	add	x0, x0, l_.str@PAGEOFF
Lloh17:
	adrp	x2, _hdr_primary@GOTPAGE
Lloh18:
	ldr	x2, [x2, _hdr_primary@GOTPAGEOFF]
	mov	x1, x19
	bl	_gptupdate
LBB0_3:
Lloh19:
	adrp	x8, _hdr_backup_lba@GOTPAGE
Lloh20:
	ldr	x8, [x8, _hdr_backup_lba@GOTPAGEOFF]
Lloh21:
	ldr	x8, [x8]
	cmp	x8, #1
	b.lt	LBB0_5
; %bb.4:
	ldr	w8, [x21]
Lloh22:
	adrp	x9, _table_backup@GOTPAGE
Lloh23:
	ldr	x9, [x9, _table_backup@GOTPAGEOFF]
Lloh24:
	ldr	x3, [x9]
	ldr	x9, [x20]
	lsl	x9, x9, #2
	ldr	w10, [x3, x9]
	bic	w8, w10, w8
	str	w8, [x3, x9]
	ldr	w10, [x22]
	orr	w8, w10, w8
	str	w8, [x3, x9]
Lloh25:
	adrp	x0, l_.str.1@PAGE
Lloh26:
	add	x0, x0, l_.str.1@PAGEOFF
Lloh27:
	adrp	x2, _hdr_backup@GOTPAGE
Lloh28:
	ldr	x2, [x2, _hdr_backup@GOTPAGEOFF]
	mov	x1, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_gptupdate
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_gpttable,8,3                   ; @gpttable
	.comm	_curent,8,3                     ; @curent
	.comm	_GPT_ENT_ATTR_BOOTONCE,4,2      ; @GPT_ENT_ATTR_BOOTONCE
	.comm	_hdr_primary_lba,8,3            ; @hdr_primary_lba
	.comm	_table_primary,8,3              ; @table_primary
	.comm	_GPT_ENT_ATTR_BOOTFAILED,4,2    ; @GPT_ENT_ATTR_BOOTFAILED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"primary"

	.comm	_hdr_primary,4,2                ; @hdr_primary
	.comm	_hdr_backup_lba,8,3             ; @hdr_backup_lba
	.comm	_table_backup,8,3               ; @table_backup
l_.str.1:                               ; @.str.1
	.asciz	"backup"

	.comm	_hdr_backup,4,2                 ; @hdr_backup
.subsections_via_symbols
