	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function octeon_i2c_wait
_octeon_i2c_wait:                       ## @octeon_i2c_wait
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	cmpl	$0, (%rdi)
	je	LBB0_6
## %bb.1:
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_get_jiffies_64
	movq	%rax, %r14
	addq	24(%rbx), %r14
	movq	%rbx, %rdi
	callq	_octeon_i2c_test_iflg
	testq	%rax, %rax
	jne	LBB0_5
## %bb.2:
	movq	_I2C_OCTEON_EVENT_WAIT@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%eax, %eax
	callq	_get_jiffies_64
	movq	%rax, %rdi
	movq	%r14, %rsi
	callq	_time_before64
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	(%r12), %esi
	movl	%esi, %edi
	shrl	$31, %edi
	addl	%esi, %edi
	sarl	%edi
	callq	_usleep_range
	movq	%rbx, %rdi
	callq	_octeon_i2c_test_iflg
	testq	%rax, %rax
	je	LBB0_3
LBB0_5:
	movq	%rbx, %rdi
	callq	_octeon_i2c_test_iflg
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rdx
	xorl	%ecx, %ecx
	subl	(%rdx), %ecx
	testq	%rax, %rax
	cmovnel	%r15d, %ecx
	jmp	LBB0_12
LBB0_6:
	movq	%rbx, %rdi
	callq	*40(%rbx)
	movl	32(%rbx), %r14d
	movq	%rbx, %rdi
	callq	_octeon_i2c_test_iflg
	movq	24(%rbx), %rdx
	movl	%r14d, %edi
	movq	%rax, %rsi
	callq	_wait_event_timeout
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	*16(%rbx)
	cmpq	$0, 8(%rbx)
	je	LBB0_10
## %bb.7:
	testq	%r14, %r14
	jne	LBB0_10
## %bb.8:
	movq	%rbx, %rdi
	callq	_octeon_i2c_test_iflg
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movl	4(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movl	$1, (%rbx)
	xorl	%ecx, %ecx
	jmp	LBB0_12
LBB0_10:
	xorl	%ecx, %ecx
	testq	%r14, %r14
	jne	LBB0_12
## %bb.11:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
LBB0_12:
	movl	%ecx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_OCTEON_EVENT_WAIT,4,2      ## @I2C_OCTEON_EVENT_WAIT
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"broken irq connection detected, switching to polling mode.\n"

	.no_dead_strip	_octeon_i2c_wait
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function octeon_i2c_wait
_octeon_i2c_wait:                       ; @octeon_i2c_wait
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	ldr	w8, [x0]
	cbz	w8, LBB0_6
; %bb.1:
	bl	_get_jiffies_64
	mov	x20, x0
	ldr	x21, [x19, #24]
	mov	x0, x19
	bl	_octeon_i2c_test_iflg
	cbnz	x0, LBB0_5
; %bb.2:
	add	x20, x21, x20
Lloh0:
	adrp	x21, _I2C_OCTEON_EVENT_WAIT@GOTPAGE
Lloh1:
	ldr	x21, [x21, _I2C_OCTEON_EVENT_WAIT@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	bl	_get_jiffies_64
	mov	x1, x20
	bl	_time_before64
	cbz	x0, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w1, [x21]
	cmp	w1, #0
	cinc	w8, w1, lt
	asr	w0, w8, #1
	bl	_usleep_range
	mov	x0, x19
	bl	_octeon_i2c_test_iflg
	cbz	x0, LBB0_3
LBB0_5:
	mov	x0, x19
	bl	_octeon_i2c_test_iflg
Lloh2:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmp	x0, #0
	csneg	w0, wzr, w8, ne
	b	LBB0_13
LBB0_6:
	ldr	x8, [x19, #40]
	mov	x0, x19
	blr	x8
	ldr	w20, [x19, #32]
	mov	x0, x19
	bl	_octeon_i2c_test_iflg
	mov	x1, x0
	ldr	x2, [x19, #24]
	mov	x0, x20
	bl	_wait_event_timeout
	mov	x20, x0
	ldr	x8, [x19, #16]
	mov	x0, x19
	blr	x8
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_10
; %bb.7:
	cbnz	x20, LBB0_10
; %bb.8:
	mov	x0, x19
	bl	_octeon_i2c_test_iflg
	cbz	x0, LBB0_10
; %bb.9:
	ldr	w0, [x19, #4]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	mov	w0, #0
	mov	w8, #1
	str	w8, [x19]
	b	LBB0_13
LBB0_10:
	cbz	x20, LBB0_12
; %bb.11:
	mov	w0, #0
	b	LBB0_13
LBB0_12:
Lloh7:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_13:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_OCTEON_EVENT_WAIT,4,2      ; @I2C_OCTEON_EVENT_WAIT
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"broken irq connection detected, switching to polling mode.\n"

	.no_dead_strip	_octeon_i2c_wait
.subsections_via_symbols
