	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rsxx_load_config               ## -- Begin function rsxx_load_config
	.p2align	4, 0x90
_rsxx_load_config:                      ## @rsxx_load_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_CREG_ADD_CONFIG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	8(%rdi), %r15
	movl	$72, %edx
	movq	%r15, %rcx
	movl	$1, %r8d
	callq	_rsxx_creg_read
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_CARD_TO_DEV
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	xorl	%eax, %eax
	callq	_dev_err
LBB0_10:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	leaq	64(%r14), %r12
	movq	%r12, %rdi
	callq	_config_hdr_be_to_cpu
	movq	64(%r14), %rbx
	movq	_RSXX_CFG_VERSION@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	jne	LBB0_6
## %bb.3:
	movq	%r15, %rdi
	callq	_config_data_swab
	movq	%r15, %rdi
	callq	_config_data_crc32
	cmpq	72(%r14), %rax
	jne	LBB0_4
## %bb.5:
	movq	%r15, %rdi
	callq	_config_data_le_to_cpu
	jmp	LBB0_9
LBB0_6:
	movq	%r14, %rdi
	callq	_CARD_TO_DEV
	testq	%rbx, %rbx
	je	LBB0_8
## %bb.7:
	movq	(%r12), %rdx
	leaq	L_.str.3(%rip), %rsi
	xorl	%ebx, %ebx
	movl	%eax, %edi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_10
LBB0_4:
	movq	%rax, %r12
	movq	%r14, %rdi
	callq	_CARD_TO_DEV
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	movl	%eax, %edi
	xorl	%eax, %eax
	callq	_dev_err
	movq	%r14, %rdi
	callq	_CARD_TO_DEV
	movq	72(%r14), %rdx
	leaq	L_.str.2(%rip), %rsi
	movl	%eax, %edi
	movq	%r12, %rcx
	xorl	%eax, %eax
	callq	_dev_info
	movq	_EIO@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_10
LBB0_8:
	leaq	L_.str.4(%rip), %rsi
	movl	%eax, %edi
	xorl	%eax, %eax
	callq	_dev_info
	movq	%r15, %rdi
	callq	_initialize_config
	movq	%r14, %rdi
	callq	_rsxx_save_config
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_10
LBB0_9:
	movl	$1, (%r14)
	movq	%r14, %rdi
	callq	_CARD_TO_DEV
	movq	64(%r14), %rdx
	leaq	L_.str.5(%rip), %rsi
	movl	%eax, %edi
	callq	_dev_dbg
	movq	%r14, %rdi
	callq	_CARD_TO_DEV
	movq	72(%r14), %rdx
	leaq	L_.str.6(%rip), %rsi
	movl	%eax, %edi
	callq	_dev_dbg
	movq	%r14, %rdi
	callq	_CARD_TO_DEV
	movq	8(%r14), %rdx
	leaq	L_.str.7(%rip), %rsi
	movl	%eax, %edi
	callq	_dev_dbg
	movq	%r14, %rdi
	callq	_CARD_TO_DEV
	movq	16(%r14), %rdx
	leaq	L_.str.8(%rip), %rsi
	movl	%eax, %edi
	callq	_dev_dbg
	movq	%r14, %rdi
	callq	_CARD_TO_DEV
	movq	24(%r14), %rdx
	leaq	L_.str.9(%rip), %rsi
	movl	%eax, %edi
	callq	_dev_dbg
	movq	%r14, %rdi
	callq	_CARD_TO_DEV
	movq	32(%r14), %rdx
	leaq	L_.str.10(%rip), %rsi
	movl	%eax, %edi
	callq	_dev_dbg
	movq	%r14, %rdi
	callq	_CARD_TO_DEV
	movq	40(%r14), %rdx
	leaq	L_.str.11(%rip), %rsi
	movl	%eax, %edi
	callq	_dev_dbg
	movq	%r14, %rdi
	callq	_CARD_TO_DEV
	movq	48(%r14), %rdx
	leaq	L_.str.12(%rip), %rsi
	movl	%eax, %edi
	callq	_dev_dbg
	movq	%r14, %rdi
	callq	_CARD_TO_DEV
	movq	56(%r14), %rdx
	leaq	L_.str.13(%rip), %rsi
	movl	%eax, %edi
	callq	_dev_dbg
	xorl	%ebx, %ebx
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_CREG_ADD_CONFIG,4,2            ## @CREG_ADD_CONFIG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed reading card config.\n"

	.comm	_RSXX_CFG_VERSION,8,3           ## @RSXX_CFG_VERSION
L_.str.1:                               ## @.str.1
	.asciz	"Config corruption detected!\n"

L_.str.2:                               ## @.str.2
	.asciz	"CRC (sb x%08x is x%08x)\n"

	.comm	_EIO,4,2                        ## @EIO
L_.str.3:                               ## @.str.3
	.asciz	"Invalid config version %d.\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.4:                               ## @.str.4
	.asciz	"Initializing card configuration.\n"

L_.str.5:                               ## @.str.5
	.asciz	"version:     x%08x\n"

L_.str.6:                               ## @.str.6
	.asciz	"crc:         x%08x\n"

L_.str.7:                               ## @.str.7
	.asciz	"block_size:  x%08x\n"

L_.str.8:                               ## @.str.8
	.asciz	"stripe_size: x%08x\n"

L_.str.9:                               ## @.str.9
	.asciz	"vendor_id:   x%08x\n"

L_.str.10:                              ## @.str.10
	.asciz	"cache_order: x%08x\n"

L_.str.11:                              ## @.str.11
	.asciz	"mode:        x%08x\n"

L_.str.12:                              ## @.str.12
	.asciz	"count:       x%08x\n"

L_.str.13:                              ## @.str.13
	.asciz	"latency:     x%08x\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rsxx_load_config               ; -- Begin function rsxx_load_config
	.p2align	2
_rsxx_load_config:                      ; @rsxx_load_config
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _CREG_ADD_CONFIG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CREG_ADD_CONFIG@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x20, x0, #8
	mov	w2, #72
	mov	x3, x20
	mov	w4, #1
	bl	_rsxx_creg_read
	cbz	w0, LBB0_2
; %bb.1:
	mov	x21, x0
	mov	x0, x19
	bl	_CARD_TO_DEV
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	b	LBB0_11
LBB0_2:
	add	x21, x19, #64
	mov	x0, x21
	bl	_config_hdr_be_to_cpu
	ldr	x22, [x19, #64]
Lloh5:
	adrp	x8, _RSXX_CFG_VERSION@GOTPAGE
Lloh6:
	ldr	x8, [x8, _RSXX_CFG_VERSION@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	cmp	x22, x8
	b.ne	LBB0_5
; %bb.3:
	mov	x0, x20
	bl	_config_data_swab
	mov	x0, x20
	bl	_config_data_crc32
	ldr	x8, [x19, #72]
	cmp	x0, x8
	b.ne	LBB0_7
; %bb.4:
	mov	x0, x20
	bl	_config_data_le_to_cpu
	b	LBB0_10
LBB0_5:
	mov	x0, x19
	bl	_CARD_TO_DEV
	cbz	x22, LBB0_9
; %bb.6:
	ldr	x8, [x21]
	str	x8, [sp]
Lloh8:
	adrp	x1, l_.str.3@PAGE
Lloh9:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_err
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
	mov	x21, x0
	mov	x0, x19
	bl	_CARD_TO_DEV
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
	mov	x0, x19
	bl	_CARD_TO_DEV
	ldr	x8, [x19, #72]
	stp	x8, x21, [sp]
Lloh14:
	adrp	x1, l_.str.2@PAGE
Lloh15:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_info
Lloh16:
	adrp	x8, _EIO@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_11
LBB0_9:
Lloh18:
	adrp	x1, l_.str.4@PAGE
Lloh19:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_dev_info
	mov	x0, x20
	bl	_initialize_config
	mov	x0, x19
	bl	_rsxx_save_config
	mov	x21, x0
	cbnz	w0, LBB0_11
LBB0_10:
	mov	w8, #1
	str	w8, [x19]
	mov	x0, x19
	bl	_CARD_TO_DEV
	ldr	x2, [x19, #64]
Lloh20:
	adrp	x1, l_.str.5@PAGE
Lloh21:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_dev_dbg
	mov	x0, x19
	bl	_CARD_TO_DEV
	ldr	x2, [x19, #72]
Lloh22:
	adrp	x1, l_.str.6@PAGE
Lloh23:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_dev_dbg
	mov	x0, x19
	bl	_CARD_TO_DEV
	ldr	x2, [x19, #8]
Lloh24:
	adrp	x1, l_.str.7@PAGE
Lloh25:
	add	x1, x1, l_.str.7@PAGEOFF
	bl	_dev_dbg
	mov	x0, x19
	bl	_CARD_TO_DEV
	ldr	x2, [x19, #16]
Lloh26:
	adrp	x1, l_.str.8@PAGE
Lloh27:
	add	x1, x1, l_.str.8@PAGEOFF
	bl	_dev_dbg
	mov	x0, x19
	bl	_CARD_TO_DEV
	ldr	x2, [x19, #24]
Lloh28:
	adrp	x1, l_.str.9@PAGE
Lloh29:
	add	x1, x1, l_.str.9@PAGEOFF
	bl	_dev_dbg
	mov	x0, x19
	bl	_CARD_TO_DEV
	ldr	x2, [x19, #32]
Lloh30:
	adrp	x1, l_.str.10@PAGE
Lloh31:
	add	x1, x1, l_.str.10@PAGEOFF
	bl	_dev_dbg
	mov	x0, x19
	bl	_CARD_TO_DEV
	ldr	x2, [x19, #40]
Lloh32:
	adrp	x1, l_.str.11@PAGE
Lloh33:
	add	x1, x1, l_.str.11@PAGEOFF
	bl	_dev_dbg
	mov	x0, x19
	bl	_CARD_TO_DEV
	ldr	x2, [x19, #48]
Lloh34:
	adrp	x1, l_.str.12@PAGE
Lloh35:
	add	x1, x1, l_.str.12@PAGEOFF
	bl	_dev_dbg
	mov	x0, x19
	bl	_CARD_TO_DEV
	ldr	x2, [x19, #56]
Lloh36:
	adrp	x1, l_.str.13@PAGE
Lloh37:
	add	x1, x1, l_.str.13@PAGEOFF
	bl	_dev_dbg
	mov	w21, #0
LBB0_11:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_CREG_ADD_CONFIG,4,2            ; @CREG_ADD_CONFIG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed reading card config.\n"

	.comm	_RSXX_CFG_VERSION,8,3           ; @RSXX_CFG_VERSION
l_.str.1:                               ; @.str.1
	.asciz	"Config corruption detected!\n"

l_.str.2:                               ; @.str.2
	.asciz	"CRC (sb x%08x is x%08x)\n"

	.comm	_EIO,4,2                        ; @EIO
l_.str.3:                               ; @.str.3
	.asciz	"Invalid config version %d.\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.4:                               ; @.str.4
	.asciz	"Initializing card configuration.\n"

l_.str.5:                               ; @.str.5
	.asciz	"version:     x%08x\n"

l_.str.6:                               ; @.str.6
	.asciz	"crc:         x%08x\n"

l_.str.7:                               ; @.str.7
	.asciz	"block_size:  x%08x\n"

l_.str.8:                               ; @.str.8
	.asciz	"stripe_size: x%08x\n"

l_.str.9:                               ; @.str.9
	.asciz	"vendor_id:   x%08x\n"

l_.str.10:                              ; @.str.10
	.asciz	"cache_order: x%08x\n"

l_.str.11:                              ; @.str.11
	.asciz	"mode:        x%08x\n"

l_.str.12:                              ; @.str.12
	.asciz	"count:       x%08x\n"

l_.str.13:                              ; @.str.13
	.asciz	"latency:     x%08x\n"

.subsections_via_symbols
