// File: /workspace/github_c_makefile_star2_O0/tvlabs[P]edge264/edge264_test.c
// Function: load_SDL2
static int load_SDL2(void) {
	const char *lib, *func;
	#ifdef _WIN32
		sdl2 = LoadLibraryA(lib = "SDL2.dll");
	#else
		sdl2 = dlopen(lib = "/Library/Frameworks/SDL2.framework/SDL2", RTLD_NOW | RTLD_GLOBAL) ?:
			dlopen(lib = "SDL2.so", RTLD_NOW | RTLD_GLOBAL) ?:
			dlopen(lib = "libSDL2.so", RTLD_NOW | RTLD_GLOBAL);
	#endif
	if (!sdl2) {
		printf("SDL2 is needed for display but not found, please download the library file at https://www.libsdl.org/ and place it in the current folder\n");
		return 1;
	}
	if (!(SDL_Init = dlsym(sdl2, func = "SDL_Init")) ||
	    !(SDL_CreateWindow = dlsym(sdl2, func = "SDL_CreateWindow")) ||
	    !(SDL_CreateRenderer = dlsym(sdl2, func = "SDL_CreateRenderer")) ||
	    !(SDL_SetWindowSize = dlsym(sdl2, func = "SDL_SetWindowSize")) ||
	    !(SDL_SetWindowPosition = dlsym(sdl2, func = "SDL_SetWindowPosition")) ||
	    !(SDL_DestroyTexture = dlsym(sdl2, func = "SDL_DestroyTexture")) ||
	    !(SDL_CreateTexture = dlsym(sdl2, func = "SDL_CreateTexture")) ||
	    !(SDL_SetTextureBlendMode = dlsym(sdl2, func = "SDL_SetTextureBlendMode")) ||
	    !(SDL_SetTextureAlphaMod = dlsym(sdl2, func = "SDL_SetTextureAlphaMod")) ||
	    !(SDL_UpdateYUVTexture = dlsym(sdl2, func = "SDL_UpdateYUVTexture")) ||
	    !(SDL_RenderClear = dlsym(sdl2, func = "SDL_RenderClear")) ||
	    !(SDL_RenderCopy = dlsym(sdl2, func = "SDL_RenderCopy")) ||
	    !(SDL_RenderPresent = dlsym(sdl2, func = "SDL_RenderPresent")) ||
	    !(SDL_PollEvent = dlsym(sdl2, func = "SDL_PollEvent")) ||
	    !(SDL_DestroyTexture = dlsym(sdl2, func = "SDL_DestroyTexture")) ||
	    !(SDL_DestroyRenderer = dlsym(sdl2, func = "SDL_DestroyRenderer")) ||
	    !(SDL_DestroyWindow = dlsym(sdl2, func = "SDL_DestroyWindow")) ||
	    !(SDL_Quit = dlsym(sdl2, func = "SDL_Quit"))) {
		printf("Missing function %s in %s\n", func, lib);
		return 1;
	}
	return 0;
}

// Assembly:
subq $0x38, %rsp
leaq 0x2b6f(%rip), %rax      # 0x440a
movq %rax, 0x28(%rsp)
leaq 0x2b63(%rip), %rdi      # 0x440a
movl $0x102, %esi            # imm = 0x102
callq 0x1130
movq %rax, 0x18(%rsp)
cmpq $0x0, %rax
je 0x18c8
movq 0x18(%rsp), %rax
movq %rax, 0x10(%rsp)
jmp 0x1925
leaq 0x2b66(%rip), %rax      # 0x4435
movq %rax, 0x28(%rsp)
leaq 0x2b5a(%rip), %rdi      # 0x4435
movl $0x102, %esi            # imm = 0x102
callq 0x1130
movq %rax, 0x8(%rsp)
cmpq $0x0, %rax
je 0x18fb
movq 0x8(%rsp), %rax
movq %rax, (%rsp)
jmp 0x191c
leaq 0x2b30(%rip), %rax      # 0x4432
movq %rax, 0x28(%rsp)
leaq 0x2b24(%rip), %rdi      # 0x4432
movl $0x102, %esi            # imm = 0x102
callq 0x1130
movq %rax, (%rsp)
movq (%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x486f(%rip)      # 0x61a0
cmpq $0x0, 0x4867(%rip)      # 0x61a0
jne 0x1956
leaq 0x2afb(%rip), %rdi      # 0x443d
movb $0x0, %al
callq 0x10b0
movl $0x1, 0x34(%rsp)
jmp 0x1cd4
movq 0x4843(%rip), %rdi      # 0x61a0
leaq 0x2b63(%rip), %rax      # 0x44c7
movq %rax, 0x20(%rsp)
leaq 0x2b57(%rip), %rsi      # 0x44c7
callq 0x11c0
movq %rax, 0x482c(%rip)      # 0x61a8
cmpq $0x0, %rax
je 0x1caa
movq 0x4813(%rip), %rdi      # 0x61a0
leaq 0x2b3c(%rip), %rax      # 0x44d0
movq %rax, 0x20(%rsp)
leaq 0x2b30(%rip), %rsi      # 0x44d0
callq 0x11c0
movq %rax, 0x4804(%rip)      # 0x61b0
cmpq $0x0, %rax
je 0x1caa
movq 0x47e3(%rip), %rdi      # 0x61a0
leaq 0x2b1d(%rip), %rax      # 0x44e1
movq %rax, 0x20(%rsp)
leaq 0x2b11(%rip), %rsi      # 0x44e1
callq 0x11c0
movq %rax, 0x47dc(%rip)      # 0x61b8
cmpq $0x0, %rax
je 0x1caa
movq 0x47b3(%rip), %rdi      # 0x61a0
leaq 0x2b00(%rip), %rax      # 0x44f4
movq %rax, 0x20(%rsp)
leaq 0x2af4(%rip), %rsi      # 0x44f4
callq 0x11c0
movq %rax, 0x47b4(%rip)      # 0x61c0
cmpq $0x0, %rax
je 0x1caa
movq 0x4783(%rip), %rdi      # 0x61a0
leaq 0x2ae2(%rip), %rax      # 0x4506
movq %rax, 0x20(%rsp)
leaq 0x2ad6(%rip), %rsi      # 0x4506
callq 0x11c0
movq %rax, 0x478c(%rip)      # 0x61c8
cmpq $0x0, %rax
je 0x1caa
movq 0x4753(%rip), %rdi      # 0x61a0
leaq 0x2ac8(%rip), %rax      # 0x451c
movq %rax, 0x20(%rsp)
leaq 0x2abc(%rip), %rsi      # 0x451c
callq 0x11c0
movq %rax, 0x46f4(%rip)      # 0x6160
cmpq $0x0, %rax
je 0x1caa
movq 0x4723(%rip), %rdi      # 0x61a0
leaq 0x2aab(%rip), %rax      # 0x452f
movq %rax, 0x20(%rsp)
leaq 0x2a9f(%rip), %rsi      # 0x452f
callq 0x11c0
movq %rax, 0x4734(%rip)      # 0x61d0
cmpq $0x0, %rax
je 0x1caa
movq 0x46f3(%rip), %rdi      # 0x61a0
leaq 0x2a8d(%rip), %rax      # 0x4541
movq %rax, 0x20(%rsp)
leaq 0x2a81(%rip), %rsi      # 0x4541
callq 0x11c0
movq %rax, 0x470c(%rip)      # 0x61d8
cmpq $0x0, %rax
je 0x1caa
movq 0x46c3(%rip), %rdi      # 0x61a0
leaq 0x2a75(%rip), %rax      # 0x4559
movq %rax, 0x20(%rsp)
leaq 0x2a69(%rip), %rsi      # 0x4559
callq 0x11c0
movq %rax, 0x46e4(%rip)      # 0x61e0
cmpq $0x0, %rax
je 0x1caa
movq 0x4693(%rip), %rdi      # 0x61a0
leaq 0x2a5c(%rip), %rax      # 0x4570
movq %rax, 0x20(%rsp)
leaq 0x2a50(%rip), %rsi      # 0x4570
callq 0x11c0
movq %rax, 0x46bc(%rip)      # 0x61e8
cmpq $0x0, %rax
je 0x1caa
movq 0x4663(%rip), %rdi      # 0x61a0
leaq 0x2a41(%rip), %rax      # 0x4585
movq %rax, 0x20(%rsp)
leaq 0x2a35(%rip), %rsi      # 0x4585
callq 0x11c0
movq %rax, 0x4694(%rip)      # 0x61f0
cmpq $0x0, %rax
je 0x1caa
movq 0x4633(%rip), %rdi      # 0x61a0
leaq 0x2a21(%rip), %rax      # 0x4595
movq %rax, 0x20(%rsp)
leaq 0x2a15(%rip), %rsi      # 0x4595
callq 0x11c0
movq %rax, 0x466c(%rip)      # 0x61f8
cmpq $0x0, %rax
je 0x1caa
movq 0x4603(%rip), %rdi      # 0x61a0
leaq 0x2a00(%rip), %rax      # 0x45a4
movq %rax, 0x20(%rsp)
leaq 0x29f4(%rip), %rsi      # 0x45a4
callq 0x11c0
movq %rax, 0x4644(%rip)      # 0x6200
cmpq $0x0, %rax
je 0x1caa
movq 0x45d3(%rip), %rdi      # 0x61a0
leaq 0x29e2(%rip), %rax      # 0x45b6
movq %rax, 0x20(%rsp)
leaq 0x29d6(%rip), %rsi      # 0x45b6
callq 0x11c0
movq %rax, 0x461c(%rip)      # 0x6208
cmpq $0x0, %rax
je 0x1caa
movq 0x45a3(%rip), %rdi      # 0x61a0
leaq 0x2918(%rip), %rax      # 0x451c
movq %rax, 0x20(%rsp)
leaq 0x290c(%rip), %rsi      # 0x451c
callq 0x11c0
movq %rax, 0x4544(%rip)      # 0x6160
cmpq $0x0, %rax
je 0x1caa
movq 0x4573(%rip), %rdi      # 0x61a0
leaq 0x2990(%rip), %rax      # 0x45c4
movq %rax, 0x20(%rsp)
leaq 0x2984(%rip), %rsi      # 0x45c4
callq 0x11c0
movq %rax, 0x452c(%rip)      # 0x6178
cmpq $0x0, %rax
je 0x1caa
movq 0x4547(%rip), %rdi      # 0x61a0
leaq 0x2978(%rip), %rax      # 0x45d8
movq %rax, 0x20(%rsp)
leaq 0x296c(%rip), %rsi      # 0x45d8
callq 0x11c0
movq %rax, 0x4510(%rip)      # 0x6188
cmpq $0x0, %rax
je 0x1caa
movq 0x451b(%rip), %rdi      # 0x61a0
leaq 0x295e(%rip), %rax      # 0x45ea
movq %rax, 0x20(%rsp)
leaq 0x2952(%rip), %rsi      # 0x45ea
callq 0x11c0
movq %rax, 0x44f4(%rip)      # 0x6198
cmpq $0x0, %rax
jne 0x1ccc
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
leaq 0x2938(%rip), %rdi      # 0x45f3
movb $0x0, %al
callq 0x10b0
movl $0x1, 0x34(%rsp)
jmp 0x1cd4
movl $0x0, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopl (%rax)