#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 /*<<< orphan*/ x;
typedef int uint8_t;
typedef int uint16_t;
typedef int /*<<< orphan*/ total;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main() {
  uint8_t total = 1 + 2 + 3 + 4 + 10;
  uint16_t x = 20;
  printf("line: %d\n", 24);
  printf("file: %s\n", "/scratch/repos/new/home/jordi_armengol_estape/"
                       "c-scraper/outputs/2022-01-22/02-19-57/repos/LeMeteore/"
                       "kandr/refs/heads/master/preprocessor_macro_example.c");
  printf("date: %s\n", "Mar 17 2022");
  printf("time: %s\n", "12:26:24");
  printf("size of total variable is: %lu\n", sizeof(total));
  printf("size of x variable is: %lu\n", sizeof(x));
  printf("the total is: %d\n", total);
  printf("Biggest of 1, 2, and 3 is %d\n",
         ((((1 < 2) ? (2) : (1)) < 3) ? (3) : (((1 < 2) ? (2) : (1)))));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x14,-0x8(%rbp)
movl   $0x14,-0xc(%rbp)
lea    0xecc(%rip),%rdi
mov    $0x18,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec3(%rip),%rdi
lea    0xec6(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf51(%rip),%rdi
lea    0xf54(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf52(%rip),%rdi
lea    0xf55(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf50(%rip),%rdi
mov    $0x4,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf5d(%rip),%rdi
mov    $0x4,%esi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
lea    0xf63(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf67(%rip),%rdi
mov    $0x3,%esi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x18,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xedf(%rip),%rdi
lea    0xee2(%rip),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf6d(%rip),%rdi
lea    0xf70(%rip),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf6e(%rip),%rdi
lea    0xf71(%rip),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf6c(%rip),%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf79(%rip),%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf82(%rip),%rdi
mov    $0x14,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf81(%rip),%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"line: %d\0A\00"
@.str.1 = [10 x i8] c"file: %s\0A\00"
@.str.2 = [153 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/LeMeteore/kandr/refs/heads/master/preprocessor_macro_example.c\00"
@.str.3 = [10 x i8] c"date: %s\0A\00"
@.str.4 = [12 x i8] c"Mar 17 2022\00"
@.str.5 = [10 x i8] c"time: %s\0A\00"
@.str.6 = [9 x i8] c"12:26:24\00"
@.str.7 = [32 x i8] c"size of total variable is: %lu\0A\00"
@.str.8 = [28 x i8] c"size of x variable is: %lu\0A\00"
@.str.9 = [18 x i8] c"the total is: %d\0A\00"
@.str.10 = [30 x i8] c"Biggest of 1, 2, and 3 is %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 20, i32* %2
store i32 20, i32* %3
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 24)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str.2, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0))
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.7, i64 0, i64 0), i64 4)
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.8, i64 0, i64 0), i64 4)
%10 = load i32, i32* %2
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.9, i64 0, i64 0), i32 %10)
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.10, i64 0, i64 0), i32 3)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"line: %d\0A\00"
@.str.1 = [10 x i8] c"file: %s\0A\00"
@.str.2 = [153 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/LeMeteore/kandr/refs/heads/master/preprocessor_macro_example.c\00"
@.str.3 = [10 x i8] c"date: %s\0A\00"
@.str.4 = [12 x i8] c"Mar 17 2022\00"
@.str.5 = [10 x i8] c"time: %s\0A\00"
@.str.6 = [9 x i8] c"12:26:24\00"
@.str.7 = [32 x i8] c"size of total variable is: %lu\0A\00"
@.str.8 = [28 x i8] c"size of x variable is: %lu\0A\00"
@.str.9 = [18 x i8] c"the total is: %d\0A\00"
@.str.10 = [30 x i8] c"Biggest of 1, 2, and 3 is %d\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 24)
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str.2, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0))
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.7, i64 0, i64 0), i64 4)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.8, i64 0, i64 0), i64 4)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.9, i64 0, i64 0), i32 20)
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.10, i64 0, i64 0), i32 3)
ret i32 0
}