	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_olpc_ec_cmd                    ## -- Begin function olpc_ec_cmd
	.p2align	4, 0x90
_olpc_ec_cmd:                           ## @olpc_ec_cmd
	.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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_ec_driver@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rcx, %r12
	movq	%rdx, %r13
	movq	%rsi, %rbx
	movl	%edi, %r14d
	movq	%r8, -48(%rbp)                  ## 8-byte Spill
	movq	_ec_priv@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r15
	xorl	%edi, %edi
	cmpl	$0, (%rax)
	sete	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_1:
	movq	_EPROBE_DEFER@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_5:
	testq	%r15, %r15
	je	LBB0_6
## %bb.7:
	movl	(%r15), %edi
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_6:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_10:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	xorl	%eax, %eax
	callq	_might_sleep
	movl	%r14d, -56(%rbp)
	movq	%rbx, -64(%rbp)
	movq	%r12, -72(%rbp)
	movq	%r13, -96(%rbp)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, -88(%rbp)
	movl	$0, -80(%rbp)
	leaq	-76(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_init_completion
	leaq	-96(%rbp), %rdi
	movq	%r15, %rsi
	callq	_queue_ec_descriptor
	movq	%rbx, %rdi
	callq	_wait_for_completion
	movl	-80(%rbp), %eax
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_ec_priv,8,3                    ## @ec_priv
	.comm	_ec_driver,8,3                  ## @ec_driver
	.comm	_EPROBE_DEFER,4,2               ## @EPROBE_DEFER
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_EBUSY,4,2                      ## @EBUSY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_olpc_ec_cmd                    ; -- Begin function olpc_ec_cmd
	.p2align	2
_olpc_ec_cmd:                           ; @olpc_ec_cmd
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
Lloh0:
	adrp	x8, _ec_driver@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ec_driver@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_3
; %bb.1:
	mov	x20, x4
	mov	x22, x3
	mov	x21, x2
	mov	x23, x1
	mov	x24, x0
Lloh3:
	adrp	x9, _ec_priv@GOTPAGE
Lloh4:
	ldr	x9, [x9, _ec_priv@GOTPAGEOFF]
Lloh5:
	ldr	x19, [x9]
	ldr	w8, [x8]
	cmp	w8, #0
	cset	w0, eq
	bl	_WARN_ON
	cbz	x0, LBB0_4
; %bb.2:
Lloh6:
	adrp	x8, _ENODEV@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_8
LBB0_3:
Lloh8:
	adrp	x8, _EPROBE_DEFER@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EPROBE_DEFER@GOTPAGEOFF]
	b	LBB0_8
LBB0_4:
	cbz	x19, LBB0_7
; %bb.5:
	ldr	w0, [x19]
	bl	_WARN_ON
	cbz	x0, LBB0_10
; %bb.6:
Lloh10:
	adrp	x8, _EBUSY@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh12:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_10:
	bl	_might_sleep
	str	w24, [sp, #40]
	stp	x22, x23, [sp, #24]
	stp	x21, x20, [sp]
	mov	x8, sp
	add	x20, x8, #20
	str	wzr, [sp, #16]
	mov	x0, x20
	bl	_init_completion
	mov	x0, sp
	mov	x1, x19
	bl	_queue_ec_descriptor
	mov	x0, x20
	bl	_wait_for_completion
	ldr	w0, [sp, #16]
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_ec_priv,8,3                    ; @ec_priv
	.comm	_ec_driver,8,3                  ; @ec_driver
	.comm	_EPROBE_DEFER,4,2               ; @EPROBE_DEFER
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_EBUSY,4,2                      ; @EBUSY
.subsections_via_symbols
