	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function write_label
_write_label:                           ## @write_label
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r12
	movq	%rsi, -80(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MAXPATHLEN@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	%r15, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -56(%rbp)                 ## 8-byte Spill
	movq	_SUN_BOOTSIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -88(%rbp)                 ## 8-byte Spill
	movq	_SUN_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	%r13, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	movq	_SUN_DKMAGIC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	movq	%rbx, %rdi
	callq	_check_label
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_errx
LBB0_2:
	movq	%r14, %rdi
	movl	%r13d, %esi
	callq	_bzero
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_sunlabel_enc
	movq	_nflag@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_5
## %bb.3:
	movq	_stdout@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	callq	_print_label
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_35
## %bb.4:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	_Bflag@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_13
## %bb.6:
	movq	_O_RDONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_open
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	testl	%eax, %eax
	jns	LBB0_8
## %bb.7:
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	movq	%r12, %rdx
	xorl	%eax, %eax
	callq	_err
LBB0_8:
	movl	-60(%rbp), %edi                 ## 4-byte Reload
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_read
	testl	%eax, %eax
	jns	LBB0_10
## %bb.9:
	leaq	L_.str.2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_err
	jmp	LBB0_12
LBB0_35:
	callq	___stack_chk_fail
LBB0_10:
	cmpl	-72(%rbp), %eax                 ## 4-byte Folded Reload
	je	LBB0_12
## %bb.11:
	leaq	L_.str.3(%rip), %rsi
	movl	$1, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_errx
LBB0_12:
	movl	-60(%rbp), %edi                 ## 4-byte Reload
	callq	_close
LBB0_13:
	movq	__PATH_DEV@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	leaq	L_.str.4(%rip), %rdx
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	movl	%r15d, %esi
	movq	-80(%rbp), %r8                  ## 8-byte Reload
	callq	_snprintf
	movq	_O_RDWR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_open
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	testl	%eax, %eax
	jns	LBB0_20
## %bb.14:
	xorl	%eax, %eax
	callq	_gctl_get_handle
	movq	%rax, %rbx
	leaq	L_.str.5(%rip), %rsi
	leaq	L_.str.6(%rip), %rcx
	movq	%rax, %rdi
	movl	$-1, %edx
	callq	_gctl_ro_param
	leaq	L_.str.7(%rip), %rsi
	leaq	L_.str.8(%rip), %rcx
	movq	%rbx, %rdi
	movl	$-1, %edx
	callq	_gctl_ro_param
	leaq	L_.str.9(%rip), %rsi
	movq	%rbx, %rdi
	movl	$-1, %edx
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	callq	_gctl_ro_param
	leaq	L_.str.10(%rip), %rsi
	movq	%rbx, %rdi
	movl	%r13d, %edx
	movq	%r14, %rcx
	callq	_gctl_ro_param
	movq	%rbx, %rdi
	callq	_gctl_issue
	testq	%rax, %rax
	je	LBB0_16
## %bb.15:
	leaq	L_.str.11(%rip), %rsi
	movl	$1, %edi
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	_errx
LBB0_16:
	movq	%rbx, %rdi
	callq	_gctl_free
	movq	_Bflag@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_34
## %bb.17:
	xorl	%eax, %eax
	callq	_gctl_get_handle
	movq	%rax, %rbx
	leaq	L_.str.5(%rip), %rsi
	leaq	L_.str.12(%rip), %rcx
	movq	%rax, %rdi
	movl	$-1, %edx
	callq	_gctl_ro_param
	leaq	L_.str.7(%rip), %rsi
	leaq	L_.str.8(%rip), %rcx
	movq	%rbx, %rdi
	movl	$-1, %edx
	callq	_gctl_ro_param
	leaq	L_.str.9(%rip), %rsi
	movq	%rbx, %rdi
	movl	$-1, %edx
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	callq	_gctl_ro_param
	leaq	L_.str.13(%rip), %rsi
	movq	%rbx, %rdi
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	callq	_gctl_ro_param
	movq	%rbx, %rdi
	callq	_gctl_issue
	testq	%rax, %rax
	je	LBB0_19
## %bb.18:
	leaq	L_.str.11(%rip), %rsi
	movl	$1, %edi
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	_errx
LBB0_19:
	movq	%rbx, %rdi
	callq	_gctl_free
	xorl	%edi, %edi
	callq	_exit
LBB0_20:
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	-56(%rbp), %edi                 ## 4-byte Reload
	xorl	%esi, %esi
	callq	_lseek
	testq	%rax, %rax
	jns	LBB0_22
## %bb.21:
	leaq	L_.str.14(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_err
LBB0_22:
	movl	-56(%rbp), %edi                 ## 4-byte Reload
	movq	%r14, %rsi
	movl	%r13d, %edx
	callq	_write
	cltq
	cmpq	%r13, %rax
	je	LBB0_24
## %bb.23:
	leaq	L_.str.15(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_err
LBB0_24:
	movq	_Bflag@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_33
## %bb.25:
	movq	_SUN_NPART@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_33
## %bb.26:
	movl	$8, %r13d
	xorl	%r12d, %r12d
	movl	-56(%rbp), %r15d                ## 4-byte Reload
	jmp	LBB0_27
	.p2align	4, 0x90
LBB0_32:                                ##   in Loop: Header=BB0_27 Depth=1
	incq	%r12
	movq	_SUN_NPART@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	addq	$16, %r13
	cmpq	%rax, %r12
	jge	LBB0_33
LBB0_27:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%rbx), %rax
	cmpq	$0, -8(%rax,%r13)
	je	LBB0_32
## %bb.28:                              ##   in Loop: Header=BB0_27 Depth=1
	movl	(%rax,%r13), %esi
	imull	(%rbx), %esi
	imull	4(%rbx), %esi
	shll	$9, %esi
	movq	_SUN_SIZE@GOTPCREL(%rip), %r14
	addl	(%r14), %esi
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r15d, %edi
	callq	_lseek
	testq	%rax, %rax
	jns	LBB0_30
## %bb.29:                              ##   in Loop: Header=BB0_27 Depth=1
	movl	$1, %edi
	leaq	L_.str.14(%rip), %rsi
	xorl	%eax, %eax
	callq	_err
LBB0_30:                                ##   in Loop: Header=BB0_27 Depth=1
	movslq	(%r14), %rsi
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	movl	%r14d, %edx
	subl	%esi, %edx
	addq	-88(%rbp), %rsi                 ## 8-byte Folded Reload
	movl	%r15d, %edi
	callq	_write
	cltq
	movq	_SUN_SIZE@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	subq	%rcx, %r14
	cmpq	%rax, %r14
	je	LBB0_32
## %bb.31:                              ##   in Loop: Header=BB0_27 Depth=1
	movl	$1, %edi
	leaq	L_.str.15(%rip), %rsi
	xorl	%eax, %eax
	callq	_err
	jmp	LBB0_32
LBB0_33:
	movl	-56(%rbp), %edi                 ## 4-byte Reload
	callq	_close
LBB0_34:
	xorl	%edi, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_MAXPATHLEN,4,2                 ## @MAXPATHLEN
	.comm	_SUN_BOOTSIZE,4,2               ## @SUN_BOOTSIZE
	.comm	_SUN_SIZE,4,2                   ## @SUN_SIZE
	.comm	_SUN_DKMAGIC,4,2                ## @SUN_DKMAGIC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid label"

	.comm	_nflag,8,3                      ## @nflag
	.comm	_stdout,4,2                     ## @stdout
	.comm	_Bflag,8,3                      ## @Bflag
	.comm	_O_RDONLY,4,2                   ## @O_RDONLY
L_.str.1:                               ## @.str.1
	.asciz	"open %s"

L_.str.2:                               ## @.str.2
	.asciz	"read"

L_.str.3:                               ## @.str.3
	.asciz	"read wrong size boot code (%d)"

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

	.comm	__PATH_DEV,8,3                  ## @_PATH_DEV
	.comm	_O_RDWR,4,2                     ## @O_RDWR
L_.str.5:                               ## @.str.5
	.asciz	"verb"

L_.str.6:                               ## @.str.6
	.asciz	"write label"

L_.str.7:                               ## @.str.7
	.asciz	"class"

L_.str.8:                               ## @.str.8
	.asciz	"SUN"

L_.str.9:                               ## @.str.9
	.asciz	"geom"

L_.str.10:                              ## @.str.10
	.asciz	"label"

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

L_.str.12:                              ## @.str.12
	.asciz	"write bootcode"

L_.str.13:                              ## @.str.13
	.asciz	"bootcode"

	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
L_.str.14:                              ## @.str.14
	.asciz	"lseek"

L_.str.15:                              ## @.str.15
	.asciz	"write"

	.comm	_SUN_NPART,4,2                  ## @SUN_NPART
	.no_dead_strip	_write_label
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function write_label
_write_label:                           ; @write_label
	.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, #16
	mov	x27, x2
	mov	x22, x1
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x8, _MAXPATHLEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAXPATHLEN@GOTPAGEOFF]
Lloh5:
	ldr	w26, [x8]
	mov	x9, x26
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x26, #15
	and	x9, x9, #0x1fffffff0
	sub	x25, x8, x9
	mov	sp, x25
Lloh8:
	adrp	x8, _SUN_BOOTSIZE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SUN_BOOTSIZE@GOTPAGEOFF]
Lloh10:
	ldr	w19, [x8]
	mov	x9, x19
Lloh11:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh12:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x19, #15
	and	x9, x9, #0x1fffffff0
	sub	x20, x8, x9
	mov	sp, x20
Lloh13:
	adrp	x28, _SUN_SIZE@GOTPAGE
Lloh14:
	ldr	x28, [x28, _SUN_SIZE@GOTPAGEOFF]
	ldr	w23, [x28]
	mov	x9, x23
Lloh15:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh16:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x23, #15
	and	x9, x9, #0x1fffffff0
	sub	x24, x8, x9
	mov	sp, x24
Lloh17:
	adrp	x8, _SUN_DKMAGIC@GOTPAGE
Lloh18:
	ldr	x8, [x8, _SUN_DKMAGIC@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	str	w8, [x0, #16]
	bl	_check_label
	cbz	x0, LBB0_2
; %bb.1:
Lloh20:
	adrp	x1, l_.str@PAGE
Lloh21:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_errx
LBB0_2:
	mov	x0, x24
	mov	x1, x23
	bl	_bzero
	mov	x0, x24
	mov	x1, x21
	bl	_sunlabel_enc
Lloh22:
	adrp	x8, _nflag@GOTPAGE
Lloh23:
	ldr	x8, [x8, _nflag@GOTPAGEOFF]
Lloh24:
	ldr	x8, [x8]
	cbz	x8, LBB0_5
; %bb.3:
Lloh25:
	adrp	x8, _stdout@GOTPAGE
Lloh26:
	ldr	x8, [x8, _stdout@GOTPAGEOFF]
Lloh27:
	ldr	w2, [x8]
	mov	x0, x21
	mov	x1, x22
	bl	_print_label
	ldur	x8, [x29, #-88]
Lloh28:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh29:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh30:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_10
; %bb.4:
	sub	sp, x29, #80
	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_5:
Lloh31:
	adrp	x8, _Bflag@GOTPAGE
Lloh32:
	ldr	x8, [x8, _Bflag@GOTPAGEOFF]
Lloh33:
	ldr	x8, [x8]
	cbz	x8, LBB0_14
; %bb.6:
Lloh34:
	adrp	x8, _O_RDONLY@GOTPAGE
Lloh35:
	ldr	x8, [x8, _O_RDONLY@GOTPAGEOFF]
Lloh36:
	ldr	w1, [x8]
	mov	x0, x27
	bl	_open
	stur	w0, [x29, #-92]                 ; 4-byte Folded Spill
	tbz	w0, #31, LBB0_8
; %bb.7:
	str	x27, [sp, #-16]!
Lloh37:
	adrp	x1, l_.str.1@PAGE
Lloh38:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	bl	_err
	add	sp, sp, #16
LBB0_8:
	ldur	w0, [x29, #-92]                 ; 4-byte Folded Reload
	mov	x1, x20
	mov	x2, x19
	bl	_read
                                        ; kill: def $w0 killed $w0 def $x0
	tbz	w0, #31, LBB0_11
; %bb.9:
Lloh39:
	adrp	x1, l_.str.2@PAGE
Lloh40:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #1
	bl	_err
	b	LBB0_13
LBB0_10:
	bl	___stack_chk_fail
LBB0_11:
	cmp	w0, w19
	b.eq	LBB0_13
; %bb.12:
	str	x0, [sp, #-16]!
Lloh41:
	adrp	x1, l_.str.3@PAGE
Lloh42:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w0, #1
	bl	_errx
	add	sp, sp, #16
LBB0_13:
	ldur	w0, [x29, #-92]                 ; 4-byte Folded Reload
	bl	_close
LBB0_14:
Lloh43:
	adrp	x8, __PATH_DEV@GOTPAGE
Lloh44:
	ldr	x8, [x8, __PATH_DEV@GOTPAGEOFF]
Lloh45:
	ldr	x3, [x8]
Lloh46:
	adrp	x2, l_.str.4@PAGE
Lloh47:
	add	x2, x2, l_.str.4@PAGEOFF
	mov	x0, x25
	mov	x1, x26
	mov	x4, x22
	bl	_snprintf
Lloh48:
	adrp	x8, _O_RDWR@GOTPAGE
Lloh49:
	ldr	x8, [x8, _O_RDWR@GOTPAGEOFF]
Lloh50:
	ldr	w1, [x8]
	mov	x0, x25
	bl	_open
	tbz	w0, #31, LBB0_21
; %bb.15:
	bl	_gctl_get_handle
	mov	x21, x0
Lloh51:
	adrp	x1, l_.str.5@PAGE
Lloh52:
	add	x1, x1, l_.str.5@PAGEOFF
Lloh53:
	adrp	x3, l_.str.6@PAGE
Lloh54:
	add	x3, x3, l_.str.6@PAGEOFF
	mov	w2, #-1
	bl	_gctl_ro_param
Lloh55:
	adrp	x1, l_.str.7@PAGE
Lloh56:
	add	x1, x1, l_.str.7@PAGEOFF
Lloh57:
	adrp	x3, l_.str.8@PAGE
Lloh58:
	add	x3, x3, l_.str.8@PAGEOFF
	mov	x0, x21
	mov	w2, #-1
	bl	_gctl_ro_param
Lloh59:
	adrp	x1, l_.str.9@PAGE
Lloh60:
	add	x1, x1, l_.str.9@PAGEOFF
	mov	x0, x21
	mov	w2, #-1
	mov	x3, x22
	bl	_gctl_ro_param
Lloh61:
	adrp	x1, l_.str.10@PAGE
Lloh62:
	add	x1, x1, l_.str.10@PAGEOFF
	mov	x0, x21
	mov	x2, x23
	mov	x3, x24
	bl	_gctl_ro_param
	mov	x0, x21
	bl	_gctl_issue
	cbz	x0, LBB0_17
; %bb.16:
	str	x0, [sp, #-16]!
Lloh63:
	adrp	x1, l_.str.11@PAGE
Lloh64:
	add	x1, x1, l_.str.11@PAGEOFF
	mov	w0, #1
	bl	_errx
	add	sp, sp, #16
LBB0_17:
	mov	x0, x21
	bl	_gctl_free
Lloh65:
	adrp	x8, _Bflag@GOTPAGE
Lloh66:
	ldr	x8, [x8, _Bflag@GOTPAGEOFF]
Lloh67:
	ldr	x8, [x8]
	cbz	x8, LBB0_35
; %bb.18:
	bl	_gctl_get_handle
	mov	x21, x0
Lloh68:
	adrp	x1, l_.str.5@PAGE
Lloh69:
	add	x1, x1, l_.str.5@PAGEOFF
Lloh70:
	adrp	x3, l_.str.12@PAGE
Lloh71:
	add	x3, x3, l_.str.12@PAGEOFF
	mov	w2, #-1
	bl	_gctl_ro_param
Lloh72:
	adrp	x1, l_.str.7@PAGE
Lloh73:
	add	x1, x1, l_.str.7@PAGEOFF
Lloh74:
	adrp	x3, l_.str.8@PAGE
Lloh75:
	add	x3, x3, l_.str.8@PAGEOFF
	mov	x0, x21
	mov	w2, #-1
	bl	_gctl_ro_param
Lloh76:
	adrp	x1, l_.str.9@PAGE
Lloh77:
	add	x1, x1, l_.str.9@PAGEOFF
	mov	x0, x21
	mov	w2, #-1
	mov	x3, x22
	bl	_gctl_ro_param
Lloh78:
	adrp	x1, l_.str.13@PAGE
Lloh79:
	add	x1, x1, l_.str.13@PAGEOFF
	mov	x0, x21
	mov	x2, x19
	mov	x3, x20
	bl	_gctl_ro_param
	mov	x0, x21
	bl	_gctl_issue
	cbz	x0, LBB0_20
; %bb.19:
	str	x0, [sp, #-16]!
Lloh80:
	adrp	x1, l_.str.11@PAGE
Lloh81:
	add	x1, x1, l_.str.11@PAGEOFF
	mov	w0, #1
	bl	_errx
	add	sp, sp, #16
LBB0_20:
	mov	x0, x21
	bl	_gctl_free
	mov	w0, #0
	bl	_exit
LBB0_21:
	mov	x25, x0
Lloh82:
	adrp	x26, _SEEK_SET@GOTPAGE
Lloh83:
	ldr	x26, [x26, _SEEK_SET@GOTPAGEOFF]
	ldr	w2, [x26]
	mov	w1, #0
	bl	_lseek
	tbz	x0, #63, LBB0_23
; %bb.22:
Lloh84:
	adrp	x1, l_.str.14@PAGE
Lloh85:
	add	x1, x1, l_.str.14@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_23:
	mov	x0, x25
	mov	x1, x24
	mov	x2, x23
	bl	_write
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x8, w0
	cmp	x8, x23
	b.eq	LBB0_25
; %bb.24:
Lloh86:
	adrp	x1, l_.str.15@PAGE
Lloh87:
	add	x1, x1, l_.str.15@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_25:
Lloh88:
	adrp	x8, _Bflag@GOTPAGE
Lloh89:
	ldr	x8, [x8, _Bflag@GOTPAGEOFF]
Lloh90:
	ldr	x8, [x8]
	cbz	x8, LBB0_34
; %bb.26:
Lloh91:
	adrp	x24, _SUN_NPART@GOTPAGE
Lloh92:
	ldr	x24, [x24, _SUN_NPART@GOTPAGEOFF]
	ldr	w8, [x24]
	cmp	w8, #1
	b.lt	LBB0_34
; %bb.27:
	mov	x27, #0
	mov	x22, #0
Lloh93:
	adrp	x23, l_.str.15@PAGE
Lloh94:
	add	x23, x23, l_.str.15@PAGEOFF
	b	LBB0_29
LBB0_28:                                ;   in Loop: Header=BB0_29 Depth=1
	add	x22, x22, #1
	ldrsw	x8, [x24]
	add	x27, x27, #16
	cmp	x22, x8
	b.ge	LBB0_34
LBB0_29:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21, #8]
	ldr	x9, [x8, x27]
	cbz	x9, LBB0_28
; %bb.30:                               ;   in Loop: Header=BB0_29 Depth=1
	add	x8, x8, x27
	ldr	w8, [x8, #8]
	ldp	w9, w10, [x21]
	mul	w8, w8, w9
	mul	w8, w8, w10
	ldr	w9, [x28]
	add	w1, w9, w8, lsl #9
	ldr	w2, [x26]
	mov	x0, x25
	bl	_lseek
	tbz	x0, #63, LBB0_32
; %bb.31:                               ;   in Loop: Header=BB0_29 Depth=1
	mov	w0, #1
Lloh95:
	adrp	x1, l_.str.14@PAGE
Lloh96:
	add	x1, x1, l_.str.14@PAGEOFF
	bl	_err
LBB0_32:                                ;   in Loop: Header=BB0_29 Depth=1
	ldrsw	x8, [x28]
	add	x1, x20, x8
	sub	w2, w19, w8
	mov	x0, x25
	bl	_write
	ldrsw	x8, [x28]
	sub	x8, x19, x8
	cmp	x8, w0, sxtw
	b.eq	LBB0_28
; %bb.33:                               ;   in Loop: Header=BB0_29 Depth=1
	mov	w0, #1
	mov	x1, x23
	bl	_err
	b	LBB0_28
LBB0_34:
	mov	x0, x25
	bl	_close
LBB0_35:
	mov	w0, #0
	bl	_exit
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpAdd	Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpAdd	Lloh61, Lloh62
	.loh AdrpAdd	Lloh59, Lloh60
	.loh AdrpAdd	Lloh57, Lloh58
	.loh AdrpAdd	Lloh55, Lloh56
	.loh AdrpAdd	Lloh53, Lloh54
	.loh AdrpAdd	Lloh51, Lloh52
	.loh AdrpAdd	Lloh63, Lloh64
	.loh AdrpLdrGotLdr	Lloh65, Lloh66, Lloh67
	.loh AdrpAdd	Lloh78, Lloh79
	.loh AdrpAdd	Lloh76, Lloh77
	.loh AdrpAdd	Lloh74, Lloh75
	.loh AdrpAdd	Lloh72, Lloh73
	.loh AdrpAdd	Lloh70, Lloh71
	.loh AdrpAdd	Lloh68, Lloh69
	.loh AdrpAdd	Lloh80, Lloh81
	.loh AdrpLdrGot	Lloh82, Lloh83
	.loh AdrpAdd	Lloh84, Lloh85
	.loh AdrpAdd	Lloh86, Lloh87
	.loh AdrpLdrGotLdr	Lloh88, Lloh89, Lloh90
	.loh AdrpLdrGot	Lloh91, Lloh92
	.loh AdrpAdd	Lloh93, Lloh94
	.loh AdrpAdd	Lloh95, Lloh96
	.cfi_endproc
                                        ; -- End function
	.comm	_MAXPATHLEN,4,2                 ; @MAXPATHLEN
	.comm	_SUN_BOOTSIZE,4,2               ; @SUN_BOOTSIZE
	.comm	_SUN_SIZE,4,2                   ; @SUN_SIZE
	.comm	_SUN_DKMAGIC,4,2                ; @SUN_DKMAGIC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid label"

	.comm	_nflag,8,3                      ; @nflag
	.comm	_stdout,4,2                     ; @stdout
	.comm	_Bflag,8,3                      ; @Bflag
	.comm	_O_RDONLY,4,2                   ; @O_RDONLY
l_.str.1:                               ; @.str.1
	.asciz	"open %s"

l_.str.2:                               ; @.str.2
	.asciz	"read"

l_.str.3:                               ; @.str.3
	.asciz	"read wrong size boot code (%d)"

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

	.comm	__PATH_DEV,8,3                  ; @_PATH_DEV
	.comm	_O_RDWR,4,2                     ; @O_RDWR
l_.str.5:                               ; @.str.5
	.asciz	"verb"

l_.str.6:                               ; @.str.6
	.asciz	"write label"

l_.str.7:                               ; @.str.7
	.asciz	"class"

l_.str.8:                               ; @.str.8
	.asciz	"SUN"

l_.str.9:                               ; @.str.9
	.asciz	"geom"

l_.str.10:                              ; @.str.10
	.asciz	"label"

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

l_.str.12:                              ; @.str.12
	.asciz	"write bootcode"

l_.str.13:                              ; @.str.13
	.asciz	"bootcode"

	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
l_.str.14:                              ; @.str.14
	.asciz	"lseek"

l_.str.15:                              ; @.str.15
	.asciz	"write"

	.comm	_SUN_NPART,4,2                  ; @SUN_NPART
	.no_dead_strip	_write_label
.subsections_via_symbols
