	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dpot_dac_probe
_dpot_dac_probe:                        ## @dpot_dac_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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movl	$12, %esi
	callq	_devm_iio_device_alloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %rbx
	movq	%r15, %rdi
	movq	%rax, %rsi
	callq	_platform_set_drvdata
	movq	%rbx, %rdi
	callq	_iio_priv
	movq	%rax, %r14
	movq	%r15, %rdi
	callq	_dev_name
	movl	%eax, 40(%rbx)
	movq	%r15, 32(%rbx)
	movq	_dpot_dac_info@GOTPCREL(%rip), %rax
	movq	%rax, 24(%rbx)
	movq	_INDIO_DIRECT_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	movq	_dpot_dac_iio_channel@GOTPCREL(%rip), %rax
	movq	%rax, 8(%rbx)
	movl	$1, (%rbx)
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_devm_regulator_get
	movl	%eax, 4(%r14)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_8
## %bb.4:
	movl	4(%r14), %edi
	callq	_PTR_ERR
	movq	_EPROBE_DEFER@GOTPCREL(%rip), %rcx
	addl	(%rcx), %eax
	je	LBB0_6
## %bb.5:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
LBB0_6:
	movl	4(%r14), %edi
	jmp	LBB0_7
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_22:
	movl	%r12d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	callq	_devm_iio_channel_get
	movl	%eax, 8(%r14)
	movl	%eax, %edi
	callq	_IS_ERR
	movl	8(%r14), %edi
	testq	%rax, %rax
	je	LBB0_12
## %bb.9:
	callq	_PTR_ERR
	movq	_EPROBE_DEFER@GOTPCREL(%rip), %rcx
	addl	(%rcx), %eax
	je	LBB0_11
## %bb.10:
	leaq	L_.str.3(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
LBB0_11:
	movl	8(%r14), %edi
LBB0_7:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_12:
	leaq	-36(%rbp), %rsi
	callq	_iio_get_channel_type
	testl	%eax, %eax
	js	LBB0_13
## %bb.14:
	movl	-36(%rbp), %eax
	movq	_IIO_RESISTANCE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_15
## %bb.16:
	movq	%rbx, %rdi
	callq	_dpot_dac_channel_max_ohms
	movl	%eax, %r12d
	testl	%eax, %eax
	js	LBB0_22
## %bb.17:
	movl	%r12d, (%r14)
	movl	4(%r14), %edi
	callq	_regulator_enable
	testl	%eax, %eax
	je	LBB0_19
## %bb.18:
	movl	%eax, %r12d
	leaq	L_.str.5(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
	jmp	LBB0_22
LBB0_13:
	movl	%eax, %r12d
	jmp	LBB0_22
LBB0_15:
	leaq	L_.str.4(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_19:
	movq	%rbx, %rdi
	callq	_iio_device_register
	testl	%eax, %eax
	je	LBB0_20
## %bb.21:
	movl	%eax, %r12d
	leaq	L_.str.6(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
	movl	4(%r14), %edi
	callq	_regulator_disable
	jmp	LBB0_22
LBB0_20:
	xorl	%r12d, %r12d
	jmp	LBB0_22
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_dpot_dac_info,4,2              ## @dpot_dac_info
	.comm	_INDIO_DIRECT_MODE,4,2          ## @INDIO_DIRECT_MODE
	.comm	_dpot_dac_iio_channel,4,2       ## @dpot_dac_iio_channel
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"vref"

	.comm	_EPROBE_DEFER,4,2               ## @EPROBE_DEFER
L_.str.1:                               ## @.str.1
	.asciz	"failed to get vref regulator\n"

L_.str.2:                               ## @.str.2
	.asciz	"dpot"

L_.str.3:                               ## @.str.3
	.asciz	"failed to get dpot input channel\n"

	.comm	_IIO_RESISTANCE,4,2             ## @IIO_RESISTANCE
L_.str.4:                               ## @.str.4
	.asciz	"dpot is of the wrong type\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.5:                               ## @.str.5
	.asciz	"failed to enable the vref regulator\n"

L_.str.6:                               ## @.str.6
	.asciz	"failed to register iio device\n"

	.no_dead_strip	_dpot_dac_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dpot_dac_probe
_dpot_dac_probe:                        ; @dpot_dac_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	w1, #12
	bl	_devm_iio_device_alloc
	cbz	x0, LBB0_5
; %bb.1:
	mov	x21, x0
	mov	x0, x19
	mov	x1, x21
	bl	_platform_set_drvdata
	mov	x0, x21
	bl	_iio_priv
	mov	x20, x0
	mov	x0, x19
	bl	_dev_name
Lloh0:
	adrp	x8, _dpot_dac_info@GOTPAGE
Lloh1:
	ldr	x8, [x8, _dpot_dac_info@GOTPAGEOFF]
	str	w0, [x21, #40]
	stp	x8, x19, [x21, #24]
Lloh2:
	adrp	x8, _INDIO_DIRECT_MODE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _INDIO_DIRECT_MODE@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	str	w8, [x21, #16]
Lloh5:
	adrp	x8, _dpot_dac_iio_channel@GOTPAGE
Lloh6:
	ldr	x8, [x8, _dpot_dac_iio_channel@GOTPAGEOFF]
	str	x8, [x21, #8]
	mov	w8, #1
	str	w8, [x21]
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_devm_regulator_get
	str	w0, [x20, #4]
	bl	_IS_ERR
	cbz	x0, LBB0_8
; %bb.2:
	ldr	w0, [x20, #4]
	bl	_PTR_ERR
Lloh9:
	adrp	x8, _EPROBE_DEFER@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EPROBE_DEFER@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmn	w0, w8
	b.eq	LBB0_4
; %bb.3:
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_err
LBB0_4:
	ldr	w0, [x20, #4]
	b	LBB0_12
LBB0_5:
Lloh14:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_7:
	mov	x0, x22
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_8:
Lloh16:
	adrp	x1, l_.str.2@PAGE
Lloh17:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_devm_iio_channel_get
	str	w0, [x20, #8]
	bl	_IS_ERR
	mov	x8, x0
	ldr	w0, [x20, #8]
	cbz	x8, LBB0_13
; %bb.9:
	bl	_PTR_ERR
Lloh18:
	adrp	x8, _EPROBE_DEFER@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EPROBE_DEFER@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	cmn	w0, w8
	b.eq	LBB0_11
; %bb.10:
Lloh21:
	adrp	x1, l_.str.3@PAGE
Lloh22:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_dev_err
LBB0_11:
	ldr	w0, [x20, #8]
LBB0_12:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	b	_PTR_ERR
LBB0_13:
	add	x1, sp, #12
	bl	_iio_get_channel_type
	tbnz	w0, #31, LBB0_18
; %bb.14:
	ldr	w8, [sp, #12]
Lloh23:
	adrp	x9, _IIO_RESISTANCE@GOTPAGE
Lloh24:
	ldr	x9, [x9, _IIO_RESISTANCE@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_19
; %bb.15:
	mov	x0, x21
	bl	_dpot_dac_channel_max_ohms
	mov	x22, x0
	tbnz	w0, #31, LBB0_7
; %bb.16:
	str	w22, [x20]
	ldr	w0, [x20, #4]
	bl	_regulator_enable
	cbz	w0, LBB0_20
; %bb.17:
	mov	x22, x0
Lloh26:
	adrp	x1, l_.str.5@PAGE
Lloh27:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	b	LBB0_7
LBB0_18:
	mov	x22, x0
	b	LBB0_7
LBB0_19:
Lloh28:
	adrp	x1, l_.str.4@PAGE
Lloh29:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh30:
	adrp	x8, _EINVAL@GOTPAGE
Lloh31:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_6
LBB0_20:
	mov	x0, x21
	bl	_iio_device_register
	mov	x22, x0
	cbz	w0, LBB0_7
; %bb.21:
Lloh32:
	adrp	x1, l_.str.6@PAGE
Lloh33:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	ldr	w0, [x20, #4]
	bl	_regulator_disable
	b	LBB0_7
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_dpot_dac_info,4,2              ; @dpot_dac_info
	.comm	_INDIO_DIRECT_MODE,4,2          ; @INDIO_DIRECT_MODE
	.comm	_dpot_dac_iio_channel,4,2       ; @dpot_dac_iio_channel
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"vref"

	.comm	_EPROBE_DEFER,4,2               ; @EPROBE_DEFER
l_.str.1:                               ; @.str.1
	.asciz	"failed to get vref regulator\n"

l_.str.2:                               ; @.str.2
	.asciz	"dpot"

l_.str.3:                               ; @.str.3
	.asciz	"failed to get dpot input channel\n"

	.comm	_IIO_RESISTANCE,4,2             ; @IIO_RESISTANCE
l_.str.4:                               ; @.str.4
	.asciz	"dpot is of the wrong type\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.5:                               ; @.str.5
	.asciz	"failed to enable the vref regulator\n"

l_.str.6:                               ; @.str.6
	.asciz	"failed to register iio device\n"

	.no_dead_strip	_dpot_dac_probe
.subsections_via_symbols
