	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function si470x_usb_driver_disconnect
_si470x_usb_driver_disconnect:          ## @si470x_usb_driver_disconnect
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	callq	_usb_get_intfdata
	movq	%rax, %rbx
	leaq	16(%rax), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movl	$1, (%rbx)
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_usb_set_intfdata
	cmpq	$0, 8(%rbx)
	jne	LBB0_2
## %bb.1:
	movq	_BLINK_ORANGE_LED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_si470x_set_led_state
	movl	48(%rbx), %edi
	callq	_usb_free_urb
	movq	40(%rbx), %rdi
	callq	_kfree
	movl	32(%rbx), %edi
	callq	_video_unregister_device
	movq	24(%rbx), %rdi
	callq	_kfree
	movq	%rbx, %rdi
	callq	_kfree
LBB0_2:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mutex_unlock                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_BLINK_ORANGE_LED,4,2           ## @BLINK_ORANGE_LED
	.no_dead_strip	_si470x_usb_driver_disconnect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function si470x_usb_driver_disconnect
_si470x_usb_driver_disconnect:          ; @si470x_usb_driver_disconnect
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x21, x0
	bl	_usb_get_intfdata
	mov	x20, x0
	add	x19, x0, #16
	mov	x0, x19
	bl	_mutex_lock
	mov	w8, #1
	str	w8, [x20]
	mov	x0, x21
	mov	x1, #0
	bl	_usb_set_intfdata
	ldr	x8, [x20, #8]
	cbnz	x8, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _BLINK_ORANGE_LED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BLINK_ORANGE_LED@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_si470x_set_led_state
	ldr	w0, [x20, #48]
	bl	_usb_free_urb
	ldr	x0, [x20, #40]
	bl	_kfree
	ldr	w0, [x20, #32]
	bl	_video_unregister_device
	ldr	x0, [x20, #24]
	bl	_kfree
	mov	x0, x20
	bl	_kfree
LBB0_2:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_mutex_unlock
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_BLINK_ORANGE_LED,4,2           ; @BLINK_ORANGE_LED
	.no_dead_strip	_si470x_usb_driver_disconnect
.subsections_via_symbols
