	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function surface3_spi_create_touch_input
_surface3_spi_create_touch_input:       ## @surface3_spi_create_touch_input
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	(%rdi), %rdi
	callq	_devm_input_allocate_device
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	%rax, 8(%r14)
	movq	_ABS_MT_POSITION_X@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	xorl	%r15d, %r15d
	movq	%rax, %rdi
	xorl	%edx, %edx
	movl	$9600, %ecx                     ## imm = 0x2580
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_input_set_abs_params
	movl	(%r12), %esi
	movq	%rbx, %rdi
	movl	$40, %edx
	callq	_input_abs_set_res
	movq	_ABS_MT_POSITION_Y@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	movl	$7200, %ecx                     ## imm = 0x1C20
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_input_set_abs_params
	movl	(%r12), %esi
	movq	%rbx, %rdi
	movl	$48, %edx
	callq	_input_abs_set_res
	movq	_ABS_MT_WIDTH_MAJOR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	movl	$1024, %ecx                     ## imm = 0x400
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_input_set_abs_params
	movq	_ABS_MT_WIDTH_MINOR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	movl	$1024, %ecx                     ## imm = 0x400
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_input_set_abs_params
	movq	_INPUT_MT_DIRECT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	$10, %esi
	callq	_input_mt_init_slots
	leaq	L_.str(%rip), %rax
	movq	%rax, (%rbx)
	leaq	L_.str.1(%rip), %rax
	movq	%rax, 8(%rbx)
	movq	_BUS_SPI@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%rbx)
	movabsq	$4294968414, %rax               ## imm = 0x10000045E
	movq	%rax, 16(%rbx)
	movl	$0, 24(%rbx)
	movq	%rbx, %rdi
	callq	_input_register_device
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %ebx
	movq	(%r14), %rdi
	leaq	L_.str.2(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_err
	movl	%ebx, %r15d
	jmp	LBB0_4
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_4:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_ABS_MT_POSITION_X,4,2          ## @ABS_MT_POSITION_X
	.comm	_ABS_MT_POSITION_Y,4,2          ## @ABS_MT_POSITION_Y
	.comm	_ABS_MT_WIDTH_MAJOR,4,2         ## @ABS_MT_WIDTH_MAJOR
	.comm	_ABS_MT_WIDTH_MINOR,4,2         ## @ABS_MT_WIDTH_MINOR
	.comm	_INPUT_MT_DIRECT,4,2            ## @INPUT_MT_DIRECT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Surface3 SPI Capacitive TouchScreen"

L_.str.1:                               ## @.str.1
	.asciz	"input/ts"

	.comm	_BUS_SPI,4,2                    ## @BUS_SPI
L_.str.2:                               ## @.str.2
	.asciz	"Failed to register input device: %d"

	.no_dead_strip	_surface3_spi_create_touch_input
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function surface3_spi_create_touch_input
lCPI0_0:
	.long	1118                            ; 0x45e
	.long	1                               ; 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_surface3_spi_create_touch_input:       ; @surface3_spi_create_touch_input
	.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	x19, x0
	ldr	x0, [x0]
	bl	_devm_input_allocate_device
	cbz	x0, LBB0_3
; %bb.1:
	mov	x20, x0
	str	x0, [x19, #8]
Lloh0:
	adrp	x21, _ABS_MT_POSITION_X@GOTPAGE
Lloh1:
	ldr	x21, [x21, _ABS_MT_POSITION_X@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	w2, #0
	mov	w3, #9600
	mov	w4, #0
	mov	w5, #0
	bl	_input_set_abs_params
	ldr	w1, [x21]
	mov	x0, x20
	mov	w2, #40
	bl	_input_abs_set_res
Lloh2:
	adrp	x21, _ABS_MT_POSITION_Y@GOTPAGE
Lloh3:
	ldr	x21, [x21, _ABS_MT_POSITION_Y@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x20
	mov	w2, #0
	mov	w3, #7200
	mov	w4, #0
	mov	w5, #0
	bl	_input_set_abs_params
	ldr	w1, [x21]
	mov	x0, x20
	mov	w2, #48
	bl	_input_abs_set_res
Lloh4:
	adrp	x8, _ABS_MT_WIDTH_MAJOR@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ABS_MT_WIDTH_MAJOR@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #0
	mov	w3, #1024
	mov	w4, #0
	mov	w5, #0
	bl	_input_set_abs_params
Lloh7:
	adrp	x8, _ABS_MT_WIDTH_MINOR@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ABS_MT_WIDTH_MINOR@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #0
	mov	w3, #1024
	mov	w4, #0
	mov	w5, #0
	bl	_input_set_abs_params
Lloh10:
	adrp	x8, _INPUT_MT_DIRECT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _INPUT_MT_DIRECT@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
	mov	x0, x20
	mov	w1, #10
	bl	_input_mt_init_slots
Lloh13:
	adrp	x8, l_.str@PAGE
Lloh14:
	add	x8, x8, l_.str@PAGEOFF
Lloh15:
	adrp	x9, l_.str.1@PAGE
Lloh16:
	add	x9, x9, l_.str.1@PAGEOFF
	stp	x8, x9, [x20]
Lloh17:
	adrp	x8, _BUS_SPI@GOTPAGE
Lloh18:
	ldr	x8, [x8, _BUS_SPI@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
Lloh20:
	adrp	x9, lCPI0_0@PAGE
Lloh21:
	ldr	d0, [x9, lCPI0_0@PAGEOFF]
	str	d0, [x20, #16]
	stp	wzr, w8, [x20, #24]
	mov	x0, x20
	bl	_input_register_device
	mov	x20, x0
	cbz	w0, LBB0_4
; %bb.2:
	ldr	x0, [x19]
Lloh22:
	adrp	x1, l_.str.2@PAGE
Lloh23:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x20
	bl	_dev_err
	b	LBB0_4
LBB0_3:
Lloh24:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_4:
	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 AdrpLdr	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_ABS_MT_POSITION_X,4,2          ; @ABS_MT_POSITION_X
	.comm	_ABS_MT_POSITION_Y,4,2          ; @ABS_MT_POSITION_Y
	.comm	_ABS_MT_WIDTH_MAJOR,4,2         ; @ABS_MT_WIDTH_MAJOR
	.comm	_ABS_MT_WIDTH_MINOR,4,2         ; @ABS_MT_WIDTH_MINOR
	.comm	_INPUT_MT_DIRECT,4,2            ; @INPUT_MT_DIRECT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Surface3 SPI Capacitive TouchScreen"

l_.str.1:                               ; @.str.1
	.asciz	"input/ts"

	.comm	_BUS_SPI,4,2                    ; @BUS_SPI
l_.str.2:                               ; @.str.2
	.asciz	"Failed to register input device: %d"

	.no_dead_strip	_surface3_spi_create_touch_input
.subsections_via_symbols
