	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function write_picture
_write_picture:                         ## @write_picture
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r10
	movq	%rsi, %r11
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	(%rdi), %rbx
	movq	24(%rbx), %r14
	movq	16(%r14), %rax
	movq	24(%r14), %rcx
	movslq	(%rax), %rdx
	leaq	(%rcx,%rdx,4), %rdx
	movq	%rdx, -80(%rbp)
	movslq	4(%rax), %rdx
	leaq	(%rcx,%rdx,4), %rdx
	movq	%rdx, -72(%rbp)
	movslq	8(%rax), %rax
	leaq	(%rcx,%rax,4), %rax
	movq	%rax, -64(%rbp)
	cmpl	$0, 16(%rbx)
	jne	LBB0_7
## %bb.1:
	movq	%r11, -88(%rbp)                 ## 8-byte Spill
	movq	%r10, -96(%rbp)                 ## 8-byte Spill
	movl	12(%rbx), %edi
	callq	_XPending
	testq	%rax, %rax
	je	LBB0_6
## %bb.2:
	leaq	-112(%rbp), %r13
	movq	_ClientMessage@GOTPCREL(%rip), %r15
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	12(%rbx), %edi
	callq	_XPending
	testq	%rax, %rax
	je	LBB0_6
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	12(%rbx), %edi
	movq	%r13, %rsi
	callq	_XNextEvent
	movq	-112(%rbp), %rax
	cmpq	(%r15), %rax
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-104(%rbp), %rax
	movq	(%rax), %rax
	cmpq	(%rbx), %rax
	jne	LBB0_5
## %bb.10:
	movq	_AV_LOG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%rbx, %rdi
	callq	_av_log
	movq	_EPIPE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	jmp	LBB0_8
LBB0_6:
	movq	-96(%rbp), %r10                 ## 8-byte Reload
	movq	-88(%rbp), %r11                 ## 8-byte Reload
LBB0_7:
	movl	8(%r14), %esi
	movl	8(%rbx), %r8d
	movl	(%r14), %eax
	movl	4(%r14), %r9d
	movl	%eax, (%rsp)
	leaq	-80(%rbp), %rdi
	movq	%r11, %rdx
	movq	%r10, %rcx
	callq	_av_image_copy
	movq	%r12, %rdi
	callq	_xv_repaint
LBB0_8:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_11
## %bb.9:
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_ClientMessage,8,3              ## @ClientMessage
	.comm	_AV_LOG_DEBUG,4,2               ## @AV_LOG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Window close event.\n"

	.comm	_EPIPE,4,2                      ## @EPIPE
	.no_dead_strip	_write_picture
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function write_picture
_write_picture:                         ; @write_picture
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
	ldr	x22, [x0]
	ldr	x23, [x22, #24]
	ldp	x9, x8, [x23, #16]
	ldrsw	x10, [x9]
	add	x10, x8, x10, lsl #2
	str	x10, [sp, #16]
	ldrsw	x10, [x9, #4]
	add	x10, x8, x10, lsl #2
	str	x10, [sp, #24]
	ldrsw	x9, [x9, #8]
	add	x8, x8, x9, lsl #2
	str	x8, [sp, #32]
	ldr	w8, [x22, #16]
	cbz	w8, LBB0_4
LBB0_1:
	ldp	w5, w1, [x23, #4]
	ldr	w4, [x22, #8]
	ldr	w6, [x23]
	add	x0, sp, #16
	mov	x2, x21
	mov	x3, x20
	bl	_av_image_copy
	mov	x0, x19
	bl	_xv_repaint
LBB0_2:
	ldr	x8, [sp, #40]
Lloh3:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh4:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_10
; %bb.3:
	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
	add	sp, sp, #112
	ret
LBB0_4:
	ldr	w0, [x22, #12]
	bl	_XPending
	cbz	x0, LBB0_1
; %bb.5:
Lloh6:
	adrp	x24, _ClientMessage@GOTPAGE
Lloh7:
	ldr	x24, [x24, _ClientMessage@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	ldr	w0, [x22, #12]
	bl	_XPending
	cbz	x0, LBB0_1
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x22, #12]
	mov	x1, sp
	bl	_XNextEvent
	ldr	x8, [sp]
	ldr	x9, [x24]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [sp, #8]
	ldr	x8, [x8]
	ldr	x9, [x22]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.9:
Lloh8:
	adrp	x8, _AV_LOG_DEBUG@GOTPAGE
Lloh9:
	ldr	x8, [x8, _AV_LOG_DEBUG@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x2, l_.str@PAGE
Lloh12:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x22
	bl	_av_log
Lloh13:
	adrp	x8, _EPIPE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EPIPE@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	bl	_AVERROR
	b	LBB0_2
LBB0_10:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_ClientMessage,8,3              ; @ClientMessage
	.comm	_AV_LOG_DEBUG,4,2               ; @AV_LOG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Window close event.\n"

	.comm	_EPIPE,4,2                      ; @EPIPE
	.no_dead_strip	_write_picture
.subsections_via_symbols
