	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function max77693_haptic_configure
_max77693_haptic_configure:             ## @max77693_haptic_configure
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movl	(%rdi), %eax
	cmpl	$128, %eax
	je	LBB0_4
## %bb.1:
	cmpl	$129, %eax
	jne	LBB0_3
## %bb.2:
	movq	_MAX77693_CONFIG2_MODE@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	4(%r14), %eax
	shll	%cl, %eax
	movq	_MAX77693_CONFIG2_MEN@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %esi
	movl	8(%r14), %edx
	orl	%eax, %esi
	movq	_MAX77693_CONFIG2_HTYP@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %edx
	movq	_MAX77693_HAPTIC_REG_CONFIG2@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_4:
	movl	4(%r14), %edx
	movq	_MCONFIG_MODE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %edx
	movq	_MCONFIG_MEN_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %esi
	movq	_MAX77843_HAP_REG_MCONFIG@GOTPCREL(%rip), %rax
LBB0_5:
	orl	%esi, %edx
	movq	_MAX77693_HAPTIC_PWM_DIVISOR_128@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edx
	movl	(%rax), %esi
	movl	16(%r14), %edi
	callq	_regmap_write
	testl	%eax, %eax
	je	LBB0_6
## %bb.7:
	movl	%eax, %ebx
	movl	12(%r14), %edi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_err
	jmp	LBB0_8
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_8
LBB0_6:
	xorl	%ebx, %ebx
LBB0_8:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX77693_CONFIG2_MODE,4,2      ## @MAX77693_CONFIG2_MODE
	.comm	_MAX77693_CONFIG2_MEN,4,2       ## @MAX77693_CONFIG2_MEN
	.comm	_MAX77693_CONFIG2_HTYP,4,2      ## @MAX77693_CONFIG2_HTYP
	.comm	_MAX77693_HAPTIC_PWM_DIVISOR_128,4,2 ## @MAX77693_HAPTIC_PWM_DIVISOR_128
	.comm	_MAX77693_HAPTIC_REG_CONFIG2,4,2 ## @MAX77693_HAPTIC_REG_CONFIG2
	.comm	_MCONFIG_MODE_SHIFT,4,2         ## @MCONFIG_MODE_SHIFT
	.comm	_MCONFIG_MEN_SHIFT,4,2          ## @MCONFIG_MEN_SHIFT
	.comm	_MAX77843_HAP_REG_MCONFIG,4,2   ## @MAX77843_HAP_REG_MCONFIG
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to update haptic config: %d\n"

	.no_dead_strip	_max77693_haptic_configure
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function max77693_haptic_configure
_max77693_haptic_configure:             ; @max77693_haptic_configure
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	w8, [x0]
	cmp	w8, #128
	b.eq	LBB0_3
; %bb.1:
	cmp	w8, #129
	b.ne	LBB0_6
; %bb.2:
Lloh0:
	adrp	x8, _MAX77693_CONFIG2_MODE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX77693_CONFIG2_MODE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldp	w9, w10, [x19, #4]
	lsl	w8, w9, w8
Lloh3:
	adrp	x9, _MAX77693_CONFIG2_MEN@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MAX77693_CONFIG2_MEN@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	lsl	w9, w1, w9
	orr	w9, w9, w8
Lloh6:
	adrp	x8, _MAX77693_CONFIG2_HTYP@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MAX77693_CONFIG2_HTYP@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	lsl	w8, w10, w8
Lloh9:
	adrp	x10, _MAX77693_HAPTIC_REG_CONFIG2@GOTPAGE
Lloh10:
	ldr	x10, [x10, _MAX77693_HAPTIC_REG_CONFIG2@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:
	ldr	w8, [x19, #4]
Lloh11:
	adrp	x9, _MCONFIG_MODE_SHIFT@GOTPAGE
Lloh12:
	ldr	x9, [x9, _MCONFIG_MODE_SHIFT@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	lsl	w8, w8, w9
Lloh14:
	adrp	x9, _MCONFIG_MEN_SHIFT@GOTPAGE
Lloh15:
	ldr	x9, [x9, _MCONFIG_MEN_SHIFT@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	lsl	w9, w1, w9
Lloh17:
	adrp	x10, _MAX77843_HAP_REG_MCONFIG@GOTPAGE
Lloh18:
	ldr	x10, [x10, _MAX77843_HAP_REG_MCONFIG@GOTPAGEOFF]
LBB0_4:
	orr	w8, w9, w8
Lloh19:
	adrp	x9, _MAX77693_HAPTIC_PWM_DIVISOR_128@GOTPAGE
Lloh20:
	ldr	x9, [x9, _MAX77693_HAPTIC_PWM_DIVISOR_128@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	orr	w2, w8, w9
	ldr	w1, [x10]
	ldr	w0, [x19, #16]
	bl	_regmap_write
	mov	x20, x0
	cbz	w0, LBB0_7
; %bb.5:
	ldr	w0, [x19, #12]
Lloh22:
	adrp	x1, l_.str@PAGE
Lloh23:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_dev_err
	b	LBB0_7
LBB0_6:
Lloh24:
	adrp	x8, _EINVAL@GOTPAGE
Lloh25:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_7:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX77693_CONFIG2_MODE,4,2      ; @MAX77693_CONFIG2_MODE
	.comm	_MAX77693_CONFIG2_MEN,4,2       ; @MAX77693_CONFIG2_MEN
	.comm	_MAX77693_CONFIG2_HTYP,4,2      ; @MAX77693_CONFIG2_HTYP
	.comm	_MAX77693_HAPTIC_PWM_DIVISOR_128,4,2 ; @MAX77693_HAPTIC_PWM_DIVISOR_128
	.comm	_MAX77693_HAPTIC_REG_CONFIG2,4,2 ; @MAX77693_HAPTIC_REG_CONFIG2
	.comm	_MCONFIG_MODE_SHIFT,4,2         ; @MCONFIG_MODE_SHIFT
	.comm	_MCONFIG_MEN_SHIFT,4,2          ; @MCONFIG_MEN_SHIFT
	.comm	_MAX77843_HAP_REG_MCONFIG,4,2   ; @MAX77843_HAP_REG_MCONFIG
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to update haptic config: %d\n"

	.no_dead_strip	_max77693_haptic_configure
.subsections_via_symbols
