	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lp55xx_init_device             ## -- Begin function lp55xx_init_device
	.p2align	4, 0x90
_lp55xx_init_device:                    ## @lp55xx_init_device
	.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, %r15
	movq	16(%rdi), %r14
	xorl	%edi, %edi
	testq	%r15, %r15
	sete	%dil
	callq	_WARN_ON
	movq	8(%r15), %r12
	testq	%r12, %r12
	je	LBB0_2
## %bb.1:
	cmpq	$0, (%r15)
	je	LBB0_2
## %bb.3:
	movl	(%r12), %edi
	callq	_gpio_is_valid
	testq	%rax, %rax
	je	LBB0_8
## %bb.4:
	movl	(%r12), %esi
	movq	_GPIOF_DIR_OUT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rcx
	movq	%r14, %rdi
	callq	_devm_gpio_request_one
	testl	%eax, %eax
	js	LBB0_5
## %bb.7:
	movl	(%r12), %edi
	xorl	%esi, %esi
	callq	_gpio_set_value
	movl	$1000, %edi                     ## imm = 0x3E8
	movl	$2000, %esi                     ## imm = 0x7D0
	callq	_usleep_range
	movl	(%r12), %edi
	movl	$1, %esi
	callq	_gpio_set_value
	movl	$1000, %edi                     ## imm = 0x3E8
	movl	$2000, %esi                     ## imm = 0x7D0
	callq	_usleep_range
LBB0_8:
	movq	%r15, %rdi
	callq	_lp55xx_reset_device
	movl	$10000, %edi                    ## imm = 0x2710
	movl	$20000, %esi                    ## imm = 0x4E20
	callq	_usleep_range
	movq	%r15, %rdi
	callq	_lp55xx_detect_device
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_6
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_13
LBB0_10:
	movq	%r15, %rdi
	callq	_lp55xx_post_init_device
	testl	%eax, %eax
	je	LBB0_11
## %bb.12:
	movl	%eax, %ebx
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_dev_err
	movq	%r15, %rdi
	callq	_lp55xx_deinit_device
	jmp	LBB0_13
LBB0_5:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
LBB0_6:
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_dev_err
LBB0_13:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	xorl	%ebx, %ebx
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GPIOF_DIR_OUT,4,2              ## @GPIOF_DIR_OUT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"lp5523_enable"

L_.str.1:                               ## @.str.1
	.asciz	"could not acquire enable gpio (err=%d)\n"

L_.str.2:                               ## @.str.2
	.asciz	"device detection err: %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"post init device err: %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lp55xx_init_device             ; -- Begin function lp55xx_init_device
	.p2align	2
_lp55xx_init_device:                    ; @lp55xx_init_device
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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, #16]
	cmp	x0, #0
	cset	w0, eq
	bl	_WARN_ON
	ldp	x8, x22, [x20]
	cmp	x22, #0
	ccmp	x8, #0, #4, ne
	b.ne	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_11
LBB0_2:
	ldr	w0, [x22]
	bl	_gpio_is_valid
	cbz	x0, LBB0_5
; %bb.3:
	ldr	w1, [x22]
Lloh3:
	adrp	x8, _GPIOF_DIR_OUT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GPIOF_DIR_OUT@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
Lloh6:
	adrp	x3, l_.str@PAGE
Lloh7:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x19
	bl	_devm_gpio_request_one
	tbnz	w0, #31, LBB0_9
; %bb.4:
	ldr	w0, [x22]
	mov	w1, #0
	bl	_gpio_set_value
	mov	w0, #1000
	mov	w1, #2000
	bl	_usleep_range
	ldr	w0, [x22]
	mov	w1, #1
	bl	_gpio_set_value
	mov	w0, #1000
	mov	w1, #2000
	bl	_usleep_range
LBB0_5:
	mov	x0, x20
	bl	_lp55xx_reset_device
	mov	w0, #10000
	mov	w1, #20000
	bl	_usleep_range
	mov	x0, x20
	bl	_lp55xx_detect_device
	cbz	w0, LBB0_7
; %bb.6:
	mov	x21, x0
Lloh8:
	adrp	x1, l_.str.2@PAGE
Lloh9:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_10
LBB0_7:
	mov	x0, x20
	bl	_lp55xx_post_init_device
	mov	x21, x0
	cbz	w0, LBB0_11
; %bb.8:
Lloh10:
	adrp	x1, l_.str.3@PAGE
Lloh11:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	bl	_dev_err
	mov	x0, x20
	bl	_lp55xx_deinit_device
	b	LBB0_11
LBB0_9:
	mov	x21, x0
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_10:
	mov	x0, x19
	mov	x2, x21
	bl	_dev_err
LBB0_11:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GPIOF_DIR_OUT,4,2              ; @GPIOF_DIR_OUT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"lp5523_enable"

l_.str.1:                               ; @.str.1
	.asciz	"could not acquire enable gpio (err=%d)\n"

l_.str.2:                               ; @.str.2
	.asciz	"device detection err: %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"post init device err: %d\n"

.subsections_via_symbols
