	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function twl6040_vibra_enable
_twl6040_vibra_enable:                  ## @twl6040_vibra_enable
	.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	8(%rdi), %r14
	movl	20(%rdi), %edi
	callq	_ARRAY_SIZE
	movl	20(%rbx), %esi
	movl	%eax, %edi
	callq	_regulator_bulk_enable
	testl	%eax, %eax
	je	LBB0_1
## %bb.4:
	movl	16(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_err                        ## TAILCALL
LBB0_1:
	movq	8(%rbx), %rdi
	movl	$1, %esi
	callq	_twl6040_power
	movq	%r14, %rdi
	callq	_twl6040_get_revid
	movq	_TWL6040_REV_ES1_1@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jg	LBB0_3
## %bb.2:
	movq	_TWL6040_REG_VIBCTLL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_TWL6040_VIBENA@GOTPCREL(%rip), %r15
	movq	_TWL6040_VIBCTRL@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	orl	(%r15), %edx
	movq	%r14, %rdi
	callq	_twl6040_reg_write
	movq	_TWL6040_REG_VIBCTLR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r12), %edx
	orl	(%r15), %edx
	movq	%r14, %rdi
	callq	_twl6040_reg_write
	movl	$3000, %edi                     ## imm = 0xBB8
	movl	$3500, %esi                     ## imm = 0xDAC
	callq	_usleep_range
LBB0_3:
	movq	_TWL6040_REG_VIBCTLL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_TWL6040_VIBENA@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	movq	%r14, %rdi
	callq	_twl6040_reg_write
	movq	_TWL6040_REG_VIBCTLR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r15), %edx
	movq	%r14, %rdi
	callq	_twl6040_reg_write
	movl	$1, (%rbx)
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to enable regulators %d\n"

	.comm	_TWL6040_REV_ES1_1,8,3          ## @TWL6040_REV_ES1_1
	.comm	_TWL6040_REG_VIBCTLL,4,2        ## @TWL6040_REG_VIBCTLL
	.comm	_TWL6040_VIBENA,4,2             ## @TWL6040_VIBENA
	.comm	_TWL6040_VIBCTRL,4,2            ## @TWL6040_VIBCTRL
	.comm	_TWL6040_REG_VIBCTLR,4,2        ## @TWL6040_REG_VIBCTLR
	.no_dead_strip	_twl6040_vibra_enable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function twl6040_vibra_enable
_twl6040_vibra_enable:                  ; @twl6040_vibra_enable
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	ldr	x20, [x0, #8]
	ldr	w0, [x0, #20]
	bl	_ARRAY_SIZE
	ldr	w1, [x19, #20]
	bl	_regulator_bulk_enable
	cbz	w0, LBB0_2
; %bb.1:
	mov	x2, x0
	ldr	w0, [x19, #16]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_dev_err
LBB0_2:
	ldr	x0, [x19, #8]
	mov	w21, #1
	mov	w1, #1
	bl	_twl6040_power
	mov	x0, x20
	bl	_twl6040_get_revid
Lloh2:
	adrp	x8, _TWL6040_REV_ES1_1@GOTPAGE
Lloh3:
	ldr	x8, [x8, _TWL6040_REV_ES1_1@GOTPAGEOFF]
Lloh4:
	adrp	x24, _TWL6040_REG_VIBCTLL@GOTPAGE
Lloh5:
	ldr	x24, [x24, _TWL6040_REG_VIBCTLL@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
Lloh7:
	adrp	x22, _TWL6040_VIBENA@GOTPAGE
Lloh8:
	ldr	x22, [x22, _TWL6040_VIBENA@GOTPAGEOFF]
Lloh9:
	adrp	x23, _TWL6040_REG_VIBCTLR@GOTPAGE
Lloh10:
	ldr	x23, [x23, _TWL6040_REG_VIBCTLR@GOTPAGEOFF]
	cmp	x0, x8
	b.gt	LBB0_4
; %bb.3:
	ldr	w1, [x24]
	ldr	w8, [x22]
Lloh11:
	adrp	x25, _TWL6040_VIBCTRL@GOTPAGE
Lloh12:
	ldr	x25, [x25, _TWL6040_VIBCTRL@GOTPAGEOFF]
	ldr	w9, [x25]
	orr	w2, w9, w8
	mov	x0, x20
	bl	_twl6040_reg_write
	ldr	w1, [x23]
	ldr	w8, [x22]
	ldr	w9, [x25]
	orr	w2, w9, w8
	mov	x0, x20
	bl	_twl6040_reg_write
	mov	w0, #3000
	mov	w1, #3500
	bl	_usleep_range
LBB0_4:
	ldr	w1, [x24]
	ldr	w2, [x22]
	mov	x0, x20
	bl	_twl6040_reg_write
	ldr	w1, [x23]
	ldr	w2, [x22]
	mov	x0, x20
	bl	_twl6040_reg_write
	str	w21, [x19]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh6
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to enable regulators %d\n"

	.comm	_TWL6040_REV_ES1_1,8,3          ; @TWL6040_REV_ES1_1
	.comm	_TWL6040_REG_VIBCTLL,4,2        ; @TWL6040_REG_VIBCTLL
	.comm	_TWL6040_VIBENA,4,2             ; @TWL6040_VIBENA
	.comm	_TWL6040_VIBCTRL,4,2            ; @TWL6040_VIBCTRL
	.comm	_TWL6040_REG_VIBCTLR,4,2        ; @TWL6040_REG_VIBCTLR
	.no_dead_strip	_twl6040_vibra_enable
.subsections_via_symbols
