	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ivtv_xfer
_ivtv_xfer:                             ## @ivtv_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, %r13
	callq	_i2c_get_adapdata
	movq	%rax, %rdi
	callq	_to_ivtv
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_mutex_lock
	testl	%ebx, %ebx
	jle	LBB0_11
## %bb.1:
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movl	%ebx, %r12d
	xorl	%ebx, %ebx
	movq	_I2C_M_RD@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rax
	shlq	$4, %rax
	movl	(%r14), %ecx
	testl	%ecx, (%r13,%rax)
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	12(%r13,%rax), %esi
	movl	4(%r13,%rax), %ecx
	movl	8(%r13,%rax), %edx
	movq	%r15, %rdi
	callq	_ivtv_read
	incq	%rbx
	testl	%eax, %eax
	je	LBB0_9
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	cmpq	%r12, %rbx
	jge	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdx
	shlq	$4, %rdx
	cmpl	%ecx, (%r13,%rdx)
	sete	%cl
	jmp	LBB0_7
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	xorl	%ecx, %ecx
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	xorb	$1, %cl
	movzbl	%cl, %r8d
	movl	12(%r13,%rax), %esi
	movl	4(%r13,%rax), %ecx
	movl	8(%r13,%rax), %edx
	movq	%r15, %rdi
	callq	_ivtv_write
	testl	%eax, %eax
	jne	LBB0_10
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	cmpq	%r12, %rbx
	jl	LBB0_2
LBB0_10:
	testl	%eax, %eax
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	cmovnel	%eax, %ebx
LBB0_11:
	movq	%r15, %rdi
	callq	_mutex_unlock
	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,4,2                   ## @I2C_M_RD
	.no_dead_strip	_ivtv_xfer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ivtv_xfer
_ivtv_xfer:                             ; @ivtv_xfer
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x2
	mov	x21, x1
	bl	_i2c_get_adapdata
	bl	_to_ivtv
	mov	x20, x0
	bl	_mutex_lock
	cmp	w19, #1
	b.lt	LBB0_10
; %bb.1:
	mov	x24, #0
	mov	w22, w19
Lloh0:
	adrp	x23, _I2C_M_RD@GOTPAGE
Lloh1:
	ldr	x23, [x23, _I2C_M_RD@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x8, x21, x24, lsl #4
	ldp	w2, w1, [x8, #8]
	ldr	w3, [x8, #4]
	mov	x0, x20
	bl	_ivtv_read
	add	x24, x24, #1
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	cmp	w0, #0
	ccmp	x24, x22, #0, eq
	b.ge	LBB0_9
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	lsl	x8, x24, #4
	ldr	w9, [x21, x8]
	ldr	w8, [x23]
	tst	w8, w9
	b.ne	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x25, x24, #1
	cmp	x25, x22
	b.ge	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	lsl	x9, x25, #4
	ldr	w9, [x21, x9]
	cmp	w9, w8
	cset	w8, eq
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	w8, #0
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=1
	eor	w4, w8, #0x1
	add	x8, x21, x24, lsl #4
	ldp	w2, w1, [x8, #8]
	ldr	w3, [x8, #4]
	mov	x0, x20
	bl	_ivtv_write
	mov	x24, x25
	b	LBB0_3
LBB0_9:
	cmp	w0, #0
	csel	w19, w19, w0, eq
LBB0_10:
	mov	x0, x20
	bl	_mutex_unlock
	mov	x0, x19
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_M_RD,4,2                   ; @I2C_M_RD
	.no_dead_strip	_ivtv_xfer
.subsections_via_symbols
