	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_s0
_read_s0:                               ## @read_s0
	.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
	movq	_secsize@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_mboot@GOTPCREL(%rip), %rbx
	movl	%edi, 16(%rbx)
	movq	8(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%rax, %rdi
	callq	_free
	movl	16(%rbx), %edi
LBB0_2:
	callq	_malloc
	movq	%rax, 8(%rbx)
	testq	%rax, %rax
	je	LBB0_3
## %bb.5:
	xorl	%edi, %edi
	movq	%rax, %rsi
	callq	_read_disk
	cmpl	$-1, %eax
	je	LBB0_6
## %bb.7:
	movq	_DOSMAGICOFFSET@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	shlq	$2, %rdi
	addq	8(%rbx), %rdi
	callq	_le16dec
	movq	_DOSMAGIC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.9:
	movq	_NDOSPART@GOTPCREL(%rip), %r12
	cmpl	$0, (%r12)
	jle	LBB0_12
## %bb.10:
	movq	_DOSPARTSIZE@GOTPCREL(%rip), %r13
	xorl	%r14d, %r14d
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	_DOSPARTOFF@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	movslq	(%r13), %rcx
	movslq	%r15d, %rdi
	imulq	%rcx, %rdi
	addq	%rax, %rdi
	shlq	$2, %rdi
	addq	8(%rbx), %rdi
	movq	(%rbx), %rsi
	addq	%r14, %rsi
	callq	_dos_partition_dec
	incq	%r15
	movslq	(%r12), %rax
	addq	$4, %r14
	cmpq	%rax, %r15
	jl	LBB0_11
LBB0_12:
	xorl	%eax, %eax
	jmp	LBB0_13
LBB0_3:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_4
LBB0_6:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_4
LBB0_8:
	leaq	L_.str.2(%rip), %rdi
LBB0_4:
	callq	_warnx
	movl	$-1, %eax
LBB0_13:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_secsize,4,2                    ## @secsize
	.comm	_mboot,24,3                     ## @mboot
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unable to allocate buffer to read fdisk partition table"

L_.str.1:                               ## @.str.1
	.asciz	"can't read fdisk partition table"

	.comm	_DOSMAGICOFFSET,8,3             ## @DOSMAGICOFFSET
	.comm	_DOSMAGIC,8,3                   ## @DOSMAGIC
L_.str.2:                               ## @.str.2
	.asciz	"invalid fdisk partition table found"

	.comm	_NDOSPART,4,2                   ## @NDOSPART
	.comm	_DOSPARTOFF,4,2                 ## @DOSPARTOFF
	.comm	_DOSPARTSIZE,4,2                ## @DOSPARTSIZE
	.no_dead_strip	_read_s0
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_s0
_read_s0:                               ; @read_s0
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
Lloh0:
	adrp	x8, _secsize@GOTPAGE
Lloh1:
	ldr	x8, [x8, _secsize@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x19, _mboot@GOTPAGE
Lloh4:
	ldr	x19, [x19, _mboot@GOTPAGEOFF]
	str	w0, [x19, #16]
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x8
	bl	_free
	ldr	w0, [x19, #16]
LBB0_2:
	bl	_malloc
	str	x0, [x19, #8]
	cbz	x0, LBB0_9
; %bb.3:
	mov	x1, x0
	mov	w0, #0
	bl	_read_disk
	cmn	w0, #1
	b.eq	LBB0_10
; %bb.4:
	ldr	x8, [x19, #8]
Lloh5:
	adrp	x9, _DOSMAGICOFFSET@GOTPAGE
Lloh6:
	ldr	x9, [x9, _DOSMAGICOFFSET@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	add	x0, x8, x9, lsl #2
	bl	_le16dec
Lloh8:
	adrp	x8, _DOSMAGIC@GOTPAGE
Lloh9:
	ldr	x8, [x8, _DOSMAGIC@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_11
; %bb.5:
Lloh11:
	adrp	x20, _NDOSPART@GOTPAGE
Lloh12:
	ldr	x20, [x20, _NDOSPART@GOTPAGEOFF]
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.6:
	mov	x21, #0
	mov	x22, #0
Lloh13:
	adrp	x23, _DOSPARTOFF@GOTPAGE
Lloh14:
	ldr	x23, [x23, _DOSPARTOFF@GOTPAGEOFF]
Lloh15:
	adrp	x24, _DOSPARTSIZE@GOTPAGE
Lloh16:
	ldr	x24, [x24, _DOSPARTSIZE@GOTPAGEOFF]
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x23]
	ldr	w9, [x24]
	madd	w8, w9, w22, w8
	ldp	x10, x9, [x19]
	add	x0, x9, w8, sxtw #2
	add	x1, x10, x21
	bl	_dos_partition_dec
	add	x22, x22, #1
	ldrsw	x8, [x20]
	add	x21, x21, #4
	cmp	x22, x8
	b.lt	LBB0_7
LBB0_8:
	mov	w0, #0
	b	LBB0_13
LBB0_9:
Lloh17:
	adrp	x0, l_.str@PAGE
Lloh18:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_12
LBB0_10:
Lloh19:
	adrp	x0, l_.str.1@PAGE
Lloh20:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_12
LBB0_11:
Lloh21:
	adrp	x0, l_.str.2@PAGE
Lloh22:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_12:
	bl	_warnx
	mov	w0, #-1
LBB0_13:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_secsize,4,2                    ; @secsize
	.comm	_mboot,24,3                     ; @mboot
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unable to allocate buffer to read fdisk partition table"

l_.str.1:                               ; @.str.1
	.asciz	"can't read fdisk partition table"

	.comm	_DOSMAGICOFFSET,8,3             ; @DOSMAGICOFFSET
	.comm	_DOSMAGIC,8,3                   ; @DOSMAGIC
l_.str.2:                               ; @.str.2
	.asciz	"invalid fdisk partition table found"

	.comm	_NDOSPART,4,2                   ; @NDOSPART
	.comm	_DOSPARTOFF,4,2                 ; @DOSPARTOFF
	.comm	_DOSPARTSIZE,4,2                ; @DOSPARTSIZE
	.no_dead_strip	_read_s0
.subsections_via_symbols
