	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ideapad_input_init
_ideapad_input_init:                    ## @ideapad_input_init
	.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, %r15
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_input_allocate_device
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	leaq	L_.str(%rip), %rax
	movq	%rax, (%rbx)
	leaq	L_.str.1(%rip), %rax
	movq	%rax, 8(%rbx)
	movq	_BUS_HOST@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rbx)
	movq	8(%r15), %rax
	movq	%rax, 16(%rbx)
	movq	_ideapad_keymap@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_sparse_keymap_setup
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %r14d
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_6
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	jmp	LBB0_7
LBB0_4:
	movq	%rbx, %rdi
	callq	_input_register_device
	testl	%eax, %eax
	je	LBB0_8
## %bb.5:
	movl	%eax, %r14d
	leaq	L_.str.3(%rip), %rdi
LBB0_6:
	callq	_pr_err
	movq	%rbx, %rdi
	callq	_input_free_device
LBB0_7:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	%rbx, (%r15)
	xorl	%r14d, %r14d
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Ideapad extra buttons"

L_.str.1:                               ## @.str.1
	.asciz	"ideapad/input0"

	.comm	_BUS_HOST,4,2                   ## @BUS_HOST
	.comm	_ideapad_keymap,4,2             ## @ideapad_keymap
L_.str.2:                               ## @.str.2
	.asciz	"Unable to setup input device keymap\n"

L_.str.3:                               ## @.str.3
	.asciz	"Unable to register input device\n"

	.no_dead_strip	_ideapad_input_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ideapad_input_init
_ideapad_input_init:                    ; @ideapad_input_init
	.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, x0
	bl	_input_allocate_device
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x8, l_.str@PAGE
Lloh1:
	add	x8, x8, l_.str@PAGEOFF
Lloh2:
	adrp	x9, l_.str.1@PAGE
Lloh3:
	add	x9, x9, l_.str.1@PAGEOFF
	stp	x8, x9, [x0]
Lloh4:
	adrp	x8, _BUS_HOST@GOTPAGE
Lloh5:
	ldr	x8, [x8, _BUS_HOST@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	str	w8, [x0, #24]
	ldr	x8, [x21, #8]
	str	x8, [x0, #16]
Lloh7:
	adrp	x8, _ideapad_keymap@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ideapad_keymap@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	x2, #0
	bl	_sparse_keymap_setup
	cbz	w0, LBB0_4
; %bb.2:
	mov	x20, x0
Lloh10:
	adrp	x0, l_.str.2@PAGE
Lloh11:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_6
LBB0_3:
Lloh12:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_7
LBB0_4:
	mov	x0, x19
	bl	_input_register_device
	mov	x20, x0
	cbz	w0, LBB0_8
; %bb.5:
Lloh15:
	adrp	x0, l_.str.3@PAGE
Lloh16:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_6:
	bl	_pr_err
	mov	x0, x19
	bl	_input_free_device
LBB0_7:
	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
LBB0_8:
	str	x19, [x21]
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Ideapad extra buttons"

l_.str.1:                               ; @.str.1
	.asciz	"ideapad/input0"

	.comm	_BUS_HOST,4,2                   ; @BUS_HOST
	.comm	_ideapad_keymap,4,2             ; @ideapad_keymap
l_.str.2:                               ; @.str.2
	.asciz	"Unable to setup input device keymap\n"

l_.str.3:                               ; @.str.3
	.asciz	"Unable to register input device\n"

	.no_dead_strip	_ideapad_input_init
.subsections_via_symbols
