	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function doreadid
_doreadid:                              ## @doreadid
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movl	%esi, %ebx
	movl	%edi, %r15d
	movq	_FD_GTYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-88(%rbp), %rdx
	callq	_ioctl
	cmpl	$-1, %eax
	je	LBB0_1
## %bb.2:
	testl	%ebx, %ebx
	je	LBB0_3
LBB0_4:
	leaq	-112(%rbp), %r13
	xorl	%r12d, %r12d
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_printstatus
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$10, %edi
	callq	_putc
	movq	_EX_IOERR@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	decl	%ebx
	je	LBB0_13
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	-84(%rbp), %ecx
	movl	%r14d, %eax
	xorl	%edx, %edx
	divl	%ecx
	movl	%eax, -64(%rbp)
	cmpl	$2, %ecx
	movl	$0, %eax
	cmovbl	%eax, %edx
	movl	%edx, -56(%rbp)
	movq	_FD_READID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r15d, %edi
	leaq	-64(%rbp), %rdx
	callq	_ioctl
	testl	%eax, %eax
	je	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_EIO@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	_FD_GSTAT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r15d, %edi
	movq	%r13, %rdx
	callq	_ioctl
	cmpl	$-1, %eax
	jne	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	_EX_IOERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	callq	_errx
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_5 Depth=1
	movl	-64(%rbp), %esi
	movl	-56(%rbp), %edx
	movl	-52(%rbp), %ecx
	movl	-48(%rbp), %r8d
	leaq	L_.str.1(%rip), %rdi
	callq	_printf
	decl	%ebx
	jne	LBB0_5
	jmp	LBB0_13
LBB0_1:
	movq	_EX_OSERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_err
	testl	%ebx, %ebx
	jne	LBB0_4
LBB0_3:
	xorl	%r12d, %r12d
LBB0_13:
	movl	%r12d, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	leaq	L_.str.2(%rip), %rdi
	callq	_perror
	movq	_EX_OSERR@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_FD_GTYPE,4,2                   ## @FD_GTYPE
	.comm	_EX_OSERR,4,2                   ## @EX_OSERR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ioctl(FD_GTYPE) failed -- not a floppy?"

	.comm	_FD_READID,4,2                  ## @FD_READID
L_.str.1:                               ## @.str.1
	.asciz	"C = %d, H = %d, R = %d, N = %d\n"

	.comm	_errno,8,3                      ## @errno
	.comm	_EIO,8,3                        ## @EIO
L_.str.2:                               ## @.str.2
	.asciz	"non-IO error"

	.comm	_FD_GSTAT,4,2                   ## @FD_GSTAT
	.comm	_EX_IOERR,4,2                   ## @EX_IOERR
L_.str.3:                               ## @.str.3
	.asciz	"floppy IO error, but no FDC status"

	.comm	_stderr,4,2                     ## @stderr
	.no_dead_strip	_doreadid
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function doreadid
_doreadid:                              ; @doreadid
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #176
	.cfi_def_cfa_offset 176
	stp	x28, x27, [sp, #80]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #96]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #112]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #128]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #144]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #160]            ; 16-byte Folded Spill
	add	x29, sp, #160
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _FD_GTYPE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FD_GTYPE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #8
	bl	_ioctl
	cmn	w0, #1
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _EX_OSERR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EX_OSERR@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_err
LBB0_2:
	mov	w24, #0
	cbz	w20, LBB0_10
; %bb.3:
Lloh8:
	adrp	x25, _FD_READID@GOTPAGE
Lloh9:
	ldr	x25, [x25, _FD_READID@GOTPAGEOFF]
Lloh10:
	adrp	x26, _errno@GOTPAGE
Lloh11:
	ldr	x26, [x26, _errno@GOTPAGEOFF]
Lloh12:
	adrp	x27, _EIO@GOTPAGE
Lloh13:
	ldr	x27, [x27, _EIO@GOTPAGEOFF]
Lloh14:
	adrp	x28, _FD_GSTAT@GOTPAGE
Lloh15:
	ldr	x28, [x28, _FD_GSTAT@GOTPAGEOFF]
Lloh16:
	adrp	x23, _EX_IOERR@GOTPAGE
Lloh17:
	ldr	x23, [x23, _EX_IOERR@GOTPAGEOFF]
Lloh18:
	adrp	x22, _stderr@GOTPAGE
Lloh19:
	ldr	x22, [x22, _stderr@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x0, sp, #32
	mov	w1, #0
	bl	_printstatus
	ldr	w1, [x22]
	mov	w0, #10
	bl	_putc
	ldr	w24, [x23]
	subs	w20, w20, #1
	b.eq	LBB0_10
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [sp, #12]
	udiv	w9, w19, w8
	msub	w10, w9, w8, w19
	cmp	w8, #1
	csel	w8, w10, wzr, hi
	str	w9, [sp, #56]
	str	w8, [sp, #64]
	ldr	w1, [x25]
	add	x2, sp, #56
	mov	x0, x21
	bl	_ioctl
	cbz	w0, LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x26]
	ldr	x9, [x27]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w1, [x28]
	add	x2, sp, #32
	mov	x0, x21
	bl	_ioctl
	cmn	w0, #1
	b.ne	LBB0_4
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [x23]
Lloh20:
	adrp	x1, l_.str.3@PAGE
Lloh21:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_errx
	b	LBB0_4
LBB0_9:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w1, [sp, #56]
	ldp	w2, w3, [sp, #64]
	ldr	w4, [sp, #72]
Lloh22:
	adrp	x0, l_.str.1@PAGE
Lloh23:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_printf
	subs	w20, w20, #1
	b.ne	LBB0_5
LBB0_10:
	mov	x0, x24
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #112]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #96]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #176
	ret
LBB0_11:
Lloh24:
	adrp	x0, l_.str.2@PAGE
Lloh25:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_perror
Lloh26:
	adrp	x8, _EX_OSERR@GOTPAGE
Lloh27:
	ldr	x8, [x8, _EX_OSERR@GOTPAGEOFF]
Lloh28:
	ldr	w24, [x8]
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_FD_GTYPE,4,2                   ; @FD_GTYPE
	.comm	_EX_OSERR,4,2                   ; @EX_OSERR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ioctl(FD_GTYPE) failed -- not a floppy?"

	.comm	_FD_READID,4,2                  ; @FD_READID
l_.str.1:                               ; @.str.1
	.asciz	"C = %d, H = %d, R = %d, N = %d\n"

	.comm	_errno,8,3                      ; @errno
	.comm	_EIO,8,3                        ; @EIO
l_.str.2:                               ; @.str.2
	.asciz	"non-IO error"

	.comm	_FD_GSTAT,4,2                   ; @FD_GSTAT
	.comm	_EX_IOERR,4,2                   ; @EX_IOERR
l_.str.3:                               ; @.str.3
	.asciz	"floppy IO error, but no FDC status"

	.comm	_stderr,4,2                     ; @stderr
	.no_dead_strip	_doreadid
.subsections_via_symbols
