	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function IMAGELIST_InternalExpandBitmaps
_IMAGELIST_InternalExpandBitmaps:       ## @IMAGELIST_InternalExpandBitmaps
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r13
	movq	(%rdi), %rdx
	movq	8(%rdi), %rcx
	movq	16(%rdi), %r8
	leaq	L_.str(%rip), %rdi
	movq	%r13, %rsi
	callq	_TRACE
	movq	(%r13), %rax
	addq	%r14, %rax
	movq	8(%r13), %rbx
	cmpq	%rbx, %rax
	jl	LBB0_16
## %bb.1:
	movq	16(%r13), %rsi
	movq	%r14, %rdi
	callq	_max
	leaq	(%rbx,%rax), %r14
	incq	%r14
	leaq	-56(%rbp), %rdx
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_imagelist_get_bitmap_size
	movq	-56(%rbp), %rdx
	movq	-48(%rbp), %rcx
	leaq	L_.str.1(%rip), %rdi
	movq	%r13, %rsi
	movq	%r14, %r8
	callq	_TRACE
	xorl	%edi, %edi
	callq	_CreateCompatibleDC
	movl	%eax, %r15d
	movl	%eax, %edi
	movq	%r13, %rsi
	movq	%r14, %rdx
	callq	_ImageList_CreateImage
	movq	%rax, %r12
	testq	%rax, %rax
	jne	LBB0_3
## %bb.2:
	movq	-56(%rbp), %rsi
	movq	-48(%rbp), %rdx
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_ERR
LBB0_3:
	cmpq	$0, (%r13)
	je	LBB0_5
## %bb.4:
	movl	%r15d, %edi
	movq	%r12, %rsi
	callq	_SelectObject
	movq	%rax, %rbx
	movq	-56(%rbp), %rcx
	movq	-48(%rbp), %r8
	movl	64(%r13), %r9d
	movq	_SRCCOPY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	subq	$8, %rsp
	movl	%r15d, %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	pushq	%rax
	pushq	$0
	pushq	$0
	callq	_BitBlt
	addq	$32, %rsp
	movl	%r15d, %edi
	movq	%rbx, %rsi
	callq	_SelectObject
LBB0_5:
	movl	64(%r13), %edi
	movq	%r12, %rsi
	callq	_SelectObject
	movq	56(%r13), %rdi
	callq	_DeleteObject
	movq	%r12, 56(%r13)
	movq	_ILC_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 24(%r13)
	je	LBB0_11
## %bb.6:
	movq	-56(%rbp), %rdi
	movq	-48(%rbp), %rsi
	movl	$1, %edx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	callq	_CreateBitmap
	movq	%rax, %r12
	testq	%rax, %rax
	jne	LBB0_8
## %bb.7:
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_ERR
LBB0_8:
	cmpq	$0, (%r13)
	je	LBB0_10
## %bb.9:
	movl	%r15d, %edi
	movq	%r12, %rsi
	callq	_SelectObject
	movq	%rax, %rbx
	movq	-56(%rbp), %rcx
	movq	-48(%rbp), %r8
	movl	48(%r13), %r9d
	movq	_SRCCOPY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	subq	$8, %rsp
	movl	%r15d, %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	pushq	%rax
	pushq	$0
	pushq	$0
	callq	_BitBlt
	addq	$32, %rsp
	movl	%r15d, %edi
	movq	%rbx, %rsi
	callq	_SelectObject
LBB0_10:
	movl	48(%r13), %edi
	movq	%r12, %rsi
	callq	_SelectObject
	movq	40(%r13), %rdi
	callq	_DeleteObject
	movq	%r12, 40(%r13)
LBB0_11:
	cmpq	$0, 32(%r13)
	je	LBB0_15
## %bb.12:
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movq	_HEAP_ZERO_MEMORY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	32(%r13), %rdx
	movl	%eax, %edi
	movq	%r14, %rcx
	callq	_HeapReAlloc
	movq	%rax, %r12
	testq	%rax, %rax
	jne	LBB0_14
## %bb.13:
	movq	32(%r13), %rdi
	callq	_heap_free
LBB0_14:
	movq	%r12, 32(%r13)
LBB0_15:
	movq	%r14, 8(%r13)
	movl	%r15d, %edi
	callq	_DeleteDC
LBB0_16:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%p has allocated %d, max %d, grow %d images\n"

L_.str.1:                               ## @.str.1
	.asciz	"Create expanded bitmaps : himl=%p x=%d y=%d count=%d\n"

L_.str.2:                               ## @.str.2
	.asciz	"creating new image bitmap (x=%d y=%d)!\n"

	.comm	_SRCCOPY,4,2                    ## @SRCCOPY
	.comm	_ILC_MASK,4,2                   ## @ILC_MASK
L_.str.3:                               ## @.str.3
	.asciz	"creating new mask bitmap!\n"

	.comm	_HEAP_ZERO_MEMORY,4,2           ## @HEAP_ZERO_MEMORY
	.no_dead_strip	_IMAGELIST_InternalExpandBitmaps
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function IMAGELIST_InternalExpandBitmaps
_IMAGELIST_InternalExpandBitmaps:       ; @IMAGELIST_InternalExpandBitmaps
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x20, x1
	mov	x19, x0
	ldp	x2, x3, [x0]
	ldr	x4, [x0, #16]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_TRACE
	ldp	x8, x21, [x19]
	add	x8, x8, x20
	cmp	x8, x21
	b.lt	LBB0_16
; %bb.1:
	ldr	x1, [x19, #16]
	mov	x0, x20
	bl	_max
	add	x8, x21, x0
	add	x20, x8, #1
	add	x2, sp, #16
	mov	x0, x19
	mov	x1, x20
	bl	_imagelist_get_bitmap_size
	ldp	x2, x3, [sp, #16]
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x19
	mov	x4, x20
	bl	_TRACE
	mov	w0, #0
	bl	_CreateCompatibleDC
	mov	x21, x0
	mov	x1, x19
	mov	x2, x20
	bl	_ImageList_CreateImage
	mov	x22, x0
	cbnz	x0, LBB0_3
; %bb.2:
	ldp	x8, x9, [sp, #16]
	stp	x8, x9, [sp]
Lloh4:
	adrp	x0, l_.str.2@PAGE
Lloh5:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_ERR
LBB0_3:
	ldr	x8, [x19]
Lloh6:
	adrp	x24, _SRCCOPY@GOTPAGE
Lloh7:
	ldr	x24, [x24, _SRCCOPY@GOTPAGEOFF]
	cbz	x8, LBB0_5
; %bb.4:
	mov	x0, x21
	mov	x1, x22
	bl	_SelectObject
	mov	x23, x0
	ldp	x3, x4, [sp, #16]
	ldr	w5, [x19, #64]
	ldr	w8, [x24]
	str	w8, [sp]
	mov	x0, x21
	mov	w1, #0
	mov	w2, #0
	mov	w6, #0
	mov	w7, #0
	bl	_BitBlt
	mov	x0, x21
	mov	x1, x23
	bl	_SelectObject
LBB0_5:
	ldr	w0, [x19, #64]
	mov	x1, x22
	bl	_SelectObject
	ldr	x0, [x19, #56]
	bl	_DeleteObject
	str	x22, [x19, #56]
	ldr	w8, [x19, #24]
Lloh8:
	adrp	x9, _ILC_MASK@GOTPAGE
Lloh9:
	ldr	x9, [x9, _ILC_MASK@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.6:
	ldp	x0, x1, [sp, #16]
	mov	w2, #1
	mov	w3, #1
	mov	x4, #0
	bl	_CreateBitmap
	mov	x22, x0
	cbnz	x0, LBB0_8
; %bb.7:
Lloh11:
	adrp	x0, l_.str.3@PAGE
Lloh12:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_ERR
LBB0_8:
	ldr	x8, [x19]
	cbz	x8, LBB0_10
; %bb.9:
	mov	x0, x21
	mov	x1, x22
	bl	_SelectObject
	mov	x23, x0
	ldp	x3, x4, [sp, #16]
	ldr	w5, [x19, #48]
	ldr	w8, [x24]
	str	w8, [sp]
	mov	x0, x21
	mov	w1, #0
	mov	w2, #0
	mov	w6, #0
	mov	w7, #0
	bl	_BitBlt
	mov	x0, x21
	mov	x1, x23
	bl	_SelectObject
LBB0_10:
	ldr	w0, [x19, #48]
	mov	x1, x22
	bl	_SelectObject
	ldr	x0, [x19, #40]
	bl	_DeleteObject
	str	x22, [x19, #40]
LBB0_11:
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_15
; %bb.12:
	bl	_GetProcessHeap
Lloh13:
	adrp	x8, _HEAP_ZERO_MEMORY@GOTPAGE
Lloh14:
	ldr	x8, [x8, _HEAP_ZERO_MEMORY@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	ldr	x2, [x19, #32]
	mov	x3, x20
	bl	_HeapReAlloc
	mov	x22, x0
	cbnz	x0, LBB0_14
; %bb.13:
	ldr	x0, [x19, #32]
	bl	_heap_free
LBB0_14:
	str	x22, [x19, #32]
LBB0_15:
	str	x20, [x19, #8]
	mov	x0, x21
	bl	_DeleteDC
LBB0_16:
	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
	add	sp, sp, #96
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%p has allocated %d, max %d, grow %d images\n"

l_.str.1:                               ; @.str.1
	.asciz	"Create expanded bitmaps : himl=%p x=%d y=%d count=%d\n"

l_.str.2:                               ; @.str.2
	.asciz	"creating new image bitmap (x=%d y=%d)!\n"

	.comm	_SRCCOPY,4,2                    ; @SRCCOPY
	.comm	_ILC_MASK,4,2                   ; @ILC_MASK
l_.str.3:                               ; @.str.3
	.asciz	"creating new mask bitmap!\n"

	.comm	_HEAP_ZERO_MEMORY,4,2           ; @HEAP_ZERO_MEMORY
	.no_dead_strip	_IMAGELIST_InternalExpandBitmaps
.subsections_via_symbols
