#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 */
char *downcase(char *);
char *remove_char(char *, char *);
int /*<<< orphan*/ s_internal(char *, char *, char *, int);
char *system_(char *);
char *uname(void) {
  char *p = system_("uname");
  char *p2;
  p2 = remove_char("\r\n", p);
  (s_internal(p, "p",
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/guicho271828/roswell/refs/heads/"
              "master/src/util.c",
              148));
  return downcase(p2);
}


x86 assembly (clang, -O0):
<uname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xeb1(%rip),%rdi
call   1060 <system_@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xea3(%rip),%rdi
call   1040 <remove_char@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe92(%rip),%rsi
lea    0xe8d(%rip),%rdx
mov    $0x94,%ecx
call   1030 <s_internal@plt>
mov    -0x10(%rbp),%rdi
call   1050 <downcase@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uname>:
push   %r14
push   %rbx
push   %rax
lea    0xeb5(%rip),%rdi
call   1060 <system_@plt>
mov    %rax,%rbx
lea    0xeac(%rip),%rdi
mov    %rax,%rsi
call   1040 <remove_char@plt>
mov    %rax,%r14
lea    0xe9d(%rip),%rsi
lea    0xe98(%rip),%rdx
mov    %rbx,%rdi
mov    $0x94,%ecx
call   1030 <s_internal@plt>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1050 <downcase@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"uname\00"
@.str.1 = [3 x i8] c"\0D\0A\00"
@.str.2 = [2 x i8] c"p\00"
@.str.3 = [140 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/guicho271828/roswell/refs/heads/master/src/util.c\00"
define i8* @uname() {
%1 = alloca i8*
%2 = alloca i8*
%3 = call i8* @system_(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
store i8* %3, i8** %1
%4 = load i8*, i8** %1
%5 = call i8* @remove_char(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %4)
store i8* %5, i8** %2
%6 = load i8*, i8** %1
%7 = call i32 @s_internal(i8* %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([140 x i8], [140 x i8]* @.str.3, i64 0, i64 0), i32 148)
%8 = load i8*, i8** %2
%9 = call i8* @downcase(i8* %8)
ret i8* %9
}

LLVM IR (-O2):
@.str = [6 x i8] c"uname\00"
@.str.1 = [3 x i8] c"\0D\0A\00"
@.str.2 = [2 x i8] c"p\00"
@.str.3 = [140 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/guicho271828/roswell/refs/heads/master/src/util.c\00"
define i8* @uname() {
%1 = tail call i8* @system_(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = tail call i8* @remove_char(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %1)
%3 = tail call i32 @s_internal(i8* %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([140 x i8], [140 x i8]* @.str.3, i64 0, i64 0), i32 148)
%4 = tail call i8* @downcase(i8* %2)
ret i8* %4
}