	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vc_gencmd_read_response        ## -- Begin function vc_gencmd_read_response
	.p2align	4, 0x90
_vc_gencmd_read_response:               ## @vc_gencmd_read_response
	.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	%esi, %r15d
	movq	%rdi, %r14
	xorl	%eax, %eax
	callq	_lock_obtain
	movl	$-1, %ebx
	testq	%rax, %rax
	jne	LBB0_12
## %bb.1:
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	callq	_use_gencmd_service
	movl	$-1, %ebx
	movq	_gencmd_client@GOTPCREL(%rip), %r13
	movq	_VCHI_FLAGS_NONE@GOTPCREL(%rip), %r14
	leaq	8(%r13), %r12
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	16(%r13), %rax
	movl	(%rax), %edi
	callq	_VC_VTOH32
	xorl	%ebx, %ebx
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%r13), %rdi
	testq	%rdi, %rdi
	jne	LBB0_10
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	leaq	32(%r13), %rdi
	callq	_vcos_event_wait
	movq	_VCOS_SUCCESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	cmpl	$0, (%r13)
	jle	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	16(%r13), %rsi
	movq	24(%r13), %rax
	movl	(%rax,%r15,4), %edi
	movl	(%r14), %r8d
	movl	$8, %edx
	movq	%r12, %rcx
	callq	_vchi_msg_dequeue
	movq	%rax, %rbx
	testl	%ebx, %ebx
	je	LBB0_5
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=2
	movq	$0, 8(%r13)
	incq	%r15
	movslq	(%r13), %rax
	cmpq	%rax, %r15
	jl	LBB0_4
	jmp	LBB0_8
LBB0_9:
	movq	8(%r13), %rdi
	testq	%rdi, %rdi
	je	LBB0_11
LBB0_10:
	addq	$-4, %rdi
	movq	%rdi, 8(%r13)
	movq	16(%r13), %r12
	addq	$4, %r12
                                        ## kill: def $edi killed $edi killed $rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_vcos_min
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	movq	%rax, %rdx
	callq	_memcpy
LBB0_11:
	xorl	%eax, %eax
	callq	_release_gencmd_service
	xorl	%eax, %eax
	callq	_lock_release
LBB0_12:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_gencmd_client,40,3             ## @gencmd_client
	.comm	_VCHI_FLAGS_NONE,4,2            ## @VCHI_FLAGS_NONE
	.comm	_VCOS_SUCCESS,8,3               ## @VCOS_SUCCESS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vc_gencmd_read_response        ; -- Begin function vc_gencmd_read_response
	.p2align	2
_vc_gencmd_read_response:               ; @vc_gencmd_read_response
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x1
	mov	x19, x0
	bl	_lock_obtain
	cbz	x0, LBB0_2
; %bb.1:
	mov	w21, #-1
	b	LBB0_13
LBB0_2:
	bl	_use_gencmd_service
	mov	w21, #-1
Lloh0:
	adrp	x22, _gencmd_client@GOTPAGE
Lloh1:
	ldr	x22, [x22, _gencmd_client@GOTPAGEOFF]
Lloh2:
	adrp	x23, _VCHI_FLAGS_NONE@GOTPAGE
Lloh3:
	ldr	x23, [x23, _VCHI_FLAGS_NONE@GOTPAGEOFF]
Lloh4:
	adrp	x24, _VCOS_SUCCESS@GOTPAGE
Lloh5:
	ldr	x24, [x24, _VCOS_SUCCESS@GOTPAGEOFF]
	b	LBB0_6
LBB0_3:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x22, #16]
	ldr	w0, [x8]
	bl	_VC_VTOH32
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x22, #8]
	cbnz	x8, LBB0_11
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x0, x22, #32
	bl	_vcos_event_wait
	ldr	x8, [x24]
	cmp	x0, x8
	b.ne	LBB0_10
LBB0_6:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x25, #0
LBB0_8:                                 ;   Parent Loop BB0_6 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldp	x1, x8, [x22, #16]
	ldr	w0, [x8, x25, lsl #2]
	ldr	w4, [x23]
	add	x3, x22, #8
	mov	w2, #8
	bl	_vchi_msg_dequeue
	mov	x21, x0
	cbz	w21, LBB0_3
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=2
	str	xzr, [x22, #8]
	add	x25, x25, #1
	ldrsw	x8, [x22]
	cmp	x25, x8
	b.lt	LBB0_8
	b	LBB0_5
LBB0_10:
	ldr	x8, [x22, #8]
	cbz	x8, LBB0_12
LBB0_11:
	sub	x0, x8, #4
	str	x0, [x22, #8]
	ldr	x8, [x22, #16]
	add	x22, x8, #4
                                        ; kill: def $w0 killed $w0 killed $x0
	mov	x1, x20
	bl	_vcos_min
	mov	x2, x0
	mov	x0, x19
	mov	x1, x22
	bl	_memcpy
LBB0_12:
	bl	_release_gencmd_service
	bl	_lock_release
LBB0_13:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_gencmd_client,40,3             ; @gencmd_client
	.comm	_VCHI_FLAGS_NONE,4,2            ; @VCHI_FLAGS_NONE
	.comm	_VCOS_SUCCESS,8,3               ; @VCOS_SUCCESS
.subsections_via_symbols
