	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_IDE_Initialise                 ## -- Begin function IDE_Initialise
	.p2align	4, 0x90
_IDE_Initialise:                        ## @IDE_Initialise
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r14
	movq	_TRUE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_IDE_debug@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_2
## %bb.1:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_fprintf
LBB0_2:
	movl	(%r14), %r15d
	cmpl	$2, %r15d
	jl	LBB0_16
## %bb.3:
	movl	%ebx, -60(%rbp)                 ## 4-byte Spill
	movl	$1, -44(%rbp)                   ## 4-byte Folded Spill
	xorl	%eax, %eax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movl	$1, %ebx
	movq	%r14, -80(%rbp)                 ## 8-byte Spill
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_7 Depth=1
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movslq	%ecx, %rax
	incl	%ecx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%r13, (%rcx,%rax,8)
LBB0_6:                                 ##   in Loop: Header=BB0_7 Depth=1
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	movl	(%r14), %r15d
	movl	%r12d, %ebx
	cmpl	%r15d, %r12d
	jge	LBB0_17
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	leal	1(%rbx), %r12d
	movslq	%ebx, %r14
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax,%r14,8), %r13
	movq	%r13, %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_13
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	%r13, %rdi
	leaq	L_.str.3(%rip), %rsi
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_4
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	%r13, %rdi
	leaq	L_.str.4(%rip), %rsi
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_15
## %bb.10:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	%r13, %rdi
	leaq	L_.str.5(%rip), %rsi
	callq	_strcmp
	testl	%eax, %eax
	jne	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_7 Depth=1
	leaq	L_.str.6(%rip), %rdi
	xorl	%eax, %eax
	callq	_Log_print
	leaq	L_.str.7(%rip), %rdi
	xorl	%eax, %eax
	callq	_Log_print
	leaq	L_.str.8(%rip), %rdi
	xorl	%eax, %eax
	callq	_Log_print
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax,%r14,8), %r13
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_7 Depth=1
	cmpl	%r15d, %r12d
	jge	LBB0_19
## %bb.14:                              ##   in Loop: Header=BB0_7 Depth=1
	movslq	%r12d, %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx,%rax,8), %rdi
	callq	_Util_strdup
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	addl	$2, %ebx
	movl	%ebx, %r12d
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_7 Depth=1
	movq	_IDE_debug@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_15:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	_device@GOTPCREL(%rip), %rax
LBB0_5:                                 ##   in Loop: Header=BB0_7 Depth=1
	movl	$1, (%rax)
	jmp	LBB0_6
LBB0_16:
	movl	$1, (%r14)
	jmp	LBB0_20
LBB0_17:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%r14)
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	testq	%r14, %r14
	movl	-60(%rbp), %ebx                 ## 4-byte Reload
	je	LBB0_20
## %bb.18:
	movq	_device@GOTPCREL(%rip), %rdi
	movq	%r14, %rsi
	callq	_ide_init_drive
	movl	%eax, %ebx
	movq	_IDE_enabled@GOTPCREL(%rip), %rax
	movl	%ebx, (%rax)
	movq	%r14, %rdi
	callq	_free
	jmp	LBB0_20
LBB0_19:
	leaq	L_.str.2(%rip), %rdi
	movq	%r13, %rsi
	xorl	%eax, %eax
	callq	_Log_print
	movq	_FALSE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_20:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TRUE,4,2                       ## @TRUE
	.comm	_IDE_debug,4,2                  ## @IDE_debug
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ide: init\n"

L_.str.1:                               ## @.str.1
	.asciz	"-ide"

L_.str.2:                               ## @.str.2
	.asciz	"Missing argument for '%s'"

	.comm	_FALSE,4,2                      ## @FALSE
L_.str.3:                               ## @.str.3
	.asciz	"-ide_debug"

L_.str.4:                               ## @.str.4
	.asciz	"-ide_cf"

	.comm	_device,4,2                     ## @device
L_.str.5:                               ## @.str.5
	.asciz	"-help"

L_.str.6:                               ## @.str.6
	.asciz	"\t-ide <file>      Enable IDE emulation"

L_.str.7:                               ## @.str.7
	.asciz	"\t-ide_debug       Enable IDE Debug Output"

L_.str.8:                               ## @.str.8
	.asciz	"\t-ide_cf          Enable CF emulation"

	.comm	_IDE_enabled,4,2                ## @IDE_enabled
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_IDE_Initialise                 ; -- Begin function IDE_Initialise
	.p2align	2
_IDE_Initialise:                        ; @IDE_Initialise
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x21, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _TRUE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh2:
	ldr	w19, [x8]
Lloh3:
	adrp	x8, _IDE_debug@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IDE_debug@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cbz	w8, LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _stderr@GOTPAGE
Lloh7:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fprintf
LBB0_2:
	ldr	w25, [x20]
	cmp	w25, #2
	b.lt	LBB0_15
; %bb.3:
	str	w19, [sp, #12]                  ; 4-byte Folded Spill
	mov	x22, #0
Lloh11:
	adrp	x23, l_.str.1@PAGE
Lloh12:
	add	x23, x23, l_.str.1@PAGEOFF
Lloh13:
	adrp	x24, l_.str.3@PAGE
Lloh14:
	add	x24, x24, l_.str.3@PAGEOFF
	mov	w19, #1
	mov	w27, #1
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
Lloh15:
	adrp	x8, _IDE_debug@GOTPAGE
Lloh16:
	ldr	x8, [x8, _IDE_debug@GOTPAGEOFF]
	mov	w9, #1
Lloh17:
	str	w9, [x8]
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	w25, [x20]
	cmp	w27, w25
	b.ge	LBB0_16
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
                                        ; kill: def $w27 killed $w27 killed $x27 def $x27
	sxtw	x26, w27
	ldr	x28, [x21, w27, sxtw #3]
	add	x27, x26, #1
	mov	x0, x28
	mov	x1, x23
	bl	_strcmp
	cbz	w0, LBB0_12
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x28
	mov	x1, x24
	bl	_strcmp
	cbz	w0, LBB0_4
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x28
Lloh18:
	adrp	x1, l_.str.4@PAGE
Lloh19:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_strcmp
	cbz	w0, LBB0_14
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x28
Lloh20:
	adrp	x1, l_.str.5@PAGE
Lloh21:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_strcmp
	cbnz	w0, LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=1
Lloh22:
	adrp	x0, l_.str.6@PAGE
Lloh23:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_Log_print
Lloh24:
	adrp	x0, l_.str.7@PAGE
Lloh25:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_Log_print
Lloh26:
	adrp	x0, l_.str.8@PAGE
Lloh27:
	add	x0, x0, l_.str.8@PAGEOFF
	bl	_Log_print
	ldr	x28, [x21, x26, lsl #3]
LBB0_11:                                ;   in Loop: Header=BB0_6 Depth=1
	str	x28, [x21, w19, sxtw #3]
	add	w19, w19, #1
	b	LBB0_5
LBB0_12:                                ;   in Loop: Header=BB0_6 Depth=1
	cmp	w27, w25
	b.ge	LBB0_18
; %bb.13:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	x0, [x21, x27, lsl #3]
	bl	_Util_strdup
	mov	x22, x0
	add	w27, w26, #2
	b	LBB0_5
LBB0_14:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	w8, #1
Lloh28:
	adrp	x9, _device@GOTPAGE
Lloh29:
	ldr	x9, [x9, _device@GOTPAGEOFF]
Lloh30:
	str	w8, [x9]
	b	LBB0_5
LBB0_15:
	mov	w8, #1
	str	w8, [x20]
	b	LBB0_19
LBB0_16:
	str	w19, [x20]
	ldr	w19, [sp, #12]                  ; 4-byte Folded Reload
	cbz	x22, LBB0_19
; %bb.17:
Lloh31:
	adrp	x0, _device@GOTPAGE
Lloh32:
	ldr	x0, [x0, _device@GOTPAGEOFF]
	mov	x1, x22
	bl	_ide_init_drive
	mov	x19, x0
Lloh33:
	adrp	x8, _IDE_enabled@GOTPAGE
Lloh34:
	ldr	x8, [x8, _IDE_enabled@GOTPAGEOFF]
Lloh35:
	str	w0, [x8]
	mov	x0, x22
	bl	_free
	b	LBB0_19
LBB0_18:
	str	x28, [sp]
Lloh36:
	adrp	x0, l_.str.2@PAGE
Lloh37:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_Log_print
Lloh38:
	adrp	x8, _FALSE@GOTPAGE
Lloh39:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh40:
	ldr	w19, [x8]
LBB0_19:
	mov	x0, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotStr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotStr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotStr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpAdd	Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_TRUE,4,2                       ; @TRUE
	.comm	_IDE_debug,4,2                  ; @IDE_debug
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ide: init\n"

l_.str.1:                               ; @.str.1
	.asciz	"-ide"

l_.str.2:                               ; @.str.2
	.asciz	"Missing argument for '%s'"

	.comm	_FALSE,4,2                      ; @FALSE
l_.str.3:                               ; @.str.3
	.asciz	"-ide_debug"

l_.str.4:                               ; @.str.4
	.asciz	"-ide_cf"

	.comm	_device,4,2                     ; @device
l_.str.5:                               ; @.str.5
	.asciz	"-help"

l_.str.6:                               ; @.str.6
	.asciz	"\t-ide <file>      Enable IDE emulation"

l_.str.7:                               ; @.str.7
	.asciz	"\t-ide_debug       Enable IDE Debug Output"

l_.str.8:                               ; @.str.8
	.asciz	"\t-ide_cf          Enable CF emulation"

	.comm	_IDE_enabled,4,2                ; @IDE_enabled
.subsections_via_symbols
