	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ad5791_probe
_ad5791_probe:                          ## @ad5791_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	(%rdi), %rbx
	movl	$48, %esi
	callq	_devm_iio_device_alloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%rax, %rdi
	callq	_iio_priv
	movq	%rax, %r13
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_devm_regulator_get
	movq	%rax, 16(%r13)
	movq	%rax, %rdi
	callq	_IS_ERR
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	movl	$0, %r12d
	testl	%eax, %eax
	je	LBB0_3
LBB0_5:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	callq	_devm_regulator_get
	movq	%rax, 24(%r13)
	movq	%rax, %rdi
	callq	_IS_ERR
	testl	%eax, %eax
	je	LBB0_6
LBB0_8:
	movl	$1, (%r13)
	movq	%r15, 32(%r13)
	movq	24(%r13), %rdi
	callq	_IS_ERR
	testl	%eax, %eax
	jne	LBB0_11
## %bb.9:
	movq	16(%r13), %rdi
	callq	_IS_ERR
	testl	%eax, %eax
	je	LBB0_10
LBB0_11:
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	testq	%rcx, %rcx
	je	LBB0_13
## %bb.12:
	movl	4(%rcx), %eax
	movl	(%rcx), %ecx
	addl	%eax, %ecx
	movl	%ecx, 4(%r13)
	movl	%eax, 8(%r13)
	jmp	LBB0_14
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_25
LBB0_3:
	movq	16(%r13), %rdi
	callq	_regulator_enable
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_25
## %bb.4:
	movq	16(%r13), %rdi
	callq	_regulator_get_voltage
	movl	%eax, %r12d
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_5
	jmp	LBB0_23
LBB0_6:
	movq	24(%r13), %rdi
	callq	_regulator_enable
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_23
## %bb.7:
	movq	24(%r13), %rdi
	callq	_regulator_get_voltage
	movl	%eax, %ebx
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	testl	%eax, %eax
	jns	LBB0_8
	jmp	LBB0_21
LBB0_13:
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_warn
	jmp	LBB0_14
LBB0_10:
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	addl	%ecx, %r12d
	imulq	$274877907, %r12, %rax          ## imm = 0x10624DD3
	shrq	$38, %rax
	movl	%eax, 4(%r13)
	movl	%ecx, %eax
	imulq	$274877907, %rax, %rax          ## imm = 0x10624DD3
	shrq	$38, %rax
	movl	%eax, 8(%r13)
LBB0_14:
	movq	_AD5791_ADDR_SW_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AD5791_SWCTRL_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	callq	_ad5791_spi_write
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_21
## %bb.15:
	movq	_ad5791_chip_info_tbl@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movq	%r15, %rdi
	callq	_spi_get_device_id
	movq	(%rax), %rax
	leaq	(%rbx,%rax,8), %rcx
	movq	%rcx, 40(%r13)
	movl	4(%r13), %edi
	callq	*(%rbx,%rax,8)
	movl	%eax, %edi
	callq	_AD5761_CTRL_LINCOMP
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	testq	%rcx, %rcx
	je	LBB0_17
## %bb.16:
	xorl	%edx, %edx
	cmpq	$0, 8(%rcx)
	jne	LBB0_18
LBB0_17:
	movq	_AD5791_CTRL_RBUF@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
LBB0_18:
	orl	%eax, %edx
	movq	_AD5791_CTRL_BIN2SC@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movl	%edx, 12(%r13)
	movq	_AD5791_ADDR_CTRL@GOTPCREL(%rip), %rax
	movq	_AD5791_CTRL_OPGND@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edx
	movl	(%rax), %esi
	movq	_AD5791_CTRL_DACTRI@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	%r13, %rdi
	callq	_ad5791_spi_write
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_21
## %bb.19:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_spi_set_drvdata
	movq	%r15, 32(%r14)
	movq	_ad5791_info@GOTPCREL(%rip), %rax
	movq	%rax, 24(%r14)
	movq	_INDIO_DIRECT_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r14)
	movq	_ad5791_channels@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movq	%r15, %rdi
	callq	_spi_get_device_id
	movq	(%rax), %rax
	leaq	(%rbx,%rax,4), %rax
	movq	%rax, 8(%r14)
	movl	$1, (%r14)
	movq	32(%r13), %rdi
	callq	_spi_get_device_id
	movl	8(%rax), %eax
	movl	%eax, 4(%r14)
	movq	%r14, %rdi
	callq	_iio_device_register
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_20
LBB0_21:
	movq	24(%r13), %rdi
	callq	_IS_ERR
	testl	%eax, %eax
	jne	LBB0_23
## %bb.22:
	movq	24(%r13), %rdi
	callq	_regulator_disable
LBB0_23:
	movq	16(%r13), %rdi
	callq	_IS_ERR
	testl	%eax, %eax
	jne	LBB0_25
## %bb.24:
	movq	16(%r13), %rdi
	callq	_regulator_disable
LBB0_25:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	xorl	%ebx, %ebx
	jmp	LBB0_25
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"vdd"

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

L_.str.2:                               ## @.str.2
	.asciz	"reference voltage unspecified\n"

	.comm	_AD5791_ADDR_SW_CTRL,4,2        ## @AD5791_ADDR_SW_CTRL
	.comm	_AD5791_SWCTRL_RESET,4,2        ## @AD5791_SWCTRL_RESET
	.comm	_ad5791_chip_info_tbl,8,3       ## @ad5791_chip_info_tbl
	.comm	_AD5791_CTRL_RBUF,4,2           ## @AD5791_CTRL_RBUF
	.comm	_AD5791_CTRL_BIN2SC,4,2         ## @AD5791_CTRL_BIN2SC
	.comm	_AD5791_ADDR_CTRL,4,2           ## @AD5791_ADDR_CTRL
	.comm	_AD5791_CTRL_OPGND,4,2          ## @AD5791_CTRL_OPGND
	.comm	_AD5791_CTRL_DACTRI,4,2         ## @AD5791_CTRL_DACTRI
	.comm	_ad5791_info,4,2                ## @ad5791_info
	.comm	_INDIO_DIRECT_MODE,4,2          ## @INDIO_DIRECT_MODE
	.comm	_ad5791_channels,8,3            ## @ad5791_channels
	.no_dead_strip	_ad5791_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ad5791_probe
_ad5791_probe:                          ; @ad5791_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, x0
	ldr	x24, [x0]
	mov	w1, #48
	bl	_devm_iio_device_alloc
	cbz	x0, LBB0_9
; %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	x0, [x19, #16]
	bl	_IS_ERR
	cbz	w0, LBB0_10
; %bb.2:
	mov	w23, #0
LBB0_3:
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_devm_regulator_get
	str	x0, [x19, #24]
	bl	_IS_ERR
	cbz	w0, LBB0_12
; %bb.4:
	mov	w22, #0
LBB0_5:
	mov	w8, #1
	str	w8, [x19]
	str	x21, [x19, #32]
	ldr	x0, [x19, #24]
	bl	_IS_ERR
	cbnz	w0, LBB0_7
; %bb.6:
	ldr	x0, [x19, #16]
	bl	_IS_ERR
	cbz	w0, LBB0_15
LBB0_7:
	cbz	x24, LBB0_14
; %bb.8:
	ldp	w8, w9, [x24]
	add	w8, w9, w8
	b	LBB0_16
LBB0_9:
Lloh4:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_28
LBB0_10:
	ldr	x0, [x19, #16]
	bl	_regulator_enable
	mov	x22, x0
	cbnz	w0, LBB0_28
; %bb.11:
	ldr	x0, [x19, #16]
	bl	_regulator_get_voltage
	mov	x23, x0
	mov	x22, x0
	tbz	w0, #31, LBB0_3
	b	LBB0_26
LBB0_12:
	ldr	x0, [x19, #24]
	bl	_regulator_enable
	mov	x22, x0
	cbnz	w0, LBB0_26
; %bb.13:
	ldr	x0, [x19, #24]
	bl	_regulator_get_voltage
	mov	x22, x0
	tbz	w0, #31, LBB0_5
	b	LBB0_24
LBB0_14:
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x21
	bl	_dev_warn
	b	LBB0_17
LBB0_15:
	add	w8, w22, w23
	mov	w9, #19923
	movk	w9, #4194, lsl #16
	umull	x8, w8, w9
	lsr	x8, x8, #38
	umull	x9, w22, w9
	lsr	x9, x9, #38
LBB0_16:
	stp	w8, w9, [x19, #4]
LBB0_17:
Lloh9:
	adrp	x8, _AD5791_ADDR_SW_CTRL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AD5791_ADDR_SW_CTRL@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
Lloh12:
	adrp	x8, _AD5791_SWCTRL_RESET@GOTPAGE
Lloh13:
	ldr	x8, [x8, _AD5791_SWCTRL_RESET@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_ad5791_spi_write
	mov	x22, x0
	cbnz	w0, LBB0_24
; %bb.18:
Lloh15:
	adrp	x8, _ad5791_chip_info_tbl@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ad5791_chip_info_tbl@GOTPAGEOFF]
Lloh17:
	ldr	x22, [x8]
	mov	x0, x21
	bl	_spi_get_device_id
	ldr	x8, [x0]
	lsl	x8, x8, #3
	add	x9, x22, x8
	str	x9, [x19, #40]
	ldr	x8, [x22, x8]
	ldr	w0, [x19, #4]
	blr	x8
	bl	_AD5761_CTRL_LINCOMP
	cbz	x24, LBB0_21
; %bb.19:
	ldr	x8, [x24, #8]
	cbz	x8, LBB0_21
; %bb.20:
	mov	w8, #0
	b	LBB0_22
LBB0_21:
Lloh18:
	adrp	x8, _AD5791_CTRL_RBUF@GOTPAGE
Lloh19:
	ldr	x8, [x8, _AD5791_CTRL_RBUF@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
LBB0_22:
	orr	w8, w8, w0
Lloh21:
	adrp	x9, _AD5791_CTRL_BIN2SC@GOTPAGE
Lloh22:
	ldr	x9, [x9, _AD5791_CTRL_BIN2SC@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [x19, #12]
Lloh24:
	adrp	x9, _AD5791_ADDR_CTRL@GOTPAGE
Lloh25:
	ldr	x9, [x9, _AD5791_ADDR_CTRL@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x9]
Lloh27:
	adrp	x9, _AD5791_CTRL_OPGND@GOTPAGE
Lloh28:
	ldr	x9, [x9, _AD5791_CTRL_OPGND@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh30:
	adrp	x9, _AD5791_CTRL_DACTRI@GOTPAGE
Lloh31:
	ldr	x9, [x9, _AD5791_CTRL_DACTRI@GOTPAGEOFF]
Lloh32:
	ldr	w9, [x9]
	orr	w2, w8, w9
	mov	x0, x19
	bl	_ad5791_spi_write
	mov	x22, x0
	cbnz	w0, LBB0_24
; %bb.23:
	mov	x0, x21
	mov	x1, x20
	bl	_spi_set_drvdata
Lloh33:
	adrp	x8, _ad5791_info@GOTPAGE
Lloh34:
	ldr	x8, [x8, _ad5791_info@GOTPAGEOFF]
Lloh35:
	adrp	x9, _INDIO_DIRECT_MODE@GOTPAGE
Lloh36:
	ldr	x9, [x9, _INDIO_DIRECT_MODE@GOTPAGEOFF]
	stp	x8, x21, [x20, #24]
Lloh37:
	ldr	w8, [x9]
	str	w8, [x20, #16]
Lloh38:
	adrp	x8, _ad5791_channels@GOTPAGE
Lloh39:
	ldr	x8, [x8, _ad5791_channels@GOTPAGEOFF]
Lloh40:
	ldr	x22, [x8]
	mov	x0, x21
	bl	_spi_get_device_id
	ldr	x8, [x0]
	add	x8, x22, x8, lsl #2
	str	x8, [x20, #8]
	mov	w8, #1
	str	w8, [x20]
	ldr	x0, [x19, #32]
	bl	_spi_get_device_id
	ldr	w8, [x0, #8]
	str	w8, [x20, #4]
	mov	x0, x20
	bl	_iio_device_register
	mov	x22, x0
	cbz	w0, LBB0_28
LBB0_24:
	ldr	x0, [x19, #24]
	bl	_IS_ERR
	cbnz	w0, LBB0_26
; %bb.25:
	ldr	x0, [x19, #24]
	bl	_regulator_disable
LBB0_26:
	ldr	x0, [x19, #16]
	bl	_IS_ERR
	cbnz	w0, LBB0_28
; %bb.27:
	ldr	x0, [x19, #16]
	bl	_regulator_disable
LBB0_28:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGot	Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"vdd"

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

l_.str.2:                               ; @.str.2
	.asciz	"reference voltage unspecified\n"

	.comm	_AD5791_ADDR_SW_CTRL,4,2        ; @AD5791_ADDR_SW_CTRL
	.comm	_AD5791_SWCTRL_RESET,4,2        ; @AD5791_SWCTRL_RESET
	.comm	_ad5791_chip_info_tbl,8,3       ; @ad5791_chip_info_tbl
	.comm	_AD5791_CTRL_RBUF,4,2           ; @AD5791_CTRL_RBUF
	.comm	_AD5791_CTRL_BIN2SC,4,2         ; @AD5791_CTRL_BIN2SC
	.comm	_AD5791_ADDR_CTRL,4,2           ; @AD5791_ADDR_CTRL
	.comm	_AD5791_CTRL_OPGND,4,2          ; @AD5791_CTRL_OPGND
	.comm	_AD5791_CTRL_DACTRI,4,2         ; @AD5791_CTRL_DACTRI
	.comm	_ad5791_info,4,2                ; @ad5791_info
	.comm	_INDIO_DIRECT_MODE,4,2          ; @INDIO_DIRECT_MODE
	.comm	_ad5791_channels,8,3            ; @ad5791_channels
	.no_dead_strip	_ad5791_probe
.subsections_via_symbols
