	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cros_ec_motion_send_host_cmd   ## -- Begin function cros_ec_motion_send_host_cmd
	.p2align	4, 0x90
_cros_ec_motion_send_host_cmd:          ## @cros_ec_motion_send_host_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	16(%rdi), %rax
	movl	(%rax), %eax
	testq	%rsi, %rsi
	je	LBB0_2
## %bb.1:
	movq	%rsi, %rdi
	movl	%eax, %esi
	callq	_min
LBB0_2:
	movq	(%rbx), %rcx
	movl	%eax, 8(%rcx)
	movq	(%rcx), %rdi
	leaq	24(%rbx), %rsi
	movl	$4, %edx
	callq	_memcpy
	movq	(%rbx), %rsi
	movq	16(%rbx), %rdi
	callq	_cros_ec_cmd_xfer_status
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	xorl	%r14d, %r14d
	testl	%eax, %eax
	je	LBB0_7
## %bb.5:
	movq	(%rbx), %rcx
	movq	8(%rbx), %rdi
	movq	(%rcx), %rsi
	cmpq	%rsi, %rdi
	je	LBB0_7
## %bb.6:
	movl	%eax, %edx
	callq	_memcpy
	jmp	LBB0_7
LBB0_3:
	movl	%eax, %r14d
LBB0_7:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cros_ec_motion_send_host_cmd   ; -- Begin function cros_ec_motion_send_host_cmd
	.p2align	2
_cros_ec_motion_send_host_cmd:          ; @cros_ec_motion_send_host_cmd
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	x8, [x0, #16]
	ldr	w8, [x8]
	cbz	x1, LBB0_2
; %bb.1:
	mov	x0, x1
	mov	x1, x8
	bl	_min
	mov	x8, x0
LBB0_2:
	ldr	x9, [x19]
	str	w8, [x9, #8]
	ldr	x0, [x9]
	add	x1, x19, #24
	mov	w2, #4
	bl	_memcpy
	ldr	x0, [x19, #16]
	ldr	x1, [x19]
	bl	_cros_ec_cmd_xfer_status
	mov	x2, x0
	tbnz	w0, #31, LBB0_7
; %bb.3:
	cbz	w2, LBB0_7
; %bb.4:
	ldp	x8, x0, [x19]
	ldr	x1, [x8]
	cmp	x0, x1
	b.eq	LBB0_6
; %bb.5:
	bl	_memcpy
LBB0_6:
	mov	w2, #0
LBB0_7:
	mov	x0, x2
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
