	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tda18271_get_id
_tda18271_get_id:                       ## @tda18271_get_id
	.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	%rdi, %rbx
	movq	(%rdi), %r15
	movq	(%r15), %r12
	leaq	20(%r15), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	%rbx, %rdi
	callq	_tda18271_read_regs
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_mutex_unlock
	testl	%ebx, %ebx
	je	LBB0_2
## %bb.1:
	movl	12(%r15), %edi
	callq	_i2c_adapter_id
	movl	8(%r15), %edx
	leaq	L_.str(%rip), %rdi
	xorl	%ebx, %ebx
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_tda_info
	movq	_EIO@GOTPCREL(%rip), %rax
LBB0_8:
	subl	(%rax), %ebx
	jmp	LBB0_9
LBB0_2:
	movq	_R_ID@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movzbl	(%r12,%rax), %r14d
	movl	%r14d, %eax
	andl	$127, %eax
	cmpl	$3, %eax
	je	LBB0_5
## %bb.3:
	cmpl	$4, %eax
	jne	LBB0_7
## %bb.4:
	leaq	L_.str.2(%rip), %r14
	movq	_TDA18271HDC2@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_5:
	leaq	L_.str.1(%rip), %r14
	movq	_TDA18271HDC1@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %eax
	movl	%eax, 16(%r15)
	movl	12(%r15), %edi
	callq	_i2c_adapter_id
	movl	8(%r15), %ecx
	leaq	L_.str.4(%rip), %rdi
	xorl	%ebx, %ebx
	movq	%r14, %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_tda_info
LBB0_9:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movl	12(%r15), %edi
	callq	_i2c_adapter_id
	movl	8(%r15), %ecx
	leaq	L_.str.3(%rip), %rdi
	xorl	%ebx, %ebx
	movl	%r14d, %esi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_tda_info
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error reading device ID @ %d-%04x, bailing out.\n"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_R_ID,8,3                       ## @R_ID
L_.str.1:                               ## @.str.1
	.asciz	"TDA18271HD/C1"

	.comm	_TDA18271HDC1,4,2               ## @TDA18271HDC1
L_.str.2:                               ## @.str.2
	.asciz	"TDA18271HD/C2"

	.comm	_TDA18271HDC2,4,2               ## @TDA18271HDC2
L_.str.3:                               ## @.str.3
	.asciz	"Unknown device (%i) detected @ %d-%04x, device not supported.\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.4:                               ## @.str.4
	.asciz	"%s detected @ %d-%04x\n"

	.no_dead_strip	_tda18271_get_id
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tda18271_get_id
_tda18271_get_id:                       ; @tda18271_get_id
	.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	x19, x0
	ldr	x21, [x0]
	mov	x20, x21
	ldr	x22, [x20], #20
	mov	x0, x20
	bl	_mutex_lock
	mov	x0, x19
	bl	_tda18271_read_regs
	mov	x19, x0
	mov	x0, x20
	bl	_mutex_unlock
	cbz	w19, LBB0_3
; %bb.1:
	ldr	w0, [x21, #12]
	bl	_i2c_adapter_id
                                        ; kill: def $w0 killed $w0 def $x0
	ldr	w8, [x21, #8]
	stp	x0, x8, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_tda_info
Lloh2:
	adrp	x8, _EIO@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_8
LBB0_3:
Lloh4:
	adrp	x8, _R_ID@GOTPAGE
Lloh5:
	ldr	x8, [x8, _R_ID@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	ldrb	w19, [x22, x8]
	and	w8, w19, #0x7f
	cmp	w8, #3
	b.eq	LBB0_6
; %bb.4:
	cmp	w8, #4
	b.ne	LBB0_9
; %bb.5:
Lloh7:
	adrp	x19, l_.str.2@PAGE
Lloh8:
	add	x19, x19, l_.str.2@PAGEOFF
Lloh9:
	adrp	x8, _TDA18271HDC2@GOTPAGE
Lloh10:
	ldr	x8, [x8, _TDA18271HDC2@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh11:
	adrp	x19, l_.str.1@PAGE
Lloh12:
	add	x19, x19, l_.str.1@PAGEOFF
Lloh13:
	adrp	x8, _TDA18271HDC1@GOTPAGE
Lloh14:
	ldr	x8, [x8, _TDA18271HDC1@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	str	w8, [x21, #16]
	ldr	w0, [x21, #12]
	bl	_i2c_adapter_id
                                        ; kill: def $w0 killed $w0 def $x0
	ldr	w8, [x21, #8]
	stp	x0, x8, [sp, #8]
	str	x19, [sp]
Lloh15:
	adrp	x0, l_.str.4@PAGE
Lloh16:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_tda_info
	mov	w0, #0
LBB0_8:
	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_9:
	ldr	w0, [x21, #12]
	bl	_i2c_adapter_id
                                        ; kill: def $w0 killed $w0 def $x0
	ldr	w8, [x21, #8]
	stp	x0, x8, [sp, #8]
	str	x19, [sp]
Lloh17:
	adrp	x0, l_.str.3@PAGE
Lloh18:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_tda_info
Lloh19:
	adrp	x8, _EINVAL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_2
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error reading device ID @ %d-%04x, bailing out.\n"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_R_ID,8,3                       ; @R_ID
l_.str.1:                               ; @.str.1
	.asciz	"TDA18271HD/C1"

	.comm	_TDA18271HDC1,4,2               ; @TDA18271HDC1
l_.str.2:                               ; @.str.2
	.asciz	"TDA18271HD/C2"

	.comm	_TDA18271HDC2,4,2               ; @TDA18271HDC2
l_.str.3:                               ; @.str.3
	.asciz	"Unknown device (%i) detected @ %d-%04x, device not supported.\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.4:                               ; @.str.4
	.asciz	"%s detected @ %d-%04x\n"

	.no_dead_strip	_tda18271_get_id
.subsections_via_symbols
