	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function olpc_xo175_ec_complete
_olpc_xo175_ec_complete:                ## @olpc_xo175_ec_complete
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	movq	88(%rdi), %r14
	movl	80(%rdi), %ebx
	testl	%ebx, %ebx
	je	LBB0_5
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_dev_err
	leaq	40(%r13), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	cmpq	$0, 56(%r13)
	je	LBB0_3
## %bb.2:
	movl	$0, (%r13)
	movq	_CMD_STATE_ERROR_RECEIVED@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 48(%r13)
	leaq	44(%r13), %rdi
	callq	_complete
LBB0_3:
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movq	_EINTR@GOTPCREL(%rip), %rax
	addl	(%rax), %ebx
	jne	LBB0_4
## %bb.46:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movl	72(%r13), %edx
	movl	76(%r13), %r15d
	leal	-136(%rdx), %eax
	cmpl	$7, %eax
	ja	LBB0_45
## %bb.6:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_31:
	leaq	L_.str.7(%rip), %rsi
	jmp	LBB0_30
LBB0_7:
	leaq	40(%r13), %rbx
	movq	%rbx, %rdi
	callq	_spin_lock_irqsave
	cmpq	$0, 56(%r13)
	je	LBB0_8
## %bb.9:
	movq	_CMD_STATE_CMD_SENT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 48(%r13)
	cmpl	$0, 4(%r13)
	jne	LBB0_11
## %bb.10:
	leaq	44(%r13), %rdi
	callq	_complete
LBB0_11:
	movq	%r13, %rdi
	callq	_olpc_xo175_ec_read_packet
	jmp	LBB0_12
LBB0_32:
	leaq	L_.str.8(%rip), %rsi
	movq	%r14, %rdi
	movl	%r15d, %edx
	callq	_dev_dbg
	leal	-128(%r15), %eax
	cmpl	$7, %eax
	ja	LBB0_40
## %bb.33:
	leaq	LJTI0_1(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_37:
	leaq	L_.str.10(%rip), %rdi
	jmp	LBB0_35
LBB0_45:
	leaq	L_.str.12(%rip), %rsi
	movq	%r14, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	movl	%r15d, %ecx
	xorl	%eax, %eax
	callq	_dev_warn
	jmp	LBB0_4
LBB0_14:
	leaq	40(%r13), %r15
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	cmpq	$0, 56(%r13)
	jne	LBB0_16
## %bb.15:
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	leaq	64(%r13), %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movq	_CMD_ECHO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 64(%r13)
LBB0_16:
	movq	_CMD_STATE_CMD_IN_TX_FIFO@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 48(%r13)
	movl	68(%r13), %edi
	xorl	%esi, %esi
	callq	_gpiod_set_value_cansleep
	leaq	64(%r13), %rsi
	movq	%r13, %rdi
	movl	$4, %edx
	callq	_olpc_xo175_ec_send_command
	movq	%r15, %rdi
	jmp	LBB0_13
LBB0_29:
	leaq	L_.str.6(%rip), %rsi
LBB0_30:
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_warn
	jmp	LBB0_4
LBB0_41:
	cmpl	$10, %r15d
	je	LBB0_42
## %bb.43:
	movl	%r15d, %edi
	callq	_isprint
	testl	%eax, %eax
	je	LBB0_4
## %bb.44:
	movq	16(%r13), %rax
	movslq	24(%r13), %rcx
	leal	1(%rcx), %edx
	movl	%edx, 24(%r13)
	movl	%r15d, (%rax,%rcx,4)
	movl	24(%r13), %eax
	movq	_LOG_BUF_SIZE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_4
LBB0_42:
	movq	%r13, %rdi
	callq	_olpc_xo175_ec_flush_logbuf
	jmp	LBB0_4
LBB0_17:
	leaq	40(%r13), %r12
	movq	%r12, %rdi
	callq	_spin_lock_irqsave
	cmpq	$0, 56(%r13)
	je	LBB0_18
## %bb.20:
	movslq	(%r13), %rax
	cmpl	4(%r13), %eax
	jge	LBB0_21
## %bb.22:
	movq	8(%r13), %rcx
	leal	1(%rax), %edx
	movl	%edx, (%r13)
	movl	%r15d, (%rcx,%rax,4)
	movl	(%r13), %eax
	cmpl	4(%r13), %eax
	jne	LBB0_24
## %bb.23:
	movq	_CMD_STATE_RESP_RECEIVED@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 48(%r13)
	leaq	44(%r13), %rdi
	callq	_complete
	jmp	LBB0_24
LBB0_25:
	leaq	40(%r13), %rbx
	movq	%rbx, %rdi
	callq	_spin_lock_irqsave
	cmpq	$0, 56(%r13)
	je	LBB0_26
## %bb.27:
	movq	8(%r13), %rax
	movl	%r15d, (%rax)
	movl	$1, (%r13)
	movq	_CMD_STATE_ERROR_RECEIVED@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 48(%r13)
	leaq	44(%r13), %rdi
	callq	_complete
	jmp	LBB0_28
LBB0_8:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
LBB0_12:
	movq	%rbx, %rdi
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock_irqrestore         ## TAILCALL
LBB0_18:
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_19
LBB0_26:
	leaq	L_.str.5(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
LBB0_28:
	movq	%rbx, %rdi
	callq	_spin_unlock_irqrestore
	jmp	LBB0_4
LBB0_21:
	leaq	L_.str.4(%rip), %rsi
LBB0_19:
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
LBB0_24:
	movq	%r12, %rdi
	callq	_spin_unlock_irqrestore
	jmp	LBB0_4
LBB0_40:
	leaq	L_.str.11(%rip), %rsi
	movq	%r14, %rdi
	movl	%r15d, %edx
	callq	_dev_dbg
	jmp	LBB0_4
LBB0_38:
	movq	32(%r13), %rdi
	movq	_KEY_POWER@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movl	$1, %edx
	callq	_input_report_key
	movq	32(%r13), %rdi
	callq	_input_sync
	movq	32(%r13), %rdi
	movl	(%rbx), %esi
	xorl	%edx, %edx
	callq	_input_report_key
	movq	32(%r13), %rdi
	callq	_input_sync
LBB0_39:
	movq	32(%r13), %rax
	movl	(%rax), %edi
	movq	_PM_WAKEUP_TIME@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_pm_wakeup_event
	jmp	LBB0_4
LBB0_34:
	leaq	L_.str.9(%rip), %rdi
LBB0_35:
	callq	_power_supply_get_by_name
	testq	%rax, %rax
	je	LBB0_4
## %bb.36:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_power_supply_changed
	movq	%rbx, %rdi
	callq	_power_supply_put
LBB0_4:
	movq	%r13, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_olpc_xo175_ec_read_packet      ## TAILCALL
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_31, LBB0_31-LJTI0_0
.set L0_0_set_14, LBB0_14-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_29, LBB0_29-LJTI0_0
.set L0_0_set_32, LBB0_32-LJTI0_0
.set L0_0_set_41, LBB0_41-LJTI0_0
.set L0_0_set_17, LBB0_17-LJTI0_0
.set L0_0_set_25, LBB0_25-LJTI0_0
LJTI0_0:
	.long	L0_0_set_31
	.long	L0_0_set_14
	.long	L0_0_set_7
	.long	L0_0_set_29
	.long	L0_0_set_32
	.long	L0_0_set_41
	.long	L0_0_set_17
	.long	L0_0_set_25
.set L0_1_set_39, LBB0_39-LJTI0_1
.set L0_1_set_38, LBB0_38-LJTI0_1
.set L0_1_set_37, LBB0_37-LJTI0_1
.set L0_1_set_34, LBB0_34-LJTI0_1
LJTI0_1:
	.long	L0_1_set_39
	.long	L0_1_set_39
	.long	L0_1_set_38
	.long	L0_1_set_37
	.long	L0_1_set_37
	.long	L0_1_set_37
	.long	L0_1_set_37
	.long	L0_1_set_34
	.end_data_region
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SPI transfer failed: %d\n"

	.comm	_CMD_STATE_ERROR_RECEIVED,8,3   ## @CMD_STATE_ERROR_RECEIVED
	.comm	_EINTR,4,2                      ## @EINTR
L_.str.1:                               ## @.str.1
	.asciz	"spurious FIFO read packet\n"

	.comm	_CMD_STATE_CMD_SENT,8,3         ## @CMD_STATE_CMD_SENT
L_.str.2:                               ## @.str.2
	.asciz	"spurious SWITCH packet\n"

	.comm	_CMD_ECHO,4,2                   ## @CMD_ECHO
	.comm	_CMD_STATE_CMD_IN_TX_FIFO,8,3   ## @CMD_STATE_CMD_IN_TX_FIFO
L_.str.3:                               ## @.str.3
	.asciz	"spurious response packet\n"

L_.str.4:                               ## @.str.4
	.asciz	"too many response packets\n"

	.comm	_CMD_STATE_RESP_RECEIVED,8,3    ## @CMD_STATE_RESP_RECEIVED
L_.str.5:                               ## @.str.5
	.asciz	"spurious cmd error packet\n"

L_.str.6:                               ## @.str.6
	.asciz	"keyboard is not supported\n"

L_.str.7:                               ## @.str.7
	.asciz	"touchpad is not supported\n"

L_.str.8:                               ## @.str.8
	.asciz	"got event %.2x\n"

L_.str.9:                               ## @.str.9
	.asciz	"olpc-ac"

L_.str.10:                              ## @.str.10
	.asciz	"olpc-battery"

	.comm	_KEY_POWER,4,2                  ## @KEY_POWER
	.comm	_PM_WAKEUP_TIME,4,2             ## @PM_WAKEUP_TIME
L_.str.11:                              ## @.str.11
	.asciz	"ignored unknown event %.2x\n"

	.comm	_LOG_BUF_SIZE,4,2               ## @LOG_BUF_SIZE
L_.str.12:                              ## @.str.12
	.asciz	"unknown channel: %d, %.2x\n"

	.no_dead_strip	_olpc_xo175_ec_complete
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function olpc_xo175_ec_complete
_olpc_xo175_ec_complete:                ; @olpc_xo175_ec_complete
	.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, x0
	ldr	x20, [x0, #88]
	ldr	w21, [x0, #80]
	cbz	w21, LBB0_5
; %bb.1:
	str	x21, [sp]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	add	x20, x19, #40
	mov	x0, x20
	bl	_spin_lock_irqsave
	ldr	x8, [x19, #56]
	cbz	x8, LBB0_3
; %bb.2:
	str	wzr, [x19]
Lloh2:
	adrp	x8, _CMD_STATE_ERROR_RECEIVED@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CMD_STATE_ERROR_RECEIVED@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	str	x8, [x19, #48]
	add	x0, x19, #44
	bl	_complete
LBB0_3:
	mov	x0, x20
	bl	_spin_unlock_irqrestore
Lloh5:
	adrp	x8, _EINTR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINTR@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmn	w21, w8
	b.ne	LBB0_39
; %bb.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
LBB0_5:
	ldp	w8, w21, [x19, #72]
	sub	w9, w8, #136
	cmp	w9, #7
	b.hi	LBB0_15
; %bb.6:
Lloh8:
	adrp	x8, lJTI0_0@PAGE
Lloh9:
	add	x8, x8, lJTI0_0@PAGEOFF
	adr	x10, LBB0_7
	ldrb	w11, [x8, x9]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_7:
Lloh10:
	adrp	x1, l_.str.7@PAGE
Lloh11:
	add	x1, x1, l_.str.7@PAGEOFF
	b	LBB0_20
LBB0_8:
	add	x21, x19, #40
	mov	x0, x21
	bl	_spin_lock_irqsave
	ldr	x8, [x19, #56]
	cbz	x8, LBB0_32
; %bb.9:
Lloh12:
	adrp	x8, _CMD_STATE_CMD_SENT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _CMD_STATE_CMD_SENT@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	str	x8, [x19, #48]
	ldr	w8, [x19, #4]
	cbnz	w8, LBB0_11
; %bb.10:
	add	x0, x19, #44
	bl	_complete
LBB0_11:
	mov	x0, x19
	bl	_olpc_xo175_ec_read_packet
	b	LBB0_33
LBB0_12:
Lloh15:
	adrp	x1, l_.str.8@PAGE
Lloh16:
	add	x1, x1, l_.str.8@PAGEOFF
	mov	x0, x20
	mov	x2, x21
	bl	_dev_dbg
	sub	w8, w21, #128
	cmp	w8, #7
	b.hi	LBB0_40
; %bb.13:
Lloh17:
	adrp	x9, lJTI0_1@PAGE
Lloh18:
	add	x9, x9, lJTI0_1@PAGEOFF
	adr	x10, LBB0_14
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_14:
Lloh19:
	adrp	x0, l_.str.10@PAGE
Lloh20:
	add	x0, x0, l_.str.10@PAGEOFF
	b	LBB0_44
LBB0_15:
	stp	x8, x21, [sp]
Lloh21:
	adrp	x1, l_.str.12@PAGE
Lloh22:
	add	x1, x1, l_.str.12@PAGEOFF
	b	LBB0_20
LBB0_16:
	add	x21, x19, #40
	mov	x0, x21
	bl	_spin_lock_irqsave
	ldr	x8, [x19, #56]
	cbnz	x8, LBB0_18
; %bb.17:
Lloh23:
	adrp	x1, l_.str.2@PAGE
Lloh24:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	add	x0, x19, #64
	mov	w1, #0
	mov	w2, #4
	bl	_memset
Lloh25:
	adrp	x8, _CMD_ECHO@GOTPAGE
Lloh26:
	ldr	x8, [x8, _CMD_ECHO@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	str	w8, [x19, #64]
LBB0_18:
Lloh28:
	adrp	x8, _CMD_STATE_CMD_IN_TX_FIFO@GOTPAGE
Lloh29:
	ldr	x8, [x8, _CMD_STATE_CMD_IN_TX_FIFO@GOTPAGEOFF]
Lloh30:
	ldr	x8, [x8]
	str	x8, [x19, #48]
	ldr	w0, [x19, #68]
	mov	w1, #0
	bl	_gpiod_set_value_cansleep
	add	x1, x19, #64
	mov	x0, x19
	mov	w2, #4
	bl	_olpc_xo175_ec_send_command
	b	LBB0_33
LBB0_19:
Lloh31:
	adrp	x1, l_.str.6@PAGE
Lloh32:
	add	x1, x1, l_.str.6@PAGEOFF
LBB0_20:
	mov	x0, x20
	bl	_dev_warn
	b	LBB0_39
LBB0_21:
	cmp	w21, #10
	b.eq	LBB0_24
; %bb.22:
	mov	x0, x21
	bl	_isprint
	cbz	w0, LBB0_39
; %bb.23:
	ldr	x8, [x19, #16]
	ldrsw	x9, [x19, #24]
	add	w10, w9, #1
	str	w10, [x19, #24]
	str	w21, [x8, x9, lsl #2]
	ldr	w8, [x19, #24]
Lloh33:
	adrp	x9, _LOG_BUF_SIZE@GOTPAGE
Lloh34:
	ldr	x9, [x9, _LOG_BUF_SIZE@GOTPAGEOFF]
Lloh35:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_39
LBB0_24:
	mov	x0, x19
	bl	_olpc_xo175_ec_flush_logbuf
	b	LBB0_39
LBB0_25:
	add	x22, x19, #40
	mov	x0, x22
	bl	_spin_lock_irqsave
	ldr	x8, [x19, #56]
	cbz	x8, LBB0_34
; %bb.26:
	ldp	w8, w9, [x19]
                                        ; kill: def $w8 killed $w8 def $x8
	sxtw	x8, w8
	cmp	w8, w9
	b.ge	LBB0_36
; %bb.27:
	ldr	x9, [x19, #8]
	add	w10, w8, #1
	str	w10, [x19]
	str	w21, [x9, x8, lsl #2]
	ldp	w8, w9, [x19]
	cmp	w8, w9
	b.ne	LBB0_38
; %bb.28:
Lloh36:
	adrp	x8, _CMD_STATE_RESP_RECEIVED@GOTPAGE
Lloh37:
	ldr	x8, [x8, _CMD_STATE_RESP_RECEIVED@GOTPAGEOFF]
	b	LBB0_31
LBB0_29:
	add	x22, x19, #40
	mov	x0, x22
	bl	_spin_lock_irqsave
	ldr	x8, [x19, #56]
	cbz	x8, LBB0_35
; %bb.30:
	ldr	x8, [x19, #8]
	str	w21, [x8]
	mov	w8, #1
	str	w8, [x19]
Lloh38:
	adrp	x8, _CMD_STATE_ERROR_RECEIVED@GOTPAGE
Lloh39:
	ldr	x8, [x8, _CMD_STATE_ERROR_RECEIVED@GOTPAGEOFF]
LBB0_31:
	ldr	x8, [x8]
	str	x8, [x19, #48]
	add	x0, x19, #44
	bl	_complete
	b	LBB0_38
LBB0_32:
Lloh40:
	adrp	x1, l_.str.1@PAGE
Lloh41:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_dev_err
LBB0_33:
	mov	x0, x21
	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
	b	_spin_unlock_irqrestore
LBB0_34:
Lloh42:
	adrp	x1, l_.str.3@PAGE
Lloh43:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_37
LBB0_35:
Lloh44:
	adrp	x1, l_.str.5@PAGE
Lloh45:
	add	x1, x1, l_.str.5@PAGEOFF
	b	LBB0_37
LBB0_36:
Lloh46:
	adrp	x1, l_.str.4@PAGE
Lloh47:
	add	x1, x1, l_.str.4@PAGEOFF
LBB0_37:
	mov	x0, x20
	bl	_dev_err
LBB0_38:
	mov	x0, x22
	bl	_spin_unlock_irqrestore
LBB0_39:
	mov	x0, x19
	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
	b	_olpc_xo175_ec_read_packet
LBB0_40:
Lloh48:
	adrp	x1, l_.str.11@PAGE
Lloh49:
	add	x1, x1, l_.str.11@PAGEOFF
	mov	x0, x20
	mov	x2, x21
	bl	_dev_dbg
	b	LBB0_39
LBB0_41:
	ldr	x0, [x19, #32]
Lloh50:
	adrp	x20, _KEY_POWER@GOTPAGE
Lloh51:
	ldr	x20, [x20, _KEY_POWER@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	w2, #1
	bl	_input_report_key
	ldr	x0, [x19, #32]
	bl	_input_sync
	ldr	x0, [x19, #32]
	ldr	w1, [x20]
	mov	w2, #0
	bl	_input_report_key
	ldr	x0, [x19, #32]
	bl	_input_sync
LBB0_42:
	ldr	x8, [x19, #32]
	ldr	w0, [x8]
Lloh52:
	adrp	x8, _PM_WAKEUP_TIME@GOTPAGE
Lloh53:
	ldr	x8, [x8, _PM_WAKEUP_TIME@GOTPAGEOFF]
Lloh54:
	ldr	w1, [x8]
	bl	_pm_wakeup_event
	b	LBB0_39
LBB0_43:
Lloh55:
	adrp	x0, l_.str.9@PAGE
Lloh56:
	add	x0, x0, l_.str.9@PAGEOFF
LBB0_44:
	bl	_power_supply_get_by_name
	cbz	x0, LBB0_39
; %bb.45:
	mov	x20, x0
	bl	_power_supply_changed
	mov	x0, x20
	bl	_power_supply_put
	b	LBB0_39
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh36, Lloh37
	.loh AdrpLdrGot	Lloh38, Lloh39
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpAdd	Lloh44, Lloh45
	.loh AdrpAdd	Lloh46, Lloh47
	.loh AdrpAdd	Lloh48, Lloh49
	.loh AdrpLdrGot	Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpAdd	Lloh55, Lloh56
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_7-LBB0_7)>>2
	.byte	(LBB0_16-LBB0_7)>>2
	.byte	(LBB0_8-LBB0_7)>>2
	.byte	(LBB0_19-LBB0_7)>>2
	.byte	(LBB0_12-LBB0_7)>>2
	.byte	(LBB0_21-LBB0_7)>>2
	.byte	(LBB0_25-LBB0_7)>>2
	.byte	(LBB0_29-LBB0_7)>>2
lJTI0_1:
	.byte	(LBB0_42-LBB0_14)>>2
	.byte	(LBB0_42-LBB0_14)>>2
	.byte	(LBB0_41-LBB0_14)>>2
	.byte	(LBB0_14-LBB0_14)>>2
	.byte	(LBB0_14-LBB0_14)>>2
	.byte	(LBB0_14-LBB0_14)>>2
	.byte	(LBB0_14-LBB0_14)>>2
	.byte	(LBB0_43-LBB0_14)>>2
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SPI transfer failed: %d\n"

	.comm	_CMD_STATE_ERROR_RECEIVED,8,3   ; @CMD_STATE_ERROR_RECEIVED
	.comm	_EINTR,4,2                      ; @EINTR
l_.str.1:                               ; @.str.1
	.asciz	"spurious FIFO read packet\n"

	.comm	_CMD_STATE_CMD_SENT,8,3         ; @CMD_STATE_CMD_SENT
l_.str.2:                               ; @.str.2
	.asciz	"spurious SWITCH packet\n"

	.comm	_CMD_ECHO,4,2                   ; @CMD_ECHO
	.comm	_CMD_STATE_CMD_IN_TX_FIFO,8,3   ; @CMD_STATE_CMD_IN_TX_FIFO
l_.str.3:                               ; @.str.3
	.asciz	"spurious response packet\n"

l_.str.4:                               ; @.str.4
	.asciz	"too many response packets\n"

	.comm	_CMD_STATE_RESP_RECEIVED,8,3    ; @CMD_STATE_RESP_RECEIVED
l_.str.5:                               ; @.str.5
	.asciz	"spurious cmd error packet\n"

l_.str.6:                               ; @.str.6
	.asciz	"keyboard is not supported\n"

l_.str.7:                               ; @.str.7
	.asciz	"touchpad is not supported\n"

l_.str.8:                               ; @.str.8
	.asciz	"got event %.2x\n"

l_.str.9:                               ; @.str.9
	.asciz	"olpc-ac"

l_.str.10:                              ; @.str.10
	.asciz	"olpc-battery"

	.comm	_KEY_POWER,4,2                  ; @KEY_POWER
	.comm	_PM_WAKEUP_TIME,4,2             ; @PM_WAKEUP_TIME
l_.str.11:                              ; @.str.11
	.asciz	"ignored unknown event %.2x\n"

	.comm	_LOG_BUF_SIZE,4,2               ; @LOG_BUF_SIZE
l_.str.12:                              ; @.str.12
	.asciz	"unknown channel: %d, %.2x\n"

	.no_dead_strip	_olpc_xo175_ec_complete
.subsections_via_symbols
