	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function edac_device_create_instance
_edac_device_create_instance:           ## @edac_device_create_instance
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	8(%rdi), %r14
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movslq	%esi, %rbx
	shlq	$5, %rbx
	leaq	(%r14,%rbx), %r12
	addq	$8, %r12
	xorl	%r13d, %r13d
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movq	%r15, 24(%r14,%rbx)
	movq	%r15, %rdi
	callq	_kobject_get
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r13
	leaq	(%r14,%rbx), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	(%rax), %r8d
	movq	_ktype_instance_ctrl@GOTPCREL(%rip), %rsi
	leaq	L_.str(%rip), %rcx
	movq	%r12, %rdi
	movq	%r15, %rdx
	callq	_kobject_init_and_add
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx), %edx
	leaq	L_.str.1(%rip), %rsi
	movl	$2, %edi
	movl	%eax, %ebx
	xorl	%eax, %eax
	callq	_edac_dbg
	movq	%r13, %rdi
	callq	_kobject_put
	movl	%ebx, %eax
	jmp	LBB0_13
LBB0_1:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %r13d
	movl	%r13d, %eax
	jmp	LBB0_13
LBB0_4:
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	movl	4(%r14,%rbx), %edx
	leaq	L_.str.2(%rip), %rsi
	movl	$4, %edi
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	xorl	%eax, %eax
	callq	_edac_dbg
	cmpl	$0, 4(%r14,%rbx)
	jle	LBB0_12
## %bb.5:
	leaq	(%r14,%rbx), %r13
	addq	$4, %r13
	xorl	%ebx, %ebx
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	12(%r13), %rdx
	addq	%rbx, %rdx
	movq	%r15, %r14
	movq	%r15, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_edac_device_create_block
	testl	%eax, %eax
	jne	LBB0_7
## %bb.11:                              ##   in Loop: Header=BB0_6 Depth=1
	incq	%r12
	movslq	(%r13), %rax
	addq	$4, %rbx
	cmpq	%rax, %r12
	movq	%r14, %r15
	jl	LBB0_6
LBB0_12:
	movq	_KOBJ_ADD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_kobject_uevent
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %ecx
	leaq	L_.str.3(%rip), %rsi
	movl	$4, %edi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	xorl	%eax, %eax
	callq	_edac_dbg
	xorl	%eax, %eax
	jmp	LBB0_13
LBB0_7:
	movl	%eax, %r15d
	testl	%r12d, %r12d
	je	LBB0_10
## %bb.8:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	12(%r13), %rsi
	addq	%rbx, %rsi
	movq	%r14, %rdi
	callq	_edac_device_delete_block
	addq	$4, %rbx
	decq	%r12
	jne	LBB0_9
LBB0_10:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_kobject_put
	movl	%r15d, %eax
LBB0_13:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_ktype_instance_ctrl,4,2        ## @ktype_instance_ctrl
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s"

L_.str.1:                               ## @.str.1
	.asciz	"Failed to register instance '%s'\n"

L_.str.2:                               ## @.str.2
	.asciz	"now register '%d' blocks for instance %d\n"

	.comm	_KOBJ_ADD,4,2                   ## @KOBJ_ADD
L_.str.3:                               ## @.str.3
	.asciz	"Registered instance %d '%s' kobject\n"

	.no_dead_strip	_edac_device_create_instance
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function edac_device_create_instance
_edac_device_create_instance:           ; @edac_device_create_instance
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x1
	mov	x20, x0
	ldr	x25, [x0, #8]
	mov	x8, x1
	sxtw	x26, w8
	add	x22, x25, x26, lsl #5
	add	x19, x22, #8
	mov	x0, x19
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	str	x20, [x22, #24]
	mov	x0, x20
	bl	_kobject_get
	cbz	x0, LBB0_4
; %bb.1:
	mov	x24, x0
	ldr	w4, [x22]
Lloh0:
	adrp	x1, _ktype_instance_ctrl@GOTPAGE
Lloh1:
	ldr	x1, [x1, _ktype_instance_ctrl@GOTPAGEOFF]
Lloh2:
	adrp	x3, l_.str@PAGE
Lloh3:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	bl	_kobject_init_and_add
	cbz	w0, LBB0_5
; %bb.2:
	mov	x23, x0
	ldr	w2, [x22]
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #2
	bl	_edac_dbg
	mov	x0, x24
LBB0_3:
	bl	_kobject_put
	b	LBB0_10
LBB0_4:
Lloh6:
	adrp	x8, _ENODEV@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_10
LBB0_5:
	add	x23, x25, x26, lsl #5
	mov	x26, x23
	ldr	w2, [x26, #4]!
	str	x21, [sp]
Lloh9:
	adrp	x1, l_.str.2@PAGE
Lloh10:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #4
	bl	_edac_dbg
	ldr	w8, [x26]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.6:
	mov	x27, #0
	mov	x24, #0
	add	x25, x23, #16
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x25]
	add	x2, x8, x27
	mov	x0, x20
	mov	x1, x22
	bl	_edac_device_create_block
	cbnz	w0, LBB0_11
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	add	x24, x24, #1
	ldrsw	x8, [x26]
	add	x27, x27, #4
	cmp	x24, x8
	b.lt	LBB0_7
LBB0_9:
Lloh11:
	adrp	x8, _KOBJ_ADD@GOTPAGE
Lloh12:
	ldr	x8, [x8, _KOBJ_ADD@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_kobject_uevent
	ldr	w8, [x22]
	str	x8, [sp]
Lloh14:
	adrp	x1, l_.str.3@PAGE
Lloh15:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w0, #4
	mov	x2, x21
	bl	_edac_dbg
	mov	w23, #0
LBB0_10:
	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
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_11:
	mov	x23, x0
	cbz	w24, LBB0_14
; %bb.12:
	mov	x21, #0
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x25]
	add	x1, x8, x21
	mov	x0, x20
	bl	_edac_device_delete_block
	add	x21, x21, #4
	subs	x24, x24, #1
	b.ne	LBB0_13
LBB0_14:
	mov	x0, x19
	b	LBB0_3
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_ktype_instance_ctrl,4,2        ; @ktype_instance_ctrl
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s"

l_.str.1:                               ; @.str.1
	.asciz	"Failed to register instance '%s'\n"

l_.str.2:                               ; @.str.2
	.asciz	"now register '%d' blocks for instance %d\n"

	.comm	_KOBJ_ADD,4,2                   ; @KOBJ_ADD
l_.str.3:                               ; @.str.3
	.asciz	"Registered instance %d '%s' kobject\n"

	.no_dead_strip	_edac_device_create_instance
.subsections_via_symbols
