	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function write_mbr
_write_mbr:                             ## @write_mbr
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %r12d
	movl	%ecx, %r14d
	movq	%rdx, %r15
	movl	%esi, %ebx
	movl	%r8d, -52(%rbp)
	movq	_O_WRONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	orl	%ebx, %esi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movl	$438, %edx                      ## imm = 0x1B6
	xorl	%eax, %eax
	callq	_open
	cmpl	$-1, %eax
	je	LBB0_3
## %bb.1:
	movl	%eax, %r13d
	movl	%eax, %edi
	movq	%r15, %rsi
	movl	%r14d, %edx
	callq	_write
	movl	%eax, %ebx
	movl	%r13d, %edi
	callq	_close
	cmpl	%r14d, %ebx
	je	LBB0_19
## %bb.2:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	xorl	%eax, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_errx                           ## TAILCALL
LBB0_3:
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	testl	%ebx, %ebx
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	je	LBB0_5
## %bb.4:
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	movq	%rbx, %rdx
	callq	_err
LBB0_5:
	movq	_O_RDONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_open
	cmpl	$-1, %eax
	je	LBB0_6
## %bb.8:
	movl	%r12d, %r15d
	movl	%eax, %edi
	callq	_g_providername
	testq	%rax, %rax
	je	LBB0_9
## %bb.10:
	movq	%rax, %r12
	leaq	L_.str.4(%rip), %rdi
	callq	_geom_class_available
	testq	%rax, %rax
	je	LBB0_17
## %bb.11:
	xorl	%eax, %eax
	callq	_gctl_get_handle
	movq	%rax, %r13
	leaq	L_.str.5(%rip), %rsi
	leaq	L_.str.4(%rip), %rcx
	movq	%rax, %rdi
	movl	$-1, %edx
	xorl	%eax, %eax
	callq	_gctl_ro_param
	leaq	L_.str.6(%rip), %rsi
	movq	%r13, %rdi
	movl	$-1, %edx
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	movq	%r12, %rcx
	xorl	%eax, %eax
	callq	_gctl_ro_param
	leaq	L_.str.7(%rip), %rsi
	leaq	L_.str.8(%rip), %rbx
	movq	%r13, %rdi
	movl	$-1, %edx
	movq	%rbx, %rcx
	xorl	%eax, %eax
	callq	_gctl_ro_param
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movl	%r14d, %edx
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_gctl_ro_param
	leaq	L_.str.9(%rip), %rsi
	leaq	L_.str.10(%rip), %rcx
	movq	%r13, %rdi
	movl	$-1, %edx
	xorl	%eax, %eax
	callq	_gctl_ro_param
	testl	%r15d, %r15d
	je	LBB0_13
## %bb.12:
	leaq	L_.str.11(%rip), %rsi
	leaq	-52(%rbp), %rcx
	movq	%r13, %rdi
	movl	$4, %edx
	xorl	%eax, %eax
	callq	_gctl_ro_param
LBB0_13:
	movq	%r13, %rdi
	callq	_gctl_issue
	testq	%rax, %rax
	je	LBB0_16
## %bb.14:
	cmpb	$0, (%rax)
	je	LBB0_16
## %bb.15:
	leaq	L_.str.12(%rip), %rsi
	movl	$1, %edi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	%rax, %rcx
	xorl	%eax, %eax
	callq	_errx
LBB0_16:
	movq	%r13, %rdi
	callq	_gctl_free
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	jmp	LBB0_18
LBB0_6:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_7
LBB0_9:
	leaq	L_.str.3(%rip), %rdi
LBB0_7:
	movq	%rbx, %rsi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_warn                           ## TAILCALL
LBB0_17:
	leaq	L_.str.13(%rip), %rsi
	movl	$1, %edi
	movq	%rbx, %rdx
	xorl	%eax, %eax
	callq	_errx
LBB0_18:
	movq	%r12, %rdi
	callq	_free
LBB0_19:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_O_WRONLY,4,2                   ## @O_WRONLY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: short write"

L_.str.1:                               ## @.str.1
	.asciz	"can't open file %s to write backup"

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

L_.str.3:                               ## @.str.3
	.asciz	"error getting providername for %s"

L_.str.4:                               ## @.str.4
	.asciz	"PART"

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

L_.str.6:                               ## @.str.6
	.asciz	"arg0"

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

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

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

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

L_.str.11:                              ## @.str.11
	.asciz	"skip_dsn"

L_.str.12:                              ## @.str.12
	.asciz	"GEOM_PART: write bootcode to %s failed: %s"

L_.str.13:                              ## @.str.13
	.asciz	"can't write MBR to %s"

	.no_dead_strip	_write_mbr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function write_mbr
_write_mbr:                             ; @write_mbr
	.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	x21, x4
	mov	x22, x3
	mov	x23, x2
	mov	x20, x1
	mov	x19, x0
	str	w4, [sp, #12]
Lloh0:
	adrp	x8, _O_WRONLY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _O_WRONLY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	orr	w1, w8, w1
	mov	w8, #438
	str	x8, [sp]
	bl	_open
	cmn	w0, #1
	b.eq	LBB0_3
; %bb.1:
	mov	x24, x0
	mov	x1, x23
	mov	x2, x22
	bl	_write
	mov	x20, x0
	mov	x0, x24
	bl	_close
	cmp	w20, w22
	b.eq	LBB0_19
; %bb.2:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	mov	x2, x19
	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
	b	_errx
LBB0_3:
	cbz	w20, LBB0_5
; %bb.4:
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	mov	x2, x19
	bl	_err
LBB0_5:
Lloh7:
	adrp	x8, _O_RDONLY@GOTPAGE
Lloh8:
	ldr	x8, [x8, _O_RDONLY@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_open
	cmn	w0, #1
	b.eq	LBB0_14
; %bb.6:
	bl	_g_providername
	cbz	x0, LBB0_15
; %bb.7:
	mov	x20, x0
Lloh10:
	adrp	x25, l_.str.4@PAGE
Lloh11:
	add	x25, x25, l_.str.4@PAGEOFF
	mov	x0, x25
	bl	_geom_class_available
	cbz	x0, LBB0_17
; %bb.8:
	bl	_gctl_get_handle
	mov	x24, x0
	str	x25, [sp]
Lloh12:
	adrp	x1, l_.str.5@PAGE
Lloh13:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	w2, #-1
	bl	_gctl_ro_param
	str	x20, [sp]
Lloh14:
	adrp	x1, l_.str.6@PAGE
Lloh15:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x24
	mov	w2, #-1
	bl	_gctl_ro_param
Lloh16:
	adrp	x25, l_.str.8@PAGE
Lloh17:
	add	x25, x25, l_.str.8@PAGEOFF
	str	x25, [sp]
Lloh18:
	adrp	x1, l_.str.7@PAGE
Lloh19:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	x0, x24
	mov	w2, #-1
	bl	_gctl_ro_param
	str	x23, [sp]
	mov	x0, x24
	mov	x1, x25
	mov	x2, x22
	bl	_gctl_ro_param
Lloh20:
	adrp	x8, l_.str.10@PAGE
Lloh21:
	add	x8, x8, l_.str.10@PAGEOFF
	str	x8, [sp]
Lloh22:
	adrp	x1, l_.str.9@PAGE
Lloh23:
	add	x1, x1, l_.str.9@PAGEOFF
	mov	x0, x24
	mov	w2, #-1
	bl	_gctl_ro_param
	cbz	w21, LBB0_10
; %bb.9:
	add	x8, sp, #12
	str	x8, [sp]
Lloh24:
	adrp	x1, l_.str.11@PAGE
Lloh25:
	add	x1, x1, l_.str.11@PAGEOFF
	mov	x0, x24
	mov	w2, #4
	bl	_gctl_ro_param
LBB0_10:
	mov	x0, x24
	bl	_gctl_issue
	cbz	x0, LBB0_13
; %bb.11:
	ldrb	w8, [x0]
	cbz	w8, LBB0_13
; %bb.12:
	str	x0, [sp]
Lloh26:
	adrp	x1, l_.str.12@PAGE
Lloh27:
	add	x1, x1, l_.str.12@PAGEOFF
	mov	w0, #1
	mov	x2, x19
	bl	_errx
LBB0_13:
	mov	x0, x24
	bl	_gctl_free
	b	LBB0_18
LBB0_14:
Lloh28:
	adrp	x0, l_.str.2@PAGE
Lloh29:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_16
LBB0_15:
Lloh30:
	adrp	x0, l_.str.3@PAGE
Lloh31:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_16:
	mov	x1, x19
	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
	b	_warn
LBB0_17:
Lloh32:
	adrp	x1, l_.str.13@PAGE
Lloh33:
	add	x1, x1, l_.str.13@PAGEOFF
	mov	w0, #1
	mov	x2, x19
	bl	_errx
LBB0_18:
	mov	x0, x20
	bl	_free
LBB0_19:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_O_WRONLY,4,2                   ; @O_WRONLY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: short write"

l_.str.1:                               ; @.str.1
	.asciz	"can't open file %s to write backup"

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

l_.str.3:                               ; @.str.3
	.asciz	"error getting providername for %s"

l_.str.4:                               ; @.str.4
	.asciz	"PART"

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

l_.str.6:                               ; @.str.6
	.asciz	"arg0"

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

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

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

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

l_.str.11:                              ; @.str.11
	.asciz	"skip_dsn"

l_.str.12:                              ; @.str.12
	.asciz	"GEOM_PART: write bootcode to %s failed: %s"

l_.str.13:                              ; @.str.13
	.asciz	"can't write MBR to %s"

	.no_dead_strip	_write_mbr
.subsections_via_symbols
