	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_elm_config                     ## -- Begin function elm_config
	.p2align	4, 0x90
_elm_config:                            ## @elm_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, -44(%rbp)                 ## 4-byte Spill
	movl	%ecx, %r15d
	movl	%edx, %r12d
	movl	%esi, %ebx
	movq	%rdi, %r14
	callq	_dev_get_drvdata
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r13
	movq	_ELM_ECC_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leal	1(%rdx), %eax
	shrl	$31, %eax
	addl	%edx, %eax
	incl	%eax
	sarl	%eax
	cmpl	%r15d, %eax
	jge	LBB0_5
## %bb.3:
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	movl	%r15d, %edx
	jmp	LBB0_4
LBB0_1:
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EPROBE_DEFER@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_8
LBB0_5:
	movq	_ERROR_VECTOR_MAX@GOTPCREL(%rip), %rax
	cmpl	%r12d, (%rax)
	jge	LBB0_7
## %bb.6:
	leaq	L_.str.2(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	movl	%r12d, %edx
LBB0_4:
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_8
LBB0_7:
	movq	_ECC_BCH_LEVEL_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%ebx, %eax
	shll	$16, %edx
	orl	%eax, %edx
	movq	_ELM_LOCATION_CONFIG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_elm_write_reg
	movl	%ebx, (%r13)
	movl	%r12d, 4(%r13)
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 8(%r13)
	xorl	%ebx, %ebx
LBB0_8:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unable to configure elm - device not probed?\n"

	.comm	_EPROBE_DEFER,4,2               ## @EPROBE_DEFER
	.comm	_ELM_ECC_SIZE,4,2               ## @ELM_ECC_SIZE
L_.str.1:                               ## @.str.1
	.asciz	"unsupported config ecc-size=%d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ERROR_VECTOR_MAX,4,2           ## @ERROR_VECTOR_MAX
L_.str.2:                               ## @.str.2
	.asciz	"unsupported config ecc-step=%d\n"

	.comm	_ECC_BCH_LEVEL_MASK,4,2         ## @ECC_BCH_LEVEL_MASK
	.comm	_ELM_LOCATION_CONFIG,4,2        ## @ELM_LOCATION_CONFIG
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_elm_config                     ; -- Begin function elm_config
	.p2align	2
_elm_config:                            ; @elm_config
	.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, x4
	mov	x24, x3
	mov	x19, x2
	mov	x22, x1
	mov	x21, x0
	bl	_dev_get_drvdata
	cbz	x0, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _ELM_ECC_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ELM_ECC_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	add	w9, w8, #1
	add	w10, w8, #2
	cmp	w9, #0
	csinc	w9, w10, w8, lt
	cmp	w24, w9, asr #1
	b.le	LBB0_4
; %bb.2:
	str	x24, [sp]
Lloh3:
	adrp	x1, l_.str.1@PAGE
Lloh4:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_6
LBB0_3:
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_dev_err
Lloh7:
	adrp	x8, _EPROBE_DEFER@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EPROBE_DEFER@GOTPAGEOFF]
	b	LBB0_7
LBB0_4:
Lloh9:
	adrp	x9, _ERROR_VECTOR_MAX@GOTPAGE
Lloh10:
	ldr	x9, [x9, _ERROR_VECTOR_MAX@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	cmp	w9, w19
	b.ge	LBB0_9
; %bb.5:
	str	x19, [sp]
Lloh12:
	adrp	x1, l_.str.2@PAGE
Lloh13:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_6:
	mov	x0, x21
	bl	_dev_err
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	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
LBB0_9:
	mov	x23, x0
Lloh16:
	adrp	x9, _ECC_BCH_LEVEL_MASK@GOTPAGE
Lloh17:
	ldr	x9, [x9, _ECC_BCH_LEVEL_MASK@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	and	w9, w9, w22
	orr	w2, w9, w8, lsl #16
Lloh19:
	adrp	x8, _ELM_LOCATION_CONFIG@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ELM_LOCATION_CONFIG@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	bl	_elm_write_reg
	mov	w0, #0
	stp	w22, w19, [x23]
	str	w20, [x23, #8]
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unable to configure elm - device not probed?\n"

	.comm	_EPROBE_DEFER,4,2               ; @EPROBE_DEFER
	.comm	_ELM_ECC_SIZE,4,2               ; @ELM_ECC_SIZE
l_.str.1:                               ; @.str.1
	.asciz	"unsupported config ecc-size=%d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ERROR_VECTOR_MAX,4,2           ; @ERROR_VECTOR_MAX
l_.str.2:                               ; @.str.2
	.asciz	"unsupported config ecc-step=%d\n"

	.comm	_ECC_BCH_LEVEL_MASK,4,2         ; @ECC_BCH_LEVEL_MASK
	.comm	_ELM_LOCATION_CONFIG,4,2        ; @ELM_LOCATION_CONFIG
.subsections_via_symbols
