	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bcmfb_putc
_bcmfb_putc:                            ## @bcmfb_putc
	.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
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	(%rdi), %r14
	testq	%r14, %r14
	je	LBB0_18
## %bb.1:
	movq	_BCMFB_FONT_HEIGHT@GOTPCREL(%rip), %rax
	movl	(%rax), %r10d
	testl	%r10d, %r10d
	jle	LBB0_18
## %bb.2:
	movq	%r14, %r8
	shrq	$32, %r8
	movq	8(%rdi), %r11
	imull	%edx, %r10d
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	shrl	$4, %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	24(%rdi), %eax
	leal	7(%rax), %ebx
	testl	%eax, %eax
	cmovnsl	%eax, %ebx
	movslq	16(%rdi), %r15
	movl	%esi, %eax
	cltd
	idivl	%r14d
	movslq	%r10d, %rsi
	leaq	(%r11,%rsi,4), %r10
	sarl	$3, %ebx
	imull	%r8d, %eax
	cltq
	addq	%r15, %rax
	movslq	20(%rdi), %rsi
	imulq	%rax, %rsi
	leaq	(%r14,%rsi,4), %rax
	imull	%r11d, %edx
	addl	28(%rdi), %edx
	imull	%ebx, %edx
	movslq	%edx, %rdx
	leaq	(%rax,%rdx,4), %r12
	movslq	%ebx, %r15
	xorl	%r14d, %r14d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_3 Depth=1
	movslq	20(%rdi), %rax
	leaq	(%r12,%rax,4), %r12
	incq	%r14
	movq	_BCMFB_FONT_HEIGHT@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	cmpq	%rax, %r14
	jge	LBB0_18
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	movq	_bcmfb_palette@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	movl	$8, %esi
	xorl	%edx, %edx
	xorl	%r11d, %r11d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_4 Depth=2
	movl	%ebx, %eax
	shlq	$4, %rax
	movl	8(%r13,%rax), %ecx
	andl	$-8, %ecx
	shll	$8, %ecx
	movl	(%r13,%rax), %ebx
	movl	4(%r13,%rax), %eax
	shll	$3, %eax
	andl	$-32, %eax
	orl	%ecx, %eax
	sarl	$3, %ebx
	orl	%eax, %ebx
	movzbl	%bl, %eax
	movl	%eax, (%r12,%rdx,4)
	movzbl	%bh, %ebx
	leaq	1(%rdx), %rax
LBB0_15:                                ##   in Loop: Header=BB0_4 Depth=2
	movl	%ebx, (%r12,%rax,4)
LBB0_16:                                ##   in Loop: Header=BB0_4 Depth=2
	incq	%r11
	addq	%r15, %rdx
	decq	%rsi
	je	LBB0_17
LBB0_4:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r10,%r14,4), %eax
	leal	-1(%rsi), %ebx
	movzbl	%bl, %ebx
	btl	%ebx, %eax
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
	jae	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=2
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=2
	andl	$15, %ebx
	movl	24(%rdi), %eax
	cmpl	$16, %eax
	je	LBB0_14
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=2
	cmpl	$32, %eax
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=2
	cmpl	$24, %eax
	jne	LBB0_16
LBB0_9:                                 ##   in Loop: Header=BB0_4 Depth=2
	cmpl	$0, 32(%rdi)
	movl	%ebx, %r9d
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_4 Depth=2
	movq	%r9, %rbx
	shlq	$4, %rbx
	movl	(%r13,%rbx), %ecx
	movq	%r11, %rax
	imulq	%r15, %rax
	movl	%ecx, (%r12,%rdx,4)
	movl	4(%r13,%rbx), %ecx
	movl	%ecx, 4(%r12,%rdx,4)
	leaq	(%rbx,%r13), %r8
	addq	$8, %r8
	jmp	LBB0_12
LBB0_11:                                ##   in Loop: Header=BB0_4 Depth=2
	movq	%r9, %rax
	shlq	$4, %rax
	leaq	(%rax,%r13), %r8
	movl	8(%r13,%rax), %ecx
	movl	%ecx, (%r12,%rdx,4)
	movl	4(%r13,%rax), %eax
	movl	%eax, 4(%r12,%rdx,4)
	movq	%rdx, %rax
LBB0_12:                                ##   in Loop: Header=BB0_4 Depth=2
	movl	(%r8), %ecx
	movl	%ecx, 8(%r12,%rax,4)
	cmpl	$32, 24(%rdi)
	jne	LBB0_16
## %bb.13:                              ##   in Loop: Header=BB0_4 Depth=2
	shlq	$4, %r9
	movl	12(%r13,%r9), %ebx
	movq	%r11, %rax
	imulq	%r15, %rax
	addq	$3, %rax
	jmp	LBB0_15
LBB0_18:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BCMFB_FONT_HEIGHT,4,2          ## @BCMFB_FONT_HEIGHT
	.comm	_bcmfb_palette,8,3              ## @bcmfb_palette
	.no_dead_strip	_bcmfb_putc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bcmfb_putc
_bcmfb_putc:                            ; @bcmfb_putc
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	.cfi_offset w19, -8
	.cfi_offset w20, -16
	ldr	x12, [x0]
	cbz	x12, LBB0_15
; %bb.1:
Lloh0:
	adrp	x8, _BCMFB_FONT_HEIGHT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BCMFB_FONT_HEIGHT@GOTPAGEOFF]
	ldr	w10, [x8]
	cmp	w10, #1
	b.lt	LBB0_15
; %bb.2:
	mov	x9, #0
	lsr	x11, x12, #32
	mul	w10, w10, w2
	ldp	w13, w14, [x0, #24]
	add	w15, w13, #7
	cmp	w13, #0
	csel	w13, w15, w13, lt
	sdiv	w15, w1, w12
	ldp	w16, w17, [x0, #16]
	madd	w11, w15, w11, w16
	ldr	x16, [x0, #8]
	add	x10, x16, w10, sxtw #2
	mul	w17, w11, w17
	lsr	w11, w3, #4
	msub	w15, w15, w12, w1
	asr	w1, w13, #3
	add	x12, x12, w17, sxtw #2
	madd	w14, w15, w16, w14
	mul	w14, w14, w1
	add	x12, x12, w14, sxtw #2
	sbfx	x13, x13, #3, #29
Lloh2:
	adrp	x14, _bcmfb_palette@GOTPAGE
Lloh3:
	ldr	x14, [x14, _bcmfb_palette@GOTPAGEOFF]
	orr	x15, xzr, #0x3
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldrsw	x16, [x0, #20]
	add	x12, x12, x16, lsl #2
	add	x9, x9, #1
	ldrsw	x16, [x8]
	cmp	x9, x16
	b.ge	LBB0_15
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
	mov	x16, #0
	mov	x17, #0
	ldr	x1, [x14]
	mov	w2, #8
	b	LBB0_8
LBB0_5:                                 ;   in Loop: Header=BB0_8 Depth=2
	add	x4, x1, w4, uxtw #4
	ldp	w6, w5, [x4, #4]
	lsl	w5, w5, #8
	and	w5, w5, #0xfffff800
	ldr	w4, [x4]
	lsl	w6, w6, #3
	and	w6, w6, #0xffffffe0
	orr	w5, w6, w5
	orr	w4, w5, w4, asr #3
	and	w5, w4, #0xff
	str	w5, [x12, x16, lsl #2]
	ubfx	w4, w4, #8, #8
	add	x5, x16, #1
LBB0_6:                                 ;   in Loop: Header=BB0_8 Depth=2
	str	w4, [x12, x5, lsl #2]
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=2
	add	x17, x17, #1
	add	x16, x16, x13
	subs	x2, x2, #1
	b.eq	LBB0_3
LBB0_8:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	sub	w4, w2, #1
	ldr	w5, [x10, x9, lsl #2]
	lsr	w4, w5, w4
	tst	w4, #0x1
	csel	w4, w11, w3, eq
	and	w4, w4, #0xf
	ldr	w5, [x0, #24]
	cmp	w5, #16
	b.eq	LBB0_5
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=2
	cmp	w5, #32
	ccmp	w5, #24, #4, ne
	b.ne	LBB0_7
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=2
	ldr	w5, [x0, #32]
	cbz	w5, LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_8 Depth=2
	add	x5, x1, x4, lsl #4
	ldr	w7, [x5]
	mul	x6, x17, x13
	add	x19, x12, x16, lsl #2
	str	w7, [x19]
	ldr	w7, [x5, #4]
	str	w7, [x19, #4]
	add	x5, x5, #8
	b	LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_8 Depth=2
	add	x5, x1, x4, lsl #4
	ldr	w6, [x5, #8]
	add	x7, x12, x16, lsl #2
	str	w6, [x7]
	ldr	w6, [x5, #4]
	str	w6, [x7, #4]
	mov	x6, x16
LBB0_13:                                ;   in Loop: Header=BB0_8 Depth=2
	ldr	w5, [x5]
	add	x6, x12, x6, lsl #2
	str	w5, [x6, #8]
	ldr	w5, [x0, #24]
	cmp	w5, #32
	b.ne	LBB0_7
; %bb.14:                               ;   in Loop: Header=BB0_8 Depth=2
	add	x4, x1, x4, lsl #4
	ldr	w4, [x4, #12]
	madd	x5, x17, x13, x15
	b	LBB0_6
LBB0_15:
	mov	w0, #0
	ldp	x20, x19, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_BCMFB_FONT_HEIGHT,4,2          ; @BCMFB_FONT_HEIGHT
	.comm	_bcmfb_palette,8,3              ; @bcmfb_palette
	.no_dead_strip	_bcmfb_putc
.subsections_via_symbols
