	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_horus3a_attach                 ## -- Begin function horus3a_attach
	.p2align	4, 0x90
_horus3a_attach:                        ## @horus3a_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	$32, %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	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$24, %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	12(%r15), %eax
	movl	%eax, 20(%rbx)
	movl	8(%r15), %eax
	movl	%eax, 16(%rbx)
	movq	16(%r14), %rax
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	%r14, %rdi
	movl	$1, %esi
	callq	*%rax
LBB0_4:
	movl	$4000, %edi                     ## imm = 0xFA0
	movl	$6000, %esi                     ## imm = 0x1770
	callq	_usleep_range
	movq	%rbx, %rdi
	movl	$42, %esi
	movl	$121, %edx
	callq	_horus3a_write_reg
	movl	4(%r15), %eax
	movl	%eax, -52(%rbp)
	movl	%eax, -48(%rbp)
	movl	$0, -44(%rbp)
	leaq	-52(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$6, %esi
	movl	$3, %ecx
	callq	_horus3a_write_regs
	movq	%rbx, %rdi
	movl	$10, %esi
	movl	$64, %edx
	callq	_horus3a_write_reg
	movl	4(%r15), %edx
	cmpl	$16, %edx
	je	LBB0_9
## %bb.5:
	cmpl	$27, %edx
	je	LBB0_6
## %bb.7:
	cmpl	$24, %edx
	jne	LBB0_10
## %bb.8:
	movl	$64, %edx
	jmp	LBB0_11
LBB0_1:
	xorl	%r14d, %r14d
	jmp	LBB0_14
LBB0_9:
	movl	$48, %edx
	jmp	LBB0_11
LBB0_6:
	movl	$124, %edx
	jmp	LBB0_11
LBB0_10:
	movq	8(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_warn
	xorl	%edx, %edx
LBB0_11:
	movq	%rbx, %rdi
	movl	$14, %esi
	callq	_horus3a_write_reg
	movq	%rbx, %rdi
	callq	_horus3a_enter_power_save
	movl	$3000, %edi                     ## imm = 0xBB8
	movl	$5000, %esi                     ## imm = 0x1388
	callq	_usleep_range
	movq	16(%r14), %rax
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	*%rax
LBB0_13:
	leaq	8(%r14), %rdi
	movq	_horus3a_tuner_ops@GOTPCREL(%rip), %rsi
	movl	$4, %edx
	callq	_memcpy
	movq	%rbx, (%r14)
	movq	8(%rbx), %rcx
	movl	(%rbx), %edx
	leaq	L_.str.1(%rip), %rsi
	movq	%rcx, %rdi
	callq	_dev_info
LBB0_14:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_16
## %bb.15:
	movq	%r14, %rax
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"horus3a: invalid xtal frequency %dMHz\n"

	.comm	_horus3a_tuner_ops,4,2          ## @horus3a_tuner_ops
L_.str.1:                               ## @.str.1
	.asciz	"Sony HORUS3A 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	_horus3a_attach                 ; -- Begin function horus3a_attach
	.p2align	2
_horus3a_attach:                        ; @horus3a_attach
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	w0, #24
	bl	_kzalloc
	cbz	x0, LBB0_7
; %bb.1:
	mov	x20, x0
	ldr	w8, [x21]
	asr	w8, w8, #1
	str	w8, [x0]
	str	x22, [x0, #8]
	ldr	d0, [x21, #8]
	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	w0, #4000
	mov	w1, #6000
	bl	_usleep_range
	mov	x0, x20
	mov	w1, #42
	mov	w2, #121
	bl	_horus3a_write_reg
	ldr	w8, [x21, #4]
	stp	w8, w8, [sp, #12]
	str	wzr, [sp, #20]
	add	x2, sp, #12
	mov	x0, x20
	mov	w1, #6
	mov	w3, #3
	bl	_horus3a_write_regs
	mov	x0, x20
	mov	w1, #10
	mov	w2, #64
	bl	_horus3a_write_reg
	ldr	w2, [x21, #4]
	cmp	w2, #16
	b.eq	LBB0_8
; %bb.4:
	cmp	w2, #27
	b.eq	LBB0_9
; %bb.5:
	cmp	w2, #24
	b.ne	LBB0_10
; %bb.6:
	mov	w2, #64
	b	LBB0_11
LBB0_7:
	mov	x19, #0
	b	LBB0_14
LBB0_8:
	mov	w2, #48
	b	LBB0_11
LBB0_9:
	mov	w2, #124
	b	LBB0_11
LBB0_10:
	ldr	x0, [x20, #8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_warn
	mov	w2, #0
LBB0_11:
	mov	x0, x20
	mov	w1, #14
	bl	_horus3a_write_reg
	mov	x0, x20
	bl	_horus3a_enter_power_save
	mov	w0, #3000
	mov	w1, #5000
	bl	_usleep_range
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_13
; %bb.12:
	mov	x0, x19
	mov	w1, #0
	blr	x8
LBB0_13:
	add	x0, x19, #8
Lloh8:
	adrp	x1, _horus3a_tuner_ops@GOTPAGE
Lloh9:
	ldr	x1, [x1, _horus3a_tuner_ops@GOTPAGEOFF]
	mov	w2, #4
	bl	_memcpy
	str	x20, [x19]
	ldr	x0, [x20, #8]
	ldr	w2, [x20]
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x3, x0
	bl	_dev_info
LBB0_14:
	ldr	x8, [sp, #24]
Lloh12:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh13:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_16
; %bb.15:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_16:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"horus3a: invalid xtal frequency %dMHz\n"

	.comm	_horus3a_tuner_ops,4,2          ; @horus3a_tuner_ops
l_.str.1:                               ; @.str.1
	.asciz	"Sony HORUS3A attached on addr=%x at I2C adapter %p\n"

.subsections_via_symbols
