	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function android_camera_read_header
_android_camera_read_header:            ## @android_camera_read_header
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	(%rdi), %rbx
	leaq	16(%rbx), %rdi
	xorl	%esi, %esi
	callq	_atomic_init
	leaq	12(%rbx), %rdi
	xorl	%esi, %esi
	callq	_atomic_init
	leaq	8(%rbx), %rdi
	movl	4(%rbx), %esi
	movl	$4, %edx
	callq	_av_thread_message_queue_alloc
	testl	%eax, %eax
	js	LBB0_6
## %bb.1:
	xorl	%eax, %eax
	callq	_ACameraManager_create
	movl	%eax, (%rbx)
	testl	%eax, %eax
	je	LBB0_7
## %bb.2:
	movq	%r14, %rdi
	callq	_open_camera
	testl	%eax, %eax
	js	LBB0_8
## %bb.3:
	movq	%r14, %rdi
	callq	_get_sensor_orientation
	movq	%r14, %rdi
	callq	_match_video_size
	movq	%r14, %rdi
	callq	_match_framerate
	movq	%r14, %rdi
	callq	_create_image_reader
	testl	%eax, %eax
	js	LBB0_10
## %bb.4:
	movq	%r14, %rdi
	callq	_create_capture_session
	testl	%eax, %eax
	js	LBB0_10
## %bb.5:
	movq	%r14, %rdi
	callq	_add_video_stream
	movl	%eax, %r12d
	testl	%r12d, %r12d
	jns	LBB0_12
	jmp	LBB0_11
LBB0_6:
	movl	%eax, %r12d
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	%r12d, %edi
	callq	_av_err2str
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_11
LBB0_7:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_av_log
	movq	_AVERROR_EXTERNAL@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	testl	%r12d, %r12d
	jns	LBB0_12
	jmp	LBB0_11
LBB0_8:
	movl	%eax, %r12d
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_11
LBB0_10:
	movl	%eax, %r12d
LBB0_11:
	movq	%r14, %rdi
	callq	_android_camera_read_close
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.3(%rip), %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_av_log
LBB0_12:
	movl	%r12d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to allocate input queue, error: %s.\n"

L_.str.1:                               ## @.str.1
	.asciz	"Failed to create Android camera manager.\n"

	.comm	_AVERROR_EXTERNAL,4,2           ## @AVERROR_EXTERNAL
L_.str.2:                               ## @.str.2
	.asciz	"Failed to open camera.\n"

L_.str.3:                               ## @.str.3
	.asciz	"Failed to open android_camera.\n"

	.no_dead_strip	_android_camera_read_header
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function android_camera_read_header
_android_camera_read_header:            ; @android_camera_read_header
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	ldr	x21, [x0]
	add	x0, x21, #16
	mov	w1, #0
	bl	_atomic_init
	add	x0, x21, #12
	mov	w1, #0
	bl	_atomic_init
	add	x0, x21, #8
	ldr	w1, [x21, #4]
	mov	w2, #4
	bl	_av_thread_message_queue_alloc
	tbnz	w0, #31, LBB0_6
; %bb.1:
	bl	_ACameraManager_create
	str	w0, [x21]
	cbz	w0, LBB0_7
; %bb.2:
	mov	x0, x19
	bl	_open_camera
	tbnz	w0, #31, LBB0_8
; %bb.3:
	mov	x0, x19
	bl	_get_sensor_orientation
	mov	x0, x19
	bl	_match_video_size
	mov	x0, x19
	bl	_match_framerate
	mov	x0, x19
	bl	_create_image_reader
	tbnz	w0, #31, LBB0_9
; %bb.4:
	mov	x0, x19
	bl	_create_capture_session
	tbnz	w0, #31, LBB0_9
; %bb.5:
	mov	x0, x19
	bl	_add_video_stream
	mov	x20, x0
	tbz	w20, #31, LBB0_11
	b	LBB0_10
LBB0_6:
	mov	x20, x0
Lloh0:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
	bl	_av_err2str
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	mov	x1, x21
	bl	_av_log
	b	LBB0_10
LBB0_7:
Lloh5:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	adrp	x2, l_.str.1@PAGE
Lloh9:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_av_log
Lloh10:
	adrp	x8, _AVERROR_EXTERNAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _AVERROR_EXTERNAL@GOTPAGEOFF]
Lloh12:
	ldr	w20, [x8]
	tbz	w20, #31, LBB0_11
	b	LBB0_10
LBB0_8:
	mov	x20, x0
Lloh13:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh14:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
Lloh16:
	adrp	x2, l_.str.2@PAGE
Lloh17:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_av_log
	b	LBB0_10
LBB0_9:
	mov	x20, x0
LBB0_10:
	mov	x0, x19
	bl	_android_camera_read_close
Lloh18:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh19:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
Lloh21:
	adrp	x2, l_.str.3@PAGE
Lloh22:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_av_log
LBB0_11:
	mov	x0, x20
	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
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to allocate input queue, error: %s.\n"

l_.str.1:                               ; @.str.1
	.asciz	"Failed to create Android camera manager.\n"

	.comm	_AVERROR_EXTERNAL,4,2           ; @AVERROR_EXTERNAL
l_.str.2:                               ; @.str.2
	.asciz	"Failed to open camera.\n"

l_.str.3:                               ; @.str.3
	.asciz	"Failed to open android_camera.\n"

	.no_dead_strip	_android_camera_read_header
.subsections_via_symbols
