	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_put_bmp_header              ## -- Begin function ff_put_bmp_header
	.p2align	4, 0x90
_ff_put_bmp_header:                     ## @ff_put_bmp_header
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movq	%rsi, %r15
	movq	%rdi, %r14
	movl	(%rsi), %r13d
	xorl	%ebx, %ebx
	cmpl	$9, %r13d
	jl	LBB0_1
## %bb.2:
	movq	24(%r15), %rax
	leaq	(%rax,%r13), %rdi
	addq	$-9, %rdi
	leaq	L_.str(%rip), %rsi
	movl	$9, %edx
	movl	%ecx, %ebx
	callq	_memcmp
	movl	%ebx, %ecx
	xorl	%edx, %edx
	testl	%eax, %eax
	sete	%bl
	setne	%dl
	leal	(%rdx,%rdx,8), %eax
	addl	$-9, %eax
	movl	(%r15), %r13d
	jmp	LBB0_3
LBB0_1:
	xorl	%eax, %eax
LBB0_3:
	movl	4(%r15), %edx
	movq	_AV_PIX_FMT_NONE@GOTPCREL(%rip), %rsi
	cmpl	(%rsi), %edx
	jne	LBB0_6
## %bb.4:
	cmpl	$1, 8(%r15)
	jne	LBB0_6
## %bb.5:
	movq	_AV_PIX_FMT_MONOWHITE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
LBB0_6:
	addl	%eax, %r13d
	movl	$0, %edi
	testl	%r12d, %r12d
	jne	LBB0_10
## %bb.7:
	movq	_AV_PIX_FMT_PAL8@GOTPCREL(%rip), %rax
	movb	$1, %dil
	cmpl	(%rax), %edx
	je	LBB0_10
## %bb.8:
	movq	_AV_PIX_FMT_MONOWHITE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	je	LBB0_10
## %bb.9:
	movq	_AV_PIX_FMT_MONOBLACK@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	sete	%dil
LBB0_10:
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	movl	%edx, -52(%rbp)                 ## 4-byte Spill
	leal	40(%r13), %esi
	testb	%dil, %dil
	movl	$40, %eax
	cmovnel	%eax, %esi
	testl	%ecx, %ecx
	cmovnel	%eax, %esi
	movl	%edi, %r12d
	movq	%r14, %rdi
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	callq	_avio_wl32
	movl	12(%r15), %esi
	movq	%r14, %rdi
	callq	_avio_wl32
	movl	20(%r15), %eax
	movl	%eax, %esi
	negl	%esi
	testb	%bl, %bl
	cmovnel	%eax, %esi
	cmpl	$0, 16(%r15)
	cmovnel	%eax, %esi
	movq	%r14, %rdi
	callq	_avio_wl32
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_avio_wl16
	movl	8(%r15), %esi
	testl	%esi, %esi
	movl	$24, %ebx
	cmovel	%ebx, %esi
	movq	%r14, %rdi
	callq	_avio_wl16
	movl	16(%r15), %esi
	movq	%r14, %rdi
	callq	_avio_wl32
	movl	20(%r15), %eax
	imull	12(%r15), %eax
	movl	8(%r15), %esi
	testl	%esi, %esi
	cmovel	%ebx, %esi
	imull	%eax, %esi
	leal	7(%rsi), %eax
	addl	$14, %esi
	testl	%eax, %eax
	cmovnsl	%eax, %esi
	sarl	$3, %esi
	movq	%r14, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_avio_wl32
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_avio_wl32
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_avio_wl32
	xorl	%esi, %esi
	movl	%r12d, %ebx
	testb	%r12b, %r12b
	je	LBB0_12
## %bb.11:
	movb	8(%r15), %cl
	movl	$1, %esi
	shll	%cl, %esi
LBB0_12:
	movq	%r14, %rdi
	callq	_avio_wl32
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_avio_wl32
	cmpl	$0, -48(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_13
LBB0_25:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	cmpl	$0, (%r15)
	je	LBB0_17
## %bb.14:
	movq	24(%r15), %rsi
	movq	%r14, %rdi
	movl	%r13d, %edx
	callq	_avio_write
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_25
## %bb.15:
	andl	$1, %r13d
	je	LBB0_25
## %bb.16:
	movq	%r14, %rdi
	xorl	%esi, %esi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_avio_w8                        ## TAILCALL
LBB0_17:
	testb	%bl, %bl
	je	LBB0_25
## %bb.18:
	cmpl	$31, 8(%r15)
	je	LBB0_25
## %bb.19:
	xorl	%ebx, %ebx
	movq	_AV_PIX_FMT_MONOWHITE@GOTPCREL(%rip), %r12
	movq	_AV_PIX_FMT_MONOBLACK@GOTPCREL(%rip), %r13
	jmp	LBB0_20
	.p2align	4, 0x90
LBB0_24:                                ##   in Loop: Header=BB0_20 Depth=1
	movq	%r14, %rdi
	callq	_avio_wl32
	incl	%ebx
	movzbl	8(%r15), %ecx
	movl	$1, %eax
	shll	%cl, %eax
	cmpl	%eax, %ebx
	jge	LBB0_25
LBB0_20:                                ## =>This Inner Loop Header: Depth=1
	testl	%ebx, %ebx
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	jne	LBB0_22
## %bb.21:                              ##   in Loop: Header=BB0_20 Depth=1
	movl	$16777215, %esi                 ## imm = 0xFFFFFF
	cmpl	(%r12), %edx
	je	LBB0_24
LBB0_22:                                ##   in Loop: Header=BB0_20 Depth=1
	movl	%ebx, %eax
	xorl	$1, %eax
	movl	(%r13), %ecx
	xorl	%edx, %ecx
	orl	%eax, %ecx
	movl	$16777215, %esi                 ## imm = 0xFFFFFF
	je	LBB0_24
## %bb.23:                              ##   in Loop: Header=BB0_20 Depth=1
	xorl	%esi, %esi
	jmp	LBB0_24
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"BottomUp"

	.comm	_AV_PIX_FMT_NONE,4,2            ## @AV_PIX_FMT_NONE
	.comm	_AV_PIX_FMT_MONOWHITE,4,2       ## @AV_PIX_FMT_MONOWHITE
	.comm	_AV_PIX_FMT_PAL8,4,2            ## @AV_PIX_FMT_PAL8
	.comm	_AV_PIX_FMT_MONOBLACK,4,2       ## @AV_PIX_FMT_MONOBLACK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_put_bmp_header              ; -- Begin function ff_put_bmp_header
	.p2align	2
_ff_put_bmp_header:                     ; @ff_put_bmp_header
	.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	x22, x3
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
	ldr	w8, [x1]
	cmp	w8, #9
	b.lt	LBB0_2
; %bb.1:
	ldr	x9, [x20, #24]
	add	x8, x8, x9
	sub	x0, x8, #9
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w2, #9
	bl	_memcmp
	mov	w8, #-9
	cmp	w0, #0
	csel	w9, w8, wzr, eq
	cset	w26, eq
	ldr	w8, [x20]
	b	LBB0_3
LBB0_2:
	mov	w26, #0
	mov	w9, #0
LBB0_3:
	ldr	w24, [x20, #4]
Lloh2:
	adrp	x10, _AV_PIX_FMT_NONE@GOTPAGE
Lloh3:
	ldr	x10, [x10, _AV_PIX_FMT_NONE@GOTPAGEOFF]
Lloh4:
	ldr	w10, [x10]
	cmp	w24, w10
	b.ne	LBB0_5
; %bb.4:
	ldr	w10, [x20, #8]
Lloh5:
	adrp	x11, _AV_PIX_FMT_MONOWHITE@GOTPAGE
Lloh6:
	ldr	x11, [x11, _AV_PIX_FMT_MONOWHITE@GOTPAGEOFF]
Lloh7:
	ldr	w11, [x11]
	cmp	w10, #1
	csel	w24, w11, w24, eq
LBB0_5:
	add	w23, w8, w9
	cbz	w21, LBB0_7
; %bb.6:
	mov	w25, #0
	b	LBB0_10
LBB0_7:
Lloh8:
	adrp	x8, _AV_PIX_FMT_PAL8@GOTPAGE
Lloh9:
	ldr	x8, [x8, _AV_PIX_FMT_PAL8@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _AV_PIX_FMT_MONOWHITE@GOTPAGE
Lloh12:
	ldr	x9, [x9, _AV_PIX_FMT_MONOWHITE@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	cmp	w24, w8
	ccmp	w24, w9, #4, ne
	b.ne	LBB0_9
; %bb.8:
	mov	w25, #1
	b	LBB0_10
LBB0_9:
Lloh14:
	adrp	x8, _AV_PIX_FMT_MONOBLACK@GOTPAGE
Lloh15:
	ldr	x8, [x8, _AV_PIX_FMT_MONOBLACK@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	cmp	w24, w8
	cset	w25, eq
LBB0_10:
	cmp	w22, #0
	cset	w8, ne
	orr	w8, w8, w25
	add	w9, w23, #40
	mov	w10, #40
	cmp	w8, #0
	csel	w1, w10, w9, ne
	mov	x0, x19
	bl	_avio_wl32
	ldr	w1, [x20, #12]
	mov	x0, x19
	bl	_avio_wl32
	ldp	w8, w9, [x20, #16]
	cmp	w8, #0
	cset	w8, ne
	orr	w8, w8, w26
	cmp	w8, #0
	cneg	w1, w9, eq
	mov	x0, x19
	bl	_avio_wl32
	mov	w26, #1
	mov	x0, x19
	mov	w1, #1
	bl	_avio_wl16
	ldr	w8, [x20, #8]
	mov	w27, #24
	cmp	w8, #0
	csel	w1, w27, w8, eq
	mov	x0, x19
	bl	_avio_wl16
	ldr	w1, [x20, #16]
	mov	x0, x19
	bl	_avio_wl32
	ldr	w8, [x20, #20]
	ldp	w10, w9, [x20, #8]
	mul	w8, w8, w9
	cmp	w10, #0
	csel	w9, w27, w10, eq
	mul	w8, w8, w9
	add	w9, w8, #7
	add	w8, w8, #14
	cmp	w9, #0
	csel	w8, w8, w9, lt
	asr	w1, w8, #3
	mov	x0, x19
	bl	_avio_wl32
	mov	x0, x19
	mov	w1, #0
	bl	_avio_wl32
	mov	x0, x19
	mov	w1, #0
	bl	_avio_wl32
	mov	w1, #0
	cbz	w25, LBB0_12
; %bb.11:
	ldr	w8, [x20, #8]
	lsl	w1, w26, w8
LBB0_12:
	mov	x0, x19
	bl	_avio_wl32
	mov	x0, x19
	mov	w1, #0
	bl	_avio_wl32
	cbz	w22, LBB0_14
LBB0_13:
	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_14:
	ldr	w8, [x20]
	cbz	w8, LBB0_18
; %bb.15:
	ldr	x1, [x20, #24]
	mov	x0, x19
	mov	x2, x23
	bl	_avio_write
	cbnz	w21, LBB0_13
; %bb.16:
	tbz	w23, #0, LBB0_13
; %bb.17:
	mov	x0, x19
	mov	w1, #0
	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
	b	_avio_w8
LBB0_18:
	cbz	w25, LBB0_13
; %bb.19:
	ldr	w8, [x20, #8]
	cmp	w8, #31
	b.eq	LBB0_13
; %bb.20:
	mov	w21, #0
Lloh17:
	adrp	x22, _AV_PIX_FMT_MONOWHITE@GOTPAGE
Lloh18:
	ldr	x22, [x22, _AV_PIX_FMT_MONOWHITE@GOTPAGEOFF]
	mov	w23, #1
Lloh19:
	adrp	x25, _AV_PIX_FMT_MONOBLACK@GOTPAGE
Lloh20:
	ldr	x25, [x25, _AV_PIX_FMT_MONOBLACK@GOTPAGEOFF]
	mov	w26, #16777215
	b	LBB0_23
LBB0_21:                                ;   in Loop: Header=BB0_23 Depth=1
	ldr	w8, [x25]
	cmp	w24, w8
	ccmp	w21, #1, #0, eq
	csel	w1, w26, wzr, eq
LBB0_22:                                ;   in Loop: Header=BB0_23 Depth=1
	mov	x0, x19
	bl	_avio_wl32
	add	w21, w21, #1
	ldr	w8, [x20, #8]
	lsl	w8, w23, w8
	cmp	w21, w8
	b.ge	LBB0_13
LBB0_23:                                ; =>This Inner Loop Header: Depth=1
	cbnz	w21, LBB0_21
; %bb.24:                               ;   in Loop: Header=BB0_23 Depth=1
	ldr	w8, [x22]
	cmp	w24, w8
	b.ne	LBB0_21
; %bb.25:                               ;   in Loop: Header=BB0_23 Depth=1
	mov	w1, #16777215
	b	LBB0_22
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"BottomUp"

	.comm	_AV_PIX_FMT_NONE,4,2            ; @AV_PIX_FMT_NONE
	.comm	_AV_PIX_FMT_MONOWHITE,4,2       ; @AV_PIX_FMT_MONOWHITE
	.comm	_AV_PIX_FMT_PAL8,4,2            ; @AV_PIX_FMT_PAL8
	.comm	_AV_PIX_FMT_MONOBLACK,4,2       ; @AV_PIX_FMT_MONOBLACK
.subsections_via_symbols
