	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function kb_wake_angle_store
_kb_wake_angle_store:                   ## @kb_wake_angle_store
	.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	%rcx, %r14
	movq	%rdx, %rbx
	callq	_to_cros_ec_dev
	movq	%rax, %r15
	leaq	-28(%rbp), %rdx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_kstrtou16
	testl	%eax, %eax
	jne	LBB0_4
## %bb.1:
	movq	_EC_HOST_PARAM_SIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	$32, %rdi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	%rax, %rbx
	movq	24(%rax), %rax
	movq	_EC_CMD_MOTION_SENSE_CMD@GOTPCREL(%rip), %rcx
	movq	8(%r15), %rdx
	addq	(%rcx), %rdx
	movq	%rdx, 16(%rbx)
	movl	$2, (%rbx)
	movq	_MOTIONSENSE_CMD_KB_WAKE_ANGLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 4(%rax)
	movl	-28(%rbp), %ecx
	movl	%ecx, (%rax)
	movabsq	$17179869192, %rax              ## imm = 0x400000008
	movq	%rax, 4(%rbx)
	movl	(%r15), %edi
	movq	%rbx, %rsi
	callq	_cros_ec_cmd_xfer_status
	movl	%eax, %r15d
	movq	%rbx, %rdi
	callq	_kfree
	testl	%r15d, %r15d
	cmovsl	%r15d, %r14d
	movl	%r14d, %eax
	jmp	LBB0_4
LBB0_2:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EC_HOST_PARAM_SIZE,8,3         ## @EC_HOST_PARAM_SIZE
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_EC_CMD_MOTION_SENSE_CMD,8,3    ## @EC_CMD_MOTION_SENSE_CMD
	.comm	_MOTIONSENSE_CMD_KB_WAKE_ANGLE,4,2 ## @MOTIONSENSE_CMD_KB_WAKE_ANGLE
	.no_dead_strip	_kb_wake_angle_store
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function kb_wake_angle_store
lCPI0_0:
	.long	2                               ; 0x2
	.long	8                               ; 0x8
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_kb_wake_angle_store:                   ; @kb_wake_angle_store
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x19, x3
	mov	x21, x2
	bl	_to_cros_ec_dev
	mov	x20, x0
	add	x2, sp, #12
	mov	x0, x21
	mov	w1, #0
	bl	_kstrtou16
	cbnz	w0, LBB0_4
; %bb.1:
Lloh0:
	adrp	x8, _EC_HOST_PARAM_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EC_HOST_PARAM_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	add	x0, x8, #32
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_kmalloc
	cbz	x0, LBB0_3
; %bb.2:
	mov	x21, x0
	ldr	x8, [x0, #24]
Lloh6:
	adrp	x9, _EC_CMD_MOTION_SENSE_CMD@GOTPAGE
Lloh7:
	ldr	x9, [x9, _EC_CMD_MOTION_SENSE_CMD@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	ldr	x10, [x20, #8]
	add	x9, x10, x9
	str	x9, [x0, #16]
Lloh9:
	adrp	x9, lCPI0_0@PAGE
Lloh10:
	ldr	d0, [x9, lCPI0_0@PAGEOFF]
	str	d0, [x0]
Lloh11:
	adrp	x9, _MOTIONSENSE_CMD_KB_WAKE_ANGLE@GOTPAGE
Lloh12:
	ldr	x9, [x9, _MOTIONSENSE_CMD_KB_WAKE_ANGLE@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	ldr	w10, [sp, #12]
	stp	w10, w9, [x8]
	mov	w8, #4
	str	w8, [x0, #8]
	ldr	w0, [x20]
	mov	x1, x21
	bl	_cros_ec_cmd_xfer_status
	mov	x20, x0
	mov	x0, x21
	bl	_kfree
	cmp	w20, #0
	csel	w0, w20, w19, lt
	b	LBB0_4
LBB0_3:
Lloh14:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_4:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdrp	Lloh9, Lloh11
	.loh AdrpLdr	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_EC_HOST_PARAM_SIZE,8,3         ; @EC_HOST_PARAM_SIZE
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_EC_CMD_MOTION_SENSE_CMD,8,3    ; @EC_CMD_MOTION_SENSE_CMD
	.comm	_MOTIONSENSE_CMD_KB_WAKE_ANGLE,4,2 ; @MOTIONSENSE_CMD_KB_WAKE_ANGLE
	.no_dead_strip	_kb_wake_angle_store
.subsections_via_symbols
