	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ads7846_read12_ser
_ads7846_read12_ser:                    ## @ads7846_read12_ser
	.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
	movl	%esi, %r13d
	movq	%rdi, %rbx
	callq	_to_spi_device
	movq	%rax, %r12
	movq	%rbx, %rdi
	callq	_dev_get_drvdata
	movq	%rax, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$48, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	movq	%r12, %rbx
	leaq	4(%rax), %r12
	movq	%r12, %rdi
	callq	_spi_message_init
	cmpq	$0, 8(%r14)
	je	LBB0_4
## %bb.3:
	movq	_REF_ON@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	leaq	40(%r15), %rcx
	movq	%rax, 40(%r15)
	movq	8(%r15), %rdi
	movq	%rcx, 16(%rdi)
	movl	$1, (%rdi)
	movq	%r12, %rsi
	callq	_spi_message_add_tail
	leaq	16(%r15), %rax
	movq	8(%r15), %rcx
	leaq	32(%rcx), %rdi
	movq	%rax, 40(%rcx)
	movl	$2, 32(%rcx)
	movl	4(%r14), %eax
	movl	%eax, 56(%rcx)
	movq	%r12, %rsi
	callq	_spi_message_add_tail
	movq	_ADS_PD10_REF_ON@GOTPCREL(%rip), %rax
	orl	(%rax), %r13d
LBB0_4:
	movq	_ADS_PD10_ADC_ON@GOTPCREL(%rip), %rax
	orl	(%rax), %r13d
	leaq	32(%r15), %rax
	movq	%r13, 32(%r15)
	movq	8(%r15), %rcx
	leaq	64(%rcx), %rdi
	movq	%rax, 80(%rcx)
	movl	$1, 64(%rcx)
	movq	%r12, %rsi
	callq	_spi_message_add_tail
	movq	8(%r15), %rax
	leaq	96(%rax), %rdi
	movq	%r15, 104(%rax)
	movl	$2, 96(%rax)
	movq	%r12, %rsi
	callq	_spi_message_add_tail
	movq	_PWRDOWN@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	leaq	24(%r15), %rcx
	movq	%rax, 24(%r15)
	movq	8(%r15), %rax
	leaq	128(%rax), %rdi
	movq	%rcx, 144(%rax)
	movl	$1, 128(%rax)
	movq	%r12, %rsi
	callq	_spi_message_add_tail
	movq	%r15, %rax
	addq	$16, %rax
	movq	8(%r15), %rcx
	movq	%rax, 168(%rcx)
	movl	$2, 160(%rcx)
	movups	160(%rcx), %xmm0
	movups	176(%rcx), %xmm1
	movups	%xmm1, 16(%rsp)
	movups	%xmm0, (%rsp)
	callq	_CS_CHANGE
	movl	$160, %edi
	addq	8(%r15), %rdi
	movq	%r12, %rsi
	callq	_spi_message_add_tail
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	%r14, %rdi
	callq	_ads7846_stop
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_spi_sync
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_ads7846_restart
	movq	%r14, %rdi
	callq	_mutex_unlock
	testl	%ebx, %ebx
	jne	LBB0_6
## %bb.5:
	movl	(%r15), %edi
	callq	_be16_to_cpu
	movl	%eax, %ebx
	shrl	$3, %ebx
	andl	$4095, %ebx                     ## imm = 0xFFF
LBB0_6:
	movq	%r15, %rdi
	callq	_kfree
	jmp	LBB0_7
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_7:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_REF_ON,8,3                     ## @REF_ON
	.comm	_ADS_PD10_REF_ON,4,2            ## @ADS_PD10_REF_ON
	.comm	_ADS_PD10_ADC_ON,4,2            ## @ADS_PD10_ADC_ON
	.comm	_PWRDOWN,8,3                    ## @PWRDOWN
	.no_dead_strip	_ads7846_read12_ser
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ads7846_read12_ser
_ads7846_read12_ser:                    ; @ads7846_read12_ser
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x23, x1
	mov	x19, x0
	bl	_to_spi_device
	mov	x21, x0
	mov	x0, x19
	bl	_dev_get_drvdata
	mov	x20, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #48
	bl	_kzalloc
	cbz	x0, LBB0_6
; %bb.1:
	mov	x19, x0
	add	x22, x0, #4
	mov	x0, x22
	bl	_spi_message_init
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_3
; %bb.2:
Lloh3:
	adrp	x8, _REF_ON@GOTPAGE
Lloh4:
	ldr	x8, [x8, _REF_ON@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	mov	x24, x19
	str	x8, [x24, #40]!
	ldur	x0, [x24, #-32]
	str	x24, [x0, #16]
	mov	w8, #1
	str	w8, [x0]
	mov	x1, x22
	bl	_spi_message_add_tail
	sub	x8, x24, #24
	ldur	x0, [x24, #-32]
	mov	w9, #2
	str	w9, [x0, #32]!
	str	x8, [x0, #8]
	ldr	w8, [x20, #4]
	str	w8, [x0, #24]
	mov	x1, x22
	bl	_spi_message_add_tail
Lloh6:
	adrp	x8, _ADS_PD10_REF_ON@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ADS_PD10_REF_ON@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	orr	w23, w8, w23
LBB0_3:
Lloh9:
	adrp	x8, _ADS_PD10_ADC_ON@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ADS_PD10_ADC_ON@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	orr	w8, w8, w23
	mov	x9, x19
	str	x8, [x9, #32]!
	ldr	x0, [x19, #8]
	mov	w23, #1
	str	w23, [x0, #64]!
	str	x9, [x0, #16]
	mov	x1, x22
	bl	_spi_message_add_tail
	ldr	x0, [x19, #8]
	mov	w24, #2
	str	w24, [x0, #96]!
	str	x19, [x0, #8]
	mov	x1, x22
	bl	_spi_message_add_tail
Lloh12:
	adrp	x8, _PWRDOWN@GOTPAGE
Lloh13:
	ldr	x8, [x8, _PWRDOWN@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	mov	x25, x19
	str	x8, [x25, #24]!
	ldr	x0, [x19, #8]
	str	w23, [x0, #128]!
	str	x25, [x0, #16]
	mov	x1, x22
	bl	_spi_message_add_tail
	sub	x8, x25, #8
	ldr	x9, [x19, #8]
	str	x8, [x9, #168]
	str	w24, [x9, #160]
	ldp	q0, q1, [x9, #160]
	stp	q0, q1, [sp]
	mov	x0, sp
	bl	_CS_CHANGE
	ldr	x8, [x19, #8]
	add	x0, x8, #160
	mov	x1, x22
	bl	_spi_message_add_tail
	mov	x0, x20
	bl	_mutex_lock
	mov	x0, x20
	bl	_ads7846_stop
	mov	x0, x21
	mov	x1, x22
	bl	_spi_sync
	mov	x21, x0
	mov	x0, x20
	bl	_ads7846_restart
	mov	x0, x20
	bl	_mutex_unlock
	cbnz	w21, LBB0_5
; %bb.4:
	ldr	w0, [x19]
	bl	_be16_to_cpu
	ubfx	w21, w0, #3, #12
LBB0_5:
	mov	x0, x19
	bl	_kfree
	b	LBB0_7
LBB0_6:
Lloh15:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_7:
	mov	x0, x21
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_REF_ON,8,3                     ; @REF_ON
	.comm	_ADS_PD10_REF_ON,4,2            ; @ADS_PD10_REF_ON
	.comm	_ADS_PD10_ADC_ON,4,2            ; @ADS_PD10_ADC_ON
	.comm	_PWRDOWN,8,3                    ; @PWRDOWN
	.no_dead_strip	_ads7846_read12_ser
.subsections_via_symbols
