	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ilclient_get_input_buffer      ## -- Begin function ilclient_get_input_buffer
	.p2align	4, 0x90
_ilclient_get_input_buffer:             ## @ilclient_get_input_buffer
	.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
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movl	%esi, %ebx
	movq	%rdi, %r12
	leaq	4(%rdi), %r15
	leaq	8(%rdi), %r13
	xorl	%r14d, %r14d
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_3 Depth 2
	movq	%r15, %rdi
	callq	_vcos_semaphore_wait
	movq	%r13, %rdx
	movq	(%r13), %r13
	testq	%r13, %r13
	je	LBB0_5
	.p2align	4, 0x90
LBB0_3:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpl	%ebx, (%r13)
	je	LBB0_9
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=2
	movq	%r13, %r14
	movq	8(%r13), %r13
	testq	%r13, %r13
	jne	LBB0_3
LBB0_5:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	%rdx, %r13
	movq	%r15, %rdi
	callq	_vcos_semaphore_post
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_ILCLIENT_EMPTY_BUFFER_DONE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_VCOS_OR_CONSUME@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movl	$-1, %ecx
	leaq	-48(%rbp), %r8
	callq	_vcos_event_flags_get
	jmp	LBB0_1
LBB0_9:
	leaq	8(%r14), %rax
	testq	%r14, %r14
	movq	8(%r13), %rcx
	cmoveq	%rdx, %rax
	movq	%rcx, (%rax)
	movq	$0, 8(%r13)
	movq	%r15, %rdi
	callq	_vcos_semaphore_post
LBB0_8:
	movq	%r13, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	xorl	%r13d, %r13d
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_ILCLIENT_EMPTY_BUFFER_DONE,4,2 ## @ILCLIENT_EMPTY_BUFFER_DONE
	.comm	_VCOS_OR_CONSUME,4,2            ## @VCOS_OR_CONSUME
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ilclient_get_input_buffer      ; -- Begin function ilclient_get_input_buffer
	.p2align	2
_ilclient_get_input_buffer:             ; @ilclient_get_input_buffer
	.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
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	mov	x24, #0
	add	x19, x0, #4
	add	x25, x0, #8
Lloh0:
	adrp	x26, _ILCLIENT_EMPTY_BUFFER_DONE@GOTPAGE
Lloh1:
	ldr	x26, [x26, _ILCLIENT_EMPTY_BUFFER_DONE@GOTPAGEOFF]
Lloh2:
	adrp	x27, _VCOS_OR_CONSUME@GOTPAGE
Lloh3:
	ldr	x27, [x27, _VCOS_OR_CONSUME@GOTPAGEOFF]
LBB0_1:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_2 Depth 2
	mov	x0, x19
	bl	_vcos_semaphore_wait
	ldr	x23, [x25]
	cbz	x23, LBB0_4
LBB0_2:                                 ;   Parent Loop BB0_1 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w8, [x23]
	cmp	w8, w21
	b.eq	LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=2
	mov	x24, x23
	ldr	x23, [x23, #8]
	cbnz	x23, LBB0_2
LBB0_4:                                 ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x19
	bl	_vcos_semaphore_post
	cbz	w20, LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w1, [x26]
	ldr	w2, [x27]
	add	x4, sp, #12
	mov	x0, x22
	mov	w3, #-1
	bl	_vcos_event_flags_get
	b	LBB0_1
LBB0_6:
	ldr	x8, [x23, #8]
	add	x9, x24, #8
	cmp	x24, #0
	csel	x9, x25, x9, eq
	str	x8, [x9]
	str	xzr, [x23, #8]
	mov	x0, x19
	bl	_vcos_semaphore_post
LBB0_7:
	mov	x0, x23
	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
LBB0_8:
	mov	x23, #0
	b	LBB0_7
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_ILCLIENT_EMPTY_BUFFER_DONE,4,2 ; @ILCLIENT_EMPTY_BUFFER_DONE
	.comm	_VCOS_OR_CONSUME,4,2            ; @VCOS_OR_CONSUME
.subsections_via_symbols
