	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ims_pcu_disconnect
_ims_pcu_disconnect:                    ## @ims_pcu_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, %rbx
	callq	_usb_get_intfdata
	movq	%rax, %r14
	movq	8(%rbx), %r15
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_usb_set_intfdata
	movq	(%r15), %rax
	movq	_USB_CLASS_COMM@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.1:
	movq	_ims_pcu_attr_group@GOTPCREL(%rip), %rsi
	movq	%rbx, %rdi
	callq	_sysfs_remove_group
	movq	%r14, %rdi
	callq	_ims_pcu_stop_io
	cmpq	$0, (%r14)
	je	LBB0_3
## %bb.2:
	movq	%r14, %rdi
	callq	_ims_pcu_destroy_bootloader_mode
	jmp	LBB0_4
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%r14, %rdi
	callq	_ims_pcu_destroy_application_mode
LBB0_4:
	movq	%r14, %rdi
	callq	_ims_pcu_buffers_free
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_kfree                          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_USB_CLASS_COMM,8,3             ## @USB_CLASS_COMM
	.comm	_ims_pcu_attr_group,4,2         ## @ims_pcu_attr_group
	.no_dead_strip	_ims_pcu_disconnect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ims_pcu_disconnect
_ims_pcu_disconnect:                    ; @ims_pcu_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	x20, x0
	bl	_usb_get_intfdata
	mov	x19, x0
	ldr	x21, [x20, #8]
	mov	x0, x20
	mov	x1, #0
	bl	_usb_set_intfdata
	ldr	x8, [x21]
Lloh0:
	adrp	x9, _USB_CLASS_COMM@GOTPAGE
Lloh1:
	ldr	x9, [x9, _USB_CLASS_COMM@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.1:
Lloh3:
	adrp	x1, _ims_pcu_attr_group@GOTPAGE
Lloh4:
	ldr	x1, [x1, _ims_pcu_attr_group@GOTPAGEOFF]
	mov	x0, x20
	bl	_sysfs_remove_group
	mov	x0, x19
	bl	_ims_pcu_stop_io
	ldr	x8, [x19]
	cbz	x8, LBB0_4
; %bb.2:
	mov	x0, x19
	bl	_ims_pcu_destroy_bootloader_mode
	b	LBB0_5
LBB0_3:
	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
	ret
LBB0_4:
	mov	x0, x19
	bl	_ims_pcu_destroy_application_mode
LBB0_5:
	mov	x0, x19
	bl	_ims_pcu_buffers_free
	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	_kfree
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_USB_CLASS_COMM,8,3             ; @USB_CLASS_COMM
	.comm	_ims_pcu_attr_group,4,2         ; @ims_pcu_attr_group
	.no_dead_strip	_ims_pcu_disconnect
.subsections_via_symbols
