	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function init_boot
_init_boot:                             ## @init_boot
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_b_flag@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	leaq	L_.str(%rip), %r15
	cmovneq	%rax, %r15
	movq	_O_RDONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_open
	movl	%eax, %r14d
	cmpl	$-1, %eax
	je	LBB0_2
## %bb.1:
	leaq	-40(%rbp), %rsi
	movl	%r14d, %edi
	callq	_fstat
	cmpl	$-1, %eax
	jne	LBB0_3
LBB0_2:
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	movq	%r15, %rdx
	callq	_err
LBB0_3:
	movq	-40(%rbp), %rbx
	testq	%rbx, %rbx
	jne	LBB0_5
## %bb.4:
	leaq	L_.str.2(%rip), %rsi
	movl	$1, %edi
	movq	%r15, %rdx
	callq	_errx
LBB0_5:
	movq	_mboot@GOTPCREL(%rip), %r12
	movl	%ebx, (%r12)
	movq	_secsize@GOTPCREL(%rip), %rcx
	movl	%ebx, %eax
	cltd
	idivl	(%rcx)
	testl	%edx, %edx
	je	LBB0_7
## %bb.6:
	leaq	L_.str.3(%rip), %rsi
	movl	$1, %edi
	movq	%r15, %rdx
	callq	_errx
LBB0_7:
	movq	8(%r12), %rdi
	testq	%rdi, %rdi
	je	LBB0_9
## %bb.8:
	callq	_free
LBB0_9:
	movl	%ebx, (%r12)
	movl	%ebx, %edi
	callq	_malloc
	movq	%rax, 8(%r12)
	testq	%rax, %rax
	jne	LBB0_11
## %bb.10:
	leaq	L_.str.4(%rip), %rsi
	movl	$1, %edi
	movq	%r15, %rdx
	callq	_errx
	movq	8(%r12), %rax
LBB0_11:
	movl	(%r12), %edx
	movl	%r14d, %edi
	movq	%rax, %rsi
	callq	_read
	movl	%eax, %ebx
	cmpl	$-1, %eax
	je	LBB0_13
## %bb.12:
	movl	%r14d, %edi
	callq	_close
	testq	%rax, %rax
	je	LBB0_14
LBB0_13:
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	movq	%r15, %rdx
	callq	_err
LBB0_14:
	cmpl	(%r12), %ebx
	jne	LBB0_16
## %bb.15:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	leaq	L_.str.5(%rip), %rsi
	movl	$1, %edi
	movq	%r15, %rdx
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_errx                           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_b_flag,8,3                     ## @b_flag
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"/boot/mbr"

	.comm	_O_RDONLY,4,2                   ## @O_RDONLY
L_.str.1:                               ## @.str.1
	.asciz	"%s"

L_.str.2:                               ## @.str.2
	.asciz	"%s is empty, must not be."

	.comm	_mboot,16,3                     ## @mboot
	.comm	_secsize,4,2                    ## @secsize
L_.str.3:                               ## @.str.3
	.asciz	"%s: length must be a multiple of sector size"

L_.str.4:                               ## @.str.4
	.asciz	"%s: unable to allocate read buffer"

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

	.no_dead_strip	_init_boot
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function init_boot
_init_boot:                             ; @init_boot
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
Lloh0:
	adrp	x8, _b_flag@GOTPAGE
Lloh1:
	ldr	x8, [x8, _b_flag@GOTPAGEOFF]
Lloh2:
	adrp	x9, l_.str@PAGE
Lloh3:
	add	x9, x9, l_.str@PAGEOFF
Lloh4:
	ldr	x8, [x8]
	cmp	x8, #0
	csel	x19, x9, x8, eq
Lloh5:
	adrp	x8, _O_RDONLY@GOTPAGE
Lloh6:
	ldr	x8, [x8, _O_RDONLY@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_open
	mov	x20, x0
	cmn	w0, #1
	b.eq	LBB0_14
; %bb.1:
	add	x1, sp, #8
	mov	x0, x20
	bl	_fstat
	cmn	w0, #1
	b.eq	LBB0_14
; %bb.2:
	ldr	x21, [sp, #8]
	cbz	x21, LBB0_15
LBB0_3:
Lloh8:
	adrp	x22, _mboot@GOTPAGE
Lloh9:
	ldr	x22, [x22, _mboot@GOTPAGEOFF]
	str	w21, [x22]
Lloh10:
	adrp	x8, _secsize@GOTPAGE
Lloh11:
	ldr	x8, [x8, _secsize@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	sdiv	w9, w21, w8
	msub	w8, w9, w8, w21
	cbz	w8, LBB0_5
; %bb.4:
Lloh13:
	adrp	x1, l_.str.3@PAGE
Lloh14:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w0, #1
	mov	x2, x19
	bl	_errx
LBB0_5:
	ldr	x0, [x22, #8]
	cbz	x0, LBB0_7
; %bb.6:
	bl	_free
LBB0_7:
	str	w21, [x22]
	mov	x0, x21
	bl	_malloc
	mov	x1, x0
	str	x0, [x22, #8]
	cbnz	x0, LBB0_9
; %bb.8:
Lloh15:
	adrp	x1, l_.str.4@PAGE
Lloh16:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	w0, #1
	mov	x2, x19
	bl	_errx
	ldr	x1, [x22, #8]
LBB0_9:
	ldr	w2, [x22]
	mov	x0, x20
	bl	_read
	mov	x21, x0
	cmn	w0, #1
	b.eq	LBB0_11
; %bb.10:
	mov	x0, x20
	bl	_close
	cbz	x0, LBB0_12
LBB0_11:
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	mov	x2, x19
	bl	_err
LBB0_12:
	ldr	w8, [x22]
	cmp	w21, w8
	b.ne	LBB0_16
; %bb.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
	add	sp, sp, #64
	ret
LBB0_14:
Lloh19:
	adrp	x1, l_.str.1@PAGE
Lloh20:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	mov	x2, x19
	bl	_err
	ldr	x21, [sp, #8]
	cbnz	x21, LBB0_3
LBB0_15:
Lloh21:
	adrp	x1, l_.str.2@PAGE
Lloh22:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #1
	mov	x2, x19
	bl	_errx
	b	LBB0_3
LBB0_16:
Lloh23:
	adrp	x1, l_.str.5@PAGE
Lloh24:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	w0, #1
	mov	x2, x19
	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
	add	sp, sp, #64
	b	_errx
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_b_flag,8,3                     ; @b_flag
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"/boot/mbr"

	.comm	_O_RDONLY,4,2                   ; @O_RDONLY
l_.str.1:                               ; @.str.1
	.asciz	"%s"

l_.str.2:                               ; @.str.2
	.asciz	"%s is empty, must not be."

	.comm	_mboot,16,3                     ; @mboot
	.comm	_secsize,4,2                    ; @secsize
l_.str.3:                               ; @.str.3
	.asciz	"%s: length must be a multiple of sector size"

l_.str.4:                               ; @.str.4
	.asciz	"%s: unable to allocate read buffer"

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

	.no_dead_strip	_init_boot
.subsections_via_symbols
