#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 */

/* Variables and functions */
int EOF;
int printf(char *, ...);
int __test() {
  int len1 = printf("%d %s\n", 8,
                    "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                    "outputs/2022-01-22/02-19-57/repos/bcforres/ccc/refs/heads/"
                    "master/test/tests/cpp/built_in_concat.c"
                    "Mar 17 2022"
                    "14:28:05");
  int len2 = printf("%s\n", "hello"
                            "foo"
                            "bob");
  return len1 + len2 + EOF;
}


x86 assembly (clang, -O0):
<__test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
mov    $0x8,%esi
lea    0xedc(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
mov    %eax,-0x4(%rbp)
lea    0xec7(%rip),%rdi
lea    0xf71(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    0x2e8e(%rip),%rcx
add    (%rcx),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__test>:
push   %rbx
lea    0xee8(%rip),%rdi
lea    0xee8(%rip),%rdx
mov    $0x8,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %eax,%ebx
lea    0xecf(%rip),%rdi
lea    0xf79(%rip),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
add    %ebx,%eax
mov    0x2e9d(%rip),%rcx
add    (%rcx),%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%d %s\0A\00"
@.str.1 = [173 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bcforres/ccc/refs/heads/master/test/tests/cpp/built_in_concat.cMar 17 202214:28:05\00"
@.str.2 = [4 x i8] c"%s\0A\00"
@.str.3 = [12 x i8] c"hellofoobob\00"
@EOF = global i32 0
define i32 @__test() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 8, i8* getelementptr inbounds ([173 x i8], [173 x i8]* @.str.1, i64 0, i64 0))
store i32 %3, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0))
store i32 %4, i32* %2
%5 = load i32, i32* %1
%6 = load i32, i32* %2
%7 = add nsw i32 %5, %6
%8 = load i32, i32* @EOF
%9 = add nsw i32 %7, %8
ret i32 %9
}

LLVM IR (-O2):
@.str = [7 x i8] c"%d %s\0A\00"
@.str.1 = [173 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bcforres/ccc/refs/heads/master/test/tests/cpp/built_in_concat.cMar 17 202214:28:05\00"
@.str.2 = [4 x i8] c"%s\0A\00"
@.str.3 = [12 x i8] c"hellofoobob\00"
@EOF = global i32 0
define i32 @__test() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 8, i8* getelementptr inbounds ([173 x i8], [173 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0))
%3 = add nsw i32 %2, %1
%4 = load i32, i32* @EOF
%5 = add nsw i32 %3, %4
ret i32 %5
}