	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ims_pcu_destroy_application_mode
_ims_pcu_destroy_application_mode:      ## @ims_pcu_destroy_application_mode
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	cmpl	$0, (%rdi)
	je	LBB0_4
## %bb.1:
	movq	%rdi, %rbx
	movl	$0, (%rdi)
	xorl	%eax, %eax
	callq	_mb
	cmpq	$0, 24(%rbx)
	je	LBB0_3
## %bb.2:
	movq	%rbx, %rdi
	callq	_ims_pcu_destroy_gamepad
LBB0_3:
	movq	%rbx, %rdi
	callq	_ims_pcu_destroy_buttons
	movq	%rbx, %rdi
	callq	_ims_pcu_destroy_backlight
	movq	8(%rbx), %rax
	movq	_IMS_PCU_PCU_B_DEVICE_ID@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_5:
	movq	16(%rbx), %rdi
	movq	_ims_pcu_ofn_attr_group@GOTPCREL(%rip), %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_sysfs_remove_group             ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_IMS_PCU_PCU_B_DEVICE_ID,8,3    ## @IMS_PCU_PCU_B_DEVICE_ID
	.comm	_ims_pcu_ofn_attr_group,4,2     ## @ims_pcu_ofn_attr_group
	.no_dead_strip	_ims_pcu_destroy_application_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ims_pcu_destroy_application_mode
_ims_pcu_destroy_application_mode:      ; @ims_pcu_destroy_application_mode
	.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
	ldr	w8, [x0]
	cbz	w8, LBB0_4
; %bb.1:
	mov	x19, x0
	str	wzr, [x0]
	bl	_mb
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_3
; %bb.2:
	mov	x0, x19
	bl	_ims_pcu_destroy_gamepad
LBB0_3:
	mov	x0, x19
	bl	_ims_pcu_destroy_buttons
	mov	x0, x19
	bl	_ims_pcu_destroy_backlight
	ldr	x8, [x19, #8]
Lloh0:
	adrp	x9, _IMS_PCU_PCU_B_DEVICE_ID@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IMS_PCU_PCU_B_DEVICE_ID@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
LBB0_4:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_5:
	ldr	x0, [x19, #16]
Lloh3:
	adrp	x1, _ims_pcu_ofn_attr_group@GOTPAGE
Lloh4:
	ldr	x1, [x1, _ims_pcu_ofn_attr_group@GOTPAGEOFF]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_sysfs_remove_group
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_IMS_PCU_PCU_B_DEVICE_ID,8,3    ; @IMS_PCU_PCU_B_DEVICE_ID
	.comm	_ims_pcu_ofn_attr_group,4,2     ; @ims_pcu_ofn_attr_group
	.no_dead_strip	_ims_pcu_destroy_application_mode
.subsections_via_symbols
