int main(void) {
  int a = 42, b;
  char *c = "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/larmel/c-compiler/refs/heads/master/"
            "test/c89/macro.c",
       *d = "__LINE__", e = 16;
  printf(
      "max=%d\n",
      ((((2) > (-1) ? (2) : (-1))) > (1) ? (((2) > (-1) ? (2) : (-1))) : (1)));
  puts(c);
  puts(d);
  puts("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
       "2022-01-22/02-19-57/repos/larmel/c-compiler/refs/heads/master/test/c89/"
       "macro.c");
  puts(__func__);
  b = 26 + (1 + a * 2 - 1) + e;
  return printf("%d\n", b);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x2a,-0x8(%rbp)
lea    0xec3(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    0xf47(%rip),%rax
mov    %rax,-0x20(%rbp)
movb   $0x10,-0x21(%rbp)
lea    0xf41(%rip),%rdi
mov    $0x2,%esi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
mov    -0x20(%rbp),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
lea    0xe80(%rip),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
lea    0xf12(%rip),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
add    $0x1,%eax
sub    $0x1,%eax
add    $0x1a,%eax
movsbl -0x21(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xee5(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xf70(%rip),%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xec5(%rip),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <puts@plt>
lea    0xf43(%rip),%rdi
xor    %eax,%eax
call   1030 <puts@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <puts@plt>
lea    0xf3c(%rip),%rdi
xor    %eax,%eax
call   1030 <puts@plt>
lea    0xf2a(%rip),%rdi
mov    $0x7e,%esi
xor    %eax,%eax
pop    %rbx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [143 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/larmel/c-compiler/refs/heads/master/test/c89/macro.c\00"
@.str.1 = [9 x i8] c"__LINE__\00"
@.str.2 = [8 x i8] c"max=%d\0A\00"
@__func__.main = [5 x i8] c"main\00"
@.str.3 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8
store i32 0, i32* %1
store i32 42, i32* %2
store i8* getelementptr inbounds ([143 x i8], [143 x i8]* @.str, i64 0, i64 0), i8** %4
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8** %5
store i8 16, i8* %6
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 2)
%8 = load i8*, i8** %4
%9 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* %8)
%10 = load i8*, i8** %5
%11 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* %10)
%12 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([143 x i8], [143 x i8]* @.str, i64 0, i64 0))
%13 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @__func__.main, i64 0, i64 0))
%14 = load i32, i32* %2
%15 = mul nsw i32 %14, 2
%16 = add nsw i32 1, %15
%17 = sub nsw i32 %16, 1
%18 = add nsw i32 26, %17
%19 = load i8, i8* %6
%20 = sext i8 %19 to i32
%21 = add nsw i32 %18, %20
store i32 %21, i32* %3
%22 = load i32, i32* %3
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %22)
ret i32 %23
}

LLVM IR (-O2):
@.str = [143 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/larmel/c-compiler/refs/heads/master/test/c89/macro.c\00"
@.str.1 = [9 x i8] c"__LINE__\00"
@.str.2 = [8 x i8] c"max=%d\0A\00"
@__func__.main = [5 x i8] c"main\00"
@.str.3 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 2)
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([143 x i8], [143 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([143 x i8], [143 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @__func__.main, i64 0, i64 0))
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 126)
ret i32 %6
}