	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function as3722_check_device_id
_as3722_check_device_id:                ## @as3722_check_device_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	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	_AS3722_ASIC_ID1_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-20(%rbp), %rdx
	callq	_as3722_read
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	-20(%rbp), %edx
	movq	_AS3722_DEVICE_ID@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	jne	LBB0_3
## %bb.4:
	movq	_AS3722_ASIC_ID2_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-20(%rbp), %rdx
	movq	%r14, %rdi
	callq	_as3722_read
	movl	(%r14), %edi
	testl	%eax, %eax
	js	LBB0_5
## %bb.7:
	movl	-20(%rbp), %edx
	leaq	L_.str.3(%rip), %rsi
	callq	_dev_info
	xorl	%ebx, %ebx
	jmp	LBB0_8
LBB0_1:
	movl	%eax, %ebx
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_6
LBB0_3:
	movl	(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_8
LBB0_5:
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rsi
LBB0_6:
	movl	%ebx, %edx
	callq	_dev_err
LBB0_8:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AS3722_ASIC_ID1_REG,4,2        ## @AS3722_ASIC_ID1_REG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ASIC_ID1 read failed: %d\n"

	.comm	_AS3722_DEVICE_ID,4,2           ## @AS3722_DEVICE_ID
L_.str.1:                               ## @.str.1
	.asciz	"Device is not AS3722, ID is 0x%x\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_AS3722_ASIC_ID2_REG,4,2        ## @AS3722_ASIC_ID2_REG
L_.str.2:                               ## @.str.2
	.asciz	"ASIC_ID2 read failed: %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"AS3722 with revision 0x%x found\n"

	.no_dead_strip	_as3722_check_device_id
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function as3722_check_device_id
_as3722_check_device_id:                ; @as3722_check_device_id
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x20, x0
Lloh0:
	adrp	x8, _AS3722_ASIC_ID1_REG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AS3722_ASIC_ID1_REG@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_as3722_read
	tbnz	w0, #31, LBB0_4
; %bb.1:
	ldr	w2, [sp, #12]
Lloh3:
	adrp	x8, _AS3722_DEVICE_ID@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AS3722_DEVICE_ID@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w2, w8
	b.ne	LBB0_5
; %bb.2:
Lloh6:
	adrp	x8, _AS3722_ASIC_ID2_REG@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AS3722_ASIC_ID2_REG@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x20
	bl	_as3722_read
	mov	x19, x0
	ldr	w0, [x20]
	tbnz	w19, #31, LBB0_6
; %bb.3:
	ldr	w2, [sp, #12]
Lloh9:
	adrp	x1, l_.str.3@PAGE
Lloh10:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_info
	mov	w19, #0
	b	LBB0_8
LBB0_4:
	mov	x19, x0
	ldr	w0, [x20]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_7
LBB0_5:
	ldr	w0, [x20]
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
Lloh15:
	adrp	x8, _ENODEV@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w19, w8
	b	LBB0_8
LBB0_6:
Lloh18:
	adrp	x1, l_.str.2@PAGE
Lloh19:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_7:
	mov	x2, x19
	bl	_dev_err
LBB0_8:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_AS3722_ASIC_ID1_REG,4,2        ; @AS3722_ASIC_ID1_REG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ASIC_ID1 read failed: %d\n"

	.comm	_AS3722_DEVICE_ID,4,2           ; @AS3722_DEVICE_ID
l_.str.1:                               ; @.str.1
	.asciz	"Device is not AS3722, ID is 0x%x\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_AS3722_ASIC_ID2_REG,4,2        ; @AS3722_ASIC_ID2_REG
l_.str.2:                               ; @.str.2
	.asciz	"ASIC_ID2 read failed: %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"AS3722 with revision 0x%x found\n"

	.no_dead_strip	_as3722_check_device_id
.subsections_via_symbols
