	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function png2hb
_png2hb:                                ## @png2hb
	.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	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r15
	testl	%esi, %esi
	movl	$230400, %eax                   ## imm = 0x38400
	movl	$345600, %esi                   ## imm = 0x54600
	cmovel	%eax, %esi
	movl	$1, %edi
	callq	_calloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	%rax, %r14
	testl	%ebx, %ebx
	movq	_READPNG_24@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$320, %eax                      ## imm = 0x140
	movl	$480, %ebx                      ## imm = 0x1E0
	cmovel	%eax, %ebx
	movq	%r14, %rdi
	movq	%r15, %rsi
	movl	%ebx, %ecx
	movl	$240, %r8d
	callq	_readpng
	testl	%eax, %eax
	je	LBB0_4
## %bb.2:
	movq	%r14, %rdi
	callq	_free
LBB0_3:
	xorl	%ebx, %ebx
	jmp	LBB0_7
LBB0_4:
	leaq	-48(%rbp), %r15
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$24, %edx
	callq	_memset
	movl	$24, -48(%rbp)
	movl	%ebx, -44(%rbp)
	movabsq	$8589934352, %rax               ## imm = 0x1FFFFFF10
	movq	%rax, -40(%rbp)
	movl	$24, -32(%rbp)
	movq	_BI_RGB@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -28(%rbp)
	movq	_FrameWnd@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_GetDC
	movq	_CBM_INIT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	movq	%r15, %rsi
	movq	%r14, %rcx
	movq	%r15, %r8
	xorl	%r9d, %r9d
	callq	_CreateDIBitmap
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_6
## %bb.5:
	xorl	%eax, %eax
	callq	_GetLastError
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_lprintf
LBB0_6:
	movq	%r14, %rdi
	callq	_free
LBB0_7:
	movq	%rbx, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_READPNG_24,4,2                 ## @READPNG_24
	.comm	_BI_RGB,4,2                     ## @BI_RGB
	.comm	_FrameWnd,4,2                   ## @FrameWnd
	.comm	_CBM_INIT,4,2                   ## @CBM_INIT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"CreateDIBitmap failed with %i"

	.no_dead_strip	_png2hb
.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 png2hb
lCPI0_0:
	.long	4294967056                      ; 0xffffff10
	.long	1                               ; 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_png2hb:                                ; @png2hb
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x20, x1
	mov	x21, x0
	mov	w8, #17920
	movk	w8, #5, lsl #16
	mov	w9, #33792
	movk	w9, #3, lsl #16
	cmp	w1, #0
	csel	w1, w9, w8, eq
	mov	w0, #1
	bl	_calloc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x8, _READPNG_24@GOTPAGE
Lloh1:
	ldr	x8, [x8, _READPNG_24@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w8, #480
	mov	w9, #320
	cmp	w20, #0
	csel	w20, w9, w8, eq
	mov	x1, x21
	mov	x3, x20
	mov	w4, #240
	bl	_readpng
	cbz	w0, LBB0_4
; %bb.2:
	mov	x0, x19
	bl	_free
LBB0_3:
	mov	x20, #0
	b	LBB0_7
LBB0_4:
	mov	w21, #24
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #24
	bl	_memset
	stp	w21, w20, [sp, #8]
Lloh3:
	adrp	x8, lCPI0_0@PAGE
Lloh4:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [sp, #16]
Lloh5:
	adrp	x8, _BI_RGB@GOTPAGE
Lloh6:
	ldr	x8, [x8, _BI_RGB@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	stp	w21, w8, [sp, #24]
Lloh8:
	adrp	x8, _FrameWnd@GOTPAGE
Lloh9:
	ldr	x8, [x8, _FrameWnd@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	bl	_GetDC
Lloh11:
	adrp	x8, _CBM_INIT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _CBM_INIT@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	add	x1, sp, #8
	add	x4, sp, #8
	mov	x3, x19
	mov	w5, #0
	bl	_CreateDIBitmap
	mov	x20, x0
	cbnz	x0, LBB0_6
; %bb.5:
	bl	_GetLastError
	mov	x1, x0
Lloh14:
	adrp	x0, l_.str@PAGE
Lloh15:
	add	x0, x0, l_.str@PAGEOFF
	bl	_lprintf
LBB0_6:
	mov	x0, x19
	bl	_free
LBB0_7:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdrp	Lloh3, Lloh5
	.loh AdrpLdr	Lloh3, Lloh4
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_READPNG_24,4,2                 ; @READPNG_24
	.comm	_BI_RGB,4,2                     ; @BI_RGB
	.comm	_FrameWnd,4,2                   ; @FrameWnd
	.comm	_CBM_INIT,4,2                   ; @CBM_INIT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"CreateDIBitmap failed with %i"

	.no_dead_strip	_png2hb
.subsections_via_symbols
