	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ilclient_setup_tunnel          ## -- Begin function ilclient_setup_tunnel
	.p2align	4, 0x90
_ilclient_setup_tunnel:                 ## @ilclient_setup_tunnel
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movl	%esi, %r14d
	movq	%rdi, %r12
	movq	(%rdi), %rax
	movq	(%rax), %rdi
	leaq	-64(%rbp), %rsi
	callq	_OMX_GetState
	movq	_OMX_ErrorNone@GOTPCREL(%rip), %r13
	xorl	%edi, %edi
	cmpq	(%r13), %rax
	sete	%dil
	callq	_vc_assert
	movq	-64(%rbp), %rax
	movq	_OMX_StateLoaded@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.1:
	movq	(%r12), %rdi
	movq	_OMX_StateIdle@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ilclient_change_component_state
	testq	%rax, %rax
	js	LBB0_2
LBB0_3:
	testl	%r15d, %r15d
	je	LBB0_6
## %bb.4:
	movq	(%r12), %rdi
	movq	_OMX_EventPortSettingsChanged@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	20(%r12), %edx
	movq	_ILCLIENT_PARAMETER_CHANGED@GOTPCREL(%rip), %rax
	movq	_ILCLIENT_EVENT_ERROR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	orl	(%rax), %ebx
	xorl	%ecx, %ecx
	movl	$-1, %r8d
	movl	$1, %r9d
	pushq	%r15
	pushq	%rbx
	callq	_ilclient_wait_for_event
	addq	$16, %rsp
	testq	%rax, %rax
	js	LBB0_5
LBB0_6:
	movq	%r12, %rdi
	callq	_ilclient_disable_tunnel
	movl	$16, -56(%rbp)
	movq	_OMX_VERSION@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)
	movl	20(%r12), %eax
	movl	%eax, -48(%rbp)
	movq	(%r12), %rax
	movq	(%rax), %rdi
	movq	_OMX_IndexParamNumAvailableStreams@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-56(%rbp), %rdx
	callq	_OMX_GetParameter
	cmpq	(%r13), %rax
	jne	LBB0_11
## %bb.7:
	movl	-52(%rbp), %eax
	testl	%eax, %eax
	je	LBB0_8
## %bb.9:
	movl	$-4, %ebx
	cmpl	%r14d, %eax
	jbe	LBB0_17
## %bb.10:
	movl	%r14d, -52(%rbp)
	movq	(%r12), %rax
	movq	(%rax), %rdi
	movq	_OMX_IndexParamActiveStream@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-56(%rbp), %rdx
	callq	_OMX_SetParameter
	xorl	%edi, %edi
	cmpq	(%r13), %rax
	sete	%dil
	callq	_vc_assert
LBB0_11:
	movq	(%r12), %rax
	movq	8(%r12), %rcx
	movq	(%rax), %rdi
	movl	20(%r12), %esi
	movq	(%rcx), %rdx
	movl	16(%r12), %ecx
	callq	_OMX_SetupTunnel
	xorl	%r14d, %r14d
	cmpq	(%r13), %rax
	jne	LBB0_14
## %bb.12:
	movq	%r12, %rdi
	callq	_ilclient_enable_tunnel
	xorl	%ebx, %ebx
	testl	%eax, %eax
	jns	LBB0_17
## %bb.13:
	movl	%eax, %r14d
LBB0_14:
	movq	(%r12), %rax
	movq	(%rax), %rdi
	movl	20(%r12), %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_OMX_SetupTunnel
	xorl	%edi, %edi
	cmpq	(%r13), %rax
	sete	%dil
	callq	_vc_assert
	movq	8(%r12), %rax
	movq	(%rax), %rdi
	movl	16(%r12), %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_OMX_SetupTunnel
	movq	%rax, %r15
	xorl	%edi, %edi
	cmpq	(%r13), %rax
	sete	%dil
	callq	_vc_assert
	testl	%r14d, %r14d
	je	LBB0_16
## %bb.15:
	movq	8(%r12), %rdi
	movq	_OMX_EventError@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	xorl	%edx, %edx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	movl	$1, %r9d
	callq	_ilclient_remove_event
	movq	(%r12), %rdi
	movl	(%rbx), %esi
	xorl	%edx, %edx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	movl	$1, %r9d
	callq	_ilclient_remove_event
LBB0_16:
	leaq	L_.str.1(%rip), %rdi
	movq	%r15, %rsi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_ilclient_debug_output
	movl	$-5, %ebx
	jmp	LBB0_17
LBB0_2:
	movl	$-2, %ebx
	jmp	LBB0_17
LBB0_5:
	movq	%rax, %rbx
	movslq	20(%r12), %rsi
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_ilclient_debug_output
	jmp	LBB0_17
LBB0_8:
	movl	$-3, %ebx
LBB0_17:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_OMX_ErrorNone,8,3              ## @OMX_ErrorNone
	.comm	_OMX_StateLoaded,8,3            ## @OMX_StateLoaded
	.comm	_OMX_StateIdle,4,2              ## @OMX_StateIdle
	.comm	_OMX_EventPortSettingsChanged,4,2 ## @OMX_EventPortSettingsChanged
	.comm	_ILCLIENT_PARAMETER_CHANGED,4,2 ## @ILCLIENT_PARAMETER_CHANGED
	.comm	_ILCLIENT_EVENT_ERROR,4,2       ## @ILCLIENT_EVENT_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ilclient: timed out waiting for port settings changed on port %d"

	.comm	_OMX_VERSION,4,2                ## @OMX_VERSION
	.comm	_OMX_IndexParamNumAvailableStreams,4,2 ## @OMX_IndexParamNumAvailableStreams
	.comm	_OMX_IndexParamActiveStream,4,2 ## @OMX_IndexParamActiveStream
	.comm	_OMX_EventError,4,2             ## @OMX_EventError
L_.str.1:                               ## @.str.1
	.asciz	"ilclient: could not setup/enable tunnel (setup=0x%x,enable=%d)"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ilclient_setup_tunnel          ; -- Begin function ilclient_setup_tunnel
	.p2align	2
_ilclient_setup_tunnel:                 ; @ilclient_setup_tunnel
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x0]
	ldr	x0, [x8]
	add	x1, sp, #8
	bl	_OMX_GetState
Lloh0:
	adrp	x22, _OMX_ErrorNone@GOTPAGE
Lloh1:
	ldr	x22, [x22, _OMX_ErrorNone@GOTPAGEOFF]
	ldr	x8, [x22]
	cmp	x0, x8
	cset	w0, eq
	bl	_vc_assert
	ldr	x8, [sp, #8]
Lloh2:
	adrp	x9, _OMX_StateLoaded@GOTPAGE
Lloh3:
	ldr	x9, [x9, _OMX_StateLoaded@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	ldr	x0, [x19]
Lloh5:
	adrp	x8, _OMX_StateIdle@GOTPAGE
Lloh6:
	ldr	x8, [x8, _OMX_StateIdle@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	bl	_ilclient_change_component_state
	tbnz	x0, #63, LBB0_12
LBB0_2:
	cbz	w21, LBB0_4
; %bb.3:
	ldr	x0, [x19]
Lloh8:
	adrp	x8, _OMX_EventPortSettingsChanged@GOTPAGE
Lloh9:
	ldr	x8, [x8, _OMX_EventPortSettingsChanged@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x8, _ILCLIENT_PARAMETER_CHANGED@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ILCLIENT_PARAMETER_CHANGED@GOTPAGEOFF]
	ldr	w2, [x19, #20]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _ILCLIENT_EVENT_ERROR@GOTPAGE
Lloh15:
	ldr	x9, [x9, _ILCLIENT_EVENT_ERROR@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	orr	w6, w9, w8
	mov	w3, #0
	mov	w4, #-1
	mov	w5, #1
	mov	x7, x21
	bl	_ilclient_wait_for_event
	tbnz	x0, #63, LBB0_13
LBB0_4:
	mov	x0, x19
	bl	_ilclient_disable_tunnel
	mov	w8, #16
Lloh17:
	adrp	x9, _OMX_VERSION@GOTPAGE
Lloh18:
	ldr	x9, [x9, _OMX_VERSION@GOTPAGEOFF]
Lloh19:
	ldr	w10, [x9]
	ldr	w9, [x19, #20]
	str	w8, [sp, #16]
	stp	w9, w10, [sp, #24]
	ldr	x8, [x19]
	ldr	x0, [x8]
Lloh20:
	adrp	x8, _OMX_IndexParamNumAvailableStreams@GOTPAGE
Lloh21:
	ldr	x8, [x8, _OMX_IndexParamNumAvailableStreams@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	add	x2, sp, #16
	bl	_OMX_GetParameter
	ldr	x8, [x22]
	cmp	x0, x8
	b.ne	LBB0_8
; %bb.5:
	ldr	w8, [sp, #20]
	cbz	w8, LBB0_14
; %bb.6:
	cmp	w8, w20
	b.ls	LBB0_15
; %bb.7:
	str	w20, [sp, #20]
	ldr	x8, [x19]
	ldr	x0, [x8]
Lloh23:
	adrp	x8, _OMX_IndexParamActiveStream@GOTPAGE
Lloh24:
	ldr	x8, [x8, _OMX_IndexParamActiveStream@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	add	x2, sp, #16
	bl	_OMX_SetParameter
	ldr	x8, [x22]
	cmp	x0, x8
	cset	w0, eq
	bl	_vc_assert
LBB0_8:
	ldp	x8, x9, [x19]
	ldr	x0, [x8]
	ldr	x2, [x9]
	ldp	w3, w1, [x19, #16]
	bl	_OMX_SetupTunnel
	ldr	x8, [x22]
	cmp	x0, x8
	b.ne	LBB0_11
; %bb.9:
	mov	x0, x19
	bl	_ilclient_enable_tunnel
	tbnz	w0, #31, LBB0_16
; %bb.10:
	mov	w21, #0
	b	LBB0_20
LBB0_11:
	mov	w20, #0
	b	LBB0_17
LBB0_12:
	mov	w21, #-2
	b	LBB0_20
LBB0_13:
	mov	x21, x0
	ldrsw	x1, [x19, #20]
Lloh26:
	adrp	x0, l_.str@PAGE
Lloh27:
	add	x0, x0, l_.str@PAGEOFF
	bl	_ilclient_debug_output
	b	LBB0_20
LBB0_14:
	mov	w21, #-3
	b	LBB0_20
LBB0_15:
	mov	w21, #-4
	b	LBB0_20
LBB0_16:
	mov	x20, x0
LBB0_17:
	ldr	x8, [x19]
	ldr	x0, [x8]
	ldr	w1, [x19, #20]
	mov	x2, #0
	mov	w3, #0
	bl	_OMX_SetupTunnel
	ldr	x8, [x22]
	cmp	x0, x8
	cset	w0, eq
	bl	_vc_assert
	ldr	x8, [x19, #8]
	ldr	x0, [x8]
	ldr	w1, [x19, #16]
	mov	x2, #0
	mov	w3, #0
	bl	_OMX_SetupTunnel
	mov	x21, x0
	ldr	x8, [x22]
	cmp	x0, x8
	cset	w0, eq
	bl	_vc_assert
	cbz	w20, LBB0_19
; %bb.18:
	ldr	x0, [x19, #8]
Lloh28:
	adrp	x22, _OMX_EventError@GOTPAGE
Lloh29:
	ldr	x22, [x22, _OMX_EventError@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	w2, #0
	mov	w3, #1
	mov	w4, #0
	mov	w5, #1
	bl	_ilclient_remove_event
	ldr	x0, [x19]
	ldr	w1, [x22]
	mov	w2, #0
	mov	w3, #1
	mov	w4, #0
	mov	w5, #1
	bl	_ilclient_remove_event
LBB0_19:
	str	x20, [sp]
Lloh30:
	adrp	x0, l_.str.1@PAGE
Lloh31:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x21
	bl	_ilclient_debug_output
	mov	w21, #-5
LBB0_20:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_OMX_ErrorNone,8,3              ; @OMX_ErrorNone
	.comm	_OMX_StateLoaded,8,3            ; @OMX_StateLoaded
	.comm	_OMX_StateIdle,4,2              ; @OMX_StateIdle
	.comm	_OMX_EventPortSettingsChanged,4,2 ; @OMX_EventPortSettingsChanged
	.comm	_ILCLIENT_PARAMETER_CHANGED,4,2 ; @ILCLIENT_PARAMETER_CHANGED
	.comm	_ILCLIENT_EVENT_ERROR,4,2       ; @ILCLIENT_EVENT_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ilclient: timed out waiting for port settings changed on port %d"

	.comm	_OMX_VERSION,4,2                ; @OMX_VERSION
	.comm	_OMX_IndexParamNumAvailableStreams,4,2 ; @OMX_IndexParamNumAvailableStreams
	.comm	_OMX_IndexParamActiveStream,4,2 ; @OMX_IndexParamActiveStream
	.comm	_OMX_EventError,4,2             ; @OMX_EventError
l_.str.1:                               ; @.str.1
	.asciz	"ilclient: could not setup/enable tunnel (setup=0x%x,enable=%d)"

.subsections_via_symbols
