	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function add_display_matrix
_add_display_matrix:                    ## @add_display_matrix
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$48, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -24(%rbp)
	movq	(%rdi), %rbx
	movl	8(%rbx), %esi
	leaq	-64(%rbp), %rdi
	callq	_av_display_rotation_set
	movq	(%rbx), %rax
	movq	_ACAMERA_LENS_FACING_FRONT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	leaq	-64(%rbp), %rdi
	movl	$1, %esi
	xorl	%edx, %edx
	callq	_av_display_matrix_flip
LBB0_2:
	movq	_AV_PKT_DATA_DISPLAYMATRIX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	$36, %edx
	callq	_av_stream_new_side_data
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	leaq	-64(%rbp), %rsi
	movq	%rax, %rdi
	movl	$36, %edx
	callq	_memcpy
	xorl	%eax, %eax
	jmp	LBB0_5
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
LBB0_5:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-24(%rbp), %rcx
	jne	LBB0_7
## %bb.6:
	addq	$48, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_7:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_ACAMERA_LENS_FACING_FRONT,8,3  ## @ACAMERA_LENS_FACING_FRONT
	.comm	_AV_PKT_DATA_DISPLAYMATRIX,4,2  ## @AV_PKT_DATA_DISPLAYMATRIX
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_add_display_matrix
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function add_display_matrix
_add_display_matrix:                    ; @add_display_matrix
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x19, x1
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-24]
	ldr	x20, [x0]
	ldr	w1, [x20, #8]
	add	x0, sp, #4
	bl	_av_display_rotation_set
	ldr	x8, [x20]
Lloh3:
	adrp	x9, _ACAMERA_LENS_FACING_FRONT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _ACAMERA_LENS_FACING_FRONT@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	add	x0, sp, #4
	mov	w1, #1
	mov	w2, #0
	bl	_av_display_matrix_flip
LBB0_2:
Lloh6:
	adrp	x8, _AV_PKT_DATA_DISPLAYMATRIX@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AV_PKT_DATA_DISPLAYMATRIX@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #36
	bl	_av_stream_new_side_data
	cbz	x0, LBB0_4
; %bb.3:
	add	x1, sp, #4
	mov	w2, #36
	bl	_memcpy
	mov	w0, #0
	b	LBB0_5
LBB0_4:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	bl	_AVERROR
LBB0_5:
	ldur	x8, [x29, #-24]
Lloh12:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh13:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_7
; %bb.6:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_7:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_ACAMERA_LENS_FACING_FRONT,8,3  ; @ACAMERA_LENS_FACING_FRONT
	.comm	_AV_PKT_DATA_DISPLAYMATRIX,4,2  ; @AV_PKT_DATA_DISPLAYMATRIX
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_add_display_matrix
.subsections_via_symbols
