	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nvmem_register                 ## -- Begin function nvmem_register
	.p2align	4, 0x90
_nvmem_register:                        ## @nvmem_register
	.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
	cmpq	$0, 40(%rdi)
	je	LBB0_1
## %bb.4:
	movq	%rdi, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movl	$88, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%rax, %r13
	movl	(%rbx), %ecx
	movq	_nvmem_ida@GOTPCREL(%rip), %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_ida_simple_get
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_7
## %bb.8:
	leaq	84(%r13), %rdi
	callq	_kref_init
	leaq	80(%r13), %rdi
	callq	_INIT_LIST_HEAD
	movl	%ebx, (%r13)
	movq	88(%r14), %rcx
	movq	%rcx, 72(%r13)
	movq	40(%r14), %rax
	testq	%rcx, %rcx
	jne	LBB0_11
## %bb.9:
	movq	8(%rax), %rcx
	testq	%rcx, %rcx
	je	LBB0_11
## %bb.10:
	movq	(%rcx), %rcx
	movq	%rcx, 72(%r13)
LBB0_11:
	movq	80(%r14), %rcx
	testq	%rcx, %rcx
	movl	$1, %edx
	cmovel	%edx, %ecx
	movl	%ecx, 4(%r13)
	movq	72(%r14), %rcx
	testq	%rcx, %rcx
	cmovel	%edx, %ecx
	movl	%ecx, 8(%r13)
	movl	68(%r14), %ecx
	movl	%ecx, 64(%r13)
	movq	_nvmem_provider_type@GOTPCREL(%rip), %rcx
	movq	%rcx, 40(%r13)
	movq	_nvmem_bus_type@GOTPCREL(%rip), %rcx
	movq	%rcx, 32(%r13)
	movq	%rax, 24(%r13)
	movups	52(%r14), %xmm0
	movups	%xmm0, 48(%r13)
	cmpl	$0, 48(%r14)
	jne	LBB0_13
## %bb.12:
	movl	(%rax), %eax
	movl	%eax, 20(%r13)
LBB0_13:
	leaq	16(%r13), %r15
	cmpl	$-1, (%r14)
	movq	24(%r14), %rdx
	je	LBB0_14
LBB0_16:
	testq	%rdx, %rdx
	leaq	L_.str.2(%rip), %rax
	cmovneq	%rdx, %rax
	movq	%r13, %rcx
	cmovneq	%r14, %rcx
	movl	(%rcx), %ecx
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	_dev_set_name
	jmp	LBB0_17
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_5:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%edi, %edi
	subl	(%rax), %edi
	jmp	LBB0_3
LBB0_7:
	movq	%r13, %rdi
	callq	_kfree
	movl	%ebx, %edi
	jmp	LBB0_3
LBB0_14:
	testq	%rdx, %rdx
	je	LBB0_15
## %bb.32:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_set_name
LBB0_17:
	movq	40(%r14), %rdi
	leaq	L_.str.3(%rip), %rsi
	callq	_device_property_present
	movl	$1, %ecx
	testq	%rax, %rax
	jne	LBB0_20
## %bb.18:
	cmpq	$0, 32(%r14)
	jne	LBB0_20
## %bb.19:
	xorl	%ecx, %ecx
	cmpl	$0, 48(%r13)
	sete	%cl
LBB0_20:
	movl	%ecx, 12(%r13)
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_nvmem_sysfs_get_groups
	movl	%eax, 16(%r13)
	movq	%r15, %rdi
	callq	_device_initialize
	movq	24(%r14), %rdx
	leaq	L_.str.4(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_dbg
	movq	%r15, %rdi
	callq	_device_add
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_31
## %bb.21:
	cmpq	$0, 8(%r14)
	je	LBB0_23
## %bb.22:
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_nvmem_sysfs_setup_compat
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_30
LBB0_23:
	movl	20(%r14), %esi
	testl	%esi, %esi
	je	LBB0_25
## %bb.24:
	movl	16(%r14), %edx
	movq	%r13, %rdi
	callq	_nvmem_add_cells
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_28
LBB0_25:
	movq	%r13, %rdi
	callq	_nvmem_add_cells_from_table
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_27
## %bb.26:
	movq	%r13, %rdi
	callq	_nvmem_add_cells_from_of
	movl	%eax, %r12d
	testl	%eax, %eax
	je	LBB0_33
LBB0_27:
	movq	%r13, %rdi
	callq	_nvmem_device_remove_all_cells
LBB0_28:
	cmpq	$0, 8(%r14)
	je	LBB0_30
## %bb.29:
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_nvmem_sysfs_remove_compat
LBB0_30:
	movq	%r15, %rdi
	callq	_device_del
LBB0_31:
	movq	%r15, %rdi
	callq	_put_device
	movl	%r12d, %edi
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_15:
	xorl	%edx, %edx
	jmp	LBB0_16
LBB0_33:
	movq	_NVMEM_ADD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_nvmem_notifier@GOTPCREL(%rip), %rdi
	movq	%r13, %rdx
	callq	_blocking_notifier_call_chain
	movq	%r13, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_nvmem_ida,4,2                  ## @nvmem_ida
	.comm	_nvmem_provider_type,4,2        ## @nvmem_provider_type
	.comm	_nvmem_bus_type,4,2             ## @nvmem_bus_type
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s"

L_.str.1:                               ## @.str.1
	.asciz	"%s%d"

L_.str.2:                               ## @.str.2
	.asciz	"nvmem"

L_.str.3:                               ## @.str.3
	.asciz	"read-only"

L_.str.4:                               ## @.str.4
	.asciz	"Registering nvmem device %s\n"

	.comm	_nvmem_notifier,4,2             ## @nvmem_notifier
	.comm	_NVMEM_ADD,4,2                  ## @NVMEM_ADD
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nvmem_register                 ; -- Begin function nvmem_register
	.p2align	2
_nvmem_register:                        ; @nvmem_register
	.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
	ldr	x8, [x0, #40]
	cbz	x8, LBB0_10
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x21, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x21, [x21, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	w0, #88
	bl	_kzalloc
	cbz	x0, LBB0_11
; %bb.2:
	mov	x20, x0
	ldr	w3, [x21]
Lloh2:
	adrp	x0, _nvmem_ida@GOTPAGE
Lloh3:
	ldr	x0, [x0, _nvmem_ida@GOTPAGEOFF]
	mov	w1, #0
	mov	w2, #0
	bl	_ida_simple_get
	mov	x21, x0
	tbnz	w0, #31, LBB0_13
; %bb.3:
	add	x0, x20, #84
	bl	_kref_init
	add	x0, x20, #80
	bl	_INIT_LIST_HEAD
	str	w21, [x20]
	ldr	x9, [x19, #88]
	str	x9, [x20, #72]
	ldr	x8, [x19, #40]
	cbnz	x9, LBB0_6
; %bb.4:
	ldr	x9, [x8, #8]
	cbz	x9, LBB0_6
; %bb.5:
	ldr	x9, [x9]
	str	x9, [x20, #72]
LBB0_6:
	ldur	q0, [x19, #72]
	ext.16b	v0, v0, v0, #8
	cmeq.2d	v1, v0, #0
	xtn.2s	v1, v1
	xtn.2s	v0, v0
	movi.2s	v2, #1
	bit.8b	v0, v2, v1
	stur	d0, [x20, #4]
	ldr	w9, [x19, #68]
	str	w9, [x20, #64]
Lloh4:
	adrp	x9, _nvmem_provider_type@GOTPAGE
Lloh5:
	ldr	x9, [x9, _nvmem_provider_type@GOTPAGEOFF]
	str	x9, [x20, #40]
Lloh6:
	adrp	x9, _nvmem_bus_type@GOTPAGE
Lloh7:
	ldr	x9, [x9, _nvmem_bus_type@GOTPAGEOFF]
	add	x21, x20, #16
	stp	x8, x9, [x20, #24]
	ldur	q0, [x19, #52]
	str	q0, [x20, #48]
	ldr	w9, [x19, #48]
	cbnz	w9, LBB0_8
; %bb.7:
	ldr	w8, [x8]
	str	w8, [x20, #20]
LBB0_8:
	ldr	w8, [x19]
	ldr	x2, [x19, #24]
	cmn	w8, #1
	b.eq	LBB0_14
LBB0_9:
Lloh8:
	adrp	x8, l_.str.2@PAGE
Lloh9:
	add	x8, x8, l_.str.2@PAGEOFF
	cmp	x2, #0
	csel	x2, x8, x2, eq
	csel	x8, x20, x19, eq
	ldr	w8, [x8]
	str	x8, [sp]
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_16
LBB0_10:
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_12
LBB0_11:
Lloh14:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_12:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_31
LBB0_13:
	mov	x0, x20
	bl	_kfree
	mov	x0, x21
	b	LBB0_31
LBB0_14:
	cbz	x2, LBB0_9
; %bb.15:
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
LBB0_16:
	mov	x0, x21
	bl	_dev_set_name
	ldr	x0, [x19, #40]
Lloh18:
	adrp	x1, l_.str.3@PAGE
Lloh19:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_device_property_present
	cbnz	x0, LBB0_18
; %bb.17:
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_32
LBB0_18:
	mov	w8, #1
LBB0_19:
	str	w8, [x20, #12]
	mov	x0, x20
	mov	x1, x19
	bl	_nvmem_sysfs_get_groups
	str	w0, [x20, #16]
	mov	x0, x21
	bl	_device_initialize
	ldr	x2, [x19, #24]
Lloh20:
	adrp	x1, l_.str.4@PAGE
Lloh21:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x21
	bl	_dev_dbg
	mov	x0, x21
	bl	_device_add
	mov	x22, x0
	cbnz	w0, LBB0_30
; %bb.20:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_22
; %bb.21:
	mov	x0, x20
	mov	x1, x19
	bl	_nvmem_sysfs_setup_compat
	mov	x22, x0
	cbnz	w0, LBB0_29
LBB0_22:
	ldr	w1, [x19, #20]
	cbz	w1, LBB0_24
; %bb.23:
	ldr	w2, [x19, #16]
	mov	x0, x20
	bl	_nvmem_add_cells
	mov	x22, x0
	cbnz	w0, LBB0_27
LBB0_24:
	mov	x0, x20
	bl	_nvmem_add_cells_from_table
	mov	x22, x0
	cbnz	w0, LBB0_26
; %bb.25:
	mov	x0, x20
	bl	_nvmem_add_cells_from_of
	mov	x22, x0
	cbz	w0, LBB0_33
LBB0_26:
	mov	x0, x20
	bl	_nvmem_device_remove_all_cells
LBB0_27:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_29
; %bb.28:
	mov	x0, x20
	mov	x1, x19
	bl	_nvmem_sysfs_remove_compat
LBB0_29:
	mov	x0, x21
	bl	_device_del
LBB0_30:
	mov	x0, x21
	bl	_put_device
	mov	x0, x22
LBB0_31:
	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
	b	_ERR_PTR
LBB0_32:
	ldr	w8, [x20, #48]
	cmp	w8, #0
	cset	w8, eq
	b	LBB0_19
LBB0_33:
Lloh22:
	adrp	x8, _NVMEM_ADD@GOTPAGE
Lloh23:
	ldr	x8, [x8, _NVMEM_ADD@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
Lloh25:
	adrp	x0, _nvmem_notifier@GOTPAGE
Lloh26:
	ldr	x0, [x0, _nvmem_notifier@GOTPAGEOFF]
	mov	x2, x20
	bl	_blocking_notifier_call_chain
	mov	x0, x20
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_nvmem_ida,4,2                  ; @nvmem_ida
	.comm	_nvmem_provider_type,4,2        ; @nvmem_provider_type
	.comm	_nvmem_bus_type,4,2             ; @nvmem_bus_type
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s"

l_.str.1:                               ; @.str.1
	.asciz	"%s%d"

l_.str.2:                               ; @.str.2
	.asciz	"nvmem"

l_.str.3:                               ; @.str.3
	.asciz	"read-only"

l_.str.4:                               ; @.str.4
	.asciz	"Registering nvmem device %s\n"

	.comm	_nvmem_notifier,4,2             ; @nvmem_notifier
	.comm	_NVMEM_ADD,4,2                  ; @NVMEM_ADD
.subsections_via_symbols
