	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rc_unregister_device           ## -- Begin function rc_unregister_device
	.p2align	4, 0x90
_rc_unregister_device:                  ## @rc_unregister_device
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	testq	%rdi, %rdi
	je	LBB0_9
## %bb.1:
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	_RC_DRIVER_IR_RAW@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.2:
	movq	%rbx, %rdi
	callq	_ir_raw_event_unregister
LBB0_3:
	leaq	60(%rbx), %rdi
	callq	_del_timer_sync
	leaq	56(%rbx), %rdi
	callq	_del_timer_sync
	movq	%rbx, %rdi
	callq	_rc_free_rx_device
	leaq	36(%rbx), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	cmpq	$0, 48(%rbx)
	je	LBB0_6
## %bb.4:
	movq	40(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	%rbx, %rdi
	callq	*%rax
LBB0_6:
	movl	$0, 8(%rbx)
	movq	%r14, %rdi
	callq	_mutex_unlock
	movq	16(%rbx), %rax
	movq	_RC_PROTO_BIT_CEC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_8
## %bb.7:
	movq	%rbx, %rdi
	callq	_ir_lirc_unregister
LBB0_8:
	leaq	32(%rbx), %rdi
	callq	_device_del
	movl	28(%rbx), %esi
	movq	_rc_ida@GOTPCREL(%rip), %rdi
	callq	_ida_simple_remove
	cmpl	$0, 24(%rbx)
	je	LBB0_10
LBB0_9:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_10:
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_rc_free_device                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_RC_DRIVER_IR_RAW,8,3           ## @RC_DRIVER_IR_RAW
	.comm	_RC_PROTO_BIT_CEC,8,3           ## @RC_PROTO_BIT_CEC
	.comm	_rc_ida,4,2                     ## @rc_ida
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rc_unregister_device           ; -- Begin function rc_unregister_device
	.p2align	2
_rc_unregister_device:                  ; @rc_unregister_device
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	cbz	x0, LBB0_9
; %bb.1:
	mov	x19, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _RC_DRIVER_IR_RAW@GOTPAGE
Lloh1:
	ldr	x9, [x9, _RC_DRIVER_IR_RAW@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.2:
	mov	x0, x19
	bl	_ir_raw_event_unregister
LBB0_3:
	add	x0, x19, #60
	bl	_del_timer_sync
	add	x0, x19, #56
	bl	_del_timer_sync
	mov	x0, x19
	bl	_rc_free_rx_device
	add	x20, x19, #36
	mov	x0, x20
	bl	_mutex_lock
	ldr	x8, [x19, #48]
	cbz	x8, LBB0_6
; %bb.4:
	ldr	x8, [x19, #40]
	cbz	x8, LBB0_6
; %bb.5:
	mov	x0, x19
	blr	x8
LBB0_6:
	str	wzr, [x19, #8]
	mov	x0, x20
	bl	_mutex_unlock
	ldr	x8, [x19, #16]
Lloh3:
	adrp	x9, _RC_PROTO_BIT_CEC@GOTPAGE
Lloh4:
	ldr	x9, [x9, _RC_PROTO_BIT_CEC@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_8
; %bb.7:
	mov	x0, x19
	bl	_ir_lirc_unregister
LBB0_8:
	add	x0, x19, #32
	bl	_device_del
	ldr	w1, [x19, #28]
Lloh6:
	adrp	x0, _rc_ida@GOTPAGE
Lloh7:
	ldr	x0, [x0, _rc_ida@GOTPAGEOFF]
	bl	_ida_simple_remove
	ldr	w8, [x19, #24]
	cbz	w8, LBB0_10
LBB0_9:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_10:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_rc_free_device
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_RC_DRIVER_IR_RAW,8,3           ; @RC_DRIVER_IR_RAW
	.comm	_RC_PROTO_BIT_CEC,8,3           ; @RC_PROTO_BIT_CEC
	.comm	_rc_ida,4,2                     ; @rc_ida
.subsections_via_symbols
