	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function add_dataflash_otp
_add_dataflash_otp:                     ## @add_dataflash_otp
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, -60(%rbp)                 ## 4-byte Spill
	movl	%r8d, -48(%rbp)                 ## 4-byte Spill
	movl	%ecx, %r14d
	movl	%edx, -56(%rbp)                 ## 4-byte Spill
	movq	%rsi, %r12
	movq	%rdi, %r15
	addq	$4, %rdi
	movq	%rdi, -88(%rbp)                 ## 8-byte Spill
	callq	_dev_get_platdata
	movq	%rax, %r13
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$96, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	leaq	88(%rax), %rdi
	callq	_mutex_init
	movq	%r15, 80(%rbx)
	movl	%r14d, -52(%rbp)                ## 4-byte Spill
	movl	%r14d, (%rbx)
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 4(%rbx)
	movq	8(%rbx), %rdi
	movq	8(%r15), %rax
	movl	(%rax), %edx
	movl	(%r15), %ecx
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, -80(%rbp)                 ## 8-byte Spill
	movq	%r12, %r8
	callq	_sprintf
	movq	%rbx, %rcx
	addq	$16, %rcx
	testq	%r13, %r13
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	je	LBB0_4
## %bb.3:
	movq	16(%r13), %rax
	testq	%rax, %rax
	jne	LBB0_5
LBB0_4:
	movq	8(%rbx), %rax
LBB0_5:
	movq	%rax, 72(%rbx)
	movl	-52(%rbp), %r12d                ## 4-byte Reload
	movl	-56(%rbp), %eax                 ## 4-byte Reload
	imull	%r12d, %eax
	movl	%eax, 16(%rbx)
	movl	%r12d, 20(%rbx)
	movl	%r12d, 24(%rbx)
	movq	_MTD_DATAFLASH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 64(%rbx)
	movq	_MTD_WRITEABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 60(%rbx)
	movq	_dataflash_erase@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 56(%rbx)
	movq	_dataflash_read@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 52(%rbx)
	movq	_dataflash_write@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 48(%rbx)
	movq	%rbx, 40(%rbx)
	movq	-88(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, 32(%rbx)
	movl	(%r14), %esi
	movq	%rcx, %r15
	movq	%rcx, %rdi
	callq	_mtd_set_of_node
	movl	-60(%rbp), %eax                 ## 4-byte Reload
	cmpb	$99, %al
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	jl	LBB0_6
## %bb.7:
	movsbl	%al, %esi
	movq	%r15, %rdi
	callq	_otp_setup
	movq	%rax, %r9
	jmp	LBB0_8
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_13
LBB0_6:
	leaq	L_.str(%rip), %r9
LBB0_8:
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	movl	$1023, %eax                     ## imm = 0x3FF
	addl	16(%rbx), %eax
	sarl	$10, %eax
	movslq	%eax, %rcx
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	movl	%r12d, %r8d
	callq	_dev_info
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_spi_set_drvdata
	xorl	%r14d, %r14d
	testq	%r13, %r13
	je	LBB0_9
## %bb.10:
	movq	8(%r13), %rsi
	movl	(%r13), %edx
	jmp	LBB0_11
LBB0_9:
	xorl	%esi, %esi
	xorl	%edx, %edx
LBB0_11:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_mtd_device_register
	testl	%eax, %eax
	je	LBB0_13
## %bb.12:
	movl	%eax, %r15d
	movq	%rbx, %rdi
	callq	_kfree
	movl	%r15d, %r14d
LBB0_13:
	movl	%r14d, %eax
	addq	$56, %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
	.space	1

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"spi%d.%d-%s"

	.comm	_MTD_DATAFLASH,4,2              ## @MTD_DATAFLASH
	.comm	_MTD_WRITEABLE,4,2              ## @MTD_WRITEABLE
	.comm	_dataflash_erase,4,2            ## @dataflash_erase
	.comm	_dataflash_read,4,2             ## @dataflash_read
	.comm	_dataflash_write,4,2            ## @dataflash_write
L_.str.2:                               ## @.str.2
	.asciz	"%s (%lld KBytes) pagesize %d bytes%s\n"

	.no_dead_strip	_add_dataflash_otp
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function add_dataflash_otp
_add_dataflash_otp:                     ; @add_dataflash_otp
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x26, x5
	mov	x25, x4
	mov	x22, x3
	mov	x27, x2
	mov	x23, x1
	mov	x21, x0
	add	x24, x0, #4
	mov	x0, x24
	bl	_dev_get_platdata
	mov	x20, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #96
	bl	_kzalloc
	cbz	x0, LBB0_6
; %bb.1:
	mov	x19, x0
	add	x0, x0, #88
	bl	_mutex_init
	str	x21, [x19, #80]
	stp	w22, w25, [x19]
	ldr	x0, [x19, #8]
	ldr	x8, [x21, #8]
	ldr	w2, [x8]
	ldr	w3, [x21]
Lloh3:
	adrp	x1, l_.str.1@PAGE
Lloh4:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x4, x23
	bl	_sprintf
	add	x25, x19, #16
	cbz	x20, LBB0_3
; %bb.2:
	ldr	x8, [x20, #16]
	cbnz	x8, LBB0_4
LBB0_3:
	ldr	x8, [x19, #8]
LBB0_4:
	str	x8, [x19, #72]
	mul	w8, w22, w27
	stp	w8, w22, [x19, #16]
	str	w22, [x19, #24]
Lloh5:
	adrp	x8, _MTD_DATAFLASH@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MTD_DATAFLASH@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _MTD_WRITEABLE@GOTPAGE
Lloh9:
	ldr	x9, [x9, _MTD_WRITEABLE@GOTPAGEOFF]
	str	w8, [x19, #64]
Lloh10:
	ldr	w8, [x9]
Lloh11:
	adrp	x9, _dataflash_erase@GOTPAGE
Lloh12:
	ldr	x9, [x9, _dataflash_erase@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #56]
Lloh14:
	adrp	x8, _dataflash_read@GOTPAGE
Lloh15:
	ldr	x8, [x8, _dataflash_read@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
Lloh17:
	adrp	x9, _dataflash_write@GOTPAGE
Lloh18:
	ldr	x9, [x9, _dataflash_write@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #48]
	stp	x24, x19, [x19, #32]
	ldr	w1, [x24]
	mov	x0, x25
	bl	_mtd_set_of_node
	cmp	w26, #99
	b.lt	LBB0_7
; %bb.5:
	mov	x0, x25
	mov	x1, x26
	bl	_otp_setup
	mov	x5, x0
	b	LBB0_8
LBB0_6:
Lloh20:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_13
LBB0_7:
Lloh23:
	adrp	x5, l_.str@PAGE
Lloh24:
	add	x5, x5, l_.str@PAGEOFF
LBB0_8:
	ldr	w8, [x19, #16]
	add	w8, w8, #1023
	sbfx	x3, x8, #10, #22
Lloh25:
	adrp	x1, l_.str.2@PAGE
Lloh26:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x24
	mov	x2, x23
	mov	x4, x22
	bl	_dev_info
	mov	x0, x21
	mov	x1, x19
	bl	_spi_set_drvdata
	cbz	x20, LBB0_10
; %bb.9:
	ldr	x1, [x20, #8]
	ldr	w2, [x20]
	b	LBB0_11
LBB0_10:
	mov	x1, #0
	mov	w2, #0
LBB0_11:
	mov	x0, x25
	bl	_mtd_device_register
	mov	x20, x0
	cbz	w0, LBB0_13
; %bb.12:
	mov	x0, x19
	bl	_kfree
LBB0_13:
	mov	x0, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.space	1

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"spi%d.%d-%s"

	.comm	_MTD_DATAFLASH,4,2              ; @MTD_DATAFLASH
	.comm	_MTD_WRITEABLE,4,2              ; @MTD_WRITEABLE
	.comm	_dataflash_erase,4,2            ; @dataflash_erase
	.comm	_dataflash_read,4,2             ; @dataflash_read
	.comm	_dataflash_write,4,2            ; @dataflash_write
l_.str.2:                               ; @.str.2
	.asciz	"%s (%lld KBytes) pagesize %d bytes%s\n"

	.no_dead_strip	_add_dataflash_otp
.subsections_via_symbols
