	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ilclient_wait_for_command_complete_dual ## -- Begin function ilclient_wait_for_command_complete_dual
	.p2align	4, 0x90
_ilclient_wait_for_command_complete_dual: ## @ilclient_wait_for_command_complete_dual
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	leal	-128(%rbx), %eax
	movl	$-1, %r15d
	cmpl	$2, %eax
	ja	LBB0_29
## %bb.1:
	movl	%edx, %r13d
	movq	%rdi, %r12
	movq	_ILCLIENT_EVENT_ERROR@GOTPCREL(%rip), %rsi
	cltq
	leaq	l_switch.table.ilclient_wait_for_command_complete_dual(%rip), %rdx
	movq	(%rdx,%rax,8), %rax
	movl	(%rax), %r15d
	orl	(%rsi), %r15d
	testq	%rcx, %rcx
	je	LBB0_3
## %bb.2:
	movq	%r12, (%rcx)
LBB0_3:
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	leaq	24(%r12), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	leaq	8(%r12), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_25:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	16(%r12), %rdi
	callq	_ilclient_unlock_events
	movq	_VCOS_OR_CONSUME@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_VCOS_SUSPEND@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r15d, %esi
	leaq	-44(%rbp), %r8
	callq	_vcos_event_flags_get
LBB0_4:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_6 Depth 2
                                        ##     Child Loop BB0_22 Depth 2
	movq	16(%r12), %rdi
	callq	_ilclient_lock_events
	movq	24(%r12), %rsi
	testq	%rsi, %rsi
	je	LBB0_19
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	_OMX_EventCmdComplete@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_OMX_EventError@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%edx, %edx
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_6 Depth=2
	movq	16(%r14), %rsi
	movq	%r14, %rdx
	testq	%rsi, %rsi
	je	LBB0_19
LBB0_6:                                 ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%rsi, %r14
	movl	(%rsi), %esi
	cmpl	%ecx, %esi
	jne	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=2
	cmpl	%ebx, 4(%r14)
	jne	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=2
	cmpl	%r13d, 8(%r14)
	je	LBB0_9
LBB0_10:                                ##   in Loop: Header=BB0_6 Depth=2
	cmpl	%eax, %esi
	jne	LBB0_18
## %bb.11:                              ##   in Loop: Header=BB0_6 Depth=2
	cmpl	$1, 8(%r14)
	jne	LBB0_18
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_19:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	testq	%r14, %r14
	je	LBB0_25
## %bb.20:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	24(%r14), %rax
	testq	%rax, %rax
	je	LBB0_25
## %bb.21:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	_OMX_EventError@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	jmp	LBB0_22
	.p2align	4, 0x90
LBB0_24:                                ##   in Loop: Header=BB0_22 Depth=2
	movq	16(%rax), %rax
	testq	%rax, %rax
	je	LBB0_25
LBB0_22:                                ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpl	%ecx, (%rax)
	jne	LBB0_24
## %bb.23:                              ##   in Loop: Header=BB0_22 Depth=2
	cmpl	$1, 8(%rax)
	jne	LBB0_24
## %bb.26:
	movq	16(%r12), %rdi
	movl	$-2, %r15d
	jmp	LBB0_27
LBB0_12:
	movl	%eax, %edi
	jmp	LBB0_13
LBB0_9:
	movl	%ecx, %edi
LBB0_13:
	leaq	16(%rdx), %rbx
	testq	%rdx, %rdx
	cmoveq	-72(%rbp), %rbx                 ## 8-byte Folded Reload
	xorl	%r15d, %r15d
	movq	16(%r14), %rdx
	movq	%rdx, (%rbx)
	cmpl	%ecx, %esi
	je	LBB0_15
## %bb.14:
	movslq	4(%r14), %rcx
	movq	_OMX_ErrorSameState@GOTPCREL(%rip), %rdx
	xorl	%r15d, %r15d
	cmpq	%rcx, (%rdx)
	setne	%r15b
	negl	%r15d
LBB0_15:
	cmpl	%eax, %edi
	jne	LBB0_17
## %bb.16:
	movq	_ILCLIENT_EVENT_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_VCOS_OR_CONSUME@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-44(%rbp), %r8
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	xorl	%ecx, %ecx
	callq	_vcos_event_flags_get
LBB0_17:
	movq	16(%r12), %rdi
	movq	(%rdi), %rax
	movq	%rax, 16(%r14)
	movq	%r14, (%rdi)
	movl	$-1, (%r14)
	movq	-64(%rbp), %r14                 ## 8-byte Reload
LBB0_27:
	callq	_ilclient_unlock_events
	testq	%r14, %r14
	je	LBB0_29
## %bb.28:
	movq	$0, (%r14)
LBB0_29:
	movl	%r15d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ILCLIENT_EVENT_ERROR,4,2       ## @ILCLIENT_EVENT_ERROR
	.comm	_ILCLIENT_STATE_CHANGED,4,2     ## @ILCLIENT_STATE_CHANGED
	.comm	_ILCLIENT_PORT_DISABLED,4,2     ## @ILCLIENT_PORT_DISABLED
	.comm	_ILCLIENT_PORT_ENABLED,4,2      ## @ILCLIENT_PORT_ENABLED
	.comm	_OMX_EventCmdComplete,4,2       ## @OMX_EventCmdComplete
	.comm	_OMX_EventError,4,2             ## @OMX_EventError
	.comm	_OMX_ErrorSameState,8,3         ## @OMX_ErrorSameState
	.comm	_VCOS_OR_CONSUME,4,2            ## @VCOS_OR_CONSUME
	.comm	_VCOS_SUSPEND,4,2               ## @VCOS_SUSPEND
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.ilclient_wait_for_command_complete_dual
l_switch.table.ilclient_wait_for_command_complete_dual:
	.quad	_ILCLIENT_STATE_CHANGED
	.quad	_ILCLIENT_PORT_ENABLED
	.quad	_ILCLIENT_PORT_DISABLED

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ilclient_wait_for_command_complete_dual ; -- Begin function ilclient_wait_for_command_complete_dual
	.p2align	2
_ilclient_wait_for_command_complete_dual: ; @ilclient_wait_for_command_complete_dual
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	w8, w1, #128
	cmp	w8, #2
	b.hi	LBB0_20
; %bb.1:
	mov	x19, x3
	mov	x22, x2
	mov	x23, x1
	mov	x20, x0
Lloh0:
	adrp	x9, _ILCLIENT_EVENT_ERROR@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ILCLIENT_EVENT_ERROR@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
Lloh3:
	adrp	x10, l_switch.table.ilclient_wait_for_command_complete_dual@PAGE
Lloh4:
	add	x10, x10, l_switch.table.ilclient_wait_for_command_complete_dual@PAGEOFF
	ldr	x8, [x10, w8, sxtw #3]
	ldr	w8, [x8]
	orr	w24, w8, w9
	cbz	x3, LBB0_3
; %bb.2:
	str	x20, [x19]
LBB0_3:
	add	x27, x20, #24
	add	x21, x20, #8
Lloh5:
	adrp	x25, _OMX_EventError@GOTPAGE
Lloh6:
	ldr	x25, [x25, _OMX_EventError@GOTPAGEOFF]
Lloh7:
	adrp	x26, _OMX_EventCmdComplete@GOTPAGE
Lloh8:
	ldr	x26, [x26, _OMX_EventCmdComplete@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x0, [x20, #16]
	bl	_ilclient_unlock_events
Lloh9:
	adrp	x8, _VCOS_OR_CONSUME@GOTPAGE
Lloh10:
	ldr	x8, [x8, _VCOS_OR_CONSUME@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
Lloh12:
	adrp	x8, _VCOS_SUSPEND@GOTPAGE
Lloh13:
	ldr	x8, [x8, _VCOS_SUSPEND@GOTPAGEOFF]
Lloh14:
	ldr	w3, [x8]
	add	x4, sp, #12
	mov	x0, x21
	mov	x1, x24
	bl	_vcos_event_flags_get
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
                                        ;     Child Loop BB0_17 Depth 2
	ldr	x0, [x20, #16]
	bl	_ilclient_lock_events
	ldr	x11, [x20, #24]
	cbz	x11, LBB0_13
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x10, #0
	ldr	w9, [x26]
	ldr	w8, [x25]
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=2
	ldr	x11, [x28, #16]
	mov	x10, x28
	cbz	x11, LBB0_13
LBB0_8:                                 ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x28, x11
	ldr	w11, [x11]
	cmp	w11, w9
	b.ne	LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=2
	ldr	w12, [x28, #4]
	cmp	w12, w23
	b.ne	LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=2
	ldr	w12, [x28, #8]
	cmp	w12, w22
	b.eq	LBB0_22
LBB0_11:                                ;   in Loop: Header=BB0_8 Depth=2
	cmp	w11, w8
	b.ne	LBB0_7
; %bb.12:                               ;   in Loop: Header=BB0_8 Depth=2
	ldr	w12, [x28, #8]
	cmp	w12, #1
	b.ne	LBB0_7
	b	LBB0_21
LBB0_13:                                ;   in Loop: Header=BB0_5 Depth=1
	cbz	x19, LBB0_4
; %bb.14:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_4
; %bb.15:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	w9, [x25]
	b	LBB0_17
LBB0_16:                                ;   in Loop: Header=BB0_17 Depth=2
	ldr	x8, [x8, #16]
	cbz	x8, LBB0_4
LBB0_17:                                ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w10, [x8]
	cmp	w10, w9
	b.ne	LBB0_16
; %bb.18:                               ;   in Loop: Header=BB0_17 Depth=2
	ldr	w10, [x8, #8]
	cmp	w10, #1
	b.ne	LBB0_16
; %bb.19:
	ldr	x0, [x20, #16]
	mov	w22, #-2
	bl	_ilclient_unlock_events
	cbnz	x19, LBB0_28
	b	LBB0_29
LBB0_20:
	mov	w22, #-1
	b	LBB0_29
LBB0_21:
	mov	x12, x8
	b	LBB0_23
LBB0_22:
	mov	x12, x9
LBB0_23:
	ldr	x13, [x28, #16]
	add	x14, x10, #16
	cmp	x10, #0
	csel	x10, x27, x14, eq
	str	x13, [x10]
	cmp	w11, w9
	b.ne	LBB0_25
; %bb.24:
	mov	w22, #0
	cmp	w12, w8
	b.eq	LBB0_26
	b	LBB0_27
LBB0_25:
	ldrsw	x9, [x28, #4]
Lloh15:
	adrp	x10, _OMX_ErrorSameState@GOTPAGE
Lloh16:
	ldr	x10, [x10, _OMX_ErrorSameState@GOTPAGEOFF]
Lloh17:
	ldr	x10, [x10]
	cmp	x10, x9
	csetm	w22, ne
	cmp	w12, w8
	b.ne	LBB0_27
LBB0_26:
Lloh18:
	adrp	x8, _ILCLIENT_EVENT_ERROR@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ILCLIENT_EVENT_ERROR@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
Lloh21:
	adrp	x8, _VCOS_OR_CONSUME@GOTPAGE
Lloh22:
	ldr	x8, [x8, _VCOS_OR_CONSUME@GOTPAGEOFF]
Lloh23:
	ldr	w2, [x8]
	add	x4, sp, #12
	mov	x0, x21
	mov	w3, #0
	bl	_vcos_event_flags_get
LBB0_27:
	ldr	x0, [x20, #16]
	ldr	x8, [x0]
	str	x8, [x28, #16]
	str	x28, [x0]
	mov	w8, #-1
	str	w8, [x28]
	bl	_ilclient_unlock_events
	cbz	x19, LBB0_29
LBB0_28:
	str	xzr, [x19]
LBB0_29:
	mov	x0, x22
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_ILCLIENT_EVENT_ERROR,4,2       ; @ILCLIENT_EVENT_ERROR
	.comm	_ILCLIENT_STATE_CHANGED,4,2     ; @ILCLIENT_STATE_CHANGED
	.comm	_ILCLIENT_PORT_DISABLED,4,2     ; @ILCLIENT_PORT_DISABLED
	.comm	_ILCLIENT_PORT_ENABLED,4,2      ; @ILCLIENT_PORT_ENABLED
	.comm	_OMX_EventCmdComplete,4,2       ; @OMX_EventCmdComplete
	.comm	_OMX_EventError,4,2             ; @OMX_EventError
	.comm	_OMX_ErrorSameState,8,3         ; @OMX_ErrorSameState
	.comm	_VCOS_OR_CONSUME,4,2            ; @VCOS_OR_CONSUME
	.comm	_VCOS_SUSPEND,4,2               ; @VCOS_SUSPEND
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.ilclient_wait_for_command_complete_dual
l_switch.table.ilclient_wait_for_command_complete_dual:
	.quad	_ILCLIENT_STATE_CHANGED
	.quad	_ILCLIENT_PORT_ENABLED
	.quad	_ILCLIENT_PORT_DISABLED

.subsections_via_symbols
