	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ciintf_slot_reset
_ciintf_slot_reset:                     ## @ciintf_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testl	%esi, %esi
	je	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_5
LBB0_2:
	movq	(%rdi), %r15
	movq	(%r15), %r14
	cmpq	$0, 16(%r15)
	je	LBB0_4
## %bb.3:
	movq	_SAA7146_GPIO_IRQHI@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_saa7146_setgpio
LBB0_4:
	movq	_SLOTSTATUS_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r15)
	movq	_DEBICICTL@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	_DEBIADDR_CICONTROL@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	movl	$0, (%rsp)
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	movl	$1, %ecx
	xorl	%r8d, %r8d
	movl	$1, %r9d
	callq	_ttpci_budget_debiwrite
	movl	$1, %edi
	callq	_msleep
	movl	(%r12), %esi
	movl	(%r13), %edx
	movq	_CICONTROL_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movl	$0, (%rsp)
	movq	%r15, %rdi
	movl	$1, %ecx
	movl	$1, %r9d
	callq	_ttpci_budget_debiwrite
	movq	_SAA7146_GPIO_OUTHI@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_saa7146_setgpio
	movq	_BUDGET_VIDEO_PORTB@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_ttpci_budget_set_video_port
LBB0_5:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SAA7146_GPIO_IRQHI,4,2         ## @SAA7146_GPIO_IRQHI
	.comm	_SLOTSTATUS_RESET,4,2           ## @SLOTSTATUS_RESET
	.comm	_DEBICICTL,4,2                  ## @DEBICICTL
	.comm	_DEBIADDR_CICONTROL,4,2         ## @DEBIADDR_CICONTROL
	.comm	_CICONTROL_RESET,4,2            ## @CICONTROL_RESET
	.comm	_SAA7146_GPIO_OUTHI,4,2         ## @SAA7146_GPIO_OUTHI
	.comm	_BUDGET_VIDEO_PORTB,4,2         ## @BUDGET_VIDEO_PORTB
	.no_dead_strip	_ciintf_slot_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ciintf_slot_reset
_ciintf_slot_reset:                     ; @ciintf_slot_reset
	.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
	cbz	w1, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_5
LBB0_2:
	ldr	x20, [x0]
	ldr	x19, [x20]
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_4
; %bb.3:
Lloh3:
	adrp	x8, _SAA7146_GPIO_IRQHI@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SAA7146_GPIO_IRQHI@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #0
	bl	_saa7146_setgpio
LBB0_4:
Lloh6:
	adrp	x8, _SLOTSTATUS_RESET@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SLOTSTATUS_RESET@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [x20, #8]
Lloh9:
	adrp	x21, _DEBICICTL@GOTPAGE
Lloh10:
	ldr	x21, [x21, _DEBICICTL@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh11:
	adrp	x22, _DEBIADDR_CICONTROL@GOTPAGE
Lloh12:
	ldr	x22, [x22, _DEBIADDR_CICONTROL@GOTPAGEOFF]
	ldr	w2, [x22]
	mov	x0, x20
	mov	w3, #1
	mov	w4, #0
	mov	w5, #1
	mov	w6, #0
	bl	_ttpci_budget_debiwrite
	mov	w0, #1
	bl	_msleep
	ldr	w1, [x21]
	ldr	w2, [x22]
Lloh13:
	adrp	x8, _CICONTROL_RESET@GOTPAGE
Lloh14:
	ldr	x8, [x8, _CICONTROL_RESET@GOTPAGEOFF]
Lloh15:
	ldr	w4, [x8]
	mov	x0, x20
	mov	w3, #1
	mov	w5, #1
	mov	w6, #0
	bl	_ttpci_budget_debiwrite
Lloh16:
	adrp	x8, _SAA7146_GPIO_OUTHI@GOTPAGE
Lloh17:
	ldr	x8, [x8, _SAA7146_GPIO_OUTHI@GOTPAGEOFF]
Lloh18:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #1
	bl	_saa7146_setgpio
Lloh19:
	adrp	x8, _BUDGET_VIDEO_PORTB@GOTPAGE
Lloh20:
	ldr	x8, [x8, _BUDGET_VIDEO_PORTB@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ttpci_budget_set_video_port
	mov	w0, #0
LBB0_5:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SAA7146_GPIO_IRQHI,4,2         ; @SAA7146_GPIO_IRQHI
	.comm	_SLOTSTATUS_RESET,4,2           ; @SLOTSTATUS_RESET
	.comm	_DEBICICTL,4,2                  ; @DEBICICTL
	.comm	_DEBIADDR_CICONTROL,4,2         ; @DEBIADDR_CICONTROL
	.comm	_CICONTROL_RESET,4,2            ; @CICONTROL_RESET
	.comm	_SAA7146_GPIO_OUTHI,4,2         ; @SAA7146_GPIO_OUTHI
	.comm	_BUDGET_VIDEO_PORTB,4,2         ; @BUDGET_VIDEO_PORTB
	.no_dead_strip	_ciintf_slot_reset
.subsections_via_symbols
