	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function write_disk
_write_disk:                            ## @write_disk
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movl	%edi, %ecx
	movq	_fd@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_secsize@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdx
	shll	$9, %ecx
	callq	_pwrite
	movq	%rax, %rcx
	xorl	%eax, %eax
	cmpq	(%rbx), %rcx
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_geom_class_available
	testq	%rax, %rax
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.1(%rip), %rdi
	cmoveq	%rax, %rdi
	callq	_warnx
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_2:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_fd,4,2                         ## @fd
	.comm	_secsize,8,3                    ## @secsize
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"PART"

L_.str.1:                               ## @.str.1
	.asciz	"Failed to write MBR. Try to use gpart(8)."

L_.str.2:                               ## @.str.2
	.asciz	"Failed to write sector zero"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_write_disk
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function write_disk
_write_disk:                            ; @write_disk
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x8, _fd@GOTPAGE
Lloh1:
	ldr	x8, [x8, _fd@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x19, _secsize@GOTPAGE
Lloh4:
	ldr	x19, [x19, _secsize@GOTPAGEOFF]
	ldr	x2, [x19]
	lsl	w3, w0, #9
	mov	x0, x8
	bl	_pwrite
	ldr	x8, [x19]
	cmp	x0, x8
	b.ne	LBB0_2
; %bb.1:
	mov	w0, #0
	b	LBB0_3
LBB0_2:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_geom_class_available
Lloh7:
	adrp	x8, l_.str.1@PAGE
Lloh8:
	add	x8, x8, l_.str.1@PAGEOFF
Lloh9:
	adrp	x9, l_.str.2@PAGE
Lloh10:
	add	x9, x9, l_.str.2@PAGEOFF
	cmp	x0, #0
	csel	x0, x9, x8, eq
	bl	_warnx
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
LBB0_3:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_fd,4,2                         ; @fd
	.comm	_secsize,8,3                    ; @secsize
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"PART"

l_.str.1:                               ; @.str.1
	.asciz	"Failed to write MBR. Try to use gpart(8)."

l_.str.2:                               ; @.str.2
	.asciz	"Failed to write sector zero"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_write_disk
.subsections_via_symbols
