	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function flexcop_i2c_operation
_flexcop_i2c_operation:                 ## @flexcop_i2c_operation
	.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	$104, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movl	$1, 8(%rsi)
	movl	(%rsi), %esi
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_deb_i2c
	movq	_tw_sm_c_100@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	_ibi_zero@GOTPCREL(%rip), %rax
	movups	(%rax), %xmm0
	movups	16(%rax), %xmm1
	movups	%xmm1, 16(%rsp)
	movups	%xmm0, (%rsp)
	movq	%r12, %rdi
	callq	*8(%r12)
	movl	(%r14), %esi
	movups	(%rbx), %xmm0
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movups	16(%rbx), %xmm1
	movups	%xmm1, 16(%rsp)
	movups	%xmm0, (%rsp)
	movq	%r12, %rdi
	callq	*8(%r12)
	movq	_FC_MAX_I2C_RETRIES@GOTPCREL(%rip), %r15
	cmpl	$0, (%r15)
	movl	$0, %ebx
	jle	LBB0_7
## %bb.1:
	xorl	%ebx, %ebx
	leaq	-104(%rbp), %r13
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %edx
	movq	%r13, %rdi
	movq	%r12, %rsi
	callq	*(%r12)
	movups	-104(%rbp), %xmm0
	movaps	%xmm0, -64(%rbp)
	cmpl	$0, -80(%rbp)
	jne	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-88(%rbp), %rax
	testq	%rax, %rax
	jne	LBB0_4
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	incl	%ebx
	cmpl	(%r15), %ebx
	jl	LBB0_2
LBB0_7:
	leaq	L_.str.3(%rip), %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_deb_i2c
	movq	_EREMOTEIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	jmp	LBB0_8
LBB0_5:
	leaq	L_.str.2(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_deb_i2c
	movq	_EREMOTEIO@GOTPCREL(%rip), %rax
LBB0_8:
	subl	(%rax), %ebx
	jmp	LBB0_9
LBB0_4:
	movl	-76(%rbp), %ecx
	movaps	-64(%rbp), %xmm0
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movups	%xmm0, (%rdx)
	movq	%rax, 16(%rdx)
	movl	$0, 24(%rdx)
	movl	%ecx, 28(%rdx)
	leaq	L_.str.1(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_deb_i2c
LBB0_9:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_11
## %bb.10:
	movl	%ebx, %eax
	addq	$104, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"r100 before: %08x\n"

	.comm	_tw_sm_c_100,4,2                ## @tw_sm_c_100
	.comm	_ibi_zero,32,3                  ## @ibi_zero
	.comm	_FC_MAX_I2C_RETRIES,4,2         ## @FC_MAX_I2C_RETRIES
L_.str.1:                               ## @.str.1
	.asciz	"i2c success\n"

L_.str.2:                               ## @.str.2
	.asciz	"suffering from an i2c ack_error\n"

	.comm	_EREMOTEIO,4,2                  ## @EREMOTEIO
L_.str.3:                               ## @.str.3
	.asciz	"tried %d times i2c operation, never finished or too many ack errors.\n"

	.no_dead_strip	_flexcop_i2c_operation
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function flexcop_i2c_operation
_flexcop_i2c_operation:                 ; @flexcop_i2c_operation
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	mov	w8, #1
	str	w8, [x1, #8]
	ldr	w8, [x1]
	str	x8, [sp]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_deb_i2c
	ldr	x8, [x20, #8]
Lloh5:
	adrp	x21, _tw_sm_c_100@GOTPAGE
Lloh6:
	ldr	x21, [x21, _tw_sm_c_100@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh7:
	adrp	x9, _ibi_zero@GOTPAGE
Lloh8:
	ldr	x9, [x9, _ibi_zero@GOTPAGEOFF]
	ldp	q0, q1, [x9]
	stp	q0, q1, [sp, #16]
	add	x2, sp, #16
	mov	x0, x20
	blr	x8
	ldr	x8, [x20, #8]
	ldr	w1, [x21]
	ldp	q0, q1, [x19]
	stp	q0, q1, [sp, #16]
	add	x2, sp, #16
	mov	x0, x20
	blr	x8
Lloh9:
	adrp	x22, _FC_MAX_I2C_RETRIES@GOTPAGE
Lloh10:
	ldr	x22, [x22, _FC_MAX_I2C_RETRIES@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.1:
	mov	w23, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x20]
	ldr	w1, [x21]
	add	x8, sp, #16
	mov	x0, x20
	blr	x9
	ldr	q0, [sp, #16]
	str	q0, [sp, #48]
	ldr	w8, [sp, #40]
	cbnz	w8, LBB0_7
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [sp, #32]
	cbnz	x8, LBB0_9
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	add	w23, w23, #1
	ldr	w8, [x22]
	cmp	w23, w8
	b.lt	LBB0_2
	b	LBB0_6
LBB0_5:
	mov	w23, #0
LBB0_6:
	str	x23, [sp]
Lloh11:
	adrp	x0, l_.str.3@PAGE
Lloh12:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_8
LBB0_7:
Lloh13:
	adrp	x0, l_.str.2@PAGE
Lloh14:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_8:
	bl	_deb_i2c
Lloh15:
	adrp	x8, _EREMOTEIO@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EREMOTEIO@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_10
LBB0_9:
	ldr	w9, [sp, #44]
	ldr	q0, [sp, #48]
	str	q0, [x19]
	str	x8, [x19, #16]
	stp	wzr, w9, [x19, #24]
Lloh18:
	adrp	x0, l_.str.1@PAGE
Lloh19:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_deb_i2c
	mov	w0, #0
LBB0_10:
	ldur	x8, [x29, #-56]
Lloh20:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh21:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_12
; %bb.11:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_12:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"r100 before: %08x\n"

	.comm	_tw_sm_c_100,4,2                ; @tw_sm_c_100
	.comm	_ibi_zero,32,3                  ; @ibi_zero
	.comm	_FC_MAX_I2C_RETRIES,4,2         ; @FC_MAX_I2C_RETRIES
l_.str.1:                               ; @.str.1
	.asciz	"i2c success\n"

l_.str.2:                               ; @.str.2
	.asciz	"suffering from an i2c ack_error\n"

	.comm	_EREMOTEIO,4,2                  ; @EREMOTEIO
l_.str.3:                               ; @.str.3
	.asciz	"tried %d times i2c operation, never finished or too many ack errors.\n"

	.no_dead_strip	_flexcop_i2c_operation
.subsections_via_symbols
