#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
struct mg_request_info {
  int dummy;
};
struct mg_connection {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ mg_printf(struct mg_connection *, char *, char *);
void show_404(struct mg_connection *conn,
              const struct mg_request_info *request_info, void *user_data) {
  mg_printf(conn, "%s", "HTTP/1.1 200 OK\r\n");
  mg_printf(conn, "%s", "Content-Type: text/plain\r\n\r\n");
  mg_printf(conn, "%s", "Oops. File not found! ");
  mg_printf(conn, "%s", "This is a custom error handler.");
}


x86 assembly (clang, -O0):
<show_404>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed1(%rip),%rsi
lea    0xecd(%rip),%rdx
call   1030 <mg_printf@plt>
mov    -0x8(%rbp),%rdi
lea    0xeba(%rip),%rsi
lea    0xec8(%rip),%rdx
call   1030 <mg_printf@plt>
mov    -0x8(%rbp),%rdi
lea    0xea3(%rip),%rsi
lea    0xece(%rip),%rdx
call   1030 <mg_printf@plt>
mov    -0x8(%rbp),%rdi
lea    0xe8c(%rip),%rsi
lea    0xece(%rip),%rdx
call   1030 <mg_printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_404>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0xee2(%rip),%r14
lea    0xede(%rip),%rdx
mov    %r14,%rsi
call   1030 <mg_printf@plt>
lea    0xee1(%rip),%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <mg_printf@plt>
lea    0xeec(%rip),%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <mg_printf@plt>
lea    0xef1(%rip),%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <mg_printf@plt>

LLVM IR (-O0):
%struct.mg_connection = type { i32 }
%struct.mg_request_info = type { i32 }
@.str = [3 x i8] c"%s\00"
@.str.1 = [18 x i8] c"HTTP/1.1 200 OK\0D\0A\00"
@.str.2 = [29 x i8] c"Content-Type: text/plain\0D\0A\0D\0A\00"
@.str.3 = [23 x i8] c"Oops. File not found! \00"
@.str.4 = [32 x i8] c"This is a custom error handler.\00"
define void @show_404(%struct.mg_connection* %0, %struct.mg_request_info* %1, i8* %2) {
%4 = alloca %struct.mg_connection*
%5 = alloca %struct.mg_request_info*
%6 = alloca i8*
store %struct.mg_connection* %0, %struct.mg_connection** %4
store %struct.mg_request_info* %1, %struct.mg_request_info** %5
store i8* %2, i8** %6
%7 = load %struct.mg_connection*, %struct.mg_connection** %4
%8 = call i32 @mg_printf(%struct.mg_connection* %7, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
%9 = load %struct.mg_connection*, %struct.mg_connection** %4
%10 = call i32 @mg_printf(%struct.mg_connection* %9, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
%11 = load %struct.mg_connection*, %struct.mg_connection** %4
%12 = call i32 @mg_printf(%struct.mg_connection* %11, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0))
%13 = load %struct.mg_connection*, %struct.mg_connection** %4
%14 = call i32 @mg_printf(%struct.mg_connection* %13, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.4, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.mg_connection = type { i32 }
%struct.mg_request_info = type { i32 }
@.str = [3 x i8] c"%s\00"
@.str.1 = [18 x i8] c"HTTP/1.1 200 OK\0D\0A\00"
@.str.2 = [29 x i8] c"Content-Type: text/plain\0D\0A\0D\0A\00"
@.str.3 = [23 x i8] c"Oops. File not found! \00"
@.str.4 = [32 x i8] c"This is a custom error handler.\00"
define void @show_404(%struct.mg_connection* %0, %struct.mg_request_info* nocapture readnone %1, i8* nocapture readnone %2) {
%4 = tail call i32 @mg_printf(%struct.mg_connection* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @mg_printf(%struct.mg_connection* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
%6 = tail call i32 @mg_printf(%struct.mg_connection* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0))
%7 = tail call i32 @mg_printf(%struct.mg_connection* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.4, i64 0, i64 0))
ret void
}