	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function adv748x_identify_chip
_adv748x_identify_chip:                 ## @adv748x_identify_chip
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	_ADV748X_IO_CHIP_REV_ID_1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_io_read
	movl	%eax, %r14d
	movq	_ADV748X_IO_CHIP_REV_ID_2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_io_read
	testl	%r14d, %r14d
	js	LBB0_2
## %bb.1:
	testl	%eax, %eax
	js	LBB0_2
## %bb.3:
	movq	(%rbx), %rcx
	movl	(%rcx), %edx
	addl	%edx, %edx
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	movl	%r14d, %ecx
	movl	%eax, %r8d
	callq	_adv_info
	xorl	%eax, %eax
	jmp	LBB0_4
LBB0_2:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_adv_err
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_4:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ADV748X_IO_CHIP_REV_ID_1,4,2   ## @ADV748X_IO_CHIP_REV_ID_1
	.comm	_ADV748X_IO_CHIP_REV_ID_2,4,2   ## @ADV748X_IO_CHIP_REV_ID_2
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to read chip revision\n"

	.comm	_EIO,4,2                        ## @EIO
L_.str.1:                               ## @.str.1
	.asciz	"chip found @ 0x%02x revision %02x%02x\n"

	.no_dead_strip	_adv748x_identify_chip
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function adv748x_identify_chip
_adv748x_identify_chip:                 ; @adv748x_identify_chip
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x8, _ADV748X_IO_CHIP_REV_ID_1@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ADV748X_IO_CHIP_REV_ID_1@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_io_read
	mov	x20, x0
Lloh3:
	adrp	x8, _ADV748X_IO_CHIP_REV_ID_2@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ADV748X_IO_CHIP_REV_ID_2@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_io_read
	tbnz	w20, #31, LBB0_3
; %bb.1:
	mov	x4, x0
	tbnz	w0, #31, LBB0_3
; %bb.2:
	ldr	x8, [x19]
	ldr	w8, [x8]
	lsl	w2, w8, #1
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x3, x20
	bl	_adv_info
	mov	w0, #0
	b	LBB0_4
LBB0_3:
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_adv_err
Lloh10:
	adrp	x8, _EIO@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_4:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_ADV748X_IO_CHIP_REV_ID_1,4,2   ; @ADV748X_IO_CHIP_REV_ID_1
	.comm	_ADV748X_IO_CHIP_REV_ID_2,4,2   ; @ADV748X_IO_CHIP_REV_ID_2
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to read chip revision\n"

	.comm	_EIO,4,2                        ; @EIO
l_.str.1:                               ; @.str.1
	.asciz	"chip found @ 0x%02x revision %02x%02x\n"

	.no_dead_strip	_adv748x_identify_chip
.subsections_via_symbols
