	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function convert_dib_to_bmp
_convert_dib_to_bmp:                    ## @convert_dib_to_bmp
	.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, %r12
	movl	(%rsi), %esi
	movq	_FALSE@GOTPCREL(%rip), %rax
	cmpl	$4, %esi
	jl	LBB0_7
## %bb.1:
	movq	%rdi, %r14
	movq	(%rdi), %rcx
	movl	(%rcx), %edx
	cmpl	%edx, %esi
	jl	LBB0_7
## %bb.2:
	leal	-4(%rdx), %esi
	cmpl	$60, %esi
	ja	LBB0_7
## %bb.3:
	movabsq	$1152921504607895553, %rdi      ## imm = 0x1000000000100001
	btq	%rsi, %rdi
	jae	LBB0_7
## %bb.4:
	leal	(%rdx,%rdx,4), %r13d
	addl	$32, %r13d
	cmpl	$24, 8(%rcx)
	jne	LBB0_6
## %bb.5:
	movq	16(%rcx), %rax
	movq	_BI_BITFIELDS@GOTPCREL(%rip), %rcx
	leal	12(%r13), %edx
	cmpq	(%rcx), %rax
	cmovnel	%r13d, %edx
	movl	%edx, %r13d
LBB0_6:
	leaq	L_.str(%rip), %rdi
	callq	_TRACE
	movl	(%r12), %r15d
	addl	$32, %r15d
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movl	%eax, %edi
	xorl	%esi, %esi
	movl	%r15d, %edx
	callq	_HeapAlloc
	movq	%rax, %rbx
	leaq	128(%rax), %rdi
	movq	(%r14), %rsi
	movl	(%r12), %edx
	callq	_CopyMemory
	movl	$19778, (%rbx)                  ## imm = 0x4D42
	movl	%r15d, 4(%rbx)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rbx)
	movl	%r13d, 8(%rbx)
	movq	%rbx, (%r14)
	movl	%r15d, (%r12)
	movq	_TRUE@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FALSE,4,2                      ## @FALSE
	.comm	_BI_BITFIELDS,8,3               ## @BI_BITFIELDS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Converting DIB file to BMP\n"

	.comm	_TRUE,4,2                       ## @TRUE
	.no_dead_strip	_convert_dib_to_bmp
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function convert_dib_to_bmp
_convert_dib_to_bmp:                    ; @convert_dib_to_bmp
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	ldr	w10, [x1]
	cmp	w10, #4
	b.lt	LBB0_2
; %bb.1:
	mov	x20, x0
	ldr	x8, [x0]
	ldr	w9, [x8]
	cmp	w10, w9
	b.ge	LBB0_4
LBB0_2:
Lloh0:
	adrp	x8, _FALSE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
LBB0_3:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_4:
	sub	w10, w9, #4
	cmp	w10, #60
	mov	w11, #1
	lsl	x10, x11, x10
	mov	x11, #1
	movk	x11, #16, lsl #16
	movk	x11, #4096, lsl #48
	and	x10, x10, x11
	ccmp	x10, #0, #4, ls
	b.eq	LBB0_2
; %bb.5:
	mov	x19, x1
	add	w9, w9, w9, lsl #2
	add	w23, w9, #32
	ldr	w9, [x8, #8]
	cmp	w9, #24
	b.ne	LBB0_7
; %bb.6:
	ldr	x8, [x8, #16]
Lloh2:
	adrp	x9, _BI_BITFIELDS@GOTPAGE
Lloh3:
	ldr	x9, [x9, _BI_BITFIELDS@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	add	w10, w23, #12
	cmp	x8, x9
	csel	w23, w10, w23, eq
LBB0_7:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_TRACE
	ldr	w8, [x19]
	add	w21, w8, #32
	bl	_GetProcessHeap
	mov	w1, #0
	mov	x2, x21
	bl	_HeapAlloc
	mov	x22, x0
	add	x0, x0, #128
	ldr	x1, [x20]
	ldr	w2, [x19]
	bl	_CopyMemory
	mov	w8, #19778
	stp	w8, w21, [x22]
	stp	xzr, xzr, [x22, #16]
	str	w23, [x22, #8]
	str	x22, [x20]
	str	w21, [x19]
Lloh7:
	adrp	x8, _TRUE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
	b	LBB0_3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_FALSE,4,2                      ; @FALSE
	.comm	_BI_BITFIELDS,8,3               ; @BI_BITFIELDS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Converting DIB file to BMP\n"

	.comm	_TRUE,4,2                       ; @TRUE
	.no_dead_strip	_convert_dib_to_bmp
.subsections_via_symbols
