	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lochnagar_i2c_probe
_lochnagar_i2c_probe:                   ## @lochnagar_i2c_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	%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, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$24, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %r15
	movq	_lochnagar_of_match@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	_of_match_device
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	(%rax), %r13
	movq	%r14, 16(%r15)
	movq	%r15, %rdi
	addq	$12, %rdi
	callq	_mutex_init
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_dev_set_drvdata
	movq	_GPIOD_OUT_LOW@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_devm_gpiod_get
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	%rbx, %rdi
	callq	_PTR_ERR
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_11
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_26
LBB0_7:
	movq	_GPIOD_OUT_HIGH@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	callq	_devm_gpiod_get_optional
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	%r12, %rdi
	callq	_PTR_ERR
	movl	%eax, %ebx
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_11
LBB0_9:
	movl	$20, %edi
	callq	_msleep
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_gpiod_set_value_cansleep
	movl	24(%r13), %eax
	movl	%eax, 8(%r15)
	movq	16(%r13), %rsi
	movq	%r14, %rdi
	callq	_devm_regmap_init_i2c
	movq	%rax, (%r15)
	movq	%rax, %rdi
	callq	_IS_ERR
	movq	(%r15), %rdi
	testq	%rax, %rax
	je	LBB0_12
## %bb.10:
	callq	_PTR_ERR
	movl	%eax, %ebx
	leaq	L_.str.4(%rip), %rsi
LBB0_11:
	movq	%r14, %rdi
	movl	%eax, %edx
LBB0_25:
	xorl	%eax, %eax
	callq	_dev_err
LBB0_26:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	leaq	-44(%rbp), %rsi
	callq	_lochnagar_wait_for_boot
	testl	%eax, %eax
	js	LBB0_13
## %bb.14:
	movl	-44(%rbp), %edx
	movq	_LOCHNAGAR_DEVICE_ID_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	andl	%edx, %r12d
	movl	(%r13), %ecx
	cmpl	%ecx, %r12d
	jne	LBB0_15
## %bb.16:
	movq	_LOCHNAGAR_REV_ID_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %edx
	movl	%edx, -52(%rbp)                 ## 4-byte Spill
	movq	(%r15), %rdi
	movq	_LOCHNAGAR_FIRMWARE_ID1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %rdx
	callq	_regmap_read
	testl	%eax, %eax
	js	LBB0_17
## %bb.18:
	movl	-44(%rbp), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	(%r15), %rdi
	movq	_LOCHNAGAR_FIRMWARE_ID2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %rdx
	callq	_regmap_read
	testl	%eax, %eax
	js	LBB0_19
## %bb.20:
	movl	-44(%rbp), %r9d
	movq	16(%r13), %rax
	movb	(%rax), %cl
	shll	%cl, %r9d
	orl	-48(%rbp), %r9d                 ## 4-byte Folded Reload
	movl	12(%r13), %edx
	movl	-52(%rbp), %r8d                 ## 4-byte Reload
	incl	%r8d
	leaq	L_.str.9(%rip), %rsi
	movq	%r14, %rdi
	movl	%r12d, %ecx
	callq	_dev_info
	movq	(%r15), %rdi
	movl	4(%r13), %edx
	movl	8(%r13), %esi
	callq	_regmap_register_patch
	testl	%eax, %eax
	js	LBB0_21
## %bb.22:
	movq	%r14, %rdi
	callq	_devm_of_platform_populate
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_26
## %bb.23:
	leaq	L_.str.11(%rip), %rsi
	jmp	LBB0_24
LBB0_13:
	movl	%eax, %ebx
	leaq	L_.str.5(%rip), %rsi
	jmp	LBB0_24
LBB0_15:
	movl	12(%r13), %edx
	leaq	L_.str.6(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	movl	%r12d, %r8d
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_26
LBB0_17:
	movl	%eax, %ebx
	leaq	L_.str.7(%rip), %rsi
	jmp	LBB0_24
LBB0_19:
	movl	%eax, %ebx
	leaq	L_.str.8(%rip), %rsi
	jmp	LBB0_24
LBB0_21:
	movl	%eax, %ebx
	leaq	L_.str.10(%rip), %rsi
LBB0_24:
	movq	%r14, %rdi
	movl	%ebx, %edx
	jmp	LBB0_25
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_lochnagar_of_match,4,2         ## @lochnagar_of_match
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"reset"

	.comm	_GPIOD_OUT_LOW,4,2              ## @GPIOD_OUT_LOW
L_.str.1:                               ## @.str.1
	.asciz	"Failed to get reset GPIO: %d\n"

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

	.comm	_GPIOD_OUT_HIGH,4,2             ## @GPIOD_OUT_HIGH
L_.str.3:                               ## @.str.3
	.asciz	"Failed to get present GPIO: %d\n"

L_.str.4:                               ## @.str.4
	.asciz	"Failed to allocate register map: %d\n"

L_.str.5:                               ## @.str.5
	.asciz	"Failed to read device ID: %d\n"

	.comm	_LOCHNAGAR_DEVICE_ID_MASK,4,2   ## @LOCHNAGAR_DEVICE_ID_MASK
	.comm	_LOCHNAGAR_REV_ID_MASK,4,2      ## @LOCHNAGAR_REV_ID_MASK
L_.str.6:                               ## @.str.6
	.asciz	"ID does not match %s (expected 0x%x got 0x%x)\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_LOCHNAGAR_FIRMWARE_ID1,4,2     ## @LOCHNAGAR_FIRMWARE_ID1
L_.str.7:                               ## @.str.7
	.asciz	"Failed to read firmware id 1: %d\n"

	.comm	_LOCHNAGAR_FIRMWARE_ID2,4,2     ## @LOCHNAGAR_FIRMWARE_ID2
L_.str.8:                               ## @.str.8
	.asciz	"Failed to read firmware id 2: %d\n"

L_.str.9:                               ## @.str.9
	.asciz	"Found %s (0x%x) revision %u firmware 0x%.6x\n"

L_.str.10:                              ## @.str.10
	.asciz	"Failed to register patch: %d\n"

L_.str.11:                              ## @.str.11
	.asciz	"Failed to populate child nodes: %d\n"

	.no_dead_strip	_lochnagar_i2c_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lochnagar_i2c_probe
_lochnagar_i2c_probe:                   ; @lochnagar_i2c_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	mov	x19, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w1, #24
	bl	_devm_kzalloc
	cbz	x0, LBB0_4
; %bb.1:
	mov	x20, x0
Lloh3:
	adrp	x8, _lochnagar_of_match@GOTPAGE
Lloh4:
	ldr	x8, [x8, _lochnagar_of_match@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_of_match_device
	cbz	x0, LBB0_5
; %bb.2:
	ldr	x23, [x0]
	str	x19, [x20, #16]
	add	x0, x20, #12
	bl	_mutex_init
	mov	x0, x19
	mov	x1, x20
	bl	_dev_set_drvdata
Lloh6:
	adrp	x8, _GPIOD_OUT_LOW@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GPIOD_OUT_LOW@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_devm_gpiod_get
	mov	x21, x0
	bl	_IS_ERR
	cbz	x0, LBB0_7
; %bb.3:
	mov	x0, x21
	bl	_PTR_ERR
	mov	x21, x0
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_11
LBB0_4:
Lloh13:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
Lloh15:
	adrp	x8, _EINVAL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_12
LBB0_7:
Lloh17:
	adrp	x8, _GPIOD_OUT_HIGH@GOTPAGE
Lloh18:
	ldr	x8, [x8, _GPIOD_OUT_HIGH@GOTPAGEOFF]
Lloh19:
	ldr	w2, [x8]
Lloh20:
	adrp	x1, l_.str.2@PAGE
Lloh21:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_devm_gpiod_get_optional
	mov	x22, x0
	bl	_IS_ERR
	cbz	x0, LBB0_9
; %bb.8:
	mov	x0, x22
	bl	_PTR_ERR
	mov	x21, x0
Lloh22:
	adrp	x1, l_.str.3@PAGE
Lloh23:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_11
LBB0_9:
	mov	w0, #20
	bl	_msleep
	mov	x0, x21
	mov	w1, #1
	bl	_gpiod_set_value_cansleep
	ldr	w8, [x23, #24]
	str	w8, [x20, #8]
	ldr	x1, [x23, #16]
	mov	x0, x19
	bl	_devm_regmap_init_i2c
	str	x0, [x20]
	bl	_IS_ERR
	mov	x8, x0
	ldr	x0, [x20]
	cbz	x8, LBB0_13
; %bb.10:
	bl	_PTR_ERR
	mov	x21, x0
Lloh24:
	adrp	x1, l_.str.4@PAGE
Lloh25:
	add	x1, x1, l_.str.4@PAGEOFF
LBB0_11:
	mov	x0, x19
	mov	x2, x21
	bl	_dev_err
LBB0_12:
	mov	x0, x21
	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
	add	sp, sp, #112
	ret
LBB0_13:
	add	x1, sp, #28
	bl	_lochnagar_wait_for_boot
	tbnz	w0, #31, LBB0_20
; %bb.14:
	ldr	w24, [sp, #28]
Lloh26:
	adrp	x8, _LOCHNAGAR_DEVICE_ID_MASK@GOTPAGE
Lloh27:
	ldr	x8, [x8, _LOCHNAGAR_DEVICE_ID_MASK@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	and	w22, w8, w24
	ldr	w8, [x23]
	cmp	w22, w8
	b.ne	LBB0_21
; %bb.15:
Lloh29:
	adrp	x8, _LOCHNAGAR_REV_ID_MASK@GOTPAGE
Lloh30:
	ldr	x8, [x8, _LOCHNAGAR_REV_ID_MASK@GOTPAGEOFF]
Lloh31:
	ldr	w25, [x8]
	ldr	x0, [x20]
Lloh32:
	adrp	x8, _LOCHNAGAR_FIRMWARE_ID1@GOTPAGE
Lloh33:
	ldr	x8, [x8, _LOCHNAGAR_FIRMWARE_ID1@GOTPAGEOFF]
Lloh34:
	ldr	w1, [x8]
	add	x2, sp, #28
	bl	_regmap_read
	tbnz	w0, #31, LBB0_22
; %bb.16:
	ldr	w26, [sp, #28]
	ldr	x0, [x20]
Lloh35:
	adrp	x8, _LOCHNAGAR_FIRMWARE_ID2@GOTPAGE
Lloh36:
	ldr	x8, [x8, _LOCHNAGAR_FIRMWARE_ID2@GOTPAGEOFF]
Lloh37:
	ldr	w1, [x8]
	add	x2, sp, #28
	bl	_regmap_read
	tbnz	w0, #31, LBB0_23
; %bb.17:
	and	w8, w25, w24
	ldr	w9, [sp, #28]
	ldr	x10, [x23, #16]
	ldr	w10, [x10]
	lsl	w9, w9, w10
	orr	w5, w9, w26
	ldr	w2, [x23, #12]
	add	w4, w8, #1
Lloh38:
	adrp	x1, l_.str.9@PAGE
Lloh39:
	add	x1, x1, l_.str.9@PAGEOFF
	mov	x0, x19
	mov	x3, x22
	bl	_dev_info
	ldr	x0, [x20]
	ldp	w2, w1, [x23, #4]
	bl	_regmap_register_patch
	tbnz	w0, #31, LBB0_24
; %bb.18:
	mov	x0, x19
	bl	_devm_of_platform_populate
	mov	x21, x0
	tbz	w0, #31, LBB0_12
; %bb.19:
Lloh40:
	adrp	x1, l_.str.11@PAGE
Lloh41:
	add	x1, x1, l_.str.11@PAGEOFF
	b	LBB0_11
LBB0_20:
	mov	x21, x0
Lloh42:
	adrp	x1, l_.str.5@PAGE
Lloh43:
	add	x1, x1, l_.str.5@PAGEOFF
	b	LBB0_11
LBB0_21:
	ldr	w2, [x23, #12]
	stp	x8, x22, [sp]
Lloh44:
	adrp	x1, l_.str.6@PAGE
Lloh45:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh46:
	adrp	x8, _ENODEV@GOTPAGE
Lloh47:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_6
LBB0_22:
	mov	x21, x0
Lloh48:
	adrp	x1, l_.str.7@PAGE
Lloh49:
	add	x1, x1, l_.str.7@PAGEOFF
	b	LBB0_11
LBB0_23:
	mov	x21, x0
Lloh50:
	adrp	x1, l_.str.8@PAGE
Lloh51:
	add	x1, x1, l_.str.8@PAGEOFF
	b	LBB0_11
LBB0_24:
	mov	x21, x0
Lloh52:
	adrp	x1, l_.str.10@PAGE
Lloh53:
	add	x1, x1, l_.str.10@PAGEOFF
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpLdrGot	Lloh46, Lloh47
	.loh AdrpAdd	Lloh44, Lloh45
	.loh AdrpAdd	Lloh48, Lloh49
	.loh AdrpAdd	Lloh50, Lloh51
	.loh AdrpAdd	Lloh52, Lloh53
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_lochnagar_of_match,4,2         ; @lochnagar_of_match
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"reset"

	.comm	_GPIOD_OUT_LOW,4,2              ; @GPIOD_OUT_LOW
l_.str.1:                               ; @.str.1
	.asciz	"Failed to get reset GPIO: %d\n"

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

	.comm	_GPIOD_OUT_HIGH,4,2             ; @GPIOD_OUT_HIGH
l_.str.3:                               ; @.str.3
	.asciz	"Failed to get present GPIO: %d\n"

l_.str.4:                               ; @.str.4
	.asciz	"Failed to allocate register map: %d\n"

l_.str.5:                               ; @.str.5
	.asciz	"Failed to read device ID: %d\n"

	.comm	_LOCHNAGAR_DEVICE_ID_MASK,4,2   ; @LOCHNAGAR_DEVICE_ID_MASK
	.comm	_LOCHNAGAR_REV_ID_MASK,4,2      ; @LOCHNAGAR_REV_ID_MASK
l_.str.6:                               ; @.str.6
	.asciz	"ID does not match %s (expected 0x%x got 0x%x)\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_LOCHNAGAR_FIRMWARE_ID1,4,2     ; @LOCHNAGAR_FIRMWARE_ID1
l_.str.7:                               ; @.str.7
	.asciz	"Failed to read firmware id 1: %d\n"

	.comm	_LOCHNAGAR_FIRMWARE_ID2,4,2     ; @LOCHNAGAR_FIRMWARE_ID2
l_.str.8:                               ; @.str.8
	.asciz	"Failed to read firmware id 2: %d\n"

l_.str.9:                               ; @.str.9
	.asciz	"Found %s (0x%x) revision %u firmware 0x%.6x\n"

l_.str.10:                              ; @.str.10
	.asciz	"Failed to register patch: %d\n"

l_.str.11:                              ; @.str.11
	.asciz	"Failed to populate child nodes: %d\n"

	.no_dead_strip	_lochnagar_i2c_probe
.subsections_via_symbols
