	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function writelabel
_writelabel:                            ## @writelabel
	.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	_disable_write@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_warnx
	movq	_stdout@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	callq	_display
LBB0_25:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	_DISKMAGIC@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_lab@GOTPCREL(%rip), %rbx
	movq	%rax, 32(%rbx)
	movq	%rax, 24(%rbx)
	movq	$0, 16(%rbx)
	movq	%rbx, %rdi
	callq	_dkcksum
	movq	%rax, 16(%rbx)
	movq	_installboot@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_4
## %bb.3:
	xorl	%eax, %eax
	callq	_readboot
LBB0_4:
	movl	(%rbx), %ecx
	testl	%ecx, %ecx
	jle	LBB0_16
## %bb.5:
	movq	8(%rbx), %r8
	movq	_lba_offset@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	cmpl	$1, %ecx
	jne	LBB0_7
## %bb.6:
	xorl	%esi, %esi
LBB0_13:
	testb	$1, %cl
	je	LBB0_16
## %bb.14:
	shlq	$4, %rsi
	cmpq	$0, 8(%r8,%rsi)
	je	LBB0_16
## %bb.15:
	addl	%edx, (%r8,%rsi)
LBB0_16:
	movq	_bootarea@GOTPCREL(%rip), %r15
	movq	_labeloffset@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	addq	(%r15), %rax
	movq	_labelsoffset@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	movslq	4(%rbx), %rdi
	imulq	%rcx, %rdi
	addq	%rax, %rdi
	movq	%rbx, %rsi
	callq	_bsd_disklabel_le_enc
	movq	_specname@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	movq	_O_RDWR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_open
	testl	%eax, %eax
	js	LBB0_17
## %bb.22:
	movl	%eax, %ebx
	movq	(%r15), %rsi
	movq	_bbsize@GOTPCREL(%rip), %r15
	movq	(%r15), %rdx
	movl	%eax, %edi
	callq	_write
	cmpq	(%r15), %rax
	jne	LBB0_23
## %bb.24:
	movl	%ebx, %edi
	callq	_close
	xorl	%ebx, %ebx
	jmp	LBB0_25
LBB0_17:
	movq	_is_file@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_19
## %bb.18:
	movl	(%r14), %esi
	leaq	L_.str.1(%rip), %rdi
	callq	_warn
	movl	$1, %ebx
	jmp	LBB0_25
LBB0_7:
	movl	%ecx, %edi
	andl	$-2, %edi
	xorl	%esi, %esi
	movq	%r8, %rax
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_8 Depth=1
	addq	$2, %rsi
	addq	$32, %rax
	cmpq	%rsi, %rdi
	je	LBB0_13
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, 8(%rax)
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	addl	%edx, (%rax)
LBB0_10:                                ##   in Loop: Header=BB0_8 Depth=1
	cmpq	$0, 24(%rax)
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_8 Depth=1
	addl	%edx, 16(%rax)
	jmp	LBB0_12
LBB0_23:
	movl	(%r14), %esi
	leaq	L_.str.6(%rip), %rdi
	callq	_warn
	movl	%ebx, %edi
	callq	_close
	movl	$1, %ebx
	jmp	LBB0_25
LBB0_19:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	leaq	L_.str.2(%rip), %rdi
	callq	_geom_class_available
	movl	(%r14), %edx
	testq	%rax, %rax
	je	LBB0_21
## %bb.20:
	leaq	L_.str.3(%rip), %rsi
	movl	%ebx, %edi
	callq	_warnc
	leaq	L_.str.4(%rip), %rdi
	callq	_warnx
	movl	$1, %ebx
	jmp	LBB0_25
LBB0_21:
	leaq	L_.str.5(%rip), %rsi
	movl	%ebx, %edi
	callq	_warnc
	movl	$1, %ebx
	jmp	LBB0_25
	.cfi_endproc
                                        ## -- End function
	.comm	_lab,40,3                       ## @lab
	.comm	_disable_write,8,3              ## @disable_write
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"write to disk label suppressed - label was as follows:"

	.comm	_stdout,4,2                     ## @stdout
	.comm	_DISKMAGIC,8,3                  ## @DISKMAGIC
	.comm	_installboot,8,3                ## @installboot
	.comm	_lba_offset,8,3                 ## @lba_offset
	.comm	_bootarea,8,3                   ## @bootarea
	.comm	_labeloffset,8,3                ## @labeloffset
	.comm	_labelsoffset,4,2               ## @labelsoffset
	.comm	_specname,4,2                   ## @specname
	.comm	_O_RDWR,4,2                     ## @O_RDWR
	.comm	_is_file,8,3                    ## @is_file
L_.str.1:                               ## @.str.1
	.asciz	"cannot open file %s for writing label"

	.comm	_errno,4,2                      ## @errno
L_.str.2:                               ## @.str.2
	.asciz	"PART"

L_.str.3:                               ## @.str.3
	.asciz	"cannot open provider %s for writing label"

L_.str.4:                               ## @.str.4
	.asciz	"Try to use gpart(8)."

L_.str.5:                               ## @.str.5
	.asciz	"%s"

	.comm	_bbsize,8,3                     ## @bbsize
L_.str.6:                               ## @.str.6
	.asciz	"write %s"

	.no_dead_strip	_writelabel
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function writelabel
_writelabel:                            ; @writelabel
	.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, _disable_write@GOTPAGE
Lloh1:
	ldr	x8, [x8, _disable_write@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_4
; %bb.1:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_warnx
Lloh5:
	adrp	x8, _stdout@GOTPAGE
Lloh6:
	ldr	x8, [x8, _stdout@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	mov	x1, #0
	bl	_display
LBB0_2:
	mov	w0, #0
LBB0_3:
	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
LBB0_4:
Lloh8:
	adrp	x8, _DISKMAGIC@GOTPAGE
Lloh9:
	ldr	x8, [x8, _DISKMAGIC@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
Lloh11:
	adrp	x19, _lab@GOTPAGE
Lloh12:
	ldr	x19, [x19, _lab@GOTPAGEOFF]
	stp	x8, x8, [x19, #24]
	str	xzr, [x19, #16]
	mov	x0, x19
	bl	_dkcksum
	str	x0, [x19, #16]
Lloh13:
	adrp	x8, _installboot@GOTPAGE
Lloh14:
	ldr	x8, [x8, _installboot@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	cbz	x8, LBB0_6
; %bb.5:
	bl	_readboot
LBB0_6:
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.7:
	ldr	x9, [x19, #8]
Lloh16:
	adrp	x10, _lba_offset@GOTPAGE
Lloh17:
	ldr	x10, [x10, _lba_offset@GOTPAGEOFF]
Lloh18:
	ldr	w10, [x10]
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	add	x9, x9, #16
	subs	x8, x8, #1
	b.eq	LBB0_11
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x9, #8]
	cbz	x11, LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	w11, [x9]
	add	w11, w11, w10
	str	w11, [x9]
	b	LBB0_8
LBB0_11:
Lloh19:
	adrp	x21, _bootarea@GOTPAGE
Lloh20:
	ldr	x21, [x21, _bootarea@GOTPAGEOFF]
	ldr	x8, [x21]
Lloh21:
	adrp	x9, _labeloffset@GOTPAGE
Lloh22:
	ldr	x9, [x9, _labeloffset@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	add	x8, x9, x8
Lloh24:
	adrp	x9, _labelsoffset@GOTPAGE
Lloh25:
	ldr	x9, [x9, _labelsoffset@GOTPAGEOFF]
Lloh26:
	ldrsw	x9, [x9]
	ldrsw	x10, [x19, #4]
	madd	x0, x10, x9, x8
	mov	x1, x19
	bl	_bsd_disklabel_le_enc
Lloh27:
	adrp	x20, _specname@GOTPAGE
Lloh28:
	ldr	x20, [x20, _specname@GOTPAGEOFF]
	ldr	w0, [x20]
Lloh29:
	adrp	x8, _O_RDWR@GOTPAGE
Lloh30:
	ldr	x8, [x8, _O_RDWR@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
	bl	_open
	tbnz	w0, #31, LBB0_14
; %bb.12:
	mov	x19, x0
	ldr	x1, [x21]
Lloh32:
	adrp	x21, _bbsize@GOTPAGE
Lloh33:
	ldr	x21, [x21, _bbsize@GOTPAGEOFF]
	ldr	x2, [x21]
	bl	_write
	ldr	x8, [x21]
	cmp	x0, x8
	b.ne	LBB0_16
; %bb.13:
	mov	x0, x19
	bl	_close
	b	LBB0_2
LBB0_14:
Lloh34:
	adrp	x8, _is_file@GOTPAGE
Lloh35:
	ldr	x8, [x8, _is_file@GOTPAGEOFF]
Lloh36:
	ldr	x8, [x8]
	cbz	x8, LBB0_17
; %bb.15:
	ldr	w1, [x20]
Lloh37:
	adrp	x0, l_.str.1@PAGE
Lloh38:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_warn
	mov	w0, #1
	b	LBB0_3
LBB0_16:
	ldr	w1, [x20]
Lloh39:
	adrp	x0, l_.str.6@PAGE
Lloh40:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_warn
	mov	x0, x19
	bl	_close
	mov	w0, #1
	b	LBB0_3
LBB0_17:
Lloh41:
	adrp	x8, _errno@GOTPAGE
Lloh42:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh43:
	ldr	w19, [x8]
Lloh44:
	adrp	x0, l_.str.2@PAGE
Lloh45:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_geom_class_available
	ldr	w2, [x20]
	cbz	x0, LBB0_19
; %bb.18:
Lloh46:
	adrp	x1, l_.str.3@PAGE
Lloh47:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_warnc
Lloh48:
	adrp	x0, l_.str.4@PAGE
Lloh49:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_warnx
	mov	w0, #1
	b	LBB0_3
LBB0_19:
Lloh50:
	adrp	x1, l_.str.5@PAGE
Lloh51:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x19
	bl	_warnc
	mov	w0, #1
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpAdd	Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpAdd	Lloh48, Lloh49
	.loh AdrpAdd	Lloh46, Lloh47
	.loh AdrpAdd	Lloh50, Lloh51
	.cfi_endproc
                                        ; -- End function
	.comm	_lab,40,3                       ; @lab
	.comm	_disable_write,8,3              ; @disable_write
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"write to disk label suppressed - label was as follows:"

	.comm	_stdout,4,2                     ; @stdout
	.comm	_DISKMAGIC,8,3                  ; @DISKMAGIC
	.comm	_installboot,8,3                ; @installboot
	.comm	_lba_offset,8,3                 ; @lba_offset
	.comm	_bootarea,8,3                   ; @bootarea
	.comm	_labeloffset,8,3                ; @labeloffset
	.comm	_labelsoffset,4,2               ; @labelsoffset
	.comm	_specname,4,2                   ; @specname
	.comm	_O_RDWR,4,2                     ; @O_RDWR
	.comm	_is_file,8,3                    ; @is_file
l_.str.1:                               ; @.str.1
	.asciz	"cannot open file %s for writing label"

	.comm	_errno,4,2                      ; @errno
l_.str.2:                               ; @.str.2
	.asciz	"PART"

l_.str.3:                               ; @.str.3
	.asciz	"cannot open provider %s for writing label"

l_.str.4:                               ; @.str.4
	.asciz	"Try to use gpart(8)."

l_.str.5:                               ; @.str.5
	.asciz	"%s"

	.comm	_bbsize,8,3                     ; @bbsize
l_.str.6:                               ; @.str.6
	.asciz	"write %s"

	.no_dead_strip	_writelabel
.subsections_via_symbols
