	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bd_io
_bd_io:                                 ## @bd_io
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
                                        ## kill: def $edx killed $edx def $rdx
	testl	%ecx, %ecx
	js	LBB0_1
## %bb.2:
	movl	%r9d, %r12d
	movl	%r8d, %r15d
	movl	%ecx, %ebx
	movq	%rsi, %r13
	movq	_BD_MODEEDD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rsi)
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, %rdi
	movl	%edx, %esi
	movl	%ecx, %edx
	movl	%r8d, %ecx
	movl	%r9d, %r8d
	je	LBB0_4
## %bb.3:
	callq	_bd_edd_io
	jmp	LBB0_5
LBB0_1:
	movl	$-1, %r14d
	jmp	LBB0_32
LBB0_4:
	callq	_bd_chs_io
LBB0_5:
	movl	%eax, %r14d
	testl	%eax, %eax
	je	LBB0_6
## %bb.8:
	movl	4(%r13), %edi
	callq	_bd_reset_disk
	cmpl	$32, %r14d
	je	LBB0_11
## %bb.9:
	cmpl	$128, %r14d
	je	LBB0_11
## %bb.10:
	cmpl	$49, %r14d
	jne	LBB0_12
LBB0_11:
	movq	_BD_NO_MEDIA@GOTPCREL(%rip), %rcx
	movl	(%r13), %eax
	orl	(%rcx), %eax
	movl	%eax, (%r13)
LBB0_27:
	movq	_BD_NO_MEDIA@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_32
## %bb.28:
	movq	_BD_WR@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	8(%rcx), %rax
	movq	(%rax), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movl	(%rcx), %eax
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movl	%r15d, %edi
	callq	_VTOP
                                        ## kill: def $eax killed $eax def $rax
	cmpl	%r12d, %r13d
	jne	LBB0_30
## %bb.29:
	leaq	L_.str(%rip), %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movl	-56(%rbp), %edx                 ## 4-byte Reload
	movl	%ebx, %ecx
	movl	%r15d, %r8d
	movl	%eax, %r9d
	pushq	%r14
	pushq	-48(%rbp)                       ## 8-byte Folded Reload
	jmp	LBB0_31
LBB0_12:
	movq	_BD_MODEEDD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r13)
	je	LBB0_14
## %bb.13:
	movq	%r13, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	movl	%ebx, %edx
	movl	%r15d, %ecx
	movl	%r12d, %r8d
	callq	_bd_edd_io
	jmp	LBB0_15
LBB0_30:
	leaq	L_.str.1(%rip), %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movl	-56(%rbp), %edx                 ## 4-byte Reload
	movl	%ebx, %ecx
	movq	-48(%rbp), %r8                  ## 8-byte Reload
                                        ## kill: def $r8d killed $r8d killed $r8
	movl	%r15d, %r9d
	pushq	%r14
	pushq	%rax
LBB0_31:
	callq	_printf
	addq	$16, %rsp
	jmp	LBB0_32
LBB0_14:
	movq	%r13, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	movl	%ebx, %edx
	movl	%r15d, %ecx
	movl	%r12d, %r8d
	callq	_bd_chs_io
LBB0_15:
	movl	%eax, %r14d
	testl	%eax, %eax
	je	LBB0_6
## %bb.16:
	movl	4(%r13), %edi
	callq	_bd_reset_disk
	cmpl	$32, %r14d
	je	LBB0_11
## %bb.17:
	cmpl	$49, %r14d
	je	LBB0_11
## %bb.18:
	cmpl	$128, %r14d
	je	LBB0_11
## %bb.19:
	movq	_BD_MODEEDD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r13)
	je	LBB0_21
## %bb.20:
	movq	%r13, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	movl	%ebx, %edx
	movl	%r15d, %ecx
	movl	%r12d, %r8d
	callq	_bd_edd_io
	jmp	LBB0_22
LBB0_21:
	movq	%r13, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	movl	%ebx, %edx
	movl	%r15d, %ecx
	movl	%r12d, %r8d
	callq	_bd_chs_io
LBB0_22:
	movl	%eax, %r14d
	testl	%eax, %eax
	je	LBB0_6
## %bb.23:
	movl	4(%r13), %edi
	callq	_bd_reset_disk
	cmpl	$32, %r14d
	je	LBB0_11
## %bb.24:
	cmpl	$49, %r14d
	je	LBB0_11
## %bb.25:
	cmpl	$128, %r14d
	je	LBB0_11
## %bb.26:
	movl	(%r13), %eax
	jmp	LBB0_27
LBB0_6:
	movl	(%r13), %eax
	movq	_BD_NO_MEDIA@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	xorl	%r14d, %r14d
	testl	%eax, %ecx
	je	LBB0_32
## %bb.7:
	notl	%ecx
	andl	%ecx, %eax
	movl	%eax, (%r13)
LBB0_32:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BD_RD,4,2                      ## @BD_RD
	.comm	_BD_MODEEDD,4,2                 ## @BD_MODEEDD
	.comm	_BD_NO_MEDIA,4,2                ## @BD_NO_MEDIA
	.comm	_BD_WR,4,2                      ## @BD_WR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s%d: Write %d sector(s) from %p (0x%x) to %lld: 0x%x\n"

L_.str.1:                               ## @.str.1
	.asciz	"%s%d: Read %d sector(s) from %lld to %p (0x%x): 0x%x\n"

	.no_dead_strip	_bd_io
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bd_io
_bd_io:                                 ; @bd_io
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	tbnz	w3, #31, LBB0_3
; %bb.1:
	mov	x22, x5
	mov	x19, x4
	mov	x21, x3
	mov	x20, x2
	mov	x24, x1
	mov	x23, x0
	ldr	w8, [x1]
Lloh0:
	adrp	x27, _BD_MODEEDD@GOTPAGE
Lloh1:
	ldr	x27, [x27, _BD_MODEEDD@GOTPAGEOFF]
	ldr	w9, [x27]
	mov	x0, x1
	mov	x1, x2
	mov	x2, x3
	mov	x3, x4
	mov	x4, x5
	tst	w9, w8
	b.eq	LBB0_4
; %bb.2:
	bl	_bd_edd_io
	b	LBB0_5
LBB0_3:
	mov	w25, #-1
	b	LBB0_32
LBB0_4:
	bl	_bd_chs_io
LBB0_5:
	mov	x25, x0
Lloh2:
	adrp	x26, _BD_NO_MEDIA@GOTPAGE
Lloh3:
	ldr	x26, [x26, _BD_NO_MEDIA@GOTPAGEOFF]
	cbz	w0, LBB0_29
; %bb.6:
	ldr	w0, [x24, #4]
	bl	_bd_reset_disk
	cmp	w25, #32
	b.eq	LBB0_9
; %bb.7:
	cmp	w25, #128
	b.eq	LBB0_9
; %bb.8:
	cmp	w25, #49
	b.ne	LBB0_13
LBB0_9:
	ldr	w8, [x26]
	ldr	w9, [x24]
	orr	w8, w9, w8
	str	w8, [x24]
LBB0_10:
	ldr	w9, [x26]
	tst	w9, w8
	b.ne	LBB0_32
; %bb.11:
Lloh4:
	adrp	x8, _BD_WR@GOTPAGE
Lloh5:
	ldr	x8, [x8, _BD_WR@GOTPAGEOFF]
Lloh6:
	ldr	w26, [x8]
	ldr	x8, [x23, #8]
	ldr	x24, [x8]
	ldr	w23, [x23]
	mov	x0, x19
	bl	_VTOP
	mov	x6, x0
	cmp	w26, w22
	b.ne	LBB0_15
; %bb.12:
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x24
	mov	x2, x23
	mov	x3, x21
	mov	x4, x19
	mov	x5, x6
	mov	x6, x20
	b	LBB0_16
LBB0_13:
	ldr	w8, [x24]
	ldr	w9, [x27]
	mov	x0, x24
	mov	x1, x20
	mov	x2, x21
	mov	x3, x19
	mov	x4, x22
	tst	w9, w8
	b.eq	LBB0_17
; %bb.14:
	bl	_bd_edd_io
	mov	x25, x0
	cbnz	w0, LBB0_18
	b	LBB0_29
LBB0_15:
Lloh9:
	adrp	x0, l_.str.1@PAGE
Lloh10:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x24
	mov	x2, x23
	mov	x3, x21
	mov	x4, x20
	mov	x5, x19
LBB0_16:
	mov	x7, x25
	bl	_printf
	b	LBB0_32
LBB0_17:
	bl	_bd_chs_io
	mov	x25, x0
	cbz	w0, LBB0_29
LBB0_18:
	ldr	w0, [x24, #4]
	bl	_bd_reset_disk
	cmp	w25, #32
	b.eq	LBB0_9
; %bb.19:
	cmp	w25, #49
	b.eq	LBB0_9
; %bb.20:
	cmp	w25, #128
	b.eq	LBB0_9
; %bb.21:
	ldr	w8, [x24]
	ldr	w9, [x27]
	mov	x0, x24
	mov	x1, x20
	mov	x2, x21
	mov	x3, x19
	mov	x4, x22
	tst	w9, w8
	b.eq	LBB0_23
; %bb.22:
	bl	_bd_edd_io
	b	LBB0_24
LBB0_23:
	bl	_bd_chs_io
LBB0_24:
	mov	x25, x0
	cbz	w0, LBB0_29
; %bb.25:
	ldr	w0, [x24, #4]
	bl	_bd_reset_disk
	cmp	w25, #32
	b.eq	LBB0_9
; %bb.26:
	cmp	w25, #49
	b.eq	LBB0_9
; %bb.27:
	cmp	w25, #128
	b.eq	LBB0_9
; %bb.28:
	ldr	w8, [x24]
	b	LBB0_10
LBB0_29:
	ldr	w8, [x24]
	ldr	w9, [x26]
	tst	w9, w8
	b.eq	LBB0_31
; %bb.30:
	mov	w25, #0
	bic	w8, w8, w9
	str	w8, [x24]
	b	LBB0_32
LBB0_31:
	mov	w25, #0
LBB0_32:
	mov	x0, x25
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_BD_RD,4,2                      ; @BD_RD
	.comm	_BD_MODEEDD,4,2                 ; @BD_MODEEDD
	.comm	_BD_NO_MEDIA,4,2                ; @BD_NO_MEDIA
	.comm	_BD_WR,4,2                      ; @BD_WR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s%d: Write %d sector(s) from %p (0x%x) to %lld: 0x%x\n"

l_.str.1:                               ; @.str.1
	.asciz	"%s%d: Read %d sector(s) from %lld to %p (0x%x): 0x%x\n"

	.no_dead_strip	_bd_io
.subsections_via_symbols
