	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cros_ec_register               ## -- Begin function cros_ec_register
	.p2align	4, 0x90
_cros_ec_register:                      ## @cros_ec_register
	.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, %rbx
	movq	16(%rdi), %r14
	addq	$84, %rdi
	callq	_BLOCKING_INIT_NOTIFIER_HEAD
	movabsq	$17179869188, %rax              ## imm = 0x400000004
	movq	%rax, (%rbx)
	movq	$0, 40(%rbx)
	movl	80(%rbx), %esi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	movq	%r14, %rdi
	callq	_devm_kzalloc
	movq	%rax, 72(%rbx)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movl	64(%rbx), %esi
	movl	(%r15), %edx
	movq	%r14, %rdi
	callq	_devm_kzalloc
	movq	%rax, 56(%rbx)
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	leaq	48(%rbx), %rdi
	callq	_mutex_init
	movq	%rbx, %rdi
	callq	_cros_ec_query_all
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	%eax, %r15d
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_21
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_21:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movl	8(%rbx), %esi
	testl	%esi, %esi
	je	LBB0_8
## %bb.6:
	movq	_ec_irq_thread@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_IRQF_TRIGGER_LOW@GOTPCREL(%rip), %rax
	movq	_IRQF_ONESHOT@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r8d
	orl	(%rax), %r8d
	movq	%rbx, (%rsp)
	leaq	L_.str.1(%rip), %r9
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_devm_request_threaded_irq
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movl	%eax, %r15d
	movl	8(%rbx), %edx
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_21
LBB0_8:
	movq	16(%rbx), %rdi
	movq	_PLATFORM_DEVID_AUTO@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	leaq	L_.str.3(%rip), %rsi
	movq	_ec_p@GOTPCREL(%rip), %rcx
	movl	$4, %r8d
	callq	_platform_device_register_data
	movq	%rax, 24(%rbx)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_11
## %bb.9:
	movq	16(%rbx), %rdi
	leaq	L_.str.4(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_err
	movq	24(%rbx), %rdi
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_11:
	cmpq	$0, 40(%rbx)
	je	LBB0_14
## %bb.12:
	movq	16(%rbx), %rdi
	movl	(%r15), %edx
	leaq	L_.str.3(%rip), %rsi
	movq	_pd_p@GOTPCREL(%rip), %rcx
	movl	$4, %r8d
	callq	_platform_device_register_data
	movq	%rax, 32(%rbx)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:
	movq	16(%rbx), %rdi
	leaq	L_.str.5(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_err
	movq	24(%rbx), %rdi
	callq	_platform_device_unregister
	movq	32(%rbx), %rdi
	jmp	LBB0_10
LBB0_14:
	movq	_CONFIG_OF@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_IS_ENABLED
	testq	%rax, %rax
	je	LBB0_18
## %bb.15:
	cmpq	$0, (%r14)
	je	LBB0_18
## %bb.16:
	movq	%r14, %rdi
	callq	_devm_of_platform_populate
	testl	%eax, %eax
	je	LBB0_18
## %bb.17:
	movl	%eax, %r15d
	movq	32(%rbx), %rdi
	callq	_platform_device_unregister
	movq	24(%rbx), %rdi
	callq	_platform_device_unregister
	leaq	L_.str.6(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_21
LBB0_18:
	xorl	%r15d, %r15d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_cros_ec_sleep_event
	testl	%eax, %eax
	jns	LBB0_20
## %bb.19:
	movq	16(%rbx), %rdi
	leaq	L_.str.7(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_dbg
LBB0_20:
	leaq	L_.str.8(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_info
	jmp	LBB0_21
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Cannot identify the EC: error %d\n"

	.comm	_ec_irq_thread,4,2              ## @ec_irq_thread
	.comm	_IRQF_TRIGGER_LOW,4,2           ## @IRQF_TRIGGER_LOW
	.comm	_IRQF_ONESHOT,4,2               ## @IRQF_ONESHOT
L_.str.1:                               ## @.str.1
	.asciz	"chromeos-ec"

L_.str.2:                               ## @.str.2
	.asciz	"Failed to request IRQ %d: %d"

L_.str.3:                               ## @.str.3
	.asciz	"cros-ec-dev"

	.comm	_PLATFORM_DEVID_AUTO,4,2        ## @PLATFORM_DEVID_AUTO
	.comm	_ec_p,4,2                       ## @ec_p
L_.str.4:                               ## @.str.4
	.asciz	"Failed to create CrOS EC platform device\n"

	.comm	_pd_p,4,2                       ## @pd_p
L_.str.5:                               ## @.str.5
	.asciz	"Failed to create CrOS PD platform device\n"

	.comm	_CONFIG_OF,4,2                  ## @CONFIG_OF
L_.str.6:                               ## @.str.6
	.asciz	"Failed to register sub-devices\n"

L_.str.7:                               ## @.str.7
	.asciz	"Error %d clearing sleep event to ec"

L_.str.8:                               ## @.str.8
	.asciz	"Chrome EC device registered\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cros_ec_register               ; -- Begin function cros_ec_register
	.p2align	2
_cros_ec_register:                      ; @cros_ec_register
	.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	x20, x0
	ldr	x19, [x0, #16]
	add	x0, x0, #84
	bl	_BLOCKING_INIT_NOTIFIER_HEAD
	movi.2s	v0, #4
	str	d0, [x20]
	str	xzr, [x20, #40]
	ldr	w1, [x20, #80]
Lloh0:
	adrp	x21, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x21, [x21, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w2, [x21]
	mov	x0, x19
	bl	_devm_kzalloc
	str	x0, [x20, #72]
	cbz	x0, LBB0_5
; %bb.1:
	ldr	w1, [x20, #64]
	ldr	w2, [x21]
	mov	x0, x19
	bl	_devm_kzalloc
	str	x0, [x20, #56]
	cbz	x0, LBB0_5
; %bb.2:
	add	x0, x20, #48
	bl	_mutex_init
	mov	x0, x20
	bl	_cros_ec_query_all
	cbz	w0, LBB0_7
; %bb.3:
	mov	x21, x0
	str	x21, [sp]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
LBB0_4:
	mov	x0, x19
	bl	_dev_err
	b	LBB0_6
LBB0_5:
Lloh4:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_6:
	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
	ret
LBB0_7:
	ldr	w1, [x20, #8]
	cbz	w1, LBB0_10
; %bb.8:
Lloh7:
	adrp	x8, _ec_irq_thread@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ec_irq_thread@GOTPAGEOFF]
Lloh9:
	adrp	x9, _IRQF_TRIGGER_LOW@GOTPAGE
Lloh10:
	ldr	x9, [x9, _IRQF_TRIGGER_LOW@GOTPAGEOFF]
Lloh11:
	ldr	w3, [x8]
Lloh12:
	ldr	w8, [x9]
Lloh13:
	adrp	x9, _IRQF_ONESHOT@GOTPAGE
Lloh14:
	ldr	x9, [x9, _IRQF_ONESHOT@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	orr	w4, w9, w8
Lloh16:
	adrp	x5, l_.str.1@PAGE
Lloh17:
	add	x5, x5, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x2, #0
	mov	x6, x20
	bl	_devm_request_threaded_irq
	cbz	w0, LBB0_10
; %bb.9:
	mov	x21, x0
	ldr	w8, [x20, #8]
	stp	x8, x21, [sp]
Lloh18:
	adrp	x1, l_.str.2@PAGE
Lloh19:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_dev_err
                                        ; kill: def $w21 killed $w21 killed $x21 def $x21
	b	LBB0_6
LBB0_10:
	ldr	x0, [x20, #16]
Lloh20:
	adrp	x21, _PLATFORM_DEVID_AUTO@GOTPAGE
Lloh21:
	ldr	x21, [x21, _PLATFORM_DEVID_AUTO@GOTPAGEOFF]
	ldr	w2, [x21]
Lloh22:
	adrp	x1, l_.str.3@PAGE
Lloh23:
	add	x1, x1, l_.str.3@PAGEOFF
Lloh24:
	adrp	x3, _ec_p@GOTPAGE
Lloh25:
	ldr	x3, [x3, _ec_p@GOTPAGEOFF]
	mov	w4, #4
	bl	_platform_device_register_data
	str	x0, [x20, #24]
	bl	_IS_ERR
	cbz	x0, LBB0_13
; %bb.11:
	ldr	x0, [x20, #16]
Lloh26:
	adrp	x1, l_.str.4@PAGE
Lloh27:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_dev_err
	ldr	x0, [x20, #24]
LBB0_12:
	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	_PTR_ERR
LBB0_13:
	ldr	x8, [x20, #40]
	cbz	x8, LBB0_16
; %bb.14:
	ldr	x0, [x20, #16]
	ldr	w2, [x21]
Lloh28:
	adrp	x1, l_.str.3@PAGE
Lloh29:
	add	x1, x1, l_.str.3@PAGEOFF
Lloh30:
	adrp	x3, _pd_p@GOTPAGE
Lloh31:
	ldr	x3, [x3, _pd_p@GOTPAGEOFF]
	mov	w4, #4
	bl	_platform_device_register_data
	str	x0, [x20, #32]
	bl	_IS_ERR
	cbz	x0, LBB0_16
; %bb.15:
	ldr	x0, [x20, #16]
Lloh32:
	adrp	x1, l_.str.5@PAGE
Lloh33:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_dev_err
	ldr	x0, [x20, #24]
	bl	_platform_device_unregister
	ldr	x0, [x20, #32]
	b	LBB0_12
LBB0_16:
Lloh34:
	adrp	x8, _CONFIG_OF@GOTPAGE
Lloh35:
	ldr	x8, [x8, _CONFIG_OF@GOTPAGEOFF]
Lloh36:
	ldr	w0, [x8]
	bl	_IS_ENABLED
	cbz	x0, LBB0_20
; %bb.17:
	ldr	x8, [x19]
	cbz	x8, LBB0_20
; %bb.18:
	mov	x0, x19
	bl	_devm_of_platform_populate
	cbz	w0, LBB0_20
; %bb.19:
	mov	x21, x0
	ldr	x0, [x20, #32]
	bl	_platform_device_unregister
	ldr	x0, [x20, #24]
	bl	_platform_device_unregister
Lloh37:
	adrp	x1, l_.str.6@PAGE
Lloh38:
	add	x1, x1, l_.str.6@PAGEOFF
	b	LBB0_4
LBB0_20:
	mov	x0, x20
	mov	w1, #0
	bl	_cros_ec_sleep_event
	tbz	w0, #31, LBB0_22
; %bb.21:
	mov	x2, x0
	ldr	x0, [x20, #16]
Lloh39:
	adrp	x1, l_.str.7@PAGE
Lloh40:
	add	x1, x1, l_.str.7@PAGEOFF
	bl	_dev_dbg
LBB0_22:
Lloh41:
	adrp	x1, l_.str.8@PAGE
Lloh42:
	add	x1, x1, l_.str.8@PAGEOFF
	mov	x0, x19
	bl	_dev_info
	mov	w21, #0
	b	LBB0_6
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh11
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpAdd	Lloh41, Lloh42
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Cannot identify the EC: error %d\n"

	.comm	_ec_irq_thread,4,2              ; @ec_irq_thread
	.comm	_IRQF_TRIGGER_LOW,4,2           ; @IRQF_TRIGGER_LOW
	.comm	_IRQF_ONESHOT,4,2               ; @IRQF_ONESHOT
l_.str.1:                               ; @.str.1
	.asciz	"chromeos-ec"

l_.str.2:                               ; @.str.2
	.asciz	"Failed to request IRQ %d: %d"

l_.str.3:                               ; @.str.3
	.asciz	"cros-ec-dev"

	.comm	_PLATFORM_DEVID_AUTO,4,2        ; @PLATFORM_DEVID_AUTO
	.comm	_ec_p,4,2                       ; @ec_p
l_.str.4:                               ; @.str.4
	.asciz	"Failed to create CrOS EC platform device\n"

	.comm	_pd_p,4,2                       ; @pd_p
l_.str.5:                               ; @.str.5
	.asciz	"Failed to create CrOS PD platform device\n"

	.comm	_CONFIG_OF,4,2                  ; @CONFIG_OF
l_.str.6:                               ; @.str.6
	.asciz	"Failed to register sub-devices\n"

l_.str.7:                               ; @.str.7
	.asciz	"Error %d clearing sleep event to ec"

l_.str.8:                               ; @.str.8
	.asciz	"Chrome EC device registered\n"

.subsections_via_symbols
