	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lodepng_decode                 ## -- Begin function lodepng_decode
	.p2align	4, 0x90
_lodepng_decode:                        ## @lodepng_decode
	.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	%rcx, %r12
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	$0, (%rdi)
	callq	_decodeGeneric
	movl	(%r12), %eax
	testl	%eax, %eax
	jne	LBB0_13
## %bb.1:
	cmpl	$0, 8(%r12)
	je	LBB0_4
## %bb.2:
	leaq	16(%r12), %r13
	leaq	12(%r12), %rsi
	movq	%r13, %rdi
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	callq	_lodepng_color_mode_equal
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	cmpl	$0, 8(%r12)
	jne	LBB0_12
LBB0_4:
	leaq	16(%r12), %rdi
	leaq	12(%r12), %rsi
	callq	_lodepng_color_mode_copy
	movl	%eax, (%r12)
	testl	%eax, %eax
	jne	LBB0_13
	jmp	LBB0_12
LBB0_5:
	movq	(%rbx), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	(%r13), %rax
	movq	_LCT_RGB@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_8
## %bb.6:
	movq	_LCT_RGBA@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_8
## %bb.7:
	movl	$56, %eax
	cmpl	$8, 24(%r12)
	jne	LBB0_13
LBB0_8:
	movl	(%r15), %edi
	movl	(%r14), %esi
	movq	%r13, %rdx
	callq	_lodepng_get_raw_size
	movq	%rax, %rdi
	callq	_lodepng_malloc
	movq	%rax, (%rbx)
	testq	%rax, %rax
	je	LBB0_9
## %bb.10:
	movl	(%r15), %r8d
	movl	(%r14), %r9d
	movl	4(%r12), %ecx
	movl	%ecx, (%rsp)
	movq	%rax, %rdi
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rsi
	movq	%r13, %rdx
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	callq	_lodepng_convert
	jmp	LBB0_11
LBB0_9:
	movl	$83, %eax
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
LBB0_11:
	movl	%eax, (%r12)
	movq	%rbx, %rdi
	callq	_lodepng_free
LBB0_12:
	movl	(%r12), %eax
LBB0_13:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LCT_RGB,8,3                    ## @LCT_RGB
	.comm	_LCT_RGBA,8,3                   ## @LCT_RGBA
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lodepng_decode                 ; -- Begin function lodepng_decode
	.p2align	2
_lodepng_decode:                        ; @lodepng_decode
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	str	xzr, [x0]
	bl	_decodeGeneric
	ldr	w0, [x19]
	cbnz	w0, LBB0_13
; %bb.1:
	ldr	w8, [x19, #8]
	cbz	w8, LBB0_4
; %bb.2:
	add	x24, x19, #16
	add	x25, x19, #12
	mov	x0, x24
	mov	x1, x25
	bl	_lodepng_color_mode_equal
	cbz	x0, LBB0_5
; %bb.3:
	ldr	w8, [x19, #8]
	cbnz	w8, LBB0_12
LBB0_4:
	add	x0, x19, #16
	add	x1, x19, #12
	bl	_lodepng_color_mode_copy
	str	w0, [x19]
	cbnz	w0, LBB0_13
	b	LBB0_12
LBB0_5:
	ldr	x23, [x22]
	ldr	x8, [x24]
Lloh0:
	adrp	x9, _LCT_RGB@GOTPAGE
Lloh1:
	ldr	x9, [x9, _LCT_RGB@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
Lloh3:
	adrp	x10, _LCT_RGBA@GOTPAGE
Lloh4:
	ldr	x10, [x10, _LCT_RGBA@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.eq	LBB0_7
; %bb.6:
	ldr	w8, [x19, #24]
	cmp	w8, #8
	b.ne	LBB0_9
LBB0_7:
	ldr	w0, [x21]
	ldr	w1, [x20]
	mov	x2, x24
	bl	_lodepng_get_raw_size
	bl	_lodepng_malloc
	str	x0, [x22]
	cbz	x0, LBB0_10
; %bb.8:
	ldr	w4, [x21]
	ldr	w5, [x20]
	ldr	w6, [x19, #4]
	mov	x1, x23
	mov	x2, x24
	mov	x3, x25
	bl	_lodepng_convert
	b	LBB0_11
LBB0_9:
	mov	w0, #56
	b	LBB0_13
LBB0_10:
	mov	w0, #83
LBB0_11:
	str	w0, [x19]
	mov	x0, x23
	bl	_lodepng_free
LBB0_12:
	ldr	w0, [x19]
LBB0_13:
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_LCT_RGB,8,3                    ; @LCT_RGB
	.comm	_LCT_RGBA,8,3                   ; @LCT_RGBA
.subsections_via_symbols
