	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cc10001_adc_probe
_cc10001_adc_probe:                     ## @cc10001_adc_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	(%rdi), %rbx
	movl	$40, %esi
	callq	_devm_iio_device_alloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_iio_priv
	movq	%rax, %r14
	movq	_CC10001_ADC_NUM_CHANNELS@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	decq	%rdi
	xorl	%esi, %esi
	callq	_GENMASK
	movq	%rax, %r12
	leaq	L_.str(%rip), %rsi
	leaq	-44(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_of_property_read_u32
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	movl	$1, (%r14)
	movslq	-44(%rbp), %rax
	notq	%rax
	andq	%rax, %r12
LBB0_4:
	leaq	L_.str.1(%rip), %rsi
	movq	%r13, %rdi
	callq	_devm_regulator_get
	movl	%eax, 20(%r14)
	movl	%eax, %edi
	callq	_IS_ERR
	movl	20(%r14), %edi
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	callq	_PTR_ERR
	jmp	LBB0_28
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_28
LBB0_6:
	callq	_regulator_enable
	movl	%eax, -44(%rbp)
	testl	%eax, %eax
	jne	LBB0_28
## %bb.7:
	movq	%r13, 24(%r15)
	movq	%r13, %rdi
	callq	_dev_name
	movl	%eax, 16(%r15)
	movq	_cc10001_adc_info@GOTPCREL(%rip), %rax
	movq	%rax, 8(%r15)
	movq	_INDIO_DIRECT_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r15)
	movq	_IORESOURCE_MEM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	xorl	%edx, %edx
	callq	_platform_get_resource
	movq	%r13, %rdi
	movq	%rax, %rsi
	callq	_devm_ioremap_resource
	movl	%eax, 32(%r14)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_10
## %bb.8:
	movl	32(%r14), %edi
	jmp	LBB0_9
LBB0_10:
	leaq	L_.str.2(%rip), %rsi
	movq	%r13, %rdi
	callq	_devm_clk_get
	movl	%eax, 24(%r14)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	leaq	L_.str.3(%rip), %rsi
	movq	%r13, %rdi
	callq	_dev_err
	movl	24(%r14), %edi
LBB0_9:
	callq	_PTR_ERR
	movl	%eax, -44(%rbp)
LBB0_27:
	movl	20(%r14), %edi
	callq	_regulator_disable
	movl	-44(%rbp), %eax
LBB0_28:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movl	24(%r14), %edi
	callq	_clk_prepare_enable
	movl	%eax, -44(%rbp)
	testl	%eax, %eax
	je	LBB0_14
## %bb.13:
	leaq	L_.str.4(%rip), %rsi
	movq	%r13, %rdi
	callq	_dev_err
	jmp	LBB0_27
LBB0_14:
	movl	24(%r14), %edi
	callq	_clk_get_rate
	testq	%rax, %rax
	je	LBB0_15
## %bb.16:
	movq	%rax, %rcx
	movq	_NSEC_PER_SEC@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rcx, %rdx
	orq	%rax, %rdx
	shrq	$32, %rdx
	je	LBB0_17
## %bb.18:
	xorl	%edx, %edx
	divq	%rcx
	jmp	LBB0_19
LBB0_15:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
	movl	%ecx, -44(%rbp)
	leaq	L_.str.5(%rip), %rsi
	movq	%r13, %rdi
	callq	_dev_err
	jmp	LBB0_26
LBB0_17:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $eax killed $eax def $rax
LBB0_19:
	movq	%rax, 8(%r14)
	movq	_CC10001_WAIT_CYCLES@GOTPCREL(%rip), %rcx
	imull	(%rcx), %eax
	movl	%eax, 16(%r14)
	cmpl	$0, (%r14)
	je	LBB0_21
## %bb.20:
	movq	%r14, %rdi
	callq	_cc10001_adc_power_up
LBB0_21:
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_cc10001_adc_channel_init
	movl	%eax, -44(%rbp)
	testl	%eax, %eax
	js	LBB0_26
## %bb.22:
	movq	%r14, %rdi
	addq	$28, %rdi
	callq	_mutex_init
	movq	_cc10001_adc_trigger_h@GOTPCREL(%rip), %rdx
	movq	%r15, %rdi
	xorl	%esi, %esi
	xorl	%ecx, %ecx
	callq	_iio_triggered_buffer_setup
	movl	%eax, -44(%rbp)
	testl	%eax, %eax
	js	LBB0_26
## %bb.23:
	movq	%r15, %rdi
	callq	_iio_device_register
	movl	%eax, -44(%rbp)
	testl	%eax, %eax
	js	LBB0_25
## %bb.24:
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	_platform_set_drvdata
	xorl	%eax, %eax
	jmp	LBB0_28
LBB0_25:
	movq	%r15, %rdi
	callq	_iio_triggered_buffer_cleanup
LBB0_26:
	movl	24(%r14), %edi
	callq	_clk_disable_unprepare
	jmp	LBB0_27
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_CC10001_ADC_NUM_CHANNELS,8,3   ## @CC10001_ADC_NUM_CHANNELS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"adc-reserved-channels"

L_.str.1:                               ## @.str.1
	.asciz	"vref"

	.comm	_cc10001_adc_info,4,2           ## @cc10001_adc_info
	.comm	_INDIO_DIRECT_MODE,4,2          ## @INDIO_DIRECT_MODE
	.comm	_IORESOURCE_MEM,4,2             ## @IORESOURCE_MEM
L_.str.2:                               ## @.str.2
	.asciz	"adc"

L_.str.3:                               ## @.str.3
	.asciz	"failed to get the clock\n"

L_.str.4:                               ## @.str.4
	.asciz	"failed to enable the clock\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.5:                               ## @.str.5
	.asciz	"null clock rate!\n"

	.comm	_NSEC_PER_SEC,8,3               ## @NSEC_PER_SEC
	.comm	_CC10001_WAIT_CYCLES,4,2        ## @CC10001_WAIT_CYCLES
	.comm	_cc10001_adc_trigger_h,4,2      ## @cc10001_adc_trigger_h
	.no_dead_strip	_cc10001_adc_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cc10001_adc_probe
_cc10001_adc_probe:                     ; @cc10001_adc_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x0
	ldr	x23, [x0]
	mov	w1, #40
	bl	_devm_iio_device_alloc
	cbz	x0, LBB0_5
; %bb.1:
	mov	x21, x0
	bl	_iio_priv
	mov	x19, x0
Lloh0:
	adrp	x8, _CC10001_ADC_NUM_CHANNELS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CC10001_ADC_NUM_CHANNELS@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	sub	x0, x8, #1
	mov	w1, #0
	bl	_GENMASK
	mov	x22, x0
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	add	x2, sp, #12
	mov	x0, x23
	bl	_of_property_read_u32
	cbnz	w0, LBB0_3
; %bb.2:
	mov	w8, #1
	str	w8, [x19]
	ldr	w8, [sp, #12]
	mvn	w8, w8
	sxtw	x8, w8
	and	x22, x22, x8
LBB0_3:
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_devm_regulator_get
	str	w0, [x19, #20]
	bl	_IS_ERR
	mov	x8, x0
	ldr	w0, [x19, #20]
	cbz	x8, LBB0_6
; %bb.4:
	bl	_PTR_ERR
	b	LBB0_13
LBB0_5:
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_13
LBB0_6:
	bl	_regulator_enable
	str	w0, [sp, #12]
	cbnz	w0, LBB0_13
; %bb.7:
	str	x20, [x21, #24]
	mov	x0, x20
	bl	_dev_name
	str	w0, [x21, #16]
Lloh10:
	adrp	x8, _cc10001_adc_info@GOTPAGE
Lloh11:
	ldr	x8, [x8, _cc10001_adc_info@GOTPAGEOFF]
Lloh12:
	adrp	x9, _INDIO_DIRECT_MODE@GOTPAGE
Lloh13:
	ldr	x9, [x9, _INDIO_DIRECT_MODE@GOTPAGEOFF]
	str	x8, [x21, #8]
Lloh14:
	ldr	w8, [x9]
	str	w8, [x21]
Lloh15:
	adrp	x8, _IORESOURCE_MEM@GOTPAGE
Lloh16:
	ldr	x8, [x8, _IORESOURCE_MEM@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #0
	bl	_platform_get_resource
	mov	x1, x0
	mov	x0, x20
	bl	_devm_ioremap_resource
	str	w0, [x19, #32]
	bl	_IS_ERR
	cbz	x0, LBB0_9
; %bb.8:
	ldr	w0, [x19, #32]
	b	LBB0_11
LBB0_9:
Lloh18:
	adrp	x1, l_.str.2@PAGE
Lloh19:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_devm_clk_get
	str	w0, [x19, #24]
	bl	_IS_ERR
	cbz	x0, LBB0_14
; %bb.10:
Lloh20:
	adrp	x1, l_.str.3@PAGE
Lloh21:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	ldr	w0, [x19, #24]
LBB0_11:
	bl	_PTR_ERR
	str	w0, [sp, #12]
LBB0_12:
	ldr	w0, [x19, #20]
	bl	_regulator_disable
	ldr	w0, [sp, #12]
LBB0_13:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_14:
	ldr	w0, [x19, #24]
	bl	_clk_prepare_enable
	str	w0, [sp, #12]
	cbz	w0, LBB0_16
; %bb.15:
Lloh22:
	adrp	x1, l_.str.4@PAGE
Lloh23:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	b	LBB0_12
LBB0_16:
	ldr	w0, [x19, #24]
	bl	_clk_get_rate
	cbz	x0, LBB0_23
; %bb.17:
Lloh24:
	adrp	x8, _NSEC_PER_SEC@GOTPAGE
Lloh25:
	ldr	x8, [x8, _NSEC_PER_SEC@GOTPAGEOFF]
Lloh26:
	ldr	x8, [x8]
	udiv	x8, x8, x0
	str	x8, [x19, #8]
Lloh27:
	adrp	x9, _CC10001_WAIT_CYCLES@GOTPAGE
Lloh28:
	ldr	x9, [x9, _CC10001_WAIT_CYCLES@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x9]
	mul	w8, w9, w8
	str	w8, [x19, #16]
	ldr	w8, [x19]
	cbz	w8, LBB0_19
; %bb.18:
	mov	x0, x19
	bl	_cc10001_adc_power_up
LBB0_19:
	mov	x0, x21
	mov	x1, x22
	bl	_cc10001_adc_channel_init
	str	w0, [sp, #12]
	tbnz	w0, #31, LBB0_25
; %bb.20:
	add	x0, x19, #28
	bl	_mutex_init
Lloh30:
	adrp	x2, _cc10001_adc_trigger_h@GOTPAGE
Lloh31:
	ldr	x2, [x2, _cc10001_adc_trigger_h@GOTPAGEOFF]
	mov	x0, x21
	mov	x1, #0
	mov	x3, #0
	bl	_iio_triggered_buffer_setup
	str	w0, [sp, #12]
	tbnz	w0, #31, LBB0_25
; %bb.21:
	mov	x0, x21
	bl	_iio_device_register
	str	w0, [sp, #12]
	tbnz	w0, #31, LBB0_24
; %bb.22:
	mov	x0, x20
	mov	x1, x21
	bl	_platform_set_drvdata
	mov	w0, #0
	b	LBB0_13
LBB0_23:
Lloh32:
	adrp	x8, _EINVAL@GOTPAGE
Lloh33:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	neg	w8, w8
	str	w8, [sp, #12]
Lloh35:
	adrp	x1, l_.str.5@PAGE
Lloh36:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	b	LBB0_25
LBB0_24:
	mov	x0, x21
	bl	_iio_triggered_buffer_cleanup
LBB0_25:
	ldr	w0, [x19, #24]
	bl	_clk_disable_unprepare
	b	LBB0_12
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_CC10001_ADC_NUM_CHANNELS,8,3   ; @CC10001_ADC_NUM_CHANNELS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"adc-reserved-channels"

l_.str.1:                               ; @.str.1
	.asciz	"vref"

	.comm	_cc10001_adc_info,4,2           ; @cc10001_adc_info
	.comm	_INDIO_DIRECT_MODE,4,2          ; @INDIO_DIRECT_MODE
	.comm	_IORESOURCE_MEM,4,2             ; @IORESOURCE_MEM
l_.str.2:                               ; @.str.2
	.asciz	"adc"

l_.str.3:                               ; @.str.3
	.asciz	"failed to get the clock\n"

l_.str.4:                               ; @.str.4
	.asciz	"failed to enable the clock\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.5:                               ; @.str.5
	.asciz	"null clock rate!\n"

	.comm	_NSEC_PER_SEC,8,3               ; @NSEC_PER_SEC
	.comm	_CC10001_WAIT_CYCLES,4,2        ; @CC10001_WAIT_CYCLES
	.comm	_cc10001_adc_trigger_h,4,2      ; @cc10001_adc_trigger_h
	.no_dead_strip	_cc10001_adc_probe
.subsections_via_symbols
