	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_readwbmp                       ## -- Begin function readwbmp
	.p2align	4, 0x90
_readwbmp:                              ## @readwbmp
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movq	%rsi, %r15
	movq	%rdi, %r12
	movl	$24, %edi
	callq	_gdMalloc
	movl	$-1, %r13d
	testq	%rax, %rax
	je	LBB0_50
## %bb.1:
	movq	%rax, %r14
	movq	%r15, %rdi
	callq	*%r12
	movl	%eax, (%r14)
	testl	%eax, %eax
	jne	LBB0_2
## %bb.3:
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_skipheader
	testq	%rax, %rax
	je	LBB0_4
LBB0_2:
	movq	%r14, %rdi
	callq	_gdFree
LBB0_50:
	movl	%r13d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_getmbi
	movl	%eax, 4(%r14)
	cmpl	$-1, %eax
	je	LBB0_2
## %bb.5:
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_getmbi
	movl	%eax, 8(%r14)
	cmpl	$-1, %eax
	je	LBB0_2
## %bb.6:
	movl	4(%r14), %esi
	movl	$4, %edi
	callq	_overflow2
	testq	%rax, %rax
	jne	LBB0_2
## %bb.7:
	movl	4(%r14), %edi
	movl	8(%r14), %esi
	shll	$2, %edi
	callq	_overflow2
	testq	%rax, %rax
	jne	LBB0_2
## %bb.8:
	movslq	4(%r14), %rax
	movslq	8(%r14), %rdi
	imulq	%rax, %rdi
	movl	$4, %esi
	xorl	%edx, %edx
	callq	_safe_emalloc
	movq	%rax, 16(%r14)
	testq	%rax, %rax
	je	LBB0_2
## %bb.9:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movl	8(%r14), %ecx
	testl	%ecx, %ecx
	jle	LBB0_49
## %bb.10:
	movl	4(%r14), %eax
	xorl	%ebx, %ebx
	movq	_WBMP_WHITE@GOTPCREL(%rip), %r13
	movq	_WBMP_BLACK@GOTPCREL(%rip), %rsi
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_11
LBB0_47:                                ##   in Loop: Header=BB0_11 Depth=1
	movl	8(%r14), %ecx
LBB0_48:                                ##   in Loop: Header=BB0_11 Depth=1
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	incl	%edx
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	cmpl	%ecx, %edx
	jge	LBB0_49
LBB0_11:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_13 Depth 2
	testl	%eax, %eax
	jle	LBB0_48
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	xorl	%r15d, %r15d
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_45:                                ##   in Loop: Header=BB0_13 Depth=2
	movl	(%rcx), %eax
	movq	16(%r14), %rcx
	movslq	%ebx, %rbx
	movl	%eax, (%rcx,%rbx,4)
	incl	%ebx
LBB0_46:                                ##   in Loop: Header=BB0_13 Depth=2
	movl	4(%r14), %eax
	incl	%r15d
	cmpl	%eax, %r15d
	jge	LBB0_47
LBB0_13:                                ##   Parent Loop BB0_11 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%rsi, %r12
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	*-64(%rbp)                      ## 8-byte Folded Reload
	cmpl	4(%r14), %r15d
	jge	LBB0_14
## %bb.15:                              ##   in Loop: Header=BB0_13 Depth=2
	movq	%r13, %rcx
	testb	$-128, %al
	movq	%r12, %rsi
	jne	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_13 Depth=2
	movq	%rsi, %rcx
LBB0_17:                                ##   in Loop: Header=BB0_13 Depth=2
	movl	(%rcx), %ecx
	movq	16(%r14), %rdx
	movslq	%ebx, %rbx
	movl	%ecx, (%rdx,%rbx,4)
	incl	%ebx
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_13 Depth=2
	movq	%r12, %rsi
LBB0_18:                                ##   in Loop: Header=BB0_13 Depth=2
	incl	%r15d
	cmpl	4(%r14), %r15d
	jge	LBB0_22
## %bb.19:                              ##   in Loop: Header=BB0_13 Depth=2
	movq	%r13, %rcx
	testb	$64, %al
	jne	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_13 Depth=2
	movq	%rsi, %rcx
LBB0_21:                                ##   in Loop: Header=BB0_13 Depth=2
	movl	(%rcx), %ecx
	movq	16(%r14), %rdx
	movslq	%ebx, %rbx
	movl	%ecx, (%rdx,%rbx,4)
	incl	%ebx
LBB0_22:                                ##   in Loop: Header=BB0_13 Depth=2
	incl	%r15d
	cmpl	4(%r14), %r15d
	jge	LBB0_26
## %bb.23:                              ##   in Loop: Header=BB0_13 Depth=2
	movq	%r13, %rcx
	testb	$32, %al
	jne	LBB0_25
## %bb.24:                              ##   in Loop: Header=BB0_13 Depth=2
	movq	%rsi, %rcx
LBB0_25:                                ##   in Loop: Header=BB0_13 Depth=2
	movl	(%rcx), %ecx
	movq	16(%r14), %rdx
	movslq	%ebx, %rbx
	movl	%ecx, (%rdx,%rbx,4)
	incl	%ebx
LBB0_26:                                ##   in Loop: Header=BB0_13 Depth=2
	incl	%r15d
	cmpl	4(%r14), %r15d
	jge	LBB0_30
## %bb.27:                              ##   in Loop: Header=BB0_13 Depth=2
	movq	%r13, %rcx
	testb	$16, %al
	jne	LBB0_29
## %bb.28:                              ##   in Loop: Header=BB0_13 Depth=2
	movq	%rsi, %rcx
LBB0_29:                                ##   in Loop: Header=BB0_13 Depth=2
	movl	(%rcx), %ecx
	movq	16(%r14), %rdx
	movslq	%ebx, %rbx
	movl	%ecx, (%rdx,%rbx,4)
	incl	%ebx
LBB0_30:                                ##   in Loop: Header=BB0_13 Depth=2
	incl	%r15d
	cmpl	4(%r14), %r15d
	jge	LBB0_34
## %bb.31:                              ##   in Loop: Header=BB0_13 Depth=2
	movq	%r13, %rcx
	testb	$8, %al
	jne	LBB0_33
## %bb.32:                              ##   in Loop: Header=BB0_13 Depth=2
	movq	%rsi, %rcx
LBB0_33:                                ##   in Loop: Header=BB0_13 Depth=2
	movl	(%rcx), %ecx
	movq	16(%r14), %rdx
	movslq	%ebx, %rbx
	movl	%ecx, (%rdx,%rbx,4)
	incl	%ebx
LBB0_34:                                ##   in Loop: Header=BB0_13 Depth=2
	incl	%r15d
	cmpl	4(%r14), %r15d
	jge	LBB0_38
## %bb.35:                              ##   in Loop: Header=BB0_13 Depth=2
	movq	%r13, %rcx
	testb	$4, %al
	jne	LBB0_37
## %bb.36:                              ##   in Loop: Header=BB0_13 Depth=2
	movq	%rsi, %rcx
LBB0_37:                                ##   in Loop: Header=BB0_13 Depth=2
	movl	(%rcx), %ecx
	movq	16(%r14), %rdx
	movslq	%ebx, %rbx
	movl	%ecx, (%rdx,%rbx,4)
	incl	%ebx
LBB0_38:                                ##   in Loop: Header=BB0_13 Depth=2
	incl	%r15d
	cmpl	4(%r14), %r15d
	jge	LBB0_42
## %bb.39:                              ##   in Loop: Header=BB0_13 Depth=2
	movq	%r13, %rcx
	testb	$2, %al
	jne	LBB0_41
## %bb.40:                              ##   in Loop: Header=BB0_13 Depth=2
	movq	%rsi, %rcx
LBB0_41:                                ##   in Loop: Header=BB0_13 Depth=2
	movl	(%rcx), %ecx
	movq	16(%r14), %rdx
	movslq	%ebx, %rbx
	movl	%ecx, (%rdx,%rbx,4)
	incl	%ebx
LBB0_42:                                ##   in Loop: Header=BB0_13 Depth=2
	incl	%r15d
	cmpl	4(%r14), %r15d
	jge	LBB0_46
## %bb.43:                              ##   in Loop: Header=BB0_13 Depth=2
	movq	%r13, %rcx
	testb	$1, %al
	jne	LBB0_45
## %bb.44:                              ##   in Loop: Header=BB0_13 Depth=2
	movq	%rsi, %rcx
	jmp	LBB0_45
LBB0_49:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%r14, (%rax)
	xorl	%r13d, %r13d
	jmp	LBB0_50
	.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	_readwbmp                       ; -- Begin function readwbmp
	.p2align	2
_readwbmp:                              ; @readwbmp
	.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	x20, x2
	mov	x21, x1
	mov	x22, x0
	mov	w0, #24
	bl	_gdMalloc
	cbz	x0, LBB0_4
; %bb.1:
	mov	x19, x0
	mov	x0, x21
	blr	x22
	str	w0, [x19]
	cbnz	w0, LBB0_3
; %bb.2:
	mov	x0, x22
	mov	x1, x21
	bl	_skipheader
	cbz	x0, LBB0_6
LBB0_3:
	mov	x0, x19
	bl	_gdFree
LBB0_4:
	mov	w0, #-1
LBB0_5:
	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_6:
	mov	x0, x22
	mov	x1, x21
	bl	_getmbi
	str	w0, [x19, #4]
	cmn	w0, #1
	b.eq	LBB0_3
; %bb.7:
	mov	x0, x22
	mov	x1, x21
	bl	_getmbi
	str	w0, [x19, #8]
	cmn	w0, #1
	b.eq	LBB0_3
; %bb.8:
	ldr	w1, [x19, #4]
	mov	w0, #4
	bl	_overflow2
	cbnz	x0, LBB0_3
; %bb.9:
	ldp	w8, w1, [x19, #4]
	lsl	w0, w8, #2
	bl	_overflow2
	cbnz	x0, LBB0_3
; %bb.10:
	ldpsw	x8, x9, [x19, #4]
	mul	x0, x9, x8
	mov	w1, #4
	mov	w2, #0
	bl	_safe_emalloc
	str	x0, [x19, #16]
	cbz	x0, LBB0_3
; %bb.11:
	ldr	w9, [x19, #8]
	cmp	w9, #1
	b.lt	LBB0_34
; %bb.12:
	mov	w23, #0
	mov	w24, #0
	ldr	w8, [x19, #4]
Lloh0:
	adrp	x25, _WBMP_BLACK@GOTPAGE
Lloh1:
	ldr	x25, [x25, _WBMP_BLACK@GOTPAGEOFF]
Lloh2:
	adrp	x26, _WBMP_WHITE@GOTPAGE
Lloh3:
	ldr	x26, [x26, _WBMP_WHITE@GOTPAGEOFF]
	b	LBB0_15
LBB0_13:                                ;   in Loop: Header=BB0_15 Depth=1
	ldr	w9, [x19, #8]
LBB0_14:                                ;   in Loop: Header=BB0_15 Depth=1
	add	w24, w24, #1
	cmp	w24, w9
	b.ge	LBB0_34
LBB0_15:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_18 Depth 2
	cmp	w8, #1
	b.lt	LBB0_14
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	mov	w27, #0
	b	LBB0_18
LBB0_17:                                ;   in Loop: Header=BB0_18 Depth=2
	add	w27, w9, #1
	cmp	w27, w8
	b.ge	LBB0_13
LBB0_18:                                ;   Parent Loop BB0_15 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x21
	blr	x22
	ldr	w8, [x19, #4]
	cmp	w27, w8
	b.ge	LBB0_20
; %bb.19:                               ;   in Loop: Header=BB0_18 Depth=2
	tst	w0, #0x80
	csel	x8, x25, x26, eq
	ldr	w8, [x8]
	ldr	x9, [x19, #16]
	str	w8, [x9, w23, sxtw #2]
	add	w23, w23, #1
	ldr	w8, [x19, #4]
LBB0_20:                                ;   in Loop: Header=BB0_18 Depth=2
	add	w9, w27, #1
	cmp	w9, w8
	b.ge	LBB0_22
; %bb.21:                               ;   in Loop: Header=BB0_18 Depth=2
	tst	w0, #0x40
	csel	x8, x25, x26, eq
	ldr	w8, [x8]
	ldr	x10, [x19, #16]
	str	w8, [x10, w23, sxtw #2]
	add	w23, w23, #1
	ldr	w8, [x19, #4]
LBB0_22:                                ;   in Loop: Header=BB0_18 Depth=2
	add	w9, w9, #1
	cmp	w9, w8
	b.ge	LBB0_24
; %bb.23:                               ;   in Loop: Header=BB0_18 Depth=2
	tst	w0, #0x20
	csel	x8, x25, x26, eq
	ldr	w8, [x8]
	ldr	x10, [x19, #16]
	str	w8, [x10, w23, sxtw #2]
	add	w23, w23, #1
	ldr	w8, [x19, #4]
LBB0_24:                                ;   in Loop: Header=BB0_18 Depth=2
	add	w9, w9, #1
	cmp	w9, w8
	b.ge	LBB0_26
; %bb.25:                               ;   in Loop: Header=BB0_18 Depth=2
	tst	w0, #0x10
	csel	x8, x25, x26, eq
	ldr	w8, [x8]
	ldr	x10, [x19, #16]
	str	w8, [x10, w23, sxtw #2]
	add	w23, w23, #1
	ldr	w8, [x19, #4]
LBB0_26:                                ;   in Loop: Header=BB0_18 Depth=2
	add	w9, w9, #1
	cmp	w9, w8
	b.ge	LBB0_28
; %bb.27:                               ;   in Loop: Header=BB0_18 Depth=2
	tst	w0, #0x8
	csel	x8, x25, x26, eq
	ldr	w8, [x8]
	ldr	x10, [x19, #16]
	str	w8, [x10, w23, sxtw #2]
	add	w23, w23, #1
	ldr	w8, [x19, #4]
LBB0_28:                                ;   in Loop: Header=BB0_18 Depth=2
	add	w9, w9, #1
	cmp	w9, w8
	b.ge	LBB0_30
; %bb.29:                               ;   in Loop: Header=BB0_18 Depth=2
	tst	w0, #0x4
	csel	x8, x25, x26, eq
	ldr	w8, [x8]
	ldr	x10, [x19, #16]
	str	w8, [x10, w23, sxtw #2]
	add	w23, w23, #1
	ldr	w8, [x19, #4]
LBB0_30:                                ;   in Loop: Header=BB0_18 Depth=2
	add	w9, w9, #1
	cmp	w9, w8
	b.ge	LBB0_32
; %bb.31:                               ;   in Loop: Header=BB0_18 Depth=2
	tst	w0, #0x2
	csel	x8, x25, x26, eq
	ldr	w8, [x8]
	ldr	x10, [x19, #16]
	str	w8, [x10, w23, sxtw #2]
	add	w23, w23, #1
	ldr	w8, [x19, #4]
LBB0_32:                                ;   in Loop: Header=BB0_18 Depth=2
	add	w9, w9, #1
	cmp	w9, w8
	b.ge	LBB0_17
; %bb.33:                               ;   in Loop: Header=BB0_18 Depth=2
	tst	w0, #0x1
	csel	x8, x25, x26, eq
	ldr	w8, [x8]
	ldr	x10, [x19, #16]
	str	w8, [x10, w23, sxtw #2]
	add	w23, w23, #1
	ldr	w8, [x19, #4]
	b	LBB0_17
LBB0_34:
	mov	w0, #0
	str	x19, [x20]
	b	LBB0_5
	.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
