	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ak881x_probe
_ak881x_probe:                          ## @ak881x_probe
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	movq	8(%rdi), %rbx
	movq	_I2C_FUNC_SMBUS_BYTE_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_i2c_check_functionality
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	movl	$32, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.5:
	movq	%rax, %r14
	leaq	24(%rax), %rdi
	movq	_ak881x_subdev_ops@GOTPCREL(%rip), %rdx
	movq	%r13, %rsi
	callq	_v4l2_i2c_subdev_init
	movq	_AK881X_DEVICE_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_reg_read
	movq	%rax, %r15
	addl	$-19, %eax
	cmpl	$2, %eax
	jae	LBB0_6
## %bb.7:
	movq	_AK881X_DEVICE_REVISION@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_reg_read
	movq	%rax, 8(%r14)
	movq	(%r13), %rcx
	movq	%rcx, 16(%r14)
	testq	%rcx, %rcx
	je	LBB0_13
## %bb.8:
	movl	(%rcx), %eax
	movq	_AK881X_FIELD@GOTPCREL(%rip), %rcx
	xorl	%r12d, %r12d
	testl	%eax, (%rcx)
	setne	%r12b
	shll	$2, %r12d
	movq	_AK881X_IF_MODE_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	cmpl	$129, %eax
	je	LBB0_11
## %bb.9:
	cmpl	$130, %eax
	jne	LBB0_12
## %bb.10:
	orl	$1, %r12d
	jmp	LBB0_12
LBB0_1:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_dev_warn
	movq	_EIO@GOTPCREL(%rip), %rcx
	jmp	LBB0_4
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	jmp	LBB0_4
LBB0_6:
	leaq	L_.str.1(%rip), %rsi
	movq	%r13, %rdi
	movl	%r15d, %edx
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rcx
LBB0_4:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	orl	$2, %r12d
LBB0_12:
	leaq	L_.str.2(%rip), %rsi
	movq	%r13, %rdi
	movl	%r12d, %edx
	callq	_dev_dbg
	movq	_AK881X_INTERFACE_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	orl	$160, %r12d
	movq	%r13, %rdi
	movl	%r12d, %edx
	callq	_reg_write
	movq	8(%r14), %rax
LBB0_13:
	movl	$480, (%r14)                    ## imm = 0x1E0
	leaq	L_.str.3(%rip), %rsi
	movq	%r13, %rdi
	movl	%r15d, %edx
	movq	%rax, %rcx
	callq	_dev_info
	xorl	%eax, %eax
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_FUNC_SMBUS_BYTE_DATA,4,2   ## @I2C_FUNC_SMBUS_BYTE_DATA
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"I2C-Adapter doesn't support I2C_FUNC_SMBUS_WORD\n"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_ak881x_subdev_ops,4,2          ## @ak881x_subdev_ops
	.comm	_AK881X_DEVICE_ID,4,2           ## @AK881X_DEVICE_ID
L_.str.1:                               ## @.str.1
	.asciz	"No ak881x chip detected, register read %x\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_AK881X_DEVICE_REVISION,4,2     ## @AK881X_DEVICE_REVISION
	.comm	_AK881X_FIELD,4,2               ## @AK881X_FIELD
	.comm	_AK881X_IF_MODE_MASK,4,2        ## @AK881X_IF_MODE_MASK
L_.str.2:                               ## @.str.2
	.asciz	"IF mode %x\n"

	.comm	_AK881X_INTERFACE_MODE,4,2      ## @AK881X_INTERFACE_MODE
L_.str.3:                               ## @.str.3
	.asciz	"Detected an ak881x chip ID %x, revision %x\n"

	.no_dead_strip	_ak881x_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ak881x_probe
_ak881x_probe:                          ; @ak881x_probe
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x0
	ldr	x20, [x0, #8]
Lloh0:
	adrp	x8, _I2C_FUNC_SMBUS_BYTE_DATA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _I2C_FUNC_SMBUS_BYTE_DATA@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_i2c_check_functionality
	cbz	w0, LBB0_5
; %bb.1:
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #32
	bl	_devm_kzalloc
	cbz	x0, LBB0_6
; %bb.2:
	mov	x20, x0
	add	x0, x0, #24
Lloh6:
	adrp	x2, _ak881x_subdev_ops@GOTPAGE
Lloh7:
	ldr	x2, [x2, _ak881x_subdev_ops@GOTPAGEOFF]
	mov	x1, x19
	bl	_v4l2_i2c_subdev_init
Lloh8:
	adrp	x8, _AK881X_DEVICE_ID@GOTPAGE
Lloh9:
	ldr	x8, [x8, _AK881X_DEVICE_ID@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_reg_read
	mov	x21, x0
	sub	w8, w21, #19
	cmp	w8, #2
	b.hs	LBB0_7
; %bb.3:
Lloh11:
	adrp	x8, _AK881X_DEVICE_REVISION@GOTPAGE
Lloh12:
	ldr	x8, [x8, _AK881X_DEVICE_REVISION@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_reg_read
	ldr	x8, [x19]
	stp	x0, x8, [x20, #8]
	cbz	x8, LBB0_10
; %bb.4:
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _AK881X_FIELD@GOTPAGE
Lloh15:
	ldr	x9, [x9, _AK881X_FIELD@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w9, ne
	lsl	w9, w9, #2
Lloh17:
	adrp	x10, _AK881X_IF_MODE_MASK@GOTPAGE
Lloh18:
	ldr	x10, [x10, _AK881X_IF_MODE_MASK@GOTPAGEOFF]
Lloh19:
	ldr	w10, [x10]
	and	w8, w10, w8
	orr	w10, w9, #0x2
	orr	w11, w9, #0x1
	cmp	w8, #130
	csel	w9, w9, w11, ne
	cmp	w8, #129
	csel	w22, w10, w9, eq
Lloh20:
	adrp	x1, l_.str.2@PAGE
Lloh21:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	mov	x2, x22
	bl	_dev_dbg
Lloh22:
	adrp	x8, _AK881X_INTERFACE_MODE@GOTPAGE
Lloh23:
	ldr	x8, [x8, _AK881X_INTERFACE_MODE@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	mov	w8, #160
	orr	w2, w22, w8
	mov	x0, x19
	bl	_reg_write
	ldr	x3, [x20, #8]
	b	LBB0_11
LBB0_5:
Lloh25:
	adrp	x1, l_.str@PAGE
Lloh26:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_warn
Lloh27:
	adrp	x8, _EIO@GOTPAGE
Lloh28:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_8
LBB0_6:
Lloh29:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh30:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh31:
	adrp	x1, l_.str.1@PAGE
Lloh32:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	bl	_dev_err
Lloh33:
	adrp	x8, _ENODEV@GOTPAGE
Lloh34:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_10:
	mov	x3, x0
LBB0_11:
	mov	w8, #480
	str	w8, [x20]
Lloh35:
	adrp	x1, l_.str.3@PAGE
Lloh36:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	bl	_dev_info
	mov	w0, #0
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_FUNC_SMBUS_BYTE_DATA,4,2   ; @I2C_FUNC_SMBUS_BYTE_DATA
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"I2C-Adapter doesn't support I2C_FUNC_SMBUS_WORD\n"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_ak881x_subdev_ops,4,2          ; @ak881x_subdev_ops
	.comm	_AK881X_DEVICE_ID,4,2           ; @AK881X_DEVICE_ID
l_.str.1:                               ; @.str.1
	.asciz	"No ak881x chip detected, register read %x\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_AK881X_DEVICE_REVISION,4,2     ; @AK881X_DEVICE_REVISION
	.comm	_AK881X_FIELD,4,2               ; @AK881X_FIELD
	.comm	_AK881X_IF_MODE_MASK,4,2        ; @AK881X_IF_MODE_MASK
l_.str.2:                               ; @.str.2
	.asciz	"IF mode %x\n"

	.comm	_AK881X_INTERFACE_MODE,4,2      ; @AK881X_INTERFACE_MODE
l_.str.3:                               ; @.str.3
	.asciz	"Detected an ak881x chip ID %x, revision %x\n"

	.no_dead_strip	_ak881x_probe
.subsections_via_symbols
