	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lochnagar_update_config        ## -- Begin function lochnagar_update_config
	.p2align	4, 0x90
_lochnagar_update_config:               ## @lochnagar_update_config
	.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, %rbx
	movq	16(%rdi), %r14
	movq	_LOCHNAGAR_BOOT_DELAY_MS@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_LOCHNAGAR_BOOT_RETRIES@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	addq	$8, %rdi
	callq	_lockdep_assert_held
	movq	(%rbx), %rcx
	movq	_LOCHNAGAR2@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	cmpq	(%rdx), %rcx
	jne	LBB0_4
## %bb.1:
	movq	_LOCHNAGAR2_ANALOGUE_PATH_CTRL1@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_regmap_write
	testl	%eax, %eax
	js	LBB0_4
## %bb.2:
	movl	(%rbx), %esi
	movq	_LOCHNAGAR2_ANALOGUE_PATH_UPDATE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_regmap_write
	testl	%eax, %eax
	js	LBB0_4
## %bb.3:
	movl	(%rbx), %esi
	movq	_LOCHNAGAR_CONFIG_POLL_US@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	imull	%r12d, %r15d
	imull	$1000, %r15d, %r9d              ## imm = 0x3E8
	movq	%r14, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_regmap_read_poll_timeout
	movl	%eax, %ecx
	sarl	$31, %ecx
	andl	%ecx, %eax
LBB0_4:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LOCHNAGAR2_ANALOGUE_PATH_UPDATE_STS_MASK,4,2 ## @LOCHNAGAR2_ANALOGUE_PATH_UPDATE_STS_MASK
	.comm	_LOCHNAGAR_BOOT_DELAY_MS,4,2    ## @LOCHNAGAR_BOOT_DELAY_MS
	.comm	_LOCHNAGAR_BOOT_RETRIES,4,2     ## @LOCHNAGAR_BOOT_RETRIES
	.comm	_LOCHNAGAR2,8,3                 ## @LOCHNAGAR2
	.comm	_LOCHNAGAR2_ANALOGUE_PATH_CTRL1,4,2 ## @LOCHNAGAR2_ANALOGUE_PATH_CTRL1
	.comm	_LOCHNAGAR2_ANALOGUE_PATH_UPDATE_MASK,4,2 ## @LOCHNAGAR2_ANALOGUE_PATH_UPDATE_MASK
	.comm	_LOCHNAGAR_CONFIG_POLL_US,4,2   ## @LOCHNAGAR_CONFIG_POLL_US
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lochnagar_update_config        ; -- Begin function lochnagar_update_config
	.p2align	2
_lochnagar_update_config:               ; @lochnagar_update_config
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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, _LOCHNAGAR_BOOT_DELAY_MS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LOCHNAGAR_BOOT_DELAY_MS@GOTPAGEOFF]
	ldr	x19, [x0, #16]
Lloh2:
	ldr	w21, [x8]
Lloh3:
	adrp	x8, _LOCHNAGAR_BOOT_RETRIES@GOTPAGE
Lloh4:
	ldr	x8, [x8, _LOCHNAGAR_BOOT_RETRIES@GOTPAGEOFF]
Lloh5:
	ldr	w22, [x8]
	add	x0, x0, #8
	bl	_lockdep_assert_held
	ldr	x8, [x20]
Lloh6:
	adrp	x9, _LOCHNAGAR2@GOTPAGE
Lloh7:
	ldr	x9, [x9, _LOCHNAGAR2@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.1:
Lloh9:
	adrp	x20, _LOCHNAGAR2_ANALOGUE_PATH_CTRL1@GOTPAGE
Lloh10:
	ldr	x20, [x20, _LOCHNAGAR2_ANALOGUE_PATH_CTRL1@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	mov	w2, #0
	bl	_regmap_write
	tbnz	w0, #31, LBB0_5
; %bb.2:
	ldr	w1, [x20]
Lloh11:
	adrp	x8, _LOCHNAGAR2_ANALOGUE_PATH_UPDATE_MASK@GOTPAGE
Lloh12:
	ldr	x8, [x8, _LOCHNAGAR2_ANALOGUE_PATH_UPDATE_MASK@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_regmap_write
	tbnz	w0, #31, LBB0_5
; %bb.3:
	ldr	w1, [x20]
Lloh14:
	adrp	x8, _LOCHNAGAR_CONFIG_POLL_US@GOTPAGE
Lloh15:
	ldr	x8, [x8, _LOCHNAGAR_CONFIG_POLL_US@GOTPAGEOFF]
Lloh16:
	ldr	w4, [x8]
	mul	w8, w21, w22
	mov	w9, #1000
	mul	w5, w8, w9
	mov	x0, x19
	mov	w2, #0
	mov	w3, #0
	bl	_regmap_read_poll_timeout
	cmp	w0, #0
	csel	w0, w0, wzr, lt
	b	LBB0_5
LBB0_4:
	mov	w0, #0
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_LOCHNAGAR2_ANALOGUE_PATH_UPDATE_STS_MASK,4,2 ; @LOCHNAGAR2_ANALOGUE_PATH_UPDATE_STS_MASK
	.comm	_LOCHNAGAR_BOOT_DELAY_MS,4,2    ; @LOCHNAGAR_BOOT_DELAY_MS
	.comm	_LOCHNAGAR_BOOT_RETRIES,4,2     ; @LOCHNAGAR_BOOT_RETRIES
	.comm	_LOCHNAGAR2,8,3                 ; @LOCHNAGAR2
	.comm	_LOCHNAGAR2_ANALOGUE_PATH_CTRL1,4,2 ; @LOCHNAGAR2_ANALOGUE_PATH_CTRL1
	.comm	_LOCHNAGAR2_ANALOGUE_PATH_UPDATE_MASK,4,2 ; @LOCHNAGAR2_ANALOGUE_PATH_UPDATE_MASK
	.comm	_LOCHNAGAR_CONFIG_POLL_US,4,2   ; @LOCHNAGAR_CONFIG_POLL_US
.subsections_via_symbols
