	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dvbsky_i2c_xfer
_dvbsky_i2c_xfer:                       ## @dvbsky_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	%r12
	pushq	%rbx
	subq	$528, %rsp                      ## imm = 0x210
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	%rsi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	callq	_i2c_get_adapdata
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_mutex_lock_interruptible
	testq	%rax, %rax
	js	LBB0_1
## %bb.2:
	cmpl	$3, %r14d
	jl	LBB0_6
## %bb.3:
	movq	8(%r12), %rdi
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	movl	%r14d, %edx
LBB0_4:
	xorl	%eax, %eax
	callq	_dev_err
LBB0_5:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_20:
	movq	%r12, %rdi
	callq	_mutex_unlock
	testl	%ebx, %ebx
	jne	LBB0_22
	jmp	LBB0_21
LBB0_1:
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_22
LBB0_6:
	movl	(%r15), %r8d
	cmpl	$1, %r14d
	jne	LBB0_12
## %bb.7:
	cmpl	$61, %r8d
	jl	LBB0_9
## %bb.8:
	movq	8(%r12), %rdi
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	movl	%r8d, %edx
	jmp	LBB0_4
LBB0_12:
	movl	24(%r15), %ecx
	cmpl	$60, %r8d
	jg	LBB0_14
## %bb.13:
	cmpl	$61, %ecx
	jge	LBB0_14
## %bb.15:
	movl	$9, -560(%rbp)
	movl	%r8d, -556(%rbp)
	movl	%ecx, -552(%rbp)
	movl	8(%r15), %eax
	movl	%eax, -548(%rbp)
	leaq	-544(%rbp), %rdi
	movq	16(%r15), %rsi
	movl	%r8d, %edx
	callq	_memcpy
	movl	(%r15), %edx
	movl	24(%r15), %r8d
	addl	$4, %edx
	incl	%r8d
	leaq	-560(%rbp), %rsi
	leaq	-304(%rbp), %rcx
	movq	%r12, %rdi
	callq	_dvbsky_usb_generic_rw
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_18
## %bb.16:
	leaq	24(%r15), %rax
	movl	$1, %ecx
	jmp	LBB0_17
LBB0_9:
	movq	_I2C_M_RD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%r15)
	je	LBB0_19
## %bb.10:
	movq	$9, -560(%rbp)
	movl	%r8d, -552(%rbp)
	movl	8(%r15), %eax
	movl	%eax, -548(%rbp)
	incl	%r8d
	leaq	-560(%rbp), %rsi
	leaq	-304(%rbp), %rcx
	movq	%r12, %rdi
	movl	$4, %edx
	callq	_dvbsky_usb_generic_rw
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_11
LBB0_18:
	movq	%r12, %rdi
	callq	_mutex_unlock
	jmp	LBB0_22
LBB0_14:
	movq	8(%r12), %rdi
	leaq	L_.str.2(%rip), %rsi
	xorl	%ebx, %ebx
	movl	%r8d, %edx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_5
LBB0_19:
	movl	$8, -560(%rbp)
	movl	8(%r15), %eax
	movl	%eax, -556(%rbp)
	movl	%r8d, -552(%rbp)
	leaq	-548(%rbp), %rdi
	movq	16(%r15), %rsi
	movl	%r8d, %edx
	callq	_memcpy
	movl	(%r15), %edx
	addl	$3, %edx
	leaq	-560(%rbp), %rsi
	leaq	-304(%rbp), %rcx
	movq	%r12, %rdi
	movl	$1, %r8d
	callq	_dvbsky_usb_generic_rw
	movl	%eax, %ebx
	jmp	LBB0_20
LBB0_11:
	xorl	%ecx, %ecx
	movq	%r15, %rax
LBB0_17:
	leaq	(%rcx,%rcx,2), %rcx
	movq	16(%r15,%rcx,8), %rdi
	leaq	-300(%rbp), %rsi
	movl	(%rax), %edx
	callq	_memcpy
	movq	%r12, %rdi
	callq	_mutex_unlock
LBB0_21:
	movl	%r14d, %ebx
LBB0_22:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_24
## %bb.23:
	movl	%ebx, %eax
	addq	$528, %rsp                      ## imm = 0x210
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_24:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"too many i2c messages[%d], max 2."

	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
L_.str.1:                               ## @.str.1
	.asciz	"too many i2c bytes[%d], max 60."

	.comm	_I2C_M_RD,4,2                   ## @I2C_M_RD
L_.str.2:                               ## @.str.2
	.asciz	"too many i2c bytes[w-%d][r-%d], max 60."

	.no_dead_strip	_dvbsky_i2c_xfer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function dvbsky_i2c_xfer
lCPI0_0:
	.long	9                               ; 0x9
	.long	0                               ; 0x0
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_dvbsky_i2c_xfer:                       ; @dvbsky_i2c_xfer
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	sub	sp, sp, #528
	mov	x19, x2
	mov	x21, x1
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	bl	_i2c_get_adapdata
	mov	x20, x0
	bl	_mutex_lock_interruptible
	tbnz	x0, #63, LBB0_5
; %bb.1:
	cmp	w19, #3
	b.lt	LBB0_6
; %bb.2:
	ldr	x0, [x20, #8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
LBB0_3:
	bl	_dev_err
Lloh5:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_4:
	mov	x0, x20
	bl	_mutex_unlock
	cbnz	w22, LBB0_21
	b	LBB0_20
LBB0_5:
Lloh8:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_21
LBB0_6:
	ldr	w2, [x21]
	cmp	w19, #1
	b.ne	LBB0_9
; %bb.7:
	cmp	w2, #61
	b.lt	LBB0_13
; %bb.8:
	ldr	x0, [x20, #8]
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_3
LBB0_9:
	mov	x23, x21
	ldr	w8, [x23, #24]!
	cmp	w2, #60
	b.gt	LBB0_16
; %bb.10:
	cmp	w8, #61
	b.ge	LBB0_16
; %bb.11:
	mov	w9, #9
	stp	w9, w2, [sp, #8]
	ldr	w9, [x21, #8]
	stp	w8, w9, [sp, #16]
	add	x8, sp, #8
	add	x0, x8, #16
	ldr	x1, [x21, #16]
	bl	_memcpy
	ldr	w8, [x21]
	add	w2, w8, #4
	ldr	w8, [x21, #24]
	add	w4, w8, #1
	add	x1, sp, #8
	add	x3, sp, #264
	mov	x0, x20
	bl	_dvbsky_usb_generic_rw
	mov	x22, x0
	cbnz	w0, LBB0_15
; %bb.12:
	mov	w8, #1
	b	LBB0_19
LBB0_13:
	ldr	w8, [x21, #4]
Lloh13:
	adrp	x9, _I2C_M_RD@GOTPAGE
Lloh14:
	ldr	x9, [x9, _I2C_M_RD@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_17
; %bb.14:
Lloh16:
	adrp	x8, lCPI0_0@PAGE
Lloh17:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [sp, #8]
	ldr	w8, [x21, #8]
	stp	w2, w8, [sp, #16]
	add	w4, w2, #1
	add	x1, sp, #8
	add	x3, sp, #264
	mov	x0, x20
	mov	w2, #4
	bl	_dvbsky_usb_generic_rw
	mov	x22, x0
	cbz	w0, LBB0_18
LBB0_15:
	mov	x0, x20
	bl	_mutex_unlock
	b	LBB0_21
LBB0_16:
	ldr	x0, [x20, #8]
	str	x8, [sp]
Lloh18:
	adrp	x1, l_.str.2@PAGE
Lloh19:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_3
LBB0_17:
	mov	w8, #8
	ldr	w9, [x21, #8]
	stp	w8, w9, [sp, #8]
	str	w2, [sp, #16]
	add	x8, sp, #8
	add	x0, x8, #12
	ldr	x1, [x21, #16]
	bl	_memcpy
	ldr	w8, [x21]
	add	w2, w8, #3
	add	x1, sp, #8
	add	x3, sp, #264
	mov	x0, x20
	mov	w4, #1
	bl	_dvbsky_usb_generic_rw
	mov	x22, x0
	b	LBB0_4
LBB0_18:
	mov	x8, #0
	mov	x23, x21
LBB0_19:
	mov	w9, #24
	madd	x8, x8, x9, x21
	ldr	x0, [x8, #16]
	add	x8, sp, #264
	add	x1, x8, #4
	ldr	w2, [x23]
	bl	_memcpy
	mov	x0, x20
	bl	_mutex_unlock
LBB0_20:
	mov	x22, x19
LBB0_21:
	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_23
; %bb.22:
	mov	x0, x22
	add	sp, sp, #528
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_23:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdr	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"too many i2c messages[%d], max 2."

	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
l_.str.1:                               ; @.str.1
	.asciz	"too many i2c bytes[%d], max 60."

	.comm	_I2C_M_RD,4,2                   ; @I2C_M_RD
l_.str.2:                               ; @.str.2
	.asciz	"too many i2c bytes[w-%d][r-%d], max 60."

	.no_dead_strip	_dvbsky_i2c_xfer
.subsections_via_symbols
