#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 main(void) {
  int i = 0;
  char c = 0;
  char *s = "teste";
  void *p = NULL;
  printf("%d %c %s %p\n", i, c, s, p);
  if (!c)
    printf("i ok\n");
  if (!c)
    printf("c ok\n");
  if (!s[5])
    printf("s ok\n");
  if (!p)
    printf("p ok\n");
  printf("%zu", sizeof('x'));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movb   $0x0,-0x9(%rbp)
lea    0xecf(%rip),%rax
mov    %rax,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x8(%rbp),%esi
movsbl -0x9(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
lea    0xeb3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpb   $0x0,-0x9(%rbp)
jne    1172 <main+0x62>
lea    0xea8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpb   $0x0,-0x9(%rbp)
jne    118a <main+0x7a>
lea    0xe96(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%rax
cmpb   $0x0,0x5(%rax)
jne    11a6 <main+0x96>
lea    0xe80(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpq   $0x0,-0x20(%rbp)
jne    11bf <main+0xaf>
lea    0xe6d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe65(%rip),%rdi
mov    $0x4,%esi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xede(%rip),%rdi
lea    0xed1(%rip),%rcx
xor    %esi,%esi
xor    %edx,%edx
xor    %r8d,%r8d
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xed3(%rip),%rdi
call   1030 <puts@plt>
lea    0xecc(%rip),%rdi
call   1030 <puts@plt>
lea    0xec5(%rip),%rdi
call   1030 <puts@plt>
lea    0xebe(%rip),%rdi
call   1030 <puts@plt>
lea    0xe9f(%rip),%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"teste\00"
@.str.1 = [13 x i8] c"%d %c %s %p\0A\00"
@.str.2 = [6 x i8] c"i ok\0A\00"
@.str.3 = [6 x i8] c"c ok\0A\00"
@.str.4 = [6 x i8] c"s ok\0A\00"
@.str.5 = [6 x i8] c"p ok\0A\00"
@.str.6 = [4 x i8] c"%zu\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8
%4 = alloca i8*
%5 = alloca i8*
store i32 0, i32* %1
store i32 0, i32* %2
store i8 0, i8* %3
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8** %4
store i8* null, i8** %5
%6 = load i32, i32* %2
%7 = load i8, i8* %3
%8 = sext i8 %7 to i32
%9 = load i8*, i8** %4
%10 = load i8*, i8** %5
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 %6, i32 %8, i8* %9, i8* %10)
%12 = load i8, i8* %3
%13 = icmp ne i8 %12, 0
br i1 %13, label %16, label %14
14: ; preds = %0
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
br label %16
16: ; preds = %14, %0
%17 = load i8, i8* %3
%18 = icmp ne i8 %17, 0
br i1 %18, label %21, label %19
19: ; preds = %16
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
br label %21
21: ; preds = %19, %16
%22 = load i8*, i8** %4
%23 = getelementptr inbounds i8, i8* %22, i64 5
%24 = load i8, i8* %23
%25 = icmp ne i8 %24, 0
br i1 %25, label %28, label %26
26: ; preds = %21
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
br label %28
28: ; preds = %26, %21
%29 = load i8*, i8** %5
%30 = icmp ne i8* %29, null
br i1 %30, label %33, label %31
31: ; preds = %28
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
br label %33
33: ; preds = %31, %28
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i64 4)
%35 = load i32, i32* %1
ret i32 %35
}

LLVM IR (-O2):
@.str = [6 x i8] c"teste\00"
@.str.1 = [13 x i8] c"%d %c %s %p\0A\00"
@.str.6 = [4 x i8] c"%zu\00"
@str = [5 x i8] c"i ok\00"
@str.7 = [5 x i8] c"c ok\00"
@str.8 = [5 x i8] c"s ok\00"
@str.9 = [5 x i8] c"p ok\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 0, i32 0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* null)
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str.7, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str.8, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str.9, i64 0, i64 0))
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i64 4)
ret i32 0
}