	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xcbgrab_read_packet
_xcbgrab_read_packet:                   ## @xcbgrab_read_packet
	.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
	movq	%rdi, %r13
	movq	(%rdi), %r14
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	callq	_wait_frame
	cmpq	$0, 24(%r14)
	jne	LBB0_3
## %bb.1:
	cmpq	$0, (%r14)
	je	LBB0_2
LBB0_3:
	movl	32(%r14), %edi
	movq	40(%r14), %rax
	movl	(%rax), %esi
	callq	_xcb_query_pointer
	movl	%eax, %ebx
	movl	32(%r14), %edi
	movq	40(%r14), %rax
	movl	(%rax), %esi
	callq	_xcb_get_geometry
	movl	%eax, %r12d
	movl	32(%r14), %edi
	movl	%ebx, %esi
	xorl	%edx, %edx
	callq	_xcb_query_pointer_reply
	movq	%rax, %r15
	movl	32(%r14), %edi
	movl	%r12d, %esi
	xorl	%edx, %edx
	callq	_xcb_get_geometry_reply
	movq	%rax, %r12
	cmpq	$0, 24(%r14)
	je	LBB0_6
## %bb.4:
	cmpq	$0, (%r15)
	je	LBB0_6
## %bb.5:
	movq	%r13, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	callq	_xcbgrab_reposition
LBB0_6:
	cmpq	$0, 16(%r14)
	je	LBB0_8
LBB0_7:
	movq	%r13, %rdi
	callq	_xcbgrab_update_region
LBB0_8:
	xorl	%ebx, %ebx
	cmpq	$0, 8(%r14)
	jne	LBB0_10
## %bb.9:
	movq	%r13, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_xcbgrab_frame
	movl	%eax, %ebx
LBB0_10:
	movq	%r15, %rdi
	callq	_free
	movq	%r12, %rdi
	callq	_free
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	xorl	%r12d, %r12d
	xorl	%r15d, %r15d
	cmpq	$0, 16(%r14)
	jne	LBB0_7
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_xcbgrab_read_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xcbgrab_read_packet
_xcbgrab_read_packet:                   ; @xcbgrab_read_packet
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x1
	mov	x20, x0
	ldr	x23, [x0]
	bl	_wait_frame
	ldr	x8, [x23, #24]
	cbnz	x8, LBB0_2
; %bb.1:
	ldr	x8, [x23]
	cbz	x8, LBB0_11
LBB0_2:
	ldr	w0, [x23, #32]
	ldr	x8, [x23, #40]
	ldr	w1, [x8]
	bl	_xcb_query_pointer
	mov	x21, x0
	ldr	w0, [x23, #32]
	ldr	x8, [x23, #40]
	ldr	w1, [x8]
	bl	_xcb_get_geometry
	mov	x22, x0
	ldr	w0, [x23, #32]
	mov	x1, x21
	mov	x2, #0
	bl	_xcb_query_pointer_reply
	mov	x21, x0
	ldr	w0, [x23, #32]
	mov	x1, x22
	mov	x2, #0
	bl	_xcb_get_geometry_reply
	mov	x22, x0
	ldr	x8, [x23, #24]
	cbz	x8, LBB0_5
; %bb.3:
	ldr	x8, [x21]
	cbz	x8, LBB0_5
; %bb.4:
	mov	x0, x20
	mov	x1, x21
	mov	x2, x22
	bl	_xcbgrab_reposition
LBB0_5:
	ldr	x8, [x23, #16]
	cbz	x8, LBB0_7
LBB0_6:
	mov	x0, x20
	bl	_xcbgrab_update_region
LBB0_7:
	ldr	x8, [x23, #8]
	cbz	x8, LBB0_9
; %bb.8:
	mov	w19, #0
	b	LBB0_10
LBB0_9:
	mov	x0, x20
	mov	x1, x19
	bl	_xcbgrab_frame
	mov	x19, x0
LBB0_10:
	mov	x0, x21
	bl	_free
	mov	x0, x22
	bl	_free
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_11:
	mov	x22, #0
	mov	x21, #0
	ldr	x8, [x23, #16]
	cbnz	x8, LBB0_6
	b	LBB0_7
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_xcbgrab_read_packet
.subsections_via_symbols
