	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function at91_ts_register
_at91_ts_register:                      ## @at91_ts_register
	.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
	movq	%rsi, %r15
	movq	%rdi, %r14
	callq	_iio_priv_to_dev
	movq	%rax, %r13
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_input_allocate_device
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r12
	movq	_DRIVER_NAME@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%r12)
	movq	_BUS_HOST@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%r12)
	movq	%r15, 16(%r12)
	movq	_atmel_ts_open@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r12)
	movq	_atmel_ts_close@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r12)
	movq	_EV_ABS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	4(%r12), %esi
	callq	___set_bit
	movq	_EV_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	4(%r12), %esi
	callq	___set_bit
	movq	_BTN_TOUCH@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r12), %esi
	callq	___set_bit
	movq	16(%r14), %rax
	cmpq	$0, (%rax)
	je	LBB0_4
## %bb.3:
	movq	_ABS_X@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MAX_POS_BITS@GOTPCREL(%rip), %r15
	movb	(%r15), %cl
	movl	$-1, %ebx
	movl	$-1, %eax
	shll	%cl, %eax
	notl	%eax
	movq	%r12, %rdi
	xorl	%edx, %edx
	movl	%eax, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_input_set_abs_params
	movq	_ABS_Y@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movb	(%r15), %cl
	shll	%cl, %ebx
	notl	%ebx
	movq	%r12, %rdi
	xorl	%edx, %edx
	movl	%ebx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_input_set_abs_params
	movq	_ABS_PRESSURE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	xorl	%edx, %edx
	movl	$16777215, %ecx                 ## imm = 0xFFFFFF
	jmp	LBB0_8
LBB0_1:
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdi
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_10
LBB0_4:
	movq	(%r14), %rax
	movq	_ATMEL_ADC_TOUCHSCREEN_4WIRE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.7:
	movq	_ABS_X@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MAX_RLPOS_BITS@GOTPCREL(%rip), %r15
	movb	(%r15), %cl
	movl	$-1, %ebx
	movl	$-1, %eax
	shll	%cl, %eax
	notl	%eax
	movq	%r12, %rdi
	xorl	%edx, %edx
	movl	%eax, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_input_set_abs_params
	movq	_ABS_Y@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movb	(%r15), %cl
	shll	%cl, %ebx
	notl	%ebx
	movq	%r12, %rdi
	xorl	%edx, %edx
	movl	%ebx, %ecx
LBB0_8:
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_input_set_abs_params
	movq	%r12, 8(%r14)
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_input_set_drvdata
	movq	%r12, %rdi
	callq	_input_register_device
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_6
## %bb.9:
	xorl	%ebx, %ebx
	jmp	LBB0_10
LBB0_5:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_6:
	movq	8(%r14), %rdi
	callq	_input_free_device
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to allocate TS device!\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_DRIVER_NAME,4,2                ## @DRIVER_NAME
	.comm	_BUS_HOST,4,2                   ## @BUS_HOST
	.comm	_atmel_ts_open,4,2              ## @atmel_ts_open
	.comm	_atmel_ts_close,4,2             ## @atmel_ts_close
	.comm	_EV_ABS,4,2                     ## @EV_ABS
	.comm	_EV_KEY,4,2                     ## @EV_KEY
	.comm	_BTN_TOUCH,4,2                  ## @BTN_TOUCH
	.comm	_ABS_X,4,2                      ## @ABS_X
	.comm	_MAX_POS_BITS,4,2               ## @MAX_POS_BITS
	.comm	_ABS_Y,4,2                      ## @ABS_Y
	.comm	_ABS_PRESSURE,4,2               ## @ABS_PRESSURE
	.comm	_ATMEL_ADC_TOUCHSCREEN_4WIRE,8,3 ## @ATMEL_ADC_TOUCHSCREEN_4WIRE
L_.str.1:                               ## @.str.1
	.asciz	"This touchscreen controller only support 4 wires\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_MAX_RLPOS_BITS,4,2             ## @MAX_RLPOS_BITS
	.no_dead_strip	_at91_ts_register
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function at91_ts_register
_at91_ts_register:                      ; @at91_ts_register
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x21, x1
	mov	x19, x0
	bl	_iio_priv_to_dev
	mov	x22, x0
	bl	_input_allocate_device
	cbz	x0, LBB0_3
; %bb.1:
	mov	x20, x0
Lloh0:
	adrp	x8, _DRIVER_NAME@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DRIVER_NAME@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _BUS_HOST@GOTPAGE
Lloh4:
	ldr	x9, [x9, _BUS_HOST@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	stp	w9, w8, [x0, #24]
	str	x21, [x0, #16]
Lloh6:
	adrp	x8, _atmel_ts_open@GOTPAGE
Lloh7:
	ldr	x8, [x8, _atmel_ts_open@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _atmel_ts_close@GOTPAGE
Lloh10:
	ldr	x9, [x9, _atmel_ts_close@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	stp	w9, w8, [x0, #8]
Lloh12:
	adrp	x8, _EV_ABS@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EV_ABS@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	ldr	w1, [x20, #4]
	bl	___set_bit
Lloh15:
	adrp	x8, _EV_KEY@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EV_KEY@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	ldr	w1, [x20, #4]
	bl	___set_bit
Lloh18:
	adrp	x8, _BTN_TOUCH@GOTPAGE
Lloh19:
	ldr	x8, [x8, _BTN_TOUCH@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	ldr	w1, [x20]
	bl	___set_bit
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	cbz	x8, LBB0_4
; %bb.2:
Lloh21:
	adrp	x8, _ABS_X@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ABS_X@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
Lloh24:
	adrp	x21, _MAX_POS_BITS@GOTPAGE
Lloh25:
	ldr	x21, [x21, _MAX_POS_BITS@GOTPAGEOFF]
	ldr	w8, [x21]
	mov	w22, #-1
	lsl	w8, w22, w8
	mvn	w3, w8
	mov	x0, x20
	mov	w2, #0
	mov	w4, #0
	mov	w5, #0
	bl	_input_set_abs_params
Lloh26:
	adrp	x8, _ABS_Y@GOTPAGE
Lloh27:
	ldr	x8, [x8, _ABS_Y@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	ldr	w8, [x21]
	lsl	w8, w22, w8
	mvn	w3, w8
	mov	x0, x20
	mov	w2, #0
	mov	w4, #0
	mov	w5, #0
	bl	_input_set_abs_params
Lloh29:
	adrp	x8, _ABS_PRESSURE@GOTPAGE
Lloh30:
	ldr	x8, [x8, _ABS_PRESSURE@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #0
	mov	w3, #16777215
	b	LBB0_6
LBB0_3:
Lloh32:
	adrp	x1, l_.str@PAGE
Lloh33:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	bl	_dev_err
Lloh34:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh35:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh36:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_9
LBB0_4:
	ldr	x8, [x19]
Lloh37:
	adrp	x9, _ATMEL_ADC_TOUCHSCREEN_4WIRE@GOTPAGE
Lloh38:
	ldr	x9, [x9, _ATMEL_ADC_TOUCHSCREEN_4WIRE@GOTPAGEOFF]
Lloh39:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.5:
Lloh40:
	adrp	x8, _ABS_X@GOTPAGE
Lloh41:
	ldr	x8, [x8, _ABS_X@GOTPAGEOFF]
Lloh42:
	ldr	w1, [x8]
Lloh43:
	adrp	x21, _MAX_RLPOS_BITS@GOTPAGE
Lloh44:
	ldr	x21, [x21, _MAX_RLPOS_BITS@GOTPAGEOFF]
	ldr	w8, [x21]
	mov	w22, #-1
	lsl	w8, w22, w8
	mvn	w3, w8
	mov	x0, x20
	mov	w2, #0
	mov	w4, #0
	mov	w5, #0
	bl	_input_set_abs_params
Lloh45:
	adrp	x8, _ABS_Y@GOTPAGE
Lloh46:
	ldr	x8, [x8, _ABS_Y@GOTPAGEOFF]
Lloh47:
	ldr	w1, [x8]
	ldr	w8, [x21]
	lsl	w8, w22, w8
	mvn	w3, w8
	mov	x0, x20
	mov	w2, #0
LBB0_6:
	mov	w4, #0
	mov	w5, #0
	bl	_input_set_abs_params
	str	x20, [x19, #8]
	mov	x0, x20
	mov	x1, x19
	bl	_input_set_drvdata
	mov	x0, x20
	bl	_input_register_device
	mov	x20, x0
	cbnz	w0, LBB0_8
	b	LBB0_9
LBB0_7:
Lloh48:
	adrp	x1, l_.str.1@PAGE
Lloh49:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_dev_err
Lloh50:
	adrp	x8, _EINVAL@GOTPAGE
Lloh51:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh52:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_8:
	ldr	x0, [x19, #8]
	bl	_input_free_device
LBB0_9:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGot	Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpAdd	Lloh48, Lloh49
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to allocate TS device!\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_DRIVER_NAME,4,2                ; @DRIVER_NAME
	.comm	_BUS_HOST,4,2                   ; @BUS_HOST
	.comm	_atmel_ts_open,4,2              ; @atmel_ts_open
	.comm	_atmel_ts_close,4,2             ; @atmel_ts_close
	.comm	_EV_ABS,4,2                     ; @EV_ABS
	.comm	_EV_KEY,4,2                     ; @EV_KEY
	.comm	_BTN_TOUCH,4,2                  ; @BTN_TOUCH
	.comm	_ABS_X,4,2                      ; @ABS_X
	.comm	_MAX_POS_BITS,4,2               ; @MAX_POS_BITS
	.comm	_ABS_Y,4,2                      ; @ABS_Y
	.comm	_ABS_PRESSURE,4,2               ; @ABS_PRESSURE
	.comm	_ATMEL_ADC_TOUCHSCREEN_4WIRE,8,3 ; @ATMEL_ADC_TOUCHSCREEN_4WIRE
l_.str.1:                               ; @.str.1
	.asciz	"This touchscreen controller only support 4 wires\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_MAX_RLPOS_BITS,4,2             ; @MAX_RLPOS_BITS
	.no_dead_strip	_at91_ts_register
.subsections_via_symbols
