	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function s5c73m3_check_status
_s5c73m3_check_status:                  ## @s5c73m3_check_status
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r13d
	movq	%rdi, %r15
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movl	$2000, %edi                     ## imm = 0x7D0
	callq	_msecs_to_jiffies
	movq	%rax, %r12
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	addq	%rbx, %r12
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	_REG_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	leaq	-44(%rbp), %rdx
	callq	_s5c73m3_read
	movl	%eax, %ebx
	movl	-44(%rbp), %eax
	testl	%ebx, %ebx
	js	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpl	%r13d, %eax
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$500, %edi                      ## imm = 0x1F4
	movl	$1000, %esi                     ## imm = 0x3E8
	callq	_usleep_range
	movq	%r12, %rdi
	callq	_time_is_after_jiffies
	decl	%r14d
	testq	%rax, %rax
	jne	LBB0_1
	jmp	LBB0_5
LBB0_4:
	testl	%r14d, %r14d
	je	LBB0_6
LBB0_5:
	movq	_s5c73m3_dbg@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	subq	-64(%rbp), %rdi                 ## 8-byte Folded Reload
	callq	_jiffies_to_msecs
	leaq	L_.str(%rip), %rcx
	movl	$1, %edi
	movl	%r12d, %esi
	movq	%r15, %rdx
	movl	%eax, %r8d
	callq	_v4l2_dbg
	movl	-44(%rbp), %eax
LBB0_6:
	testl	%ebx, %ebx
	jne	LBB0_9
## %bb.7:
	cmpl	%r13d, %eax
	je	LBB0_9
## %bb.8:
	movl	$0, -52(%rbp)
	movl	$0, -48(%rbp)
	movq	_REG_I2C_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-52(%rbp), %rdx
	movq	%r15, %rdi
	callq	_s5c73m3_read
	movq	_REG_I2C_SEQ_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdx
	movq	%r15, %rdi
	callq	_s5c73m3_read
	movl	-44(%rbp), %edx
	movl	-52(%rbp), %r8d
	movl	-48(%rbp), %r9d
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	movl	%r13d, %ecx
	callq	_v4l2_err
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_REG_STATUS,4,2                 ## @REG_STATUS
	.comm	_s5c73m3_dbg,4,2                ## @s5c73m3_dbg
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"status check took %dms\n"

	.comm	_REG_I2C_STATUS,4,2             ## @REG_I2C_STATUS
	.comm	_REG_I2C_SEQ_STATUS,4,2         ## @REG_I2C_SEQ_STATUS
L_.str.1:                               ## @.str.1
	.asciz	"wrong status %#x, expected: %#x, i2c_status: %#x/%#x\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.no_dead_strip	_s5c73m3_check_status
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function s5c73m3_check_status
_s5c73m3_check_status:                  ; @s5c73m3_check_status
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x23, _jiffies@GOTPAGE
Lloh1:
	ldr	x23, [x23, _jiffies@GOTPAGEOFF]
	ldr	x24, [x23]
	mov	w0, #2000
	bl	_msecs_to_jiffies
	mov	w25, #0
	add	x22, x0, x24
Lloh2:
	adrp	x26, _REG_STATUS@GOTPAGE
Lloh3:
	ldr	x26, [x26, _REG_STATUS@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x26]
	add	x2, sp, #12
	mov	x0, x20
	bl	_s5c73m3_read
	mov	x21, x0
	ldr	w8, [sp, #12]
	tbnz	w0, #31, LBB0_4
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	cmp	w8, w19
	b.eq	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w0, #500
	mov	w1, #1000
	bl	_usleep_range
	mov	x0, x22
	bl	_time_is_after_jiffies
	sub	w25, w25, #1
	cbnz	x0, LBB0_1
	b	LBB0_5
LBB0_4:
	cbz	w25, LBB0_6
LBB0_5:
Lloh4:
	adrp	x8, _s5c73m3_dbg@GOTPAGE
Lloh5:
	ldr	x8, [x8, _s5c73m3_dbg@GOTPAGEOFF]
Lloh6:
	ldr	w22, [x8]
	ldr	x8, [x23]
	sub	x0, x8, x24
	bl	_jiffies_to_msecs
	mov	x4, x0
Lloh7:
	adrp	x3, l_.str@PAGE
Lloh8:
	add	x3, x3, l_.str@PAGEOFF
	mov	w0, #1
	mov	x1, x22
	mov	x2, x20
	bl	_v4l2_dbg
	ldr	w8, [sp, #12]
LBB0_6:
	cmp	w21, #0
	ccmp	w8, w19, #4, eq
	b.eq	LBB0_8
; %bb.7:
	stp	wzr, wzr, [sp, #4]
Lloh9:
	adrp	x8, _REG_I2C_STATUS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _REG_I2C_STATUS@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x0, x20
	bl	_s5c73m3_read
Lloh12:
	adrp	x8, _REG_I2C_SEQ_STATUS@GOTPAGE
Lloh13:
	ldr	x8, [x8, _REG_I2C_SEQ_STATUS@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	add	x2, sp, #4
	mov	x0, x20
	bl	_s5c73m3_read
	ldp	w4, w2, [sp, #8]
	ldr	w5, [sp, #4]
Lloh15:
	adrp	x1, l_.str.1@PAGE
Lloh16:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	x3, x19
	bl	_v4l2_err
Lloh17:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_8:
	mov	x0, x21
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_REG_STATUS,4,2                 ; @REG_STATUS
	.comm	_s5c73m3_dbg,4,2                ; @s5c73m3_dbg
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"status check took %dms\n"

	.comm	_REG_I2C_STATUS,4,2             ; @REG_I2C_STATUS
	.comm	_REG_I2C_SEQ_STATUS,4,2         ; @REG_I2C_SEQ_STATUS
l_.str.1:                               ; @.str.1
	.asciz	"wrong status %#x, expected: %#x, i2c_status: %#x/%#x\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.no_dead_strip	_s5c73m3_check_status
.subsections_via_symbols
