	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cros_ec_sensors_read_until_not_busy
_cros_ec_sensors_read_until_not_busy:   ## @cros_ec_sensors_read_until_not_busy
	.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), %r12
	movq	_EC_MEMMAP_ACC_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %rdx
	movq	%r12, %rdi
	callq	_cros_ec_sensors_cmd_read_u8
	testl	%eax, %eax
	js	LBB0_8
## %bb.1:
	xorl	%ebx, %ebx
	movb	$1, %r13b
	movq	_EC_MEMMAP_ACC_STATUS_BUSY_BIT@GOTPCREL(%rip), %r15
	leaq	-44(%rbp), %r14
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_EC_MEMMAP_ACC_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movq	%r14, %rdx
	callq	_cros_ec_sensors_cmd_read_u8
	decl	%ebx
	incb	%r13b
	testl	%eax, %eax
	js	LBB0_8
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	-44(%rbp), %eax
	testl	%eax, (%r15)
	je	LBB0_8
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$-50, %ebx
	je	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movzbl	%r13b, %eax
	imull	$205, %eax, %eax
	shrl	$10, %eax
	leal	(%rax,%rax,4), %eax
	movb	$1, %cl
	subb	%al, %cl
	cmpb	%bl, %cl
	jne	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$25, %edi
	callq	_msleep
	jmp	LBB0_7
LBB0_4:
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EC_MEMMAP_ACC_STATUS,4,2       ## @EC_MEMMAP_ACC_STATUS
	.comm	_EC_MEMMAP_ACC_STATUS_BUSY_BIT,4,2 ## @EC_MEMMAP_ACC_STATUS_BUSY_BIT
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_cros_ec_sensors_read_until_not_busy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cros_ec_sensors_read_until_not_busy
_cros_ec_sensors_read_until_not_busy:   ; @cros_ec_sensors_read_until_not_busy
	.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
	ldr	x19, [x0]
Lloh0:
	adrp	x20, _EC_MEMMAP_ACC_STATUS@GOTPAGE
Lloh1:
	ldr	x20, [x20, _EC_MEMMAP_ACC_STATUS@GOTPAGEOFF]
	ldr	w1, [x20]
	add	x2, sp, #12
	mov	x0, x19
	bl	_cros_ec_sensors_cmd_read_u8
	tbnz	w0, #31, LBB0_8
; %bb.1:
	mov	w21, #1
Lloh2:
	adrp	x22, _EC_MEMMAP_ACC_STATUS_BUSY_BIT@GOTPAGE
Lloh3:
	ldr	x22, [x22, _EC_MEMMAP_ACC_STATUS_BUSY_BIT@GOTPAGEOFF]
	mov	w23, #52429
	movk	w23, #52428, lsl #16
	mov	w24, #858993459
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w1, [x20]
	add	x2, sp, #12
	mov	x0, x19
	bl	_cros_ec_sensors_cmd_read_u8
	add	w21, w21, #1
	tbnz	w0, #31, LBB0_8
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [sp, #12]
	ldr	w8, [x22]
	tst	w8, w0
	b.eq	LBB0_8
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	w21, #51
	b.eq	LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	and	w8, w21, #0xff
	mul	w8, w8, w23
	cmp	w8, w24
	b.hi	LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w0, #25
	bl	_msleep
	b	LBB0_2
LBB0_7:
Lloh4:
	adrp	x8, _EIO@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_EC_MEMMAP_ACC_STATUS,4,2       ; @EC_MEMMAP_ACC_STATUS
	.comm	_EC_MEMMAP_ACC_STATUS_BUSY_BIT,4,2 ; @EC_MEMMAP_ACC_STATUS_BUSY_BIT
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_cros_ec_sensors_read_until_not_busy
.subsections_via_symbols
