#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 /*<<< orphan*/ log_printf(int, char *, ...);
void log_test(void) {
  int i = 112;
  char *x = "test";
  log_printf(4, "Testing");
  log_printf(3, "Number stodwadziesciatrzy: %d", 123);
  log_printf(7, "%s:%d %s",
             "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/nCore/tuntox/refs/heads/master/log.c",
             108, "beenthere");
  ;
  log_printf(7, "%s:%d %s=%d",
             "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/nCore/tuntox/refs/heads/master/log.c",
             109, "i", (i));
  ;
  log_printf(7, "%s:%d %s=%p",
             "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/nCore/tuntox/refs/heads/master/log.c",
             111, "&i", (&i));
  ;
  log_printf(7, "%s:%d %s=%s",
             "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/nCore/tuntox/refs/heads/master/log.c",
             112, "x", (x));
  ;
}


x86 assembly (clang, -O0):
<log_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x70,-0x4(%rbp)
lea    0xeda(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    $0x4,%edi
lea    0xecf(%rip),%rsi
mov    $0x0,%al
call   1030 <log_printf@plt>
mov    $0x3,%edi
lea    0xec4(%rip),%rsi
mov    $0x7b,%edx
mov    $0x0,%al
call   1030 <log_printf@plt>
mov    $0x7,%edi
lea    0xeca(%rip),%rsi
lea    0xecc(%rip),%rdx
mov    $0x6c,%ecx
lea    0xf3f(%rip),%r8
mov    $0x0,%al
call   1030 <log_printf@plt>
mov    -0x4(%rbp),%r9d
mov    $0x7,%edi
lea    0xf32(%rip),%rsi
lea    0xea2(%rip),%rdx
mov    $0x6d,%ecx
lea    0xf38(%rip),%r8
mov    $0x0,%al
call   1030 <log_printf@plt>
mov    $0x7,%edi
lea    0xf18(%rip),%rsi
lea    0xe7c(%rip),%rdx
mov    $0x6f,%ecx
lea    0xf11(%rip),%r8
lea    -0x4(%rbp),%r9
mov    $0x0,%al
call   1030 <log_printf@plt>
mov    -0x10(%rbp),%r9
mov    $0x7,%edi
lea    0xef9(%rip),%rsi
lea    0xe4e(%rip),%rdx
mov    $0x70,%ecx
lea    0xef2(%rip),%r8
mov    $0x0,%al
call   1030 <log_printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log_test>:
push   %rbx
sub    $0x10,%rsp
movl   $0x70,0xc(%rsp)
lea    0xee1(%rip),%rsi
mov    $0x4,%edi
xor    %eax,%eax
call   1030 <log_printf@plt>
lea    0xed6(%rip),%rsi
mov    $0x3,%edi
mov    $0x7b,%edx
xor    %eax,%eax
call   1030 <log_printf@plt>
lea    0xedc(%rip),%rsi
lea    0xede(%rip),%rbx
lea    0xf56(%rip),%r8
mov    $0x7,%edi
mov    %rbx,%rdx
mov    $0x6c,%ecx
xor    %eax,%eax
call   1030 <log_printf@plt>
lea    0xf45(%rip),%rsi
lea    0xf57(%rip),%r8
mov    $0x7,%edi
mov    %rbx,%rdx
mov    $0x6d,%ecx
mov    $0x70,%r9d
xor    %eax,%eax
call   1030 <log_printf@plt>
lea    0xf29(%rip),%rsi
lea    0xf2e(%rip),%r8
lea    0xc(%rsp),%r9
mov    $0x7,%edi
mov    %rbx,%rdx
mov    $0x6f,%ecx
xor    %eax,%eax
call   1030 <log_printf@plt>
lea    0xf11(%rip),%rsi
lea    0xf16(%rip),%r8
lea    0xe2b(%rip),%r9
mov    $0x7,%edi
mov    %rbx,%rdx
mov    $0x70,%ecx
xor    %eax,%eax
call   1030 <log_printf@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"test\00"
@.str.1 = [8 x i8] c"Testing\00"
@.str.2 = [30 x i8] c"Number stodwadziesciatrzy: %d\00"
@.str.3 = [9 x i8] c"%s:%d %s\00"
@.str.4 = [127 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/nCore/tuntox/refs/heads/master/log.c\00"
@.str.5 = [10 x i8] c"beenthere\00"
@.str.6 = [12 x i8] c"%s:%d %s=%d\00"
@.str.7 = [2 x i8] c"i\00"
@.str.8 = [12 x i8] c"%s:%d %s=%p\00"
@.str.9 = [3 x i8] c"&i\00"
@.str.10 = [12 x i8] c"%s:%d %s=%s\00"
@.str.11 = [2 x i8] c"x\00"
define void @log_test() {
%1 = alloca i32
%2 = alloca i8*
store i32 112, i32* %1
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8** %2
%3 = call i32 (i32, i8*, ...) @log_printf(i32 4, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 (i32, i8*, ...) @log_printf(i32 3, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), i32 123)
%5 = call i32 (i32, i8*, ...) @log_printf(i32 7, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([127 x i8], [127 x i8]* @.str.4, i64 0, i64 0), i32 108, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0))
%6 = load i32, i32* %1
%7 = call i32 (i32, i8*, ...) @log_printf(i32 7, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([127 x i8], [127 x i8]* @.str.4, i64 0, i64 0), i32 109, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0), i32 %6)
%8 = call i32 (i32, i8*, ...) @log_printf(i32 7, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([127 x i8], [127 x i8]* @.str.4, i64 0, i64 0), i32 111, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i32* %1)
%9 = load i8*, i8** %2
%10 = call i32 (i32, i8*, ...) @log_printf(i32 7, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([127 x i8], [127 x i8]* @.str.4, i64 0, i64 0), i32 112, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0), i8* %9)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"test\00"
@.str.1 = [8 x i8] c"Testing\00"
@.str.2 = [30 x i8] c"Number stodwadziesciatrzy: %d\00"
@.str.3 = [9 x i8] c"%s:%d %s\00"
@.str.4 = [127 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/nCore/tuntox/refs/heads/master/log.c\00"
@.str.5 = [10 x i8] c"beenthere\00"
@.str.6 = [12 x i8] c"%s:%d %s=%d\00"
@.str.7 = [2 x i8] c"i\00"
@.str.8 = [12 x i8] c"%s:%d %s=%p\00"
@.str.9 = [3 x i8] c"&i\00"
@.str.10 = [12 x i8] c"%s:%d %s=%s\00"
@.str.11 = [2 x i8] c"x\00"
define void @log_test() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 112, i32* %1
%3 = tail call i32 (i32, i8*, ...) @log_printf(i32 4, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 (i32, i8*, ...) @log_printf(i32 3, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), i32 123)
%5 = tail call i32 (i32, i8*, ...) @log_printf(i32 7, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([127 x i8], [127 x i8]* @.str.4, i64 0, i64 0), i32 108, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0))
%6 = tail call i32 (i32, i8*, ...) @log_printf(i32 7, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([127 x i8], [127 x i8]* @.str.4, i64 0, i64 0), i32 109, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0), i32 112)
%7 = call i32 (i32, i8*, ...) @log_printf(i32 7, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([127 x i8], [127 x i8]* @.str.4, i64 0, i64 0), i32 111, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i32* %1)
%8 = call i32 (i32, i8*, ...) @log_printf(i32 7, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([127 x i8], [127 x i8]* @.str.4, i64 0, i64 0), i32 112, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}