	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function webp_write_trailer
_webp_write_trailer:                    ## @webp_write_trailer
	.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, %r15
	movq	8(%rdi), %rbx
	cmpq	$0, 16(%rbx)
	je	LBB0_4
## %bb.1:
	xorl	%r14d, %r14d
	cmpl	$2, (%rbx)
	jl	LBB0_7
## %bb.2:
	cmpq	$0, 8(%rbx)
	je	LBB0_7
## %bb.3:
	movl	(%r15), %edi
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$42, %esi
	callq	_avio_seek
	movl	(%r15), %edi
	movq	8(%rbx), %rsi
	callq	_avio_wl16
	jmp	LBB0_7
LBB0_4:
	movq	_AV_NOPTS_VALUE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_flush
	testl	%eax, %eax
	js	LBB0_5
## %bb.6:
	movl	(%r15), %edi
	callq	_avio_tell
	movl	%eax, %r14d
	movl	(%r15), %edi
	movq	_SEEK_SET@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movl	$4, %esi
	callq	_avio_seek
	movl	(%r15), %edi
	leal	-8(%r14), %esi
	callq	_avio_wl32
	movl	(%r15), %edi
	movl	(%rbx), %edx
	movl	%r14d, %esi
	callq	_avio_seek
	xorl	%r14d, %r14d
	jmp	LBB0_7
LBB0_5:
	movl	%eax, %r14d
LBB0_7:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
	.comm	_AV_NOPTS_VALUE,4,2             ## @AV_NOPTS_VALUE
	.no_dead_strip	_webp_write_trailer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function webp_write_trailer
_webp_write_trailer:                    ; @webp_write_trailer
	.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, #8]
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_4
; %bb.1:
	ldr	w8, [x20]
	cmp	w8, #2
	b.lt	LBB0_6
; %bb.2:
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_6
; %bb.3:
	ldr	w0, [x19]
Lloh0:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w1, #42
	bl	_avio_seek
	ldr	w0, [x19]
	ldr	x1, [x20, #8]
	bl	_avio_wl16
	b	LBB0_6
LBB0_4:
Lloh3:
	adrp	x8, _AV_NOPTS_VALUE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AV_NOPTS_VALUE@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #1
	bl	_flush
	tbnz	w0, #31, LBB0_7
; %bb.5:
	ldr	w0, [x19]
	bl	_avio_tell
	mov	x20, x0
	ldr	w0, [x19]
Lloh6:
	adrp	x21, _SEEK_SET@GOTPAGE
Lloh7:
	ldr	x21, [x21, _SEEK_SET@GOTPAGEOFF]
	ldr	w2, [x21]
	mov	w1, #4
	bl	_avio_seek
	ldr	w0, [x19]
	sub	w1, w20, #8
	bl	_avio_wl32
	ldr	w0, [x19]
	ldr	w2, [x21]
	mov	x1, x20
	bl	_avio_seek
LBB0_6:
	mov	w0, #0
LBB0_7:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
	.comm	_AV_NOPTS_VALUE,4,2             ; @AV_NOPTS_VALUE
	.no_dead_strip	_webp_write_trailer
.subsections_via_symbols
