	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_libusb20_tr_open_stream        ## -- Begin function libusb20_tr_open_stream
	.p2align	4, 0x90
_libusb20_tr_open_stream:               ## @libusb20_tr_open_stream
	.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
	cmpl	$0, (%rdi)
	je	LBB0_4
## %bb.1:
	movq	_LIBUSB20_ERROR_BUSY@GOTPCREL(%rip), %rax
LBB0_2:
	movl	(%rax), %ebx
LBB0_3:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movl	%edx, %r14d
	movq	_LIBUSB20_MAX_FRAME_PRE_SCALE@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	%r12d, %ebx
	notl	%ebx
	andl	%edx, %ebx
	shll	$3, %ebx
	testl	%edx, %r12d
	cmovel	%edx, %ebx
	testl	%ebx, %ebx
	je	LBB0_9
## %bb.5:
	movq	%rdi, %r13
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movl	%r8d, -52(%rbp)                 ## 4-byte Spill
	movl	%ebx, 4(%rdi)
	leal	(,%rbx,4), %r15d
	movl	%r15d, %edi
	callq	_malloc
	movq	%rax, 8(%r13)
	testq	%rax, %rax
	je	LBB0_11
## %bb.6:
	movq	%rax, %rdi
	xorl	%esi, %esi
	movl	%r15d, %edx
	callq	_memset
	movl	%r15d, %edi
	callq	_malloc
	movq	%rax, 16(%r13)
	testq	%rax, %rax
	je	LBB0_10
## %bb.7:
	movq	%rax, %rdi
	xorl	%esi, %esi
	movl	%r15d, %edx
	callq	_memset
	movq	24(%r13), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	testl	%r14d, %r12d
	je	LBB0_12
## %bb.8:
	leal	7(%rbx), %edx
	testl	%ebx, %ebx
	cmovnsl	%ebx, %edx
	sarl	$3, %edx
	movq	%r13, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	movl	-52(%rbp), %r8d                 ## 4-byte Reload
	movl	$1, %r9d
	jmp	LBB0_13
LBB0_9:
	movq	_LIBUSB20_ERROR_INVALID_PARAM@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_10:
	movq	8(%r13), %rdi
	callq	_free
LBB0_11:
	movq	_LIBUSB20_ERROR_NO_MEM@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_12:
	movq	%r13, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	%ebx, %edx
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	movl	-52(%rbp), %r8d                 ## 4-byte Reload
	xorl	%r9d, %r9d
LBB0_13:
	callq	*%rax
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_15
## %bb.14:
	movq	16(%r13), %rdi
	callq	_free
	movq	8(%r13), %rdi
	callq	_free
	jmp	LBB0_3
LBB0_15:
	movl	$1, (%r13)
	xorl	%ebx, %ebx
	jmp	LBB0_3
	.cfi_endproc
                                        ## -- End function
	.comm	_LIBUSB20_ERROR_BUSY,4,2        ## @LIBUSB20_ERROR_BUSY
	.comm	_LIBUSB20_MAX_FRAME_PRE_SCALE,4,2 ## @LIBUSB20_MAX_FRAME_PRE_SCALE
	.comm	_LIBUSB20_ERROR_INVALID_PARAM,4,2 ## @LIBUSB20_ERROR_INVALID_PARAM
	.comm	_LIBUSB20_ERROR_NO_MEM,4,2      ## @LIBUSB20_ERROR_NO_MEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_libusb20_tr_open_stream        ; -- Begin function libusb20_tr_open_stream
	.p2align	2
_libusb20_tr_open_stream:               ; @libusb20_tr_open_stream
	.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
	ldr	w8, [x0]
	cbz	w8, LBB0_4
; %bb.1:
Lloh0:
	adrp	x8, _LIBUSB20_ERROR_BUSY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LIBUSB20_ERROR_BUSY@GOTPAGEOFF]
LBB0_2:
	ldr	w20, [x8]
LBB0_3:
	mov	x0, x20
	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_4:
Lloh2:
	adrp	x8, _LIBUSB20_MAX_FRAME_PRE_SCALE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _LIBUSB20_MAX_FRAME_PRE_SCALE@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	ands	w25, w8, w2
	bic	w8, w2, w8
	lsl	w8, w8, #3
	csel	w23, w2, w8, eq
	cbz	w23, LBB0_9
; %bb.5:
	mov	x20, x4
	mov	x21, x3
	mov	x22, x1
	mov	x19, x0
	str	w23, [x0, #4]
	lsl	w24, w23, #2
	mov	x0, x24
	bl	_malloc
	str	x0, [x19, #8]
	cbz	x0, LBB0_11
; %bb.6:
	mov	w1, #0
	mov	x2, x24
	bl	_memset
	mov	x0, x24
	bl	_malloc
	str	x0, [x19, #16]
	cbz	x0, LBB0_10
; %bb.7:
	mov	w1, #0
	mov	x2, x24
	bl	_memset
	ldr	x8, [x19, #24]
	ldr	x8, [x8]
	ldr	x8, [x8]
	cbz	w25, LBB0_12
; %bb.8:
	add	w9, w23, #7
	cmp	w23, #0
	csel	w9, w9, w23, lt
	asr	w2, w9, #3
	mov	x0, x19
	mov	x1, x22
	mov	x3, x21
	mov	x4, x20
	mov	w5, #1
	b	LBB0_13
LBB0_9:
Lloh5:
	adrp	x8, _LIBUSB20_ERROR_INVALID_PARAM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _LIBUSB20_ERROR_INVALID_PARAM@GOTPAGEOFF]
	b	LBB0_2
LBB0_10:
	ldr	x0, [x19, #8]
	bl	_free
LBB0_11:
Lloh7:
	adrp	x8, _LIBUSB20_ERROR_NO_MEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _LIBUSB20_ERROR_NO_MEM@GOTPAGEOFF]
	b	LBB0_2
LBB0_12:
	mov	x0, x19
	mov	x1, x22
	mov	x2, x23
	mov	x3, x21
	mov	x4, x20
	mov	w5, #0
LBB0_13:
	blr	x8
	mov	x20, x0
	cbz	w0, LBB0_15
; %bb.14:
	ldr	x0, [x19, #16]
	bl	_free
	ldr	x0, [x19, #8]
	bl	_free
	b	LBB0_3
LBB0_15:
	mov	w8, #1
	str	w8, [x19]
	b	LBB0_3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_LIBUSB20_ERROR_BUSY,4,2        ; @LIBUSB20_ERROR_BUSY
	.comm	_LIBUSB20_MAX_FRAME_PRE_SCALE,4,2 ; @LIBUSB20_MAX_FRAME_PRE_SCALE
	.comm	_LIBUSB20_ERROR_INVALID_PARAM,4,2 ; @LIBUSB20_ERROR_INVALID_PARAM
	.comm	_LIBUSB20_ERROR_NO_MEM,4,2      ; @LIBUSB20_ERROR_NO_MEM
.subsections_via_symbols
