	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_l64781_attach                  ## -- Begin function l64781_attach
	.p2align	4, 0x90
_l64781_attach:                         ## @l64781_attach
	.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
	subq	$72, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movl	$26, -88(%rbp)
	movl	$0, -84(%rbp)
	leaq	-88(%rbp), %rax
	movq	%rax, -80(%rbp)
	movq	$1, -72(%rbp)
	movl	(%rdi), %eax
	movl	%eax, -64(%rbp)
	leaq	-84(%rbp), %rcx
	movq	%rcx, -56(%rbp)
	movl	$1, -48(%rbp)
	movq	_I2C_M_RD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, -44(%rbp)
	movl	%eax, -40(%rbp)
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$40, %edi
	callq	_kzalloc
	movq	%rax, %r15
	testq	%rax, %rax
	je	LBB0_14
## %bb.1:
	movq	%rbx, 32(%r15)
	movq	%r14, 24(%r15)
	movl	$1, (%r15)
	movq	%r15, %rdi
	callq	_reset_and_configure
	testq	%rax, %rax
	js	LBB0_5
## %bb.2:
	movq	24(%r15), %rdi
	leaq	-80(%rbp), %rsi
	movl	$2, %edx
	callq	_i2c_transfer
	cmpl	$2, %eax
	jne	LBB0_6
## %bb.3:
	movq	%r15, %rdi
	movl	$62, %esi
	callq	_l64781_readreg
	movl	%eax, %r14d
	testl	%eax, %eax
	je	LBB0_7
## %bb.4:
	leaq	L_.str.2(%rip), %rdi
	callq	_dprintk
	testl	%r14d, %r14d
	jns	LBB0_13
	jmp	LBB0_14
LBB0_5:
	leaq	L_.str(%rip), %rdi
	callq	_dprintk
	jmp	LBB0_14
LBB0_6:
	leaq	L_.str.1(%rip), %rdi
	callq	_dprintk
	jmp	LBB0_14
LBB0_7:
	movq	%r15, %rdi
	movl	$62, %esi
	movl	$90, %edx
	callq	_l64781_writereg
	movq	%r15, %rdi
	movl	$26, %esi
	callq	_l64781_readreg
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_12
LBB0_9:
	movq	%r15, %rdi
	movl	$62, %esi
	movl	$165, %edx
	callq	_l64781_writereg
	movq	%r15, %rdi
	movl	$26, %esi
	callq	_l64781_readreg
	cmpl	$161, %eax
	jne	LBB0_11
## %bb.10:
	leaq	8(%r15), %rbx
	movq	%r15, %rdi
	addq	$16, %rdi
	movq	_l64781_ops@GOTPCREL(%rip), %rsi
	movl	$4, %edx
	callq	_memcpy
	movq	%r15, 8(%r15)
	jmp	LBB0_15
LBB0_11:
	leaq	L_.str.4(%rip), %rdi
LBB0_12:
	callq	_dprintk
LBB0_13:
	movq	%r15, %rdi
	movl	$62, %esi
	movl	%r14d, %edx
	callq	_l64781_writereg
LBB0_14:
	movq	%r15, %rdi
	callq	_kfree
	xorl	%ebx, %ebx
LBB0_15:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_17
## %bb.16:
	movq	%rbx, %rax
	addq	$72, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_M_RD,4,2                   ## @I2C_M_RD
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"No response to reset and configure broadcast...\n"

L_.str.1:                               ## @.str.1
	.asciz	"No response to read on I2C bus\n"

L_.str.2:                               ## @.str.2
	.asciz	"Device doesn't look like L64781\n"

L_.str.3:                               ## @.str.3
	.asciz	"Read 1 returned unexpected value\n"

L_.str.4:                               ## @.str.4
	.asciz	"Read 2 returned unexpected value\n"

	.comm	_l64781_ops,4,2                 ## @l64781_ops
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function l64781_attach
lCPI0_0:
	.long	1                               ; 0x1
	.long	0                               ; 0x0
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_l64781_attach
	.p2align	2
_l64781_attach:                         ; @l64781_attach
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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, x1
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	mov	w8, #26
	stp	wzr, w8, [sp]
	add	x8, sp, #4
	str	x8, [sp, #8]
Lloh3:
	adrp	x8, lCPI0_0@PAGE
Lloh4:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [sp, #16]
	ldr	w8, [x0]
	str	w8, [sp, #24]
	mov	x9, sp
	str	x9, [sp, #32]
	mov	w22, #1
Lloh5:
	adrp	x9, _I2C_M_RD@GOTPAGE
Lloh6:
	ldr	x9, [x9, _I2C_M_RD@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	stp	w22, w9, [sp, #40]
	str	w8, [sp, #48]
Lloh8:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	w0, #40
	bl	_kzalloc
	mov	x19, x0
	cbz	x0, LBB0_14
; %bb.1:
	stp	x20, x21, [x19, #24]
	str	w22, [x19]
	mov	x0, x19
	bl	_reset_and_configure
	tbnz	x0, #63, LBB0_5
; %bb.2:
	ldr	x0, [x19, #24]
	add	x1, sp, #8
	mov	w2, #2
	bl	_i2c_transfer
	cmp	w0, #2
	b.ne	LBB0_6
; %bb.3:
	mov	x0, x19
	mov	w1, #62
	bl	_l64781_readreg
	mov	x20, x0
	cbz	w0, LBB0_7
; %bb.4:
Lloh11:
	adrp	x0, l_.str.2@PAGE
Lloh12:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_dprintk
	tbz	w20, #31, LBB0_13
	b	LBB0_14
LBB0_5:
Lloh13:
	adrp	x0, l_.str@PAGE
Lloh14:
	add	x0, x0, l_.str@PAGEOFF
	bl	_dprintk
	b	LBB0_14
LBB0_6:
Lloh15:
	adrp	x0, l_.str.1@PAGE
Lloh16:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_dprintk
	b	LBB0_14
LBB0_7:
	mov	x0, x19
	mov	w1, #62
	mov	w2, #90
	bl	_l64781_writereg
	mov	x0, x19
	mov	w1, #26
	bl	_l64781_readreg
	cbz	w0, LBB0_9
; %bb.8:
Lloh17:
	adrp	x0, l_.str.3@PAGE
Lloh18:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_12
LBB0_9:
	mov	x0, x19
	mov	w1, #62
	mov	w2, #165
	bl	_l64781_writereg
	mov	x0, x19
	mov	w1, #26
	bl	_l64781_readreg
	cmp	w0, #161
	b.ne	LBB0_11
; %bb.10:
	add	x20, x19, #8
	add	x0, x19, #16
Lloh19:
	adrp	x1, _l64781_ops@GOTPAGE
Lloh20:
	ldr	x1, [x1, _l64781_ops@GOTPAGEOFF]
	mov	w2, #4
	bl	_memcpy
	str	x19, [x19, #8]
	b	LBB0_15
LBB0_11:
Lloh21:
	adrp	x0, l_.str.4@PAGE
Lloh22:
	add	x0, x0, l_.str.4@PAGEOFF
LBB0_12:
	bl	_dprintk
LBB0_13:
	mov	x0, x19
	mov	w1, #62
	mov	x2, x20
	bl	_l64781_writereg
LBB0_14:
	mov	x0, x19
	bl	_kfree
	mov	x20, #0
LBB0_15:
	ldur	x8, [x29, #-40]
Lloh23:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh24:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_17
; %bb.16:
	mov	x0, x20
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_17:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdr	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_M_RD,4,2                   ; @I2C_M_RD
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No response to reset and configure broadcast...\n"

l_.str.1:                               ; @.str.1
	.asciz	"No response to read on I2C bus\n"

l_.str.2:                               ; @.str.2
	.asciz	"Device doesn't look like L64781\n"

l_.str.3:                               ; @.str.3
	.asciz	"Read 1 returned unexpected value\n"

l_.str.4:                               ; @.str.4
	.asciz	"Read 2 returned unexpected value\n"

	.comm	_l64781_ops,4,2                 ; @l64781_ops
.subsections_via_symbols
