	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bd718xx_init_press_duration
_bd718xx_init_press_duration:           ## @bd718xx_init_press_duration
	.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, %r15
	movq	8(%rdi), %r14
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	leaq	-32(%rbp), %rdx
	callq	_of_property_read_u32
	testl	%eax, %eax
	je	LBB0_1
LBB0_3:
	movl	(%r14), %edi
	leaq	L_.str.2(%rip), %rsi
	leaq	-28(%rbp), %rdx
	callq	_of_property_read_u32
	xorl	%ebx, %ebx
	testl	%eax, %eax
	jne	LBB0_7
## %bb.4:
	movl	$500, %eax                      ## imm = 0x1F4
	addl	-28(%rbp), %eax
	cltq
	imulq	$274877907, %rax, %rsi          ## imm = 0x10624DD3
	movq	%rsi, %rax
	shrq	$63, %rax
	sarq	$38, %rsi
	addl	%eax, %esi
	movl	$15, %edi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_min
	movl	(%r15), %edi
	movq	_BD718XX_REG_PWRONCONFIG1@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_BD718XX_PWRBTN_PRESS_DURATION_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %ecx
	callq	_regmap_update_bits
	testl	%eax, %eax
	je	LBB0_7
## %bb.5:
	leaq	L_.str.3(%rip), %rsi
	movl	%eax, %ebx
	jmp	LBB0_6
LBB0_1:
	movl	$250, %eax
	addl	-32(%rbp), %eax
	cltq
	imulq	$274877907, %rax, %rsi          ## imm = 0x10624DD3
	movq	%rsi, %rax
	shrq	$63, %rax
	sarq	$37, %rsi
	addl	%eax, %esi
	movl	$15, %edi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_min
	movl	(%r15), %edi
	movq	_BD718XX_REG_PWRONCONFIG0@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_BD718XX_PWRBTN_PRESS_DURATION_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %ecx
	callq	_regmap_update_bits
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
LBB0_6:
	movq	%r14, %rdi
	callq	_dev_err
LBB0_7:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"rohm,short-press-ms"

	.comm	_BD718XX_REG_PWRONCONFIG0,4,2   ## @BD718XX_REG_PWRONCONFIG0
	.comm	_BD718XX_PWRBTN_PRESS_DURATION_MASK,4,2 ## @BD718XX_PWRBTN_PRESS_DURATION_MASK
L_.str.1:                               ## @.str.1
	.asciz	"Failed to init pwron short press\n"

L_.str.2:                               ## @.str.2
	.asciz	"rohm,long-press-ms"

	.comm	_BD718XX_REG_PWRONCONFIG1,4,2   ## @BD718XX_REG_PWRONCONFIG1
L_.str.3:                               ## @.str.3
	.asciz	"Failed to init pwron long press\n"

	.no_dead_strip	_bd718xx_init_press_duration
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bd718xx_init_press_duration
_bd718xx_init_press_duration:           ; @bd718xx_init_press_duration
	.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	x19, [x0, #8]
	ldr	w0, [x19]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	add	x2, sp, #12
	bl	_of_property_read_u32
	cbz	w0, LBB0_3
LBB0_1:
	ldr	w0, [x19]
Lloh2:
	adrp	x1, l_.str.2@PAGE
Lloh3:
	add	x1, x1, l_.str.2@PAGEOFF
	add	x2, sp, #8
	bl	_of_property_read_u32
	cbz	w0, LBB0_5
; %bb.2:
	mov	w21, #0
	b	LBB0_8
LBB0_3:
	ldr	w8, [sp, #12]
	add	w8, w8, #250
	mov	w9, #19923
	movk	w9, #4194, lsl #16
	smull	x8, w8, w9
	lsr	x9, x8, #63
	asr	x8, x8, #37
	add	w1, w8, w9
	mov	w0, #15
	bl	_min
	mov	x3, x0
	ldr	w0, [x20]
Lloh4:
	adrp	x8, _BD718XX_REG_PWRONCONFIG0@GOTPAGE
Lloh5:
	ldr	x8, [x8, _BD718XX_REG_PWRONCONFIG0@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
Lloh7:
	adrp	x8, _BD718XX_PWRBTN_PRESS_DURATION_MASK@GOTPAGE
Lloh8:
	ldr	x8, [x8, _BD718XX_PWRBTN_PRESS_DURATION_MASK@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x8]
	bl	_regmap_update_bits
	cbz	w0, LBB0_1
; %bb.4:
	mov	x21, x0
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_7
LBB0_5:
	ldr	w8, [sp, #8]
	add	w8, w8, #500
	mov	w9, #19923
	movk	w9, #4194, lsl #16
	smull	x8, w8, w9
	lsr	x9, x8, #63
	asr	x8, x8, #38
	add	w1, w8, w9
	mov	w0, #15
	bl	_min
	mov	x3, x0
	ldr	w0, [x20]
Lloh12:
	adrp	x8, _BD718XX_REG_PWRONCONFIG1@GOTPAGE
Lloh13:
	ldr	x8, [x8, _BD718XX_REG_PWRONCONFIG1@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
Lloh15:
	adrp	x8, _BD718XX_PWRBTN_PRESS_DURATION_MASK@GOTPAGE
Lloh16:
	ldr	x8, [x8, _BD718XX_PWRBTN_PRESS_DURATION_MASK@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	bl	_regmap_update_bits
	mov	x21, x0
	cbz	w0, LBB0_8
; %bb.6:
Lloh18:
	adrp	x1, l_.str.3@PAGE
Lloh19:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_7:
	mov	x0, x19
	bl	_dev_err
LBB0_8:
	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
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"rohm,short-press-ms"

	.comm	_BD718XX_REG_PWRONCONFIG0,4,2   ; @BD718XX_REG_PWRONCONFIG0
	.comm	_BD718XX_PWRBTN_PRESS_DURATION_MASK,4,2 ; @BD718XX_PWRBTN_PRESS_DURATION_MASK
l_.str.1:                               ; @.str.1
	.asciz	"Failed to init pwron short press\n"

l_.str.2:                               ; @.str.2
	.asciz	"rohm,long-press-ms"

	.comm	_BD718XX_REG_PWRONCONFIG1,4,2   ; @BD718XX_REG_PWRONCONFIG1
l_.str.3:                               ; @.str.3
	.asciz	"Failed to init pwron long press\n"

	.no_dead_strip	_bd718xx_init_press_duration
.subsections_via_symbols
