	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function readlabel
_readlabel:                             ## @readlabel
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %ebx
	movq	_specname@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_O_RDONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_open
	movl	%eax, %r15d
	testl	%eax, %eax
	jns	LBB0_2
## %bb.1:
	movq	_specname@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_err
LBB0_2:
	movq	_is_file@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movl	%r15d, %edi
	je	LBB0_4
## %bb.3:
	callq	_get_file_parms
	jmp	LBB0_7
LBB0_4:
	callq	_g_mediasize
	movq	_mediasize@GOTPCREL(%rip), %rbx
	movl	%eax, (%rbx)
	movl	%r15d, %edi
	callq	_g_sectorsize
	movq	_secsize@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	testl	%eax, %eax
	js	LBB0_6
## %bb.5:
	cmpl	$0, (%rbx)
	jns	LBB0_7
LBB0_6:
	leaq	L_.str.1(%rip), %rsi
	movl	$4, %edi
	xorl	%eax, %eax
	callq	_err
LBB0_7:
	movq	_mediasize@GOTPCREL(%rip), %rax
	movq	_secsize@GOTPCREL(%rip), %r13
	xorl	%ecx, %ecx
	subl	(%r13), %ecx
	cmpl	%ecx, (%rax)
	jle	LBB0_9
## %bb.8:
	leaq	L_.str.2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_errx
LBB0_9:
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r15d, %edi
	xorl	%esi, %esi
	callq	_lseek
	movq	_bootarea@GOTPCREL(%rip), %r12
	movq	(%r12), %rsi
	movq	_BBSIZE@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	movl	%r15d, %edi
	callq	_read
	movl	%eax, %ebx
	cmpl	$-1, %eax
	jne	LBB0_11
## %bb.10:
	movq	_specname@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.3(%rip), %rsi
	movl	$4, %edi
	xorl	%eax, %eax
	callq	_err
LBB0_11:
	movl	(%r14), %edx
	cmpl	%edx, %ebx
	je	LBB0_13
## %bb.12:
	movq	_specname@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	L_.str.4(%rip), %rsi
	movl	$4, %edi
	xorl	%eax, %eax
	callq	_errx
LBB0_13:
	movl	%r15d, %edi
	callq	_close
	movq	_labeloffset@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	_labelsoffset@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	movslq	(%r13), %rcx
	addq	(%r12), %rdi
	imulq	%rax, %rcx
	addq	%rcx, %rdi
	movq	_MAXPARTITIONS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_lab@GOTPCREL(%rip), %r12
	movq	%r12, %rsi
	callq	_bsd_disklabel_le_dec
	movl	%eax, %r15d
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_16
## %bb.14:
	testl	%r15d, %r15d
	je	LBB0_16
## %bb.15:
	movq	_specname@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.5(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_errx
LBB0_16:
	xorl	%r14d, %r14d
	movq	_is_file@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_17
LBB0_37:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	movl	%r15d, %r14d
	movl	(%r12), %ecx
	movl	$-1, %eax
	testl	%ecx, %ecx
	jle	LBB0_23
## %bb.18:
	movl	$8, %ebx
	xorl	%r15d, %r15d
	jmp	LBB0_19
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_19 Depth=1
	incq	%r15
	movslq	%ecx, %rdx
	addq	$16, %rbx
	cmpq	%rdx, %r15
	jge	LBB0_22
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rdx
	cmpq	$0, (%rdx,%rbx)
	je	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_19 Depth=1
	movl	-8(%rdx,%rbx), %esi
	movl	%eax, %edi
	callq	_MIN
	movl	(%r12), %ecx
	jmp	LBB0_21
LBB0_22:
	testl	%eax, %eax
	je	LBB0_37
LBB0_23:
	movq	8(%r12), %rbx
	movq	_RAW_PART@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	shlq	$4, %rdx
	cmpl	%eax, (%rbx,%rdx)
	jne	LBB0_37
## %bb.24:
	testl	%ecx, %ecx
	jle	LBB0_36
## %bb.25:
	movl	%ecx, %esi
	cmpl	$1, %ecx
	jne	LBB0_27
## %bb.26:
	xorl	%ecx, %ecx
LBB0_33:
	testb	$1, %sil
	je	LBB0_36
## %bb.34:
	shlq	$4, %rcx
	cmpq	$0, 8(%rbx,%rcx)
	je	LBB0_36
## %bb.35:
	subl	%eax, (%rbx,%rcx)
LBB0_36:
	movq	_lba_offset@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	jmp	LBB0_37
LBB0_27:
	movl	%esi, %edi
	andl	$-2, %edi
	xorl	%ecx, %ecx
	movq	%rbx, %rdx
	jmp	LBB0_28
	.p2align	4, 0x90
LBB0_32:                                ##   in Loop: Header=BB0_28 Depth=1
	addq	$2, %rcx
	addq	$32, %rdx
	cmpq	%rcx, %rdi
	je	LBB0_33
LBB0_28:                                ## =>This Inner Loop Header: Depth=1
	cmpq	$0, 8(%rdx)
	je	LBB0_30
## %bb.29:                              ##   in Loop: Header=BB0_28 Depth=1
	subl	%eax, (%rdx)
LBB0_30:                                ##   in Loop: Header=BB0_28 Depth=1
	cmpq	$0, 24(%rdx)
	je	LBB0_32
## %bb.31:                              ##   in Loop: Header=BB0_28 Depth=1
	subl	%eax, 16(%rdx)
	jmp	LBB0_32
	.cfi_endproc
                                        ## -- End function
	.comm	_specname,4,2                   ## @specname
	.comm	_O_RDONLY,4,2                   ## @O_RDONLY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s"

	.comm	_is_file,8,3                    ## @is_file
	.comm	_mediasize,4,2                  ## @mediasize
	.comm	_secsize,4,2                    ## @secsize
L_.str.1:                               ## @.str.1
	.asciz	"cannot get disk geometry"

L_.str.2:                               ## @.str.2
	.asciz	"disks with more than 2^32-1 sectors are not supported"

	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
	.comm	_bootarea,8,3                   ## @bootarea
	.comm	_BBSIZE,4,2                     ## @BBSIZE
L_.str.3:                               ## @.str.3
	.asciz	"%s read"

L_.str.4:                               ## @.str.4
	.asciz	"couldn't read %d bytes from %s"

	.comm	_labeloffset,8,3                ## @labeloffset
	.comm	_labelsoffset,4,2               ## @labelsoffset
	.comm	_lab,16,3                       ## @lab
	.comm	_MAXPARTITIONS,4,2              ## @MAXPARTITIONS
L_.str.5:                               ## @.str.5
	.asciz	"%s: no valid label found"

	.comm	_RAW_PART,8,3                   ## @RAW_PART
	.comm	_lba_offset,4,2                 ## @lba_offset
	.no_dead_strip	_readlabel
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function readlabel
_readlabel:                             ; @readlabel
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x19, x0
Lloh0:
	adrp	x22, _specname@GOTPAGE
Lloh1:
	ldr	x22, [x22, _specname@GOTPAGEOFF]
	ldr	w0, [x22]
Lloh2:
	adrp	x8, _O_RDONLY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _O_RDONLY@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	bl	_open
	mov	x20, x0
	tbz	w0, #31, LBB0_2
; %bb.1:
	ldr	w8, [x22]
	str	x8, [sp]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_2:
Lloh7:
	adrp	x23, _is_file@GOTPAGE
Lloh8:
	ldr	x23, [x23, _is_file@GOTPAGEOFF]
	ldr	x8, [x23]
Lloh9:
	adrp	x21, _mediasize@GOTPAGE
Lloh10:
	ldr	x21, [x21, _mediasize@GOTPAGEOFF]
Lloh11:
	adrp	x24, _secsize@GOTPAGE
Lloh12:
	ldr	x24, [x24, _secsize@GOTPAGEOFF]
	mov	x0, x20
	cbz	x8, LBB0_4
; %bb.3:
	bl	_get_file_parms
	b	LBB0_7
LBB0_4:
	bl	_g_mediasize
	str	w0, [x21]
	mov	x0, x20
	bl	_g_sectorsize
	str	w0, [x24]
	tbnz	w0, #31, LBB0_6
; %bb.5:
	ldr	w8, [x21]
	tbz	w8, #31, LBB0_7
LBB0_6:
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #4
	bl	_err
LBB0_7:
	ldr	w8, [x21]
	ldr	w9, [x24]
	neg	w9, w9
	cmp	w8, w9
	b.le	LBB0_9
; %bb.8:
Lloh15:
	adrp	x1, l_.str.2@PAGE
Lloh16:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #1
	bl	_errx
LBB0_9:
Lloh17:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh18:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh19:
	ldr	w2, [x8]
	mov	x0, x20
	mov	w1, #0
	bl	_lseek
Lloh20:
	adrp	x25, _bootarea@GOTPAGE
Lloh21:
	ldr	x25, [x25, _bootarea@GOTPAGEOFF]
	ldr	x1, [x25]
Lloh22:
	adrp	x26, _BBSIZE@GOTPAGE
Lloh23:
	ldr	x26, [x26, _BBSIZE@GOTPAGEOFF]
	ldr	w2, [x26]
	mov	x0, x20
	bl	_read
	mov	x21, x0
	cmn	w0, #1
	b.ne	LBB0_11
; %bb.10:
	ldr	w8, [x22]
	str	x8, [sp]
Lloh24:
	adrp	x1, l_.str.3@PAGE
Lloh25:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w0, #4
	bl	_err
LBB0_11:
	ldr	w8, [x26]
	cmp	w21, w8
	b.eq	LBB0_13
; %bb.12:
	ldr	w9, [x22]
	stp	x8, x9, [sp]
Lloh26:
	adrp	x1, l_.str.4@PAGE
Lloh27:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	w0, #4
	bl	_errx
LBB0_13:
	mov	x0, x20
	bl	_close
	ldr	x8, [x25]
Lloh28:
	adrp	x9, _labeloffset@GOTPAGE
Lloh29:
	ldr	x9, [x9, _labeloffset@GOTPAGEOFF]
Lloh30:
	ldr	x9, [x9]
Lloh31:
	adrp	x10, _labelsoffset@GOTPAGE
Lloh32:
	ldr	x10, [x10, _labelsoffset@GOTPAGEOFF]
Lloh33:
	ldrsw	x10, [x10]
	ldrsw	x11, [x24]
	add	x8, x9, x8
	madd	x0, x11, x10, x8
Lloh34:
	adrp	x8, _MAXPARTITIONS@GOTPAGE
Lloh35:
	ldr	x8, [x8, _MAXPARTITIONS@GOTPAGEOFF]
Lloh36:
	ldr	w2, [x8]
Lloh37:
	adrp	x21, _lab@GOTPAGE
Lloh38:
	ldr	x21, [x21, _lab@GOTPAGEOFF]
	mov	x1, x21
	bl	_bsd_disklabel_le_dec
	mov	x20, x0
	cbz	w19, LBB0_16
; %bb.14:
	cbz	w20, LBB0_16
; %bb.15:
	ldr	w8, [x22]
	str	x8, [sp]
Lloh39:
	adrp	x1, l_.str.5@PAGE
Lloh40:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	w0, #1
	bl	_errx
LBB0_16:
	ldr	x8, [x23]
	cbz	x8, LBB0_19
; %bb.17:
	mov	w20, #0
LBB0_18:
	mov	x0, x20
	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
	add	sp, sp, #96
	ret
LBB0_19:
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_25
; %bb.20:
	mov	x19, #0
	mov	x22, #0
	mov	w0, #-1
	b	LBB0_22
LBB0_21:                                ;   in Loop: Header=BB0_22 Depth=1
	add	x22, x22, #1
	add	x19, x19, #16
	cmp	x22, w8, sxtw
	b.ge	LBB0_24
LBB0_22:                                ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x21, #8]
	add	x10, x9, x19
	ldr	x10, [x10, #8]
	cbz	x10, LBB0_21
; %bb.23:                               ;   in Loop: Header=BB0_22 Depth=1
	ldr	w1, [x9, x19]
	bl	_MIN
	ldr	w8, [x21]
	b	LBB0_21
LBB0_24:
	cbnz	w0, LBB0_26
	b	LBB0_18
LBB0_25:
	mov	w0, #-1
LBB0_26:
Lloh41:
	adrp	x10, _RAW_PART@GOTPAGE
Lloh42:
	ldr	x10, [x10, _RAW_PART@GOTPAGEOFF]
	ldr	x9, [x21, #8]
Lloh43:
	ldr	x10, [x10]
	lsl	x10, x10, #4
	ldr	w10, [x9, x10]
	cmp	w10, w0
	b.ne	LBB0_18
; %bb.27:
	cmp	w8, #1
	b.lt	LBB0_32
; %bb.28:
	mov	w8, w8
	b	LBB0_30
LBB0_29:                                ;   in Loop: Header=BB0_30 Depth=1
	add	x9, x9, #16
	subs	x8, x8, #1
	b.eq	LBB0_32
LBB0_30:                                ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x9, #8]
	cbz	x10, LBB0_29
; %bb.31:                               ;   in Loop: Header=BB0_30 Depth=1
	ldr	w10, [x9]
	sub	w10, w10, w0
	str	w10, [x9]
	b	LBB0_29
LBB0_32:
Lloh44:
	adrp	x8, _lba_offset@GOTPAGE
Lloh45:
	ldr	x8, [x8, _lba_offset@GOTPAGEOFF]
Lloh46:
	str	w0, [x8]
	b	LBB0_18
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotStr	Lloh44, Lloh45, Lloh46
	.cfi_endproc
                                        ; -- End function
	.comm	_specname,4,2                   ; @specname
	.comm	_O_RDONLY,4,2                   ; @O_RDONLY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s"

	.comm	_is_file,8,3                    ; @is_file
	.comm	_mediasize,4,2                  ; @mediasize
	.comm	_secsize,4,2                    ; @secsize
l_.str.1:                               ; @.str.1
	.asciz	"cannot get disk geometry"

l_.str.2:                               ; @.str.2
	.asciz	"disks with more than 2^32-1 sectors are not supported"

	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
	.comm	_bootarea,8,3                   ; @bootarea
	.comm	_BBSIZE,4,2                     ; @BBSIZE
l_.str.3:                               ; @.str.3
	.asciz	"%s read"

l_.str.4:                               ; @.str.4
	.asciz	"couldn't read %d bytes from %s"

	.comm	_labeloffset,8,3                ; @labeloffset
	.comm	_labelsoffset,4,2               ; @labelsoffset
	.comm	_lab,16,3                       ; @lab
	.comm	_MAXPARTITIONS,4,2              ; @MAXPARTITIONS
l_.str.5:                               ; @.str.5
	.asciz	"%s: no valid label found"

	.comm	_RAW_PART,8,3                   ; @RAW_PART
	.comm	_lba_offset,4,2                 ; @lba_offset
	.no_dead_strip	_readlabel
.subsections_via_symbols
