	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function envelope_detector_probe
_envelope_detector_probe:               ## @envelope_detector_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, %r14
	movl	$48, %esi
	callq	_devm_iio_device_alloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %rbx
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_platform_set_drvdata
	movq	%rbx, %rdi
	callq	_iio_priv
	movq	%rax, %r15
	movl	$50, (%rax)
	leaq	44(%rax), %rdi
	callq	_spin_lock_init
	leaq	40(%r15), %rdi
	callq	_mutex_init
	leaq	36(%r15), %rdi
	callq	_init_completion
	leaq	32(%r15), %rdi
	movq	_envelope_detector_timeout@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_INIT_DELAYED_WORK
	movq	%r14, %rdi
	callq	_dev_name
	movl	%eax, 40(%rbx)
	movq	%r14, 32(%rbx)
	movl	(%r14), %eax
	movl	%eax, 24(%rbx)
	movq	_envelope_detector_info@GOTPCREL(%rip), %rax
	movq	%rax, 16(%rbx)
	movq	_envelope_detector_iio_channel@GOTPCREL(%rip), %rax
	movq	%rax, 8(%rbx)
	movl	$1, (%rbx)
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_devm_iio_channel_get
	movl	%eax, 28(%r15)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_7
## %bb.4:
	movl	28(%r15), %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	%r14, %rdi
	callq	_dev_err
LBB0_6:
	movl	28(%r15), %edi
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_27:
	movl	%r12d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	callq	_platform_get_irq_byname
	movq	%rax, %r12
	movq	%rax, 8(%r15)
	testq	%rax, %rax
	js	LBB0_27
## %bb.8:
	movq	_envelope_detector_comp_isr@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.3(%rip), %r8
	movq	%r14, %rdi
	movl	%r12d, %esi
	xorl	%ecx, %ecx
	movq	%r15, %r9
	callq	_devm_request_irq
	testl	%eax, %eax
	je	LBB0_12
## %bb.9:
	movl	%eax, %r12d
	movq	_EPROBE_DEFER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%r12d, %eax
	je	LBB0_27
## %bb.10:
	leaq	L_.str.4(%rip), %rsi
LBB0_11:
	movq	%r14, %rdi
	callq	_dev_err
	jmp	LBB0_27
LBB0_12:
	movl	8(%r15), %edi
	callq	_irq_get_trigger_type
	movl	%eax, 16(%r15)
	movq	_IRQF_TRIGGER_RISING@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_IRQF_TRIGGER_FALLING@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%eax, %ecx
	je	LBB0_14
## %bb.13:
	orl	%edx, 20(%r15)
LBB0_14:
	testl	%eax, %edx
	je	LBB0_16
## %bb.15:
	orl	%ecx, 20(%r15)
LBB0_16:
	movq	_IRQF_TRIGGER_HIGH@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_IRQF_TRIGGER_LOW@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%eax, %ecx
	je	LBB0_18
## %bb.17:
	orl	%edx, 20(%r15)
LBB0_18:
	testl	%eax, %edx
	je	LBB0_20
## %bb.19:
	orl	%ecx, 20(%r15)
LBB0_20:
	movl	28(%r15), %edi
	leaq	-36(%rbp), %rsi
	callq	_iio_get_channel_type
	testl	%eax, %eax
	js	LBB0_26
## %bb.21:
	movl	-36(%rbp), %eax
	movq	_IIO_VOLTAGE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_22
## %bb.23:
	movl	28(%r15), %edi
	addq	$24, %r15
	movq	%r15, %rsi
	callq	_iio_read_max_channel_raw
	testl	%eax, %eax
	js	LBB0_24
## %bb.25:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_devm_iio_device_register
LBB0_26:
	movl	%eax, %r12d
	jmp	LBB0_27
LBB0_22:
	leaq	L_.str.5(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_24:
	movl	%eax, %r12d
	leaq	L_.str.6(%rip), %rsi
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_envelope_detector_timeout,4,2  ## @envelope_detector_timeout
	.comm	_envelope_detector_info,4,2     ## @envelope_detector_info
	.comm	_envelope_detector_iio_channel,4,2 ## @envelope_detector_iio_channel
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"dac"

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

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

	.comm	_envelope_detector_comp_isr,4,2 ## @envelope_detector_comp_isr
L_.str.3:                               ## @.str.3
	.asciz	"envelope-detector"

L_.str.4:                               ## @.str.4
	.asciz	"failed to request interrupt\n"

	.comm	_IRQF_TRIGGER_RISING,4,2        ## @IRQF_TRIGGER_RISING
	.comm	_IRQF_TRIGGER_FALLING,4,2       ## @IRQF_TRIGGER_FALLING
	.comm	_IRQF_TRIGGER_HIGH,4,2          ## @IRQF_TRIGGER_HIGH
	.comm	_IRQF_TRIGGER_LOW,4,2           ## @IRQF_TRIGGER_LOW
	.comm	_IIO_VOLTAGE,4,2                ## @IIO_VOLTAGE
L_.str.5:                               ## @.str.5
	.asciz	"dac is of the wrong type\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.6:                               ## @.str.6
	.asciz	"dac does not indicate its raw maximum value\n"

	.no_dead_strip	_envelope_detector_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function envelope_detector_probe
_envelope_detector_probe:               ; @envelope_detector_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, #48
	bl	_devm_iio_device_alloc
	cbz	x0, LBB0_5
; %bb.1:
	mov	x20, x0
	mov	x0, x19
	mov	x1, x20
	bl	_platform_set_drvdata
	mov	x0, x20
	bl	_iio_priv
	mov	x21, x0
	mov	w8, #50
	str	w8, [x0], #44
	bl	_spin_lock_init
	add	x0, x21, #40
	bl	_mutex_init
	add	x0, x21, #36
	bl	_init_completion
	add	x0, x21, #32
Lloh0:
	adrp	x8, _envelope_detector_timeout@GOTPAGE
Lloh1:
	ldr	x8, [x8, _envelope_detector_timeout@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_INIT_DELAYED_WORK
	mov	x0, x19
	bl	_dev_name
	str	w0, [x20, #40]
	str	x19, [x20, #32]
	ldr	w8, [x19]
	str	w8, [x20, #24]
Lloh3:
	adrp	x8, _envelope_detector_info@GOTPAGE
Lloh4:
	ldr	x8, [x8, _envelope_detector_info@GOTPAGEOFF]
Lloh5:
	adrp	x9, _envelope_detector_iio_channel@GOTPAGE
Lloh6:
	ldr	x9, [x9, _envelope_detector_iio_channel@GOTPAGEOFF]
	stp	x9, x8, [x20, #8]
	mov	w8, #1
	str	w8, [x20]
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_devm_iio_channel_get
	str	w0, [x21, #28]
	bl	_IS_ERR
	cbz	x0, LBB0_8
; %bb.2:
	ldr	w0, [x21, #28]
	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, [x21, #28]
	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_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	_platform_get_irq_byname
	mov	x22, x0
	str	x0, [x21, #8]
	tbnz	x0, #63, LBB0_7
; %bb.9:
Lloh18:
	adrp	x8, _envelope_detector_comp_isr@GOTPAGE
Lloh19:
	ldr	x8, [x8, _envelope_detector_comp_isr@GOTPAGEOFF]
Lloh20:
	ldr	w2, [x8]
Lloh21:
	adrp	x4, l_.str.3@PAGE
Lloh22:
	add	x4, x4, l_.str.3@PAGEOFF
	mov	x0, x19
	mov	x1, x22
	mov	w3, #0
	mov	x5, x21
	bl	_devm_request_irq
	cbz	w0, LBB0_13
; %bb.10:
	mov	x22, x0
Lloh23:
	adrp	x8, _EPROBE_DEFER@GOTPAGE
Lloh24:
	ldr	x8, [x8, _EPROBE_DEFER@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	cmn	w0, w8
	b.eq	LBB0_7
; %bb.11:
Lloh26:
	adrp	x1, l_.str.4@PAGE
Lloh27:
	add	x1, x1, l_.str.4@PAGEOFF
LBB0_12:
	mov	x0, x19
	bl	_dev_err
	b	LBB0_7
LBB0_13:
	ldr	w0, [x21, #8]
	bl	_irq_get_trigger_type
Lloh28:
	adrp	x8, _IRQF_TRIGGER_RISING@GOTPAGE
Lloh29:
	ldr	x8, [x8, _IRQF_TRIGGER_RISING@GOTPAGEOFF]
	str	w0, [x21, #16]
Lloh30:
	ldr	w8, [x8]
Lloh31:
	adrp	x9, _IRQF_TRIGGER_FALLING@GOTPAGE
Lloh32:
	ldr	x9, [x9, _IRQF_TRIGGER_FALLING@GOTPAGEOFF]
Lloh33:
	ldr	w9, [x9]
	tst	w8, w0
	b.eq	LBB0_15
; %bb.14:
	ldr	w10, [x21, #20]
	orr	w10, w10, w9
	str	w10, [x21, #20]
LBB0_15:
	tst	w9, w0
	b.eq	LBB0_17
; %bb.16:
	ldr	w9, [x21, #20]
	orr	w8, w9, w8
	str	w8, [x21, #20]
LBB0_17:
Lloh34:
	adrp	x8, _IRQF_TRIGGER_HIGH@GOTPAGE
Lloh35:
	ldr	x8, [x8, _IRQF_TRIGGER_HIGH@GOTPAGEOFF]
Lloh36:
	ldr	w8, [x8]
Lloh37:
	adrp	x9, _IRQF_TRIGGER_LOW@GOTPAGE
Lloh38:
	ldr	x9, [x9, _IRQF_TRIGGER_LOW@GOTPAGEOFF]
Lloh39:
	ldr	w9, [x9]
	tst	w8, w0
	b.eq	LBB0_19
; %bb.18:
	ldr	w10, [x21, #20]
	orr	w10, w10, w9
	str	w10, [x21, #20]
LBB0_19:
	tst	w9, w0
	b.eq	LBB0_21
; %bb.20:
	ldr	w9, [x21, #20]
	orr	w8, w9, w8
	str	w8, [x21, #20]
LBB0_21:
	ldr	w0, [x21, #28]
	add	x1, sp, #12
	bl	_iio_get_channel_type
	tbnz	w0, #31, LBB0_25
; %bb.22:
	ldr	w8, [sp, #12]
Lloh40:
	adrp	x9, _IIO_VOLTAGE@GOTPAGE
Lloh41:
	ldr	x9, [x9, _IIO_VOLTAGE@GOTPAGEOFF]
Lloh42:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_26
; %bb.23:
	ldr	w0, [x21, #28]
	add	x1, x21, #24
	bl	_iio_read_max_channel_raw
	tbnz	w0, #31, LBB0_27
; %bb.24:
	mov	x0, x19
	mov	x1, x20
	bl	_devm_iio_device_register
LBB0_25:
	mov	x22, x0
	b	LBB0_7
LBB0_26:
Lloh43:
	adrp	x1, l_.str.5@PAGE
Lloh44:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh45:
	adrp	x8, _EINVAL@GOTPAGE
Lloh46:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_6
LBB0_27:
	mov	x22, x0
Lloh47:
	adrp	x1, l_.str.6@PAGE
Lloh48:
	add	x1, x1, l_.str.6@PAGEOFF
	b	LBB0_12
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGot	Lloh45, Lloh46
	.loh AdrpAdd	Lloh43, Lloh44
	.loh AdrpAdd	Lloh47, Lloh48
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_envelope_detector_timeout,4,2  ; @envelope_detector_timeout
	.comm	_envelope_detector_info,4,2     ; @envelope_detector_info
	.comm	_envelope_detector_iio_channel,4,2 ; @envelope_detector_iio_channel
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"dac"

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

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

	.comm	_envelope_detector_comp_isr,4,2 ; @envelope_detector_comp_isr
l_.str.3:                               ; @.str.3
	.asciz	"envelope-detector"

l_.str.4:                               ; @.str.4
	.asciz	"failed to request interrupt\n"

	.comm	_IRQF_TRIGGER_RISING,4,2        ; @IRQF_TRIGGER_RISING
	.comm	_IRQF_TRIGGER_FALLING,4,2       ; @IRQF_TRIGGER_FALLING
	.comm	_IRQF_TRIGGER_HIGH,4,2          ; @IRQF_TRIGGER_HIGH
	.comm	_IRQF_TRIGGER_LOW,4,2           ; @IRQF_TRIGGER_LOW
	.comm	_IIO_VOLTAGE,4,2                ; @IIO_VOLTAGE
l_.str.5:                               ; @.str.5
	.asciz	"dac is of the wrong type\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.6:                               ; @.str.6
	.asciz	"dac does not indicate its raw maximum value\n"

	.no_dead_strip	_envelope_detector_probe
.subsections_via_symbols
