	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function olpc_ec_probe
_olpc_ec_probe:                         ## @olpc_ec_probe
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	$0, -40(%rbp)
	movq	_ec_driver@GOTPCREL(%rip), %rbx
	cmpq	$0, (%rbx)
	je	LBB0_1
## %bb.3:
	movq	%rdi, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$40, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %r15
	movq	(%rbx), %rax
	movq	%rax, 32(%r15)
	leaq	28(%r15), %rdi
	movq	_olpc_ec_worker@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_INIT_WORK
	leaq	24(%r15), %rdi
	callq	_mutex_init
	leaq	20(%r15), %rdi
	callq	_INIT_LIST_HEAD
	leaq	16(%r15), %rdi
	callq	_spin_lock_init
	movq	_ec_priv@GOTPCREL(%rip), %r12
	movq	%r15, (%r12)
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_platform_set_drvdata
	movq	_EC_FIRMWARE_REV@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r15, %rcx
	addq	$12, %rcx
	xorl	%esi, %esi
	xorl	%edx, %edx
	movl	$1, %r8d
	callq	_olpc_ec_cmd
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movl	%eax, %ebx
	movq	$0, (%r12)
	movq	%r15, %rdi
	callq	_kfree
	jmp	LBB0_10
LBB0_1:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_10:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movl	(%r14), %eax
	movl	%eax, -40(%rbp)
	movq	%r15, -48(%rbp)
	movl	$1, (%r15)
	movq	_dcon_desc@GOTPCREL(%rip), %rsi
	leaq	-48(%rbp), %rdx
	movq	%r14, %rdi
	callq	_devm_regulator_register
	movl	%eax, 8(%r15)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	movl	8(%r15), %edi
	callq	_PTR_ERR
	movl	%eax, %ebx
	jmp	LBB0_10
LBB0_9:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_olpc_ec_setup_debugfs
	movl	%eax, 4(%r15)
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_ec_driver,8,3                  ## @ec_driver
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_olpc_ec_worker,4,2             ## @olpc_ec_worker
	.comm	_ec_priv,8,3                    ## @ec_priv
	.comm	_EC_FIRMWARE_REV,4,2            ## @EC_FIRMWARE_REV
	.comm	_dcon_desc,4,2                  ## @dcon_desc
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to register DCON regulator\n"

	.no_dead_strip	_olpc_ec_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function olpc_ec_probe
_olpc_ec_probe:                         ; @olpc_ec_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	str	xzr, [sp, #8]
Lloh0:
	adrp	x21, _ec_driver@GOTPAGE
Lloh1:
	ldr	x21, [x21, _ec_driver@GOTPAGEOFF]
	ldr	x8, [x21]
	cbz	x8, LBB0_4
; %bb.1:
	mov	x19, x0
Lloh2:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	w0, #40
	bl	_kzalloc
	cbz	x0, LBB0_5
; %bb.2:
	mov	x20, x0
	ldr	x8, [x21]
	str	x8, [x0, #32]
	add	x0, x0, #28
Lloh5:
	adrp	x8, _olpc_ec_worker@GOTPAGE
Lloh6:
	ldr	x8, [x8, _olpc_ec_worker@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	bl	_INIT_WORK
	add	x0, x20, #24
	bl	_mutex_init
	add	x0, x20, #20
	bl	_INIT_LIST_HEAD
	add	x0, x20, #16
	bl	_spin_lock_init
Lloh8:
	adrp	x22, _ec_priv@GOTPAGE
Lloh9:
	ldr	x22, [x22, _ec_priv@GOTPAGEOFF]
	str	x20, [x22]
	mov	x0, x19
	mov	x1, x20
	bl	_platform_set_drvdata
Lloh10:
	adrp	x8, _EC_FIRMWARE_REV@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EC_FIRMWARE_REV@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	add	x3, x20, #12
	mov	w23, #1
	mov	x1, #0
	mov	w2, #0
	mov	w4, #1
	bl	_olpc_ec_cmd
	cbz	w0, LBB0_8
; %bb.3:
	mov	x21, x0
	str	xzr, [x22]
	mov	x0, x20
	bl	_kfree
	b	LBB0_7
LBB0_4:
Lloh13:
	adrp	x8, _ENODEV@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
Lloh15:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_7:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_8:
	ldr	w8, [x19]
	str	w8, [sp, #8]
	str	x20, [sp]
	str	w23, [x20]
Lloh17:
	adrp	x1, _dcon_desc@GOTPAGE
Lloh18:
	ldr	x1, [x1, _dcon_desc@GOTPAGEOFF]
	mov	x2, sp
	mov	x0, x19
	bl	_devm_regulator_register
	str	w0, [x20, #8]
	bl	_IS_ERR
	cbz	x0, LBB0_10
; %bb.9:
Lloh19:
	adrp	x1, l_.str@PAGE
Lloh20:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	ldr	w0, [x20, #8]
	bl	_PTR_ERR
	mov	x21, x0
	b	LBB0_7
LBB0_10:
	bl	_olpc_ec_setup_debugfs
	mov	w21, #0
	str	w0, [x20, #4]
	b	LBB0_7
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_ec_driver,8,3                  ; @ec_driver
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_olpc_ec_worker,4,2             ; @olpc_ec_worker
	.comm	_ec_priv,8,3                    ; @ec_priv
	.comm	_EC_FIRMWARE_REV,4,2            ; @EC_FIRMWARE_REV
	.comm	_dcon_desc,4,2                  ; @dcon_desc
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to register DCON regulator\n"

	.no_dead_strip	_olpc_ec_probe
.subsections_via_symbols
