	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function DetectBiosFloppyController
_DetectBiosFloppyController:            ## @DetectBiosFloppyController
	.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	%rdi, %r14
	xorl	%eax, %eax
	callq	_MachGetFloppyCount
	movl	%eax, %r15d
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_TRACE
	movq	_TAG_HW_RESOURCE_LIST@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$12, %edi
	callq	_FrLdrHeapAlloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	%rax, %rdi
	xorl	%esi, %esi
	movl	$12, %edx
	callq	_memset
	movabsq	$4294967297, %rax               ## imm = 0x100000001
	movq	%rax, (%rbx)
	movl	$3, 8(%rbx)
	movq	16(%rbx), %rax
	movq	_CmResourceTypePort@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 56(%rax)
	movq	_CmResourceShareDeviceExclusive@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, 48(%rax)
	movq	_CM_RESOURCE_PORT_IO@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, 40(%rax)
	movl	$0, 36(%rax)
	movabsq	$4329327034376, %rcx            ## imm = 0x3F000000008
	movq	%rcx, 28(%rax)
	movq	_CmResourceTypeInterrupt@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 120(%rax)
	movq	_CmResourceShareUndetermined@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, 112(%rax)
	movq	_CM_RESOURCE_INTERRUPT_LATCHED@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	%rdx, 104(%rax)
	movabsq	$25769803782, %rdx              ## imm = 0x600000006
	movq	%rdx, 80(%rax)
	movl	$-1, 88(%rax)
	movq	_CmResourceTypeDma@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, 184(%rax)
	movq	%rcx, 176(%rax)
	movq	$0, 168(%rax)
	movl	$2, 128(%rax)
	movq	$0, 136(%rax)
	movq	_ControllerClass@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_DiskController@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_Output@GOTPCREL(%rip), %rax
	movq	_Input@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	leaq	-32(%rbp), %rax
	movq	%r14, %rdi
	xorl	%r8d, %r8d
	movl	$-1, %r9d
	pushq	%rax
	pushq	$12
	pushq	%rbx
	pushq	$0
	callq	_FldrCreateComponentKey
	addq	$32, %rsp
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_TRACE
	testl	%r15d, %r15d
	je	LBB0_4
## %bb.3:
	movq	-32(%rbp), %rdi
	callq	_DetectBiosFloppyPeripheral
LBB0_4:
	movq	-32(%rbp), %rax
	jmp	LBB0_5
LBB0_1:
	leaq	L_.str.1(%rip), %rdi
	callq	_ERR
	xorl	%eax, %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Floppy count: %u\n"

	.comm	_TAG_HW_RESOURCE_LIST,4,2       ## @TAG_HW_RESOURCE_LIST
L_.str.1:                               ## @.str.1
	.asciz	"Failed to allocate resource descriptor\n"

	.comm	_CmResourceTypePort,4,2         ## @CmResourceTypePort
	.comm	_CmResourceShareDeviceExclusive,8,3 ## @CmResourceShareDeviceExclusive
	.comm	_CM_RESOURCE_PORT_IO,8,3        ## @CM_RESOURCE_PORT_IO
	.comm	_CmResourceTypeInterrupt,4,2    ## @CmResourceTypeInterrupt
	.comm	_CmResourceShareUndetermined,8,3 ## @CmResourceShareUndetermined
	.comm	_CM_RESOURCE_INTERRUPT_LATCHED,8,3 ## @CM_RESOURCE_INTERRUPT_LATCHED
	.comm	_CmResourceTypeDma,4,2          ## @CmResourceTypeDma
	.comm	_ControllerClass,4,2            ## @ControllerClass
	.comm	_DiskController,4,2             ## @DiskController
	.comm	_Output,4,2                     ## @Output
	.comm	_Input,4,2                      ## @Input
L_.str.2:                               ## @.str.2
	.asciz	"Created key: DiskController\\0\n"

	.no_dead_strip	_DetectBiosFloppyController
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function DetectBiosFloppyController
lCPI0_0:
	.long	8                               ; 0x8
	.long	1008                            ; 0x3f0
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_DetectBiosFloppyController:            ; @DetectBiosFloppyController
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x20, x0
	bl	_MachGetFloppyCount
	mov	x19, x0
	str	x19, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_TRACE
Lloh2:
	adrp	x8, _TAG_HW_RESOURCE_LIST@GOTPAGE
Lloh3:
	ldr	x8, [x8, _TAG_HW_RESOURCE_LIST@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	w22, #12
	mov	w0, #12
	bl	_FrLdrHeapAlloc
	cbz	x0, LBB0_4
; %bb.1:
	mov	x21, x0
	mov	w1, #0
	mov	w2, #12
	bl	_memset
	movi.2s	v0, #1
	str	d0, [x21]
	mov	w8, #3
	str	w8, [x21, #8]
	ldr	x8, [x21, #16]
Lloh5:
	adrp	x9, _CmResourceTypePort@GOTPAGE
Lloh6:
	ldr	x9, [x9, _CmResourceTypePort@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	str	w9, [x8, #56]
Lloh8:
	adrp	x9, _CmResourceShareDeviceExclusive@GOTPAGE
Lloh9:
	ldr	x9, [x9, _CmResourceShareDeviceExclusive@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
Lloh11:
	adrp	x10, _CM_RESOURCE_PORT_IO@GOTPAGE
Lloh12:
	ldr	x10, [x10, _CM_RESOURCE_PORT_IO@GOTPAGEOFF]
Lloh13:
	ldr	x10, [x10]
	stp	x10, x9, [x8, #40]
	str	wzr, [x8, #36]
Lloh14:
	adrp	x9, lCPI0_0@PAGE
Lloh15:
	ldr	d0, [x9, lCPI0_0@PAGEOFF]
	stur	d0, [x8, #28]
Lloh16:
	adrp	x9, _CmResourceTypeInterrupt@GOTPAGE
Lloh17:
	ldr	x9, [x9, _CmResourceTypeInterrupt@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	str	w9, [x8, #120]
Lloh19:
	adrp	x9, _CmResourceShareUndetermined@GOTPAGE
Lloh20:
	ldr	x9, [x9, _CmResourceShareUndetermined@GOTPAGEOFF]
Lloh21:
	adrp	x10, _CM_RESOURCE_INTERRUPT_LATCHED@GOTPAGE
Lloh22:
	ldr	x10, [x10, _CM_RESOURCE_INTERRUPT_LATCHED@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
Lloh24:
	ldr	x10, [x10]
	stp	x10, x9, [x8, #104]
	movi.2s	v0, #6
	str	d0, [x8, #80]
	mov	w10, #-1
	str	w10, [x8, #88]
Lloh25:
	adrp	x10, _CmResourceTypeDma@GOTPAGE
Lloh26:
	ldr	x10, [x10, _CmResourceTypeDma@GOTPAGEOFF]
Lloh27:
	ldr	w10, [x10]
	str	w10, [x8, #184]
	stp	xzr, x9, [x8, #168]
	mov	w9, #2
	str	w9, [x8, #128]
Lloh28:
	adrp	x9, _ControllerClass@GOTPAGE
Lloh29:
	ldr	x9, [x9, _ControllerClass@GOTPAGEOFF]
	str	xzr, [x8, #136]
Lloh30:
	ldr	w1, [x9]
Lloh31:
	adrp	x8, _DiskController@GOTPAGE
Lloh32:
	ldr	x8, [x8, _DiskController@GOTPAGEOFF]
Lloh33:
	adrp	x9, _Output@GOTPAGE
Lloh34:
	ldr	x9, [x9, _Output@GOTPAGEOFF]
Lloh35:
	ldr	w9, [x9]
Lloh36:
	adrp	x10, _Input@GOTPAGE
Lloh37:
	ldr	x10, [x10, _Input@GOTPAGEOFF]
Lloh38:
	ldr	w10, [x10]
	orr	w3, w10, w9
Lloh39:
	ldr	w2, [x8]
	add	x8, sp, #24
	str	x8, [sp, #8]
	str	w22, [sp]
	mov	x0, x20
	mov	w4, #0
	mov	w5, #-1
	mov	x6, #0
	mov	x7, x21
	bl	_FldrCreateComponentKey
Lloh40:
	adrp	x0, l_.str.2@PAGE
Lloh41:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_TRACE
	cbz	w19, LBB0_3
; %bb.2:
	ldr	x0, [sp, #24]
	bl	_DetectBiosFloppyPeripheral
LBB0_3:
	ldr	x0, [sp, #24]
	b	LBB0_5
LBB0_4:
Lloh42:
	adrp	x0, l_.str.1@PAGE
Lloh43:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_ERR
	mov	x0, #0
LBB0_5:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh39
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh23
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdrp	Lloh14, Lloh16
	.loh AdrpLdr	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh42, Lloh43
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Floppy count: %u\n"

	.comm	_TAG_HW_RESOURCE_LIST,4,2       ; @TAG_HW_RESOURCE_LIST
l_.str.1:                               ; @.str.1
	.asciz	"Failed to allocate resource descriptor\n"

	.comm	_CmResourceTypePort,4,2         ; @CmResourceTypePort
	.comm	_CmResourceShareDeviceExclusive,8,3 ; @CmResourceShareDeviceExclusive
	.comm	_CM_RESOURCE_PORT_IO,8,3        ; @CM_RESOURCE_PORT_IO
	.comm	_CmResourceTypeInterrupt,4,2    ; @CmResourceTypeInterrupt
	.comm	_CmResourceShareUndetermined,8,3 ; @CmResourceShareUndetermined
	.comm	_CM_RESOURCE_INTERRUPT_LATCHED,8,3 ; @CM_RESOURCE_INTERRUPT_LATCHED
	.comm	_CmResourceTypeDma,4,2          ; @CmResourceTypeDma
	.comm	_ControllerClass,4,2            ; @ControllerClass
	.comm	_DiskController,4,2             ; @DiskController
	.comm	_Output,4,2                     ; @Output
	.comm	_Input,4,2                      ; @Input
l_.str.2:                               ; @.str.2
	.asciz	"Created key: DiskController\\0\n"

	.no_dead_strip	_DetectBiosFloppyController
.subsections_via_symbols
