	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bmp_read_os2_v2_info
_bmp_read_os2_v2_info:                  ## @bmp_read_os2_v2_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
	subq	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movl	%edi, %r12d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	%rsi, %rdi
	movl	%r12d, %esi
	callq	_gdGetIntLSB
	movl	$1, %r14d
	testl	%eax, %eax
	je	LBB0_19
## %bb.1:
	leaq	8(%rbx), %r13
	movq	%r13, %rdi
	movl	%r12d, %esi
	callq	_gdGetIntLSB
	testl	%eax, %eax
	je	LBB0_19
## %bb.2:
	leaq	16(%rbx), %r15
	movq	%r15, %rdi
	movl	%r12d, %esi
	callq	_gdGetWordLSB
	testl	%eax, %eax
	je	LBB0_19
## %bb.3:
	leaq	24(%rbx), %rdi
	movq	%rdi, -104(%rbp)                ## 8-byte Spill
	movl	%r12d, %esi
	callq	_gdGetWordLSB
	testl	%eax, %eax
	je	LBB0_19
## %bb.4:
	leaq	32(%rbx), %rdi
	movl	%r12d, %esi
	callq	_gdGetIntLSB
	testl	%eax, %eax
	je	LBB0_19
## %bb.5:
	leaq	40(%rbx), %rdi
	movl	%r12d, %esi
	callq	_gdGetIntLSB
	testl	%eax, %eax
	je	LBB0_19
## %bb.6:
	leaq	48(%rbx), %rdi
	movl	%r12d, %esi
	callq	_gdGetIntLSB
	testl	%eax, %eax
	je	LBB0_19
## %bb.7:
	leaq	56(%rbx), %rdi
	movl	%r12d, %esi
	callq	_gdGetIntLSB
	testl	%eax, %eax
	je	LBB0_19
## %bb.8:
	leaq	64(%rbx), %rdi
	movq	%rdi, -96(%rbp)                 ## 8-byte Spill
	movl	%r12d, %esi
	callq	_gdGetIntLSB
	testl	%eax, %eax
	je	LBB0_19
## %bb.9:
	leaq	72(%rbx), %rdi
	movq	%rdi, -88(%rbp)                 ## 8-byte Spill
	movl	%r12d, %esi
	callq	_gdGetIntLSB
	testl	%eax, %eax
	je	LBB0_19
## %bb.10:
	leaq	-80(%rbp), %rdi
	movl	$24, %esi
	movl	%r12d, %edx
	callq	_gdGetBuf
	testl	%eax, %eax
	je	LBB0_19
## %bb.11:
	movq	(%r13), %rax
	xorl	%ecx, %ecx
	testq	%rax, %rax
	jns	LBB0_13
## %bb.12:
	negq	%rax
	movq	%rax, (%r13)
	movl	$1, %ecx
LBB0_13:
	movl	%ecx, 80(%rbx)
	movq	_BMP_PALETTE_4@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 84(%rbx)
	cmpq	$0, (%rbx)
	jle	LBB0_19
## %bb.14:
	testq	%rax, %rax
	je	LBB0_19
## %bb.15:
	cmpq	$0, (%r15)
	jle	LBB0_19
## %bb.16:
	movq	-104(%rbp), %rax                ## 8-byte Reload
	cmpq	$0, (%rax)
	jle	LBB0_19
## %bb.17:
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	cmpq	$0, (%rax)
	js	LBB0_19
## %bb.18:
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %r14
	shrq	$63, %r14
LBB0_19:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_21
## %bb.20:
	movl	%r14d, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_21:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_BMP_PALETTE_4,4,2              ## @BMP_PALETTE_4
	.no_dead_strip	_bmp_read_os2_v2_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_v2_info
_bmp_read_os2_v2_info:                  ; @bmp_read_os2_v2_info
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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, x1
	mov	x23, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	mov	x0, x1
	mov	x1, x23
	bl	_gdGetIntLSB
	cbz	w0, LBB0_20
; %bb.1:
	add	x22, x19, #8
	mov	x0, x22
	mov	x1, x23
	bl	_gdGetIntLSB
	cbz	w0, LBB0_20
; %bb.2:
	add	x20, x19, #16
	mov	x0, x20
	mov	x1, x23
	bl	_gdGetWordLSB
	cbz	w0, LBB0_20
; %bb.3:
	add	x21, x19, #24
	mov	x0, x21
	mov	x1, x23
	bl	_gdGetWordLSB
	cbz	w0, LBB0_20
; %bb.4:
	add	x0, x19, #32
	mov	x1, x23
	bl	_gdGetIntLSB
	cbz	w0, LBB0_20
; %bb.5:
	add	x0, x19, #40
	mov	x1, x23
	bl	_gdGetIntLSB
	cbz	w0, LBB0_20
; %bb.6:
	add	x0, x19, #48
	mov	x1, x23
	bl	_gdGetIntLSB
	cbz	w0, LBB0_20
; %bb.7:
	add	x0, x19, #56
	mov	x1, x23
	bl	_gdGetIntLSB
	cbz	w0, LBB0_20
; %bb.8:
	add	x24, x19, #64
	mov	x0, x24
	mov	x1, x23
	bl	_gdGetIntLSB
	cbz	w0, LBB0_20
; %bb.9:
	add	x25, x19, #72
	mov	x0, x25
	mov	x1, x23
	bl	_gdGetIntLSB
	cbz	w0, LBB0_20
; %bb.10:
	mov	x0, sp
	mov	w1, #24
	mov	x2, x23
	bl	_gdGetBuf
	cbz	w0, LBB0_20
; %bb.11:
	ldr	x8, [x22]
	tbnz	x8, #63, LBB0_13
; %bb.12:
	mov	w9, #0
	b	LBB0_14
LBB0_13:
	neg	x8, x8
	str	x8, [x22]
	mov	w9, #1
LBB0_14:
Lloh3:
	adrp	x10, _BMP_PALETTE_4@GOTPAGE
Lloh4:
	ldr	x10, [x10, _BMP_PALETTE_4@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	stp	w9, w10, [x19, #80]
	ldr	x9, [x19]
	mov	w0, #1
	cmp	x9, #1
	b.lt	LBB0_21
; %bb.15:
	cbz	x8, LBB0_21
; %bb.16:
	ldr	x8, [x20]
	cmp	x8, #1
	b.lt	LBB0_20
; %bb.17:
	ldr	x8, [x21]
	cmp	x8, #1
	b.lt	LBB0_20
; %bb.18:
	ldr	x8, [x24]
	tbnz	x8, #63, LBB0_20
; %bb.19:
	ldr	x8, [x25]
	lsr	x0, x8, #63
	b	LBB0_21
LBB0_20:
	mov	w0, #1
LBB0_21:
	ldr	x8, [sp, #24]
Lloh6:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh7:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_23
; %bb.22:
                                        ; kill: def $w0 killed $w0 killed $x0
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_23:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_BMP_PALETTE_4,4,2              ; @BMP_PALETTE_4
	.no_dead_strip	_bmp_read_os2_v2_info
.subsections_via_symbols
