#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 */
typedef int d;
typedef int c;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main() {
  char c = 'h';
  char d = '$';
  printf("Pasamos carácter letra:\n");
  do {
    if (c > 96 && c < 122) {
      printf("\t%c %c\n", c, ((c)-32));
    } else {
      printf("\tEror en %s:%d\n",
             "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/carrodher/cursoc-carlos/refs/heads/"
             "master/docs/clase3/macrosUnionesCampos/mayusculas.c",
             18);
    }
  } while (0);
  printf("\nPasamos carácter $:\n");
  do {
    if (d > 96 && d < 122) {
      printf("\t%c %c\n", d, ((d)-32));
    } else {
      printf("\tEror en %s:%d\n",
             "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/carrodher/cursoc-carlos/refs/heads/"
             "master/docs/clase3/macrosUnionesCampos/mayusculas.c",
             22);
    }
  } while (0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x68,-0x5(%rbp)
movb   $0x24,-0x6(%rbp)
lea    0xed2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsbl -0x5(%rbp),%eax
cmp    $0x60,%eax
jle    116d <main+0x5d>
movsbl -0x5(%rbp),%eax
cmp    $0x7a,%eax
jge    116d <main+0x5d>
movsbl -0x5(%rbp),%esi
movsbl -0x5(%rbp),%edx
sub    $0x20,%edx
lea    0xeb9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1187 <main+0x77>
lea    0xeae(%rip),%rdi
lea    0xeb7(%rip),%rsi
mov    $0x12,%edx
mov    $0x0,%al
call   1030 <printf@plt>
jmp    118c <main+0x7c>
lea    0xf50(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsbl -0x6(%rbp),%eax
cmp    $0x60,%eax
jle    11d2 <main+0xc2>
movsbl -0x6(%rbp),%eax
cmp    $0x7a,%eax
jge    11d2 <main+0xc2>
movsbl -0x6(%rbp),%esi
movsbl -0x6(%rbp),%edx
sub    $0x20,%edx
lea    0xe54(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11ec <main+0xdc>
lea    0xe49(%rip),%rdi
lea    0xe52(%rip),%rsi
mov    $0x16,%edx
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11f1 <main+0xe1>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xfa1(%rip),%rdi
call   1030 <puts@plt>
lea    0xecc(%rip),%rdi
mov    $0x68,%esi
mov    $0x48,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf96(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb0(%rip),%rdi
lea    0xeb9(%rip),%rsi
mov    $0x16,%edx
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"Pasamos car\C3\A1cter letra:\0A\00"
@.str.1 = [8 x i8] c"\09%c %c\0A\00"
@.str.2 = [16 x i8] c"\09Eror en %s:%d\0A\00"
@.str.3 = [177 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/carrodher/cursoc-carlos/refs/heads/master/docs/clase3/macrosUnionesCampos/mayusculas.c\00"
@.str.4 = [23 x i8] c"\0APasamos car\C3\A1cter $:\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i8
store i32 0, i32* %1
store i8 104, i8* %2
store i8 36, i8* %3
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %0
%6 = load i8, i8* %2
%7 = sext i8 %6 to i32
%8 = icmp sgt i32 %7, 96
br i1 %8, label %9, label %20
9: ; preds = %5
%10 = load i8, i8* %2
%11 = sext i8 %10 to i32
%12 = icmp slt i32 %11, 122
br i1 %12, label %13, label %20
13: ; preds = %9
%14 = load i8, i8* %2
%15 = sext i8 %14 to i32
%16 = load i8, i8* %2
%17 = sext i8 %16 to i32
%18 = sub nsw i32 %17, 32
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 %15, i32 %18)
br label %22
20: ; preds = %9, %5
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([177 x i8], [177 x i8]* @.str.3, i64 0, i64 0), i32 18)
br label %22
22: ; preds = %20, %13
br label %23
23: ; preds = %22
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.4, i64 0, i64 0))
br label %25
25: ; preds = %23
%26 = load i8, i8* %3
%27 = sext i8 %26 to i32
%28 = icmp sgt i32 %27, 96
br i1 %28, label %29, label %40
29: ; preds = %25
%30 = load i8, i8* %3
%31 = sext i8 %30 to i32
%32 = icmp slt i32 %31, 122
br i1 %32, label %33, label %40
33: ; preds = %29
%34 = load i8, i8* %3
%35 = sext i8 %34 to i32
%36 = load i8, i8* %3
%37 = sext i8 %36 to i32
%38 = sub nsw i32 %37, 32
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 %35, i32 %38)
br label %42
40: ; preds = %29, %25
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([177 x i8], [177 x i8]* @.str.3, i64 0, i64 0), i32 22)
br label %42
42: ; preds = %40, %33
br label %43
43: ; preds = %42
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [8 x i8] c"\09%c %c\0A\00"
@.str.2 = [16 x i8] c"\09Eror en %s:%d\0A\00"
@.str.3 = [177 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/carrodher/cursoc-carlos/refs/heads/master/docs/clase3/macrosUnionesCampos/mayusculas.c\00"
@str = [25 x i8] c"Pasamos car\C3\A1cter letra:\00"
@str.5 = [22 x i8] c"\0APasamos car\C3\A1cter $:\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 104, i32 72)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.5, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([177 x i8], [177 x i8]* @.str.3, i64 0, i64 0), i32 22)
ret i32 0
}