#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 EXIT_SUCCESS;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char, char, int);
int /*<<< orphan*/ stdout;
int main() {
  char i = 0;
  char j = 0;
  int *p = (int *)&i;
  fprintf(stdout, "hola\ti: %d\tj: %d\tp: %d\n", i, j, *p);
  *p = -1;
  fprintf(stdout, "hola\ti: %d\tj: %d\tp: %d\n", i, j, *p);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x0,-0x5(%rbp)
movb   $0x0,-0x6(%rbp)
lea    -0x5(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%edi
mov    -0x5(%rbp),%cl
mov    -0x6(%rbp),%al
mov    -0x10(%rbp),%rdx
mov    (%rdx),%r8d
lea    0xeb4(%rip),%rsi
movsbl %cl,%edx
movsbl %al,%ecx
call   1030 <fprintf@plt>
mov    -0x10(%rbp),%rax
movl   $0xffffffff,(%rax)
mov    0x2e78(%rip),%rax
mov    (%rax),%edi
mov    -0x5(%rbp),%cl
mov    -0x6(%rbp),%al
mov    -0x10(%rbp),%rdx
mov    (%rdx),%r8d
lea    0xe82(%rip),%rsi
movsbl %cl,%edx
movsbl %al,%ecx
call   1030 <fprintf@plt>
mov    0x2e48(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    0x2ec5(%rip),%r14
mov    (%r14),%edi
lea    0xedb(%rip),%rbx
mov    %rbx,%rsi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1030 <fprintf@plt>
mov    (%r14),%edi
mov    %rbx,%rsi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1030 <fprintf@plt>
mov    0x2e8b(%rip),%rax
mov    (%rax),%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [24 x i8] c"hola\09i: %d\09j: %d\09p: %d\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i8
%4 = alloca i32*
store i32 0, i32* %1
store i8 0, i8* %2
store i8 0, i8* %3
%5 = bitcast i8* %2 to i32*
store i32* %5, i32** %4
%6 = load i32, i32* @stdout
%7 = load i8, i8* %2
%8 = load i8, i8* %3
%9 = load i32*, i32** %4
%10 = load i32, i32* %9
%11 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8 signext %7, i8 signext %8, i32 %10)
%12 = load i32*, i32** %4
store i32 -1, i32* %12
%13 = load i32, i32* @stdout
%14 = load i8, i8* %2
%15 = load i8, i8* %3
%16 = load i32*, i32** %4
%17 = load i32, i32* %16
%18 = call i32 @fprintf(i32 %13, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8 signext %14, i8 signext %15, i32 %17)
%19 = load i32, i32* @EXIT_SUCCESS
ret i32 %19
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [24 x i8] c"hola\09i: %d\09j: %d\09p: %d\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8 signext 0, i8 signext 0, i32 0)
%3 = load i32, i32* @stdout
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8 signext 0, i8 signext 0, i32 0)
%5 = load i32, i32* @EXIT_SUCCESS
ret i32 %5
}