	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fill_image
_fill_image:                            ## @fill_image
	.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
	movl	%ecx, %r14d
	movq	%rsi, %rbx
	movq	(%rdi), %rax
	movq	(%rax), %r15
	movl	8(%rdx), %eax
	movl	%eax, 12(%rsi)
	movq	(%rdx), %rax
	movq	%rax, 4(%rsi)
	movl	%ecx, (%rsi)
	movl	8(%rdx), %edi
	callq	_get_format
	movq	%rax, 24(%rbx)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	cmpq	$0, (%rax)
	je	LBB0_4
## %bb.3:
	movl	8(%rbx), %eax
	jmp	LBB0_5
LBB0_1:
	movq	(%r15), %rax
	movl	(%rax), %edi
	movq	_IMAGE_CONVERT_OUT@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	leaq	L_.str.1(%rip), %rax
	leaq	L_.str.2(%rip), %rdx
	cmoveq	%rax, %rdx
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_6
LBB0_4:
	movl	4(%rbx), %eax
LBB0_5:
	movl	%eax, 16(%rbx)
	xorl	%eax, %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pixelformat not supported for %s\n"

	.comm	_IMAGE_CONVERT_OUT,4,2          ## @IMAGE_CONVERT_OUT
L_.str.1:                               ## @.str.1
	.asciz	"Output"

L_.str.2:                               ## @.str.2
	.asciz	"Input"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_fill_image
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fill_image
_fill_image:                            ; @fill_image
	.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, x3
	mov	x20, x1
	ldr	x8, [x0]
	ldr	x21, [x8]
	ldr	x8, [x2]
	ldr	w9, [x2, #8]
	str	w9, [x1, #12]
	stur	x8, [x1, #4]
	str	w3, [x1]
	ldr	w0, [x2, #8]
	bl	_get_format
	str	x0, [x20, #24]
	cbz	x0, LBB0_3
; %bb.1:
	ldr	x8, [x0]
	cbz	x8, LBB0_4
; %bb.2:
	mov	w0, #0
	ldr	w8, [x20, #8]
	b	LBB0_5
LBB0_3:
	ldr	x8, [x21]
	ldr	w0, [x8]
Lloh0:
	adrp	x8, _IMAGE_CONVERT_OUT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IMAGE_CONVERT_OUT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, l_.str.2@PAGE
Lloh4:
	add	x9, x9, l_.str.2@PAGEOFF
Lloh5:
	adrp	x10, l_.str.1@PAGE
Lloh6:
	add	x10, x10, l_.str.1@PAGEOFF
	cmp	w8, w19
	csel	x2, x10, x9, eq
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_4:
	mov	w0, #0
	ldr	w8, [x20, #4]
LBB0_5:
	str	w8, [x20, #16]
LBB0_6:
	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	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pixelformat not supported for %s\n"

	.comm	_IMAGE_CONVERT_OUT,4,2          ; @IMAGE_CONVERT_OUT
l_.str.1:                               ; @.str.1
	.asciz	"Output"

l_.str.2:                               ; @.str.2
	.asciz	"Input"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_fill_image
.subsections_via_symbols
