	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ims_pcu_reset_device
_ims_pcu_reset_device:                  ## @ims_pcu_reset_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	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movq	%rdx, %rbx
	callq	_to_usb_interface
	movq	%rax, %rdi
	callq	_usb_get_intfdata
	movq	%rax, %r15
	leaq	-28(%rbp), %rdx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_kstrtoint
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_6
## %bb.1:
	cmpl	$1, -28(%rbp)
	jne	LBB0_2
## %bb.3:
	movl	(%r15), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_info
	movq	_PCU_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	_ims_pcu_reset_device.reset_byte(%rip), %rdx
	movq	%r15, %rdi
	movl	$1, %ecx
	callq	_ims_pcu_execute_command
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	%eax, %ebx
	movl	(%r15), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_info
	jmp	LBB0_6
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_6
LBB0_5:
	movl	%r14d, %ebx
LBB0_6:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	2                               ## @ims_pcu_reset_device.reset_byte
_ims_pcu_reset_device.reset_byte:
	.long	1                               ## 0x1

	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Attempting to reset device\n"

	.comm	_PCU_RESET,4,2                  ## @PCU_RESET
L_.str.1:                               ## @.str.1
	.asciz	"Failed to reset device, error: %d\n"

	.no_dead_strip	_ims_pcu_reset_device
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ims_pcu_reset_device
_ims_pcu_reset_device:                  ; @ims_pcu_reset_device
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x19, x3
	mov	x21, x2
	bl	_to_usb_interface
	bl	_usb_get_intfdata
	mov	x20, x0
	add	x2, sp, #12
	mov	x0, x21
	mov	w1, #0
	bl	_kstrtoint
	mov	x21, x0
	cbnz	w0, LBB0_6
; %bb.1:
	ldr	w8, [sp, #12]
	cmp	w8, #1
	b.ne	LBB0_4
; %bb.2:
	ldr	w0, [x20]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_info
Lloh2:
	adrp	x8, _PCU_RESET@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PCU_RESET@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x2, _ims_pcu_reset_device.reset_byte@PAGE
Lloh6:
	add	x2, x2, _ims_pcu_reset_device.reset_byte@PAGEOFF
	mov	x0, x20
	mov	w3, #1
	bl	_ims_pcu_execute_command
	cbz	w0, LBB0_5
; %bb.3:
	mov	x21, x0
	ldr	w0, [x20]
	str	x21, [sp]
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_info
	b	LBB0_6
LBB0_4:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_6
LBB0_5:
	mov	x21, x19
LBB0_6:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	2                               ; @ims_pcu_reset_device.reset_byte
_ims_pcu_reset_device.reset_byte:
	.long	1                               ; 0x1

	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Attempting to reset device\n"

	.comm	_PCU_RESET,4,2                  ; @PCU_RESET
l_.str.1:                               ; @.str.1
	.asciz	"Failed to reset device, error: %d\n"

	.no_dead_strip	_ims_pcu_reset_device
.subsections_via_symbols
