	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ad8366_probe
_ad8366_probe:                          ## @ad8366_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movl	$40, %esi
	callq	_devm_iio_device_alloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_iio_priv
	movq	%rax, %r14
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_devm_regulator_get
	movl	%eax, 4(%r14)
	movl	%eax, %edi
	callq	_IS_ERR
	testl	%eax, %eax
	je	LBB0_3
LBB0_4:
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_spi_set_drvdata
	movq	%r14, %rdi
	addq	$32, %rdi
	callq	_mutex_init
	movq	%r15, 24(%r14)
	movq	%r15, %rdi
	callq	_spi_get_device_id
	movl	(%rax), %eax
	movl	%eax, (%r14)
	leal	-128(%rax), %ecx
	cmpl	$2, %ecx
	jae	LBB0_5
## %bb.8:
	movq	_GPIOD_OUT_HIGH@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	callq	_devm_gpiod_get
	movl	%eax, 16(%r14)
	movq	_ada4961_channels@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_15
LBB0_5:
	cmpl	$130, %eax
	jne	LBB0_7
## %bb.6:
	movq	_ad8366_channels@GOTPCREL(%rip), %rax
LBB0_9:
	movq	(%rax), %rdi
	movq	%rdi, 40(%r12)
	callq	_ARRAY_SIZE
	movq	%rax, 32(%r12)
	movq	_ad8366_infos@GOTPCREL(%rip), %rax
	movslq	(%r14), %rcx
	shlq	$2, %rcx
	addq	(%rax), %rcx
	movq	%rcx, 8(%r14)
	movq	%r15, 24(%r12)
	movq	%r15, %rdi
	callq	_spi_get_device_id
	movl	4(%rax), %eax
	movl	%eax, 16(%r12)
	movq	_ad8366_info@GOTPCREL(%rip), %rax
	movq	%rax, 8(%r12)
	movq	_INDIO_DIRECT_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r12)
	xorl	%ebx, %ebx
	movq	%r12, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_ad8366_write
	testl	%eax, %eax
	js	LBB0_10
## %bb.11:
	movq	%r12, %rdi
	callq	_iio_device_register
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_12
	jmp	LBB0_15
LBB0_3:
	movl	4(%r14), %edi
	callq	_regulator_enable
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_15
	jmp	LBB0_4
LBB0_10:
	movl	%eax, %r15d
	jmp	LBB0_12
LBB0_7:
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_12:
	movl	4(%r14), %edi
	callq	_IS_ERR
	testl	%eax, %eax
	jne	LBB0_14
## %bb.13:
	movl	4(%r14), %edi
	callq	_regulator_disable
LBB0_14:
	movl	%r15d, %ebx
LBB0_15:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"vcc"

	.comm	_ad8366_channels,8,3            ## @ad8366_channels
L_.str.1:                               ## @.str.1
	.asciz	"reset"

	.comm	_GPIOD_OUT_HIGH,4,2             ## @GPIOD_OUT_HIGH
	.comm	_ada4961_channels,8,3           ## @ada4961_channels
L_.str.2:                               ## @.str.2
	.asciz	"Invalid device ID\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ad8366_infos,8,3               ## @ad8366_infos
	.comm	_ad8366_info,4,2                ## @ad8366_info
	.comm	_INDIO_DIRECT_MODE,4,2          ## @INDIO_DIRECT_MODE
	.no_dead_strip	_ad8366_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ad8366_probe
_ad8366_probe:                          ; @ad8366_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	x21, x0
	mov	w1, #40
	bl	_devm_iio_device_alloc
	cbz	x0, LBB0_4
; %bb.1:
	mov	x20, x0
	bl	_iio_priv
	mov	x19, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_devm_regulator_get
	str	w0, [x19, #4]
	bl	_IS_ERR
	cbz	w0, LBB0_9
LBB0_2:
	mov	x0, x21
	mov	x1, x20
	bl	_spi_set_drvdata
	add	x0, x19, #32
	bl	_mutex_init
	str	x21, [x19, #24]
	mov	x0, x21
	bl	_spi_get_device_id
	ldr	w8, [x0]
	str	w8, [x19]
	sub	w9, w8, #128
	cmp	w9, #2
	b.hs	LBB0_5
; %bb.3:
Lloh2:
	adrp	x8, _GPIOD_OUT_HIGH@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GPIOD_OUT_HIGH@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_devm_gpiod_get
	str	w0, [x19, #16]
Lloh7:
	adrp	x8, _ada4961_channels@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ada4961_channels@GOTPAGEOFF]
	b	LBB0_7
LBB0_4:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_14
LBB0_5:
	cmp	w8, #130
	b.ne	LBB0_11
; %bb.6:
Lloh12:
	adrp	x8, _ad8366_channels@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ad8366_channels@GOTPAGEOFF]
LBB0_7:
	ldr	x0, [x8]
	str	x0, [x20, #40]
	bl	_ARRAY_SIZE
Lloh14:
	adrp	x8, _ad8366_infos@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ad8366_infos@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	ldrsw	x9, [x19]
	add	x8, x8, x9, lsl #2
	str	x8, [x19, #8]
	stp	x21, x0, [x20, #24]
	mov	x0, x21
	bl	_spi_get_device_id
	ldr	w8, [x0, #4]
Lloh17:
	adrp	x9, _ad8366_info@GOTPAGE
Lloh18:
	ldr	x9, [x9, _ad8366_info@GOTPAGEOFF]
	str	w8, [x20, #16]
	str	x9, [x20, #8]
Lloh19:
	adrp	x8, _INDIO_DIRECT_MODE@GOTPAGE
Lloh20:
	ldr	x8, [x8, _INDIO_DIRECT_MODE@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	str	w8, [x20]
	mov	x0, x20
	mov	w1, #0
	mov	w2, #0
	bl	_ad8366_write
	tbnz	w0, #31, LBB0_10
; %bb.8:
	mov	x0, x20
	bl	_iio_device_register
	mov	x22, x0
	cbnz	w0, LBB0_12
	b	LBB0_14
LBB0_9:
	ldr	w0, [x19, #4]
	bl	_regulator_enable
	mov	x22, x0
	cbnz	w0, LBB0_14
	b	LBB0_2
LBB0_10:
	mov	x22, x0
	b	LBB0_12
LBB0_11:
Lloh22:
	adrp	x1, l_.str.2@PAGE
Lloh23:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x21
	bl	_dev_err
Lloh24:
	adrp	x8, _EINVAL@GOTPAGE
Lloh25:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_12:
	ldr	w0, [x19, #4]
	bl	_IS_ERR
	cbnz	w0, LBB0_14
; %bb.13:
	ldr	w0, [x19, #4]
	bl	_regulator_disable
LBB0_14:
	mov	x0, x22
	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
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"vcc"

	.comm	_ad8366_channels,8,3            ; @ad8366_channels
l_.str.1:                               ; @.str.1
	.asciz	"reset"

	.comm	_GPIOD_OUT_HIGH,4,2             ; @GPIOD_OUT_HIGH
	.comm	_ada4961_channels,8,3           ; @ada4961_channels
l_.str.2:                               ; @.str.2
	.asciz	"Invalid device ID\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ad8366_infos,8,3               ; @ad8366_infos
	.comm	_ad8366_info,4,2                ; @ad8366_info
	.comm	_INDIO_DIRECT_MODE,4,2          ; @INDIO_DIRECT_MODE
	.no_dead_strip	_ad8366_probe
.subsections_via_symbols
