	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_prepareImageDecoder            ## -- Begin function prepareImageDecoder
	.p2align	4, 0x90
_prepareImageDecoder:                   ## @prepareImageDecoder
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movl	$4, %edi
	callq	_malloc
	movq	%rax, (%rbx)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movl	8(%rbx), %edi
	addq	$20, %rax
	movq	_ILCLIENT_DISABLE_ALL_PORTS@GOTPCREL(%rip), %rdx
	movq	_ILCLIENT_ENABLE_INPUT_BUFFERS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rdx), %ecx
	leaq	L_.str.1(%rip), %rdx
	movq	%rax, %rsi
	callq	_ilclient_create_component
	testl	%eax, %eax
	jne	LBB0_3
## %bb.4:
	movq	(%rbx), %rax
	movl	20(%rax), %edi
	callq	_ILC_GET_HANDLE
	movq	(%rbx), %rcx
	movl	%eax, 16(%rcx)
	movl	$24, -32(%rbp)
	movq	_OMX_VERSION@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, -16(%rbp)
	movq	_OMX_IndexParamImageInit@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	-32(%rbp), %rdx
	movl	%eax, %edi
	callq	_OMX_GetParameter
	cmpl	$2, -28(%rbp)
	jne	LBB0_5
## %bb.6:
	movq	-24(%rbp), %rax
	movq	(%rbx), %rcx
	movq	%rax, 8(%rcx)
	incq	%rax
	movq	%rax, (%rcx)
	movq	_OMXJPEG_OK@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_5:
	movq	_OMXJPEG_ERROR_WRONG_NO_PORTS@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_perror
	movq	_OMXJPEG_ERROR_MEMORY@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_3:
	leaq	L_.str.2(%rip), %rdi
	callq	_perror
	movq	_OMXJPEG_ERROR_CREATING_COMP@GOTPCREL(%rip), %rax
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"malloc image decoder"

	.comm	_OMXJPEG_ERROR_MEMORY,4,2       ## @OMXJPEG_ERROR_MEMORY
L_.str.1:                               ## @.str.1
	.asciz	"image_decode"

	.comm	_ILCLIENT_DISABLE_ALL_PORTS,4,2 ## @ILCLIENT_DISABLE_ALL_PORTS
	.comm	_ILCLIENT_ENABLE_INPUT_BUFFERS,4,2 ## @ILCLIENT_ENABLE_INPUT_BUFFERS
L_.str.2:                               ## @.str.2
	.asciz	"image decode"

	.comm	_OMXJPEG_ERROR_CREATING_COMP,4,2 ## @OMXJPEG_ERROR_CREATING_COMP
	.comm	_OMX_VERSION,4,2                ## @OMX_VERSION
	.comm	_OMX_IndexParamImageInit,4,2    ## @OMX_IndexParamImageInit
	.comm	_OMXJPEG_ERROR_WRONG_NO_PORTS,4,2 ## @OMXJPEG_ERROR_WRONG_NO_PORTS
	.comm	_OMXJPEG_OK,4,2                 ## @OMXJPEG_OK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_prepareImageDecoder            ; -- Begin function prepareImageDecoder
	.p2align	2
_prepareImageDecoder:                   ; @prepareImageDecoder
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	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
	mov	x19, x0
	mov	w0, #4
	bl	_malloc
	str	x0, [x19]
	cbz	x0, LBB0_6
; %bb.1:
	ldr	w8, [x19, #8]
Lloh0:
	adrp	x9, _ILCLIENT_DISABLE_ALL_PORTS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ILCLIENT_DISABLE_ALL_PORTS@GOTPAGEOFF]
	add	x1, x0, #20
Lloh2:
	ldr	w9, [x9]
Lloh3:
	adrp	x10, _ILCLIENT_ENABLE_INPUT_BUFFERS@GOTPAGE
Lloh4:
	ldr	x10, [x10, _ILCLIENT_ENABLE_INPUT_BUFFERS@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	orr	w3, w10, w9
Lloh6:
	adrp	x2, l_.str.1@PAGE
Lloh7:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x8
	bl	_ilclient_create_component
	cbnz	w0, LBB0_7
; %bb.2:
	ldr	x8, [x19]
	ldr	w0, [x8, #20]
	bl	_ILC_GET_HANDLE
	ldr	x8, [x19]
	str	w0, [x8, #16]
	mov	w8, #24
Lloh8:
	adrp	x9, _OMX_VERSION@GOTPAGE
Lloh9:
	ldr	x9, [x9, _OMX_VERSION@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	str	w8, [sp, #8]
	str	w9, [sp, #24]
Lloh11:
	adrp	x8, _OMX_IndexParamImageInit@GOTPAGE
Lloh12:
	ldr	x8, [x8, _OMX_IndexParamImageInit@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	add	x2, sp, #8
	bl	_OMX_GetParameter
	ldr	w8, [sp, #12]
	cmp	w8, #2
	b.ne	LBB0_4
; %bb.3:
	ldr	x8, [sp, #16]
	ldr	x9, [x19]
	add	x10, x8, #1
	stp	x10, x8, [x9]
Lloh14:
	adrp	x8, _OMXJPEG_OK@GOTPAGE
Lloh15:
	ldr	x8, [x8, _OMXJPEG_OK@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh16:
	adrp	x8, _OMXJPEG_ERROR_WRONG_NO_PORTS@GOTPAGE
Lloh17:
	ldr	x8, [x8, _OMXJPEG_ERROR_WRONG_NO_PORTS@GOTPAGEOFF]
LBB0_5:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_6:
Lloh18:
	adrp	x0, l_.str@PAGE
Lloh19:
	add	x0, x0, l_.str@PAGEOFF
	bl	_perror
Lloh20:
	adrp	x8, _OMXJPEG_ERROR_MEMORY@GOTPAGE
Lloh21:
	ldr	x8, [x8, _OMXJPEG_ERROR_MEMORY@GOTPAGEOFF]
	b	LBB0_5
LBB0_7:
Lloh22:
	adrp	x0, l_.str.2@PAGE
Lloh23:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_perror
Lloh24:
	adrp	x8, _OMXJPEG_ERROR_CREATING_COMP@GOTPAGE
Lloh25:
	ldr	x8, [x8, _OMXJPEG_ERROR_CREATING_COMP@GOTPAGEOFF]
	b	LBB0_5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"malloc image decoder"

	.comm	_OMXJPEG_ERROR_MEMORY,4,2       ; @OMXJPEG_ERROR_MEMORY
l_.str.1:                               ; @.str.1
	.asciz	"image_decode"

	.comm	_ILCLIENT_DISABLE_ALL_PORTS,4,2 ; @ILCLIENT_DISABLE_ALL_PORTS
	.comm	_ILCLIENT_ENABLE_INPUT_BUFFERS,4,2 ; @ILCLIENT_ENABLE_INPUT_BUFFERS
l_.str.2:                               ; @.str.2
	.asciz	"image decode"

	.comm	_OMXJPEG_ERROR_CREATING_COMP,4,2 ; @OMXJPEG_ERROR_CREATING_COMP
	.comm	_OMX_VERSION,4,2                ; @OMX_VERSION
	.comm	_OMX_IndexParamImageInit,4,2    ; @OMX_IndexParamImageInit
	.comm	_OMXJPEG_ERROR_WRONG_NO_PORTS,4,2 ; @OMXJPEG_ERROR_WRONG_NO_PORTS
	.comm	_OMXJPEG_OK,4,2                 ; @OMXJPEG_OK
.subsections_via_symbols
