	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lgdt3306a_attach               ## -- Begin function lgdt3306a_attach
	.p2align	4, 0x90
_lgdt3306a_attach:                      ## @lgdt3306a_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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r12
	xorl	%ebx, %ebx
	movl	$0, %esi
	testq	%r15, %r15
	je	LBB0_2
## %bb.1:
	movq	%r15, %rdi
	callq	_i2c_adapter_id
	movl	%eax, %esi
LBB0_2:
	testq	%r12, %r12
	je	LBB0_4
## %bb.3:
	movl	(%r12), %ebx
LBB0_4:
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %edx
	callq	_dbg_info
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$40, %edi
	callq	_kzalloc
	movq	%rax, %r14
	testq	%rax, %rax
	je	LBB0_15
## %bb.5:
	movq	%r12, 32(%r14)
	movq	%r15, 24(%r14)
	leaq	16(%r14), %rdi
	movq	_lgdt3306a_ops@GOTPCREL(%rip), %rsi
	movl	$4, %edx
	callq	_memcpy
	movq	%r14, 8(%r14)
	leaq	-36(%rbp), %rdx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_lgdt3306a_read_reg
	movl	%eax, %edi
	callq	_lg_chkerr
	testq	%rax, %rax
	jne	LBB0_15
## %bb.6:
	movl	-36(%rbp), %esi
	andl	$116, %esi
	cmpl	$116, %esi
	je	LBB0_8
## %bb.7:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_warn
LBB0_8:
	leaq	-36(%rbp), %rdx
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_lgdt3306a_read_reg
	movl	%eax, %edi
	callq	_lg_chkerr
	testq	%rax, %rax
	jne	LBB0_15
## %bb.9:
	movl	$246, %esi
	andl	-36(%rbp), %esi
	cmpl	$198, %esi
	je	LBB0_11
## %bb.10:
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_warn
LBB0_11:
	leaq	-36(%rbp), %rdx
	movq	%r14, %rdi
	movl	$2, %esi
	callq	_lgdt3306a_read_reg
	movl	%eax, %edi
	callq	_lg_chkerr
	testq	%rax, %rax
	je	LBB0_12
LBB0_15:
	leaq	L_.str.4(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_pr_warn
	movq	%r14, %rdi
	callq	_kfree
LBB0_16:
	movq	%rbx, %rax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movl	-36(%rbp), %esi
	andl	$115, %esi
	cmpl	$3, %esi
	je	LBB0_14
## %bb.13:
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_warn
LBB0_14:
	movq	%r14, %rbx
	addq	$8, %rbx
	movq	$-1, (%r14)
	movq	%r14, %rdi
	callq	_lgdt3306a_sleep
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"(%d-%04x)\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_lgdt3306a_ops,4,2              ## @lgdt3306a_ops
L_.str.1:                               ## @.str.1
	.asciz	"expected 0x74, got 0x%x\n"

L_.str.2:                               ## @.str.2
	.asciz	"expected 0xc6, got 0x%x\n"

L_.str.3:                               ## @.str.3
	.asciz	"expected 0x03, got 0x%x\n"

L_.str.4:                               ## @.str.4
	.asciz	"unable to detect LGDT3306A hardware\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lgdt3306a_attach               ; -- Begin function lgdt3306a_attach
	.p2align	2
_lgdt3306a_attach:                      ; @lgdt3306a_attach
	.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, x1
	mov	x21, x0
	cbz	x1, LBB0_2
; %bb.1:
	mov	x0, x20
	bl	_i2c_adapter_id
	mov	x1, x0
LBB0_2:
	cbz	x21, LBB0_4
; %bb.3:
	ldr	w2, [x21]
	b	LBB0_5
LBB0_4:
	mov	w2, #0
LBB0_5:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_dbg_info
Lloh2:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	w0, #40
	bl	_kzalloc
	mov	x19, x0
	cbz	x0, LBB0_13
; %bb.6:
	stp	x20, x21, [x19, #24]
	add	x0, x19, #16
Lloh5:
	adrp	x1, _lgdt3306a_ops@GOTPAGE
Lloh6:
	ldr	x1, [x1, _lgdt3306a_ops@GOTPAGEOFF]
	mov	w2, #4
	bl	_memcpy
	str	x19, [x19, #8]
	add	x2, sp, #12
	mov	x0, x19
	mov	w1, #0
	bl	_lgdt3306a_read_reg
	bl	_lg_chkerr
	cbnz	x0, LBB0_13
; %bb.7:
	ldr	w8, [sp, #12]
	mov	w9, #116
	and	w8, w8, w9
	cmp	w8, #116
	b.eq	LBB0_9
; %bb.8:
	str	x8, [sp]
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_warn
LBB0_9:
	add	x2, sp, #12
	mov	x0, x19
	mov	w1, #1
	bl	_lgdt3306a_read_reg
	bl	_lg_chkerr
	cbnz	x0, LBB0_13
; %bb.10:
	ldr	w8, [sp, #12]
	mov	w9, #246
	and	w8, w8, w9
	cmp	w8, #198
	b.eq	LBB0_12
; %bb.11:
	str	x8, [sp]
Lloh9:
	adrp	x0, l_.str.2@PAGE
Lloh10:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_warn
LBB0_12:
	add	x2, sp, #12
	mov	x0, x19
	mov	w1, #2
	bl	_lgdt3306a_read_reg
	bl	_lg_chkerr
	cbz	x0, LBB0_15
LBB0_13:
Lloh11:
	adrp	x0, l_.str.4@PAGE
Lloh12:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_pr_warn
	mov	x0, x19
	bl	_kfree
	mov	x20, #0
LBB0_14:
	mov	x0, x20
	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_15:
	add	x20, x19, #8
	ldr	w8, [sp, #12]
	mov	w9, #115
	and	w8, w8, w9
	cmp	w8, #3
	b.eq	LBB0_17
; %bb.16:
	str	x8, [sp]
Lloh13:
	adrp	x0, l_.str.3@PAGE
Lloh14:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_pr_warn
LBB0_17:
	movi.2d	v0, #0xffffffffffffffff
	str	d0, [x19]
	mov	x0, x19
	bl	_lgdt3306a_sleep
	b	LBB0_14
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"(%d-%04x)\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_lgdt3306a_ops,4,2              ; @lgdt3306a_ops
l_.str.1:                               ; @.str.1
	.asciz	"expected 0x74, got 0x%x\n"

l_.str.2:                               ; @.str.2
	.asciz	"expected 0xc6, got 0x%x\n"

l_.str.3:                               ; @.str.3
	.asciz	"expected 0x03, got 0x%x\n"

l_.str.4:                               ; @.str.4
	.asciz	"unable to detect LGDT3306A hardware\n"

.subsections_via_symbols
