	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cmpc_accel_add_v4
_cmpc_accel_add_v4:                     ## @cmpc_accel_add_v4
	.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, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$12, %edi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	movq	_CMPC_ACCEL_DEV_STATE_CLOSED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r15)
	movq	_CMPC_ACCEL_SENSITIVITY_DEFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%esi, 4(%r15)
	movl	4(%r14), %edi
	callq	_cmpc_accel_set_sensitivity_v4
	movq	_cmpc_accel_sensitivity_attr_v4@GOTPCREL(%rip), %rsi
	movq	%r14, %rdi
	callq	_device_create_file
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_8
## %bb.3:
	movq	_CMPC_ACCEL_G_SELECT_DEFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%esi, (%r15)
	movl	4(%r14), %edi
	callq	_cmpc_accel_set_g_select_v4
	movq	_cmpc_accel_g_select_attr_v4@GOTPCREL(%rip), %rsi
	movq	%r14, %rdi
	callq	_device_create_file
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_7
## %bb.4:
	movq	_cmpc_accel_idev_init_v4@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_cmpc_add_acpi_notify_device
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	movl	%eax, %ebx
	movq	_cmpc_accel_g_select_attr_v4@GOTPCREL(%rip), %rsi
	movq	%r14, %rdi
	callq	_device_remove_file
LBB0_7:
	movq	_cmpc_accel_sensitivity_attr_v4@GOTPCREL(%rip), %rsi
	movq	%r14, %rdi
	callq	_device_remove_file
LBB0_8:
	movq	%r15, %rdi
	callq	_kfree
	jmp	LBB0_9
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	%r14, %rdi
	callq	_dev_get_drvdata
	movq	%rax, %rdi
	movq	%r15, %rsi
	callq	_dev_set_drvdata
	xorl	%ebx, %ebx
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_CMPC_ACCEL_DEV_STATE_CLOSED,4,2 ## @CMPC_ACCEL_DEV_STATE_CLOSED
	.comm	_CMPC_ACCEL_SENSITIVITY_DEFAULT,4,2 ## @CMPC_ACCEL_SENSITIVITY_DEFAULT
	.comm	_cmpc_accel_sensitivity_attr_v4,4,2 ## @cmpc_accel_sensitivity_attr_v4
	.comm	_CMPC_ACCEL_G_SELECT_DEFAULT,4,2 ## @CMPC_ACCEL_G_SELECT_DEFAULT
	.comm	_cmpc_accel_g_select_attr_v4,4,2 ## @cmpc_accel_g_select_attr_v4
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cmpc_accel_v4"

	.comm	_cmpc_accel_idev_init_v4,4,2    ## @cmpc_accel_idev_init_v4
	.no_dead_strip	_cmpc_accel_add_v4
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cmpc_accel_add_v4
_cmpc_accel_add_v4:                     ; @cmpc_accel_add_v4
	.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	x20, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #12
	bl	_kmalloc
	cbz	x0, LBB0_7
; %bb.1:
	mov	x19, x0
Lloh3:
	adrp	x8, _CMPC_ACCEL_DEV_STATE_CLOSED@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CMPC_ACCEL_DEV_STATE_CLOSED@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _CMPC_ACCEL_SENSITIVITY_DEFAULT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _CMPC_ACCEL_SENSITIVITY_DEFAULT@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x9]
	stp	w1, w8, [x0, #4]
	ldr	w0, [x20, #4]
	bl	_cmpc_accel_set_sensitivity_v4
Lloh9:
	adrp	x1, _cmpc_accel_sensitivity_attr_v4@GOTPAGE
Lloh10:
	ldr	x1, [x1, _cmpc_accel_sensitivity_attr_v4@GOTPAGEOFF]
	mov	x0, x20
	bl	_device_create_file
	mov	x21, x0
	cbnz	w0, LBB0_6
; %bb.2:
Lloh11:
	adrp	x8, _CMPC_ACCEL_G_SELECT_DEFAULT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _CMPC_ACCEL_G_SELECT_DEFAULT@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	str	w1, [x19]
	ldr	w0, [x20, #4]
	bl	_cmpc_accel_set_g_select_v4
Lloh14:
	adrp	x1, _cmpc_accel_g_select_attr_v4@GOTPAGE
Lloh15:
	ldr	x1, [x1, _cmpc_accel_g_select_attr_v4@GOTPAGEOFF]
	mov	x0, x20
	bl	_device_create_file
	mov	x21, x0
	cbnz	w0, LBB0_5
; %bb.3:
Lloh16:
	adrp	x8, _cmpc_accel_idev_init_v4@GOTPAGE
Lloh17:
	ldr	x8, [x8, _cmpc_accel_idev_init_v4@GOTPAGEOFF]
Lloh18:
	ldr	w2, [x8]
Lloh19:
	adrp	x1, l_.str@PAGE
Lloh20:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_cmpc_add_acpi_notify_device
	mov	x21, x0
	cbz	w0, LBB0_9
; %bb.4:
Lloh21:
	adrp	x1, _cmpc_accel_g_select_attr_v4@GOTPAGE
Lloh22:
	ldr	x1, [x1, _cmpc_accel_g_select_attr_v4@GOTPAGEOFF]
	mov	x0, x20
	bl	_device_remove_file
LBB0_5:
Lloh23:
	adrp	x1, _cmpc_accel_sensitivity_attr_v4@GOTPAGE
Lloh24:
	ldr	x1, [x1, _cmpc_accel_sensitivity_attr_v4@GOTPAGEOFF]
	mov	x0, x20
	bl	_device_remove_file
LBB0_6:
	mov	x0, x19
	bl	_kfree
	b	LBB0_8
LBB0_7:
Lloh25:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_8:
	mov	x0, x21
	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_9:
	mov	x0, x20
	bl	_dev_get_drvdata
	mov	x1, x19
	bl	_dev_set_drvdata
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_CMPC_ACCEL_DEV_STATE_CLOSED,4,2 ; @CMPC_ACCEL_DEV_STATE_CLOSED
	.comm	_CMPC_ACCEL_SENSITIVITY_DEFAULT,4,2 ; @CMPC_ACCEL_SENSITIVITY_DEFAULT
	.comm	_cmpc_accel_sensitivity_attr_v4,4,2 ; @cmpc_accel_sensitivity_attr_v4
	.comm	_CMPC_ACCEL_G_SELECT_DEFAULT,4,2 ; @CMPC_ACCEL_G_SELECT_DEFAULT
	.comm	_cmpc_accel_g_select_attr_v4,4,2 ; @cmpc_accel_g_select_attr_v4
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cmpc_accel_v4"

	.comm	_cmpc_accel_idev_init_v4,4,2    ; @cmpc_accel_idev_init_v4
	.no_dead_strip	_cmpc_accel_add_v4
.subsections_via_symbols
