	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function max5821_probe
LCPI0_0:
	.long	1                               ## 0x1
	.long	1                               ## 0x1
	.long	1                               ## 0x1
	.long	1                               ## 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_max5821_probe:                         ## @max5821_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	%rsi, %r15
	movq	%rdi, %r12
	movl	$40, %esi
	callq	_devm_iio_device_alloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_iio_priv
	movq	%rax, %r13
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_i2c_set_clientdata
	movq	%r12, 32(%r13)
	movq	%r13, %rdi
	addq	$24, %rdi
	callq	_mutex_init
	movq	_MAX5821_MAX_DAC_CHANNELS@GOTPCREL(%rip), %rax
	movq	(%rax), %r10
	testq	%r10, %r10
	je	LBB0_22
## %bb.2:
	movq	(%r13), %rcx
	movq	16(%r13), %rdx
	cmpq	$8, %r10
	jae	LBB0_5
## %bb.3:
	xorl	%esi, %esi
	jmp	LBB0_16
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_27
LBB0_5:
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	leaq	(%rcx,%r10,4), %rsi
	leaq	(%rdx,%r10,4), %rdi
	cmpq	%rdi, %rcx
	setb	%r15b
	cmpq	%rsi, %rdx
	setb	%r8b
	movq	_MAX5821_100KOHM_TO_GND@GOTPCREL(%rip), %rax
	leaq	4(%rax), %rbx
	cmpq	%rbx, %rcx
	setb	%r9b
	cmpq	%rax, %rsi
	seta	%r11b
	cmpq	%rbx, %rdx
	setb	%bl
	cmpq	%rax, %rdi
	seta	%al
	xorl	%esi, %esi
	testb	%r8b, %r15b
	jne	LBB0_15
## %bb.6:
	andb	%r11b, %r9b
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	jne	LBB0_16
## %bb.7:
	andb	%al, %bl
	jne	LBB0_16
## %bb.8:
	movq	%r10, %rsi
	andq	$-8, %rsi
	leaq	-8(%rsi), %rax
	movq	%rax, %r9
	shrq	$3, %r9
	incq	%r9
	testq	%rax, %rax
	je	LBB0_14
## %bb.9:
	movq	%r9, %rbx
	andq	$-2, %rbx
	movq	_MAX5821_100KOHM_TO_GND@GOTPCREL(%rip), %rax
	movd	(%rax), %xmm0                   ## xmm0 = mem[0],zero,zero,zero
	pshufd	$0, %xmm0, %xmm0                ## xmm0 = xmm0[0,0,0,0]
	xorl	%edi, %edi
	movaps	LCPI0_0(%rip), %xmm1            ## xmm1 = [1,1,1,1]
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movups	%xmm1, (%rcx,%rdi,4)
	movups	%xmm1, 16(%rcx,%rdi,4)
	movdqu	%xmm0, (%rdx,%rdi,4)
	movdqu	%xmm0, 16(%rdx,%rdi,4)
	movups	%xmm1, 32(%rcx,%rdi,4)
	movups	%xmm1, 48(%rcx,%rdi,4)
	movdqu	%xmm0, 32(%rdx,%rdi,4)
	movdqu	%xmm0, 48(%rdx,%rdi,4)
	addq	$16, %rdi
	addq	$-2, %rbx
	jne	LBB0_10
## %bb.11:
	testb	$1, %r9b
	je	LBB0_13
LBB0_12:
	movaps	LCPI0_0(%rip), %xmm0            ## xmm0 = [1,1,1,1]
	movups	%xmm0, (%rcx,%rdi,4)
	movups	%xmm0, 16(%rcx,%rdi,4)
	movd	(%rax), %xmm0                   ## xmm0 = mem[0],zero,zero,zero
	pshufd	$0, %xmm0, %xmm0                ## xmm0 = xmm0[0,0,0,0]
	movdqu	%xmm0, (%rdx,%rdi,4)
	movdqu	%xmm0, 16(%rdx,%rdi,4)
LBB0_13:
	cmpq	%rsi, %r10
	jne	LBB0_16
	jmp	LBB0_22
LBB0_14:
	xorl	%edi, %edi
	movq	_MAX5821_100KOHM_TO_GND@GOTPCREL(%rip), %rax
	testb	$1, %r9b
	jne	LBB0_12
	jmp	LBB0_13
LBB0_15:
	movq	-48(%rbp), %r15                 ## 8-byte Reload
LBB0_16:
	movq	%rsi, %r8
	notq	%r8
	addq	%r10, %r8
	movq	%r10, %rax
	andq	$3, %rax
	je	LBB0_19
## %bb.17:
	movq	_MAX5821_100KOHM_TO_GND@GOTPCREL(%rip), %rbx
	.p2align	4, 0x90
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movl	$1, (%rcx,%rsi,4)
	movl	(%rbx), %edi
	movl	%edi, (%rdx,%rsi,4)
	incq	%rsi
	decq	%rax
	jne	LBB0_18
LBB0_19:
	cmpq	$3, %r8
	jb	LBB0_22
## %bb.20:
	movq	_MAX5821_100KOHM_TO_GND@GOTPCREL(%rip), %rdi
	.p2align	4, 0x90
LBB0_21:                                ## =>This Inner Loop Header: Depth=1
	movl	$1, (%rcx,%rsi,4)
	movl	(%rdi), %eax
	movl	%eax, (%rdx,%rsi,4)
	movl	$1, 4(%rcx,%rsi,4)
	movl	(%rdi), %eax
	movl	%eax, 4(%rdx,%rsi,4)
	movl	$1, 8(%rcx,%rsi,4)
	movl	(%rdi), %eax
	movl	%eax, 8(%rdx,%rsi,4)
	movl	$1, 12(%rcx,%rsi,4)
	movl	(%rdi), %eax
	movl	%eax, 12(%rdx,%rsi,4)
	addq	$4, %rsi
	cmpq	%rsi, %r10
	jne	LBB0_21
LBB0_22:
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	callq	_devm_regulator_get
	movl	%eax, 12(%r13)
	movl	%eax, %edi
	callq	_IS_ERR
	movl	12(%r13), %edi
	testq	%rax, %rax
	je	LBB0_24
## %bb.23:
	callq	_PTR_ERR
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_26
LBB0_24:
	callq	_regulator_enable
	testl	%eax, %eax
	je	LBB0_28
## %bb.25:
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rsi
LBB0_26:
	movq	%r12, %rdi
	movl	%eax, %edx
	callq	_dev_err
LBB0_27:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_28:
	movl	12(%r13), %edi
	callq	_regulator_get_voltage
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_30
## %bb.29:
	movl	%ebx, %eax
	imulq	$274877907, %rax, %rax          ## imm = 0x10624DD3
	shrq	$38, %rax
	movl	%eax, 8(%r13)
	movl	(%r15), %eax
	movl	%eax, 32(%r14)
	movq	%r12, 24(%r14)
	movq	_max5821_channels@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_ARRAY_SIZE
	movl	%eax, 16(%r14)
	movl	(%rbx), %eax
	movl	%eax, 12(%r14)
	movq	_INDIO_DIRECT_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r14)
	movq	_max5821_info@GOTPCREL(%rip), %rax
	movq	%rax, (%r14)
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_iio_device_register            ## TAILCALL
LBB0_30:
	leaq	L_.str.3(%rip), %rsi
	movq	%r12, %rdi
	movl	%ebx, %edx
	callq	_dev_err
	movl	12(%r13), %edi
	callq	_regulator_disable
	jmp	LBB0_27
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_MAX5821_MAX_DAC_CHANNELS,8,3   ## @MAX5821_MAX_DAC_CHANNELS
	.comm	_MAX5821_100KOHM_TO_GND,4,2     ## @MAX5821_100KOHM_TO_GND
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"vref"

L_.str.1:                               ## @.str.1
	.asciz	"Failed to get vref regulator: %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"Failed to enable vref regulator: %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"Failed to get voltage on regulator: %d\n"

	.comm	_max5821_channels,4,2           ## @max5821_channels
	.comm	_INDIO_DIRECT_MODE,4,2          ## @INDIO_DIRECT_MODE
	.comm	_max5821_info,4,2               ## @max5821_info
	.no_dead_strip	_max5821_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function max5821_probe
_max5821_probe:                         ; @max5821_probe
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x1
	mov	x19, x0
	mov	w1, #40
	bl	_devm_iio_device_alloc
	cbz	x0, LBB0_8
; %bb.1:
	mov	x20, x0
	bl	_iio_priv
	mov	x22, x0
	mov	x0, x19
	mov	x1, x20
	bl	_i2c_set_clientdata
	str	x19, [x22, #32]
	add	x0, x22, #24
	bl	_mutex_init
Lloh0:
	adrp	x8, _MAX5821_MAX_DAC_CHANNELS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX5821_MAX_DAC_CHANNELS@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x8]
	cbz	x10, LBB0_6
; %bb.2:
	ldr	x9, [x22]
	ldr	x11, [x22, #16]
Lloh3:
	adrp	x8, _MAX5821_100KOHM_TO_GND@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAX5821_100KOHM_TO_GND@GOTPAGEOFF]
	cmp	x10, #16
	b.hs	LBB0_13
; %bb.3:
	mov	x12, #0
LBB0_4:
	sub	x10, x10, x12
	lsl	x12, x12, #2
	add	x11, x11, x12
	add	x9, x9, x12
	mov	w12, #1
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	str	w12, [x9], #4
	ldr	w13, [x8]
	str	w13, [x11], #4
	subs	x10, x10, #1
	b.ne	LBB0_5
LBB0_6:
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_devm_regulator_get
	str	w0, [x22, #12]
	bl	_IS_ERR
	mov	x8, x0
	ldr	w0, [x22, #12]
	cbz	x8, LBB0_9
; %bb.7:
	bl	_PTR_ERR
	mov	x23, x0
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_11
LBB0_8:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_12
LBB0_9:
	bl	_regulator_enable
	cbz	w0, LBB0_19
; %bb.10:
	mov	x23, x0
Lloh12:
	adrp	x1, l_.str.2@PAGE
Lloh13:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_11:
	mov	x0, x19
	mov	x2, x23
	bl	_dev_err
LBB0_12:
	mov	x0, x23
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_13:
	mov	x12, #0
	lsl	x13, x10, #2
	add	x15, x11, x13
	add	x14, x8, #4
	cmp	x9, x14
	add	x16, x9, x13
	ccmp	x16, x8, #0, lo
	cset	w13, hi
	cmp	x11, x14
	ccmp	x15, x8, #0, lo
	cset	w14, hi
	cmp	x11, x16
	ccmp	x9, x15, #2, lo
	b.lo	LBB0_4
; %bb.14:
	tbnz	w13, #0, LBB0_4
; %bb.15:
	tbnz	w14, #0, LBB0_4
; %bb.16:
	and	x12, x10, #0xfffffffffffffff0
	ld1r.4s	{ v0 }, [x8]
	add	x13, x9, #32
	add	x14, x11, #32
	movi.4s	v1, #1
	mov	x15, x12
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	stp	q1, q1, [x13, #-32]
	stp	q1, q1, [x13], #64
	stp	q0, q0, [x14, #-32]
	stp	q0, q0, [x14], #64
	subs	x15, x15, #16
	b.ne	LBB0_17
; %bb.18:
	cmp	x10, x12
	b.ne	LBB0_4
	b	LBB0_6
LBB0_19:
	ldr	w0, [x22, #12]
	bl	_regulator_get_voltage
	mov	x23, x0
	tbnz	w0, #31, LBB0_21
; %bb.20:
	mov	w8, #19923
	movk	w8, #4194, lsl #16
	umull	x8, w23, w8
	lsr	x8, x8, #38
	str	w8, [x22, #8]
	ldr	w8, [x21]
	str	w8, [x20, #32]
	str	x19, [x20, #24]
Lloh14:
	adrp	x19, _max5821_channels@GOTPAGE
Lloh15:
	ldr	x19, [x19, _max5821_channels@GOTPAGEOFF]
	ldr	w0, [x19]
	bl	_ARRAY_SIZE
	str	w0, [x20, #16]
	ldr	w8, [x19]
Lloh16:
	adrp	x9, _INDIO_DIRECT_MODE@GOTPAGE
Lloh17:
	ldr	x9, [x9, _INDIO_DIRECT_MODE@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	stp	w9, w8, [x20, #8]
Lloh19:
	adrp	x8, _max5821_info@GOTPAGE
Lloh20:
	ldr	x8, [x8, _max5821_info@GOTPAGEOFF]
	str	x8, [x20]
	mov	x0, x20
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_iio_device_register
LBB0_21:
Lloh21:
	adrp	x1, l_.str.3@PAGE
Lloh22:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	mov	x2, x23
	bl	_dev_err
	ldr	w0, [x22, #12]
	bl	_regulator_disable
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_MAX5821_MAX_DAC_CHANNELS,8,3   ; @MAX5821_MAX_DAC_CHANNELS
	.comm	_MAX5821_100KOHM_TO_GND,4,2     ; @MAX5821_100KOHM_TO_GND
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"vref"

l_.str.1:                               ; @.str.1
	.asciz	"Failed to get vref regulator: %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"Failed to enable vref regulator: %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"Failed to get voltage on regulator: %d\n"

	.comm	_max5821_channels,4,2           ; @max5821_channels
	.comm	_INDIO_DIRECT_MODE,4,2          ; @INDIO_DIRECT_MODE
	.comm	_max5821_info,4,2               ; @max5821_info
	.no_dead_strip	_max5821_probe
.subsections_via_symbols
