	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function opengl_resize
_opengl_resize:                         ## @opengl_resize
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rbx
	movl	%esi, (%rbx)
	movl	%edx, 4(%rbx)
	cmpq	$0, 16(%rbx)
	je	LBB0_1
## %bb.2:
	movq	%rdi, %r14
	cmpq	$0, 8(%rbx)
	je	LBB0_5
## %bb.3:
	movq	_AV_DEV_TO_APP_PREPARE_WINDOW_BUFFER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_avdevice_dev_to_app_control_message
	testl	%eax, %eax
	js	LBB0_4
LBB0_5:
	movq	%r14, %rdi
	callq	_opengl_prepare_vertex
	testl	%eax, %eax
	js	LBB0_6
## %bb.8:
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$1, %edx
	xorl	%ecx, %ecx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_opengl_draw                    ## TAILCALL
LBB0_1:
	xorl	%r15d, %r15d
	jmp	LBB0_7
LBB0_6:
	movl	%eax, %r15d
	jmp	LBB0_7
LBB0_4:
	movl	%eax, %r15d
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%rbx, %rdi
	callq	_av_log
LBB0_7:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_DEV_TO_APP_PREPARE_WINDOW_BUFFER,4,2 ## @AV_DEV_TO_APP_PREPARE_WINDOW_BUFFER
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Application failed to prepare window buffer.\n"

	.no_dead_strip	_opengl_resize
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function opengl_resize
_opengl_resize:                         ; @opengl_resize
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	x20, [x0]
	stp	w1, w2, [x20]
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_5
; %bb.1:
	mov	x19, x0
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_3
; %bb.2:
Lloh0:
	adrp	x8, _AV_DEV_TO_APP_PREPARE_WINDOW_BUFFER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AV_DEV_TO_APP_PREPARE_WINDOW_BUFFER@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, #0
	mov	w3, #0
	bl	_avdevice_dev_to_app_control_message
	tbnz	w0, #31, LBB0_7
LBB0_3:
	mov	x0, x19
	bl	_opengl_prepare_vertex
	tbnz	w0, #31, LBB0_6
; %bb.4:
	mov	x0, x19
	mov	x1, #0
	mov	w2, #1
	mov	w3, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_opengl_draw
LBB0_5:
	mov	w21, #0
	b	LBB0_8
LBB0_6:
	mov	x21, x0
	b	LBB0_8
LBB0_7:
	mov	x21, x0
Lloh3:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x20
	bl	_av_log
LBB0_8:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_DEV_TO_APP_PREPARE_WINDOW_BUFFER,4,2 ; @AV_DEV_TO_APP_PREPARE_WINDOW_BUFFER
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Application failed to prepare window buffer.\n"

	.no_dead_strip	_opengl_resize
.subsections_via_symbols
