	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mcp320x_probe
_mcp320x_probe:                         ## @mcp320x_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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	leaq	4(%rdi), %r14
	movq	%r14, %rdi
	movl	$80, %esi
	callq	_devm_iio_device_alloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rdi
	movq	%rax, %rbx
	callq	_iio_priv
	movq	%rax, %r12
	movq	%r15, 72(%rax)
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	movq	%r14, 32(%rbx)
	movl	4(%r15), %eax
	movl	%eax, 24(%rbx)
	movq	%r15, %rdi
	callq	_spi_get_device_id
	movl	4(%rax), %eax
	movl	%eax, 20(%rbx)
	movq	_INDIO_DIRECT_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	movq	_mcp320x_info@GOTPCREL(%rip), %rax
	movq	%rax, 8(%rbx)
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_spi_set_drvdata
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	callq	_spi_get_device_id
	movslq	(%rax), %rcx
	movq	_mcp320x_chip_infos@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	leaq	(%rcx,%rcx,2), %r14
	leaq	(%r13,%r14,4), %rax
	movl	8(%r13,%r14,4), %ecx
	movl	%ecx, 4(%rbx)
	movl	(%r13,%r14,4), %ecx
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	movl	%ecx, (%rbx)
	movq	%rax, 64(%r12)
	leaq	56(%r12), %rax
	movq	40(%r12), %rcx
	movq	%rax, 16(%rcx)
	movl	$4, (%rcx)
	movl	52(%r12), %eax
	movl	%eax, 32(%rcx)
	movl	4(%r13,%r14,4), %edi
	movl	$8, %esi
	callq	_DIV_ROUND_UP
	movq	40(%r12), %r15
	movl	%eax, 24(%r15)
	leaq	48(%r12), %rbx
	cmpl	$1, (%r13,%r14,4)
	jne	LBB0_4
## %bb.3:
	addq	$24, %r15
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movl	$1, %edx
	jmp	LBB0_5
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_14
LBB0_4:
	movq	%r15, %rdi
	callq	_ARRAY_SIZE
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movl	%eax, %edx
LBB0_5:
	callq	_spi_message_init_with_transfers
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movl	%ebx, %eax
	andl	$-4, %eax
	cmpl	$128, %eax
	jne	LBB0_9
## %bb.6:
	movq	_SPI_CPOL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rcx)
	jne	LBB0_8
## %bb.7:
	movq	40(%r12), %rax
	incl	24(%rax)
LBB0_8:
	leaq	8(%r12), %rsi
	movl	$8, 12(%r12)
	leaq	32(%r12), %rdi
	movl	$1, %edx
	callq	_spi_message_init_with_transfers
	leaq	-44(%rbp), %r15
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	$1, %edx
	movl	%ebx, %ecx
	movq	%r15, %r8
	callq	_mcp320x_adc_conversion
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	$1, %edx
	movl	%ebx, %ecx
	movq	%r15, %r8
	callq	_mcp320x_adc_conversion
LBB0_9:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_devm_regulator_get
	movl	%eax, (%r12)
	movl	%eax, %edi
	callq	_IS_ERR
	movl	(%r12), %edi
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	callq	_PTR_ERR
LBB0_14:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	callq	_regulator_enable
	movl	%eax, -44(%rbp)
	testl	%eax, %eax
	js	LBB0_14
## %bb.12:
	movq	%r12, %rdi
	addq	$4, %rdi
	callq	_mutex_init
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	callq	_iio_device_register
	movl	%eax, %ecx
	movl	%eax, -44(%rbp)
	xorl	%eax, %eax
	testl	%ecx, %ecx
	jns	LBB0_14
## %bb.13:
	movl	(%r12), %edi
	callq	_regulator_disable
	movl	-44(%rbp), %eax
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_INDIO_DIRECT_MODE,4,2          ## @INDIO_DIRECT_MODE
	.comm	_mcp320x_info,4,2               ## @mcp320x_info
	.comm	_mcp320x_chip_infos,8,3         ## @mcp320x_chip_infos
	.comm	_SPI_CPOL,4,2                   ## @SPI_CPOL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"vref"

	.no_dead_strip	_mcp320x_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mcp320x_probe
_mcp320x_probe:                         ; @mcp320x_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x22, x0
	add	x21, x0, #4
	mov	x0, x21
	mov	w1, #80
	bl	_devm_iio_device_alloc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x0
	bl	_iio_priv
	mov	x20, x0
	str	x22, [x0, #72]
	str	x21, [x19, #32]
	ldr	w8, [x22, #4]
	str	w8, [x19, #24]
	mov	x0, x22
	bl	_spi_get_device_id
	ldr	w8, [x0, #4]
Lloh0:
	adrp	x9, _INDIO_DIRECT_MODE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _INDIO_DIRECT_MODE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #16]
Lloh3:
	adrp	x8, _mcp320x_info@GOTPAGE
Lloh4:
	ldr	x8, [x8, _mcp320x_info@GOTPAGEOFF]
	str	x8, [x19, #8]
	mov	x0, x22
	mov	x1, x19
	bl	_spi_set_drvdata
	mov	x0, x22
	bl	_spi_get_device_id
	ldrsw	x23, [x0]
Lloh5:
	adrp	x8, _mcp320x_chip_infos@GOTPAGE
Lloh6:
	ldr	x8, [x8, _mcp320x_chip_infos@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	mov	w9, #12
	madd	x25, x23, x9, x8
	ldr	w8, [x25, #8]
	add	x9, x20, #56
	ldr	x10, [x20, #40]
	str	x9, [x10, #16]
	mov	w9, #4
	str	w9, [x10]
	ldr	w9, [x20, #52]
	str	w9, [x10, #32]
	ldp	w9, w0, [x25]
	stp	w9, w8, [x19]
	str	x25, [x20, #64]
	mov	w1, #8
	bl	_DIV_ROUND_UP
	ldr	x24, [x20, #40]
	str	w0, [x24, #24]
	ldr	w8, [x25]
	add	x25, x20, #48
	cmp	w8, #1
	b.ne	LBB0_4
; %bb.2:
	add	x1, x24, #24
	mov	x0, x25
	mov	w2, #1
	b	LBB0_5
LBB0_3:
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_11
LBB0_4:
	mov	x0, x24
	bl	_ARRAY_SIZE
	mov	x2, x0
	mov	x0, x25
	mov	x1, x24
LBB0_5:
	bl	_spi_message_init_with_transfers
	and	w8, w23, #0xfffffffc
	cmp	w8, #128
	b.ne	LBB0_9
; %bb.6:
	ldr	w8, [x22]
Lloh11:
	adrp	x9, _SPI_CPOL@GOTPAGE
Lloh12:
	ldr	x9, [x9, _SPI_CPOL@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_8
; %bb.7:
	ldr	x8, [x20, #40]
	ldr	w9, [x8, #24]
	add	w9, w9, #1
	str	w9, [x8, #24]
LBB0_8:
	add	x1, x20, #8
	mov	w8, #8
	str	w8, [x20, #12]
	add	x0, x20, #32
	mov	w2, #1
	bl	_spi_message_init_with_transfers
	add	x4, sp, #12
	mov	x0, x20
	mov	w1, #0
	mov	w2, #1
	mov	x3, x23
	bl	_mcp320x_adc_conversion
	add	x4, sp, #12
	mov	x0, x20
	mov	w1, #0
	mov	w2, #1
	mov	x3, x23
	bl	_mcp320x_adc_conversion
LBB0_9:
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_devm_regulator_get
	str	w0, [x20]
	bl	_IS_ERR
	mov	x8, x0
	ldr	w0, [x20]
	cbz	x8, LBB0_12
; %bb.10:
	bl	_PTR_ERR
LBB0_11:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_12:
	bl	_regulator_enable
	str	w0, [sp, #12]
	tbnz	w0, #31, LBB0_11
; %bb.13:
	add	x0, x20, #4
	bl	_mutex_init
	mov	x0, x19
	bl	_iio_device_register
	str	w0, [sp, #12]
	tbnz	w0, #31, LBB0_15
; %bb.14:
	mov	w0, #0
	b	LBB0_11
LBB0_15:
	ldr	w0, [x20]
	bl	_regulator_disable
	ldr	w0, [sp, #12]
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_INDIO_DIRECT_MODE,4,2          ; @INDIO_DIRECT_MODE
	.comm	_mcp320x_info,4,2               ; @mcp320x_info
	.comm	_mcp320x_chip_infos,8,3         ; @mcp320x_chip_infos
	.comm	_SPI_CPOL,4,2                   ; @SPI_CPOL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"vref"

	.no_dead_strip	_mcp320x_probe
.subsections_via_symbols
