	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lgdt3305_attach                ## -- Begin function lgdt3305_attach
	.p2align	4, 0x90
_lgdt3305_attach:                       ## @lgdt3305_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, %r12
	movq	%rdi, %r14
	xorl	%ebx, %ebx
	movl	$0, %esi
	testq	%r12, %r12
	je	LBB0_2
## %bb.1:
	movq	%r12, %rdi
	callq	_i2c_adapter_id
	movl	%eax, %esi
LBB0_2:
	testq	%r14, %r14
	je	LBB0_4
## %bb.3:
	movl	4(%r14), %ebx
LBB0_4:
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %edx
	callq	_lg_dbg
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$40, %edi
	callq	_kzalloc
	movq	%rax, %r15
	testq	%rax, %rax
	je	LBB0_14
## %bb.5:
	movq	%r14, 32(%r15)
	movq	%r12, 24(%r15)
	movl	(%r14), %eax
	cmpl	$129, %eax
	je	LBB0_6
## %bb.7:
	cmpl	$128, %eax
	jne	LBB0_14
## %bb.8:
	movq	_lgdt3305_ops@GOTPCREL(%rip), %rsi
	jmp	LBB0_9
LBB0_6:
	movq	_lgdt3304_ops@GOTPCREL(%rip), %rsi
LBB0_9:
	leaq	16(%r15), %rdi
	movl	$4, %edx
	callq	_memcpy
	movq	%r15, 8(%r15)
	movq	_LGDT3305_GEN_CTRL_2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-36(%rbp), %rdx
	movq	%r15, %rdi
	callq	_lgdt3305_read_reg
	movl	%eax, %edi
	callq	_lg_fail
	xorl	%ecx, %ecx
	cmpl	$0, -36(%rbp)
	sete	%cl
	orl	%eax, %ecx
	jne	LBB0_14
## %bb.10:
	movq	%r15, %rdi
	movl	$2056, %esi                     ## imm = 0x808
	movl	$128, %edx
	callq	_lgdt3305_write_reg
	movl	%eax, %edi
	callq	_lg_fail
	testl	%eax, %eax
	jne	LBB0_14
## %bb.11:
	leaq	-36(%rbp), %rdx
	movq	%r15, %rdi
	movl	$2056, %esi                     ## imm = 0x808
	callq	_lgdt3305_read_reg
	movl	%eax, %edi
	callq	_lg_fail
	xorl	%ecx, %ecx
	cmpl	$128, -36(%rbp)
	setne	%cl
	orl	%eax, %ecx
	jne	LBB0_14
## %bb.12:
	movq	%r15, %rdi
	movl	$2056, %esi                     ## imm = 0x808
	xorl	%edx, %edx
	callq	_lgdt3305_write_reg
	movl	%eax, %edi
	callq	_lg_fail
	testl	%eax, %eax
	je	LBB0_13
LBB0_14:
	cmpl	$0, (%r14)
	leaq	L_.str.3(%rip), %rax
	leaq	L_.str.2(%rip), %rsi
	cmoveq	%rax, %rsi
	leaq	L_.str.1(%rip), %rdi
	callq	_lg_warn
	movq	%r15, %rdi
	callq	_kfree
	xorl	%eax, %eax
LBB0_15:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movq	%r15, %rax
	addq	$8, %rax
	movq	$-1, (%r15)
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"(%d-%04x)\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_lgdt3304_ops,4,2               ## @lgdt3304_ops
	.comm	_lgdt3305_ops,4,2               ## @lgdt3305_ops
	.comm	_LGDT3305_GEN_CTRL_2,4,2        ## @LGDT3305_GEN_CTRL_2
L_.str.1:                               ## @.str.1
	.asciz	"unable to detect %s hardware\n"

L_.str.2:                               ## @.str.2
	.asciz	"LGDT3304"

L_.str.3:                               ## @.str.3
	.asciz	"LGDT3305"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lgdt3305_attach                ; -- Begin function lgdt3305_attach
	.p2align	2
_lgdt3305_attach:                       ; @lgdt3305_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	x21, x1
	mov	x19, x0
	cbz	x1, LBB0_2
; %bb.1:
	mov	x0, x21
	bl	_i2c_adapter_id
	mov	x1, x0
LBB0_2:
	cbz	x19, LBB0_4
; %bb.3:
	ldr	w2, [x19, #4]
	b	LBB0_5
LBB0_4:
	mov	w2, #0
LBB0_5:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_lg_dbg
Lloh2:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	w0, #40
	bl	_kzalloc
	mov	x20, x0
	cbz	x0, LBB0_14
; %bb.6:
	stp	x21, x19, [x20, #24]
	ldr	w8, [x19]
	cmp	w8, #129
	b.eq	LBB0_9
; %bb.7:
	cmp	w8, #128
	b.ne	LBB0_14
; %bb.8:
Lloh5:
	adrp	x1, _lgdt3305_ops@GOTPAGE
Lloh6:
	ldr	x1, [x1, _lgdt3305_ops@GOTPAGEOFF]
	b	LBB0_10
LBB0_9:
Lloh7:
	adrp	x1, _lgdt3304_ops@GOTPAGE
Lloh8:
	ldr	x1, [x1, _lgdt3304_ops@GOTPAGEOFF]
LBB0_10:
	add	x0, x20, #16
	mov	w2, #4
	bl	_memcpy
	str	x20, [x20, #8]
Lloh9:
	adrp	x8, _LGDT3305_GEN_CTRL_2@GOTPAGE
Lloh10:
	ldr	x8, [x8, _LGDT3305_GEN_CTRL_2@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x20
	bl	_lgdt3305_read_reg
	bl	_lg_fail
	ldr	w8, [sp, #12]
	cmp	w8, #0
	cset	w8, eq
	orr	w8, w0, w8
	cbnz	w8, LBB0_14
; %bb.11:
	mov	x0, x20
	mov	w1, #2056
	mov	w2, #128
	bl	_lgdt3305_write_reg
	bl	_lg_fail
	cbnz	w0, LBB0_14
; %bb.12:
	add	x2, sp, #12
	mov	x0, x20
	mov	w1, #2056
	bl	_lgdt3305_read_reg
	bl	_lg_fail
	ldr	w8, [sp, #12]
	cmp	w8, #128
	cset	w8, ne
	orr	w8, w0, w8
	cbnz	w8, LBB0_14
; %bb.13:
	mov	x0, x20
	mov	w1, #2056
	mov	w2, #0
	bl	_lgdt3305_write_reg
	bl	_lg_fail
	cbz	w0, LBB0_16
LBB0_14:
	ldr	w8, [x19]
Lloh12:
	adrp	x9, l_.str.2@PAGE
Lloh13:
	add	x9, x9, l_.str.2@PAGEOFF
Lloh14:
	adrp	x10, l_.str.3@PAGE
Lloh15:
	add	x10, x10, l_.str.3@PAGEOFF
	cmp	w8, #0
	csel	x1, x10, x9, eq
Lloh16:
	adrp	x0, l_.str.1@PAGE
Lloh17:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_lg_warn
	mov	x0, x20
	bl	_kfree
	mov	x0, #0
LBB0_15:
	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_16:
	add	x0, x20, #8
	movi.2d	v0, #0xffffffffffffffff
	str	d0, [x20]
	b	LBB0_15
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"(%d-%04x)\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_lgdt3304_ops,4,2               ; @lgdt3304_ops
	.comm	_lgdt3305_ops,4,2               ; @lgdt3305_ops
	.comm	_LGDT3305_GEN_CTRL_2,4,2        ; @LGDT3305_GEN_CTRL_2
l_.str.1:                               ; @.str.1
	.asciz	"unable to detect %s hardware\n"

l_.str.2:                               ; @.str.2
	.asciz	"LGDT3304"

l_.str.3:                               ; @.str.3
	.asciz	"LGDT3305"

.subsections_via_symbols
