	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function s3_wmi_create_and_register_input
_s3_wmi_create_and_register_input:      ## @s3_wmi_create_and_register_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	callq	_devm_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, 20(%rbx)
	movl	$5, 16(%rbx)
	movq	_EV_SW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SW_LID@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_input_set_capability
	movq	%rbx, %rdi
	callq	_input_register_device
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movl	%eax, %r14d
	movq	_s3_wmi@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_input_free_device
	jmp	LBB0_5
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_5
LBB0_3:
	movq	_s3_wmi@GOTPCREL(%rip), %rax
	movq	%rbx, (%rax)
	xorl	%r14d, %r14d
LBB0_5:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Lid Switch"

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

	.comm	_BUS_HOST,4,2                   ## @BUS_HOST
	.comm	_EV_SW,4,2                      ## @EV_SW
	.comm	_SW_LID,4,2                     ## @SW_LID
	.comm	_s3_wmi,8,3                     ## @s3_wmi
	.no_dead_strip	_s3_wmi_create_and_register_input
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function s3_wmi_create_and_register_input
_s3_wmi_create_and_register_input:      ; @s3_wmi_create_and_register_input
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	bl	_devm_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]
	mov	w9, #5
	stp	w9, w8, [x0, #16]
Lloh7:
	adrp	x8, _EV_SW@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EV_SW@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
Lloh10:
	adrp	x8, _SW_LID@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SW_LID@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
	bl	_input_set_capability
	mov	x0, x19
	bl	_input_register_device
	mov	x20, x0
Lloh13:
	adrp	x8, _s3_wmi@GOTPAGE
Lloh14:
	ldr	x8, [x8, _s3_wmi@GOTPAGEOFF]
	cbz	w0, LBB0_4
; %bb.2:
	ldr	x0, [x8]
	bl	_input_free_device
	b	LBB0_5
LBB0_3:
Lloh15:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_5
LBB0_4:
	str	x19, [x8]
LBB0_5:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Lid Switch"

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

	.comm	_BUS_HOST,4,2                   ; @BUS_HOST
	.comm	_EV_SW,4,2                      ; @EV_SW
	.comm	_SW_LID,4,2                     ; @SW_LID
	.comm	_s3_wmi,8,3                     ; @s3_wmi
	.no_dead_strip	_s3_wmi_create_and_register_input
.subsections_via_symbols
