	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_DibLoadImage                   ## -- Begin function DibLoadImage
	.p2align	4, 0x90
_DibLoadImage:                          ## @DibLoadImage
	.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	%rbx
	subq	$56, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	leaq	-32(%rbp), %rsi
	callq	_GdipCreateBitmapFromFile
	movq	_Ok@GOTPCREL(%rip), %r15
	cmpq	(%r15), %rax
	jne	LBB0_1
## %bb.2:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movl	%eax, %edi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_HeapAlloc
	testq	%rax, %rax
	je	LBB0_14
## %bb.3:
	movq	%rax, %r14
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movl	%eax, %edi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_HeapAlloc
	movq	%rax, 8(%r14)
	testq	%rax, %rax
	je	LBB0_4
## %bb.6:
	movq	-32(%rbp), %rdi
	movq	%r14, %rsi
	callq	_GdipGetImageWidth
	cmpq	(%r15), %rax
	jne	LBB0_8
## %bb.7:
	movq	-32(%rbp), %rdi
	movq	%r14, %rsi
	addq	$4, %rsi
	callq	_GdipGetImageHeight
	cmpq	(%r15), %rax
	jne	LBB0_8
## %bb.10:
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movl	(%r14), %edx
	imull	4(%r14), %edx
	shll	$2, %edx
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_HeapAlloc
	movq	%rax, 16(%r14)
	testq	%rax, %rax
	je	LBB0_8
## %bb.11:
	movq	8(%r14), %rdi
	movl	$4, %esi
	callq	_ZeroMemory
	movq	8(%r14), %rax
	movl	$4, 24(%rax)
	movl	(%r14), %ecx
	movl	%ecx, 28(%rax)
	movl	4(%r14), %edx
	movl	%edx, %esi
	negl	%esi
	movl	%esi, 48(%rax)
	movabsq	$137438953473, %rsi             ## imm = 0x2000000001
	movq	%rsi, 32(%rax)
	movq	_BI_RGB@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	movl	%esi, 44(%rax)
	leal	(,%rcx,4), %esi
	movl	%esi, %edi
	imull	%edx, %edi
	movl	%edi, 40(%rax)
	movl	%ecx, -72(%rbp)
	movl	%edx, -68(%rbp)
	movl	%esi, -64(%rbp)
	movq	_PixelFormat32bppPARGB@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%ecx, -40(%rbp)
	movq	16(%r14), %rax
	movq	%rax, -48(%rbp)
	movq	$0, -56(%rbp)
	movq	-32(%rbp), %rdi
	movq	_ImageLockModeRead@GOTPCREL(%rip), %rax
	movq	_ImageLockModeUserInputBuf@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rax), %edx
	leaq	-72(%rbp), %r8
	xorl	%esi, %esi
	callq	_GdipBitmapLockBits
	cmpq	(%r15), %rax
	jne	LBB0_12
## %bb.13:
	movq	-32(%rbp), %rdi
	leaq	-72(%rbp), %rsi
	callq	_GdipBitmapUnlockBits
	movq	%r14, %rbx
	jmp	LBB0_14
LBB0_1:
	xorl	%ebx, %ebx
	jmp	LBB0_15
LBB0_8:
	xorl	%ebx, %ebx
LBB0_9:
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movq	8(%r14), %rdx
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_HeapFree
	jmp	LBB0_5
LBB0_4:
	xorl	%ebx, %ebx
LBB0_5:
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movl	%eax, %edi
	xorl	%esi, %esi
	movq	%r14, %rdx
	callq	_HeapFree
LBB0_14:
	movq	-32(%rbp), %rdi
	callq	_GdipDisposeImage
LBB0_15:
	movq	%rbx, %rax
	addq	$56, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movq	16(%r14), %rdx
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_HeapFree
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_Ok,8,3                         ## @Ok
	.comm	_BI_RGB,4,2                     ## @BI_RGB
	.comm	_PixelFormat32bppPARGB,4,2      ## @PixelFormat32bppPARGB
	.comm	_ImageLockModeRead,4,2          ## @ImageLockModeRead
	.comm	_ImageLockModeUserInputBuf,4,2  ## @ImageLockModeUserInputBuf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function DibLoadImage
lCPI0_0:
	.long	1                               ; 0x1
	.long	32                              ; 0x20
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_DibLoadImage
	.p2align	2
_DibLoadImage:                          ; @DibLoadImage
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	add	x1, sp, #40
	bl	_GdipCreateBitmapFromFile
Lloh0:
	adrp	x20, _Ok@GOTPAGE
Lloh1:
	ldr	x20, [x20, _Ok@GOTPAGEOFF]
	ldr	x8, [x20]
	cmp	x0, x8
	b.ne	LBB0_8
; %bb.1:
	bl	_GetProcessHeap
	mov	w1, #0
	mov	w2, #4
	bl	_HeapAlloc
	mov	x19, x0
	cbz	x0, LBB0_12
; %bb.2:
	bl	_GetProcessHeap
	mov	w1, #0
	mov	w2, #4
	bl	_HeapAlloc
	str	x0, [x19, #8]
	cbz	x0, LBB0_11
; %bb.3:
	ldr	x0, [sp, #40]
	mov	x1, x19
	bl	_GdipGetImageWidth
	ldr	x8, [x20]
	cmp	x0, x8
	b.ne	LBB0_10
; %bb.4:
	ldr	x0, [sp, #40]
	add	x1, x19, #4
	bl	_GdipGetImageHeight
	ldr	x8, [x20]
	cmp	x0, x8
	b.ne	LBB0_10
; %bb.5:
	bl	_GetProcessHeap
	ldp	w8, w9, [x19]
	mul	w8, w8, w9
	lsl	w2, w8, #2
	mov	w1, #0
	bl	_HeapAlloc
	str	x0, [x19, #16]
	cbz	x0, LBB0_10
; %bb.6:
	ldr	x0, [x19, #8]
	mov	w21, #4
	mov	w1, #4
	bl	_ZeroMemory
	ldr	x8, [x19, #8]
	str	w21, [x8, #24]
	ldr	w9, [x19]
	str	w9, [x8, #28]
	ldr	w10, [x19, #4]
	neg	w11, w10
	str	w11, [x8, #48]
Lloh2:
	adrp	x11, lCPI0_0@PAGE
Lloh3:
	ldr	d0, [x11, lCPI0_0@PAGEOFF]
Lloh4:
	adrp	x11, _BI_RGB@GOTPAGE
Lloh5:
	ldr	x11, [x11, _BI_RGB@GOTPAGEOFF]
	str	d0, [x8, #32]
Lloh6:
	ldr	w11, [x11]
	lsl	w12, w9, #2
	mul	w13, w12, w10
	stp	w13, w11, [x8, #40]
	stp	w9, w10, [sp]
	str	w12, [sp, #8]
Lloh7:
	adrp	x8, _PixelFormat32bppPARGB@GOTPAGE
Lloh8:
	ldr	x8, [x8, _PixelFormat32bppPARGB@GOTPAGEOFF]
Lloh9:
	ldr	w3, [x8]
	str	w3, [sp, #32]
	ldr	x8, [x19, #16]
	stp	xzr, x8, [sp, #16]
Lloh10:
	adrp	x8, _ImageLockModeRead@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ImageLockModeRead@GOTPAGEOFF]
	ldr	x0, [sp, #40]
Lloh12:
	ldr	w8, [x8]
Lloh13:
	adrp	x9, _ImageLockModeUserInputBuf@GOTPAGE
Lloh14:
	ldr	x9, [x9, _ImageLockModeUserInputBuf@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x4, sp
	mov	x1, #0
	bl	_GdipBitmapLockBits
	ldr	x8, [x20]
	cmp	x0, x8
	b.ne	LBB0_9
; %bb.7:
	ldr	x0, [sp, #40]
	mov	x1, sp
	bl	_GdipBitmapUnlockBits
	b	LBB0_12
LBB0_8:
	mov	x19, #0
	b	LBB0_13
LBB0_9:
	bl	_GetProcessHeap
	ldr	x2, [x19, #16]
	mov	w1, #0
	bl	_HeapFree
LBB0_10:
	bl	_GetProcessHeap
	ldr	x2, [x19, #8]
	mov	w1, #0
	bl	_HeapFree
LBB0_11:
	bl	_GetProcessHeap
	mov	w1, #0
	mov	x2, x19
	bl	_HeapFree
	mov	x19, #0
LBB0_12:
	ldr	x0, [sp, #40]
	bl	_GdipDisposeImage
LBB0_13:
	mov	x0, x19
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdrp	Lloh2, Lloh4
	.loh AdrpLdr	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_Ok,8,3                         ; @Ok
	.comm	_BI_RGB,4,2                     ; @BI_RGB
	.comm	_PixelFormat32bppPARGB,4,2      ; @PixelFormat32bppPARGB
	.comm	_ImageLockModeRead,4,2          ; @ImageLockModeRead
	.comm	_ImageLockModeUserInputBuf,4,2  ; @ImageLockModeUserInputBuf
.subsections_via_symbols
