	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hackrf_start_streaming
_hackrf_start_streaming:                ## @hackrf_start_streaming
	.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
	movl	%esi, %ebx
	movq	%rdi, %r14
	callq	_vb2_get_drv_priv
	movq	%rax, %r12
	movq	16(%rax), %rdi
	leaq	L_.str(%rip), %rsi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movl	%ebx, %edx
	callq	_dev_dbg
	movq	%r12, %rdi
	callq	_mutex_lock
	movq	(%r14), %r13
	movq	_V4L2_BUF_TYPE_SDR_CAPTURE@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	cmpq	%r15, %r13
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	jne	LBB0_3
## %bb.1:
	movq	_TX_ON@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	4(%r12), %rbx
	movq	%rbx, %rsi
	callq	_test_bit
	testq	%rax, %rax
	jne	LBB0_14
## %bb.2:
	movl	$1, -44(%rbp)                   ## 4-byte Folded Spill
	movq	_RX_ON@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_3:
	movq	_RX_ON@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	4(%r12), %rbx
	movq	%rbx, %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_4
LBB0_14:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_12
LBB0_4:
	movl	$2, -44(%rbp)                   ## 4-byte Folded Spill
	movq	_TX_ON@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_set_bit
	movq	$0, 8(%r12)
	movq	%r12, %rdi
	callq	_hackrf_alloc_stream_bufs
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_11
## %bb.6:
	xorl	%esi, %esi
	cmpq	%r15, %r13
	sete	%sil
	movq	%r12, %rdi
	callq	_hackrf_alloc_urbs
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_11
## %bb.7:
	movq	%r12, %rdi
	callq	_hackrf_submit_urbs
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_11
## %bb.8:
	movq	%r12, %rdi
	callq	_hackrf_set_params
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_11
## %bb.9:
	movq	_CMD_SET_TRANSCEIVER_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%r13d, %r13d
	movq	%r12, %rdi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_hackrf_ctrl_msg
	movl	%eax, %r14d
	testl	%eax, %eax
	je	LBB0_10
LBB0_11:
	movq	%r12, %rdi
	callq	_hackrf_kill_urbs
	movq	%r12, %rdi
	callq	_hackrf_free_urbs
	movq	%r12, %rdi
	callq	_hackrf_free_stream_bufs
	movq	_RX_ON@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r12, %rbx
	addq	$4, %rbx
	movq	%rbx, %rsi
	callq	_clear_bit
	movq	_TX_ON@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_clear_bit
LBB0_12:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	_VB2_BUF_STATE_QUEUED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_hackrf_return_all_buffers
	movq	%r12, %rdi
	callq	_mutex_unlock
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	movl	%r14d, %edx
	callq	_dev_dbg
	movl	%r14d, %r13d
LBB0_13:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	%r12, %rdi
	callq	_mutex_unlock
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"count=%i\n"

	.comm	_V4L2_BUF_TYPE_SDR_CAPTURE,8,3  ## @V4L2_BUF_TYPE_SDR_CAPTURE
	.comm	_TX_ON,4,2                      ## @TX_ON
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_RX_ON,4,2                      ## @RX_ON
	.comm	_CMD_SET_TRANSCEIVER_MODE,4,2   ## @CMD_SET_TRANSCEIVER_MODE
	.comm	_VB2_BUF_STATE_QUEUED,4,2       ## @VB2_BUF_STATE_QUEUED
L_.str.1:                               ## @.str.1
	.asciz	"failed=%d\n"

	.no_dead_strip	_hackrf_start_streaming
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hackrf_start_streaming
_hackrf_start_streaming:                ; @hackrf_start_streaming
	.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
	mov	x22, x1
	mov	x21, x0
	bl	_vb2_get_drv_priv
	mov	x20, x0
	ldr	x19, [x0, #16]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x22
	bl	_dev_dbg
	mov	x0, x20
	bl	_mutex_lock
	ldr	x24, [x21]
Lloh2:
	adrp	x8, _V4L2_BUF_TYPE_SDR_CAPTURE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _V4L2_BUF_TYPE_SDR_CAPTURE@GOTPAGEOFF]
Lloh4:
	ldr	x25, [x8]
	cmp	x24, x25
	b.ne	LBB0_3
; %bb.1:
Lloh5:
	adrp	x8, _TX_ON@GOTPAGE
Lloh6:
	ldr	x8, [x8, _TX_ON@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	add	x22, x20, #4
	mov	x1, x22
	bl	_test_bit
	cbnz	x0, LBB0_4
; %bb.2:
	mov	w23, #1
Lloh8:
	adrp	x8, _RX_ON@GOTPAGE
Lloh9:
	ldr	x8, [x8, _RX_ON@GOTPAGEOFF]
	b	LBB0_6
LBB0_3:
Lloh10:
	adrp	x8, _RX_ON@GOTPAGE
Lloh11:
	ldr	x8, [x8, _RX_ON@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	add	x22, x20, #4
	mov	x1, x22
	bl	_test_bit
	cbz	x0, LBB0_5
LBB0_4:
Lloh13:
	adrp	x8, _EBUSY@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_12
LBB0_5:
	mov	w23, #2
Lloh16:
	adrp	x8, _TX_ON@GOTPAGE
Lloh17:
	ldr	x8, [x8, _TX_ON@GOTPAGEOFF]
LBB0_6:
	ldr	w0, [x8]
	mov	x1, x22
	bl	_set_bit
	str	xzr, [x20, #8]
	mov	x0, x20
	bl	_hackrf_alloc_stream_bufs
	mov	x22, x0
	cbnz	w0, LBB0_11
; %bb.7:
	cmp	x24, x25
	cset	w1, eq
	mov	x0, x20
	bl	_hackrf_alloc_urbs
	mov	x22, x0
	cbnz	w0, LBB0_11
; %bb.8:
	mov	x0, x20
	bl	_hackrf_submit_urbs
	mov	x22, x0
	cbnz	w0, LBB0_11
; %bb.9:
	mov	x0, x20
	bl	_hackrf_set_params
	mov	x22, x0
	cbnz	w0, LBB0_11
; %bb.10:
Lloh18:
	adrp	x8, _CMD_SET_TRANSCEIVER_MODE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _CMD_SET_TRANSCEIVER_MODE@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, x23
	mov	w3, #0
	mov	x4, #0
	mov	w5, #0
	bl	_hackrf_ctrl_msg
	mov	x22, x0
	cbz	w0, LBB0_14
LBB0_11:
	mov	x0, x20
	bl	_hackrf_kill_urbs
	mov	x0, x20
	bl	_hackrf_free_urbs
	mov	x0, x20
	bl	_hackrf_free_stream_bufs
Lloh21:
	adrp	x8, _RX_ON@GOTPAGE
Lloh22:
	ldr	x8, [x8, _RX_ON@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
	add	x23, x20, #4
	mov	x1, x23
	bl	_clear_bit
Lloh24:
	adrp	x8, _TX_ON@GOTPAGE
Lloh25:
	ldr	x8, [x8, _TX_ON@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
	mov	x1, x23
	bl	_clear_bit
LBB0_12:
Lloh27:
	adrp	x8, _VB2_BUF_STATE_QUEUED@GOTPAGE
Lloh28:
	ldr	x8, [x8, _VB2_BUF_STATE_QUEUED@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_hackrf_return_all_buffers
	mov	x0, x20
	bl	_mutex_unlock
Lloh30:
	adrp	x1, l_.str.1@PAGE
Lloh31:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x2, x22
	bl	_dev_dbg
LBB0_13:
	mov	x0, x22
	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_14:
	mov	x0, x20
	bl	_mutex_unlock
	b	LBB0_13
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"count=%i\n"

	.comm	_V4L2_BUF_TYPE_SDR_CAPTURE,8,3  ; @V4L2_BUF_TYPE_SDR_CAPTURE
	.comm	_TX_ON,4,2                      ; @TX_ON
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_RX_ON,4,2                      ; @RX_ON
	.comm	_CMD_SET_TRANSCEIVER_MODE,4,2   ; @CMD_SET_TRANSCEIVER_MODE
	.comm	_VB2_BUF_STATE_QUEUED,4,2       ; @VB2_BUF_STATE_QUEUED
l_.str.1:                               ; @.str.1
	.asciz	"failed=%d\n"

	.no_dead_strip	_hackrf_start_streaming
.subsections_via_symbols
