	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function ascot2e_attach
LCPI0_0:
	.long	16                              ## 0x10
	.long	6                               ## 0x6
	.long	196                             ## 0xc4
	.long	64                              ## 0x40
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_ascot2e_attach
	.p2align	4, 0x90
_ascot2e_attach:                        ## @ascot2e_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	%rdx, %r12
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$32, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movl	(%r15), %eax
	sarl	%eax
	movl	%eax, (%rbx)
	movq	%r12, 8(%rbx)
	movl	8(%r15), %eax
	movl	%eax, 24(%rbx)
	movl	4(%r15), %eax
	movl	%eax, 20(%rbx)
	movq	16(%r14), %rax
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	%r14, %rdi
	movl	$1, %esi
	callq	*%rax
LBB0_4:
	movaps	LCPI0_0(%rip), %xmm0            ## xmm0 = [16,6,196,64]
	movaps	%xmm0, -48(%rbp)
	leaq	-48(%rbp), %r15
	movq	%rbx, %rdi
	movl	$1, %esi
	movq	%r15, %rdx
	movl	$4, %ecx
	callq	_ascot2e_write_regs
	movabsq	$270582939664, %rax             ## imm = 0x3F00000010
	movq	%rax, -48(%rbp)
	movl	$37, -40(%rbp)
	movq	%rbx, %rdi
	movl	$34, %esi
	movq	%r15, %rdx
	movl	$3, %ecx
	callq	_ascot2e_write_regs
	movq	%rbx, %rdi
	movl	$40, %esi
	movl	$30, %edx
	callq	_ascot2e_write_reg
	movq	%rbx, %rdi
	movl	$89, %esi
	movl	$4, %edx
	callq	_ascot2e_write_reg
	movl	$80, %edi
	callq	_msleep
	movq	%rbx, %rdi
	movl	$76, %esi
	movl	$1, %edx
	callq	_ascot2e_write_reg
	movq	%rbx, %rdi
	movl	$7, %esi
	movl	$4, %edx
	callq	_ascot2e_write_reg
	movq	%rbx, %rdi
	movl	$4, %esi
	xorl	%edx, %edx
	callq	_ascot2e_write_reg
	movq	%rbx, %rdi
	movl	$3, %esi
	movl	$192, %edx
	callq	_ascot2e_write_reg
	movabsq	$17179869184, %rax              ## imm = 0x400000000
	movq	%rax, -48(%rbp)
	movq	%rbx, %rdi
	movl	$20, %esi
	movq	%r15, %rdx
	movl	$2, %ecx
	callq	_ascot2e_write_regs
	movq	%rbx, %rdi
	movl	$80, %esi
	movl	$1, %edx
	callq	_ascot2e_write_reg
	movq	_STATE_SLEEP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	movq	16(%r14), %rax
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	*%rax
LBB0_6:
	leaq	8(%r14), %rdi
	movq	_ascot2e_tuner_ops@GOTPCREL(%rip), %rsi
	movl	$4, %edx
	callq	_memcpy
	movq	%rbx, (%r14)
	movq	8(%rbx), %rcx
	movl	(%rbx), %edx
	leaq	L_.str(%rip), %rsi
	movq	%rcx, %rdi
	callq	_dev_info
	jmp	LBB0_7
LBB0_1:
	xorl	%r14d, %r14d
LBB0_7:
	movq	%r14, %rax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_STATE_SLEEP,4,2                ## @STATE_SLEEP
	.comm	_ascot2e_tuner_ops,4,2          ## @ascot2e_tuner_ops
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Sony ASCOT2E attached on addr=%x at I2C adapter %p\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ; -- Begin function ascot2e_attach
lCPI0_0:
	.long	16                              ; 0x10
	.long	6                               ; 0x6
	.long	196                             ; 0xc4
	.long	64                              ; 0x40
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3
lCPI0_1:
	.long	16                              ; 0x10
	.long	63                              ; 0x3f
lCPI0_2:
	.long	0                               ; 0x0
	.long	4                               ; 0x4
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_ascot2e_attach
	.p2align	2
_ascot2e_attach:                        ; @ascot2e_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	x22, x2
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #32
	bl	_kzalloc
	cbz	x0, LBB0_6
; %bb.1:
	mov	x20, x0
	ldr	w8, [x21]
	asr	w8, w8, #1
	str	w8, [x0]
	str	x22, [x0, #8]
	ldur	d0, [x21, #4]
	stur	d0, [x0, #20]
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_3
; %bb.2:
	mov	x0, x19
	mov	w1, #1
	blr	x8
LBB0_3:
Lloh3:
	adrp	x8, lCPI0_0@PAGE
Lloh4:
	ldr	q0, [x8, lCPI0_0@PAGEOFF]
	str	q0, [sp]
	mov	x2, sp
	mov	x0, x20
	mov	w1, #1
	mov	w3, #4
	bl	_ascot2e_write_regs
Lloh5:
	adrp	x8, lCPI0_1@PAGE
Lloh6:
	ldr	d0, [x8, lCPI0_1@PAGEOFF]
	str	d0, [sp]
	mov	w8, #37
	str	w8, [sp, #8]
	mov	x2, sp
	mov	x0, x20
	mov	w1, #34
	mov	w3, #3
	bl	_ascot2e_write_regs
	mov	x0, x20
	mov	w1, #40
	mov	w2, #30
	bl	_ascot2e_write_reg
	mov	x0, x20
	mov	w1, #89
	mov	w2, #4
	bl	_ascot2e_write_reg
	mov	w0, #80
	bl	_msleep
	mov	x0, x20
	mov	w1, #76
	mov	w2, #1
	bl	_ascot2e_write_reg
	mov	x0, x20
	mov	w1, #7
	mov	w2, #4
	bl	_ascot2e_write_reg
	mov	x0, x20
	mov	w1, #4
	mov	w2, #0
	bl	_ascot2e_write_reg
	mov	x0, x20
	mov	w1, #3
	mov	w2, #192
	bl	_ascot2e_write_reg
Lloh7:
	adrp	x8, lCPI0_2@PAGE
Lloh8:
	ldr	d0, [x8, lCPI0_2@PAGEOFF]
	str	d0, [sp]
	mov	x2, sp
	mov	x0, x20
	mov	w1, #20
	mov	w3, #2
	bl	_ascot2e_write_regs
	mov	x0, x20
	mov	w1, #80
	mov	w2, #1
	bl	_ascot2e_write_reg
Lloh9:
	adrp	x8, _STATE_SLEEP@GOTPAGE
Lloh10:
	ldr	x8, [x8, _STATE_SLEEP@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	str	w8, [x20, #16]
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_5
; %bb.4:
	mov	x0, x19
	mov	w1, #0
	blr	x8
LBB0_5:
	add	x0, x19, #8
Lloh12:
	adrp	x1, _ascot2e_tuner_ops@GOTPAGE
Lloh13:
	ldr	x1, [x1, _ascot2e_tuner_ops@GOTPAGEOFF]
	mov	w2, #4
	bl	_memcpy
	str	x20, [x19]
	ldr	x0, [x20, #8]
	ldr	w2, [x20]
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	mov	x3, x0
	bl	_dev_info
	b	LBB0_7
LBB0_6:
	mov	x19, #0
LBB0_7:
	mov	x0, x19
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdr	Lloh7, Lloh8
	.loh AdrpLdr	Lloh5, Lloh6
	.loh AdrpLdr	Lloh3, Lloh4
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_STATE_SLEEP,4,2                ; @STATE_SLEEP
	.comm	_ascot2e_tuner_ops,4,2          ; @ascot2e_tuner_ops
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Sony ASCOT2E attached on addr=%x at I2C adapter %p\n"

.subsections_via_symbols
