	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_segment_platform_config
_read_segment_platform_config:          ## @read_segment_platform_config
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	_EP_PAGE_SIZE@GOTPCREL(%rip), %r12
	movslq	(%r12), %r13
	movq	-16(%rsi,%r13), %rax
	movq	_FOOTER_VERSION@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rax
	jne	LBB0_3
## %bb.1:
	movq	%rdi, %rbx
	movq	_SEG_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	subl	-8(%r14,%r13), %edi
	jle	LBB0_3
## %bb.2:
	movq	%rdx, -96(%rbp)                 ## 8-byte Spill
	movq	%rcx, -104(%rbp)                ## 8-byte Spill
	movl	-4(%r14,%r13), %r15d
	callq	_MAX_TABLE_ENTRIES
	cmpl	%eax, %r15d
	jle	LBB0_6
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_4:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_5:
	movl	%ebx, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movl	-4(%r14,%r13), %edi
	callq	_DIRECTORY_SIZE
	movl	%eax, %ebx
	movslq	(%r12), %r15
	cmpl	%r15d, %eax
	jle	LBB0_11
## %bb.7:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_20
## %bb.8:
	movq	%rax, %r12
	movq	_SEG_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	subl	%ebx, %esi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%ebx, %edx
	movq	%r12, %rcx
	callq	_read_length
	testl	%eax, %eax
	je	LBB0_21
## %bb.9:
	movl	%eax, %ebx
	xorl	%r15d, %r15d
LBB0_10:
	movq	%r12, %rdi
	callq	_kfree
	jmp	LBB0_36
LBB0_11:
	addq	%r14, %r15
	movl	%ebx, -60(%rbp)                 ## 4-byte Spill
	movslq	%ebx, %rax
	subq	%rax, %r15
	xorl	%r12d, %r12d
LBB0_12:
	movl	-4(%r14,%r13), %ecx
	movq	_ENOENT@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	testl	%ecx, %ecx
	jle	LBB0_17
## %bb.13:
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	movq	_HFI1_EFT_PLATFORM_CONFIG@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	shlq	$4, %rcx
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	cmpq	%rdx, (%r15,%r12)
	je	LBB0_18
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
	addq	$16, %r12
	cmpq	%r12, %rcx
	jne	LBB0_14
## %bb.16:
	movq	-48(%rbp), %r12                 ## 8-byte Reload
LBB0_17:
	xorl	%r15d, %r15d
	jmp	LBB0_34
LBB0_18:
	movl	8(%r15,%r12), %ecx
	cmpl	$4097, %ecx                     ## imm = 0x1001
	jl	LBB0_22
## %bb.19:
	leaq	L_.str(%rip), %rsi
	xorl	%r15d, %r15d
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%ecx, %edx
	xorl	%eax, %eax
	callq	_dd_dev_err
	jmp	LBB0_32
LBB0_20:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_21:
	movl	%ebx, %ecx
	movl	%ebx, -60(%rbp)                 ## 4-byte Spill
	movq	%r12, %r15
	jmp	LBB0_12
LBB0_22:
	testl	%ecx, %ecx
	js	LBB0_31
## %bb.23:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ecx, %edi
	callq	_kmalloc
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_37
## %bb.24:
	movl	8(%r15,%r12), %r8d
	testl	%r8d, %r8d
	jle	LBB0_30
## %bb.25:
	movl	12(%r15,%r12), %edi
	movq	_SEG_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%edi, %eax
	cltd
	idivl	%ecx
	movl	%edx, %esi
	subl	%edx, %edi
	xorl	%eax, %eax
LBB0_26:                                ## =>This Inner Loop Header: Depth=1
	subl	%esi, %ecx
	testl	%edi, %edi
	jne	LBB0_28
## %bb.27:                              ##   in Loop: Header=BB0_26 Depth=1
	subl	-60(%rbp), %ecx                 ## 4-byte Folded Reload
	jle	LBB0_39
LBB0_28:                                ##   in Loop: Header=BB0_26 Depth=1
	subl	%eax, %r8d
	cmpl	%ecx, %r8d
	cmovgel	%ecx, %r8d
	movl	%r8d, -76(%rbp)                 ## 4-byte Spill
	addl	%edi, %esi
	movslq	%eax, %rcx
	addq	-72(%rbp), %rcx                 ## 8-byte Folded Reload
	movl	%edi, -84(%rbp)                 ## 4-byte Spill
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, -80(%rbp)                 ## 4-byte Spill
	movl	%r8d, %edx
	callq	_read_length
	testl	%eax, %eax
	jne	LBB0_38
## %bb.29:                              ##   in Loop: Header=BB0_26 Depth=1
	movl	-80(%rbp), %edx                 ## 4-byte Reload
	addl	-76(%rbp), %edx                 ## 4-byte Folded Reload
	movl	-8(%r14,%r13), %esi
	movq	_SEG_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	-84(%rbp), %edi                 ## 4-byte Reload
	addl	%ecx, %edi
	movl	8(%r15,%r12), %r8d
	cmpl	%edx, %r8d
	movl	%edx, %eax
	jg	LBB0_26
LBB0_30:
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movq	%rcx, (%rax)
	movq	-104(%rbp), %rax                ## 8-byte Reload
	movl	%r8d, (%rax)
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_kfree
	xorl	%ebx, %ebx
	jmp	LBB0_5
LBB0_31:
	movl	12(%r15,%r12), %edx
	leaq	L_.str.1(%rip), %rsi
	xorl	%r15d, %r15d
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_dd_dev_err
LBB0_32:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_33:
	movq	-48(%rbp), %r12                 ## 8-byte Reload
LBB0_34:
	movl	(%rax), %r14d
	movq	%r12, %rdi
	callq	_kfree
	testl	%r14d, %r14d
	je	LBB0_5
## %bb.35:
	negl	%r14d
	movl	%r14d, %ebx
LBB0_36:
	movq	%r15, %rdi
	callq	_kfree
	jmp	LBB0_5
LBB0_37:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	jmp	LBB0_33
LBB0_38:
	movl	%eax, %ebx
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_10
LBB0_39:
	movl	12(%r15,%r12), %edx
	leaq	L_.str.2(%rip), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_dd_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_34
	.cfi_endproc
                                        ## -- End function
	.comm	_EP_PAGE_SIZE,4,2               ## @EP_PAGE_SIZE
	.comm	_FOOTER_VERSION,8,3             ## @FOOTER_VERSION
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SEG_SIZE,4,2                   ## @SEG_SIZE
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_HFI1_EFT_PLATFORM_CONFIG,8,3   ## @HFI1_EFT_PLATFORM_CONFIG
	.comm	_ENOENT,4,2                     ## @ENOENT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Bad configuration file size 0x%x\n"

L_.str.1:                               ## @.str.1
	.asciz	"Bad configuration file start + size 0x%x+0x%x\n"

L_.str.2:                               ## @.str.2
	.asciz	"Bad configuration file - offset 0x%x within footer+table\n"

	.no_dead_strip	_read_segment_platform_config
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_segment_platform_config
_read_segment_platform_config:          ; @read_segment_platform_config
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
Lloh0:
	adrp	x19, _EP_PAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x19, [x19, _EP_PAGE_SIZE@GOTPAGEOFF]
	ldrsw	x8, [x19]
	add	x27, x1, x8
	ldur	x8, [x27, #-16]
Lloh2:
	adrp	x9, _FOOTER_VERSION@GOTPAGE
Lloh3:
	ldr	x9, [x9, _FOOTER_VERSION@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.1:
	mov	x20, x0
	ldur	w8, [x27, #-8]
Lloh5:
	adrp	x28, _SEG_SIZE@GOTPAGE
Lloh6:
	ldr	x28, [x28, _SEG_SIZE@GOTPAGEOFF]
	ldr	w9, [x28]
	subs	w0, w9, w8
	b.le	LBB0_3
; %bb.2:
	mov	x21, x3
	mov	x22, x2
	mov	x23, x1
	ldur	w24, [x27, #-4]
	bl	_MAX_TABLE_ENTRIES
	cmp	w24, w0
	b.le	LBB0_6
LBB0_3:
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w25, w8
LBB0_5:
	mov	x0, x25
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_6:
	ldur	w0, [x27, #-4]
	bl	_DIRECTORY_SIZE
	mov	x26, x0
	ldrsw	x8, [x19]
	cmp	w0, w8
	b.le	LBB0_11
; %bb.7:
Lloh9:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x26
	bl	_kmalloc
	cbz	x0, LBB0_20
; %bb.8:
	mov	x24, x0
	ldr	w8, [x28]
	sub	w1, w8, w26
	mov	x0, x20
	mov	x2, x26
	mov	x3, x24
	bl	_read_length
	cbz	w0, LBB0_21
; %bb.9:
	mov	x25, x0
	mov	x20, #0
LBB0_10:
	mov	x0, x24
	bl	_kfree
	b	LBB0_35
LBB0_11:
	mov	x24, #0
	add	x8, x23, x8
	sub	x8, x8, w26, sxtw
LBB0_12:
	ldur	w9, [x27, #-4]
	cmp	w9, #1
	b.lt	LBB0_17
; %bb.13:
Lloh12:
	adrp	x10, _HFI1_EFT_PLATFORM_CONFIG@GOTPAGE
Lloh13:
	ldr	x10, [x10, _HFI1_EFT_PLATFORM_CONFIG@GOTPAGEOFF]
Lloh14:
	ldr	x10, [x10]
	add	x23, x8, #12
Lloh15:
	adrp	x8, _ENOENT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldur	x11, [x23, #-12]
	cmp	x11, x10
	b.eq	LBB0_18
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	add	x23, x23, #16
	subs	x9, x9, #1
	b.ne	LBB0_14
; %bb.16:
	mov	x20, #0
	b	LBB0_33
LBB0_17:
	mov	x20, #0
Lloh17:
	adrp	x8, _ENOENT@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
	b	LBB0_33
LBB0_18:
	ldur	w2, [x23, #-4]
	cmp	w2, #1, lsl #12                 ; =4096
	b.le	LBB0_22
; %bb.19:
Lloh19:
	adrp	x1, l_.str@PAGE
Lloh20:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
                                        ; kill: def $w2 killed $w2 killed $x2
	b	LBB0_32
LBB0_20:
Lloh21:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_4
LBB0_21:
	mov	x8, x24
	b	LBB0_12
LBB0_22:
	tbnz	w2, #31, LBB0_31
; %bb.23:
Lloh23:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh24:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	mov	x0, x2
	bl	_kmalloc
	cbz	x0, LBB0_37
; %bb.24:
	stp	x24, x0, [sp, #16]              ; 16-byte Folded Spill
	ldur	w8, [x23, #-4]
	cmp	w8, #1
	b.lt	LBB0_30
; %bb.25:
	mov	w19, #0
	ldr	w9, [x23]
	ldr	w10, [x28]
	sdiv	w11, w9, w10
	mul	w24, w11, w10
	sub	w9, w9, w24
LBB0_26:                                ; =>This Inner Loop Header: Depth=1
	sub	w10, w10, w9
	cbnz	w24, LBB0_28
; %bb.27:                               ;   in Loop: Header=BB0_26 Depth=1
	subs	w10, w10, w26
	b.le	LBB0_39
LBB0_28:                                ;   in Loop: Header=BB0_26 Depth=1
	mov	x28, x26
	sub	w8, w8, w19
	cmp	w8, w10
	csel	w26, w8, w10, lt
	add	w1, w9, w24
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
	add	x3, x8, w19, sxtw
	mov	x0, x20
	mov	x2, x26
	bl	_read_length
	cbnz	w0, LBB0_38
; %bb.29:                               ;   in Loop: Header=BB0_26 Depth=1
	ldur	w9, [x27, #-8]
Lloh26:
	adrp	x8, _SEG_SIZE@GOTPAGE
Lloh27:
	ldr	x8, [x8, _SEG_SIZE@GOTPAGEOFF]
Lloh28:
	ldr	w10, [x8]
	add	w24, w10, w24
	ldur	w8, [x23, #-4]
	add	w19, w26, w19
	cmp	w8, w19
	mov	x26, x28
	b.gt	LBB0_26
LBB0_30:
	ldp	x0, x9, [sp, #16]               ; 16-byte Folded Reload
	str	x9, [x22]
	str	w8, [x21]
	bl	_kfree
	mov	w25, #0
	b	LBB0_5
LBB0_31:
	ldr	w8, [x23]
	str	x2, [sp]
Lloh29:
	adrp	x1, l_.str.1@PAGE
Lloh30:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	x2, x8
LBB0_32:
	bl	_dd_dev_err
	mov	x20, #0
Lloh31:
	adrp	x8, _EINVAL@GOTPAGE
Lloh32:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_33:
	ldr	w19, [x8]
	mov	x0, x24
	bl	_kfree
	cbz	w19, LBB0_36
; %bb.34:
	neg	w25, w19
LBB0_35:
	mov	x0, x20
	bl	_kfree
	b	LBB0_5
LBB0_36:
	mov	w25, #0
	b	LBB0_5
LBB0_37:
	mov	x20, #0
Lloh33:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh34:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_33
LBB0_38:
	mov	x25, x0
	ldp	x24, x20, [sp, #16]             ; 16-byte Folded Reload
	b	LBB0_10
LBB0_39:
	ldr	w2, [x23]
Lloh35:
	adrp	x1, l_.str.2@PAGE
Lloh36:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_dd_dev_err
Lloh37:
	adrp	x8, _EINVAL@GOTPAGE
Lloh38:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	ldp	x24, x20, [sp, #16]             ; 16-byte Folded Reload
	b	LBB0_33
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpAdd	Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.comm	_EP_PAGE_SIZE,4,2               ; @EP_PAGE_SIZE
	.comm	_FOOTER_VERSION,8,3             ; @FOOTER_VERSION
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SEG_SIZE,4,2                   ; @SEG_SIZE
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_HFI1_EFT_PLATFORM_CONFIG,8,3   ; @HFI1_EFT_PLATFORM_CONFIG
	.comm	_ENOENT,4,2                     ; @ENOENT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Bad configuration file size 0x%x\n"

l_.str.1:                               ; @.str.1
	.asciz	"Bad configuration file start + size 0x%x+0x%x\n"

l_.str.2:                               ; @.str.2
	.asciz	"Bad configuration file - offset 0x%x within footer+table\n"

	.no_dead_strip	_read_segment_platform_config
.subsections_via_symbols
