	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_load_png_texture               ## -- Begin function load_png_texture
	.p2align	4, 0x90
_load_png_texture:                      ## @load_png_texture
	.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
	movq	%rdi, %r14
	leaq	-40(%rbp), %rdi
	leaq	-32(%rbp), %rsi
	leaq	-28(%rbp), %rdx
	movq	%r14, %rcx
	callq	_lodepng_decode32_file
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movq	-40(%rbp), %rdi
	movl	-32(%rbp), %esi
	movl	-28(%rbp), %edx
	callq	_flip_image_vertical
	movq	_GL_TEXTURE_2D@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_GL_RGBA@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	-32(%rbp), %ecx
	movl	-28(%rbp), %r8d
	movq	_GL_UNSIGNED_BYTE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	subq	$8, %rsp
	xorl	%esi, %esi
	xorl	%r9d, %r9d
	pushq	-40(%rbp)
	pushq	%rax
	pushq	%rdx
	callq	_glTexImage2D
	addq	$32, %rsp
	movq	-40(%rbp), %rdi
	callq	_free
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movl	%eax, %ebx
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	%ebx, %edi
	callq	_lodepng_error_text
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %edi
	movq	%r14, %rdx
	movl	%ebx, %ecx
	movq	%rax, %r8
	callq	_fprintf
	movl	$1, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"load_png_texture %s failed, error %u: %s\n"

	.comm	_GL_TEXTURE_2D,4,2              ## @GL_TEXTURE_2D
	.comm	_GL_RGBA,4,2                    ## @GL_RGBA
	.comm	_GL_UNSIGNED_BYTE,4,2           ## @GL_UNSIGNED_BYTE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_load_png_texture               ; -- Begin function load_png_texture
	.p2align	2
_load_png_texture:                      ; @load_png_texture
	.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	x19, x0
	add	x0, sp, #24
	add	x1, sp, #20
	add	x2, sp, #16
	mov	x3, x19
	bl	_lodepng_decode32_file
	cbnz	w0, LBB0_2
; %bb.1:
	ldr	x0, [sp, #24]
	ldp	w2, w1, [sp, #16]
	bl	_flip_image_vertical
Lloh0:
	adrp	x8, _GL_TEXTURE_2D@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GL_TEXTURE_2D@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _GL_RGBA@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GL_RGBA@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	ldp	w4, w3, [sp, #16]
Lloh6:
	adrp	x8, _GL_UNSIGNED_BYTE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GL_UNSIGNED_BYTE@GOTPAGEOFF]
Lloh8:
	ldr	w7, [x8]
	ldr	x8, [sp, #24]
	str	x8, [sp]
	mov	w1, #0
	mov	w5, #0
	mov	x6, x2
	bl	_glTexImage2D
	ldr	x0, [sp, #24]
	bl	_free
	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
LBB0_2:
Lloh9:
	adrp	x8, _stderr@GOTPAGE
Lloh10:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh11:
	ldr	w20, [x8]
	mov	x21, x0
	bl	_lodepng_error_text
	mov	x4, x0
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x19
	mov	x3, x21
	bl	_fprintf
	mov	w0, #1
	bl	_exit
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"load_png_texture %s failed, error %u: %s\n"

	.comm	_GL_TEXTURE_2D,4,2              ; @GL_TEXTURE_2D
	.comm	_GL_RGBA,4,2                    ; @GL_RGBA
	.comm	_GL_UNSIGNED_BYTE,4,2           ; @GL_UNSIGNED_BYTE
.subsections_via_symbols
