	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i5100_init_mtr
_i5100_init_mtr:                        ## @i5100_init_mtr
	.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	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	(%rdi), %rbx
	movq	16(%rbx), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	%rax, -64(%rbp)
	movq	8(%rbx), %rax
	movq	%rax, -56(%rbp)
	movq	_I5100_CHANNELS@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	testl	%ecx, %ecx
	jle	LBB0_11
## %bb.1:
	movq	_I5100_MAX_RANKS_PER_CHAN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%r12d, %r12d
	testl	%eax, %eax
	jle	LBB0_9
	.p2align	4, 0x90
LBB0_3:
	xorl	%r13d, %r13d
	xorl	%r14d, %r14d
	xorl	%r15d, %r15d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	_I5100_MTR_4@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leal	(%rax,%r15,2), %esi
	addl	$-8, %esi
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	leaq	-68(%rbp), %rdx
	callq	_pci_read_config_word
	movl	-68(%rbp), %edi
	callq	_i5100_mtr_present
	movq	(%rbx), %rcx
	movq	(%rcx,%r12,8), %rcx
	movl	%eax, 36(%rcx,%r13)
	movl	-68(%rbp), %edi
	callq	_i5100_mtr_ethrottle
	movq	(%rbx), %rcx
	movq	(%rcx,%r12,8), %rcx
	movl	%eax, 32(%rcx,%r13)
	movl	-68(%rbp), %edi
	callq	_i5100_mtr_width
                                        ## kill: def $eax killed $eax def $rax
	leal	4(,%rax,4), %eax
	movq	(%rbx), %rcx
	movq	(%rcx,%r12,8), %rcx
	movl	%eax, (%rcx,%r13)
	movl	-68(%rbp), %edi
	callq	_i5100_mtr_numbank
	addq	$2, %rax
	movq	(%rbx), %rcx
	movq	(%rcx,%r12,8), %rcx
	movq	%rax, 24(%rcx,%r13)
	movl	-68(%rbp), %edi
	callq	_i5100_mtr_numrow
	addq	$13, %rax
	movq	(%rbx), %rcx
	movq	(%rcx,%r12,8), %rcx
	movq	%rax, 16(%rcx,%r13)
	movl	-68(%rbp), %edi
	callq	_i5100_mtr_numcol
	addq	$10, %rax
	movq	(%rbx), %rcx
	movq	(%rcx,%r12,8), %rcx
	movq	%rax, 8(%rcx,%r13)
	incq	%r15
	movq	_I5100_MAX_RANKS_PER_CHAN@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	addl	$2, %r14d
	addq	$40, %r13
	cmpq	%rax, %r15
	jge	LBB0_8
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$3, %r15
	ja	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	_I5100_MTR_0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	addl	%r14d, %esi
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_8:
	movq	_I5100_CHANNELS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	incq	%r12
	movslq	%ecx, %rdx
	cmpq	%rdx, %r12
	jge	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	-64(%rbp,%r12,8), %rdx
	movq	%rdx, -80(%rbp)                 ## 8-byte Spill
	testl	%eax, %eax
	jg	LBB0_3
	jmp	LBB0_9
LBB0_11:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_13
## %bb.12:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_I5100_CHANNELS,4,2             ## @I5100_CHANNELS
	.comm	_I5100_MAX_RANKS_PER_CHAN,4,2   ## @I5100_MAX_RANKS_PER_CHAN
	.comm	_I5100_MTR_0,4,2                ## @I5100_MTR_0
	.comm	_I5100_MTR_4,4,2                ## @I5100_MTR_4
	.no_dead_strip	_i5100_init_mtr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i5100_init_mtr
_i5100_init_mtr:                        ; @i5100_init_mtr
	.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	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	ldr	x20, [x0]
	ldp	x8, x19, [x20, #8]
	stp	x19, x8, [sp, #8]
Lloh3:
	adrp	x8, _I5100_CHANNELS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _I5100_CHANNELS@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x8]
	cmp	w9, #1
	b.lt	LBB0_10
; %bb.1:
	mov	x22, #0
Lloh6:
	adrp	x23, _I5100_MAX_RANKS_PER_CHAN@GOTPAGE
Lloh7:
	ldr	x23, [x23, _I5100_MAX_RANKS_PER_CHAN@GOTPAGEOFF]
	ldr	w8, [x23]
Lloh8:
	adrp	x24, _I5100_MTR_0@GOTPAGE
Lloh9:
	ldr	x24, [x24, _I5100_MTR_0@GOTPAGEOFF]
Lloh10:
	adrp	x25, _I5100_MTR_4@GOTPAGE
Lloh11:
	ldr	x25, [x25, _I5100_MTR_4@GOTPAGEOFF]
	cmp	w8, #1
	b.lt	LBB0_8
LBB0_2:
	mov	x27, #0
	mov	w28, #0
	mov	x21, #0
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x25]
	add	w8, w8, w21, lsl #1
	sub	w1, w8, #8
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x2, sp, #4
	mov	x0, x19
	bl	_pci_read_config_word
	ldr	w0, [sp, #4]
	bl	_i5100_mtr_present
	ldr	x8, [x20]
	lsl	x26, x22, #3
	ldr	x8, [x8, x26]
	add	x8, x8, x27
	str	w0, [x8, #36]
	ldr	w0, [sp, #4]
	bl	_i5100_mtr_ethrottle
	ldr	x8, [x20]
	ldr	x8, [x8, x26]
	add	x8, x8, x27
	str	w0, [x8, #32]
	ldr	w0, [sp, #4]
	bl	_i5100_mtr_width
	lsl	w8, w0, #2
	add	w8, w8, #4
	ldr	x9, [x20]
	ldr	x9, [x9, x26]
	str	w8, [x9, x27]
	ldr	w0, [sp, #4]
	bl	_i5100_mtr_numbank
	add	x8, x0, #2
	ldr	x9, [x20]
	ldr	x9, [x9, x26]
	add	x9, x9, x27
	str	x8, [x9, #24]
	ldr	w0, [sp, #4]
	bl	_i5100_mtr_numrow
	add	x8, x0, #13
	ldr	x9, [x20]
	ldr	x9, [x9, x26]
	add	x9, x9, x27
	str	x8, [x9, #16]
	ldr	w0, [sp, #4]
	bl	_i5100_mtr_numcol
	add	x8, x0, #10
	ldr	x9, [x20]
	ldr	x9, [x9, x26]
	add	x9, x9, x27
	str	x8, [x9, #8]
	add	x21, x21, #1
	ldrsw	x8, [x23]
	add	w28, w28, #2
	add	x27, x27, #40
	cmp	x21, x8
	b.ge	LBB0_7
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	cmp	x21, #3
	b.hi	LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x24]
	add	w1, w28, w8
	b	LBB0_4
LBB0_7:
Lloh12:
	adrp	x9, _I5100_CHANNELS@GOTPAGE
Lloh13:
	ldr	x9, [x9, _I5100_CHANNELS@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	add	x22, x22, #1
	cmp	x22, w9, sxtw
	b.ge	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	add	x10, sp, #8
	ldr	x19, [x10, x22, lsl #3]
	cmp	w8, #1
	b.ge	LBB0_2
	b	LBB0_8
LBB0_10:
	ldr	x8, [sp, #24]
Lloh15:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh16:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_12
; %bb.11:
	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_12:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_I5100_CHANNELS,4,2             ; @I5100_CHANNELS
	.comm	_I5100_MAX_RANKS_PER_CHAN,4,2   ; @I5100_MAX_RANKS_PER_CHAN
	.comm	_I5100_MTR_0,4,2                ; @I5100_MTR_0
	.comm	_I5100_MTR_4,4,2                ; @I5100_MTR_4
	.no_dead_strip	_i5100_init_mtr
.subsections_via_symbols
