	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ico_write_trailer
_ico_write_trailer:                     ## @ico_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	%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	%rdi, %r14
	movq	8(%rdi), %rbx
	movq	16(%rdi), %r15
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	$4, %esi
	callq	_avio_seek
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_avio_wl16
	cmpl	$0, 4(%r15)
	jle	LBB0_6
## %bb.1:
	xorl	%r12d, %r12d
	xorl	%r13d, %r13d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	callq	_avio_w8
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_avio_w8
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_avio_wl16
	movq	8(%r15), %rax
	movl	8(%rax,%r12), %esi
	movq	%rbx, %rdi
	callq	_avio_wl16
	movq	8(%r15), %rax
	movl	16(%rax,%r12), %esi
	movq	%rbx, %rdi
	callq	_avio_wl32
	movq	8(%r15), %rax
	movl	12(%rax,%r12), %esi
	movq	%rbx, %rdi
	callq	_avio_wl32
	incq	%r13
	movslq	4(%r15), %rax
	addq	$20, %r12
	cmpq	%rax, %r13
	jge	LBB0_6
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %rax
	movl	(%rax,%r12), %esi
	movq	%rbx, %rdi
	callq	_avio_w8
	movq	8(%r15), %rax
	movl	4(%rax,%r12), %esi
	movq	%rbx, %rdi
	callq	_avio_w8
	movq	(%r14), %rax
	movq	(%rax,%r13,8), %rax
	movq	(%rax), %rax
	movq	(%rax), %rcx
	movl	$0, %esi
	movq	_AV_CODEC_ID_BMP@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%rax), %rax
	movl	$0, %esi
	movq	_AV_PIX_FMT_PAL8@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%r15), %rax
	movl	8(%rax,%r12), %ecx
	movl	$1, %esi
	shll	%cl, %esi
	cmpl	$8, %ecx
	movl	$0, %eax
	cmovgel	%eax, %esi
	jmp	LBB0_5
LBB0_6:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
	.comm	_AV_CODEC_ID_BMP,8,3            ## @AV_CODEC_ID_BMP
	.comm	_AV_PIX_FMT_PAL8,8,3            ## @AV_PIX_FMT_PAL8
	.no_dead_strip	_ico_write_trailer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ico_write_trailer
_ico_write_trailer:                     ; @ico_write_trailer
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x0
	ldp	x20, x21, [x0, #8]
Lloh0:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x20
	mov	w1, #4
	bl	_avio_seek
	ldr	w1, [x21]
	mov	x0, x20
	bl	_avio_wl16
	ldr	w8, [x21, #4]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.1:
	mov	x22, #0
	mov	x23, #0
Lloh3:
	adrp	x24, _AV_CODEC_ID_BMP@GOTPAGE
Lloh4:
	ldr	x24, [x24, _AV_CODEC_ID_BMP@GOTPAGEOFF]
Lloh5:
	adrp	x25, _AV_PIX_FMT_PAL8@GOTPAGE
Lloh6:
	ldr	x25, [x25, _AV_PIX_FMT_PAL8@GOTPAGEOFF]
	mov	w26, #1
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	w1, #0
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x20
	bl	_avio_w8
	mov	x0, x20
	mov	w1, #0
	bl	_avio_w8
	mov	x0, x20
	mov	w1, #1
	bl	_avio_wl16
	ldr	x8, [x21, #8]
	add	x8, x8, x22
	ldr	w1, [x8, #8]
	mov	x0, x20
	bl	_avio_wl16
	ldr	x8, [x21, #8]
	add	x8, x8, x22
	ldr	w1, [x8, #16]
	mov	x0, x20
	bl	_avio_wl32
	ldr	x8, [x21, #8]
	add	x8, x8, x22
	ldr	w1, [x8, #12]
	mov	x0, x20
	bl	_avio_wl32
	add	x23, x23, #1
	ldrsw	x8, [x21, #4]
	add	x22, x22, #20
	cmp	x23, x8
	b.ge	LBB0_7
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21, #8]
	ldr	w1, [x8, x22]
	mov	x0, x20
	bl	_avio_w8
	ldr	x8, [x21, #8]
	add	x8, x8, x22
	ldr	w1, [x8, #4]
	mov	x0, x20
	bl	_avio_w8
	ldr	x8, [x19]
	ldr	x8, [x8, x23, lsl #3]
	ldr	x8, [x8]
	ldr	x9, [x8]
	ldr	x10, [x24]
	cmp	x9, x10
	b.ne	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x8, #8]
	ldr	x9, [x25]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x21, #8]
	add	x8, x8, x22
	ldr	w8, [x8, #8]
	lsl	w9, w26, w8
	cmp	w8, #7
	csel	w1, wzr, w9, gt
	b	LBB0_3
LBB0_7:
	mov	w0, #0
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
	.comm	_AV_CODEC_ID_BMP,8,3            ; @AV_CODEC_ID_BMP
	.comm	_AV_PIX_FMT_PAL8,8,3            ; @AV_PIX_FMT_PAL8
	.no_dead_strip	_ico_write_trailer
.subsections_via_symbols
