	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function create_image_reader
_create_image_reader:                   ## @create_image_reader
	.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, %r14
	movq	(%rdi), %rbx
	movl	24(%rbx), %esi
	movl	28(%rbx), %edi
	movq	_IMAGE_FORMAT_ANDROID@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_MAX_BUF_COUNT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	4(%rbx), %r8
	callq	_AImageReader_new
	movq	_AMEDIA_OK@GOTPCREL(%rip), %r15
	cmpq	(%r15), %rax
	jne	LBB0_1
## %bb.2:
	leaq	8(%rbx), %rsi
	movq	%r14, 16(%rbx)
	movq	_image_available@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
	movl	4(%rbx), %edi
	callq	_AImageReader_setImageListener
	cmpq	(%r15), %rax
	jne	LBB0_3
## %bb.4:
	movl	4(%rbx), %edi
	movq	%rbx, %rsi
	callq	_AImageReader_getWindow
	xorl	%ecx, %ecx
	cmpq	(%r15), %rax
	je	LBB0_7
## %bb.5:
	leaq	L_.str.2(%rip), %r15
	jmp	LBB0_6
LBB0_1:
	leaq	L_.str(%rip), %r15
	jmp	LBB0_6
LBB0_3:
	leaq	L_.str.1(%rip), %r15
LBB0_6:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	movq	%rax, %rdi
	callq	_media_status_string
	movq	%r14, %rdi
	movl	%ebx, %esi
	movq	%r15, %rdx
	movl	%eax, %ecx
	callq	_av_log
	movq	_AVERROR_EXTERNAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
LBB0_7:
	movl	%ecx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IMAGE_FORMAT_ANDROID,4,2       ## @IMAGE_FORMAT_ANDROID
	.comm	_MAX_BUF_COUNT,4,2              ## @MAX_BUF_COUNT
	.comm	_AMEDIA_OK,8,3                  ## @AMEDIA_OK
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to create image reader, error: %s.\n"

	.comm	_AVERROR_EXTERNAL,4,2           ## @AVERROR_EXTERNAL
	.comm	_image_available,4,2            ## @image_available
L_.str.1:                               ## @.str.1
	.asciz	"Failed to set image listener on image reader, error: %s.\n"

L_.str.2:                               ## @.str.2
	.asciz	"Could not get image reader window, error: %s.\n"

	.no_dead_strip	_create_image_reader
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function create_image_reader
_create_image_reader:                   ; @create_image_reader
	.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
	mov	x19, x0
	ldr	x20, [x0]
Lloh0:
	adrp	x8, _IMAGE_FORMAT_ANDROID@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IMAGE_FORMAT_ANDROID@GOTPAGEOFF]
	ldp	w1, w0, [x20, #24]
Lloh2:
	ldr	w2, [x8]
Lloh3:
	adrp	x8, _MAX_BUF_COUNT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAX_BUF_COUNT@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x8]
	add	x4, x20, #4
	bl	_AImageReader_new
Lloh6:
	adrp	x21, _AMEDIA_OK@GOTPAGE
Lloh7:
	ldr	x21, [x21, _AMEDIA_OK@GOTPAGEOFF]
	ldr	x8, [x21]
	cmp	x0, x8
	b.ne	LBB0_4
; %bb.1:
Lloh8:
	adrp	x8, _image_available@GOTPAGE
Lloh9:
	ldr	x8, [x8, _image_available@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	mov	x1, x20
	str	w8, [x1, #8]!
	str	x19, [x1, #8]
	ldur	w0, [x1, #-4]
	bl	_AImageReader_setImageListener
	ldr	x8, [x21]
	cmp	x0, x8
	b.ne	LBB0_5
; %bb.2:
	ldr	w0, [x20, #4]
	mov	x1, x20
	bl	_AImageReader_getWindow
	ldr	x8, [x21]
	cmp	x0, x8
	b.ne	LBB0_6
; %bb.3:
	mov	w0, #0
	b	LBB0_8
LBB0_4:
Lloh11:
	adrp	x20, l_.str@PAGE
Lloh12:
	add	x20, x20, l_.str@PAGEOFF
	b	LBB0_7
LBB0_5:
Lloh13:
	adrp	x20, l_.str.1@PAGE
Lloh14:
	add	x20, x20, l_.str.1@PAGEOFF
	b	LBB0_7
LBB0_6:
Lloh15:
	adrp	x20, l_.str.2@PAGE
Lloh16:
	add	x20, x20, l_.str.2@PAGEOFF
LBB0_7:
Lloh17:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh18:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh19:
	ldr	w21, [x8]
	bl	_media_status_string
	mov	x3, x0
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	_av_log
Lloh20:
	adrp	x8, _AVERROR_EXTERNAL@GOTPAGE
Lloh21:
	ldr	x8, [x8, _AVERROR_EXTERNAL@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
LBB0_8:
	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 AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_IMAGE_FORMAT_ANDROID,4,2       ; @IMAGE_FORMAT_ANDROID
	.comm	_MAX_BUF_COUNT,4,2              ; @MAX_BUF_COUNT
	.comm	_AMEDIA_OK,8,3                  ; @AMEDIA_OK
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to create image reader, error: %s.\n"

	.comm	_AVERROR_EXTERNAL,4,2           ; @AVERROR_EXTERNAL
	.comm	_image_available,4,2            ; @image_available
l_.str.1:                               ; @.str.1
	.asciz	"Failed to set image listener on image reader, error: %s.\n"

l_.str.2:                               ; @.str.2
	.asciz	"Could not get image reader window, error: %s.\n"

	.no_dead_strip	_create_image_reader
.subsections_via_symbols
