	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_microtune_attach               ## -- Begin function microtune_attach
	.p2align	4, 0x90
_microtune_attach:                      ## @microtune_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
	movl	%edx, %r12d
	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
	movq	%rax, 8(%r14)
	movl	%r12d, 16(%rax)
	movq	%r15, 8(%rax)
	leaq	L_.str(%rip), %rax
	movq	%rax, (%rbx)
	leaq	-64(%rbp), %r15
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$21, %edx
	callq	_memset
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movl	$1, %edx
	callq	_tuner_i2c_xfer_send
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movl	$21, %edx
	callq	_tuner_i2c_xfer_recv
	movq	_debug@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_4
## %bb.3:
	leaq	L_.str.2(%rip), %rdi
	leaq	-64(%rbp), %rdx
	movl	$21, %esi
	callq	_tuner_dbg
LBB0_4:
	movzwl	-47(%rbp), %eax
	rolw	$8, %ax
	movzwl	%ax, %esi
	movzbl	-45(%rbp), %edx
	movzbl	-44(%rbp), %ecx
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_tuner_info
	movb	-45(%rbp), %bl
	movq	_microtune_part@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	callq	_ARRAY_SIZE
	cmpb	%al, %bl
	jae	LBB0_5
## %bb.6:
	movq	(%r15), %rcx
	movzbl	-45(%rbp), %eax
	movq	(%rcx,%rax,8), %rcx
	testq	%rcx, %rcx
	leaq	L_.str.1(%rip), %rbx
	cmovneq	%rcx, %rbx
	cmpb	$-128, %al
	je	LBB0_11
LBB0_8:
	cmpb	$-127, %al
	jne	LBB0_9
## %bb.10:
	movq	%r14, %rdi
	callq	_mt2032_init
	jmp	LBB0_12
LBB0_1:
	xorl	%r14d, %r14d
	jmp	LBB0_14
LBB0_5:
	leaq	L_.str.1(%rip), %rbx
	movb	-45(%rbp), %al
	cmpb	$-128, %al
	jne	LBB0_8
LBB0_11:
	movq	%r14, %rdi
	callq	_mt2050_init
LBB0_12:
	movl	(%r14), %edi
	movq	%rbx, %rsi
	movl	$4, %edx
	callq	_strscpy
	leaq	L_.str.5(%rip), %rdi
	jmp	LBB0_13
LBB0_9:
	leaq	L_.str.4(%rip), %rdi
	xorl	%r14d, %r14d
LBB0_13:
	movq	%rbx, %rsi
	xorl	%eax, %eax
	callq	_tuner_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	"mt20xx"

L_.str.1:                               ## @.str.1
	.asciz	"unknown"

	.comm	_debug,8,3                      ## @debug
L_.str.2:                               ## @.str.2
	.asciz	"MT20xx hexdump: %*ph\n"

L_.str.3:                               ## @.str.3
	.asciz	"microtune: companycode=%04x part=%02x rev=%02x\n"

	.comm	_microtune_part,8,3             ## @microtune_part
L_.str.4:                               ## @.str.4
	.asciz	"microtune %s found, not (yet?) supported, sorry :-/\n"

L_.str.5:                               ## @.str.5
	.asciz	"microtune %s found, OK\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_microtune_attach               ; -- Begin function microtune_attach
	.p2align	2
_microtune_attach:                      ; @microtune_attach
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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]
	stur	x8, [x29, #-40]
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
	str	x0, [x19, #8]
	str	w22, [x0, #16]
Lloh6:
	adrp	x8, l_.str@PAGE
Lloh7:
	add	x8, x8, l_.str@PAGEOFF
	stp	x8, x21, [x0]
	add	x0, sp, #35
	mov	w1, #0
	mov	w2, #21
	bl	_memset
	add	x1, sp, #35
	mov	x0, x20
	mov	w2, #1
	bl	_tuner_i2c_xfer_send
	add	x1, sp, #35
	mov	x0, x20
	mov	w2, #21
	bl	_tuner_i2c_xfer_recv
Lloh8:
	adrp	x8, _debug@GOTPAGE
Lloh9:
	ldr	x8, [x8, _debug@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	cbz	x8, LBB0_3
; %bb.2:
Lloh11:
	adrp	x0, l_.str.2@PAGE
Lloh12:
	add	x0, x0, l_.str.2@PAGEOFF
	add	x2, sp, #35
	mov	w1, #21
	bl	_tuner_dbg
LBB0_3:
	ldurh	w8, [sp, #52]
	rev16	w8, w8
	ldrb	w9, [sp, #54]
	ldrb	w10, [sp, #55]
	stp	x9, x10, [sp, #8]
	str	x8, [sp]
Lloh13:
	adrp	x0, l_.str.3@PAGE
Lloh14:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_tuner_info
	ldrb	w21, [sp, #54]
Lloh15:
	adrp	x20, _microtune_part@GOTPAGE
Lloh16:
	ldr	x20, [x20, _microtune_part@GOTPAGEOFF]
	ldr	x0, [x20]
	bl	_ARRAY_SIZE
	cmp	w21, w0
	b.hs	LBB0_8
; %bb.4:
	ldr	x9, [x20]
	ldrb	w8, [sp, #54]
	ldr	x9, [x9, x8, lsl #3]
Lloh17:
	adrp	x10, l_.str.1@PAGE
Lloh18:
	add	x10, x10, l_.str.1@PAGEOFF
	cmp	x9, #0
	csel	x20, x10, x9, eq
	cmp	w8, #128
	b.eq	LBB0_9
LBB0_5:
	cmp	w8, #129
	b.ne	LBB0_11
; %bb.6:
	mov	x0, x19
	bl	_mt2032_init
	b	LBB0_10
LBB0_7:
	mov	x19, #0
	b	LBB0_13
LBB0_8:
Lloh19:
	adrp	x20, l_.str.1@PAGE
Lloh20:
	add	x20, x20, l_.str.1@PAGEOFF
	ldrb	w8, [sp, #54]
	cmp	w8, #128
	b.ne	LBB0_5
LBB0_9:
	mov	x0, x19
	bl	_mt2050_init
LBB0_10:
	ldr	w0, [x19]
	mov	x1, x20
	mov	w2, #4
	bl	_strscpy
Lloh21:
	adrp	x0, l_.str.5@PAGE
Lloh22:
	add	x0, x0, l_.str.5@PAGEOFF
	b	LBB0_12
LBB0_11:
	mov	x19, #0
Lloh23:
	adrp	x0, l_.str.4@PAGE
Lloh24:
	add	x0, x0, l_.str.4@PAGEOFF
LBB0_12:
	str	x20, [sp]
	bl	_tuner_info
LBB0_13:
	ldur	x8, [x29, #-40]
Lloh25:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh26:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh27:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_15
; %bb.14:
	mov	x0, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_15:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mt20xx"

l_.str.1:                               ; @.str.1
	.asciz	"unknown"

	.comm	_debug,8,3                      ; @debug
l_.str.2:                               ; @.str.2
	.asciz	"MT20xx hexdump: %*ph\n"

l_.str.3:                               ; @.str.3
	.asciz	"microtune: companycode=%04x part=%02x rev=%02x\n"

	.comm	_microtune_part,8,3             ; @microtune_part
l_.str.4:                               ; @.str.4
	.asciz	"microtune %s found, not (yet?) supported, sorry :-/\n"

l_.str.5:                               ; @.str.5
	.asciz	"microtune %s found, OK\n"

.subsections_via_symbols
