int aula_04() {
  char header[] = "Aula 04 ==============================";
  char pergunta[] =
      "Considere o trecho de programa abaixo. Depois de executado, responda "
      "quais são os valores associados aos itens de (a) até (g), supondo que "
      "os endereços das variáveis u e v são 1130 e 1132, respectivamente.\n";
  int u, v = 45;
  int *pu, *pv = &v;
  u = *pv + 1;
  pu = &u;
  int endereco_u = 1130;
  int endereco_v = 1132;
  system("cls");
  printf("\n<<<<< %s\n", header);
  printf("1. %s\n\n", pergunta);
  printf("Resposta de a)  &v = %d\n", endereco_v);
  printf("Resposta de b)  pv = %d\n", pv);
  printf("Resposta de c) *pv = %d\n", *pv);
  printf("Resposta de d)   u = %d\n", u);
  printf("Resposta de e)  &u = %d\n", endereco_u);
  printf("Resposta de f)  pu = %d\n", pu);
  printf("Resposta de g) *pu = %d\n", *pu);
  printf("%s >>>>>\n", header);
  printf("\n");
  aula_04_rev01();
  printf("\n");
  system("pause");
  return 1;
}


x86 assembly (clang, -O0):
<aula_04>:
push   %rbp
mov    %rsp,%rbp
sub    $0x130,%rsp
lea    -0x30(%rbp),%rdi
lea    0xeaa(%rip),%rsi
mov    $0x27,%edx
call   1050 <memcpy@plt>
lea    -0x110(%rbp),%rdi
lea    0xec2(%rip),%rsi
mov    $0xd4,%edx
call   1050 <memcpy@plt>
movl   $0x2d,-0x118(%rbp)
lea    -0x118(%rbp),%rax
mov    %rax,-0x128(%rbp)
mov    -0x128(%rbp),%rax
mov    (%rax),%eax
add    $0x1,%eax
mov    %eax,-0x114(%rbp)
lea    -0x114(%rbp),%rax
mov    %rax,-0x120(%rbp)
movl   $0x46a,-0x12c(%rbp)
movl   $0x46c,-0x130(%rbp)
lea    0xf39(%rip),%rdi
mov    $0x0,%al
call   1030 <system@plt>
lea    -0x30(%rbp),%rsi
lea    0xf2b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x110(%rbp),%rsi
lea    0xf21(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x130(%rbp),%esi
lea    0xf15(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x128(%rbp),%rsi
lea    0xf19(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x128(%rbp),%rax
mov    (%rax),%esi
lea    0xf1b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x114(%rbp),%esi
lea    0xf20(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x12c(%rbp),%esi
lea    0xf25(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x120(%rbp),%rsi
lea    0xf29(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x120(%rbp),%rax
mov    (%rax),%esi
lea    0xf2b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x30(%rbp),%rsi
lea    0xf32(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe73(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1060 <aula_04_rev01@plt>
lea    0xe5e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf0b(%rip),%rdi
mov    $0x0,%al
call   1030 <system@plt>
mov    $0x1,%eax
add    $0x130,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aula_04>:
push   %r14
push   %rbx
sub    $0x118,%rsp
movaps 0xeaf(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xe93(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movabs $0x3d3d3d3d3d3d3d,%rax
mov    %rax,0x2f(%rsp)
lea    0xea8(%rip),%rsi
lea    0x40(%rsp),%rbx
mov    $0xd4,%edx
mov    %rbx,%rdi
call   1060 <memcpy@plt>
movl   $0x2d,0x8(%rsp)
movl   $0x2e,0xc(%rsp)
lea    0xf53(%rip),%rdi
xor    %eax,%eax
call   1040 <system@plt>
lea    0xf49(%rip),%rdi
lea    0x10(%rsp),%r14
mov    %r14,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xf3e(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xf35(%rip),%rdi
mov    $0x46c,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xf3b(%rip),%rdi
lea    0x8(%rsp),%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x8(%rsp),%esi
lea    0xf3d(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xf48(%rip),%rdi
mov    $0x2e,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xf4e(%rip),%rdi
mov    $0x46a,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xf54(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0xc(%rsp),%esi
lea    0xf56(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xf61(%rip),%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1070 <aula_04_rev01@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xf3f(%rip),%rdi
xor    %eax,%eax
call   1040 <system@plt>
mov    $0x1,%eax
add    $0x118,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.aula_04.header = [39 x i8] c"Aula 04 ==============================\00"
@__const.aula_04.pergunta = [212 x i8] c"Considere o trecho de programa abaixo. Depois de executado, responda quais s\C3\A3o os valores associados aos itens de (a) at\C3\A9 (g), supondo que os endere\C3\A7os das vari\C3\A1veis u e v s\C3\A3o 1130 e 1132, respectivamente.\0A\00"
@.str = [4 x i8] c"cls\00"
@.str.1 = [11 x i8] c"\0A<<<<< %s\0A\00"
@.str.2 = [8 x i8] c"1. %s\0A\0A\00"
@.str.3 = [25 x i8] c"Resposta de a) &v = %d\0A\00"
@.str.4 = [25 x i8] c"Resposta de b) pv = %d\0A\00"
@.str.5 = [25 x i8] c"Resposta de c) *pv = %d\0A\00"
@.str.6 = [25 x i8] c"Resposta de d) u = %d\0A\00"
@.str.7 = [25 x i8] c"Resposta de e) &u = %d\0A\00"
@.str.8 = [25 x i8] c"Resposta de f) pu = %d\0A\00"
@.str.9 = [25 x i8] c"Resposta de g) *pu = %d\0A\00"
@.str.10 = [10 x i8] c"%s >>>>>\0A\00"
@.str.11 = [2 x i8] c"\0A\00"
@.str.12 = [6 x i8] c"pause\00"
define i32 @aula_04() {
%1 = alloca [39 x i8]
%2 = alloca [212 x i8]
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32
%9 = bitcast [39 x i8]* %1 to i8*
%10 = bitcast [212 x i8]* %2 to i8*
store i32 45, i32* %4
store i32* %4, i32** %6
%11 = load i32*, i32** %6
%12 = load i32, i32* %11
%13 = add nsw i32 %12, 1
store i32 %13, i32* %3
store i32* %3, i32** %5
store i32 1130, i32* %7
store i32 1132, i32* %8
%14 = call i32 (i8*, ...) bitcast (i32 (...)* @system to i32 (i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%15 = getelementptr inbounds [39 x i8], [39 x i8]* %1, i64 0, i64 0
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* %15)
%17 = getelementptr inbounds [212 x i8], [212 x i8]* %2, i64 0, i64 0
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* %17)
%19 = load i32, i32* %8
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0), i32 %19)
%21 = load i32*, i32** %6
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0), i32* %21)
%23 = load i32*, i32** %6
%24 = load i32, i32* %23
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.5, i64 0, i64 0), i32 %24)
%26 = load i32, i32* %3
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.6, i64 0, i64 0), i32 %26)
%28 = load i32, i32* %7
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.7, i64 0, i64 0), i32 %28)
%30 = load i32*, i32** %5
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.8, i64 0, i64 0), i32* %30)
%32 = load i32*, i32** %5
%33 = load i32, i32* %32
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.9, i64 0, i64 0), i32 %33)
%35 = getelementptr inbounds [39 x i8], [39 x i8]* %1, i64 0, i64 0
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.10, i64 0, i64 0), i8* %35)
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0))
%38 = call i32 (...) @aula_04_rev01()
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0))
%40 = call i32 (i8*, ...) bitcast (i32 (...)* @system to i32 (i8*, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.12, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@__const.aula_04.header = [39 x i8] c"Aula 04 ==============================\00"
@__const.aula_04.pergunta = [212 x i8] c"Considere o trecho de programa abaixo. Depois de executado, responda quais s\C3\A3o os valores associados aos itens de (a) at\C3\A9 (g), supondo que os endere\C3\A7os das vari\C3\A1veis u e v s\C3\A3o 1130 e 1132, respectivamente.\0A\00"
@.str = [4 x i8] c"cls\00"
@.str.1 = [11 x i8] c"\0A<<<<< %s\0A\00"
@.str.2 = [8 x i8] c"1. %s\0A\0A\00"
@.str.3 = [25 x i8] c"Resposta de a) &v = %d\0A\00"
@.str.4 = [25 x i8] c"Resposta de b) pv = %d\0A\00"
@.str.5 = [25 x i8] c"Resposta de c) *pv = %d\0A\00"
@.str.6 = [25 x i8] c"Resposta de d) u = %d\0A\00"
@.str.7 = [25 x i8] c"Resposta de e) &u = %d\0A\00"
@.str.8 = [25 x i8] c"Resposta de f) pu = %d\0A\00"
@.str.9 = [25 x i8] c"Resposta de g) *pu = %d\0A\00"
@.str.10 = [10 x i8] c"%s >>>>>\0A\00"
@.str.12 = [6 x i8] c"pause\00"
define i32 @aula_04() {
%1 = alloca [39 x i8]
%2 = alloca [212 x i8]
%3 = alloca i32
%4 = alloca i32
%5 = getelementptr inbounds [39 x i8], [39 x i8]* %1, i64 0, i64 0
%6 = getelementptr inbounds [212 x i8], [212 x i8]* %2, i64 0, i64 0
%7 = bitcast i32* %3 to i8*
%8 = bitcast i32* %4 to i8*
store i32 45, i32* %4
store i32 46, i32* %3
%9 = tail call i32 (i8*, ...) bitcast (i32 (...)* @system to i32 (i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* %5)
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* %6)
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0), i32 1132)
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0), i32* %4)
%14 = load i32, i32* %4
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.5, i64 0, i64 0), i32 %14)
%16 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.6, i64 0, i64 0), i32 46)
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.7, i64 0, i64 0), i32 1130)
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.8, i64 0, i64 0), i32* %3)
%19 = load i32, i32* %3
%20 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.9, i64 0, i64 0), i32 %19)
%21 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.10, i64 0, i64 0), i8* %5)
%22 = call i32 @putchar(i32 10)
%23 = call i32 (...) @aula_04_rev01()
%24 = call i32 @putchar(i32 10)
%25 = call i32 (i8*, ...) bitcast (i32 (...)* @system to i32 (i8*, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.12, i64 0, i64 0))
ret i32 1
}