	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_helene_attach                  ## -- Begin function helene_attach
	.p2align	4, 0x90
_helene_attach:                         ## @helene_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
	.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_5
## %bb.1:
	movq	%rax, %rbx
	movl	(%r15), %eax
	sarl	%eax
	movl	%eax, (%rbx)
	movq	%r12, 8(%rbx)
	movl	12(%r15), %eax
	movl	%eax, 24(%rbx)
	movl	8(%r15), %eax
	movl	%eax, 20(%rbx)
	movl	4(%r15), %eax
	movl	%eax, 16(%rbx)
	movq	16(%r14), %rax
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	%r14, %rdi
	movl	$1, %esi
	callq	*%rax
LBB0_3:
	movq	%rbx, %rdi
	callq	_helene_x_pon
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	movq	%rbx, %rdi
	callq	_kfree
LBB0_5:
	xorl	%r14d, %r14d
	jmp	LBB0_9
LBB0_6:
	movq	16(%r14), %rax
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	*%rax
LBB0_8:
	leaq	8(%r14), %rdi
	movq	_helene_tuner_ops_t@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
LBB0_9:
	movq	%r14, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_helene_tuner_ops_t,4,2         ## @helene_tuner_ops_t
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Sony HELENE Ter 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
	.globl	_helene_attach                  ; -- Begin function helene_attach
	.p2align	2
_helene_attach:                         ; @helene_attach
	.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	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_5
; %bb.1:
	mov	x20, x0
	ldr	w8, [x21]
	asr	w8, w8, #1
	str	w8, [x0]
	str	x22, [x0, #8]
	ldr	w8, [x21, #12]
	str	w8, [x0, #24]
	ldur	d0, [x21, #4]
	str	d0, [x0, #16]
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_3
; %bb.2:
	mov	x0, x19
	mov	w1, #1
	blr	x8
LBB0_3:
	mov	x0, x20
	bl	_helene_x_pon
	cbz	x0, LBB0_6
; %bb.4:
	mov	x0, x20
	bl	_kfree
LBB0_5:
	mov	x19, #0
	b	LBB0_9
LBB0_6:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_8
; %bb.7:
	mov	x0, x19
	mov	w1, #0
	blr	x8
LBB0_8:
	add	x0, x19, #8
Lloh3:
	adrp	x1, _helene_tuner_ops_t@GOTPAGE
Lloh4:
	ldr	x1, [x1, _helene_tuner_ops_t@GOTPAGEOFF]
	mov	w2, #4
	bl	_memcpy
	str	x20, [x19]
	ldr	x0, [x20, #8]
	ldr	w2, [x20]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x3, x0
	bl	_dev_info
LBB0_9:
	mov	x0, x19
	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	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_helene_tuner_ops_t,4,2         ; @helene_tuner_ops_t
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Sony HELENE Ter attached on addr=%x at I2C adapter %p\n"

.subsections_via_symbols
