	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ti_ads7950_get
_ti_ads7950_get:                        ## @ti_ads7950_get
	.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
	movl	%esi, %r12d
	callq	_gpiochip_get_data
	movq	%rax, %r13
	movq	%rax, %r15
	leaq	12(%rax), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movl	(%r13), %ebx
	movl	%r12d, %edi
	callq	_BIT
	testl	%ebx, %eax
	je	LBB0_2
## %bb.1:
	movl	4(%r15), %r15d
	movl	%r12d, %edi
	callq	_BIT
	movl	%eax, %ebx
	andl	%r15d, %ebx
	jmp	LBB0_4
LBB0_2:
	movq	_TI_ADS7950_CR_GPIO_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 4(%r15)
	movq	%r15, %rdi
	callq	_TI_ADS7950_MAN_CMD_SETTINGS
	movq	%rax, 24(%r15)
	movl	20(%r15), %edi
	addq	$16, %r13
	movq	%r13, %rsi
	callq	_spi_sync
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	movl	%r12d, %edi
	callq	_BIT
	movq	_TI_ADS7950_CR_GPIO_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, 4(%r15)
	movq	%r15, %rdi
	callq	_TI_ADS7950_MAN_CMD_SETTINGS
	movq	%rax, 24(%r15)
	movl	20(%r15), %edi
	movq	%r13, %rsi
	callq	_spi_sync
	movl	%eax, %ebx
LBB0_4:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TI_ADS7950_CR_GPIO_DATA,4,2    ## @TI_ADS7950_CR_GPIO_DATA
	.no_dead_strip	_ti_ads7950_get
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ti_ads7950_get
_ti_ads7950_get:                        ; @ti_ads7950_get
	.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
	bl	_gpiochip_get_data
	mov	x20, x0
	add	x19, x0, #12
	mov	x0, x19
	bl	_mutex_lock
	ldr	w22, [x20]
	mov	x0, x21
	bl	_BIT
	tst	w0, w22
	b.eq	LBB0_2
; %bb.1:
	ldr	w20, [x20, #4]
	mov	x0, x21
	bl	_BIT
	and	w23, w0, w20
	b	LBB0_4
LBB0_2:
Lloh0:
	adrp	x24, _TI_ADS7950_CR_GPIO_DATA@GOTPAGE
Lloh1:
	ldr	x24, [x24, _TI_ADS7950_CR_GPIO_DATA@GOTPAGEOFF]
	ldr	w8, [x24]
	ldr	w9, [x20, #4]
	orr	w8, w9, w8
	str	w8, [x20, #4]
	mov	x0, x20
	bl	_TI_ADS7950_MAN_CMD_SETTINGS
	str	x0, [x20, #24]
	ldr	w0, [x20, #20]
	add	x22, x20, #16
	mov	x1, x22
	bl	_spi_sync
	mov	x23, x0
	cbnz	w0, LBB0_4
; %bb.3:
	mov	x0, x21
	bl	_BIT
	ldr	w8, [x24]
	ldr	w9, [x20, #4]
	bic	w8, w9, w8
	str	w8, [x20, #4]
	mov	x0, x20
	bl	_TI_ADS7950_MAN_CMD_SETTINGS
	str	x0, [x20, #24]
	ldr	w0, [x20, #20]
	mov	x1, x22
	bl	_spi_sync
	mov	x23, x0
LBB0_4:
	mov	x0, x19
	bl	_mutex_unlock
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_TI_ADS7950_CR_GPIO_DATA,4,2    ; @TI_ADS7950_CR_GPIO_DATA
	.no_dead_strip	_ti_ads7950_get
.subsections_via_symbols
