	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function airspy_alloc_urbs
_airspy_alloc_urbs:                     ## @airspy_alloc_urbs
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_MAX_BULK_BUFS@GOTPCREL(%rip), %r15
	cmpl	$0, (%r15)
	jle	LBB0_9
## %bb.1:
	movq	%rdi, %r14
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	36(%r14), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r12d, %edx
	callq	_dev_dbg
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edi, %edi
	callq	_usb_alloc_urb
	movq	16(%r14), %rcx
	movq	%rax, (%rcx,%r12,8)
	movq	16(%r14), %rax
	movq	(%rax,%r12,8), %rbx
	testq	%rbx, %rbx
	je	LBB0_3
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	32(%r14), %r13d
	movl	%r13d, %edi
	movl	$129, %esi
	callq	_usb_rcvbulkpipe
	movq	24(%r14), %rcx
	movl	(%rcx,%r12,4), %ecx
	movq	_BULK_BUFFER_SIZE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r8d
	movq	_airspy_urb_complete@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r9d
	movq	%r14, (%rsp)
	movq	%rbx, %rdi
	movl	%r13d, %esi
	movl	%eax, %edx
	callq	_usb_fill_bulk_urb
	movq	_URB_NO_TRANSFER_DMA_MAP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	16(%r14), %rcx
	movq	(%rcx,%r12,8), %rcx
	movl	%eax, 4(%rcx)
	movq	8(%r14), %rax
	movl	(%rax,%r12,4), %eax
	movl	%eax, (%rcx)
	incl	(%r14)
	incq	%r12
	movslq	(%r15), %rax
	cmpq	%rax, %r12
	jl	LBB0_2
LBB0_9:
	xorl	%eax, %eax
	jmp	LBB0_10
LBB0_3:
	testl	%r12d, %r12d
	je	LBB0_7
## %bb.4:
	movq	(%rax), %rdi
	callq	_usb_free_urb
	cmpq	$1, %r12
	je	LBB0_7
## %bb.5:
	movl	$1, %ebx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r14), %rax
	movq	(%rax,%rbx,8), %rdi
	callq	_usb_free_urb
	incq	%rbx
	cmpq	%rbx, %r12
	jne	LBB0_6
LBB0_7:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_BULK_BUFS,4,2              ## @MAX_BULK_BUFS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"alloc urb=%d\n"

	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_BULK_BUFFER_SIZE,4,2           ## @BULK_BUFFER_SIZE
	.comm	_airspy_urb_complete,4,2        ## @airspy_urb_complete
	.comm	_URB_NO_TRANSFER_DMA_MAP,4,2    ## @URB_NO_TRANSFER_DMA_MAP
	.no_dead_strip	_airspy_alloc_urbs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function airspy_alloc_urbs
_airspy_alloc_urbs:                     ; @airspy_alloc_urbs
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
Lloh0:
	adrp	x24, _MAX_BULK_BUFS@GOTPAGE
Lloh1:
	ldr	x24, [x24, _MAX_BULK_BUFS@GOTPAGEOFF]
	ldr	w8, [x24]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x19, x0
	mov	x20, #0
Lloh2:
	adrp	x25, _GFP_ATOMIC@GOTPAGE
Lloh3:
	ldr	x25, [x25, _GFP_ATOMIC@GOTPAGEOFF]
Lloh4:
	adrp	x21, l_.str@PAGE
Lloh5:
	add	x21, x21, l_.str@PAGEOFF
Lloh6:
	adrp	x27, _airspy_urb_complete@GOTPAGE
Lloh7:
	ldr	x27, [x27, _airspy_urb_complete@GOTPAGEOFF]
Lloh8:
	adrp	x28, _URB_NO_TRANSFER_DMA_MAP@GOTPAGE
Lloh9:
	ldr	x28, [x28, _URB_NO_TRANSFER_DMA_MAP@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19, #36]
	mov	x1, x21
	mov	x2, x20
	bl	_dev_dbg
	ldr	w1, [x25]
	mov	w0, #0
	bl	_usb_alloc_urb
	ldr	x8, [x19, #16]
	lsl	x9, x20, #3
	str	x0, [x8, x9]
	ldr	x8, [x19, #16]
	ldr	x22, [x8, x9]
	cbz	x22, LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w23, [x19, #32]
	mov	x0, x23
	mov	w1, #129
	bl	_usb_rcvbulkpipe
	mov	x2, x0
	ldr	x8, [x19, #24]
	lsl	x26, x20, #2
	ldr	w3, [x8, x26]
Lloh10:
	adrp	x8, _BULK_BUFFER_SIZE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _BULK_BUFFER_SIZE@GOTPAGEOFF]
Lloh12:
	ldr	w4, [x8]
	ldr	w5, [x27]
	mov	x0, x22
	mov	x1, x23
	mov	x6, x19
	bl	_usb_fill_bulk_urb
	ldr	w8, [x28]
	ldp	x10, x9, [x19, #8]
	ldr	x9, [x9, x20, lsl #3]
	str	w8, [x9, #4]
	ldr	w8, [x10, x26]
	str	w8, [x9]
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
	add	x20, x20, #1
	ldrsw	x8, [x24]
	cmp	x20, x8
	b.lt	LBB0_2
LBB0_4:
	mov	w0, #0
	b	LBB0_10
LBB0_5:
	cbz	w20, LBB0_9
; %bb.6:
	ldr	x0, [x8]
	bl	_usb_free_urb
	cmp	x20, #1
	b.eq	LBB0_9
; %bb.7:
	mov	w21, #1
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #16]
	ldr	x0, [x8, x21, lsl #3]
	bl	_usb_free_urb
	add	x21, x21, #1
	cmp	x20, x21
	b.ne	LBB0_8
LBB0_9:
Lloh13:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_10:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_BULK_BUFS,4,2              ; @MAX_BULK_BUFS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"alloc urb=%d\n"

	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_BULK_BUFFER_SIZE,4,2           ; @BULK_BUFFER_SIZE
	.comm	_airspy_urb_complete,4,2        ; @airspy_urb_complete
	.comm	_URB_NO_TRANSFER_DMA_MAP,4,2    ; @URB_NO_TRANSFER_DMA_MAP
	.no_dead_strip	_airspy_alloc_urbs
.subsections_via_symbols
