	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function silead_ts_request_input_dev
_silead_ts_request_input_dev:           ## @silead_ts_request_input_dev
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	16(%rdi), %r14
	movq	%r14, %rdi
	callq	_devm_input_allocate_device
	movq	%rax, (%rbx)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	_ABS_MT_POSITION_X@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	xorl	%r15d, %r15d
	movq	%rax, %rdi
	xorl	%edx, %edx
	movl	$4095, %ecx                     ## imm = 0xFFF
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_input_set_abs_params
	movq	(%rbx), %rdi
	movq	_ABS_MT_POSITION_Y@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	movl	$4095, %ecx                     ## imm = 0xFFF
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_input_set_abs_params
	movq	(%rbx), %rdi
	leaq	12(%rbx), %rdx
	movl	$1, %esi
	callq	_touchscreen_parse_properties
	movq	(%rbx), %rdi
	movq	_INPUT_MT_DIRECT@GOTPCREL(%rip), %rax
	movq	_INPUT_MT_DROP_UNUSED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movl	8(%rbx), %esi
	movq	_INPUT_MT_TRACK@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	callq	_input_mt_init_slots
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_device_property_read_bool
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	(%rbx), %rdi
	movq	_EV_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_KEY_LEFTMETA@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_input_set_capability
LBB0_4:
	movq	_SILEAD_TS_NAME@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	(%rbx), %rdi
	movl	%eax, 12(%rdi)
	leaq	L_.str.2(%rip), %rax
	movq	%rax, (%rdi)
	movq	_BUS_I2C@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rdi)
	callq	_input_register_device
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %ebx
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	movl	%ebx, %r15d
	jmp	LBB0_6
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_6:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to allocate input device\n"

	.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	_INPUT_MT_DIRECT,4,2            ## @INPUT_MT_DIRECT
	.comm	_INPUT_MT_DROP_UNUSED,4,2       ## @INPUT_MT_DROP_UNUSED
	.comm	_INPUT_MT_TRACK,4,2             ## @INPUT_MT_TRACK
L_.str.1:                               ## @.str.1
	.asciz	"silead,home-button"

	.comm	_EV_KEY,4,2                     ## @EV_KEY
	.comm	_KEY_LEFTMETA,4,2               ## @KEY_LEFTMETA
	.comm	_SILEAD_TS_NAME,4,2             ## @SILEAD_TS_NAME
L_.str.2:                               ## @.str.2
	.asciz	"input/ts"

	.comm	_BUS_I2C,4,2                    ## @BUS_I2C
L_.str.3:                               ## @.str.3
	.asciz	"Failed to register input device: %d\n"

	.no_dead_strip	_silead_ts_request_input_dev
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function silead_ts_request_input_dev
_silead_ts_request_input_dev:           ; @silead_ts_request_input_dev
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x20, x0
	ldr	x19, [x0, #16]
	mov	x0, x19
	bl	_devm_input_allocate_device
	str	x0, [x20]
	cbz	x0, LBB0_5
; %bb.1:
Lloh0:
	adrp	x8, _ABS_MT_POSITION_X@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ABS_MT_POSITION_X@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w2, #0
	mov	w3, #4095
	mov	w4, #0
	mov	w5, #0
	bl	_input_set_abs_params
	ldr	x0, [x20]
Lloh3:
	adrp	x8, _ABS_MT_POSITION_Y@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ABS_MT_POSITION_Y@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	w2, #0
	mov	w3, #4095
	mov	w4, #0
	mov	w5, #0
	bl	_input_set_abs_params
	ldr	x0, [x20]
	add	x2, x20, #12
	mov	w1, #1
	bl	_touchscreen_parse_properties
	ldr	x0, [x20]
	ldr	w1, [x20, #8]
Lloh6:
	adrp	x8, _INPUT_MT_DIRECT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _INPUT_MT_DIRECT@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _INPUT_MT_DROP_UNUSED@GOTPAGE
Lloh10:
	ldr	x9, [x9, _INPUT_MT_DROP_UNUSED@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh12:
	adrp	x9, _INPUT_MT_TRACK@GOTPAGE
Lloh13:
	ldr	x9, [x9, _INPUT_MT_TRACK@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w2, w8, w9
	bl	_input_mt_init_slots
Lloh15:
	adrp	x1, l_.str.1@PAGE
Lloh16:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_device_property_read_bool
	cbz	x0, LBB0_3
; %bb.2:
	ldr	x0, [x20]
Lloh17:
	adrp	x8, _EV_KEY@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EV_KEY@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
Lloh20:
	adrp	x8, _KEY_LEFTMETA@GOTPAGE
Lloh21:
	ldr	x8, [x8, _KEY_LEFTMETA@GOTPAGEOFF]
Lloh22:
	ldr	w2, [x8]
	bl	_input_set_capability
LBB0_3:
Lloh23:
	adrp	x8, _SILEAD_TS_NAME@GOTPAGE
Lloh24:
	ldr	x8, [x8, _SILEAD_TS_NAME@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	ldr	x0, [x20]
Lloh26:
	adrp	x9, l_.str.2@PAGE
Lloh27:
	add	x9, x9, l_.str.2@PAGEOFF
	str	x9, [x0]
Lloh28:
	adrp	x9, _BUS_I2C@GOTPAGE
Lloh29:
	ldr	x9, [x9, _BUS_I2C@GOTPAGEOFF]
Lloh30:
	ldr	w9, [x9]
	stp	w9, w8, [x0, #8]
	bl	_input_register_device
	mov	x20, x0
	cbz	w0, LBB0_6
; %bb.4:
	str	x20, [sp]
Lloh31:
	adrp	x1, l_.str.3@PAGE
Lloh32:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	b	LBB0_6
LBB0_5:
Lloh33:
	adrp	x1, l_.str@PAGE
Lloh34:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh35:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh36:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh37:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_6:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh15, Lloh16
	.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	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpAdd	Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to allocate input device\n"

	.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	_INPUT_MT_DIRECT,4,2            ; @INPUT_MT_DIRECT
	.comm	_INPUT_MT_DROP_UNUSED,4,2       ; @INPUT_MT_DROP_UNUSED
	.comm	_INPUT_MT_TRACK,4,2             ; @INPUT_MT_TRACK
l_.str.1:                               ; @.str.1
	.asciz	"silead,home-button"

	.comm	_EV_KEY,4,2                     ; @EV_KEY
	.comm	_KEY_LEFTMETA,4,2               ; @KEY_LEFTMETA
	.comm	_SILEAD_TS_NAME,4,2             ; @SILEAD_TS_NAME
l_.str.2:                               ; @.str.2
	.asciz	"input/ts"

	.comm	_BUS_I2C,4,2                    ; @BUS_I2C
l_.str.3:                               ; @.str.3
	.asciz	"Failed to register input device: %d\n"

	.no_dead_strip	_silead_ts_request_input_dev
.subsections_via_symbols
