	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lpc18xx_eeprom_probe
_lpc18xx_eeprom_probe:                  ## @lpc18xx_eeprom_probe
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$48, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	movq	_IORESOURCE_MEM@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r12, %rdi
	callq	_platform_get_resource_byname
	movq	%r12, %rdi
	movq	%rax, %rsi
	callq	_devm_ioremap_resource
	movq	%rax, 40(%r14)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movq	40(%r14), %rdi
	jmp	LBB0_4
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_19:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movl	(%rbx), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r12, %rdi
	callq	_platform_get_resource_byname
	movq	%rax, %r15
	movq	%r12, %rdi
	movq	%rax, %rsi
	callq	_devm_ioremap_resource
	movq	%rax, 32(%r14)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	32(%r14), %rdi
	jmp	LBB0_4
LBB0_7:
	leaq	L_.str.2(%rip), %rsi
	movq	%r12, %rdi
	callq	_devm_clk_get
	movq	%rax, 8(%r14)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	leaq	L_.str.3(%rip), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	8(%r14), %rdi
LBB0_4:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_9:
	movq	8(%r14), %rdi
	callq	_clk_prepare_enable
	testl	%eax, %eax
	js	LBB0_10
## %bb.11:
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_devm_reset_control_get_exclusive
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movq	%rbx, %rdi
	callq	_PTR_ERR
	leaq	L_.str.5(%rip), %rsi
	movq	%r12, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	movq	%rbx, %rdi
LBB0_17:
	callq	_PTR_ERR
	movl	%eax, %ebx
LBB0_18:
	movq	8(%r14), %rdi
	callq	_clk_disable_unprepare
	jmp	LBB0_19
LBB0_10:
	movl	%eax, %ebx
	leaq	L_.str.4(%rip), %rsi
	movq	%r12, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_19
LBB0_13:
	movq	%rbx, %rdi
	callq	_reset_control_assert
	testl	%eax, %eax
	js	LBB0_14
## %bb.15:
	movabsq	$17179869188, %rax              ## imm = 0x400000004
	movq	%rax, (%r14)
	movq	8(%r14), %rdi
	callq	_clk_get_rate
	movq	_LPC18XX_EEPROM_CLOCK_HZ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%rax, %rdi
	callq	_DIV_ROUND_UP
	decl	%eax
	movslq	%eax, %rdx
	movq	_LPC18XX_EEPROM_CLKDIV@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_lpc18xx_eeprom_writel
	movq	_LPC18XX_EEPROM_AUTOPROG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_LPC18XX_EEPROM_AUTOPROG_WORD@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	%r14, %rdi
	callq	_lpc18xx_eeprom_writel
	movq	_LPC18XX_EEPROM_PWRDWN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_LPC18XX_EEPROM_PWRDWN_YES@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	%r14, %rdi
	callq	_lpc18xx_eeprom_writel
	movq	%r15, %rdi
	callq	_resource_size
	movq	%rax, 24(%r14)
	movq	%r15, %rdi
	callq	_resource_size
	movq	_lpc18xx_nvmem_config@GOTPCREL(%rip), %rsi
	movq	%rax, 16(%rsi)
	movq	%r12, 8(%rsi)
	movq	%r14, (%rsi)
	movq	%r12, %rdi
	callq	_devm_nvmem_register
	movq	%rax, 16(%r14)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_20
## %bb.16:
	movq	16(%r14), %rdi
	jmp	LBB0_17
LBB0_14:
	movl	%eax, %ebx
	leaq	L_.str.6(%rip), %rsi
	movq	%r12, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_18
LBB0_20:
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_platform_set_drvdata
	xorl	%ebx, %ebx
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_IORESOURCE_MEM,4,2             ## @IORESOURCE_MEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"reg"

L_.str.1:                               ## @.str.1
	.asciz	"mem"

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

L_.str.3:                               ## @.str.3
	.asciz	"failed to get eeprom clock\n"

L_.str.4:                               ## @.str.4
	.asciz	"failed to prepare/enable eeprom clk: %d\n"

L_.str.5:                               ## @.str.5
	.asciz	"failed to get reset: %ld\n"

L_.str.6:                               ## @.str.6
	.asciz	"failed to assert reset: %d\n"

	.comm	_LPC18XX_EEPROM_CLOCK_HZ,4,2    ## @LPC18XX_EEPROM_CLOCK_HZ
	.comm	_LPC18XX_EEPROM_CLKDIV,4,2      ## @LPC18XX_EEPROM_CLKDIV
	.comm	_LPC18XX_EEPROM_AUTOPROG,4,2    ## @LPC18XX_EEPROM_AUTOPROG
	.comm	_LPC18XX_EEPROM_AUTOPROG_WORD,8,3 ## @LPC18XX_EEPROM_AUTOPROG_WORD
	.comm	_LPC18XX_EEPROM_PWRDWN,4,2      ## @LPC18XX_EEPROM_PWRDWN
	.comm	_LPC18XX_EEPROM_PWRDWN_YES,8,3  ## @LPC18XX_EEPROM_PWRDWN_YES
	.comm	_lpc18xx_nvmem_config,24,3      ## @lpc18xx_nvmem_config
	.no_dead_strip	_lpc18xx_eeprom_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lpc18xx_eeprom_probe
_lpc18xx_eeprom_probe:                  ; @lpc18xx_eeprom_probe
	.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
	mov	x20, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w1, #48
	bl	_devm_kzalloc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x0
Lloh3:
	adrp	x21, _IORESOURCE_MEM@GOTPAGE
Lloh4:
	ldr	x21, [x21, _IORESOURCE_MEM@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh5:
	adrp	x2, l_.str@PAGE
Lloh6:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x20
	bl	_platform_get_resource_byname
	mov	x1, x0
	mov	x0, x20
	bl	_devm_ioremap_resource
	str	x0, [x19, #40]
	bl	_IS_ERR
	cbz	x0, LBB0_5
; %bb.2:
	ldr	x0, [x19, #40]
	b	LBB0_9
LBB0_3:
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_4:
	mov	x0, x22
	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
LBB0_5:
	ldr	w1, [x21]
Lloh10:
	adrp	x2, l_.str.1@PAGE
Lloh11:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_platform_get_resource_byname
	mov	x21, x0
	mov	x0, x20
	mov	x1, x21
	bl	_devm_ioremap_resource
	str	x0, [x19, #32]
	bl	_IS_ERR
	cbz	x0, LBB0_7
; %bb.6:
	ldr	x0, [x19, #32]
	b	LBB0_9
LBB0_7:
Lloh12:
	adrp	x1, l_.str.2@PAGE
Lloh13:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_devm_clk_get
	str	x0, [x19, #8]
	bl	_IS_ERR
	cbz	x0, LBB0_10
; %bb.8:
Lloh14:
	adrp	x1, l_.str.3@PAGE
Lloh15:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	ldr	x0, [x19, #8]
LBB0_9:
	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	_PTR_ERR
LBB0_10:
	ldr	x0, [x19, #8]
	bl	_clk_prepare_enable
	tbnz	w0, #31, LBB0_15
; %bb.11:
	mov	x0, x20
	mov	x1, #0
	bl	_devm_reset_control_get_exclusive
	mov	x22, x0
	bl	_IS_ERR
	cbz	x0, LBB0_16
; %bb.12:
	mov	x0, x22
	bl	_PTR_ERR
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh16:
	adrp	x1, l_.str.5@PAGE
Lloh17:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	mov	x0, x22
LBB0_13:
	bl	_PTR_ERR
	mov	x22, x0
LBB0_14:
	ldr	x0, [x19, #8]
	bl	_clk_disable_unprepare
	b	LBB0_4
LBB0_15:
	mov	x22, x0
	str	x22, [sp]
Lloh18:
	adrp	x1, l_.str.4@PAGE
Lloh19:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	b	LBB0_4
LBB0_16:
	mov	x0, x22
	bl	_reset_control_assert
	tbnz	w0, #31, LBB0_19
; %bb.17:
	movi.2s	v0, #4
	str	d0, [x19]
	ldr	x0, [x19, #8]
	bl	_clk_get_rate
Lloh20:
	adrp	x8, _LPC18XX_EEPROM_CLOCK_HZ@GOTPAGE
Lloh21:
	ldr	x8, [x8, _LPC18XX_EEPROM_CLOCK_HZ@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	bl	_DIV_ROUND_UP
	sub	w8, w0, #1
	sxtw	x2, w8
Lloh23:
	adrp	x8, _LPC18XX_EEPROM_CLKDIV@GOTPAGE
Lloh24:
	ldr	x8, [x8, _LPC18XX_EEPROM_CLKDIV@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_lpc18xx_eeprom_writel
Lloh26:
	adrp	x8, _LPC18XX_EEPROM_AUTOPROG@GOTPAGE
Lloh27:
	ldr	x8, [x8, _LPC18XX_EEPROM_AUTOPROG@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
Lloh29:
	adrp	x8, _LPC18XX_EEPROM_AUTOPROG_WORD@GOTPAGE
Lloh30:
	ldr	x8, [x8, _LPC18XX_EEPROM_AUTOPROG_WORD@GOTPAGEOFF]
Lloh31:
	ldr	x2, [x8]
	mov	x0, x19
	bl	_lpc18xx_eeprom_writel
Lloh32:
	adrp	x8, _LPC18XX_EEPROM_PWRDWN@GOTPAGE
Lloh33:
	ldr	x8, [x8, _LPC18XX_EEPROM_PWRDWN@GOTPAGEOFF]
Lloh34:
	ldr	w1, [x8]
Lloh35:
	adrp	x8, _LPC18XX_EEPROM_PWRDWN_YES@GOTPAGE
Lloh36:
	ldr	x8, [x8, _LPC18XX_EEPROM_PWRDWN_YES@GOTPAGEOFF]
Lloh37:
	ldr	x2, [x8]
	mov	x0, x19
	bl	_lpc18xx_eeprom_writel
	mov	x0, x21
	bl	_resource_size
	str	x0, [x19, #24]
	mov	x0, x21
	bl	_resource_size
Lloh38:
	adrp	x1, _lpc18xx_nvmem_config@GOTPAGE
Lloh39:
	ldr	x1, [x1, _lpc18xx_nvmem_config@GOTPAGEOFF]
	stp	x20, x0, [x1, #8]
	str	x19, [x1]
	mov	x0, x20
	bl	_devm_nvmem_register
	str	x0, [x19, #16]
	bl	_IS_ERR
	cbz	x0, LBB0_20
; %bb.18:
	ldr	x0, [x19, #16]
	b	LBB0_13
LBB0_19:
	mov	x22, x0
	str	x22, [sp]
Lloh40:
	adrp	x1, l_.str.6@PAGE
Lloh41:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x20
	bl	_dev_err
                                        ; kill: def $w22 killed $w22 killed $x22 def $x22
	b	LBB0_14
LBB0_20:
	mov	x0, x20
	mov	x1, x19
	bl	_platform_set_drvdata
	mov	w22, #0
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh40, Lloh41
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_IORESOURCE_MEM,4,2             ; @IORESOURCE_MEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"reg"

l_.str.1:                               ; @.str.1
	.asciz	"mem"

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

l_.str.3:                               ; @.str.3
	.asciz	"failed to get eeprom clock\n"

l_.str.4:                               ; @.str.4
	.asciz	"failed to prepare/enable eeprom clk: %d\n"

l_.str.5:                               ; @.str.5
	.asciz	"failed to get reset: %ld\n"

l_.str.6:                               ; @.str.6
	.asciz	"failed to assert reset: %d\n"

	.comm	_LPC18XX_EEPROM_CLOCK_HZ,4,2    ; @LPC18XX_EEPROM_CLOCK_HZ
	.comm	_LPC18XX_EEPROM_CLKDIV,4,2      ; @LPC18XX_EEPROM_CLKDIV
	.comm	_LPC18XX_EEPROM_AUTOPROG,4,2    ; @LPC18XX_EEPROM_AUTOPROG
	.comm	_LPC18XX_EEPROM_AUTOPROG_WORD,8,3 ; @LPC18XX_EEPROM_AUTOPROG_WORD
	.comm	_LPC18XX_EEPROM_PWRDWN,4,2      ; @LPC18XX_EEPROM_PWRDWN
	.comm	_LPC18XX_EEPROM_PWRDWN_YES,8,3  ; @LPC18XX_EEPROM_PWRDWN_YES
	.comm	_lpc18xx_nvmem_config,24,3      ; @lpc18xx_nvmem_config
	.no_dead_strip	_lpc18xx_eeprom_probe
.subsections_via_symbols
