xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
bool __shrink_1_filt(void *cc, void *k, void *v) {
  if (!(*(uint64_t *)k % 2)) {
    return true;
  }
  (*(size_t *)cc)++;
  return false;
}


x86 assembly (clang, -O0):
<__shrink_1_filt>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1133 <__shrink_1_filt+0x33>
movl   $0x1,-0x4(%rbp)
jmp    1148 <__shrink_1_filt+0x48>
mov    -0x10(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__shrink_1_filt>:
mov    $0x1,%eax
testb  $0x1,(%rsi)
je     1110 <__shrink_1_filt+0x10>
addq   $0x1,(%rdi)
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @__shrink_1_filt(i8* %0, i8* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
%8 = load i8*, i8** %6
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = srem i32 %10, 2
%12 = icmp ne i32 %11, 0
br i1 %12, label %14, label %13
13: ; preds = %3
store i32 1, i32* %4
br label %19
14: ; preds = %3
%15 = load i8*, i8** %5
%16 = bitcast i8* %15 to i64*
%17 = load i64, i64* %16
%18 = add i64 %17, 1
store i64 %18, i64* %16
store i32 0, i32* %4
br label %19
19: ; preds = %14, %13
%20 = load i32, i32* %4
ret i32 %20
}

LLVM IR (-O2):
define i32 @__shrink_1_filt(i8* nocapture %0, i8* nocapture %1, i8* nocapture readnone %2) {
%4 = bitcast i8* %1 to i32*
%5 = load i32, i32* %4
%6 = and i32 %5, 1
%7 = icmp eq i32 %6, 0
br i1 %7, label %12, label %8
8: ; preds = %3
%9 = bitcast i8* %0 to i64*
%10 = load i64, i64* %9
%11 = add i64 %10, 1
store i64 %11, i64* %9
br label %12
12: ; preds = %3, %8
%13 = phi i32 [ 0, %8 ], [ 1, %3 ]
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ find_track(char *);
int /*<<< orphan*/ find_track_regex(char *);
int main(int argc, char *argv[]) {
  char *target = "F";
  char *pattern = "Fr.*Fr.*";
  find_track(target);
  find_track_regex(pattern);
  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)
lea    0xec3(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    0xeba(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <find_track@plt>
mov    -0x20(%rbp),%rdi
call   1040 <find_track_regex@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <find_track@plt>
lea    0xece(%rip),%rdi
call   1040 <find_track_regex@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"F\00"
@.str.1 = [9 x i8] c"Fr.*Fr.*\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8** %6
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8** %7
%8 = load i8*, i8** %6
%9 = call i32 @find_track(i8* %8)
%10 = load i8*, i8** %7
%11 = call i32 @find_track_regex(i8* %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [2 x i8] c"F\00"
@.str.1 = [9 x i8] c"Fr.*Fr.*\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @find_track(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @find_track_regex(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ write(int, char const *, int);
void ft_putstr(const char *s) {
  int i;
  i = 0;
  while (s[i])
    i++;
  write(1, s, i);
}


x86 assembly (clang, -O0):
<ft_putstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1143 <ft_putstr+0x33>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <ft_putstr+0x13>
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    $0x1,%edi
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_putstr>:
mov    %rdi,%rsi
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
nop
cmpb   $0x0,(%rsi,%rdx,1)
lea    0x1(%rdx),%rdx
jne    1120 <ft_putstr+0x10>
add    $0xffffffff,%edx
mov    $0x1,%edi
jmp    1030 <write@plt>

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

LLVM IR (-O2):
define void @ft_putstr(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %7, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add nuw i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
%10 = tail call i32 @write(i32 1, i8* %0, i32 %9)
ret void
}
int is_space(char ch) {
  return ch == '\r' || ch == '\n' || ch == ' ' || ch == '\t';
}


x86 assembly (clang, -O0):
<is_space>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0xd,%ecx
mov    %al,-0x2(%rbp)
je     114d <is_space+0x4d>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0xa,%ecx
mov    %al,-0x2(%rbp)
je     114d <is_space+0x4d>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x2(%rbp)
je     114d <is_space+0x4d>
movsbl -0x1(%rbp),%eax
cmp    $0x9,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_space>:
cmp    $0x20,%dil
ja     1120 <is_space+0x20>
mov    $0x1,%eax
movzbl %dil,%ecx
movabs $0x100002400,%rdx
bt     %rcx,%rdx
jae    1120 <is_space+0x20>
ret
xor    %eax,%eax
cmp    $0x9,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @is_space(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 13
br i1 %5, label %18, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 10
br i1 %9, label %18, label %10
10: ; preds = %6
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 32
br i1 %13, label %18, label %14
14: ; preds = %10
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp eq i32 %16, 9
br label %18
18: ; preds = %14, %10, %6, %1
%19 = phi i1 [ true, %10 ], [ true, %6 ], [ true, %1 ], [ %17, %14 ]
%20 = zext i1 %19 to i32
ret i32 %20
}

LLVM IR (-O2):
define i32 @is_space(i8 signext %0) {
switch i8 %0, label %2 [
i8 32, label %5
i8 13, label %5
i8 10, label %5
]
2: ; preds = %1
%3 = icmp eq i8 %0, 9
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %6
}
__attribute__((always_)) int early_cpu_to_node(int cpu) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @early_cpu_to_node(i32 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ sh_msgn(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ str_len(char const *);
void sh_msg(const char *s) { sh_msgn(s, str_len(s)); }


x86 assembly (clang, -O0):
<sh_msg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <str_len@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%esi
call   1030 <sh_msgn@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sh_msg>:
push   %rbx
mov    %rdi,%rbx
call   1040 <str_len@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1030 <sh_msgn@plt>

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

LLVM IR (-O2):
define void @sh_msg(i8* %0) {
%2 = tail call i32 @str_len(i8* %0)
%3 = tail call i32 @sh_msgn(i8* %0, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ isosceles(int, int, int);
int /*<<< orphan*/ printf(char *);
int equilatero(int X, int Y, int Z) {
  if (X == Y && X == Z) {
    printf("Triângulo Equilátero\n");
  } else {
    isosceles(X, Y, Z);
  }
}


x86 assembly (clang, -O0):
<equilatero>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    115a <equilatero+0x3a>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jne    115a <equilatero+0x3a>
lea    0xeb0(%rip),%rdi
call   1040 <printf@plt>
jmp    1168 <equilatero+0x48>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <isosceles@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<equilatero>:
push   %rax
cmp    %esi,%edi
jne    1137 <equilatero+0x17>
cmp    %edx,%edi
jne    1137 <equilatero+0x17>
lea    0xed0(%rip),%rdi
call   1030 <puts@plt>
pop    %rcx
ret
call   1040 <isosceles@plt>
pop    %rcx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"Tri\C3\A2ngulo Equil\C3\A1tero\0A\00"
define i32 @equilatero(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = icmp eq i32 %8, %9
br i1 %10, label %11, label %17
11: ; preds = %3
%12 = load i32, i32* %5
%13 = load i32, i32* %7
%14 = icmp eq i32 %12, %13
br i1 %14, label %15, label %17
15: ; preds = %11
%16 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
br label %22
17: ; preds = %11, %3
%18 = load i32, i32* %5
%19 = load i32, i32* %6
%20 = load i32, i32* %7
%21 = call i32 @isosceles(i32 %18, i32 %19, i32 %20)
br label %22
22: ; preds = %17, %15
%23 = load i32, i32* %4
ret i32 %23
}

LLVM IR (-O2):
@str = [23 x i8] c"Tri\C3\A2ngulo Equil\C3\A1tero\00"
define i32 @equilatero(i32 %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %0, %1
%5 = icmp eq i32 %0, %2
%6 = and i1 %4, %5
br i1 %6, label %7, label %9
7: ; preds = %3
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
br label %11
9: ; preds = %3
%10 = tail call i32 @isosceles(i32 %0, i32 %1, i32 %2)
br label %11
11: ; preds = %9, %7
ret i32 undef
}
void gnrc_netif_init_devs(void) {
  if (0) {
    extern void auto_init_stm32_eth(void);
    auto_init_stm32_eth();
  }
  if (0) {
    extern void auto_init_at86rf215(void);
    auto_init_at86rf215();
  }
  if (0) {
    extern void auto_init_at86rf2xx(void);
    auto_init_at86rf2xx();
  }
  if (0) {
    extern void auto_init_atwinc15x0(void);
    auto_init_atwinc15x0();
  }
  if (0) {
    extern void auto_init_mrf24j40(void);
    auto_init_mrf24j40();
  }
  if (0) {
    extern void auto_init_cc110x(void);
    auto_init_cc110x();
  }
  if (0) {
    extern void auto_init_cc2420(void);
    auto_init_cc2420();
  }
  if (0) {
    extern void auto_init_encx24j600(void);
    auto_init_encx24j600();
  }
  if (0) {
    extern void auto_init_enc28j60(void);
    auto_init_enc28j60();
  }
  if (0) {
    extern void auto_init_esp_eth(void);
    auto_init_esp_eth();
  }
  if (0) {
    extern void auto_init_esp_now(void);
    auto_init_esp_now();
  }
  if (0) {
    extern void auto_init_esp_wifi(void);
    auto_init_esp_wifi();
  }
  if (0) {
    extern void auto_init_ethos(void);
    auto_init_ethos();
  }
  if (0) {
    extern void auto_init_dose(void);
    auto_init_dose();
  }
  if (0) {
    extern void auto_init_slipdev(void);
    auto_init_slipdev();
  }
  if (0) {
    extern void auto_init_cc2538_rf(void);
    auto_init_cc2538_rf();
  }
  if (0) {
    extern void auto_init_xbee(void);
    auto_init_xbee();
  }
  if (0) {
    extern void auto_init_kw2xrf(void);
    auto_init_kw2xrf();
  }
  if (0) {
    extern void auto_init_kw41zrf(void);
    auto_init_kw41zrf();
  }
  if (0) {
    extern void auto_init_netdev_cdcecm(void);
    auto_init_netdev_cdcecm();
  }
  if (0) {
    extern void auto_init_netdev_tap(void);
    auto_init_netdev_tap();
  }
  if (0) {
    extern void auto_init_socket_zep(void);
    auto_init_socket_zep();
  }
  if (0) {
    extern void gnrc_nrfmin_init(void);
    gnrc_nrfmin_init();
  }
  if (0) {
    extern void auto_init_w5100(void);
    auto_init_w5100();
  }
  if (0 && !0) {
    extern void auto_init_sx127x(void);
    auto_init_sx127x();
  }
  if (0) {
    extern void auto_init_nrf802154(void);
    auto_init_nrf802154();
  }
}


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

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

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

LLVM IR (-O2):
define void @gnrc_netif_init_devs() {
ret void
}
void processDelStream(int streamID) {}


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

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

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

LLVM IR (-O2):
define void @processDelStream(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char str[30];
  scanf("%s", str);
  printf("%s\n", str);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x30(%rbp),%rsi
lea    0xec6(%rip),%rdi
call   1040 <scanf@plt>
lea    -0x30(%rbp),%rsi
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
lea    0xed4(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1040 <scanf@plt>
lea    0xec5(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [30 x i8]
%2 = getelementptr inbounds [30 x i8], [30 x i8]* %1, i64 0, i64 0
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %2)
ret i32 0
}
/* Type definitions */
typedef int pid_t;

/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int);
int wait(int *);
void handle_sigchild(int signal) {
  pid_t child;
  int status;
  child = wait(&status);
  printf("My child (%d) died. He will not be a zombie. I can stop working.\n",
         child);
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<handle_sigchild>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    -0xc(%rbp),%rdi
call   1050 <wait@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xeaf(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e83(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<handle_sigchild>:
push   %rax
lea    0x4(%rsp),%rdi
call   1050 <wait@plt>
lea    0xebe(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    0x2e90(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [66 x i8] c"My child (%d) died. He will not be a zombie. I can stop working.\0A\00"
@EXIT_SUCCESS = global i32 0
define void @handle_sigchild(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = call i32 @wait(i32* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = call i32 @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = load i32, i32* @EXIT_SUCCESS
%9 = call i32 @exit(i32 %8)
unreachable
}

LLVM IR (-O2):
@.str = [66 x i8] c"My child (%d) died. He will not be a zombie. I can stop working.\0A\00"
@EXIT_SUCCESS = global i32 0
define void @handle_sigchild(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @wait(i32* %2)
%5 = call i32 @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = load i32, i32* @EXIT_SUCCESS
%7 = call i32 @exit(i32 %6)
unreachable
}
/* Variables and functions */
scalar_t__ malloc(int);
void *thread2(void *vargp) {
  int *ptr_i = (int *)malloc(sizeof(int));
  *ptr_i = 42;
  return (void *)ptr_i;
}


x86 assembly (clang, -O0):
<thread2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x4,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x2a,(%rax)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<thread2>:
push   %rax
mov    $0x4,%edi
call   1030 <malloc@plt>
movl   $0x2a,(%rax)
pop    %rcx
ret

LLVM IR (-O0):
define i8* @thread2(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = call i64 @malloc(i32 4)
%5 = inttoptr i64 %4 to i32*
store i32* %5, i32** %3
%6 = load i32*, i32** %3
store i32 42, i32* %6
%7 = load i32*, i32** %3
%8 = bitcast i32* %7 to i8*
ret i8* %8
}

LLVM IR (-O2):
define i8* @thread2(i8* nocapture readnone %0) {
%2 = tail call i64 @malloc(i32 4)
%3 = inttoptr i64 %2 to i32*
store i32 42, i32* %3
%4 = inttoptr i64 %2 to i8*
ret i8* %4
}
/* Variables and functions */
int memcmp(void const *, void const *, int);
int namecmp(const void *a, const void *b) { return memcmp(a, b, 24); }


x86 assembly (clang, -O0):
<namecmp>:
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    $0x18,%edx
call   1030 <memcmp@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @namecmp(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 24)
ret i32 %7
}

LLVM IR (-O2):
define i32 @namecmp(i8* %0, i8* %1) {
%3 = tail call i32 @memcmp(i8* %0, i8* %1, i32 24)
ret i32 %3
}
/* Variables and functions */
int width(char *, char *);
int tabs(char *s, char *os) { return (width(s, os) / 8); }


x86 assembly (clang, -O0):
<tabs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <width@plt>
mov    $0x8,%ecx
cltd
idiv   %ecx
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tabs>:
push   %rax
call   1030 <width@plt>
lea    0x7(%rax),%ecx
test   %eax,%eax
cmovs  %ecx,%eax
sar    $0x3,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @tabs(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 @width(i8* %5, i8* %6)
%8 = sdiv i32 %7, 8
ret i32 %8
}

LLVM IR (-O2):
define i32 @tabs(i8* %0, i8* %1) {
%3 = tail call i32 @width(i8* %0, i8* %1)
%4 = sdiv i32 %3, 8
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ puts(char *);
void show_version() {
  printf("powerutils v%d\n", 1);
  puts("https://github.com/fredmorcos/powerutils");
}


x86 assembly (clang, -O0):
<show_version>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
mov    $0x1,%esi
call   1040 <printf@plt>
lea    0xed4(%rip),%rdi
call   1030 <puts@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_version>:
push   %rax
lea    0xed8(%rip),%rdi
mov    $0x1,%esi
call   1040 <printf@plt>
lea    0xed7(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"powerutils v%d\0A\00"
@.str.1 = [41 x i8] c"https://github.com/fredmorcos/powerutils\00"
define void @show_version() {
%1 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 1)
%2 = call i32 @puts(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"powerutils v%d\0A\00"
@.str.1 = [41 x i8] c"https://github.com/fredmorcos/powerutils\00"
define void @show_version() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 1)
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int _getpid_r(struct _reent *r) { return 0; }


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

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

LLVM IR (-O0):
%struct._reent = type opaque
define i32 @_getpid_r(%struct._reent* %0) {
%2 = alloca %struct._reent*
store %struct._reent* %0, %struct._reent** %2
ret i32 0
}

LLVM IR (-O2):
%struct._reent = type opaque
define i32 @_getpid_r(%struct._reent* nocapture readnone %0) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
uint8_t capn_flip8(uint8_t v) { return v; }


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

x86 assembly (clang, -O2):
<capn_flip8>:
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @capn_flip8(i32 returned %0) {
ret i32 %0
}
void at91_bootmode_device_register(void) {}


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

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

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

LLVM IR (-O2):
define void @at91_bootmode_device_register() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalnum(int);
void t_isalnum_0x7e() {
  Assert_real((isalnum(126) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isalnum.c",
              635, ("isalnum should be 0 for ~"));
}


x86 assembly (clang, -O0):
<t_isalnum_0x7e>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7e,%edi
call   1030 <isalnum@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x27b,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isalnum_0x7e>:
push   %rax
mov    $0x7e,%edi
call   1030 <isalnum@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x27b,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalnum.c\00"
@.str.1 = [26 x i8] c"isalnum should be 0 for ~\00"
define void @t_isalnum_0x7e() {
%1 = call i64 @isalnum(i32 126)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 635, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalnum.c\00"
@.str.1 = [26 x i8] c"isalnum should be 0 for ~\00"
define void @t_isalnum_0x7e() {
%1 = tail call i64 @isalnum(i32 126)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 635, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
scalar_t__ feof(int /*<<< orphan*/ *);
int fgetc(int /*<<< orphan*/ *);
void goToDelimiter(int delim, FILE *fi) {
  int ch = 0;
  while (ch != delim) {
    ch = fgetc(fi);
    if (feof(fi)) {
      exit(1);
    }
  }
}


x86 assembly (clang, -O0):
<goToDelimiter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
je     1180 <goToDelimiter+0x50>
mov    -0x10(%rbp),%rdi
call   1030 <fgetc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <feof@plt>
cmp    $0x0,%rax
je     117b <goToDelimiter+0x4b>
mov    $0x1,%edi
call   1050 <exit@plt>
jmp    1146 <goToDelimiter+0x16>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<goToDelimiter>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    %edi,%r14d
xor    %ebp,%ebp
nopl   0x0(%rax)
cmp    %r14d,%ebp
je     1166 <goToDelimiter+0x36>
mov    %rbx,%rdi
call   1030 <fgetc@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1040 <feof@plt>
test   %rax,%rax
je     1140 <goToDelimiter+0x10>
mov    $0x1,%edi
call   1050 <exit@plt>
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @goToDelimiter(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32
store i32 %0, i32* %3
store i32* %1, i32** %4
store i32 0, i32* %5
br label %6
6: ; preds = %18, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %3
%9 = icmp ne i32 %7, %8
br i1 %9, label %10, label %19
10: ; preds = %6
%11 = load i32*, i32** %4
%12 = call i32 @fgetc(i32* %11)
store i32 %12, i32* %5
%13 = load i32*, i32** %4
%14 = call i64 @feof(i32* %13)
%15 = icmp ne i64 %14, 0
br i1 %15, label %16, label %18
16: ; preds = %10
%17 = call i32 @exit(i32 1)
unreachable
18: ; preds = %10
br label %6
19: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @goToDelimiter(i32 %0, i32* nocapture %1) {
br label %3
3: ; preds = %6, %2
%4 = phi i32 [ 0, %2 ], [ %7, %6 ]
%5 = icmp eq i32 %4, %0
br i1 %5, label %12, label %6
6: ; preds = %3
%7 = tail call i32 @fgetc(i32* %1)
%8 = tail call i64 @feof(i32* %1)
%9 = icmp eq i64 %8, 0
br i1 %9, label %3, label %10
10: ; preds = %6
%11 = tail call i32 @exit(i32 1)
unreachable
12: ; preds = %3
ret void
}
/* Type definitions */
typedef scalar_t__ int64_t;

/* Variables and functions */
int64_t max(int64_t a, int64_t b) { return a > b ? a : b; }


x86 assembly (clang, -O0):
<max>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jle    1127 <max+0x27>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    112f <max+0x2f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<max>:
mov    %rsi,%rax
cmp    %rsi,%rdi
cmovg  %rdi,%rax
ret

LLVM IR (-O0):
define i64 @max(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp sgt i64 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i64, i64* %3
br label %12
10: ; preds = %2
%11 = load i64, i64* %4
br label %12
12: ; preds = %10, %8
%13 = phi i64 [ %9, %8 ], [ %11, %10 ]
ret i64 %13
}

LLVM IR (-O2):
define i64 @max(i64 %0, i64 %1) {
%3 = icmp sgt i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, int);
void sig_usr1(int sig) {
  printf("SIGUSR1 %d \n", sig);
  exit(1);
}


x86 assembly (clang, -O0):
<sig_usr1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<sig_usr1>:
push   %rax
mov    %edi,%esi
lea    0xed6(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
@.str = [13 x i8] c"SIGUSR1 %d \0A\00"
define void @sig_usr1(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ getParLong(long *);
int /*<<< orphan*/ messErr(int);
void IF_showI2C(void) {
  long n;
  if (!getParLong(&n))
    return;
  messErr(49);
}


x86 assembly (clang, -O0):
<IF_showI2C>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rdi
call   1040 <getParLong@plt>
cmp    $0x0,%eax
jne    113f <IF_showI2C+0x1f>
jmp    1149 <IF_showI2C+0x29>
mov    $0x31,%edi
call   1030 <messErr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<IF_showI2C>:
push   %rax
mov    %rsp,%rdi
call   1040 <getParLong@plt>
test   %eax,%eax
je     1137 <IF_showI2C+0x17>
mov    $0x31,%edi
call   1030 <messErr@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @IF_showI2C() {
%1 = alloca i64
%2 = call i32 @getParLong(i64* %1)
%3 = icmp ne i32 %2, 0
br i1 %3, label %5, label %4
4: ; preds = %0
br label %7
5: ; preds = %0
%6 = call i32 @messErr(i32 49)
br label %7
7: ; preds = %5, %4
ret void
}

LLVM IR (-O2):
define void @IF_showI2C() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
%3 = call i32 @getParLong(i64* %1)
%4 = icmp eq i32 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %0
%6 = call i32 @messErr(i32 49)
br label %7
7: ; preds = %0, %5
ret void
}
char *getSegmentOffset(char *logicalAdd) {
  static char segOff[7] = {'\0'};
  int i;
  for (i = 0; i < 6; ++i) {
    segOff[i] = logicalAdd[4 + i];
  }
  return segOff;
}


x86 assembly (clang, -O0):
<getSegmentOffset>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x6,-0xc(%rbp)
jge    1145 <getSegmentOffset+0x45>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
add    $0x4,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,1),%dl
movslq -0xc(%rbp),%rcx
lea    0x2eed(%rip),%rax
mov    %dl,(%rax,%rcx,1)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <getSegmentOffset+0xf>
lea    0x2ed5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getSegmentOffset>:
mov    0x4(%rdi),%al
mov    %al,0x2f18(%rip)
lea    0x2f11(%rip),%rax
mov    0x5(%rdi),%cl
mov    %cl,0x2f09(%rip)
mov    0x6(%rdi),%cl
mov    %cl,0x2f01(%rip)
mov    0x7(%rdi),%cl
mov    %cl,0x2ef9(%rip)
mov    0x8(%rdi),%cl
mov    %cl,0x2ef1(%rip)
mov    0x9(%rdi),%cl
mov    %cl,0x2ee9(%rip)
ret

LLVM IR (-O0):
@getSegmentOffset.segOff = internal global [7 x i8] zeroinitializer
define i8* @getSegmentOffset(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %17, %1
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 6
br i1 %6, label %7, label %20
7: ; preds = %4
%8 = load i8*, i8** %2
%9 = load i32, i32* %3
%10 = add nsw i32 4, %9
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i8, i8* %8, i64 %11
%13 = load i8, i8* %12
%14 = load i32, i32* %3
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds [7 x i8], [7 x i8]* @getSegmentOffset.segOff, i64 0, i64 %15
store i8 %13, i8* %16
br label %17
17: ; preds = %7
%18 = load i32, i32* %3
%19 = add nsw i32 %18, 1
store i32 %19, i32* %3
br label %4
20: ; preds = %4
ret i8* getelementptr inbounds ([7 x i8], [7 x i8]* @getSegmentOffset.segOff, i64 0, i64 0)
}

LLVM IR (-O2):
@getSegmentOffset.segOff = internal global [7 x i8] zeroinitializer
define i8* @getSegmentOffset(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 4
%3 = load i8, i8* %2
store i8 %3, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @getSegmentOffset.segOff, i64 0, i64 0)
%4 = getelementptr inbounds i8, i8* %0, i64 5
%5 = load i8, i8* %4
store i8 %5, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @getSegmentOffset.segOff, i64 0, i64 1)
%6 = getelementptr inbounds i8, i8* %0, i64 6
%7 = load i8, i8* %6
store i8 %7, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @getSegmentOffset.segOff, i64 0, i64 2)
%8 = getelementptr inbounds i8, i8* %0, i64 7
%9 = load i8, i8* %8
store i8 %9, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @getSegmentOffset.segOff, i64 0, i64 3)
%10 = getelementptr inbounds i8, i8* %0, i64 8
%11 = load i8, i8* %10
store i8 %11, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @getSegmentOffset.segOff, i64 0, i64 4)
%12 = getelementptr inbounds i8, i8* %0, i64 9
%13 = load i8, i8* %12
store i8 %13, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @getSegmentOffset.segOff, i64 0, i64 5)
ret i8* getelementptr inbounds ([7 x i8], [7 x i8]* @getSegmentOffset.segOff, i64 0, i64 0)
}
/* Variables and functions */
char const *cbmarch_get_driver_name(int);
const char *cbm_get_driver_name(int PortNumber) {
  ;
  return cbmarch_get_driver_name(PortNumber);
}


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

x86 assembly (clang, -O2):
<cbm_get_driver_name>:
jmp    1030 <cbmarch_get_driver_name@plt>

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

LLVM IR (-O2):
define i8* @cbm_get_driver_name(i32 %0) {
%2 = tail call i8* @cbmarch_get_driver_name(i32 %0)
ret i8* %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ strlen(void *);
uint32_t sdbtGetRecordSize(void *record) { return strlen(record); }


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

x86 assembly (clang, -O2):
<sdbtGetRecordSize>:
jmp    1030 <strlen@plt>

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

LLVM IR (-O2):
define i32 @sdbtGetRecordSize(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
ret i32 %2
}
void posix_class_neg2NP_PRINT() {}


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

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

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

LLVM IR (-O2):
define void @posix_class_neg2NP_PRINT() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ set_binding_values(char const *, char const **,
                                      int /*<<< orphan*/ *);
char *libintl_bindtextdomain(const char *domainname, const char *dirname) {
  set_binding_values(domainname, &dirname, NULL);
  return (char *)dirname;
}


x86 assembly (clang, -O0):
<libintl_bindtextdomain>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <set_binding_values@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<libintl_bindtextdomain>:
push   %rax
mov    %rsi,(%rsp)
mov    %rsp,%rsi
xor    %edx,%edx
call   1030 <set_binding_values@plt>
mov    (%rsp),%rax
pop    %rcx
ret

LLVM IR (-O0):
define i8* @libintl_bindtextdomain(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 = call i32 @set_binding_values(i8* %5, i8** %4, i32* null)
%7 = load i8*, i8** %4
ret i8* %7
}

LLVM IR (-O2):
define i8* @libintl_bindtextdomain(i8* %0, i8* %1) {
%3 = alloca i8*
store i8* %1, i8** %3
%4 = call i32 @set_binding_values(i8* %0, i8** %3, i32* null)
%5 = load i8*, i8** %3
ret i8* %5
}
void CFGMR3GetNextValue(void) {}


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

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

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

LLVM IR (-O2):
define void @CFGMR3GetNextValue() {
ret void
}
void foo_1_2_2_2_2_1_2_1_2() {}


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

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

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

LLVM IR (-O2):
define void @foo_1_2_2_2_2_1_2_1_2() {
ret void
}
/* Variables and functions */
char *intToRoman(int);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n;
  scanf("%d", &n);
  printf("%s\n", intToRoman(n));
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
call   1030 <intToRoman@plt>
lea    0xeb1(%rip),%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i8* @intToRoman(i32 %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ x();
void y(void) { x(); }


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

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

LLVM IR (-O0):
define void @y() {
%1 = call i32 (...) @x()
ret void
}

LLVM IR (-O2):
define void @y() {
%1 = tail call i32 (...) @x()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *_ssl_fopen(int, int /*<<< orphan*/);
FILE *ssl_server_fopen(int sd) {
  while (0) {
  };
  return _ssl_fopen(sd, 0);
}


x86 assembly (clang, -O0):
<ssl_server_fopen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
test   $0x1,%al
jne    112a <ssl_server_fopen+0x1a>
jmp    112f <ssl_server_fopen+0x1f>
jmp    111b <ssl_server_fopen+0xb>
mov    -0x4(%rbp),%edi
xor    %esi,%esi
call   1030 <_ssl_fopen@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ssl_server_fopen>:
xor    %esi,%esi
jmp    1030 <_ssl_fopen@plt>

LLVM IR (-O0):
define i32* @ssl_server_fopen(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %4, %1
br i1 false, label %4, label %5
4: ; preds = %3
br label %3
5: ; preds = %3
%6 = load i32, i32* %2
%7 = call i32* @_ssl_fopen(i32 %6, i32 0)
ret i32* %7
}

LLVM IR (-O2):
define i32* @ssl_server_fopen(i32 %0) {
%2 = tail call i32* @_ssl_fopen(i32 %0, i32 0)
ret i32* %2
}
void _instruction_tlb_miss() { printf("Exception: %s\n", __FUNCTION__); }


x86 assembly (clang, -O0):
<_instruction_tlb_miss>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xeed(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<_instruction_tlb_miss>:
lea    0xee9(%rip),%rdi
lea    0xef1(%rip),%rsi
xor    %eax,%eax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"Exception: %s\0A\00"
@__FUNCTION__._instruction_tlb_miss = [22 x i8] c"_instruction_tlb_miss\00"
define void @_instruction_tlb_miss() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @__FUNCTION__._instruction_tlb_miss, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"Exception: %s\0A\00"
@__FUNCTION__._instruction_tlb_miss = [22 x i8] c"_instruction_tlb_miss\00"
define void @_instruction_tlb_miss() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @__FUNCTION__._instruction_tlb_miss, i64 0, i64 0))
ret void
}
long stub_syscall2(long syscall, long arg1, long arg2) {
  long ret;
  __asm__ volatile("int $0x80"
                   : "=a"(ret)
                   : "0"(syscall), "b"(arg1), "c"(arg2));
  return ret;
}


x86 assembly (clang, -O0):
<stub_syscall2>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rbx
mov    -0x20(%rbp),%rcx
int    $0x80
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<stub_syscall2>:
push   %rbx
mov    %rdx,%rcx
mov    %rsi,%rbx
mov    %rdi,%rax
int    $0x80
pop    %rbx
ret

LLVM IR (-O0):
define i64 @stub_syscall2(i64 %0, i64 %1, i64 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%8 = load i64, i64* %4
%9 = load i64, i64* %5
%10 = load i64, i64* %6
%11 = call i64 asm sideeffect "int $$0x80", "={ax},0,{bx},{cx},~{dirflag},~{fpsr},~{flags}"(i64 %8, i64 %9, i64 %10)
store i64 %11, i64* %7
%12 = load i64, i64* %7
ret i64 %12
}

LLVM IR (-O2):
define i64 @stub_syscall2(i64 %0, i64 %1, i64 %2) {
%4 = tail call i64 asm sideeffect "int $$0x80", "={ax},0,{bx},{cx},~{dirflag},~{fpsr},~{flags}"(i64 %0, i64 %1, i64 %2)
ret i64 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, int /*<<< orphan*/);
void hexDump(FILE *out, uint8_t *ptr1, uint8_t *ptr2) {
  while (ptr1 < ptr2) {
    fprintf(out, "%02X ", *ptr1++);
  }
}


x86 assembly (clang, -O0):
<hexDump>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jae    1158 <hexDump+0x48>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%edx
lea    0xeb2(%rip),%rsi
call   1030 <fprintf@plt>
jmp    1124 <hexDump+0x14>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hexDump>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
cmp    %rdx,%rsi
jae    1146 <hexDump+0x36>
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %rdi,%r15
lea    0xed3(%rip),%r12
nopl   (%rax)
mov    (%rbx),%edx
add    $0x4,%rbx
mov    %r15,%rdi
mov    %r12,%rsi
call   1030 <fprintf@plt>
cmp    %r14,%rbx
jb     1130 <hexDump+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%02X \00"
define void @hexDump(i32* %0, i32* %1, i32* %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i32*
store i32* %0, i32** %4
store i32* %1, i32** %5
store i32* %2, i32** %6
br label %7
7: ; preds = %11, %3
%8 = load i32*, i32** %5
%9 = load i32*, i32** %6
%10 = icmp ult i32* %8, %9
br i1 %10, label %11, label %17
11: ; preds = %7
%12 = load i32*, i32** %4
%13 = load i32*, i32** %5
%14 = getelementptr inbounds i32, i32* %13, i32 1
store i32* %14, i32** %5
%15 = load i32, i32* %13
%16 = call i32 @fprintf(i32* %12, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %15)
br label %7
17: ; preds = %7
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"%02X \00"
define void @hexDump(i32* nocapture %0, i32* %1, i32* readnone %2) {
%4 = icmp ult i32* %1, %2
br i1 %4, label %5, label %11
5: ; preds = %3, %5
%6 = phi i32* [ %7, %5 ], [ %1, %3 ]
%7 = getelementptr inbounds i32, i32* %6, i64 1
%8 = load i32, i32* %6
%9 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = icmp ult i32* %7, %2
br i1 %10, label %5, label %11
11: ; preds = %5, %3
ret void
}
/* Variables and functions */
scalar_t__ isprint(int);
int utlisprint(int ch) { return (ch <= 0xFF) && isprint(ch); }


x86 assembly (clang, -O0):
<utlisprint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0xff,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jg     113f <utlisprint+0x2f>
mov    -0x4(%rbp),%edi
call   1030 <isprint@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<utlisprint>:
xor    %eax,%eax
cmp    $0xff,%edi
jg     112f <utlisprint+0x1f>
push   %rax
call   1030 <isprint@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
add    $0x8,%rsp
ret

LLVM IR (-O0):
define i32 @utlisprint(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sle i32 %3, 255
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load i32, i32* %2
%7 = call i64 @isprint(i32 %6)
%8 = icmp ne i64 %7, 0
br label %9
9: ; preds = %5, %1
%10 = phi i1 [ false, %1 ], [ %8, %5 ]
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @utlisprint(i32 %0) {
%2 = icmp slt i32 %0, 256
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = tail call i64 @isprint(i32 %0)
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %1
%8 = phi i32 [ 0, %1 ], [ %6, %3 ]
ret i32 %8
}
/* Variables and functions */
double randu53();
double randu(void) { return randu53(); }


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

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

LLVM IR (-O0):
define double @randu() {
%1 = call double (...) @randu53()
ret double %1
}

LLVM IR (-O2):
define double @randu() {
%1 = tail call double (...) @randu53()
ret double %1
}