	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function XboxGetHarddiskConfigurationData
_XboxGetHarddiskConfigurationData:      ## @XboxGetHarddiskConfigurationData
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movl	%edi, %r15d
	movl	$0, (%rsi)
	movq	_TAG_HW_RESOURCE_LIST@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movl	$8, %edi
	callq	_FrLdrHeapAlloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	%rax, %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movabsq	$4294967297, %rax               ## imm = 0x100000001
	movq	%rax, (%rbx)
	movl	$1, 8(%rbx)
	movq	_CmResourceTypeDeviceSpecific@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	16(%rbx), %rcx
	movl	%eax, 4(%rcx)
	movl	$4, (%rcx)
	leaq	-48(%rbp), %rsi
	movl	%r15d, %edi
	callq	_XboxDiskGetDriveGeometry
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movl	-36(%rbp), %r9d
	movl	-40(%rbp), %edx
	movl	-48(%rbp), %ecx
	movl	-44(%rbp), %r8d
	pshufd	$135, -48(%rbp), %xmm0          ## xmm0 = mem[3,1,0,2]
	movdqu	%xmm0, 4(%rbx)
	leaq	L_.str.2(%rip), %rdi
	movl	%r15d, %esi
	callq	_TRACE
	movl	$8, (%r14)
	jmp	LBB0_6
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_ERR
	jmp	LBB0_5
LBB0_4:
	leaq	L_.str.1(%rip), %rdi
	callq	_ERR
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_FrLdrHeapFree
LBB0_5:
	xorl	%ebx, %ebx
LBB0_6:
	movq	%rbx, %rax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TAG_HW_RESOURCE_LIST,4,2       ## @TAG_HW_RESOURCE_LIST
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to allocate a full resource descriptor\n"

	.comm	_CmResourceTypeDeviceSpecific,4,2 ## @CmResourceTypeDeviceSpecific
L_.str.1:                               ## @.str.1
	.asciz	"Reading disk geometry failed\n"

L_.str.2:                               ## @.str.2
	.asciz	"Disk %x: %u Cylinders  %u Heads  %u Sectors  %u Bytes\n"

	.no_dead_strip	_XboxGetHarddiskConfigurationData
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function XboxGetHarddiskConfigurationData
_XboxGetHarddiskConfigurationData:      ; @XboxGetHarddiskConfigurationData
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x1
	mov	x21, x0
	str	wzr, [x1]
Lloh0:
	adrp	x22, _TAG_HW_RESOURCE_LIST@GOTPAGE
Lloh1:
	ldr	x22, [x22, _TAG_HW_RESOURCE_LIST@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	w0, #8
	bl	_FrLdrHeapAlloc
	mov	x19, x0
	cbz	x0, LBB0_3
; %bb.1:
	mov	w23, #8
	mov	x0, x19
	mov	w1, #0
	mov	w2, #8
	bl	_memset
	movi.2s	v0, #1
	str	d0, [x19]
	mov	w8, #1
Lloh2:
	adrp	x9, _CmResourceTypeDeviceSpecific@GOTPAGE
Lloh3:
	ldr	x9, [x9, _CmResourceTypeDeviceSpecific@GOTPAGEOFF]
	str	w8, [x19, #8]
Lloh4:
	ldr	w8, [x9]
	ldr	x9, [x19, #16]
	mov	w10, #4
	stp	w10, w8, [x9]
	mov	x1, sp
	mov	x0, x21
	bl	_XboxDiskGetDriveGeometry
	cbz	x0, LBB0_4
; %bb.2:
	ldr	w5, [sp, #12]
	str	w5, [x19, #4]
	ldp	w4, w2, [sp, #4]
	ldr	w3, [sp]
	str	w4, [x19, #8]
	stp	w3, w2, [x19, #12]
Lloh5:
	adrp	x0, l_.str.2@PAGE
Lloh6:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x21
	bl	_TRACE
	str	w23, [x20]
	b	LBB0_5
LBB0_3:
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	bl	_ERR
	b	LBB0_5
LBB0_4:
Lloh9:
	adrp	x0, l_.str.1@PAGE
Lloh10:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_ERR
	ldr	w1, [x22]
	mov	x0, x19
	bl	_FrLdrHeapFree
	mov	x19, #0
LBB0_5:
	mov	x0, x19
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_TAG_HW_RESOURCE_LIST,4,2       ; @TAG_HW_RESOURCE_LIST
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to allocate a full resource descriptor\n"

	.comm	_CmResourceTypeDeviceSpecific,4,2 ; @CmResourceTypeDeviceSpecific
l_.str.1:                               ; @.str.1
	.asciz	"Reading disk geometry failed\n"

l_.str.2:                               ; @.str.2
	.asciz	"Disk %x: %u Cylinders  %u Heads  %u Sectors  %u Bytes\n"

	.no_dead_strip	_XboxGetHarddiskConfigurationData
.subsections_via_symbols
