	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function flexcop_master_xfer
_flexcop_master_xfer:                   ## @flexcop_master_xfer
	.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
	movl	%edx, %ebx
	movq	%rsi, %r12
	callq	_i2c_get_adapdata
	movl	%ebx, %edx
	movq	%rax, %r15
	cmpl	$1, %ebx
	jne	LBB0_3
## %bb.1:
	movq	(%r12), %rax
	movq	_I2C_M_RD@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.2:
	movl	$1, %ebx
	cmpl	$2, 8(%r12)
	jl	LBB0_17
LBB0_3:
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movq	(%r15), %rdi
	addq	$8, %rdi
	callq	_mutex_lock_interruptible
	testq	%rax, %rax
	je	LBB0_4
## %bb.7:
	movq	_ERESTARTSYS@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_17
LBB0_4:
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	testl	%ecx, %ecx
	jle	LBB0_6
## %bb.5:
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	leal	1(%r13), %r14d
	movslq	%r13d, %rax
	cmpl	%ecx, %r14d
	jge	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movslq	%r14d, %rdi
	shlq	$5, %rdi
	movq	(%r12,%rdi), %rcx
	movq	_I2C_M_RD@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	(%r15), %rbx
	movq	_FC_READ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	shlq	$5, %rax
	movl	24(%r12,%rax), %edx
	movq	16(%r12,%rax), %rax
	movl	(%rax), %ecx
	movq	16(%r12,%rdi), %r8
	movl	8(%r12,%rdi), %r9d
	movq	%r15, %rdi
	callq	*(%rbx)
	movl	%eax, %ebx
	movl	%r14d, %r13d
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_9 Depth=1
	movq	(%r15), %rbx
	movq	_FC_WRITE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	shlq	$5, %rax
	movl	24(%r12,%rax), %edx
	movq	16(%r12,%rax), %r8
	movl	(%r8), %ecx
	addq	$4, %r8
	movl	8(%r12,%rax), %r9d
	decl	%r9d
	movq	%r15, %rdi
	callq	*(%rbx)
	movl	%eax, %ebx
LBB0_13:                                ##   in Loop: Header=BB0_9 Depth=1
	testl	%ebx, %ebx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	js	LBB0_14
## %bb.8:                               ##   in Loop: Header=BB0_9 Depth=1
	incl	%r13d
	cmpl	%ecx, %r13d
	jl	LBB0_9
## %bb.15:
	movq	(%r15), %rdi
	addq	$8, %rdi
	callq	_mutex_unlock
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	testl	%ebx, %ebx
	jne	LBB0_17
	jmp	LBB0_16
LBB0_6:
	movq	(%r15), %rdi
	addq	$8, %rdi
	callq	_mutex_unlock
	movl	-44(%rbp), %eax                 ## 4-byte Reload
LBB0_16:
	movl	%eax, %ebx
	jmp	LBB0_17
LBB0_14:
	leaq	L_.str(%rip), %rdi
	callq	_deb_i2c
	movq	(%r15), %rdi
	addq	$8, %rdi
	callq	_mutex_unlock
LBB0_17:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_M_RD,8,3                   ## @I2C_M_RD
	.comm	_ERESTARTSYS,4,2                ## @ERESTARTSYS
	.comm	_FC_READ,4,2                    ## @FC_READ
	.comm	_FC_WRITE,4,2                   ## @FC_WRITE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"i2c master_xfer failed"

	.no_dead_strip	_flexcop_master_xfer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function flexcop_master_xfer
_flexcop_master_xfer:                   ; @flexcop_master_xfer
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x2
	mov	x21, x1
	bl	_i2c_get_adapdata
	mov	x20, x0
	cmp	w19, #1
	b.ne	LBB0_4
; %bb.1:
	ldr	x8, [x21]
Lloh0:
	adrp	x9, _I2C_M_RD@GOTPAGE
Lloh1:
	ldr	x9, [x9, _I2C_M_RD@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.2:
	ldr	w8, [x21, #8]
	cmp	w8, #2
	b.ge	LBB0_4
; %bb.3:
	mov	w22, #1
	b	LBB0_17
LBB0_4:
	ldr	x8, [x20]
	add	x0, x8, #8
	bl	_mutex_lock_interruptible
	cbz	x0, LBB0_6
; %bb.5:
Lloh3:
	adrp	x8, _ERESTARTSYS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ERESTARTSYS@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_17
LBB0_6:
	cmp	w19, #1
	b.lt	LBB0_14
; %bb.7:
	mov	w26, #0
Lloh6:
	adrp	x23, _I2C_M_RD@GOTPAGE
Lloh7:
	ldr	x23, [x23, _I2C_M_RD@GOTPAGEOFF]
Lloh8:
	adrp	x24, _FC_READ@GOTPAGE
Lloh9:
	ldr	x24, [x24, _FC_READ@GOTPAGEOFF]
Lloh10:
	adrp	x25, _FC_WRITE@GOTPAGE
Lloh11:
	ldr	x25, [x25, _FC_WRITE@GOTPAGEOFF]
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	sxtw	x8, w26
	add	x27, x8, #1
	cmp	w27, w19
	b.ge	LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	lsl	x9, x27, #5
	ldr	x9, [x21, x9]
	ldr	x10, [x23]
	cmp	x9, x10
	b.ne	LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	x9, [x20]
	ldr	x9, [x9]
	ldr	w1, [x24]
	add	x8, x21, x8, lsl #5
	ldr	w2, [x8, #24]
	ldr	x8, [x8, #16]
	ldr	w3, [x8]
	add	x8, x21, x27, lsl #5
	ldr	x4, [x8, #16]
	ldr	w5, [x8, #8]
	mov	x0, x20
	blr	x9
	mov	x22, x0
	mov	x26, x27
	tbz	w22, #31, LBB0_12
	b	LBB0_16
LBB0_11:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	x9, [x20]
	ldr	x9, [x9]
	ldr	w1, [x25]
	add	x8, x21, x8, lsl #5
	ldr	w2, [x8, #24]
	ldr	x4, [x8, #16]
	ldr	w3, [x4], #4
	ldr	w8, [x8, #8]
	sub	w5, w8, #1
	mov	x0, x20
	blr	x9
	mov	x22, x0
	tbnz	w22, #31, LBB0_16
LBB0_12:                                ;   in Loop: Header=BB0_8 Depth=1
	add	w26, w26, #1
	cmp	w26, w19
	b.lt	LBB0_8
; %bb.13:
	ldr	x8, [x20]
	add	x0, x8, #8
	bl	_mutex_unlock
	cbnz	w22, LBB0_17
	b	LBB0_15
LBB0_14:
	ldr	x8, [x20]
	add	x0, x8, #8
	bl	_mutex_unlock
LBB0_15:
	mov	x22, x19
	b	LBB0_17
LBB0_16:
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	bl	_deb_i2c
	ldr	x8, [x20]
	add	x0, x8, #8
	bl	_mutex_unlock
LBB0_17:
	mov	x0, x22
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_M_RD,8,3                   ; @I2C_M_RD
	.comm	_ERESTARTSYS,4,2                ; @ERESTARTSYS
	.comm	_FC_READ,4,2                    ; @FC_READ
	.comm	_FC_WRITE,4,2                   ; @FC_WRITE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"i2c master_xfer failed"

	.no_dead_strip	_flexcop_master_xfer
.subsections_via_symbols
