	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_writewbmp                      ## -- Begin function writewbmp
	.p2align	4, 0x90
_writewbmp:                             ## @writewbmp
	.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	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %rbx
	xorl	%r12d, %r12d
	xorl	%edi, %edi
	movq	%rdx, %rsi
	callq	*%r15
	xorl	%edi, %edi
	movq	%r14, %rsi
	callq	*%r15
	movl	(%rbx), %edi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_putmbi
	movl	4(%rbx), %edi
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movq	%r15, %rsi
	movq	%r14, %r15
	movq	%r14, %rdx
	callq	_putmbi
	cmpl	$0, 4(%rbx)
	jle	LBB0_12
## %bb.1:
	movq	_WBMP_BLACK@GOTPCREL(%rip), %r13
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	incl	%r12d
	cmpl	4(%rbx), %r12d
	jge	LBB0_12
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	movl	(%rbx), %eax
	testl	%eax, %eax
	jle	LBB0_11
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$8, %ecx
	xorl	%r14d, %r14d
	xorl	%edi, %edi
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=2
	movl	(%rdx), %edx
	decl	%ecx
	shll	%cl, %edx
	orl	%edx, %edi
	testl	%ecx, %ecx
	je	LBB0_7
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=2
	incq	%r14
	cmpl	%eax, %r14d
	jge	LBB0_9
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	8(%rbx), %rdx
	movl	%r12d, %esi
	imull	%eax, %esi
	movslq	%esi, %rsi
	addq	%r14, %rsi
	cmpl	$1, (%rdx,%rsi,4)
	movq	%r13, %rdx
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=2
	movq	_WBMP_WHITE@GOTPCREL(%rip), %rdx
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=2
	movq	%r15, %rsi
	callq	*-48(%rbp)                      ## 8-byte Folded Reload
	movl	(%rbx), %eax
	xorl	%edi, %edi
	movl	$8, %ecx
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$8, %ecx
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %rsi
	callq	*-48(%rbp)                      ## 8-byte Folded Reload
	jmp	LBB0_11
LBB0_12:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WBMP_WHITE,4,2                 ## @WBMP_WHITE
	.comm	_WBMP_BLACK,4,2                 ## @WBMP_BLACK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_writewbmp                      ; -- Begin function writewbmp
	.p2align	2
_writewbmp:                             ; @writewbmp
	.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, x2
	mov	x20, x1
	mov	x21, x0
	mov	w0, #0
	mov	x1, x2
	blr	x20
	mov	w0, #0
	mov	x1, x19
	blr	x20
	ldr	w0, [x21]
	mov	x1, x20
	mov	x2, x19
	bl	_putmbi
	ldr	w0, [x21, #4]
	mov	x1, x20
	mov	x2, x19
	bl	_putmbi
	ldr	w8, [x21, #4]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.1:
	mov	w22, #0
Lloh0:
	adrp	x23, _WBMP_WHITE@GOTPAGE
Lloh1:
	ldr	x23, [x23, _WBMP_WHITE@GOTPAGEOFF]
Lloh2:
	adrp	x24, _WBMP_BLACK@GOTPAGE
Lloh3:
	ldr	x24, [x24, _WBMP_BLACK@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	w22, w22, #1
	ldr	w8, [x21, #4]
	cmp	w22, w8
	b.ge	LBB0_10
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x25, #0
	mov	w0, #0
	mov	w9, #8
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=2
	add	x25, x25, #1
	cmp	w25, w8
	b.ge	LBB0_8
LBB0_6:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x10, [x21, #8]
	mul	w11, w22, w8
	add	x11, x25, w11, sxtw
	ldr	w10, [x10, x11, lsl #2]
	cmp	w10, #1
	csel	x10, x23, x24, eq
	ldr	w10, [x10]
	subs	w9, w9, #1
	lsl	w10, w10, w9
	orr	w0, w10, w0
	b.ne	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	mov	x1, x19
	blr	x20
	mov	w0, #0
	ldr	w8, [x21]
	mov	w9, #8
	b	LBB0_5
LBB0_8:                                 ;   in Loop: Header=BB0_3 Depth=1
	cmp	w9, #8
	b.eq	LBB0_2
; %bb.9:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x1, x19
	blr	x20
	b	LBB0_2
LBB0_10:
	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 AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_WBMP_WHITE,4,2                 ; @WBMP_WHITE
	.comm	_WBMP_BLACK,4,2                 ; @WBMP_BLACK
.subsections_via_symbols
