#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 */

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, char const *);
void warning_message(int warning_id) {
  const char *warning_message[4] = {};
  warning_message[0] = "";
  warning_message[1] = "Wrong identent. Tab missing.";
  warning_message[2] = "Space missing.";
  warning_message[3] = "Comment missing.";
  printf("W0%i: %s\n", warning_id, warning_message[warning_id]);
}


x86 assembly (clang, -O0):
<warning_message>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0x20,%edx
call   1040 <memset@plt>
lea    0xf04(%rip),%rax
mov    %rax,-0x30(%rbp)
lea    0xeb3(%rip),%rax
mov    %rax,-0x28(%rbp)
lea    0xec5(%rip),%rax
mov    %rax,-0x20(%rbp)
lea    0xec9(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x4(%rbp),%esi
movslq -0x4(%rbp),%rax
mov    -0x30(%rbp,%rax,8),%rdx
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<warning_message>:
lea    0xf2f(%rip),%rax
mov    %rax,-0x28(%rsp)
lea    0xedd(%rip),%rax
mov    %rax,-0x20(%rsp)
lea    0xeee(%rip),%rax
mov    %rax,-0x18(%rsp)
lea    0xef1(%rip),%rax
mov    %rax,-0x10(%rsp)
movslq %edi,%rsi
mov    -0x28(%rsp,%rsi,8),%rdx
lea    0xeee(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
@.str.1 = [29 x i8] c"Wrong identent. Tab missing.\00"
@.str.2 = [15 x i8] c"Space missing.\00"
@.str.3 = [17 x i8] c"Comment missing.\00"
@.str.4 = [10 x i8] c"W0%i: %s\0A\00"
define void @warning_message(i32 %0) {
%2 = alloca i32
%3 = alloca [4 x i8*]
store i32 %0, i32* %2
%4 = bitcast [4 x i8*]* %3 to i8*
%5 = getelementptr inbounds [4 x i8*], [4 x i8*]* %3, i64 0, i64 0
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8** %5
%6 = getelementptr inbounds [4 x i8*], [4 x i8*]* %3, i64 0, i64 1
store i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8** %6
%7 = getelementptr inbounds [4 x i8*], [4 x i8*]* %3, i64 0, i64 2
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i8** %7
%8 = getelementptr inbounds [4 x i8*], [4 x i8*]* %3, i64 0, i64 3
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0), i8** %8
%9 = load i32, i32* %2
%10 = load i32, i32* %2
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [4 x i8*], [4 x i8*]* %3, i64 0, i64 %11
%13 = load i8*, i8** %12
%14 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i32 %9, i8* %13)
ret void
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
@.str.1 = [29 x i8] c"Wrong identent. Tab missing.\00"
@.str.2 = [15 x i8] c"Space missing.\00"
@.str.3 = [17 x i8] c"Comment missing.\00"
@.str.4 = [10 x i8] c"W0%i: %s\0A\00"
define void @warning_message(i32 %0) {
%2 = alloca [4 x i8*]
%3 = bitcast [4 x i8*]* %2 to i8*
%4 = getelementptr inbounds [4 x i8*], [4 x i8*]* %2, i64 0, i64 0
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8** %4
%5 = getelementptr inbounds [4 x i8*], [4 x i8*]* %2, i64 0, i64 1
store i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8** %5
%6 = getelementptr inbounds [4 x i8*], [4 x i8*]* %2, i64 0, i64 2
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i8** %6
%7 = getelementptr inbounds [4 x i8*], [4 x i8*]* %2, i64 0, i64 3
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0), i8** %7
%8 = sext i32 %0 to i64
%9 = getelementptr inbounds [4 x i8*], [4 x i8*]* %2, i64 0, i64 %8
%10 = load i8*, i8** %9
%11 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i32 %0, i8* %10)
ret void
}