	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ide_setup                      ## -- Begin function ide_setup
	.p2align	4, 0x90
_ide_setup:                             ## @ide_setup
	.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
	subq	$568, %rsp                      ## imm = 0x238
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	callq	_ide_rdy
	movq	%r15, %rdi
	callq	_ide_bsy
	movl	$512, (%r15)                    ## imm = 0x200
	movq	16(%r15), %rdi
	addq	$2, %rdi
	movl	$1, %esi
	callq	_SetPhysByte
	movq	16(%r15), %rdi
	addq	$3, %rdi
	xorl	%esi, %esi
	callq	_SetPhysByte
	movq	16(%r15), %rdi
	addq	$4, %rdi
	xorl	%esi, %esi
	callq	_SetPhysByte
	movq	16(%r15), %rdi
	addq	$5, %rdi
	xorl	%esi, %esi
	callq	_SetPhysByte
	movq	16(%r15), %rdi
	addq	$6, %rdi
	xorl	%esi, %esi
	callq	_SetPhysByte
	movq	16(%r15), %rdi
	addq	$7, %rdi
	movl	$236, %esi
	callq	_SetPhysByte
	movq	%r15, %rdi
	callq	_ide_drq
	cmpl	$2, (%r15)
                                        ## implicit-def: $ax
                                        ## implicit-def: $cx
                                        ## implicit-def: $dx
	jb	LBB0_4
## %bb.1:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r15), %rdi
	callq	_GetPhysHalf
	movswl	%ax, %edi
	callq	_SWAP_W
	movw	%ax, -544(%rbp,%rbx,2)
	xorl	%eax, %eax
	callq	_sync
	incq	%rbx
	movslq	(%r15), %rax
	shrq	%rax
	cmpq	%rbx, %rax
	ja	LBB0_2
## %bb.3:
	movzwl	-542(%rbp), %edx
	movzwl	-538(%rbp), %ecx
	movzwl	-532(%rbp), %eax
LBB0_4:
	movw	%dx, 4(%r15)
	movw	%cx, 6(%r15)
	movw	%ax, 8(%r15)
	leaq	-490(%rbp), %rsi
	leaq	-592(%rbp), %r14
	movq	%r14, %rdi
	movl	$41, %edx
	callq	_strncpy
	movswl	4(%r15), %edx
	movswl	6(%r15), %ecx
	movswl	8(%r15), %r8d
	leaq	L_.str(%rip), %rdi
	movq	%r14, %rsi
	callq	_printf
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_6
## %bb.5:
	addq	$568, %rsp                      ## imm = 0x238
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"HARD DISC MODEL: %s c,h,s %d,%d,%d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ide_setup                      ; -- Begin function ide_setup
	.p2align	2
_ide_setup:                             ; @ide_setup
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	sub	sp, sp, #576
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	bl	_ide_rdy
	mov	x0, x19
	bl	_ide_bsy
	mov	w8, #512
	str	w8, [x19]
	ldr	x8, [x19, #16]
	add	x0, x8, #2
	mov	w1, #1
	bl	_SetPhysByte
	ldr	x8, [x19, #16]
	add	x0, x8, #3
	mov	w1, #0
	bl	_SetPhysByte
	ldr	x8, [x19, #16]
	add	x0, x8, #4
	mov	w1, #0
	bl	_SetPhysByte
	ldr	x8, [x19, #16]
	add	x0, x8, #5
	mov	w1, #0
	bl	_SetPhysByte
	ldr	x8, [x19, #16]
	add	x0, x8, #6
	mov	w1, #0
	bl	_SetPhysByte
	ldr	x8, [x19, #16]
	add	x0, x8, #7
	mov	w1, #236
	bl	_SetPhysByte
	mov	x0, x19
	bl	_ide_drq
	ldr	w11, [x19]
                                        ; implicit-def: $w8
                                        ; implicit-def: $w9
                                        ; implicit-def: $w10
	cmp	w11, #2
	b.lo	LBB0_4
; %bb.1:
	mov	x20, #0
	add	x21, sp, #56
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x19, #16]
	bl	_GetPhysHalf
	bl	_SWAP_W
	strh	w0, [x21, x20, lsl #1]
	bl	_sync
	add	x20, x20, #1
	ldrsw	x8, [x19]
	cmp	x20, x8, lsr #1
	b.lo	LBB0_2
; %bb.3:
	ldrh	w10, [sp, #58]
	ldrh	w9, [sp, #62]
	ldrh	w8, [sp, #68]
LBB0_4:
	strh	w10, [x19, #4]
	strh	w9, [x19, #6]
	strh	w8, [x19, #8]
	add	x8, sp, #56
	add	x1, x8, #54
	add	x0, sp, #15
	mov	w2, #41
	bl	_strncpy
	ldrsh	w2, [x19, #4]
	ldrsh	w3, [x19, #6]
	ldrsh	w4, [x19, #8]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	add	x1, sp, #15
	bl	_printf
	ldur	x8, [x29, #-40]
Lloh5:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh6:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_6
; %bb.5:
	add	sp, sp, #576
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_6:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"HARD DISC MODEL: %s c,h,s %d,%d,%d\n"

.subsections_via_symbols
