	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xgene_edac_pmd_add
_xgene_edac_pmd_add:                    ## @xgene_edac_pmd_add
	.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
	movl	%edx, %r12d
	movq	%rsi, %r13
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	(%rdi), %rdi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	_xgene_edac_pmd_add(%rip), %rsi
	callq	_devres_open_group
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	leaq	L_.str(%rip), %rsi
	leaq	-64(%rbp), %rdx
	movq	%r13, %rdi
	callq	_of_property_read_u32
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	(%r15), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
LBB0_6:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_14
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_22
LBB0_4:
	movl	12(%r15), %edi
	leaq	-76(%rbp), %rdx
	xorl	%esi, %esi
	callq	_regmap_read
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_5
LBB0_14:
	movq	(%r15), %rdi
	leaq	_xgene_edac_pmd_add(%rip), %rsi
	callq	_devres_release_group
LBB0_22:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_24
## %bb.23:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movl	-76(%rbp), %edi
	movl	-64(%rbp), %esi
	callq	_xgene_edac_pmd_available
	testl	%eax, %eax
	je	LBB0_6
## %bb.7:
	movl	-64(%rbp), %ecx
	leaq	L_.str.2(%rip), %rdx
	leaq	-58(%rbp), %r14
	movq	%r14, %rdi
	movl	$10, %esi
	callq	_snprintf
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_edac_device_alloc_index
                                        ## kill: def $eax killed $eax def $rax
	subq	$8, %rsp
	leaq	L_.str.3(%rip), %rcx
	movl	$48, %edi
	movq	%r14, %rsi
	movl	$1, %edx
	movl	$1, %r8d
	movl	$2, %r9d
	pushq	%rax
	pushq	$0
	pushq	$0
	callq	_edac_device_alloc_ctl_info
	addq	$32, %rsp
	testq	%rax, %rax
	je	LBB0_8
## %bb.9:
	movq	40(%rax), %r14
	leaq	L_.str.4(%rip), %rsi
	movq	%rsi, (%r14)
	movl	-64(%rbp), %ecx
	movl	%ecx, 8(%r14)
	movq	%r15, 40(%r14)
	movq	%rax, 32(%r14)
	movq	(%r15), %rcx
	movl	(%rcx), %ecx
	leaq	24(%r14), %rdx
	movl	%ecx, 24(%r14)
	movl	%r12d, 12(%r14)
	movq	%rdx, 32(%rax)
	movq	%rsi, (%rax)
	movq	%rsi, 8(%rax)
	movq	_EDAC_MOD_STR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	%rax, %r12
	movl	%ecx, 24(%rax)
	leaq	-72(%rbp), %rdx
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_of_address_to_resource
	movq	(%r15), %rdi
	testl	%eax, %eax
	js	LBB0_10
## %bb.11:
	leaq	-72(%rbp), %rsi
	callq	_devm_ioremap_resource
	movl	%eax, 20(%r14)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_15
## %bb.12:
	movq	(%r15), %rdi
	leaq	L_.str.6(%rip), %rsi
	callq	_dev_err
	movl	20(%r14), %edi
	callq	_PTR_ERR
	movl	%eax, %ebx
	jmp	LBB0_13
LBB0_8:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_14
LBB0_10:
	movl	%eax, %ebx
	leaq	L_.str.5(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_13
LBB0_15:
	movq	_edac_op_state@GOTPCREL(%rip), %r13
	movq	(%r13), %rax
	movq	_EDAC_OPSTATE_POLL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movq	%r12, %rbx
	jne	LBB0_17
## %bb.16:
	movq	_xgene_edac_pmd_check@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rbx)
LBB0_17:
	movq	%rbx, %rdi
	callq	_xgene_edac_pmd_create_debugfs_nodes
	movq	%rbx, %rdi
	callq	_edac_device_add_device
	testl	%eax, %eax
	jle	LBB0_19
## %bb.18:
	movq	(%r15), %rdi
	leaq	L_.str.7(%rip), %rsi
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_13:
	movq	%r12, %rdi
	callq	_edac_device_free_ctl_info
	jmp	LBB0_14
LBB0_19:
	movq	(%r13), %rax
	movq	_EDAC_OPSTATE_INT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_21
## %bb.20:
	movq	_OP_RUNNING_INTERRUPT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r12)
LBB0_21:
	leaq	16(%r14), %rdi
	leaq	8(%r15), %rsi
	callq	_list_add
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_xgene_edac_pmd_hw_ctl
	movq	(%r15), %rdi
	leaq	_xgene_edac_pmd_add(%rip), %rsi
	callq	_devres_remove_group
	movq	(%r15), %rdi
	movl	8(%r14), %edx
	leaq	L_.str.8(%rip), %rsi
	callq	_dev_info
	xorl	%ebx, %ebx
	jmp	LBB0_22
LBB0_24:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pmd-controller"

L_.str.1:                               ## @.str.1
	.asciz	"no pmd-controller property\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
L_.str.2:                               ## @.str.2
	.asciz	"l2c%d"

L_.str.3:                               ## @.str.3
	.asciz	"l2c"

L_.str.4:                               ## @.str.4
	.asciz	"xgene_pmd_err"

	.comm	_EDAC_MOD_STR,4,2               ## @EDAC_MOD_STR
L_.str.5:                               ## @.str.5
	.asciz	"no PMD resource address\n"

L_.str.6:                               ## @.str.6
	.asciz	"devm_ioremap_resource failed for PMD resource address\n"

	.comm	_edac_op_state,8,3              ## @edac_op_state
	.comm	_EDAC_OPSTATE_POLL,8,3          ## @EDAC_OPSTATE_POLL
	.comm	_xgene_edac_pmd_check,4,2       ## @xgene_edac_pmd_check
L_.str.7:                               ## @.str.7
	.asciz	"edac_device_add_device failed\n"

	.comm	_EDAC_OPSTATE_INT,8,3           ## @EDAC_OPSTATE_INT
	.comm	_OP_RUNNING_INTERRUPT,4,2       ## @OP_RUNNING_INTERRUPT
L_.str.8:                               ## @.str.8
	.asciz	"X-Gene EDAC PMD%d registered\n"

	.no_dead_strip	_xgene_edac_pmd_add
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xgene_edac_pmd_add
_xgene_edac_pmd_add:                    ; @xgene_edac_pmd_add
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x22, x2
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
	ldr	x0, [x0]
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
Lloh6:
	adrp	x1, _xgene_edac_pmd_add@PAGE
Lloh7:
	add	x1, x1, _xgene_edac_pmd_add@PAGEOFF
	bl	_devres_open_group
	cbz	w0, LBB0_5
; %bb.1:
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	add	x2, sp, #20
	mov	x0, x21
	bl	_of_property_read_u32
	cbz	x0, LBB0_6
; %bb.2:
	ldr	x0, [x19]
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
LBB0_3:
Lloh12:
	adrp	x8, _ENODEV@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_7
LBB0_5:
Lloh14:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_8
LBB0_6:
	ldr	w0, [x19, #12]
	add	x2, sp, #16
	mov	w1, #0
	bl	_regmap_read
	mov	x23, x0
	cbz	w0, LBB0_10
LBB0_7:
	ldr	x0, [x19]
Lloh17:
	adrp	x1, _xgene_edac_pmd_add@PAGE
Lloh18:
	add	x1, x1, _xgene_edac_pmd_add@PAGEOFF
	bl	_devres_release_group
LBB0_8:
	ldr	x8, [sp, #40]
Lloh19:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh20:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_25
; %bb.9:
	mov	x0, x23
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_10:
	ldp	w0, w1, [sp, #16]
	bl	_xgene_edac_pmd_available
	cbz	w0, LBB0_3
; %bb.11:
	ldr	w3, [sp, #20]
Lloh22:
	adrp	x2, l_.str.2@PAGE
Lloh23:
	add	x2, x2, l_.str.2@PAGEOFF
	add	x0, sp, #30
	mov	w1, #10
	bl	_snprintf
	bl	_edac_device_alloc_index
	str	w0, [sp]
Lloh24:
	adrp	x3, l_.str.3@PAGE
Lloh25:
	add	x3, x3, l_.str.3@PAGEOFF
	add	x1, sp, #30
	mov	w0, #48
	mov	w2, #1
	mov	w4, #1
	mov	w5, #2
	mov	x6, #0
	mov	w7, #0
	bl	_edac_device_alloc_ctl_info
	cbz	x0, LBB0_15
; %bb.12:
	mov	x20, x0
	ldr	x24, [x0, #40]
Lloh26:
	adrp	x8, l_.str.4@PAGE
Lloh27:
	add	x8, x8, l_.str.4@PAGEOFF
	str	x8, [x24]
	ldr	w9, [sp, #20]
	str	w9, [x24, #8]
	stp	x0, x19, [x24, #32]
	ldr	x9, [x19]
	ldr	w9, [x9]
	mov	x10, x24
	str	w9, [x10, #24]!
	str	w22, [x24, #12]
	str	x10, [x0, #32]
	stp	x8, x8, [x0]
Lloh28:
	adrp	x8, _EDAC_MOD_STR@GOTPAGE
Lloh29:
	ldr	x8, [x8, _EDAC_MOD_STR@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	str	w8, [x0, #24]
	add	x2, sp, #24
	mov	x0, x21
	mov	w1, #0
	bl	_of_address_to_resource
	mov	x23, x0
	ldr	x0, [x19]
	tbnz	w23, #31, LBB0_16
; %bb.13:
	add	x1, sp, #24
	bl	_devm_ioremap_resource
	str	w0, [x24, #20]
	bl	_IS_ERR
	cbz	x0, LBB0_17
; %bb.14:
	ldr	x0, [x19]
Lloh31:
	adrp	x1, l_.str.6@PAGE
Lloh32:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_dev_err
	ldr	w0, [x24, #20]
	bl	_PTR_ERR
	mov	x23, x0
	b	LBB0_21
LBB0_15:
Lloh33:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh34:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_4
LBB0_16:
Lloh35:
	adrp	x1, l_.str.5@PAGE
Lloh36:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_dev_err
	b	LBB0_21
LBB0_17:
Lloh37:
	adrp	x21, _edac_op_state@GOTPAGE
Lloh38:
	ldr	x21, [x21, _edac_op_state@GOTPAGEOFF]
	ldr	x8, [x21]
Lloh39:
	adrp	x9, _EDAC_OPSTATE_POLL@GOTPAGE
Lloh40:
	ldr	x9, [x9, _EDAC_OPSTATE_POLL@GOTPAGEOFF]
Lloh41:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_19
; %bb.18:
Lloh42:
	adrp	x8, _xgene_edac_pmd_check@GOTPAGE
Lloh43:
	ldr	x8, [x8, _xgene_edac_pmd_check@GOTPAGEOFF]
Lloh44:
	ldr	w8, [x8]
	str	w8, [x20, #20]
LBB0_19:
	mov	x0, x20
	bl	_xgene_edac_pmd_create_debugfs_nodes
	mov	x0, x20
	bl	_edac_device_add_device
	cmp	w0, #1
	b.lt	LBB0_22
; %bb.20:
	ldr	x0, [x19]
Lloh45:
	adrp	x1, l_.str.7@PAGE
Lloh46:
	add	x1, x1, l_.str.7@PAGEOFF
	bl	_dev_err
Lloh47:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh48:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh49:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_21:
	mov	x0, x20
	bl	_edac_device_free_ctl_info
	b	LBB0_7
LBB0_22:
	ldr	x8, [x21]
Lloh50:
	adrp	x9, _EDAC_OPSTATE_INT@GOTPAGE
Lloh51:
	ldr	x9, [x9, _EDAC_OPSTATE_INT@GOTPAGEOFF]
Lloh52:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_24
; %bb.23:
Lloh53:
	adrp	x8, _OP_RUNNING_INTERRUPT@GOTPAGE
Lloh54:
	ldr	x8, [x8, _OP_RUNNING_INTERRUPT@GOTPAGEOFF]
Lloh55:
	ldr	w8, [x8]
	str	w8, [x20, #16]
LBB0_24:
	add	x0, x24, #16
	add	x1, x19, #8
	bl	_list_add
	mov	x0, x20
	mov	w1, #1
	bl	_xgene_edac_pmd_hw_ctl
	ldr	x0, [x19]
Lloh56:
	adrp	x1, _xgene_edac_pmd_add@PAGE
Lloh57:
	add	x1, x1, _xgene_edac_pmd_add@PAGEOFF
	bl	_devres_remove_group
	ldr	x0, [x19]
	ldr	w2, [x24, #8]
Lloh58:
	adrp	x1, l_.str.8@PAGE
Lloh59:
	add	x1, x1, l_.str.8@PAGEOFF
	bl	_dev_info
	mov	w23, #0
	b	LBB0_8
LBB0_25:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpAdd	Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.loh AdrpAdd	Lloh58, Lloh59
	.loh AdrpAdd	Lloh56, Lloh57
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pmd-controller"

l_.str.1:                               ; @.str.1
	.asciz	"no pmd-controller property\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
l_.str.2:                               ; @.str.2
	.asciz	"l2c%d"

l_.str.3:                               ; @.str.3
	.asciz	"l2c"

l_.str.4:                               ; @.str.4
	.asciz	"xgene_pmd_err"

	.comm	_EDAC_MOD_STR,4,2               ; @EDAC_MOD_STR
l_.str.5:                               ; @.str.5
	.asciz	"no PMD resource address\n"

l_.str.6:                               ; @.str.6
	.asciz	"devm_ioremap_resource failed for PMD resource address\n"

	.comm	_edac_op_state,8,3              ; @edac_op_state
	.comm	_EDAC_OPSTATE_POLL,8,3          ; @EDAC_OPSTATE_POLL
	.comm	_xgene_edac_pmd_check,4,2       ; @xgene_edac_pmd_check
l_.str.7:                               ; @.str.7
	.asciz	"edac_device_add_device failed\n"

	.comm	_EDAC_OPSTATE_INT,8,3           ; @EDAC_OPSTATE_INT
	.comm	_OP_RUNNING_INTERRUPT,4,2       ; @OP_RUNNING_INTERRUPT
l_.str.8:                               ; @.str.8
	.asciz	"X-Gene EDAC PMD%d registered\n"

	.no_dead_strip	_xgene_edac_pmd_add
.subsections_via_symbols
