	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function da9052_clear_fault_log
_da9052_clear_fault_log:                ## @da9052_clear_fault_log
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_DA9052_FAULTLOG_REG@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	callq	_da9052_reg_read
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	je	LBB0_3
## %bb.4:
	movq	_DA9052_FAULTLOG_TWDERROR@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_6
## %bb.5:
	movl	(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_dbg
LBB0_6:
	movq	_DA9052_FAULTLOG_VDDFAULT@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_8
## %bb.7:
	movl	(%r14), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_dbg
LBB0_8:
	movq	_DA9052_FAULTLOG_VDDSTART@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_10
## %bb.9:
	movl	(%r14), %edi
	leaq	L_.str.3(%rip), %rsi
	callq	_dev_dbg
LBB0_10:
	movq	_DA9052_FAULTLOG_TEMPOVER@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_12
## %bb.11:
	movl	(%r14), %edi
	leaq	L_.str.4(%rip), %rsi
	callq	_dev_dbg
LBB0_12:
	movq	_DA9052_FAULTLOG_KEYSHUT@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_14
## %bb.13:
	movl	(%r14), %edi
	leaq	L_.str.5(%rip), %rsi
	callq	_dev_dbg
LBB0_14:
	movq	_DA9052_FAULTLOG_NSDSET@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_16
## %bb.15:
	movl	(%r14), %edi
	leaq	L_.str.6(%rip), %rsi
	callq	_dev_dbg
LBB0_16:
	movq	_DA9052_FAULTLOG_WAITSET@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_18
## %bb.17:
	movl	(%r14), %edi
	leaq	L_.str.7(%rip), %rsi
	callq	_dev_dbg
LBB0_18:
	movl	(%r15), %esi
	movq	%r14, %rdi
	movl	$255, %edx
	callq	_da9052_reg_write
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_21
## %bb.19:
	movl	(%r14), %edi
	leaq	L_.str.8(%rip), %rsi
	jmp	LBB0_20
LBB0_1:
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
LBB0_20:
	movl	%ebx, %edx
	callq	_dev_err
	jmp	LBB0_21
LBB0_3:
	xorl	%ebx, %ebx
LBB0_21:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DA9052_FAULTLOG_REG,4,2        ## @DA9052_FAULTLOG_REG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Cannot read FAULT_LOG %d\n"

	.comm	_DA9052_FAULTLOG_TWDERROR,4,2   ## @DA9052_FAULTLOG_TWDERROR
L_.str.1:                               ## @.str.1
	.asciz	"Fault log entry detected: TWD_ERROR\n"

	.comm	_DA9052_FAULTLOG_VDDFAULT,4,2   ## @DA9052_FAULTLOG_VDDFAULT
L_.str.2:                               ## @.str.2
	.asciz	"Fault log entry detected: VDD_FAULT\n"

	.comm	_DA9052_FAULTLOG_VDDSTART,4,2   ## @DA9052_FAULTLOG_VDDSTART
L_.str.3:                               ## @.str.3
	.asciz	"Fault log entry detected: VDD_START\n"

	.comm	_DA9052_FAULTLOG_TEMPOVER,4,2   ## @DA9052_FAULTLOG_TEMPOVER
L_.str.4:                               ## @.str.4
	.asciz	"Fault log entry detected: TEMP_OVER\n"

	.comm	_DA9052_FAULTLOG_KEYSHUT,4,2    ## @DA9052_FAULTLOG_KEYSHUT
L_.str.5:                               ## @.str.5
	.asciz	"Fault log entry detected: KEY_SHUT\n"

	.comm	_DA9052_FAULTLOG_NSDSET,4,2     ## @DA9052_FAULTLOG_NSDSET
L_.str.6:                               ## @.str.6
	.asciz	"Fault log entry detected: nSD_SHUT\n"

	.comm	_DA9052_FAULTLOG_WAITSET,4,2    ## @DA9052_FAULTLOG_WAITSET
L_.str.7:                               ## @.str.7
	.asciz	"Fault log entry detected: WAIT_SHUT\n"

L_.str.8:                               ## @.str.8
	.asciz	"Cannot reset FAULT_LOG values %d\n"

	.no_dead_strip	_da9052_clear_fault_log
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function da9052_clear_fault_log
_da9052_clear_fault_log:                ; @da9052_clear_fault_log
	.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	x19, x0
Lloh0:
	adrp	x21, _DA9052_FAULTLOG_REG@GOTPAGE
Lloh1:
	ldr	x21, [x21, _DA9052_FAULTLOG_REG@GOTPAGEOFF]
	ldr	w1, [x21]
	bl	_da9052_reg_read
	mov	x20, x0
	tbnz	w0, #31, LBB0_18
; %bb.1:
	cbz	w20, LBB0_20
; %bb.2:
Lloh2:
	adrp	x8, _DA9052_FAULTLOG_TWDERROR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _DA9052_FAULTLOG_TWDERROR@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_4
; %bb.3:
	ldr	w0, [x19]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_dbg
LBB0_4:
Lloh7:
	adrp	x8, _DA9052_FAULTLOG_VDDFAULT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _DA9052_FAULTLOG_VDDFAULT@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_6
; %bb.5:
	ldr	w0, [x19]
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_dbg
LBB0_6:
Lloh12:
	adrp	x8, _DA9052_FAULTLOG_VDDSTART@GOTPAGE
Lloh13:
	ldr	x8, [x8, _DA9052_FAULTLOG_VDDSTART@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_8
; %bb.7:
	ldr	w0, [x19]
Lloh15:
	adrp	x1, l_.str.3@PAGE
Lloh16:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_dbg
LBB0_8:
Lloh17:
	adrp	x8, _DA9052_FAULTLOG_TEMPOVER@GOTPAGE
Lloh18:
	ldr	x8, [x8, _DA9052_FAULTLOG_TEMPOVER@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_10
; %bb.9:
	ldr	w0, [x19]
Lloh20:
	adrp	x1, l_.str.4@PAGE
Lloh21:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_dev_dbg
LBB0_10:
Lloh22:
	adrp	x8, _DA9052_FAULTLOG_KEYSHUT@GOTPAGE
Lloh23:
	ldr	x8, [x8, _DA9052_FAULTLOG_KEYSHUT@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_12
; %bb.11:
	ldr	w0, [x19]
Lloh25:
	adrp	x1, l_.str.5@PAGE
Lloh26:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_dev_dbg
LBB0_12:
Lloh27:
	adrp	x8, _DA9052_FAULTLOG_NSDSET@GOTPAGE
Lloh28:
	ldr	x8, [x8, _DA9052_FAULTLOG_NSDSET@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_14
; %bb.13:
	ldr	w0, [x19]
Lloh30:
	adrp	x1, l_.str.6@PAGE
Lloh31:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_dev_dbg
LBB0_14:
Lloh32:
	adrp	x8, _DA9052_FAULTLOG_WAITSET@GOTPAGE
Lloh33:
	ldr	x8, [x8, _DA9052_FAULTLOG_WAITSET@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_16
; %bb.15:
	ldr	w0, [x19]
Lloh35:
	adrp	x1, l_.str.7@PAGE
Lloh36:
	add	x1, x1, l_.str.7@PAGEOFF
	bl	_dev_dbg
LBB0_16:
	ldr	w1, [x21]
	mov	x0, x19
	mov	w2, #255
	bl	_da9052_reg_write
	mov	x20, x0
	tbz	w0, #31, LBB0_20
; %bb.17:
	ldr	w0, [x19]
Lloh37:
	adrp	x1, l_.str.8@PAGE
Lloh38:
	add	x1, x1, l_.str.8@PAGEOFF
	b	LBB0_19
LBB0_18:
	ldr	w0, [x19]
Lloh39:
	adrp	x1, l_.str@PAGE
Lloh40:
	add	x1, x1, l_.str@PAGEOFF
LBB0_19:
	mov	x2, x20
	bl	_dev_err
LBB0_20:
	mov	x0, x20
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpAdd	Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.comm	_DA9052_FAULTLOG_REG,4,2        ; @DA9052_FAULTLOG_REG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Cannot read FAULT_LOG %d\n"

	.comm	_DA9052_FAULTLOG_TWDERROR,4,2   ; @DA9052_FAULTLOG_TWDERROR
l_.str.1:                               ; @.str.1
	.asciz	"Fault log entry detected: TWD_ERROR\n"

	.comm	_DA9052_FAULTLOG_VDDFAULT,4,2   ; @DA9052_FAULTLOG_VDDFAULT
l_.str.2:                               ; @.str.2
	.asciz	"Fault log entry detected: VDD_FAULT\n"

	.comm	_DA9052_FAULTLOG_VDDSTART,4,2   ; @DA9052_FAULTLOG_VDDSTART
l_.str.3:                               ; @.str.3
	.asciz	"Fault log entry detected: VDD_START\n"

	.comm	_DA9052_FAULTLOG_TEMPOVER,4,2   ; @DA9052_FAULTLOG_TEMPOVER
l_.str.4:                               ; @.str.4
	.asciz	"Fault log entry detected: TEMP_OVER\n"

	.comm	_DA9052_FAULTLOG_KEYSHUT,4,2    ; @DA9052_FAULTLOG_KEYSHUT
l_.str.5:                               ; @.str.5
	.asciz	"Fault log entry detected: KEY_SHUT\n"

	.comm	_DA9052_FAULTLOG_NSDSET,4,2     ; @DA9052_FAULTLOG_NSDSET
l_.str.6:                               ; @.str.6
	.asciz	"Fault log entry detected: nSD_SHUT\n"

	.comm	_DA9052_FAULTLOG_WAITSET,4,2    ; @DA9052_FAULTLOG_WAITSET
l_.str.7:                               ; @.str.7
	.asciz	"Fault log entry detected: WAIT_SHUT\n"

l_.str.8:                               ; @.str.8
	.asciz	"Cannot reset FAULT_LOG values %d\n"

	.no_dead_strip	_da9052_clear_fault_log
.subsections_via_symbols
