	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bmp_read_os2_v1_info
_bmp_read_os2_v1_info:                  ## @bmp_read_os2_v1_info
	.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	%rsi, %r13
	movl	%edi, %ebx
	movq	%rsi, %rdi
	movl	%ebx, %esi
	callq	_gdGetWordLSB
	movl	$1, %r14d
	testl	%eax, %eax
	je	LBB0_9
## %bb.1:
	leaq	8(%r13), %r15
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_gdGetWordLSB
	testl	%eax, %eax
	je	LBB0_9
## %bb.2:
	leaq	16(%r13), %r12
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_gdGetWordLSB
	testl	%eax, %eax
	je	LBB0_9
## %bb.3:
	leaq	18(%r13), %rdi
	movl	%ebx, %esi
	callq	_gdGetWordLSB
	testl	%eax, %eax
	je	LBB0_9
## %bb.4:
	movq	$0, 32(%r13)
	movzwl	18(%r13), %ecx
	movl	$1, %eax
	shll	%cl, %eax
	movl	$1, %r14d
	movl	%eax, 20(%r13)
	movq	_BMP_PALETTE_3@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%r13)
	cmpq	$0, (%r13)
	jle	LBB0_9
## %bb.5:
	cmpq	$0, (%r15)
	jle	LBB0_9
## %bb.6:
	cmpw	$0, (%r12)
	jle	LBB0_9
## %bb.7:
	testw	%cx, %cx
	jle	LBB0_9
## %bb.8:
	xorl	%r14d, %r14d
	cmpw	$31, %cx
	sete	%r14b
LBB0_9:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BMP_PALETTE_3,4,2              ## @BMP_PALETTE_3
	.no_dead_strip	_bmp_read_os2_v1_info
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bmp_read_os2_v1_info
_bmp_read_os2_v1_info:                  ; @bmp_read_os2_v1_info
	.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, x1
	mov	x22, x0
	mov	x0, x1
	mov	x1, x22
	bl	_gdGetWordLSB
	cbz	w0, LBB0_7
; %bb.1:
	add	x20, x19, #8
	mov	x0, x20
	mov	x1, x22
	bl	_gdGetWordLSB
	cbz	w0, LBB0_7
; %bb.2:
	add	x21, x19, #16
	mov	x0, x21
	mov	x1, x22
	bl	_gdGetWordLSB
	cbz	w0, LBB0_7
; %bb.3:
	add	x0, x19, #18
	mov	x1, x22
	bl	_gdGetWordLSB
	mov	x8, x0
	mov	w0, #1
	cbz	w8, LBB0_8
; %bb.4:
	str	xzr, [x19, #32]
	ldrh	w8, [x19, #18]
Lloh0:
	adrp	x9, _BMP_PALETTE_3@GOTPAGE
Lloh1:
	ldr	x9, [x9, _BMP_PALETTE_3@GOTPAGEOFF]
	lsl	w10, w0, w8
Lloh2:
	ldr	w9, [x9]
	stp	w10, w9, [x19, #20]
	ldr	x9, [x19]
	cmp	x9, #1
	b.lt	LBB0_8
; %bb.5:
	ldr	x9, [x20]
	cmp	x9, #1
	b.lt	LBB0_7
; %bb.6:
	sxth	w8, w8
	ldrsh	w9, [x21]
	mov	w10, #1
	cmp	w8, #31
	cset	w11, eq
	cmp	w8, #1
	csel	w8, w10, w11, lt
	cmp	w9, #1
	csel	w0, w10, w8, lt
	b	LBB0_8
LBB0_7:
	mov	w0, #1
LBB0_8:
	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	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_BMP_PALETTE_3,4,2              ; @BMP_PALETTE_3
	.no_dead_strip	_bmp_read_os2_v1_info
.subsections_via_symbols
