	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gptbootconv
_gptbootconv:                           ## @gptbootconv
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r8
	movq	%rsi, -104(%rbp)                ## 8-byte Spill
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movq	_DEV_BSIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cltd
	idivl	(%r8)
	movl	%eax, %r9d
	movl	16(%r8), %eax
	cltd
	idivl	%r9d
	testl	%eax, %eax
	jle	LBB0_16
## %bb.1:
	movq	8(%r8), %rbx
	movslq	%r9d, %r10
	movl	%r9d, %eax
	leaq	20(%rcx), %r12
	imulq	$56, %r10, %r11
	imulq	$56, %rax, %r15
	xorl	%edi, %edi
	movq	_GPT_ENT_ATTR_BOOTFAILED@GOTPCREL(%rip), %r14
	xorl	%r13d, %r13d
	movq	%r8, -96(%rbp)                  ## 8-byte Spill
	movq	%rcx, -88(%rbp)                 ## 8-byte Spill
	movl	%r9d, -44(%rbp)                 ## 4-byte Spill
	movq	%r10, -80(%rbp)                 ## 8-byte Spill
	movq	%r11, -72(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-112(%rbp), %rbx                ## 8-byte Reload
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	addq	%r10, %rdi
	movl	16(%r8), %esi
	movl	%esi, %eax
	cltd
	idivl	%r9d
	cltq
	addq	8(%r8), %rax
	addq	%r11, %r12
	cmpq	%rax, %rbx
	jge	LBB0_14
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	testl	%r9d, %r9d
	jle	LBB0_13
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, -112(%rbp)                ## 8-byte Spill
	xorl	%eax, %eax
	xorl	%ebx, %ebx
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=2
	addq	$56, %rax
	cmpq	%rax, %r15
	je	LBB0_7
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r12,%rax), %edx
	movq	_GPT_ENT_ATTR_BOOTONCE@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	movq	_GPT_ENT_ATTR_BOOTME@GOTPCREL(%rip), %rdi
	movl	(%rdi), %edi
	orl	%esi, %edi
	orl	(%r14), %edi
	andl	%edx, %edi
	cmpl	%esi, %edi
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=2
	notl	%esi
	andl	%esi, %edx
	movl	%edx, (%r12,%rax)
	orl	(%r14), %edx
	movl	%edx, (%r12,%rax)
	movl	$1, %r13d
	movl	$1, %ebx
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	testl	%ebx, %ebx
	je	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	imulq	$56, -56(%rbp), %rdi            ## 8-byte Folded Reload
	addq	%rcx, %rdi
	movq	_secbuf@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	_DEV_BSIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_bcopy
	movl	(%rbx), %esi
	movq	-104(%rbp), %rdi                ## 8-byte Reload
	movq	-112(%rbp), %rbx                ## 8-byte Reload
	movq	%rbx, %rdx
	movl	$1, %ecx
	callq	_drvwrite
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	_BOOTPROG@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	leaq	L_.str(%rip), %rdi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	callq	_printf
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	-96(%rbp), %r8                  ## 8-byte Reload
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movl	-44(%rbp), %r9d                 ## 4-byte Reload
	movq	-80(%rbp), %r10                 ## 8-byte Reload
	movq	-72(%rbp), %r11                 ## 8-byte Reload
	jmp	LBB0_12
LBB0_14:
	testl	%r13d, %r13d
	je	LBB0_16
## %bb.15:
	imull	(%r8), %esi
	movq	%rcx, %rdi
	movq	%r8, %rbx
	callq	_crc32
	movq	%rax, 48(%rbx)
	movq	$0, 40(%rbx)
	movl	24(%rbx), %esi
	movq	%rbx, %rdi
	callq	_crc32
	movq	%rax, 40(%rbx)
	movq	_secbuf@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	movq	_DEV_BSIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_bzero
	movl	(%r14), %esi
	movl	24(%rbx), %edx
	movq	%rbx, %rdi
	callq	_bcopy
	movl	(%r14), %esi
	movq	32(%rbx), %rdx
	movq	-104(%rbp), %rdi                ## 8-byte Reload
	movl	$1, %ecx
	callq	_drvwrite
	testq	%rax, %rax
	je	LBB0_16
## %bb.17:
	movq	_BOOTPROG@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	leaq	L_.str.1(%rip), %rdi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_printf                         ## TAILCALL
LBB0_16:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DEV_BSIZE,4,2                  ## @DEV_BSIZE
	.comm	_GPT_ENT_ATTR_BOOTME,4,2        ## @GPT_ENT_ATTR_BOOTME
	.comm	_GPT_ENT_ATTR_BOOTONCE,4,2      ## @GPT_ENT_ATTR_BOOTONCE
	.comm	_GPT_ENT_ATTR_BOOTFAILED,4,2    ## @GPT_ENT_ATTR_BOOTFAILED
	.comm	_secbuf,4,2                     ## @secbuf
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: unable to update %s GPT partition table\n"

	.comm	_BOOTPROG,8,3                   ## @BOOTPROG
L_.str.1:                               ## @.str.1
	.asciz	"%s: unable to update %s GPT header\n"

	.no_dead_strip	_gptbootconv
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gptbootconv
_gptbootconv:                           ; @gptbootconv
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	str	x1, [sp, #40]                   ; 8-byte Folded Spill
	str	x0, [sp, #8]                    ; 8-byte Folded Spill
Lloh0:
	adrp	x8, _DEV_BSIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DEV_BSIZE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	w9, [x2]
	sdiv	w28, w8, w9
	ldr	w8, [x2, #16]
	sdiv	w8, w8, w28
	cmp	w8, #1
	b.lt	LBB0_15
; %bb.1:
	mov	x20, x2
	mov	x26, #0
	mov	w25, #0
	ldr	x23, [x2, #8]
	mov	x8, x28
	sxtw	x15, w8
	add	x19, x3, #20
	mov	w8, #56
	smull	x16, w28, w8
Lloh3:
	adrp	x27, _GPT_ENT_ATTR_BOOTME@GOTPAGE
Lloh4:
	ldr	x27, [x27, _GPT_ENT_ATTR_BOOTME@GOTPAGEOFF]
Lloh5:
	adrp	x22, _GPT_ENT_ATTR_BOOTONCE@GOTPAGE
Lloh6:
	ldr	x22, [x22, _GPT_ENT_ATTR_BOOTONCE@GOTPAGEOFF]
Lloh7:
	adrp	x24, _GPT_ENT_ATTR_BOOTFAILED@GOTPAGE
Lloh8:
	ldr	x24, [x24, _GPT_ENT_ATTR_BOOTFAILED@GOTPAGEOFF]
	stp	x15, x2, [sp, #24]              ; 16-byte Folded Spill
	str	x16, [sp, #16]                  ; 8-byte Folded Spill
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x3, x21
	ldp	x15, x20, [sp, #24]             ; 16-byte Folded Reload
	ldr	x16, [sp, #16]                  ; 8-byte Folded Reload
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x23, x23, #1
	add	x26, x26, x15
	ldr	x9, [x20, #8]
	ldr	w8, [x20, #16]
	sdiv	w10, w8, w28
	add	x9, x9, w10, sxtw
	add	x19, x19, x16
	cmp	x23, x9
	b.ge	LBB0_12
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
	cmp	w28, #1
	b.lt	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w10, #0
	mov	x8, x28
	mov	x9, x19
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=2
	add	x9, x9, #56
	subs	x8, x8, #1
	b.eq	LBB0_9
LBB0_7:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w11, [x9]
	ldr	w13, [x27]
	ldr	w12, [x22]
	orr	w13, w12, w13
	ldr	w14, [x24]
	orr	w13, w13, w14
	and	w13, w13, w11
	cmp	w13, w12
	b.ne	LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=2
	bic	w10, w11, w12
	str	w10, [x9]
	ldr	w11, [x24]
	orr	w10, w11, w10
	str	w10, [x9]
	mov	w25, #1
	mov	w10, #1
	b	LBB0_6
LBB0_9:                                 ;   in Loop: Header=BB0_4 Depth=1
	cbz	w10, LBB0_3
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x21, x3
	mov	w8, #56
	madd	x0, x26, x8, x3
Lloh9:
	adrp	x20, _secbuf@GOTPAGE
Lloh10:
	ldr	x20, [x20, _secbuf@GOTPAGEOFF]
	ldr	w1, [x20]
Lloh11:
	adrp	x8, _DEV_BSIZE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _DEV_BSIZE@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	bl	_bcopy
	ldr	w1, [x20]
	ldr	x0, [sp, #40]                   ; 8-byte Folded Reload
	mov	x2, x23
	mov	w3, #1
	bl	_drvwrite
	cbz	x0, LBB0_2
; %bb.11:                               ;   in Loop: Header=BB0_4 Depth=1
Lloh14:
	adrp	x8, _BOOTPROG@GOTPAGE
Lloh15:
	ldr	x8, [x8, _BOOTPROG@GOTPAGEOFF]
Lloh16:
	ldr	x1, [x8]
Lloh17:
	adrp	x0, l_.str@PAGE
Lloh18:
	add	x0, x0, l_.str@PAGEOFF
	ldr	x2, [sp, #8]                    ; 8-byte Folded Reload
	bl	_printf
	b	LBB0_2
LBB0_12:
	cbz	w25, LBB0_15
; %bb.13:
	ldr	w9, [x20]
	mul	w1, w9, w8
	mov	x0, x3
	bl	_crc32
	stp	xzr, x0, [x20, #40]
	ldr	w1, [x20, #24]
	mov	x0, x20
	bl	_crc32
	str	x0, [x20, #40]
Lloh19:
	adrp	x19, _secbuf@GOTPAGE
Lloh20:
	ldr	x19, [x19, _secbuf@GOTPAGEOFF]
	ldr	w0, [x19]
Lloh21:
	adrp	x8, _DEV_BSIZE@GOTPAGE
Lloh22:
	ldr	x8, [x8, _DEV_BSIZE@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	bl	_bzero
	ldr	w1, [x19]
	ldr	w2, [x20, #24]
	mov	x0, x20
	bl	_bcopy
	ldr	w1, [x19]
	ldr	x2, [x20, #32]
	ldr	x0, [sp, #40]                   ; 8-byte Folded Reload
	mov	w3, #1
	bl	_drvwrite
	cbz	x0, LBB0_15
; %bb.14:
Lloh24:
	adrp	x8, _BOOTPROG@GOTPAGE
Lloh25:
	ldr	x8, [x8, _BOOTPROG@GOTPAGEOFF]
Lloh26:
	ldr	x1, [x8]
Lloh27:
	adrp	x0, l_.str.1@PAGE
Lloh28:
	add	x0, x0, l_.str.1@PAGEOFF
	ldr	x2, [sp, #8]                    ; 8-byte Folded Reload
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	b	_printf
LBB0_15:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_DEV_BSIZE,4,2                  ; @DEV_BSIZE
	.comm	_GPT_ENT_ATTR_BOOTME,4,2        ; @GPT_ENT_ATTR_BOOTME
	.comm	_GPT_ENT_ATTR_BOOTONCE,4,2      ; @GPT_ENT_ATTR_BOOTONCE
	.comm	_GPT_ENT_ATTR_BOOTFAILED,4,2    ; @GPT_ENT_ATTR_BOOTFAILED
	.comm	_secbuf,4,2                     ; @secbuf
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: unable to update %s GPT partition table\n"

	.comm	_BOOTPROG,8,3                   ; @BOOTPROG
l_.str.1:                               ; @.str.1
	.asciz	"%s: unable to update %s GPT header\n"

	.no_dead_strip	_gptbootconv
.subsections_via_symbols
