	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fd_init
_fd_init:                               ## @fd_init
	.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
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	callq	_fd_count
	testl	%eax, %eax
	jle	LBB0_9
## %bb.1:
	movl	%eax, %r14d
	xorl	%r13d, %r13d
	movq	_bd_link@GOTPCREL(%rip), %r15
	movq	_fdinfo@GOTPCREL(%rip), %r12
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	leal	65(%r13), %eax
	movq	_biosfd@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	movsbl	%al, %esi
	leaq	L_.str(%rip), %rdi
	movl	%r13d, %ecx
	callq	_printf
	movl	(%r15), %edx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_STAILQ_INSERT_TAIL
	incl	%r13d
	cmpl	%r13d, %r14d
	je	LBB0_8
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	$1, %edi
	movl	$24, %esi
	callq	_calloc
	testq	%rax, %rax
	je	LBB0_9
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, %rbx
	movq	_BIOSDISK_SECSIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rbx)
	movq	_BD_FLOPPY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	movl	%r13d, (%rbx)
	movq	%rbx, %rdi
	callq	_bd_get_diskinfo_std
	testq	%rax, %rax
	jne	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpq	$0, 8(%rbx)
	jne	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_BD_NO_MEDIA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 16(%rbx)
	jmp	LBB0_7
LBB0_8:
	movl	%r14d, %r13d
	jmp	LBB0_9
LBB0_4:
	movq	%rbx, %rdi
	callq	_free
LBB0_9:
	movl	%r13d, %edi
	callq	_bcache_add_dev
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BIOSDISK_SECSIZE,4,2           ## @BIOSDISK_SECSIZE
	.comm	_BD_FLOPPY,4,2                  ## @BD_FLOPPY
	.comm	_BD_NO_MEDIA,4,2                ## @BD_NO_MEDIA
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"BIOS drive %c: is %s%d\n"

	.comm	_biosfd,8,3                     ## @biosfd
	.comm	_fdinfo,4,2                     ## @fdinfo
	.comm	_bd_link,4,2                    ## @bd_link
	.no_dead_strip	_fd_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fd_init
_fd_init:                               ; @fd_init
	.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
	bl	_fd_count
	cmp	w0, #1
	b.lt	LBB0_7
; %bb.1:
	mov	x20, x0
	mov	w19, #0
Lloh0:
	adrp	x24, _BIOSDISK_SECSIZE@GOTPAGE
Lloh1:
	ldr	x24, [x24, _BIOSDISK_SECSIZE@GOTPAGEOFF]
Lloh2:
	adrp	x25, _BD_FLOPPY@GOTPAGE
Lloh3:
	ldr	x25, [x25, _BD_FLOPPY@GOTPAGEOFF]
Lloh4:
	adrp	x26, _BD_NO_MEDIA@GOTPAGE
Lloh5:
	ldr	x26, [x26, _BD_NO_MEDIA@GOTPAGEOFF]
Lloh6:
	adrp	x27, _biosfd@GOTPAGE
Lloh7:
	ldr	x27, [x27, _biosfd@GOTPAGEOFF]
Lloh8:
	adrp	x21, l_.str@PAGE
Lloh9:
	add	x21, x21, l_.str@PAGEOFF
Lloh10:
	adrp	x28, _bd_link@GOTPAGE
Lloh11:
	ldr	x28, [x28, _bd_link@GOTPAGEOFF]
Lloh12:
	adrp	x22, _fdinfo@GOTPAGE
Lloh13:
	ldr	x22, [x22, _fdinfo@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	w8, w19, #65
	ldr	x2, [x27]
	sxtb	w1, w8
	mov	x0, x21
	mov	x3, x19
	bl	_printf
	ldr	w2, [x28]
	mov	x0, x22
	mov	x1, x23
	bl	_STAILQ_INSERT_TAIL
	add	w19, w19, #1
	cmp	w20, w19
	b.eq	LBB0_8
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #1
	mov	w1, #24
	bl	_calloc
	cbz	x0, LBB0_10
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x23, x0
	ldr	w8, [x24]
	ldr	w9, [x25]
	stp	w9, w8, [x0, #16]
	str	w19, [x0]
	bl	_bd_get_diskinfo_std
	cbnz	x0, LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x23, #8]
	cbnz	x8, LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x26]
	ldr	w9, [x23, #16]
	orr	w8, w9, w8
	str	w8, [x23, #16]
	b	LBB0_2
LBB0_7:
	mov	w19, #0
	b	LBB0_10
LBB0_8:
	mov	x19, x20
	b	LBB0_10
LBB0_9:
	mov	x0, x23
	bl	_free
LBB0_10:
	mov	x0, x19
	bl	_bcache_add_dev
	mov	w0, #0
	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	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_BIOSDISK_SECSIZE,4,2           ; @BIOSDISK_SECSIZE
	.comm	_BD_FLOPPY,4,2                  ; @BD_FLOPPY
	.comm	_BD_NO_MEDIA,4,2                ; @BD_NO_MEDIA
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"BIOS drive %c: is %s%d\n"

	.comm	_biosfd,8,3                     ; @biosfd
	.comm	_fdinfo,4,2                     ; @fdinfo
	.comm	_bd_link,4,2                    ; @bd_link
	.no_dead_strip	_fd_init
.subsections_via_symbols
