int pointer_joke2() {
  printf("----- START %s\n", __FUNCTION__);
  printf(5 + "good good");
  printf("\n");
  printf("** look at %s:%d **\n",
         "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
         "2022-01-22/02-19-57/repos/reslaurentii/sandbox/refs/heads/master/src/"
         "printf_jokes.c",
         50);
  printf("----- END %s\n", __FUNCTION__);
  return 0;
}


x86 assembly (clang, -O0):
<pointer_joke2>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xeee(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeee(%rip),%rdi
add    $0x5,%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed8(%rip),%rdi
lea    0xee6(%rip),%rsi
mov    $0x32,%edx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf67(%rip),%rdi
lea    0xe9f(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pointer_joke2>:
push   %rbx
lea    0xed8(%rip),%rdi
lea    0xee1(%rip),%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xee3(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xed0(%rip),%rdi
lea    0xede(%rip),%rsi
mov    $0x32,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf5f(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"----- START %s\0A\00"
@__FUNCTION__.pointer_joke2 = [14 x i8] c"pointer_joke2\00"
@.str.1 = [10 x i8] c"good good\00"
@.str.2 = [2 x i8] c"\0A\00"
@.str.3 = [21 x i8] c"** look at %s:%d **\0A\00"
@.str.4 = [148 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/reslaurentii/sandbox/refs/heads/master/src/printf_jokes.c\00"
@.str.5 = [14 x i8] c"----- END %s\0A\00"
define i32 @pointer_joke2() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @__FUNCTION__.pointer_joke2, i64 0, i64 0))
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 5))
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([148 x i8], [148 x i8]* @.str.4, i64 0, i64 0), i32 50)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @__FUNCTION__.pointer_joke2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [16 x i8] c"----- START %s\0A\00"
@__FUNCTION__.pointer_joke2 = [14 x i8] c"pointer_joke2\00"
@.str.1 = [10 x i8] c"good good\00"
@.str.3 = [21 x i8] c"** look at %s:%d **\0A\00"
@.str.4 = [148 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/reslaurentii/sandbox/refs/heads/master/src/printf_jokes.c\00"
@.str.5 = [14 x i8] c"----- END %s\0A\00"
define i32 @pointer_joke2() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @__FUNCTION__.pointer_joke2, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 5))
%3 = tail call i32 @putchar(i32 10)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([148 x i8], [148 x i8]* @.str.4, i64 0, i64 0), i32 50)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @__FUNCTION__.pointer_joke2, i64 0, i64 0))
ret i32 0
}