	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function decodeImage
LCPI0_0:
	.space	16
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_decodeImage
	.p2align	4, 0x90
_decodeImage:                           ## @decodeImage
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rdi, %r12
	movq	_bufferIndex@GOTPCREL(%rip), %rdx
	movq	$0, (%rdx)
	testq	%r14, %r14
	je	LBB0_21
## %bb.1:
	movq	%rsi, %r13
	xorl	%eax, %eax
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_6 Depth 2
	movq	32(%r12), %rcx
	movq	(%rcx,%rax,8), %r15
	incq	%rax
	movq	%rax, (%rdx)
	cmpq	(%r12), %rax
	movl	$0, %ecx
	cmovaeq	%rcx, %rax
	movq	%rax, (%rdx)
	movq	(%r15), %rbx
	cmpq	%rbx, %r14
	cmovbq	%r14, %rbx
	movq	%rbx, 8(%r15)
	movl	32(%r15), %edi
	movq	%r13, %rsi
	movq	%rbx, %rdx
	callq	_memcpy
	addq	8(%r15), %r13
	movq	%r14, %rax
	movq	%r13, %r14
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%r15)
	subq	%rbx, %rax
	movq	%rax, %rbx
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	16(%r15), %rax
	movq	_OMX_BUFFERFLAG_EOS@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, (%rax)
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	16(%r12), %rax
	movl	8(%rax), %edi
	movq	%r15, %rsi
	callq	_OMX_EmptyThisBuffer
	movl	%eax, %r13d
	movq	_OMX_ErrorNone@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r13d
	jne	LBB0_11
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpq	$0, 24(%r12)
	movq	%r14, %r13
	movq	%rbx, %r14
	movq	_OMX_EventPortSettingsChanged@GOTPCREL(%rip), %rbx
	je	LBB0_6
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	$1, %ebx
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_17
## %bb.15:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	24(%r12), %rsi
	testq	%rsi, %rsi
	je	LBB0_16
## %bb.19:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%r12), %rax
	movl	8(%rax), %edi
	callq	_OMX_FillThisBuffer
	movl	%eax, %r15d
	movq	_OMX_ErrorNone@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	je	LBB0_17
	jmp	LBB0_20
	.p2align	4, 0x90
LBB0_6:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	16(%r12), %rax
	movl	(%rax), %edx
	movl	4(%rax), %edi
	movl	(%rbx), %esi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	movl	$1, %r9d
	pushq	$5
	pushq	$0
	callq	_ilclient_wait_for_event
	addq	$16, %rsp
	testl	%eax, %eax
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=2
	movq	%r12, %rdi
	callq	_portSettingsChanged
	movq	_OMXJPEG_OK@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_27
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=2
	cmpq	$0, 8(%r15)
	je	LBB0_9
## %bb.13:                              ##   in Loop: Header=BB0_6 Depth=2
	movl	$1, %edi
	callq	_sleep
	cmpq	$0, 24(%r12)
	je	LBB0_6
	jmp	LBB0_14
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	cmpq	$0, 24(%r12)
	jne	LBB0_14
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	$1, %edi
	callq	_sleep
	jmp	LBB0_14
LBB0_16:                                ##   in Loop: Header=BB0_2 Depth=1
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_2 Depth=1
	testq	%r14, %r14
	movq	_bufferIndex@GOTPCREL(%rip), %rdx
	je	LBB0_21
## %bb.18:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	(%rdx), %rax
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	jmp	LBB0_2
LBB0_21:
	movq	16(%r12), %rax
	movl	(%rax), %edx
	movl	4(%rax), %edi
	movq	_OMX_EventBufferFlag@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	_OMX_BUFFERFLAG_EOS@GOTPCREL(%rip), %rbx
	movq	(%rbx), %r8
	movl	$1, %ecx
	movl	$1, %r9d
	pushq	$2
	pushq	$0
	callq	_ilclient_wait_for_event
	addq	$16, %rsp
	testl	%eax, %eax
	je	LBB0_23
## %bb.22:
	movq	_stderr@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	leaq	L_.str.4(%rip), %rsi
	movl	%eax, %edx
	callq	_fprintf
LBB0_23:
	movq	8(%r12), %rax
	movl	(%rax), %edx
	movl	4(%rax), %edi
	movl	(%r14), %esi
	movq	(%rbx), %r8
	movl	$1, %ecx
	movl	$1, %r9d
	pushq	$2
	pushq	$0
	callq	_ilclient_wait_for_event
	addq	$16, %rsp
	testl	%eax, %eax
	je	LBB0_25
## %bb.24:
	movq	_stderr@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	leaq	L_.str.5(%rip), %rsi
	movl	%eax, %edx
	callq	_fprintf
LBB0_25:
	movq	_OMXJPEG_OK@GOTPCREL(%rip), %rax
LBB0_26:
	movl	(%rax), %eax
LBB0_27:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	leaq	L_.str(%rip), %rdi
	callq	_perror
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%r13d, %edx
LBB0_12:
	callq	_fprintf
	movq	_OMXJPEG_ERROR_MEMORY@GOTPCREL(%rip), %rax
	jmp	LBB0_26
LBB0_20:
	leaq	L_.str.2(%rip), %rdi
	callq	_perror
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	movl	%r15d, %edx
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_bufferIndex,8,3                ## @bufferIndex
	.comm	_OMX_BUFFERFLAG_EOS,8,3         ## @OMX_BUFFERFLAG_EOS
	.comm	_OMX_ErrorNone,4,2              ## @OMX_ErrorNone
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Empty input buffer"

	.comm	_stderr,4,2                     ## @stderr
L_.str.1:                               ## @.str.1
	.asciz	"return code %x\n"

	.comm	_OMXJPEG_ERROR_MEMORY,4,2       ## @OMXJPEG_ERROR_MEMORY
	.comm	_OMX_EventPortSettingsChanged,4,2 ## @OMX_EventPortSettingsChanged
	.comm	_OMXJPEG_OK,4,2                 ## @OMXJPEG_OK
L_.str.2:                               ## @.str.2
	.asciz	"Filling output buffer"

L_.str.3:                               ## @.str.3
	.asciz	"Error code %x\n"

	.comm	_OMX_EventBufferFlag,4,2        ## @OMX_EventBufferFlag
L_.str.4:                               ## @.str.4
	.asciz	"No EOS event on image decoder %d\n"

L_.str.5:                               ## @.str.5
	.asciz	"No EOS event on image resizer %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_decodeImage                    ; -- Begin function decodeImage
	.p2align	2
_decodeImage:                           ; @decodeImage
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
Lloh0:
	adrp	x26, _bufferIndex@GOTPAGE
Lloh1:
	ldr	x26, [x26, _bufferIndex@GOTPAGEOFF]
	str	xzr, [x26]
Lloh2:
	adrp	x24, _OMXJPEG_OK@GOTPAGE
Lloh3:
	ldr	x24, [x24, _OMXJPEG_OK@GOTPAGEOFF]
	cbz	x2, LBB0_18
; %bb.1:
	mov	x20, x2
	mov	x21, x1
	mov	x8, #0
	mov	w25, #0
Lloh4:
	adrp	x28, _OMX_EventPortSettingsChanged@GOTPAGE
Lloh5:
	ldr	x28, [x28, _OMX_EventPortSettingsChanged@GOTPAGEOFF]
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	ldr	x9, [x19, #32]
	ldr	x22, [x9, x8, lsl #3]
	add	x9, x8, #1
	str	x9, [x26]
	ldr	x10, [x19]
	cmp	x9, x10
	csinc	x8, xzr, x8, hs
	str	x8, [x26]
	ldr	x8, [x22]
	cmp	x20, x8
	csel	x2, x20, x8, lo
	str	x2, [x22, #8]
	sub	x20, x20, x2
	ldr	w0, [x22, #32]
	mov	x1, x21
	bl	_memcpy
	ldr	x27, [x22, #8]
	mov	x8, x22
	str	xzr, [x8, #16]!
	str	xzr, [x22, #24]
	cbnz	x20, LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
Lloh6:
	adrp	x9, _OMX_BUFFERFLAG_EOS@GOTPAGE
Lloh7:
	ldr	x9, [x9, _OMX_BUFFERFLAG_EOS@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	str	x9, [x8]
LBB0_4:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x19, #16]
	ldr	w0, [x8, #8]
	mov	x1, x22
	bl	_OMX_EmptyThisBuffer
Lloh9:
	adrp	x8, _OMX_ErrorNone@GOTPAGE
Lloh10:
	ldr	x8, [x8, _OMX_ErrorNone@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_24
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x19, #24]
	cbnz	x8, LBB0_10
LBB0_6:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x19, #16]
	ldr	w1, [x28]
	ldp	w2, w0, [x8]
	mov	w3, #0
	mov	x4, #0
	mov	w5, #1
	mov	w6, #0
	mov	w7, #5
	bl	_ilclient_wait_for_event
	cbnz	w0, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	mov	x0, x19
	bl	_portSettingsChanged
	ldr	w8, [x24]
	cmp	w0, w8
	b.ne	LBB0_23
LBB0_8:                                 ;   in Loop: Header=BB0_6 Depth=2
	ldr	x8, [x22, #8]
	cbz	x8, LBB0_15
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=2
	mov	w0, #1
	bl	_sleep
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_6
LBB0_10:                                ;   in Loop: Header=BB0_2 Depth=1
	cbnz	w25, LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_2 Depth=1
	ldr	x1, [x19, #24]
	cbz	x1, LBB0_17
; %bb.12:                               ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x19, #8]
	ldr	w0, [x8, #8]
	bl	_OMX_FillThisBuffer
Lloh12:
	adrp	x8, _OMX_ErrorNone@GOTPAGE
Lloh13:
	ldr	x8, [x8, _OMX_ErrorNone@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_26
LBB0_13:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w25, #1
	cbz	x20, LBB0_18
LBB0_14:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x21, x21, x27
	ldr	x8, [x26]
	b	LBB0_2
LBB0_15:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x19, #24]
	cbnz	x8, LBB0_10
; %bb.16:                               ;   in Loop: Header=BB0_2 Depth=1
	mov	w0, #1
	bl	_sleep
	b	LBB0_10
LBB0_17:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w25, #0
	cbnz	x20, LBB0_14
LBB0_18:
	ldr	x8, [x19, #16]
Lloh15:
	adrp	x20, _OMX_EventBufferFlag@GOTPAGE
Lloh16:
	ldr	x20, [x20, _OMX_EventBufferFlag@GOTPAGEOFF]
	ldr	w1, [x20]
	ldp	w2, w0, [x8]
Lloh17:
	adrp	x8, _OMX_BUFFERFLAG_EOS@GOTPAGE
Lloh18:
	ldr	x8, [x8, _OMX_BUFFERFLAG_EOS@GOTPAGEOFF]
Lloh19:
	ldr	x4, [x8]
	mov	w3, #1
	mov	w5, #1
	mov	w6, #0
	mov	w7, #2
	bl	_ilclient_wait_for_event
	cbz	w0, LBB0_20
; %bb.19:
	mov	x2, x0
Lloh20:
	adrp	x8, _stderr@GOTPAGE
Lloh21:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
Lloh23:
	adrp	x1, l_.str.4@PAGE
Lloh24:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_fprintf
LBB0_20:
	ldr	x8, [x19, #8]
	ldr	w1, [x20]
	ldp	w2, w0, [x8]
Lloh25:
	adrp	x8, _OMX_BUFFERFLAG_EOS@GOTPAGE
Lloh26:
	ldr	x8, [x8, _OMX_BUFFERFLAG_EOS@GOTPAGEOFF]
Lloh27:
	ldr	x4, [x8]
	mov	w3, #1
	mov	w5, #1
	mov	w6, #0
	mov	w7, #2
	bl	_ilclient_wait_for_event
	cbz	w0, LBB0_22
; %bb.21:
	mov	x2, x0
Lloh28:
	adrp	x8, _stderr@GOTPAGE
Lloh29:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh30:
	ldr	w0, [x8]
Lloh31:
	adrp	x1, l_.str.5@PAGE
Lloh32:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_fprintf
LBB0_22:
	ldr	w0, [x24]
LBB0_23:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_24:
	mov	x23, x0
Lloh33:
	adrp	x0, l_.str@PAGE
Lloh34:
	add	x0, x0, l_.str@PAGEOFF
	bl	_perror
Lloh35:
	adrp	x8, _stderr@GOTPAGE
Lloh36:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh37:
	ldr	w0, [x8]
Lloh38:
	adrp	x1, l_.str.1@PAGE
Lloh39:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x23
LBB0_25:
	bl	_fprintf
Lloh40:
	adrp	x8, _OMXJPEG_ERROR_MEMORY@GOTPAGE
Lloh41:
	ldr	x8, [x8, _OMXJPEG_ERROR_MEMORY@GOTPAGEOFF]
Lloh42:
	ldr	w0, [x8]
	b	LBB0_23
LBB0_26:
	mov	x22, x0
Lloh43:
	adrp	x0, l_.str.2@PAGE
Lloh44:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_perror
Lloh45:
	adrp	x8, _stderr@GOTPAGE
Lloh46:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh47:
	ldr	w0, [x8]
Lloh48:
	adrp	x1, l_.str.3@PAGE
Lloh49:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x2, x22
	b	LBB0_25
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpAdd	Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpAdd	Lloh43, Lloh44
	.cfi_endproc
                                        ; -- End function
	.comm	_bufferIndex,8,3                ; @bufferIndex
	.comm	_OMX_BUFFERFLAG_EOS,8,3         ; @OMX_BUFFERFLAG_EOS
	.comm	_OMX_ErrorNone,4,2              ; @OMX_ErrorNone
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Empty input buffer"

	.comm	_stderr,4,2                     ; @stderr
l_.str.1:                               ; @.str.1
	.asciz	"return code %x\n"

	.comm	_OMXJPEG_ERROR_MEMORY,4,2       ; @OMXJPEG_ERROR_MEMORY
	.comm	_OMX_EventPortSettingsChanged,4,2 ; @OMX_EventPortSettingsChanged
	.comm	_OMXJPEG_OK,4,2                 ; @OMXJPEG_OK
l_.str.2:                               ; @.str.2
	.asciz	"Filling output buffer"

l_.str.3:                               ; @.str.3
	.asciz	"Error code %x\n"

	.comm	_OMX_EventBufferFlag,4,2        ; @OMX_EventBufferFlag
l_.str.4:                               ; @.str.4
	.asciz	"No EOS event on image decoder %d\n"

l_.str.5:                               ; @.str.5
	.asciz	"No EOS event on image resizer %d\n"

.subsections_via_symbols
