	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lm3697_init
_lm3697_init:                           ## @lm3697_init
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	32(%rdi), %rdi
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.1:
	movl	$1, %esi
	callq	_gpiod_direction_output
LBB0_2:
	movl	24(%r14), %edi
	movq	_LM3697_CTRL_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_regmap_write
	testl	%eax, %eax
	je	LBB0_7
## %bb.3:
	movl	%eax, %r13d
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_6
LBB0_4:
	movl	24(%r14), %edi
	movq	_LM3697_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_LM3697_SW_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_regmap_write
	testl	%eax, %eax
	je	LBB0_2
## %bb.5:
	movl	%eax, %r13d
	leaq	L_.str(%rip), %rsi
LBB0_6:
	movq	8(%r14), %rdi
	callq	_dev_err
LBB0_14:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movl	(%r14), %edx
	movl	24(%r14), %edi
	movq	_LM3697_OUTPUT_CONFIG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_regmap_write
	movl	%eax, %r13d
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	movq	8(%r14), %rdi
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_err
LBB0_9:
	movq	_LM3697_MAX_CONTROL_BANKS@GOTPCREL(%rip), %r12
	cmpl	$0, (%r12)
	jle	LBB0_14
## %bb.10:
	xorl	%ebx, %ebx
	xorl	%r15d, %r15d
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_11 Depth=1
	incq	%r15
	movslq	(%r12), %rax
	addq	$4, %rbx
	cmpq	%rax, %r15
	jge	LBB0_14
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	16(%r14), %rdi
	addq	%rbx, %rdi
	callq	_ti_lmu_common_set_ramp
	movl	%eax, %r13d
	testl	%eax, %eax
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	8(%r14), %rdi
	leaq	L_.str.3(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_LM3697_RESET,4,2               ## @LM3697_RESET
	.comm	_LM3697_SW_RESET,4,2            ## @LM3697_SW_RESET
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Cannot reset the device\n"

	.comm	_LM3697_CTRL_ENABLE,4,2         ## @LM3697_CTRL_ENABLE
L_.str.1:                               ## @.str.1
	.asciz	"Cannot write ctrl enable\n"

	.comm	_LM3697_OUTPUT_CONFIG,4,2       ## @LM3697_OUTPUT_CONFIG
L_.str.2:                               ## @.str.2
	.asciz	"Cannot write OUTPUT config\n"

	.comm	_LM3697_MAX_CONTROL_BANKS,4,2   ## @LM3697_MAX_CONTROL_BANKS
L_.str.3:                               ## @.str.3
	.asciz	"Setting the ramp rate failed\n"

	.no_dead_strip	_lm3697_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lm3697_init
_lm3697_init:                           ; @lm3697_init
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	ldr	x0, [x0, #32]
	cbz	x0, LBB0_4
; %bb.1:
	mov	w1, #1
	bl	_gpiod_direction_output
LBB0_2:
	ldr	w0, [x19, #24]
Lloh0:
	adrp	x8, _LM3697_CTRL_ENABLE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LM3697_CTRL_ENABLE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_regmap_write
	cbz	w0, LBB0_8
; %bb.3:
	mov	x20, x0
Lloh3:
	adrp	x1, l_.str.1@PAGE
Lloh4:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_6
LBB0_4:
	ldr	w0, [x19, #24]
Lloh5:
	adrp	x8, _LM3697_RESET@GOTPAGE
Lloh6:
	ldr	x8, [x8, _LM3697_RESET@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	adrp	x8, _LM3697_SW_RESET@GOTPAGE
Lloh9:
	ldr	x8, [x8, _LM3697_SW_RESET@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	bl	_regmap_write
	cbz	w0, LBB0_2
; %bb.5:
	mov	x20, x0
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
LBB0_6:
	ldr	x0, [x19, #8]
	bl	_dev_err
LBB0_7:
	mov	x0, x20
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_8:
	ldr	w0, [x19, #24]
Lloh13:
	adrp	x8, _LM3697_OUTPUT_CONFIG@GOTPAGE
Lloh14:
	ldr	x8, [x8, _LM3697_OUTPUT_CONFIG@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	ldr	w2, [x19]
	bl	_regmap_write
	mov	x20, x0
	cbz	w0, LBB0_10
; %bb.9:
	ldr	x0, [x19, #8]
Lloh16:
	adrp	x1, l_.str.2@PAGE
Lloh17:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
LBB0_10:
Lloh18:
	adrp	x22, _LM3697_MAX_CONTROL_BANKS@GOTPAGE
Lloh19:
	ldr	x22, [x22, _LM3697_MAX_CONTROL_BANKS@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.11:
	mov	x23, #0
	mov	x24, #0
Lloh20:
	adrp	x21, l_.str.3@PAGE
Lloh21:
	add	x21, x21, l_.str.3@PAGEOFF
	b	LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_13 Depth=1
	add	x24, x24, #1
	ldrsw	x8, [x22]
	add	x23, x23, #4
	cmp	x24, x8
	b.ge	LBB0_7
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #16]
	add	x0, x8, x23
	bl	_ti_lmu_common_set_ramp
	mov	x20, x0
	cbz	w0, LBB0_12
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	ldr	x0, [x19, #8]
	mov	x1, x21
	bl	_dev_err
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_LM3697_RESET,4,2               ; @LM3697_RESET
	.comm	_LM3697_SW_RESET,4,2            ; @LM3697_SW_RESET
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Cannot reset the device\n"

	.comm	_LM3697_CTRL_ENABLE,4,2         ; @LM3697_CTRL_ENABLE
l_.str.1:                               ; @.str.1
	.asciz	"Cannot write ctrl enable\n"

	.comm	_LM3697_OUTPUT_CONFIG,4,2       ; @LM3697_OUTPUT_CONFIG
l_.str.2:                               ; @.str.2
	.asciz	"Cannot write OUTPUT config\n"

	.comm	_LM3697_MAX_CONTROL_BANKS,4,2   ; @LM3697_MAX_CONTROL_BANKS
l_.str.3:                               ; @.str.3
	.asciz	"Setting the ramp rate failed\n"

	.no_dead_strip	_lm3697_init
.subsections_via_symbols
