	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bmp_to_utf8
_bmp_to_utf8:                           ## @bmp_to_utf8
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	testl	%edx, %edx
	je	LBB0_1
## %bb.3:
	movl	$-1, %eax
	cmpl	$2, %edx
	jl	LBB0_2
## %bb.4:
	movzbl	(%rsi), %ecx
	movq	%rcx, %r9
	shlq	$8, %r9
	movzbl	1(%rsi), %r8d
	orq	%r9, %r8
	andl	$-8, %ecx
	cmpl	$216, %ecx
	jne	LBB0_8
## %bb.5:
	cmpl	$4, %edx
	jb	LBB0_2
## %bb.6:
	movzwl	2(%rsi), %ecx
	rolw	$8, %cx
	movzwl	%cx, %esi
	leal	-57344(%rsi), %ecx
	cmpl	$-1024, %ecx                    ## imm = 0xFC00
	jb	LBB0_2
## %bb.7:
	shlq	$10, %r8
	addq	$-56623104, %r8                 ## imm = 0xFCA00000
	addl	$-56320, %esi                   ## imm = 0xFFFF2400
	orq	%r8, %rsi
	addq	$65536, %rsi                    ## imm = 0x10000
	movq	%rsi, %r8
LBB0_8:
	cmpl	$4, %edx
	movl	$4, %esi
	cmovll	%edx, %esi
	movq	%r8, %rdx
	popq	%rbp
	jmp	_UTF8_putc                      ## TAILCALL
LBB0_1:
	xorl	%eax, %eax
LBB0_2:
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_bmp_to_utf8
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bmp_to_utf8
_bmp_to_utf8:                           ; @bmp_to_utf8
	.cfi_startproc
; %bb.0:
	cbz	w2, LBB0_3
; %bb.1:
	cmp	w2, #2
	b.ge	LBB0_4
; %bb.2:
	mov	w0, #-1
	ret
LBB0_3:
	mov	w0, #0
	ret
LBB0_4:
	ldrb	w9, [x1]
	ldrb	w8, [x1, #1]
	bfi	x8, x9, #8, #8
	and	x9, x9, #0xf8
	cmp	x9, #216
	b.ne	LBB0_10
; %bb.5:
	cmp	w2, #4
	b.hs	LBB0_7
; %bb.6:
	mov	w0, #-1
	ret
LBB0_7:
	ldrh	w9, [x1, #2]
	rev16	w9, w9
	sub	w10, w9, #14, lsl #12           ; =57344
	cmn	w10, #1024
	b.hs	LBB0_9
; %bb.8:
	mov	w0, #-1
	ret
LBB0_9:
	mov	x10, #-65536
	movk	x10, #64672, lsl #16
	add	x8, x10, x8, lsl #10
	mov	w10, #-56320
	add	w9, w9, w10
	orr	x8, x8, x9
	add	x8, x8, #16, lsl #12            ; =65536
LBB0_10:
	mov	w9, #4
	cmp	w2, #4
	csel	w1, w2, w9, lt
	mov	x2, x8
	b	_UTF8_putc
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_bmp_to_utf8
.subsections_via_symbols
