	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pwm_vibrator_start
_pwm_vibrator_start:                    ## @pwm_vibrator_start
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	40(%rdi), %rax
	movq	(%rax), %r14
	cmpl	$0, (%rdi)
	je	LBB0_1
LBB0_5:
	movq	8(%rbx), %rdi
	leaq	-40(%rbp), %r15
	movq	%r15, %rsi
	callq	_pwm_get_state
	movl	28(%rbx), %esi
	movq	%r15, %rdi
	movl	$65535, %edx                    ## imm = 0xFFFF
	callq	_pwm_set_relative_duty_cycle
	movl	$1, -40(%rbp)
	movq	8(%rbx), %rdi
	movq	%r15, %rsi
	callq	_pwm_apply_state
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movl	%eax, %r15d
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_3
LBB0_1:
	movl	32(%rbx), %edi
	callq	_regulator_enable
	testl	%eax, %eax
	je	LBB0_4
## %bb.2:
	movl	%eax, %r15d
	leaq	L_.str(%rip), %rsi
LBB0_3:
	movq	%r14, %rdi
	movl	%r15d, %edx
	callq	_dev_err
LBB0_10:
	movl	%r15d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	16(%rbx), %rdi
	xorl	%r15d, %r15d
	testq	%rdi, %rdi
	je	LBB0_10
## %bb.8:
	leaq	-40(%rbp), %r12
	movq	%r12, %rsi
	callq	_pwm_get_state
	movl	24(%rbx), %eax
	movl	%eax, -36(%rbp)
	movl	$1, -40(%rbp)
	movq	16(%rbx), %rdi
	movq	%r12, %rsi
	callq	_pwm_apply_state
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:
	movl	%eax, %r12d
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_dev_err
	movq	8(%rbx), %rdi
	callq	_pwm_disable
	movl	%r12d, %r15d
	jmp	LBB0_10
LBB0_4:
	movl	$1, (%rbx)
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to enable regulator: %d"

L_.str.1:                               ## @.str.1
	.asciz	"failed to apply pwm state: %d"

L_.str.2:                               ## @.str.2
	.asciz	"failed to apply dir-pwm state: %d"

	.no_dead_strip	_pwm_vibrator_start
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pwm_vibrator_start
_pwm_vibrator_start:                    ; @pwm_vibrator_start
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x0
	ldr	x8, [x0, #40]
	ldr	x19, [x8]
	ldr	w8, [x0]
	cbz	w8, LBB0_3
LBB0_1:
	ldr	x0, [x20, #8]
	add	x1, sp, #8
	bl	_pwm_get_state
	ldr	w1, [x20, #28]
	add	x0, sp, #8
	mov	w2, #65535
	bl	_pwm_set_relative_duty_cycle
	mov	w8, #1
	str	w8, [sp, #8]
	ldr	x0, [x20, #8]
	add	x1, sp, #8
	bl	_pwm_apply_state
	cbz	w0, LBB0_7
; %bb.2:
	mov	x21, x0
Lloh0:
	adrp	x1, l_.str.1@PAGE
Lloh1:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_5
LBB0_3:
	ldr	w0, [x20, #32]
	bl	_regulator_enable
	cbz	w0, LBB0_10
; %bb.4:
	mov	x21, x0
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
LBB0_5:
	mov	x0, x19
	mov	x2, x21
	bl	_dev_err
LBB0_6:
	mov	x0, x21
	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
	add	sp, sp, #64
	ret
LBB0_7:
	ldr	x0, [x20, #16]
	cbz	x0, LBB0_11
; %bb.8:
	add	x1, sp, #8
	bl	_pwm_get_state
	ldr	w8, [x20, #24]
	mov	w9, #1
	stp	w9, w8, [sp, #8]
	ldr	x0, [x20, #16]
	add	x1, sp, #8
	bl	_pwm_apply_state
	mov	x21, x0
	cbz	w0, LBB0_6
; %bb.9:
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	bl	_dev_err
	ldr	x0, [x20, #8]
	bl	_pwm_disable
	b	LBB0_6
LBB0_10:
	mov	w8, #1
	str	w8, [x20]
	b	LBB0_1
LBB0_11:
	mov	w21, #0
	b	LBB0_6
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to enable regulator: %d"

l_.str.1:                               ; @.str.1
	.asciz	"failed to apply pwm state: %d"

l_.str.2:                               ; @.str.2
	.asciz	"failed to apply dir-pwm state: %d"

	.no_dead_strip	_pwm_vibrator_start
.subsections_via_symbols
