	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function r592_enable_device
_r592_enable_device:                    ## @r592_enable_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
	movl	%esi, %ebx
	movq	%rdi, %r14
	testl	%esi, %esi
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.1(%rip), %rsi
	cmoveq	%rax, %rsi
	leaq	L_.str(%rip), %rdi
	callq	_dbg
	movq	_R592_POWER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	testl	%ebx, %ebx
	je	LBB0_2
## %bb.1:
	movq	_R592_POWER_0@GOTPCREL(%rip), %rax
	movq	_R592_POWER_1@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	%r14, %rdi
	callq	_r592_write_reg
	movq	_R592_IO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_R592_IO_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_r592_set_reg_mask
	movl	$100, %edi
	callq	_msleep
	jmp	LBB0_3
LBB0_2:
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_r592_write_reg
LBB0_3:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%sabling the device"

L_.str.1:                               ## @.str.1
	.asciz	"en"

L_.str.2:                               ## @.str.2
	.asciz	"dis"

	.comm	_R592_POWER,4,2                 ## @R592_POWER
	.comm	_R592_POWER_0,4,2               ## @R592_POWER_0
	.comm	_R592_POWER_1,4,2               ## @R592_POWER_1
	.comm	_R592_IO,4,2                    ## @R592_IO
	.comm	_R592_IO_RESET,4,2              ## @R592_IO_RESET
	.no_dead_strip	_r592_enable_device
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function r592_enable_device
_r592_enable_device:                    ; @r592_enable_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
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, l_.str.1@PAGE
Lloh1:
	add	x8, x8, l_.str.1@PAGEOFF
Lloh2:
	adrp	x9, l_.str.2@PAGE
Lloh3:
	add	x9, x9, l_.str.2@PAGEOFF
	cmp	w1, #0
	csel	x1, x9, x8, eq
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	bl	_dbg
Lloh6:
	adrp	x8, _R592_POWER@GOTPAGE
Lloh7:
	ldr	x8, [x8, _R592_POWER@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	cbz	w20, LBB0_2
; %bb.1:
Lloh9:
	adrp	x8, _R592_POWER_0@GOTPAGE
Lloh10:
	ldr	x8, [x8, _R592_POWER_0@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _R592_POWER_1@GOTPAGE
Lloh13:
	ldr	x9, [x9, _R592_POWER_1@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x19
	bl	_r592_write_reg
Lloh15:
	adrp	x8, _R592_IO@GOTPAGE
Lloh16:
	ldr	x8, [x8, _R592_IO@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
Lloh18:
	adrp	x8, _R592_IO_RESET@GOTPAGE
Lloh19:
	ldr	x8, [x8, _R592_IO_RESET@GOTPAGEOFF]
Lloh20:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_r592_set_reg_mask
	mov	w0, #100
	bl	_msleep
	b	LBB0_3
LBB0_2:
	mov	x0, x19
	mov	w2, #0
	bl	_r592_write_reg
LBB0_3:
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%sabling the device"

l_.str.1:                               ; @.str.1
	.asciz	"en"

l_.str.2:                               ; @.str.2
	.asciz	"dis"

	.comm	_R592_POWER,4,2                 ; @R592_POWER
	.comm	_R592_POWER_0,4,2               ; @R592_POWER_0
	.comm	_R592_POWER_1,4,2               ; @R592_POWER_1
	.comm	_R592_IO,4,2                    ; @R592_IO
	.comm	_R592_IO_RESET,4,2              ; @R592_IO_RESET
	.no_dead_strip	_r592_enable_device
.subsections_via_symbols
