	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dvb_usb_generic_rw             ## -- Begin function dvb_usb_generic_rw
	.p2align	4, 0x90
_dvb_usb_generic_rw:                    ## @dvb_usb_generic_rw
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.1:
	movq	%rsi, %r15
	testq	%rsi, %rsi
	je	LBB0_8
## %bb.2:
	movl	%edx, %r14d
	testl	%edx, %edx
	je	LBB0_8
## %bb.3:
	movq	%rdi, %r13
	cmpq	$0, 8(%rdi)
	je	LBB0_9
## %bb.4:
	movl	%r9d, %r12d
	movl	%r8d, -48(%rbp)                 ## 4-byte Spill
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	callq	_mutex_lock_interruptible
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_11
## %bb.5:
	leaq	L_.str.1(%rip), %rdi
	callq	_deb_xfer
	movq	_deb_xfer@GOTPCREL(%rip), %rdx
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_debug_dump
	movl	24(%r13), %ebx
	movq	8(%r13), %rsi
	movl	%ebx, %edi
	callq	_usb_sndbulkpipe
	leaq	-44(%rbp), %r8
	movl	%ebx, %edi
	movl	%eax, %esi
	movq	%r15, %rdx
	movl	%r14d, %ecx
	movl	$2000, %r9d                     ## imm = 0x7D0
	callq	_usb_bulk_msg
	movl	-44(%rbp), %ecx
	testl	%eax, %eax
	je	LBB0_12
## %bb.6:
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %esi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_err
LBB0_7:
	movq	%r13, %rdi
	callq	_mutex_unlock
	jmp	LBB0_11
LBB0_8:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	jmp	LBB0_10
LBB0_9:
	leaq	L_.str(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_10:
	subl	(%rax), %ebx
LBB0_11:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	xorl	%ebx, %ebx
	cmpl	%r14d, %ecx
	setne	%bl
	negl	%ebx
	cmpl	$0, -48(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_7
## %bb.13:
	cmpq	$0, -56(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_7
## %bb.14:
	cmpl	%r14d, %ecx
	jne	LBB0_7
## %bb.15:
	testl	%r12d, %r12d
	je	LBB0_17
## %bb.16:
	movl	%r12d, %edi
	callq	_msleep
LBB0_17:
	movl	24(%r13), %ebx
	movq	16(%r13), %rsi
	testq	%rsi, %rsi
	jne	LBB0_19
## %bb.18:
	movq	8(%r13), %rsi
LBB0_19:
	movl	%ebx, %edi
	callq	_usb_rcvbulkpipe
	leaq	-44(%rbp), %r8
	movl	%ebx, %edi
	movl	%eax, %esi
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdx
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	movl	$2000, %r9d                     ## imm = 0x7D0
	callq	_usb_bulk_msg
	testl	%eax, %eax
	je	LBB0_21
## %bb.20:
	movl	%eax, %ebx
	leaq	L_.str.3(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_err
	jmp	LBB0_7
LBB0_21:
	leaq	L_.str.4(%rip), %rdi
	callq	_deb_xfer
	movq	_deb_xfer@GOTPCREL(%rip), %rdx
	movl	-44(%rbp), %esi
	movq	%r14, %rdi
	callq	_debug_dump
	xorl	%ebx, %ebx
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"endpoint for generic control not specified."

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

L_.str.2:                               ## @.str.2
	.asciz	"bulk message failed: %d (%d/%d)"

L_.str.3:                               ## @.str.3
	.asciz	"recv bulk message failed: %d"

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

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dvb_usb_generic_rw             ; -- Begin function dvb_usb_generic_rw
	.p2align	2
_dvb_usb_generic_rw:                    ; @dvb_usb_generic_rw
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	cbz	x0, LBB0_9
; %bb.1:
	mov	x25, x1
	cbz	x1, LBB0_9
; %bb.2:
	mov	x23, x2
	cbz	w2, LBB0_9
; %bb.3:
	mov	x19, x0
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_8
; %bb.4:
	mov	x22, x5
	mov	x21, x4
	mov	x20, x3
	mov	x0, x19
	bl	_mutex_lock_interruptible
	mov	x24, x0
	cbnz	w0, LBB0_10
; %bb.5:
Lloh0:
	adrp	x0, l_.str.1@PAGE
Lloh1:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_deb_xfer
Lloh2:
	adrp	x2, _deb_xfer@GOTPAGE
Lloh3:
	ldr	x2, [x2, _deb_xfer@GOTPAGEOFF]
	mov	x0, x25
	mov	x1, x23
	bl	_debug_dump
	ldr	w24, [x19, #24]
	ldr	x1, [x19, #8]
	mov	x0, x24
	bl	_usb_sndbulkpipe
	mov	x1, x0
	add	x4, sp, #28
	mov	x0, x24
	mov	x2, x25
	mov	x3, x23
	mov	w5, #2000
	bl	_usb_bulk_msg
	ldr	w8, [sp, #28]
	cbz	w0, LBB0_11
; %bb.6:
	mov	x24, x0
	stp	x23, x8, [sp, #8]
	str	x24, [sp]
Lloh4:
	adrp	x0, l_.str.2@PAGE
Lloh5:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_err
LBB0_7:
	mov	x0, x19
	bl	_mutex_unlock
	b	LBB0_10
LBB0_8:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_err
LBB0_9:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w24, w8
LBB0_10:
	mov	x0, x24
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_11:
	cmp	w8, w23
	csetm	w24, ne
	cbz	w21, LBB0_7
; %bb.12:
	cbz	x20, LBB0_7
; %bb.13:
	cmp	w8, w23
	b.ne	LBB0_7
; %bb.14:
	cbz	w22, LBB0_16
; %bb.15:
	mov	x0, x22
	bl	_msleep
LBB0_16:
	ldr	w22, [x19, #24]
	ldr	x1, [x19, #16]
	cbnz	x1, LBB0_18
; %bb.17:
	ldr	x1, [x19, #8]
LBB0_18:
	mov	x0, x22
	bl	_usb_rcvbulkpipe
	mov	x1, x0
	add	x4, sp, #28
	mov	x0, x22
	mov	x2, x20
	mov	x3, x21
	mov	w5, #2000
	bl	_usb_bulk_msg
	mov	x24, x0
	cbz	w0, LBB0_20
; %bb.19:
	str	x24, [sp]
Lloh11:
	adrp	x0, l_.str.3@PAGE
Lloh12:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_err
                                        ; kill: def $w24 killed $w24 killed $x24 def $x24
	b	LBB0_7
LBB0_20:
Lloh13:
	adrp	x0, l_.str.4@PAGE
Lloh14:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_deb_xfer
Lloh15:
	adrp	x2, _deb_xfer@GOTPAGE
Lloh16:
	ldr	x2, [x2, _deb_xfer@GOTPAGEOFF]
	ldr	w1, [sp, #28]
	mov	x0, x20
	bl	_debug_dump
	b	LBB0_7
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"endpoint for generic control not specified."

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

l_.str.2:                               ; @.str.2
	.asciz	"bulk message failed: %d (%d/%d)"

l_.str.3:                               ; @.str.3
	.asciz	"recv bulk message failed: %d"

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

.subsections_via_symbols
