	.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, %r12d
	movq	%rdi, %rbx
	callq	_to_spi_device
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_dev_get_drvdata
	movq	%rax, %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$48, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r13
	movl	%r12d, %ebx
	leaq	4(%rax), %r12
	movq	%r12, %rdi
	callq	_spi_message_init
	cmpl	$7846, (%r15)                   ## imm = 0x1EA6
	jne	LBB0_4
## %bb.3:
	movq	_REF_ON@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	leaq	40(%r13), %rcx
	movq	%rax, 40(%r13)
	movq	8(%r13), %rdi
	movq	%rcx, 16(%rdi)
	movl	$1, (%rdi)
	movq	%r12, %rsi
	callq	_spi_message_add_tail
	leaq	16(%r13), %rax
	movq	8(%r13), %rcx
	leaq	32(%rcx), %rdi
	movq	%rax, 40(%rcx)
	movl	$2, 32(%rcx)
	movl	8(%r15), %eax
	movl	%eax, 56(%rcx)
	movq	%r12, %rsi
	callq	_spi_message_add_tail
LBB0_4:
	movl	%ebx, %eax
	leaq	32(%r13), %rcx
	movq	%rax, 32(%r13)
	movq	8(%r13), %rax
	leaq	64(%rax), %rdi
	movq	%rcx, 80(%rax)
	movl	$1, 64(%rax)
	movq	%r12, %rsi
	callq	_spi_message_add_tail
	movq	8(%r13), %rax
	leaq	96(%rax), %rdi
	movq	%r13, 104(%rax)
	movl	$2, 96(%rax)
	movq	%r12, %rsi
	callq	_spi_message_add_tail
	movq	_PWRDOWN@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	leaq	24(%r13), %rcx
	movq	%rax, 24(%r13)
	movq	8(%r13), %rax
	leaq	128(%rax), %rdi
	movq	%rcx, 144(%rax)
	movl	$1, 128(%rax)
	movq	%r12, %rsi
	callq	_spi_message_add_tail
	movq	%r13, %rax
	addq	$16, %rax
	movq	8(%r13), %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(%r13), %rdi
	movq	%r12, %rsi
	callq	_spi_message_add_tail
	movl	$1, 4(%r15)
	movl	(%r14), %edi
	callq	_disable_irq
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_spi_sync
	movl	%eax, %ebx
	movl	$0, 4(%r15)
	movl	(%r14), %edi
	callq	_enable_irq
	testl	%ebx, %ebx
	jne	LBB0_6
## %bb.5:
	movl	(%r13), %edi
	callq	_be16_to_cpu
	movl	%eax, %ebx
	shrl	$3, %ebx
	andl	$4095, %ebx                     ## imm = 0xFFF
LBB0_6:
	movq	%r13, %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	_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	x20, x0
	mov	x0, x19
	bl	_dev_get_drvdata
	mov	x21, 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	w8, [x21]
	mov	w9, #7846
	cmp	w8, w9
	b.ne	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, [x21, #8]
	str	w8, [x0, #24]
	mov	x1, x22
	bl	_spi_message_add_tail
LBB0_3:
	mov	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
Lloh6:
	adrp	x8, _PWRDOWN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PWRDOWN@GOTPAGEOFF]
Lloh8:
	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
	str	w23, [x21, #4]
	ldr	w0, [x20]
	bl	_disable_irq
	mov	x0, x20
	mov	x1, x22
	bl	_spi_sync
	mov	x22, x0
	str	wzr, [x21, #4]
	ldr	w0, [x20]
	bl	_enable_irq
	cbnz	w22, LBB0_5
; %bb.4:
	ldr	w0, [x19]
	bl	_be16_to_cpu
	ubfx	w22, w0, #3, #12
LBB0_5:
	mov	x0, x19
	bl	_kfree
	b	LBB0_7
LBB0_6:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_7:
	mov	x0, x22
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_REF_ON,8,3                     ; @REF_ON
	.comm	_PWRDOWN,8,3                    ; @PWRDOWN
	.no_dead_strip	_ads7846_read12_ser
.subsections_via_symbols
