	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dibusb_i2c_msg
_dibusb_i2c_msg:                        ## @dibusb_i2c_msg
	.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
	movl	%ecx, %r12d
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
                                        ## kill: def $esi killed $esi def $rsi
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movl	%r9d, %r15d
	movq	%r8, %rbx
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	leal	4(%r12), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	movq	%rbx, -88(%rbp)                 ## 8-byte Spill
	testq	%rbx, %rbx
	sete	%al
	movl	%r15d, -52(%rbp)                ## 4-byte Spill
	testl	%r15d, %r15d
	sete	%r15b
	orb	%al, %r15b
	je	LBB0_1
## %bb.2:
	movq	_DIBUSB_REQ_I2C_WRITE@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_DIBUSB_REQ_I2C_READ@GOTPCREL(%rip), %rax
LBB0_3:
	leal	2(%r12), %r13d
	movl	(%rax), %eax
	movl	%eax, (%r14)
	movl	%r15d, %eax
	xorb	$1, %al
	movzbl	%al, %eax
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	leal	(%rax,%rcx,2), %eax
	movl	%eax, 4(%r14)
	leaq	8(%r14), %rdi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movl	%r12d, %edx
	callq	_memcpy
	xorl	%edx, %edx
	testb	%r15b, %r15b
	jne	LBB0_5
## %bb.4:
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	movzbl	%dh, %eax
	movslq	%r13d, %rcx
	movl	%eax, (%r14,%rcx,4)
	movzbl	%dl, %eax
	movslq	%r12d, %rcx
	movl	%eax, 12(%r14,%rcx,4)
	movl	$2, %edx
LBB0_5:
	addl	%r13d, %edx
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movl	-52(%rbp), %r8d                 ## 4-byte Reload
	xorl	%r9d, %r9d
	callq	_dvb_usb_generic_rw
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_7
## %bb.6:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_DIBUSB_REQ_I2C_WRITE,4,2       ## @DIBUSB_REQ_I2C_WRITE
	.comm	_DIBUSB_REQ_I2C_READ,4,2        ## @DIBUSB_REQ_I2C_READ
	.no_dead_strip	_dibusb_i2c_msg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dibusb_i2c_msg
_dibusb_i2c_msg:                        ; @dibusb_i2c_msg
	.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
	sub	sp, sp, #16
	mov	x19, x5
	mov	x20, x4
                                        ; kill: def $w3 killed $w3 def $x3
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
	add	w8, w3, #4
	lsl	x8, x8, #2
	mov	x9, x8
Lloh3:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh4:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x22, x9, x8
	mov	sp, x22
	cmp	x4, #0
	ccmp	w5, #0, #4, ne
	cset	w25, eq
	sxtw	x24, w3
	add	x23, x24, #2
Lloh5:
	adrp	x8, _DIBUSB_REQ_I2C_WRITE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _DIBUSB_REQ_I2C_WRITE@GOTPAGEOFF]
Lloh7:
	adrp	x9, _DIBUSB_REQ_I2C_READ@GOTPAGE
Lloh8:
	ldr	x9, [x9, _DIBUSB_REQ_I2C_READ@GOTPAGEOFF]
	csel	x8, x8, x9, eq
	ldr	w8, [x8]
	eor	w9, w25, #0x1
	bfi	w9, w1, #1, #31
	stp	w8, w9, [x22]
	add	x0, x22, #8
	mov	x1, x2
	mov	x2, x3
	bl	_memcpy
	tbz	w25, #0, LBB0_2
; %bb.1:
	mov	w8, #0
	b	LBB0_3
LBB0_2:
	ubfx	w8, w19, #8, #8
	str	w8, [x22, x23, lsl #2]
	and	w8, w19, #0xff
	add	x9, x22, x24, lsl #2
	str	w8, [x9, #12]
	mov	w8, #2
LBB0_3:
	add	w2, w8, w23
	mov	x0, x21
	mov	x1, x22
	mov	x3, x20
	mov	x4, x19
	mov	w5, #0
	bl	_dvb_usb_generic_rw
	ldur	x8, [x29, #-72]
Lloh9:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh10:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_5
; %bb.4:
	sub	sp, x29, #64
	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
LBB0_5:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_DIBUSB_REQ_I2C_WRITE,4,2       ; @DIBUSB_REQ_I2C_WRITE
	.comm	_DIBUSB_REQ_I2C_READ,4,2        ; @DIBUSB_REQ_I2C_READ
	.no_dead_strip	_dibusb_i2c_msg
.subsections_via_symbols
