	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function do_format
_do_format:                             ## @do_format
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movl	%edi, %ebx
	movl	$1, %esi
	callq	_LOCK_FDC
	movl	%ebx, %edi
	callq	_set_floppy
	movq	__floppy@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.1:
	movq	(%rdi), %rax
	movq	_DP@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	(%rcx), %rax
	jg	LBB0_6
## %bb.2:
	cmpq	%rax, (%r14)
	jge	LBB0_6
## %bb.3:
	movq	8(%r14), %rax
	cmpq	8(%rdi), %rax
	jge	LBB0_6
## %bb.4:
	movl	16(%rdi), %r15d
	shll	$2, %r15d
	callq	_FD_SIZECODE
	movl	$-1, %edx
	movl	%eax, %ecx
	shll	%cl, %edx
	notl	%edx
	testl	%edx, %r15d
	je	LBB0_5
LBB0_6:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_process_fd_request
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_8:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	(%rbx), %rax
	cmpl	$0, 20(%rax)
	je	LBB0_6
## %bb.7:
	movups	(%r14), %xmm0
	movq	_format_req@GOTPCREL(%rip), %rax
	movups	%xmm0, (%rax)
	movq	_format_errors@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movq	_format_cont@GOTPCREL(%rip), %rcx
	movq	_cont@GOTPCREL(%rip), %rdx
	movq	%rcx, (%rdx)
	movq	_errors@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	movq	_redo_format@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_IWAIT
	xorl	%eax, %eax
	callq	_process_fd_request
                                        ## implicit-def: $ebx
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	__floppy,8,3                    ## @_floppy
	.comm	_DP,8,3                         ## @DP
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_format_req,16,3                ## @format_req
	.comm	_format_errors,8,3              ## @format_errors
	.comm	_format_cont,4,2                ## @format_cont
	.comm	_cont,8,3                       ## @cont
	.comm	_errors,8,3                     ## @errors
	.comm	_redo_format,4,2                ## @redo_format
	.no_dead_strip	_do_format
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function do_format
_do_format:                             ; @do_format
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x1
	mov	x20, x0
	mov	w1, #1
	bl	_LOCK_FDC
	mov	x0, x20
	bl	_set_floppy
Lloh0:
	adrp	x20, __floppy@GOTPAGE
Lloh1:
	ldr	x20, [x20, __floppy@GOTPAGEOFF]
	ldr	x0, [x20]
	cbz	x0, LBB0_5
; %bb.1:
	ldr	x8, [x0]
Lloh2:
	adrp	x9, _DP@GOTPAGE
Lloh3:
	ldr	x9, [x9, _DP@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	ldr	x9, [x9]
	cmp	x8, x9
	b.gt	LBB0_5
; %bb.2:
	ldr	x9, [x19]
	cmp	x9, x8
	b.ge	LBB0_5
; %bb.3:
	ldr	x8, [x19, #8]
	ldr	x9, [x0, #8]
	cmp	x8, x9
	b.ge	LBB0_5
; %bb.4:
	ldr	w21, [x0, #16]
	bl	_FD_SIZECODE
	mov	w8, #-1
	lsl	w8, w8, w0
	mvn	w8, w8
	tst	w8, w21, lsl #2
	b.eq	LBB0_7
LBB0_5:
	bl	_process_fd_request
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_7:
	ldr	x8, [x20]
	ldr	w8, [x8, #20]
	cbz	w8, LBB0_5
; %bb.8:
	ldr	q0, [x19]
Lloh8:
	adrp	x8, _format_req@GOTPAGE
Lloh9:
	ldr	x8, [x8, _format_req@GOTPAGEOFF]
Lloh10:
	str	q0, [x8]
Lloh11:
	adrp	x8, _format_errors@GOTPAGE
Lloh12:
	ldr	x8, [x8, _format_errors@GOTPAGEOFF]
	str	xzr, [x8]
Lloh13:
	adrp	x9, _cont@GOTPAGE
Lloh14:
	ldr	x9, [x9, _cont@GOTPAGEOFF]
Lloh15:
	adrp	x10, _format_cont@GOTPAGE
Lloh16:
	ldr	x10, [x10, _format_cont@GOTPAGEOFF]
Lloh17:
	str	x10, [x9]
Lloh18:
	adrp	x9, _errors@GOTPAGE
Lloh19:
	ldr	x9, [x9, _errors@GOTPAGEOFF]
Lloh20:
	str	x8, [x9]
Lloh21:
	adrp	x8, _redo_format@GOTPAGE
Lloh22:
	ldr	x8, [x8, _redo_format@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
	bl	_IWAIT
	bl	_process_fd_request
                                        ; implicit-def: $w0
	b	LBB0_6
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotStr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotStr	Lloh13, Lloh14, Lloh17
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotStr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	__floppy,8,3                    ; @_floppy
	.comm	_DP,8,3                         ; @DP
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_format_req,16,3                ; @format_req
	.comm	_format_errors,8,3              ; @format_errors
	.comm	_format_cont,4,2                ; @format_cont
	.comm	_cont,8,3                       ; @cont
	.comm	_errors,8,3                     ; @errors
	.comm	_redo_format,4,2                ; @redo_format
	.no_dead_strip	_do_format
.subsections_via_symbols
