	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function write_s0
_write_s0:                              ## @write_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	_iotest@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_1
## %bb.10:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_print_s0
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	_NDOSPART@GOTPCREL(%rip), %r12
	cmpl	$0, (%r12)
	jle	LBB0_4
## %bb.2:
	xorl	%ebx, %ebx
	movq	_mboot@GOTPCREL(%rip), %r15
	movq	_DOSPARTSIZE@GOTPCREL(%rip), %r13
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	_DOSPARTOFF@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	movslq	(%r13), %rcx
	movslq	%r14d, %rdi
	imulq	%rcx, %rdi
	addq	%rax, %rdi
	shlq	$2, %rdi
	addq	8(%r15), %rdi
	movq	16(%r15), %rsi
	addq	%rbx, %rsi
	callq	_dos_partition_enc
	incq	%r14
	movslq	(%r12), %rax
	addq	$4, %rbx
	cmpq	%rax, %r14
	jl	LBB0_3
LBB0_4:
	movq	_mboot@GOTPCREL(%rip), %r14
	movq	_DOSMAGICOFFSET@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	shlq	$2, %rdi
	addq	8(%r14), %rdi
	movq	_DOSMAGIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_le16enc
	movl	(%r14), %eax
	movq	_secsize@GOTPCREL(%rip), %r15
	movl	(%r15), %ecx
	cltd
	idivl	%ecx
	xorl	%ebx, %ebx
	testl	%eax, %eax
	jle	LBB0_9
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	imull	%ebx, %ecx
	movslq	%ecx, %rsi
	shlq	$2, %rsi
	addq	8(%r14), %rsi
	movl	%ebx, %edi
	callq	_write_disk
	cmpl	$-1, %eax
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	incl	%ebx
	movl	(%r14), %eax
	movl	(%r15), %ecx
	cltd
	idivl	%ecx
	cmpl	%eax, %ebx
	jl	LBB0_5
## %bb.7:
	xorl	%ebx, %ebx
	jmp	LBB0_9
LBB0_8:
	leaq	L_.str(%rip), %rdi
	callq	_warn
	movl	$-1, %ebx
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_iotest,8,3                     ## @iotest
	.comm	_NDOSPART,4,2                   ## @NDOSPART
	.comm	_mboot,24,3                     ## @mboot
	.comm	_DOSPARTOFF,4,2                 ## @DOSPARTOFF
	.comm	_DOSPARTSIZE,4,2                ## @DOSPARTSIZE
	.comm	_DOSMAGICOFFSET,8,3             ## @DOSMAGICOFFSET
	.comm	_DOSMAGIC,4,2                   ## @DOSMAGIC
	.comm	_secsize,4,2                    ## @secsize
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"can't write fdisk partition table"

	.no_dead_strip	_write_s0
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function write_s0
_write_s0:                              ; @write_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, _iotest@GOTPAGE
Lloh1:
	ldr	x8, [x8, _iotest@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_4
; %bb.1:
	bl	_print_s0
LBB0_2:
	mov	w0, #0
LBB0_3:
	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
LBB0_4:
Lloh3:
	adrp	x19, _NDOSPART@GOTPAGE
Lloh4:
	ldr	x19, [x19, _NDOSPART@GOTPAGEOFF]
	ldr	w8, [x19]
Lloh5:
	adrp	x20, _mboot@GOTPAGE
Lloh6:
	ldr	x20, [x20, _mboot@GOTPAGEOFF]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.5:
	mov	x21, #0
	mov	x22, #0
Lloh7:
	adrp	x23, _DOSPARTOFF@GOTPAGE
Lloh8:
	ldr	x23, [x23, _DOSPARTOFF@GOTPAGEOFF]
Lloh9:
	adrp	x24, _DOSPARTSIZE@GOTPAGE
Lloh10:
	ldr	x24, [x24, _DOSPARTSIZE@GOTPAGEOFF]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x23]
	ldr	w9, [x24]
	madd	w8, w9, w22, w8
	ldp	x9, x10, [x20, #8]
	add	x0, x9, w8, sxtw #2
	add	x1, x10, x21
	bl	_dos_partition_enc
	add	x22, x22, #1
	ldrsw	x8, [x19]
	add	x21, x21, #4
	cmp	x22, x8
	b.lt	LBB0_6
LBB0_7:
Lloh11:
	adrp	x8, _DOSMAGICOFFSET@GOTPAGE
Lloh12:
	ldr	x8, [x8, _DOSMAGICOFFSET@GOTPAGEOFF]
	ldr	x9, [x20, #8]
Lloh13:
	ldr	x8, [x8]
	add	x0, x9, x8, lsl #2
Lloh14:
	adrp	x8, _DOSMAGIC@GOTPAGE
Lloh15:
	ldr	x8, [x8, _DOSMAGIC@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	bl	_le16enc
	ldr	w9, [x20]
Lloh17:
	adrp	x21, _secsize@GOTPAGE
Lloh18:
	ldr	x21, [x21, _secsize@GOTPAGEOFF]
	ldr	w8, [x21]
	sdiv	w9, w9, w8
	cmp	w9, #1
	b.lt	LBB0_2
; %bb.8:
	mov	w19, #0
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x20, #8]
	mul	w8, w8, w19
	add	x1, x9, w8, sxtw #2
	mov	x0, x19
	bl	_write_disk
	cmn	w0, #1
	b.eq	LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	add	w19, w19, #1
	ldr	w9, [x20]
	ldr	w8, [x21]
	sdiv	w9, w9, w8
	cmp	w19, w9
	b.lt	LBB0_9
	b	LBB0_2
LBB0_11:
Lloh19:
	adrp	x0, l_.str@PAGE
Lloh20:
	add	x0, x0, l_.str@PAGEOFF
	bl	_warn
	mov	w0, #-1
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_iotest,8,3                     ; @iotest
	.comm	_NDOSPART,4,2                   ; @NDOSPART
	.comm	_mboot,24,3                     ; @mboot
	.comm	_DOSPARTOFF,4,2                 ; @DOSPARTOFF
	.comm	_DOSPARTSIZE,4,2                ; @DOSPARTSIZE
	.comm	_DOSMAGICOFFSET,8,3             ; @DOSMAGICOFFSET
	.comm	_DOSMAGIC,4,2                   ; @DOSMAGIC
	.comm	_secsize,4,2                    ; @secsize
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"can't write fdisk partition table"

	.no_dead_strip	_write_s0
.subsections_via_symbols
