	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tt3650_ci_slot_reset
_tt3650_ci_slot_reset:                  ## @tt3650_ci_slot_reset
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	(%rdi), %r15
	movq	(%r15), %r14
	leaq	L_.str(%rip), %rdi
	callq	_ci_dbg
	testl	%ebx, %ebx
	je	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_6
LBB0_2:
	movl	$0, -36(%rbp)
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	_TT3650_CMD_CI_RESET@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	leaq	-36(%rbp), %rdx
	movq	%r15, %rdi
	movl	$1, %ecx
	movl	$1, %r8d
	callq	_tt3650_ci_msg
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_5
## %bb.3:
	movl	$500, %edi                      ## imm = 0x1F4
	callq	_msleep
	movl	$1, -36(%rbp)
	movl	(%r12), %esi
	leaq	-36(%rbp), %rdx
	movq	%r15, %rdi
	movl	$1, %ecx
	movl	$1, %r8d
	callq	_tt3650_ci_msg
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_5
## %bb.4:
	movl	$500, %edi                      ## imm = 0x1F4
	callq	_msleep
	movl	$0, -36(%rbp)
	movq	_TT3650_CMD_CI_SET_VIDEO_PORT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-36(%rbp), %rdx
	movq	%r15, %rdi
	movl	$1, %ecx
	movl	$1, %r8d
	callq	_tt3650_ci_msg
	movl	%eax, %ebx
	movl	$1100, %edi                     ## imm = 0x44C
	callq	_msleep
LBB0_5:
	movq	%r14, %rdi
	callq	_mutex_unlock
LBB0_6:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%d"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_TT3650_CMD_CI_RESET,4,2        ## @TT3650_CMD_CI_RESET
	.comm	_TT3650_CMD_CI_SET_VIDEO_PORT,4,2 ## @TT3650_CMD_CI_SET_VIDEO_PORT
	.no_dead_strip	_tt3650_ci_slot_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tt3650_ci_slot_reset
_tt3650_ci_slot_reset:                  ; @tt3650_ci_slot_reset
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x1
	ldr	x20, [x0]
	ldr	x19, [x20]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_ci_dbg
	cbz	w21, LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_6
LBB0_2:
	str	wzr, [sp, #12]
	mov	x0, x19
	bl	_mutex_lock
Lloh5:
	adrp	x22, _TT3650_CMD_CI_RESET@GOTPAGE
Lloh6:
	ldr	x22, [x22, _TT3650_CMD_CI_RESET@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	w23, #1
	add	x2, sp, #12
	mov	x0, x20
	mov	w3, #1
	mov	w4, #1
	bl	_tt3650_ci_msg
	mov	x21, x0
	cbnz	w0, LBB0_5
; %bb.3:
	mov	w0, #500
	bl	_msleep
	str	w23, [sp, #12]
	ldr	w1, [x22]
	add	x2, sp, #12
	mov	x0, x20
	mov	w3, #1
	mov	w4, #1
	bl	_tt3650_ci_msg
	mov	x21, x0
	cbnz	w0, LBB0_5
; %bb.4:
	mov	w0, #500
	bl	_msleep
	str	wzr, [sp, #12]
Lloh7:
	adrp	x8, _TT3650_CMD_CI_SET_VIDEO_PORT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _TT3650_CMD_CI_SET_VIDEO_PORT@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x20
	mov	w3, #1
	mov	w4, #1
	bl	_tt3650_ci_msg
	mov	x21, x0
	mov	w0, #1100
	bl	_msleep
LBB0_5:
	mov	x0, x19
	bl	_mutex_unlock
LBB0_6:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%d"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_TT3650_CMD_CI_RESET,4,2        ; @TT3650_CMD_CI_RESET
	.comm	_TT3650_CMD_CI_SET_VIDEO_PORT,4,2 ; @TT3650_CMD_CI_SET_VIDEO_PORT
	.no_dead_strip	_tt3650_ci_slot_reset
.subsections_via_symbols
