xunge/DecIR huggingface dataset:
/* Type definitions */
struct t_config_option {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ irc_nick_nicklist_set_color_all();
void irc_config_change_look_color_nicks_in_nicklist(
    void *data, struct t_config_option *option) {
  (void)data;
  (void)option;
  irc_nick_nicklist_set_color_all();
}


x86 assembly (clang, -O0):
<irc_config_change_look_color_nicks_in_nicklist>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <irc_nick_nicklist_set_color_all@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<irc_config_change_look_color_nicks_in_nicklist>:
xor    %eax,%eax
jmp    1030 <irc_nick_nicklist_set_color_all@plt>

LLVM IR (-O0):
%struct.t_config_option = type { i32 }
define void @irc_config_change_look_color_nicks_in_nicklist(i8* %0, %struct.t_config_option* %1) {
%3 = alloca i8*
%4 = alloca %struct.t_config_option*
store i8* %0, i8** %3
store %struct.t_config_option* %1, %struct.t_config_option** %4
%5 = load i8*, i8** %3
%6 = load %struct.t_config_option*, %struct.t_config_option** %4
%7 = call i32 (...) @irc_nick_nicklist_set_color_all()
ret void
}

LLVM IR (-O2):
%struct.t_config_option = type { i32 }
define void @irc_config_change_look_color_nicks_in_nicklist(i8* nocapture readnone %0, %struct.t_config_option* nocapture readnone %1) {
%3 = tail call i32 (...) @irc_nick_nicklist_set_color_all()
ret void
}
/* Variables and functions */
int strtol(char const *, char **, int);
int strict_atoi(const char *s) {
  char *end;
  int ret = strtol(s, &end, 10);
  if (*end)
    return -1;
  else
    return ret;
}


x86 assembly (clang, -O0):
<strict_atoi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
mov    $0xa,%edx
call   1030 <strtol@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
je     114a <strict_atoi+0x3a>
movl   $0xffffffff,-0x4(%rbp)
jmp    1150 <strict_atoi+0x40>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strict_atoi>:
push   %rax
mov    %rsp,%rsi
mov    $0xa,%edx
call   1030 <strtol@plt>
mov    (%rsp),%rcx
xor    %edx,%edx
cmp    (%rcx),%dl
sbb    %ecx,%ecx
or     %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @strict_atoi(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %3
%6 = load i8*, i8** %3
%7 = call i32 @strtol(i8* %6, i8** %4, i32 10)
store i32 %7, i32* %5
%8 = load i8*, i8** %4
%9 = load i8, i8* %8
%10 = icmp ne i8 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %1
store i32 -1, i32* %2
br label %14
12: ; preds = %1
%13 = load i32, i32* %5
store i32 %13, i32* %2
br label %14
14: ; preds = %12, %11
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @strict_atoi(i8* %0) {
%2 = alloca i8*
%3 = bitcast i8** %2 to i8*
%4 = call i32 @strtol(i8* %0, i8** %2, i32 10)
%5 = load i8*, i8** %2
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
%8 = select i1 %7, i32 %4, i32 -1
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ to_decimal(int);
void main() {
  int num = 23489;
  to_decimal(num);
  printf("\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x5bc1,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <to_decimal@plt>
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x5bc1,%edi
call   1040 <to_decimal@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
define void @main() {
%1 = alloca i32
store i32 23489, i32* %1
%2 = load i32, i32* %1
%3 = call i32 @to_decimal(i32 %2)
%4 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 @to_decimal(i32 23489)
%2 = tail call i32 @putchar(i32 10)
ret void
}
void SSMR3GetS8(void) {}


x86 assembly (clang, -O0):
<SSMR3GetS8>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SSMR3GetS8>:
ret

LLVM IR (-O0):
define void @SSMR3GetS8() {
ret void
}

LLVM IR (-O2):
define void @SSMR3GetS8() {
ret void
}
int isdigit(int c) {
  if (c >= '0' && c <= '9') {
    return (c);
  } else {
    return (0);
  }
}


x86 assembly (clang, -O0):
<isdigit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x30,-0x8(%rbp)
jl     1126 <isdigit+0x26>
cmpl   $0x39,-0x8(%rbp)
jg     1126 <isdigit+0x26>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    112d <isdigit+0x2d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isdigit>:
lea    -0x30(%rdi),%ecx
xor    %eax,%eax
cmp    $0xa,%ecx
cmovb  %edi,%eax
ret

LLVM IR (-O0):
define i32 @isdigit(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sge i32 %4, 48
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sle i32 %7, 57
br i1 %8, label %9, label %11
9: ; preds = %6
%10 = load i32, i32* %3
store i32 %10, i32* %2
br label %12
11: ; preds = %6, %1
store i32 0, i32* %2
br label %12
12: ; preds = %11, %9
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
define i32 @isdigit(i32 %0) {
%2 = add i32 %0, -48
%3 = icmp ult i32 %2, 10
%4 = select i1 %3, i32 %0, i32 0
ret i32 %4
}
/* Variables and functions */
void ft_bzero(void *s, size_t n) {
  size_t i;
  char *save;
  i = -1;
  save = s;
  while (++i < n)
    save[i] = '\0';
}


x86 assembly (clang, -O0):
<ft_bzero>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0xffffffffffffffff,-0x18(%rbp)
ff
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
cmp    -0x10(%rbp),%rax
jae    1143 <ft_bzero+0x43>
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
jmp    111c <ft_bzero+0x1c>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_bzero>:
test   %rsi,%rsi
je     1124 <ft_bzero+0x14>
push   %rax
mov    %rsi,%rdx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

LLVM IR (-O0):
define void @ft_bzero(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i64
%6 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
store i64 -1, i64* %5
%7 = load i8*, i8** %3
store i8* %7, i8** %6
br label %8
8: ; preds = %13, %2
%9 = load i64, i64* %5
%10 = add i64 %9, 1
store i64 %10, i64* %5
%11 = load i64, i64* %4
%12 = icmp ult i64 %10, %11
br i1 %12, label %13, label %17
13: ; preds = %8
%14 = load i8*, i8** %6
%15 = load i64, i64* %5
%16 = getelementptr inbounds i8, i8* %14, i64 %15
store i8 0, i8* %16
br label %8
17: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @ft_bzero(i8* nocapture writeonly %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %5, label %4
4: ; preds = %2
br label %5
5: ; preds = %4, %2
ret void
}
/* Variables and functions */
char *ft_itoa(int);
int /*<<< orphan*/ ft_putendl(char *);
void ft_putnbrendl(int i) {
  char *nbr;
  nbr = ft_itoa(i);
  ft_putendl(nbr);
  return;
}


x86 assembly (clang, -O0):
<ft_putnbrendl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <ft_itoa@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <ft_putendl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_putnbrendl>:
push   %rax
call   1030 <ft_itoa@plt>
mov    %rax,%rdi
pop    %rax
jmp    1040 <ft_putendl@plt>

LLVM IR (-O0):
define void @ft_putnbrendl(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i8* @ft_itoa(i32 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = call i32 @ft_putendl(i8* %6)
ret void
}

LLVM IR (-O2):
define void @ft_putnbrendl(i32 %0) {
%2 = tail call i8* @ft_itoa(i32 %0)
%3 = tail call i32 @ft_putendl(i8* %2)
ret void
}
int test_imm_D5uint8_mem(unsigned char *val) {
  return ((*val) & (0xD5 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_D5uint8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%edx
and    $0xd5,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_D5uint8_mem>:
testb  $0xd5,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_D5uint8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = and i32 %5, 213
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_D5uint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -43
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ sigset_t;

/* Variables and functions */
int sigemptyset(int /*<<< orphan*/ *);
int main(void) {
  sigset_t set;
  int status = sigemptyset(&set);
  return status;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x8(%rbp),%rdi
call   1030 <sigemptyset@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0x4(%rsp),%rdi
call   1030 <sigemptyset@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 @sigemptyset(i32* %2)
store i32 %4, i32* %3
%5 = load i32, i32* %3
ret i32 %5
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @sigemptyset(i32* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ ot(char *);
void deflong(void) { ot("defl\t"); }


x86 assembly (clang, -O0):
<deflong>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <ot@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<deflong>:
lea    0xee9(%rip),%rdi
jmp    1030 <ot@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"defl\09\00"
define void @deflong() {
%1 = call i32 @ot(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"defl\09\00"
define void @deflong() {
%1 = tail call i32 @ot(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ VIM_SIF_I2cReadByte(int, unsigned char *);
int /*<<< orphan*/ VIM_SIF_I2cWriteByte(int, unsigned char);
void SensorSetMirrorFlip_OV7725(unsigned char val) {
  unsigned char x;
  val = ~val;
  VIM_SIF_I2cReadByte(0x0c, &x);
  VIM_SIF_I2cWriteByte(0x0c, (unsigned char)(x & 0x3f) | ((val & 0x03) << 6));
}


x86 assembly (clang, -O0):
<SensorSetMirrorFlip_OV7725>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0x1(%rbp)
mov    $0xc,%edi
lea    -0x2(%rbp),%rsi
call   1030 <VIM_SIF_I2cReadByte@plt>
movzbl -0x2(%rbp),%eax
and    $0x3f,%eax
movzbl %al,%eax
movzbl -0x1(%rbp),%ecx
and    $0x3,%ecx
shl    $0x6,%ecx
or     %ecx,%eax
mov    $0xc,%edi
movzbl %al,%esi
call   1040 <VIM_SIF_I2cWriteByte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SensorSetMirrorFlip_OV7725>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
lea    0xf(%rsp),%rsi
mov    $0xc,%edi
call   1030 <VIM_SIF_I2cReadByte@plt>
mov    0xf(%rsp),%al
and    $0x3f,%al
not    %bl
shl    $0x6,%bl
or     %al,%bl
movzbl %bl,%esi
mov    $0xc,%edi
call   1040 <VIM_SIF_I2cWriteByte@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @SensorSetMirrorFlip_OV7725(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %2
%4 = load i8, i8* %2
%5 = zext i8 %4 to i32
%6 = xor i32 %5, -1
%7 = trunc i32 %6 to i8
store i8 %7, i8* %2
%8 = call i32 @VIM_SIF_I2cReadByte(i32 12, i8* %3)
%9 = load i8, i8* %3
%10 = zext i8 %9 to i32
%11 = and i32 %10, 63
%12 = trunc i32 %11 to i8
%13 = zext i8 %12 to i32
%14 = load i8, i8* %2
%15 = zext i8 %14 to i32
%16 = and i32 %15, 3
%17 = shl i32 %16, 6
%18 = or i32 %13, %17
%19 = trunc i32 %18 to i8
%20 = call i32 @VIM_SIF_I2cWriteByte(i32 12, i8 zeroext %19)
ret void
}

LLVM IR (-O2):
define void @SensorSetMirrorFlip_OV7725(i8 zeroext %0) {
%2 = alloca i8
%3 = call i32 @VIM_SIF_I2cReadByte(i32 12, i8* %2)
%4 = load i8, i8* %2
%5 = and i8 %4, 63
%6 = xor i8 %0, -1
%7 = shl i8 %6, 6
%8 = or i8 %5, %7
%9 = call i32 @VIM_SIF_I2cWriteByte(i32 12, i8 zeroext %8)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int XESetCopyGC() {
  printf("XESetCopyGC called\n");
  return 0;
}


x86 assembly (clang, -O0):
<XESetCopyGC>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<XESetCopyGC>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"XESetCopyGC called\0A\00"
define i32 @XESetCopyGC() {
%1 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [19 x i8] c"XESetCopyGC called\00"
define i32 @XESetCopyGC() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ srand(int);
void setSeed(int seed) { srand(seed); }


x86 assembly (clang, -O0):
<setSeed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <srand@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setSeed>:
jmp    1030 <srand@plt>

LLVM IR (-O0):
define void @setSeed(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @srand(i32 %3)
ret void
}

LLVM IR (-O2):
define void @setSeed(i32 %0) {
%2 = tail call i32 @srand(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *translateTime(char *);
int /*<<< orphan*/ write(char *, char *, char *);
void function_time(char *time) {
  char *t = translateTime(time);
  write("msproject.xml", "\t<ManualDuration>%s</ManualDuration>\n", t);
  free(t);
}


x86 assembly (clang, -O0):
<function_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <translateTime@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdx
lea    0xeac(%rip),%rdi
lea    0xeb3(%rip),%rsi
call   1040 <write@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<function_time>:
push   %rbx
call   1050 <translateTime@plt>
mov    %rax,%rbx
lea    0xec0(%rip),%rdi
lea    0xec7(%rip),%rsi
mov    %rax,%rdx
call   1040 <write@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"msproject.xml\00"
@.str.1 = [38 x i8] c"\09<ManualDuration>%s</ManualDuration>\0A\00"
define void @function_time(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @translateTime(i8* %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = call i32 @write(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0), i8* %6)
%8 = load i8*, i8** %3
%9 = call i32 @free(i8* %8)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"msproject.xml\00"
@.str.1 = [38 x i8] c"\09<ManualDuration>%s</ManualDuration>\0A\00"
define void @function_time(i8* %0) {
%2 = tail call i8* @translateTime(i8* %0)
%3 = tail call i32 @write(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%4 = tail call i32 @free(i8* %2)
ret void
}
void gdk_window_set_transient_for() {}


x86 assembly (clang, -O0):
<gdk_window_set_transient_for>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gdk_window_set_transient_for>:
ret

LLVM IR (-O0):
define void @gdk_window_set_transient_for() {
ret void
}

LLVM IR (-O2):
define void @gdk_window_set_transient_for() {
ret void
}
/* Variables and functions */
double gk_vector_evaluate(unsigned int);
scalar_t__ malloc(int);
int /*<<< orphan*/ sprintf(char *, char *, double);
char *gk_vector_display(unsigned int dna) {
  char *buffer = (char *)malloc(sizeof(char) * 20);
  sprintf(buffer, "%f\n", gk_vector_evaluate(dna));
  return buffer;
}


x86 assembly (clang, -O0):
<gk_vector_display>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x14,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <gk_vector_evaluate@plt>
mov    -0x18(%rbp),%rdi
lea    0xe9c(%rip),%rsi
call   1050 <sprintf@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gk_vector_display>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
mov    $0x14,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    %ebp,%edi
call   1030 <gk_vector_evaluate@plt>
lea    0xeb0(%rip),%rsi
mov    %rbx,%rdi
call   1050 <sprintf@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%f\0A\00"
define i8* @gk_vector_display(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = call i64 @malloc(i32 20)
%5 = inttoptr i64 %4 to i8*
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = load i32, i32* %2
%8 = call double @gk_vector_evaluate(i32 %7)
%9 = call i32 @sprintf(i8* %6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %8)
%10 = load i8*, i8** %3
ret i8* %10
}

LLVM IR (-O2):
@.str = [4 x i8] c"%f\0A\00"
define i8* @gk_vector_display(i32 %0) {
%2 = tail call i64 @malloc(i32 20)
%3 = inttoptr i64 %2 to i8*
%4 = tail call double @gk_vector_evaluate(i32 %0)
%5 = tail call i32 @sprintf(i8* dereferenceable(1) %3, i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %4)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ D_T_FMT;
int /*<<< orphan*/ LC_ALL;
char *nl_langinfo(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ setlocale(int /*<<< orphan*/, char *);
int main(int argc, char **argv) {
  setlocale(LC_ALL, "");
  printf("D_T_FMT: %s\n", nl_langinfo(D_T_FMT));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e8b(%rip),%rax
mov    (%rax),%edi
lea    0xeb6(%rip),%rsi
call   1050 <setlocale@plt>
mov    0x2e7e(%rip),%rax
mov    (%rax),%edi
call   1040 <nl_langinfo@plt>
mov    %rax,%rsi
lea    0xe8d(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ea0(%rip),%rax
mov    (%rax),%edi
lea    0xecb(%rip),%rsi
call   1050 <setlocale@plt>
mov    0x2e93(%rip),%rax
mov    (%rax),%edi
call   1040 <nl_langinfo@plt>
lea    0xea5(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@LC_ALL = global i32 0
@.str = [1 x i8] zeroinitializer
@.str.1 = [13 x i8] c"D_T_FMT: %s\0A\00"
@D_T_FMT = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* @LC_ALL
%7 = call i32 @setlocale(i32 %6, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* @D_T_FMT
%9 = call i8* @nl_langinfo(i32 %8)
%10 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* %9)
ret i32 0
}

LLVM IR (-O2):
@LC_ALL = global i32 0
@.str = [1 x i8] zeroinitializer
@.str.1 = [13 x i8] c"D_T_FMT: %s\0A\00"
@D_T_FMT = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @LC_ALL
%4 = tail call i32 @setlocale(i32 %3, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* @D_T_FMT
%6 = tail call i8* @nl_langinfo(i32 %5)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* %6)
ret i32 0
}
int read(int fd, void *buff, unsigned int size) {
  int ret;
  asm("movl $3, %%eax\n\t"
      "movl %1, %%ebx\n\t"
      "movl %2, %%ecx\n\t"
      "movl %3, %%edx\n\t"
      "int $0x80\n\t"
      "movl %%eax, %0"
      : "=m"(ret)
      : "m"(fd), "m"(buff), "m"(size));
  return ret;
}


x86 assembly (clang, -O0):
<read>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    $0x3,%eax
mov    -0x4(%rbp),%ebx
mov    -0x10(%rbp),%ecx
mov    -0x14(%rbp),%edx
int    $0x80
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<read>:
mov    %edi,-0xc(%rsp)
mov    %rsi,-0x8(%rsp)
mov    %edx,-0x10(%rsp)
mov    $0x3,%eax
mov    -0xc(%rsp),%ebx
mov    -0x8(%rsp),%ecx
mov    -0x10(%rsp),%edx
int    $0x80
mov    %eax,-0x14(%rsp)
mov    -0x14(%rsp),%eax
ret

LLVM IR (-O0):
define i32 @read(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%8 = load i32, i32* %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @read(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%8 = bitcast i32* %7 to i8*
%9 = load i32, i32* %7
ret i32 %9
}
/* Variables and functions */
double calculate(int, int, int);
int /*<<< orphan*/ printf(char *, ...);
int main() {
  printf("Resultado: %3.2f\n", calculate(2, 3, 4));
  printf("\n\n");
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x2,%edi
mov    $0x3,%esi
mov    $0x4,%edx
call   1040 <calculate@plt>
lea    0xeb6(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x2,%edi
mov    $0x3,%esi
mov    $0x4,%edx
call   1050 <calculate@plt>
lea    0xeb4(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xeb6(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"Resultado: %3.2f\0A\00"
@.str.1 = [3 x i8] c"\0A\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call double @calculate(i32 2, i32 3, i32 4)
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), double %2)
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [18 x i8] c"Resultado: %3.2f\0A\00"
@str = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = tail call double @calculate(i32 2, i32 3, i32 4)
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), double %1)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SEEK_END;
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, long, int /*<<< orphan*/);
size_t ftell(int /*<<< orphan*/ *);
int munmap(void *, size_t);
int /*<<< orphan*/ rewind(int /*<<< orphan*/ *);
int mem_fileunmap(FILE *fobj, void *map) {
  fseek(fobj, 0L, SEEK_END);
  size_t fsize = ftell(fobj);
  rewind(fobj);
  return munmap(map, fsize);
}


x86 assembly (clang, -O0):
<mem_fileunmap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2e8d(%rip),%rax
mov    (%rax),%edx
xor    %eax,%eax
mov    %eax,%esi
call   1050 <fseek@plt>
mov    -0x8(%rbp),%rdi
call   1040 <ftell@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <rewind@plt>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1060 <munmap@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mem_fileunmap>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
mov    0x2e96(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1050 <fseek@plt>
mov    %rbx,%rdi
call   1040 <ftell@plt>
mov    %rax,%r15
mov    %rbx,%rdi
call   1030 <rewind@plt>
mov    %r14,%rdi
mov    %r15,%rsi
pop    %rbx
pop    %r14
pop    %r15
jmp    1060 <munmap@plt>

LLVM IR (-O0):
@SEEK_END = global i32 0
define i32 @mem_fileunmap(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
%5 = alloca i64
store i32* %0, i32** %3
store i8* %1, i8** %4
%6 = load i32*, i32** %3
%7 = load i32, i32* @SEEK_END
%8 = call i32 @fseek(i32* %6, i64 0, i32 %7)
%9 = load i32*, i32** %3
%10 = call i64 @ftell(i32* %9)
store i64 %10, i64* %5
%11 = load i32*, i32** %3
%12 = call i32 @rewind(i32* %11)
%13 = load i8*, i8** %4
%14 = load i64, i64* %5
%15 = call i32 @munmap(i8* %13, i64 %14)
ret i32 %15
}

LLVM IR (-O2):
@SEEK_END = global i32 0
define i32 @mem_fileunmap(i32* nocapture %0, i8* %1) {
%3 = load i32, i32* @SEEK_END
%4 = tail call i32 @fseek(i32* %0, i64 0, i32 %3)
%5 = tail call i64 @ftell(i32* %0)
%6 = tail call i32 @rewind(i32* %0)
%7 = tail call i32 @munmap(i8* %1, i64 %5)
ret i32 %7
}
void ata_acpi_unregister(void) {}


x86 assembly (clang, -O0):
<ata_acpi_unregister>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ata_acpi_unregister>:
ret

LLVM IR (-O0):
define void @ata_acpi_unregister() {
ret void
}

LLVM IR (-O2):
define void @ata_acpi_unregister() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, unsigned int,
                           char const *, unsigned int);
int /*<<< orphan*/ stderr;
void alloc_failed_warning(unsigned size, const char *filename, unsigned line) {
  fprintf(stderr,
          "WARNING: out-of-memory allocating a block of size %u (%s:%u)\n",
          size, filename, line);
}


x86 assembly (clang, -O0):
<alloc_failed_warning>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    0x2eb7(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%edx
mov    -0x10(%rbp),%rcx
mov    -0x14(%rbp),%r8d
lea    0xec3(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<alloc_failed_warning>:
mov    %edx,%r8d
mov    %rsi,%rcx
mov    %edi,%edx
mov    0x2ec1(%rip),%rax
mov    (%rax),%edi
lea    0xed8(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [62 x i8] c"WARNING: out-of-memory allocating a block of size %u (%s:%u)\0A\00"
define void @alloc_failed_warning(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i32, i32* @stderr
%8 = load i32, i32* %4
%9 = load i8*, i8** %5
%10 = load i32, i32* %6
%11 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0), i32 %8, i8* %9, i32 %10)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [62 x i8] c"WARNING: out-of-memory allocating a block of size %u (%s:%u)\0A\00"
define void @alloc_failed_warning(i32 %0, i8* %1, i32 %2) {
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0), i32 %0, i8* %1, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SWI_DriverIRQHandler();
__attribute__((weak)) void SWI_IRQHandler(void) { SWI_DriverIRQHandler(); }


x86 assembly (clang, -O0):
<SWI_IRQHandler>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <SWI_DriverIRQHandler@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<SWI_IRQHandler>:
xor    %eax,%eax
jmp    1030 <SWI_DriverIRQHandler@plt>

LLVM IR (-O0):
define weak void @SWI_IRQHandler() {
%1 = call i32 (...) @SWI_DriverIRQHandler()
ret void
}

LLVM IR (-O2):
define weak void @SWI_IRQHandler() {
%1 = tail call i32 (...) @SWI_DriverIRQHandler()
ret void
}
/* Variables and functions */
void *fail_on_null(int /*<<< orphan*/);
int /*<<< orphan*/ malloc(size_t);
void *xmalloc(size_t s) { return fail_on_null(malloc(s)); }


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <malloc@plt>
mov    %eax,%edi
call   1040 <fail_on_null@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %rax
call   1030 <malloc@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <fail_on_null@plt>

LLVM IR (-O0):
define i8* @xmalloc(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i32 @malloc(i64 %3)
%5 = call i8* @fail_on_null(i32 %4)
ret i8* %5
}

LLVM IR (-O2):
define i8* @xmalloc(i64 %0) {
%2 = tail call i32 @malloc(i64 %0)
%3 = tail call i8* @fail_on_null(i32 %2)
ret i8* %3
}
double dbl_mul_add(double a, double b, double c) { return (a * b) + c; }


x86 assembly (clang, -O0):
<dbl_mul_add>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
movsd  -0x18(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<dbl_mul_add>:
mulsd  %xmm1,%xmm0
addsd  %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @dbl_mul_add(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %4
%8 = load double, double* %5
%9 = load double, double* %6
%10 = call double @llvm.fmuladd.f64(double %7, double %8, double %9)
ret double %10
}

LLVM IR (-O2):
define double @dbl_mul_add(double %0, double %1, double %2) {
%4 = tail call double @llvm.fmuladd.f64(double %0, double %1, double %2)
ret double %4
}
void EC_POINT_free(void) {}


x86 assembly (clang, -O0):
<EC_POINT_free>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EC_POINT_free>:
ret

LLVM IR (-O0):
define void @EC_POINT_free() {
ret void
}

LLVM IR (-O2):
define void @EC_POINT_free() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fortchartoc(char *);
int /*<<< orphan*/ gmvwrite_nodeids_fromfile(int /*<<< orphan*/);
void fgmvwrite_nodeids_fromfile_(char filnam[]) {
  gmvwrite_nodeids_fromfile(fortchartoc(filnam));
}


x86 assembly (clang, -O0):
<fgmvwrite_nodeids_fromfile_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <fortchartoc@plt>
mov    %eax,%edi
call   1040 <gmvwrite_nodeids_fromfile@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fgmvwrite_nodeids_fromfile_>:
push   %rax
call   1030 <fortchartoc@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <gmvwrite_nodeids_fromfile@plt>

LLVM IR (-O0):
define void @fgmvwrite_nodeids_fromfile_(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @fortchartoc(i8* %3)
%5 = call i32 @gmvwrite_nodeids_fromfile(i32 %4)
ret void
}

LLVM IR (-O2):
define void @fgmvwrite_nodeids_fromfile_(i8* %0) {
%2 = tail call i32 @fortchartoc(i8* %0)
%3 = tail call i32 @gmvwrite_nodeids_fromfile(i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void stampaOra(int minuti) {
  if (minuti % 60 < 10)
    printf("%2d:0%1d", (int)(minuti / 60) % 24, minuti % 60);
  else
    printf("%2d:%2d", (int)(minuti / 60) % 24, minuti % 60);
}


x86 assembly (clang, -O0):
<stampaOra>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x3c,%ecx
cltd
idiv   %ecx
cmp    $0xa,%edx
jge    1160 <stampaOra+0x50>
mov    -0x4(%rbp),%eax
mov    $0x3c,%ecx
cltd
idiv   %ecx
mov    $0x18,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
mov    -0x4(%rbp),%eax
mov    $0x3c,%ecx
cltd
idiv   %ecx
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
jmp    118c <stampaOra+0x7c>
mov    -0x4(%rbp),%eax
mov    $0x3c,%ecx
cltd
idiv   %ecx
mov    $0x18,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
mov    -0x4(%rbp),%eax
mov    $0x3c,%ecx
cltd
idiv   %ecx
lea    0xe82(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stampaOra>:
movslq %edi,%rdx
imul   $0xffffffff88888889,%rdx,%rax
shr    $0x20,%rax
add    %edx,%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
sar    $0x5,%eax
add    %ecx,%eax
imul   $0x3c,%eax,%ecx
sub    %ecx,%edx
movslq %eax,%rsi
imul   $0x2aaaaaab,%rsi,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
shr    $0x22,%rax
add    %ecx,%eax
shl    $0x3,%eax
lea    (%rax,%rax,2),%eax
sub    %eax,%esi
cmp    $0xa,%edx
lea    0xea8(%rip),%rax
lea    0xeaa(%rip),%rdi
cmovl  %rax,%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"%2d:0%1d\00"
@.str.1 = [8 x i8] c"%2d:%2d\00"
define void @stampaOra(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = srem i32 %3, 60
%5 = icmp slt i32 %4, 10
br i1 %5, label %6, label %13
6: ; preds = %1
%7 = load i32, i32* %2
%8 = sdiv i32 %7, 60
%9 = srem i32 %8, 24
%10 = load i32, i32* %2
%11 = srem i32 %10, 60
%12 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %9, i32 %11)
br label %20
13: ; preds = %1
%14 = load i32, i32* %2
%15 = sdiv i32 %14, 60
%16 = srem i32 %15, 24
%17 = load i32, i32* %2
%18 = srem i32 %17, 60
%19 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 %16, i32 %18)
br label %20
20: ; preds = %13, %6
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"%2d:0%1d\00"
@.str.1 = [8 x i8] c"%2d:%2d\00"
define void @stampaOra(i32 %0) {
%2 = srem i32 %0, 60
%3 = icmp slt i32 %2, 10
%4 = sdiv i32 %0, 60
%5 = srem i32 %4, 24
%6 = select i1 %3, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0)
%7 = tail call i32 @printf(i8* %6, i32 %5, i32 %2)
ret void
}
/* Variables and functions */
char *calloc(int, int);
int rand();
int /*<<< orphan*/ strcpy(char *, char *);
char *fn108() {
  char *result;
  result = calloc(5 + rand() % 5, 4);
  strcpy((char *)result, "fn108");
  return result;
}


x86 assembly (clang, -O0):
<fn108>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <rand@plt>
mov    $0x5,%ecx
cltd
idiv   %ecx
mov    %edx,%edi
add    $0x5,%edi
mov    $0x4,%esi
call   1040 <calloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe9b(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn108>:
push   %rbx
xor    %eax,%eax
call   1050 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x21,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,4),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%edi
add    $0x5,%edi
mov    $0x4,%esi
call   1040 <calloc@plt>
mov    %rax,%rbx
lea    0xe93(%rip),%rsi
mov    %rax,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"fn108\00"
define i8* @fn108() {
%1 = alloca i8*
%2 = call i32 (...) @rand()
%3 = srem i32 %2, 5
%4 = add nsw i32 5, %3
%5 = call i8* @calloc(i32 %4, i32 4)
store i8* %5, i8** %1
%6 = load i8*, i8** %1
%7 = call i32 @strcpy(i8* %6, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%8 = load i8*, i8** %1
ret i8* %8
}

LLVM IR (-O2):
@.str = [6 x i8] c"fn108\00"
define i8* @fn108() {
%1 = tail call i32 (...) @rand()
%2 = srem i32 %1, 5
%3 = add nsw i32 %2, 5
%4 = tail call i8* @calloc(i32 %3, i32 4)
%5 = tail call i32 @strcpy(i8* %4, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, char *);
int /*<<< orphan*/ system(char *);
void remove_file(char *filename) {
  char sys_string[128];
  sprintf(sys_string, "rm -f %s", filename);
  system(sys_string);
}


x86 assembly (clang, -O0):
<remove_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x90(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xebf(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x90(%rbp),%rdi
call   1030 <system@plt>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<remove_file>:
push   %rbx
sub    $0x80,%rsp
mov    %rdi,%rdx
lea    0xece(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <system@plt>
add    $0x80,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"rm -f %s\00"
define void @remove_file(i8* %0) {
%2 = alloca i8*
%3 = alloca [128 x i8]
store i8* %0, i8** %2
%4 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%5 = load i8*, i8** %2
%6 = call i32 @sprintf(i8* %4, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%8 = call i32 @system(i8* %7)
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"rm -f %s\00"
define void @remove_file(i8* %0) {
%2 = alloca [128 x i8]
%3 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 0
%4 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = call i32 @system(i8* %3)
ret void
}
unsigned int sub5(unsigned int i) {
  unsigned int j;
  j = i >> 24;
  j = j * (1 << 24);
  j = i - j;
  return j;
}


x86 assembly (clang, -O0):
<sub5>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x18,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x18,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sub5>:
mov    %edi,%eax
and    $0xffffff,%eax
ret

LLVM IR (-O0):
define i32 @sub5(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = lshr i32 %4, 24
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = mul i32 %6, 16777216
store i32 %7, i32* %3
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = sub i32 %8, %9
store i32 %10, i32* %3
%11 = load i32, i32* %3
ret i32 %11
}

LLVM IR (-O2):
define i32 @sub5(i32 %0) {
%2 = and i32 %0, 16777215
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) { printf("%d\n", argc); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%esi
lea    0xed7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    %edi,%esi
lea    0xee6(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* %3
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i32 0
}
/* Variables and functions */
int memcmp(void const *, void const *, int);
int ip_port_cmp(const void *a, const void *b) { return memcmp(a, b, 6); }


x86 assembly (clang, -O0):
<ip_port_cmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x6,%edx
call   1030 <memcmp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ip_port_cmp>:
mov    $0x6,%edx
jmp    1030 <memcmp@plt>

LLVM IR (-O0):
define i32 @ip_port_cmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i32 @memcmp(i8* %5, i8* %6, i32 6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @ip_port_cmp(i8* %0, i8* %1) {
%3 = tail call i32 @memcmp(i8* %0, i8* %1, i32 6)
ret i32 %3
}
void foo645(int p) {}


x86 assembly (clang, -O0):
<foo645>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo645>:
ret

LLVM IR (-O0):
define void @foo645(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret void
}

LLVM IR (-O2):
define void @foo645(i32 %0) {
ret void
}
/* Variables and functions */
int open_netlink_socket();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ read_event(int);
int main(int argc, char **argv) {
  int netlink_socket;
  netlink_socket = open_netlink_socket();
  if (netlink_socket < 0) {
    printf("Opening netlink socket failed\n");
    return -1;
  }
  printf("Netlink socket opened\n");
  while (1) {
    read_event(netlink_socket);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1050 <open_netlink_socket@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    1171 <main+0x41>
lea    0xe9f(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%eax
add    $0x20,%rsp
pop    %rbp
ret
lea    0xea7(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%edi
call   1040 <read_event@plt>
jmp    117d <main+0x4d>

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1050 <open_netlink_socket@plt>
test   %eax,%eax
js     1159 <main+0x29>
mov    %eax,%ebx
lea    0xebb(%rip),%rdi
call   1030 <puts@plt>
nopw   0x0(%rax,%rax,1)
mov    %ebx,%edi
call   1040 <read_event@plt>
jmp    1150 <main+0x20>
lea    0xeb6(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [31 x i8] c"Opening netlink socket failed\0A\00"
@.str.1 = [23 x i8] c"Netlink socket opened\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 (...) @open_netlink_socket()
store i32 %7, i32* %6
%8 = load i32, i32* %6
%9 = icmp slt i32 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
ret i32 -1
12: ; preds = %2
%13 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0))
br label %14
14: ; preds = %12, %14
%15 = load i32, i32* %6
%16 = call i32 @read_event(i32 %15)
br label %14
}

LLVM IR (-O2):
@str = [22 x i8] c"Netlink socket opened\00"
@str.2 = [30 x i8] c"Opening netlink socket failed\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @open_netlink_socket()
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.2, i64 0, i64 0))
ret i32 -1
7: ; preds = %2
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
br label %9
9: ; preds = %9, %7
%10 = tail call i32 @read_event(i32 %3)
br label %9
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, double *, int);
void double2intarray(double *dbl, char *inta) { memcpy(inta, dbl, 8); }


x86 assembly (clang, -O0):
<double2intarray>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    $0x8,%edx
call   1030 <memcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<double2intarray>:
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
mov    $0x8,%edx
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
define void @double2intarray(double* %0, i8* %1) {
%3 = alloca double*
%4 = alloca i8*
store double* %0, double** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = load double*, double** %3
%7 = call i32 @memcpy(i8* %5, double* %6, i32 8)
ret void
}

LLVM IR (-O2):
define void @double2intarray(double* %0, i8* %1) {
%3 = tail call i32 @memcpy(i8* %1, double* %0, i32 8)
ret void
}
int main(void) { return (2) == (0) + (1) + 1; }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
ret i32 1
}

LLVM IR (-O2):
define i32 @main() {
ret i32 1
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int readInBit();
uint8_t readHeader(void) {
  uint8_t dataRead = 0;
  for (int i = 0; i < 2; i++) {
    dataRead <<= 1;
    uint8_t newBit = readInBit();
    dataRead |= newBit;
  }
  return dataRead;
}


x86 assembly (clang, -O0):
<readHeader>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    115a <readHeader+0x4a>
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <readInBit@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <readHeader+0x16>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readHeader>:
push   %rbx
xor    %eax,%eax
call   1030 <readInBit@plt>
mov    %eax,%ebx
add    %eax,%ebx
xor    %eax,%eax
call   1030 <readInBit@plt>
or     %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @readHeader() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %4
4: ; preds = %14, %0
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 2
br i1 %6, label %7, label %17
7: ; preds = %4
%8 = load i32, i32* %1
%9 = shl i32 %8, 1
store i32 %9, i32* %1
%10 = call i32 (...) @readInBit()
store i32 %10, i32* %3
%11 = load i32, i32* %3
%12 = load i32, i32* %1
%13 = or i32 %12, %11
store i32 %13, i32* %1
br label %14
14: ; preds = %7
%15 = load i32, i32* %2
%16 = add nsw i32 %15, 1
store i32 %16, i32* %2
br label %4
17: ; preds = %4
%18 = load i32, i32* %1
ret i32 %18
}

LLVM IR (-O2):
define i32 @readHeader() {
%1 = tail call i32 (...) @readInBit()
%2 = shl i32 %1, 1
%3 = tail call i32 (...) @readInBit()
%4 = or i32 %3, %2
ret i32 %4
}
int set_floating_point_double_precision(void) { return (0); }


x86 assembly (clang, -O0):
<set_floating_point_double_precision>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_floating_point_double_precision>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @set_floating_point_double_precision() {
ret i32 0
}

LLVM IR (-O2):
define i32 @set_floating_point_double_precision() {
ret i32 0
}