	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function SIO_DriveStatus
LCPI0_0:
	.long	24                              ## 0x18
	.long	255                             ## 0xff
	.long	1                               ## 0x1
	.long	0                               ## 0x0
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_SIO_DriveStatus
	.p2align	4, 0x90
_SIO_DriveStatus:                       ## @SIO_DriveStatus
	.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, %r15
	movq	_BINLOAD_start_binloading@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_2
## %bb.1:
	movaps	LCPI0_0(%rip), %xmm0            ## xmm0 = [24,255,1,0]
	movups	%xmm0, (%r15)
LBB0_20:
	movl	$67, %ebx
LBB0_21:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	_SIO_drive_status@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%edi, %r14
	movq	(%rax,%r14,8), %rax
	movq	_SIO_OFF@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	cmpq	(%rcx), %rax
	je	LBB0_21
## %bb.3:
	movq	_io_success@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rcx,%r14,4), %esi
	testl	%esi, %esi
	je	LBB0_10
## %bb.4:
	movq	_image_type@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	(%rdx,%r14,8), %rdx
	movq	_IMAGE_TYPE_PRO@GOTPCREL(%rip), %rdi
	cmpq	(%rdi), %rdx
	jne	LBB0_7
## %bb.5:
	movl	%r14d, %edi
	callq	_SeekSector
	movq	_disk@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax,%r14,8), %rcx
	movq	%r15, %rdi
	movl	$1, %esi
	movl	$4, %edx
	callq	_fread
	movl	$67, %ebx
	cmpl	$3, %eax
	jg	LBB0_21
## %bb.6:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_Log_print
	jmp	LBB0_21
LBB0_7:
	movq	_IMAGE_TYPE_VAPI@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rdx
	jne	LBB0_10
## %bb.8:
	movq	_SIO_NO_DISK@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	je	LBB0_10
## %bb.9:
	movq	_additional_info@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax,%r14,8), %rax
	movq	(%rax), %rax
	movl	(%rax), %edx
	movl	%edx, (%r15)
	movl	4(%rax), %ecx
	movl	%ecx, 4(%r15)
	movl	8(%rax), %r8d
	movl	%r8d, 8(%r15)
	movl	12(%rax), %r9d
	movl	%r9d, 12(%r15)
	leaq	L_.str.1(%rip), %rdi
	movl	%r14d, %esi
	xorl	%eax, %eax
	callq	_Log_print
	jmp	LBB0_20
LBB0_10:
	movl	$16, (%r15)
	movq	_disk@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	xorl	%esi, %esi
	cmpq	$0, (%rdx,%r14,8)
	setne	%sil
	shll	$7, %esi
	orl	$127, %esi
	movl	%esi, 4(%r15)
	cmpl	$0, (%rcx,%r14,4)
	je	LBB0_11
## %bb.12:
	movl	$20, (%r15)
	movl	$20, %ecx
	jmp	LBB0_13
LBB0_11:
	movl	$16, %ecx
LBB0_13:
	movq	_SIO_READ_ONLY@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	jne	LBB0_15
## %bb.14:
	orl	$8, %ecx
	movl	%ecx, (%r15)
LBB0_15:
	movq	_SIO_format_sectorsize@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpl	$256, (%rax,%r14,4)             ## imm = 0x100
	jne	LBB0_17
## %bb.16:
	orl	$32, %ecx
	movl	%ecx, (%r15)
LBB0_17:
	movq	_SIO_format_sectorcount@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpl	$1040, (%rax,%r14,4)            ## imm = 0x410
	jne	LBB0_19
## %bb.18:
	orl	$128, %ecx
	movl	%ecx, (%r15)
LBB0_19:
	movq	$1, 8(%r15)
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.comm	_BINLOAD_start_binloading,8,3   ## @BINLOAD_start_binloading
	.comm	_SIO_drive_status,8,3           ## @SIO_drive_status
	.comm	_SIO_OFF,8,3                    ## @SIO_OFF
	.comm	_io_success,8,3                 ## @io_success
	.comm	_image_type,8,3                 ## @image_type
	.comm	_IMAGE_TYPE_PRO,8,3             ## @IMAGE_TYPE_PRO
	.comm	_disk,8,3                       ## @disk
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SIO_DriveStatus: failed to read sector header"

	.comm	_IMAGE_TYPE_VAPI,8,3            ## @IMAGE_TYPE_VAPI
	.comm	_SIO_NO_DISK,8,3                ## @SIO_NO_DISK
	.comm	_additional_info,8,3            ## @additional_info
L_.str.1:                               ## @.str.1
	.asciz	"Drive Status unit %d %x %x %x %x"

	.comm	_SIO_READ_ONLY,8,3              ## @SIO_READ_ONLY
	.comm	_SIO_format_sectorsize,8,3      ## @SIO_format_sectorsize
	.comm	_SIO_format_sectorcount,8,3     ## @SIO_format_sectorcount
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ; -- Begin function SIO_DriveStatus
lCPI0_0:
	.long	24                              ; 0x18
	.long	255                             ; 0xff
	.long	1                               ; 0x1
	.long	0                               ; 0x0
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3
lCPI0_1:
	.long	1                               ; 0x1
	.long	0                               ; 0x0
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_SIO_DriveStatus
	.p2align	2
_SIO_DriveStatus:                       ; @SIO_DriveStatus
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
                                        ; kill: def $w0 killed $w0 def $x0
Lloh0:
	adrp	x8, _BINLOAD_start_binloading@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BINLOAD_start_binloading@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_4
; %bb.1:
Lloh3:
	adrp	x8, lCPI0_0@PAGE
Lloh4:
	ldr	q0, [x8, lCPI0_0@PAGEOFF]
	str	q0, [x19]
LBB0_2:
	mov	w0, #67
LBB0_3:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_4:
Lloh5:
	adrp	x8, _SIO_drive_status@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SIO_drive_status@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	ldr	x8, [x8, w0, sxtw #3]
Lloh8:
	adrp	x9, _SIO_OFF@GOTPAGE
Lloh9:
	ldr	x9, [x9, _SIO_OFF@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.5:
	mov	w0, #0
	b	LBB0_3
LBB0_6:
	sxtw	x20, w0
Lloh11:
	adrp	x9, _io_success@GOTPAGE
Lloh12:
	ldr	x9, [x9, _io_success@GOTPAGEOFF]
Lloh13:
	ldr	x10, [x9]
	ldr	w1, [x10, x20, lsl #2]
	cbz	w1, LBB0_11
; %bb.7:
Lloh14:
	adrp	x9, _image_type@GOTPAGE
Lloh15:
	ldr	x9, [x9, _image_type@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	ldr	x9, [x9, x20, lsl #3]
Lloh17:
	adrp	x11, _IMAGE_TYPE_PRO@GOTPAGE
Lloh18:
	ldr	x11, [x11, _IMAGE_TYPE_PRO@GOTPAGEOFF]
Lloh19:
	ldr	x11, [x11]
	cmp	x9, x11
	b.ne	LBB0_10
; %bb.8:
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_SeekSector
Lloh20:
	adrp	x8, _disk@GOTPAGE
Lloh21:
	ldr	x8, [x8, _disk@GOTPAGEOFF]
Lloh22:
	ldr	x8, [x8]
	ldr	x3, [x8, x20, lsl #3]
	mov	x0, x19
	mov	w1, #1
	mov	w2, #4
	bl	_fread
	cmp	w0, #3
	b.gt	LBB0_2
; %bb.9:
Lloh23:
	adrp	x0, l_.str@PAGE
Lloh24:
	add	x0, x0, l_.str@PAGEOFF
	bl	_Log_print
	b	LBB0_2
LBB0_10:
Lloh25:
	adrp	x11, _IMAGE_TYPE_VAPI@GOTPAGE
Lloh26:
	ldr	x11, [x11, _IMAGE_TYPE_VAPI@GOTPAGEOFF]
Lloh27:
	ldr	x11, [x11]
Lloh28:
	adrp	x12, _SIO_NO_DISK@GOTPAGE
Lloh29:
	ldr	x12, [x12, _SIO_NO_DISK@GOTPAGEOFF]
Lloh30:
	ldr	x12, [x12]
	cmp	x9, x11
	ccmp	x8, x12, #4, eq
	b.ne	LBB0_20
LBB0_11:
Lloh31:
	adrp	x11, _disk@GOTPAGE
Lloh32:
	ldr	x11, [x11, _disk@GOTPAGEOFF]
	mov	w9, #16
Lloh33:
	ldr	x11, [x11]
	ldr	x11, [x11, x20, lsl #3]
	cmp	x11, #0
	mov	w11, #255
	mov	w12, #127
	csel	w11, w12, w11, eq
	stp	w9, w11, [x19]
	ldr	w10, [x10, x20, lsl #2]
	cbz	w10, LBB0_13
; %bb.12:
	mov	w9, #20
	str	w9, [x19]
LBB0_13:
Lloh34:
	adrp	x10, _SIO_READ_ONLY@GOTPAGE
Lloh35:
	ldr	x10, [x10, _SIO_READ_ONLY@GOTPAGEOFF]
Lloh36:
	ldr	x10, [x10]
	cmp	x8, x10
	b.ne	LBB0_15
; %bb.14:
	orr	w9, w9, #0x8
	str	w9, [x19]
LBB0_15:
Lloh37:
	adrp	x8, _SIO_format_sectorsize@GOTPAGE
Lloh38:
	ldr	x8, [x8, _SIO_format_sectorsize@GOTPAGEOFF]
Lloh39:
	ldr	x8, [x8]
	ldr	w8, [x8, x20, lsl #2]
	cmp	w8, #256
	b.ne	LBB0_17
; %bb.16:
	orr	w9, w9, #0x20
	str	w9, [x19]
LBB0_17:
Lloh40:
	adrp	x8, _SIO_format_sectorcount@GOTPAGE
Lloh41:
	ldr	x8, [x8, _SIO_format_sectorcount@GOTPAGEOFF]
Lloh42:
	ldr	x8, [x8]
	ldr	w8, [x8, x20, lsl #2]
	cmp	w8, #1040
	b.ne	LBB0_19
; %bb.18:
	orr	w8, w9, #0x80
	str	w8, [x19]
LBB0_19:
Lloh43:
	adrp	x8, lCPI0_1@PAGE
Lloh44:
	ldr	d0, [x8, lCPI0_1@PAGEOFF]
	str	d0, [x19, #8]
	b	LBB0_2
LBB0_20:
Lloh45:
	adrp	x8, _additional_info@GOTPAGE
Lloh46:
	ldr	x8, [x8, _additional_info@GOTPAGEOFF]
Lloh47:
	ldr	x8, [x8]
	ldr	x8, [x8, x20, lsl #3]
	ldr	x8, [x8]
	ldr	w9, [x8]
	str	w9, [x19]
	ldr	w10, [x8, #4]
	str	w10, [x19, #4]
	ldr	w11, [x8, #8]
	str	w11, [x19, #8]
	ldr	w8, [x8, #12]
	str	w8, [x19, #12]
	stp	x11, x8, [sp, #24]
	stp	x9, x10, [sp, #8]
                                        ; kill: def $w0 killed $w0 killed $x0 def $x0
	str	x0, [sp]
Lloh48:
	adrp	x0, l_.str.1@PAGE
Lloh49:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_Log_print
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdr	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdr	Lloh43, Lloh44
	.loh AdrpAdd	Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.cfi_endproc
                                        ; -- End function
	.comm	_BINLOAD_start_binloading,8,3   ; @BINLOAD_start_binloading
	.comm	_SIO_drive_status,8,3           ; @SIO_drive_status
	.comm	_SIO_OFF,8,3                    ; @SIO_OFF
	.comm	_io_success,8,3                 ; @io_success
	.comm	_image_type,8,3                 ; @image_type
	.comm	_IMAGE_TYPE_PRO,8,3             ; @IMAGE_TYPE_PRO
	.comm	_disk,8,3                       ; @disk
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SIO_DriveStatus: failed to read sector header"

	.comm	_IMAGE_TYPE_VAPI,8,3            ; @IMAGE_TYPE_VAPI
	.comm	_SIO_NO_DISK,8,3                ; @SIO_NO_DISK
	.comm	_additional_info,8,3            ; @additional_info
l_.str.1:                               ; @.str.1
	.asciz	"Drive Status unit %d %x %x %x %x"

	.comm	_SIO_READ_ONLY,8,3              ; @SIO_READ_ONLY
	.comm	_SIO_format_sectorsize,8,3      ; @SIO_format_sectorsize
	.comm	_SIO_format_sectorcount,8,3     ; @SIO_format_sectorcount
.subsections_via_symbols
