	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function em28xx_i2c_xfer
_em28xx_i2c_xfer:                       ## @em28xx_i2c_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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
                                        ## kill: def $edx killed $edx def $rdx
	movq	(%rdi), %r12
	movq	16(%r12), %r14
	cmpq	$0, 8(%r14)
	je	LBB0_3
## %bb.1:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_21:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%rsi, %rbx
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movl	(%r12), %r15d
	leaq	4(%r14), %r13
	movq	%r13, %rdi
	callq	_rt_mutex_trylock
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	cmpl	(%r14), %r15d
	je	LBB0_8
## %bb.6:
	movq	8(%r12), %rax
	movq	_EM28XX_I2C_ALGO_EM28XX@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.7:
	xorl	%edx, %edx
	cmpl	$1, %r15d
	movq	_EM2874_I2C_SECONDARY_BUS_SELECT@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	cmoveq	%rcx, %rdx
	movq	_EM28XX_R06_I2C_CLK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_em28xx_write_reg_bits
	movl	%r15d, (%r14)
LBB0_8:
	cmpl	$0, -48(%rbp)                   ## 4-byte Folded Reload
	jle	LBB0_19
## %bb.9:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	leal	-1(%rax), %ecx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movl	%eax, %eax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %r13d
	addl	%r13d, %r13d
	cmpq	$0, 8(%rbx)
	je	LBB0_11
## %bb.13:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	_I2C_M_RD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 16(%rbx)
	je	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	16(%rbx), %rax
	movq	%rax, 16(%rsp)
	movups	(%rbx), %xmm0
	movups	%xmm0, (%rsp)
	movq	%r12, %rdi
	callq	_i2c_recv_bytes
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	%r12, %rdi
	movl	%r13d, %esi
	callq	_i2c_check_for_device
	movl	%eax, %r14d
	movq	_ENXIO@GOTPCREL(%rip), %rcx
	addl	(%rcx), %eax
	jne	LBB0_17
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=1
	xorl	%r14d, %r14d
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_10 Depth=1
	xorl	%esi, %esi
	cmpq	%r15, -56(%rbp)                 ## 8-byte Folded Reload
	sete	%sil
	movq	16(%rbx), %rax
	movq	%rax, 16(%rsp)
	movups	(%rbx), %xmm0
	movups	%xmm0, (%rsp)
	movq	%r12, %rdi
	callq	_i2c_send_bytes
LBB0_16:                                ##   in Loop: Header=BB0_10 Depth=1
	movl	%eax, %r14d
LBB0_17:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	_I2C_M_RD@GOTPCREL(%rip), %rax
	testl	%r14d, %r14d
	js	LBB0_20
## %bb.18:                              ##   in Loop: Header=BB0_10 Depth=1
	movl	(%rax), %eax
	andl	16(%rbx), %eax
	leaq	L_.str.1(%rip), %rdx
	leaq	L_.str.2(%rip), %rax
	cmoveq	%rax, %rdx
	cmpq	%r15, -56(%rbp)                 ## 8-byte Folded Reload
	leaq	L_.str.4(%rip), %rcx
	leaq	L_.str.3(%rip), %rax
	cmoveq	%rax, %rcx
	movq	8(%rbx), %r9
	movl	20(%rbx), %eax
	movl	%eax, 8(%rsp)
	movq	%r9, (%rsp)
	movl	$2, %edi
	leaq	L_.str(%rip), %rsi
	movl	%r13d, %r8d
	callq	_dprintk
	incq	%r15
	addq	$24, %rbx
	cmpq	%r15, -72(%rbp)                 ## 8-byte Folded Reload
	jne	LBB0_10
LBB0_19:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_rt_mutex_unlock
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	jmp	LBB0_21
LBB0_4:
	movq	_EAGAIN@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_20:
	movl	(%rax), %eax
	andl	16(%rbx), %eax
	leaq	L_.str.1(%rip), %rdx
	leaq	L_.str.2(%rip), %rax
	cmoveq	%rax, %rdx
	cmpl	%r15d, -56(%rbp)                ## 4-byte Folded Reload
	leaq	L_.str.4(%rip), %rcx
	leaq	L_.str.3(%rip), %rax
	cmoveq	%rax, %rcx
	movq	8(%rbx), %r9
	movq	_ENODEV@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%r14d, %eax
	leaq	L_.str.6(%rip), %rax
	leaq	L_.str.7(%rip), %rsi
	cmoveq	%rax, %rsi
	movl	%r14d, 8(%rsp)
	movq	%rsi, (%rsp)
	leaq	L_.str.5(%rip), %rsi
	movl	$2, %edi
	movl	%r13d, %r8d
	callq	_dprintk
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_rt_mutex_unlock
	movl	%r14d, %eax
	jmp	LBB0_21
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_EM28XX_I2C_ALGO_EM28XX,8,3     ## @EM28XX_I2C_ALGO_EM28XX
	.comm	_EM2874_I2C_SECONDARY_BUS_SELECT,8,3 ## @EM2874_I2C_SECONDARY_BUS_SELECT
	.comm	_EM28XX_R06_I2C_CLK,4,2         ## @EM28XX_R06_I2C_CLK
	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_I2C_M_RD,4,2                   ## @I2C_M_RD
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s %s addr=%02x len=%d: %*ph\n"

L_.str.1:                               ## @.str.1
	.asciz	"read"

L_.str.2:                               ## @.str.2
	.asciz	"write"

L_.str.3:                               ## @.str.3
	.asciz	"stop"

L_.str.4:                               ## @.str.4
	.asciz	"nonstop"

L_.str.5:                               ## @.str.5
	.asciz	"%s %s addr=%02x len=%d: %sERROR: %i\n"

L_.str.6:                               ## @.str.6
	.asciz	"no device "

L_.str.7:                               ## @.str.7
	.space	1

	.no_dead_strip	_em28xx_i2c_xfer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function em28xx_i2c_xfer
_em28xx_i2c_xfer:                       ; @em28xx_i2c_xfer
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	ldr	x22, [x0]
	ldr	x23, [x22, #16]
	ldr	x8, [x23, #8]
	cbz	x8, LBB0_4
; %bb.1:
Lloh0:
	adrp	x8, _ENODEV@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_3:
	mov	x0, x20
	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
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_4:
	mov	x20, x2
	mov	x21, x1
	ldr	w19, [x22]
	add	x24, x23, #4
	mov	x0, x24
	bl	_rt_mutex_trylock
	cbz	w0, LBB0_20
; %bb.5:
	str	x24, [sp, #8]                   ; 8-byte Folded Spill
	ldr	w8, [x23]
	cmp	w19, w8
	b.eq	LBB0_8
; %bb.6:
	ldr	x8, [x22, #8]
Lloh2:
	adrp	x9, _EM28XX_I2C_ALGO_EM28XX@GOTPAGE
Lloh3:
	ldr	x9, [x9, _EM28XX_I2C_ALGO_EM28XX@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.7:
Lloh5:
	adrp	x8, _EM2874_I2C_SECONDARY_BUS_SELECT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EM2874_I2C_SECONDARY_BUS_SELECT@GOTPAGEOFF]
Lloh7:
	ldr	x3, [x8]
	cmp	w19, #1
	csel	x2, x3, xzr, eq
Lloh8:
	adrp	x8, _EM28XX_R06_I2C_CLK@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EM28XX_R06_I2C_CLK@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x23
	bl	_em28xx_write_reg_bits
	str	w19, [x23]
LBB0_8:
	subs	w26, w20, #1
	b.lt	LBB0_19
; %bb.9:
	mov	x28, #0
	mov	w8, #24
	umull	x27, w20, w8
	umull	x19, w26, w8
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	add	x23, x21, x28
	ldr	w8, [x23]
	lsl	w24, w8, #1
	ldr	x8, [x23, #8]
	cbz	x8, LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	w8, [x23, #16]
Lloh11:
	adrp	x9, _I2C_M_RD@GOTPAGE
Lloh12:
	ldr	x9, [x9, _I2C_M_RD@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_15
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=1
	add	x8, x21, x28
	ldr	q0, [x8]
	str	q0, [sp, #16]
	ldr	x8, [x8, #16]
	str	x8, [sp, #32]
	add	x1, sp, #16
	mov	x0, x22
	bl	_i2c_recv_bytes
	b	LBB0_16
LBB0_13:                                ;   in Loop: Header=BB0_10 Depth=1
	mov	x0, x22
	mov	x1, x24
	bl	_i2c_check_for_device
	mov	x25, x0
Lloh14:
	adrp	x8, _ENXIO@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	cmn	w0, w8
	b.ne	LBB0_17
; %bb.14:                               ;   in Loop: Header=BB0_10 Depth=1
Lloh17:
	adrp	x8, _ENODEV@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w25, w8
	b	LBB0_17
LBB0_15:                                ;   in Loop: Header=BB0_10 Depth=1
	cmp	x19, x28
	cset	w2, eq
	add	x8, x21, x28
	ldr	q0, [x8]
	str	q0, [sp, #16]
	ldr	x8, [x8, #16]
	str	x8, [sp, #32]
	add	x1, sp, #16
	mov	x0, x22
	bl	_i2c_send_bytes
LBB0_16:                                ;   in Loop: Header=BB0_10 Depth=1
	mov	x25, x0
LBB0_17:                                ;   in Loop: Header=BB0_10 Depth=1
	tbnz	w25, #31, LBB0_21
; %bb.18:                               ;   in Loop: Header=BB0_10 Depth=1
	add	x8, x21, x28
Lloh20:
	adrp	x9, _I2C_M_RD@GOTPAGE
Lloh21:
	ldr	x9, [x9, _I2C_M_RD@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	ldp	w10, w7, [x8, #16]
	tst	w9, w10
Lloh23:
	adrp	x8, l_.str.1@PAGE
Lloh24:
	add	x8, x8, l_.str.1@PAGEOFF
Lloh25:
	adrp	x9, l_.str.2@PAGE
Lloh26:
	add	x9, x9, l_.str.2@PAGEOFF
	csel	x2, x9, x8, eq
	cmp	x19, x28
Lloh27:
	adrp	x8, l_.str.4@PAGE
Lloh28:
	add	x8, x8, l_.str.4@PAGEOFF
Lloh29:
	adrp	x9, l_.str.3@PAGE
Lloh30:
	add	x9, x9, l_.str.3@PAGEOFF
	csel	x3, x9, x8, eq
	ldr	x5, [x23, #8]
	mov	w0, #2
Lloh31:
	adrp	x1, l_.str@PAGE
Lloh32:
	add	x1, x1, l_.str@PAGEOFF
	mov	x4, x24
	mov	x6, x5
	bl	_dprintk
	add	x28, x28, #24
	sub	w26, w26, #1
	cmp	x27, x28
	b.ne	LBB0_10
LBB0_19:
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
	bl	_rt_mutex_unlock
	b	LBB0_3
LBB0_20:
Lloh33:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh34:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
	b	LBB0_2
LBB0_21:
	add	x8, x21, x28
	ldr	w9, [x8, #16]
Lloh35:
	adrp	x10, _I2C_M_RD@GOTPAGE
Lloh36:
	ldr	x10, [x10, _I2C_M_RD@GOTPAGEOFF]
Lloh37:
	ldr	w10, [x10]
	tst	w10, w9
Lloh38:
	adrp	x9, l_.str.1@PAGE
Lloh39:
	add	x9, x9, l_.str.1@PAGEOFF
Lloh40:
	adrp	x10, l_.str.2@PAGE
Lloh41:
	add	x10, x10, l_.str.2@PAGEOFF
	csel	x2, x10, x9, eq
	cmp	w26, #0
Lloh42:
	adrp	x9, l_.str.4@PAGE
Lloh43:
	add	x9, x9, l_.str.4@PAGEOFF
Lloh44:
	adrp	x10, l_.str.3@PAGE
Lloh45:
	add	x10, x10, l_.str.3@PAGEOFF
	csel	x3, x10, x9, eq
	ldr	x5, [x8, #8]
Lloh46:
	adrp	x8, _ENODEV@GOTPAGE
Lloh47:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh48:
	ldr	w8, [x8]
Lloh49:
	adrp	x9, l_.str.7@PAGE
Lloh50:
	add	x9, x9, l_.str.7@PAGEOFF
Lloh51:
	adrp	x10, l_.str.6@PAGE
Lloh52:
	add	x10, x10, l_.str.6@PAGEOFF
	cmn	w25, w8
	csel	x6, x10, x9, eq
Lloh53:
	adrp	x1, l_.str.5@PAGE
Lloh54:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	w0, #2
	mov	x4, x24
	mov	x7, x25
	bl	_dprintk
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
	bl	_rt_mutex_unlock
	mov	x20, x25
	b	LBB0_3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpAdd	Lloh53, Lloh54
	.loh AdrpAdd	Lloh51, Lloh52
	.loh AdrpAdd	Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpAdd	Lloh44, Lloh45
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_EM28XX_I2C_ALGO_EM28XX,8,3     ; @EM28XX_I2C_ALGO_EM28XX
	.comm	_EM2874_I2C_SECONDARY_BUS_SELECT,8,3 ; @EM2874_I2C_SECONDARY_BUS_SELECT
	.comm	_EM28XX_R06_I2C_CLK,4,2         ; @EM28XX_R06_I2C_CLK
	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_I2C_M_RD,4,2                   ; @I2C_M_RD
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s %s addr=%02x len=%d: %*ph\n"

l_.str.1:                               ; @.str.1
	.asciz	"read"

l_.str.2:                               ; @.str.2
	.asciz	"write"

l_.str.3:                               ; @.str.3
	.asciz	"stop"

l_.str.4:                               ; @.str.4
	.asciz	"nonstop"

l_.str.5:                               ; @.str.5
	.asciz	"%s %s addr=%02x len=%d: %sERROR: %i\n"

l_.str.6:                               ; @.str.6
	.asciz	"no device "

l_.str.7:                               ; @.str.7
	.space	1

	.no_dead_strip	_em28xx_i2c_xfer
.subsections_via_symbols
