	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wdt87xx_ts_create_input_device
_wdt87xx_ts_create_input_device:        ## @wdt87xx_ts_create_input_device
	.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	%rdi, %r12
	movq	32(%rdi), %r14
	movq	_MAX_UNIT_AXIS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	16(%r12), %esi
	callq	_DIV_ROUND_CLOSEST
	movl	%eax, %r13d
	movq	%r14, %rdi
	callq	_devm_input_allocate_device
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	%rax, 24(%r12)
	leaq	L_.str.1(%rip), %rax
	movq	%rax, (%rbx)
	movq	_BUS_I2C@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rbx)
	movl	12(%r12), %eax
	movl	%eax, 16(%rbx)
	movl	8(%r12), %eax
	movl	%eax, 12(%rbx)
	movl	20(%r12), %eax
	movl	%eax, 8(%rbx)
	movq	_ABS_MT_POSITION_X@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r12), %ecx
	xorl	%r15d, %r15d
	movq	%rbx, %rdi
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_input_set_abs_params
	movq	_ABS_MT_POSITION_Y@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movl	4(%r12), %ecx
	movq	%rbx, %rdi
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_input_set_abs_params
	movq	_ABS_MT_POSITION_X@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r13d, %edx
	callq	_input_abs_set_res
	movl	(%r14), %esi
	movq	%rbx, %rdi
	movl	%r13d, %edx
	callq	_input_abs_set_res
	movq	_ABS_MT_TOUCH_MAJOR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r12), %ecx
	movq	%rbx, %rdi
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_input_set_abs_params
	movq	_ABS_MT_PRESSURE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	movl	$255, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_input_set_abs_params
	movq	_WDT_MAX_FINGER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_INPUT_MT_DIRECT@GOTPCREL(%rip), %rax
	movq	_INPUT_MT_DROP_UNUSED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_input_mt_init_slots
	movq	%rbx, %rdi
	callq	_input_register_device
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	movl	%ebx, %r15d
	jmp	LBB0_4
LBB0_1:
	leaq	L_.str(%rip), %rsi
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
LBB0_4:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_UNIT_AXIS,4,2              ## @MAX_UNIT_AXIS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to allocate input device\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"WDT87xx Touchscreen"

	.comm	_BUS_I2C,4,2                    ## @BUS_I2C
	.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_TOUCH_MAJOR,4,2         ## @ABS_MT_TOUCH_MAJOR
	.comm	_ABS_MT_PRESSURE,4,2            ## @ABS_MT_PRESSURE
	.comm	_WDT_MAX_FINGER,4,2             ## @WDT_MAX_FINGER
	.comm	_INPUT_MT_DIRECT,4,2            ## @INPUT_MT_DIRECT
	.comm	_INPUT_MT_DROP_UNUSED,4,2       ## @INPUT_MT_DROP_UNUSED
L_.str.2:                               ## @.str.2
	.asciz	"failed to register input device: %d\n"

	.no_dead_strip	_wdt87xx_ts_create_input_device
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wdt87xx_ts_create_input_device
_wdt87xx_ts_create_input_device:        ; @wdt87xx_ts_create_input_device
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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, x0
	ldr	x19, [x0, #32]
Lloh0:
	adrp	x8, _MAX_UNIT_AXIS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX_UNIT_AXIS@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	ldr	w1, [x21, #16]
	bl	_DIV_ROUND_CLOSEST
	mov	x22, x0
	mov	x0, x19
	bl	_devm_input_allocate_device
	cbz	x0, LBB0_3
; %bb.1:
	mov	x20, x0
	str	x0, [x21, #24]
Lloh3:
	adrp	x8, l_.str.1@PAGE
Lloh4:
	add	x8, x8, l_.str.1@PAGEOFF
	str	x8, [x0]
Lloh5:
	adrp	x8, _BUS_I2C@GOTPAGE
Lloh6:
	ldr	x8, [x8, _BUS_I2C@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	str	w8, [x0, #20]
	ldr	d0, [x21, #8]
	stur	d0, [x0, #12]
	ldr	w8, [x21, #20]
	str	w8, [x0, #8]
Lloh8:
	adrp	x23, _ABS_MT_POSITION_X@GOTPAGE
Lloh9:
	ldr	x23, [x23, _ABS_MT_POSITION_X@GOTPAGEOFF]
	ldr	w1, [x23]
	ldr	w3, [x21]
	mov	w2, #0
	mov	w4, #0
	mov	w5, #0
	bl	_input_set_abs_params
Lloh10:
	adrp	x24, _ABS_MT_POSITION_Y@GOTPAGE
Lloh11:
	ldr	x24, [x24, _ABS_MT_POSITION_Y@GOTPAGEOFF]
	ldr	w1, [x24]
	ldr	w3, [x21, #4]
	mov	x0, x20
	mov	w2, #0
	mov	w4, #0
	mov	w5, #0
	bl	_input_set_abs_params
	ldr	w1, [x23]
	mov	x0, x20
	mov	x2, x22
	bl	_input_abs_set_res
	ldr	w1, [x24]
	mov	x0, x20
	mov	x2, x22
	bl	_input_abs_set_res
Lloh12:
	adrp	x8, _ABS_MT_TOUCH_MAJOR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ABS_MT_TOUCH_MAJOR@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	ldr	w3, [x21]
	mov	x0, x20
	mov	w2, #0
	mov	w4, #0
	mov	w5, #0
	bl	_input_set_abs_params
Lloh15:
	adrp	x8, _ABS_MT_PRESSURE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ABS_MT_PRESSURE@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #0
	mov	w3, #255
	mov	w4, #0
	mov	w5, #0
	bl	_input_set_abs_params
Lloh18:
	adrp	x8, _WDT_MAX_FINGER@GOTPAGE
Lloh19:
	ldr	x8, [x8, _WDT_MAX_FINGER@GOTPAGEOFF]
Lloh20:
	adrp	x9, _INPUT_MT_DIRECT@GOTPAGE
Lloh21:
	ldr	x9, [x9, _INPUT_MT_DIRECT@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
Lloh23:
	ldr	w8, [x9]
Lloh24:
	adrp	x9, _INPUT_MT_DROP_UNUSED@GOTPAGE
Lloh25:
	ldr	x9, [x9, _INPUT_MT_DROP_UNUSED@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x20
	bl	_input_mt_init_slots
	mov	x0, x20
	bl	_input_register_device
	mov	x20, x0
	cbz	w0, LBB0_4
; %bb.2:
	str	x20, [sp]
Lloh27:
	adrp	x1, l_.str.2@PAGE
Lloh28:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	b	LBB0_4
LBB0_3:
Lloh29:
	adrp	x1, l_.str@PAGE
Lloh30:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh31:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh32:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_4:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh22
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_UNIT_AXIS,4,2              ; @MAX_UNIT_AXIS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to allocate input device\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"WDT87xx Touchscreen"

	.comm	_BUS_I2C,4,2                    ; @BUS_I2C
	.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_TOUCH_MAJOR,4,2         ; @ABS_MT_TOUCH_MAJOR
	.comm	_ABS_MT_PRESSURE,4,2            ; @ABS_MT_PRESSURE
	.comm	_WDT_MAX_FINGER,4,2             ; @WDT_MAX_FINGER
	.comm	_INPUT_MT_DIRECT,4,2            ; @INPUT_MT_DIRECT
	.comm	_INPUT_MT_DROP_UNUSED,4,2       ; @INPUT_MT_DROP_UNUSED
l_.str.2:                               ; @.str.2
	.asciz	"failed to register input device: %d\n"

	.no_dead_strip	_wdt87xx_ts_create_input_device
.subsections_via_symbols
