xunge/DecIR huggingface dataset:
char *exchange(char *str) {
  int i = 0;
  while (str[i] != '\0') {
    if (str[i] == '-')
      str[i] = '_';
    i++;
  }
  return str;
}


x86 assembly (clang, -O0):
<exchange>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1153 <exchange+0x53>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x2d,%eax
jne    1145 <exchange+0x45>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movb   $0x5f,(%rax,%rcx,1)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <exchange+0xf>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<exchange>:
mov    %rdi,%rax
mov    %rdi,%rcx
jmp    1117 <exchange+0x17>
nopl   0x0(%rax,%rax,1)
movb   $0x5f,(%rcx)
add    $0x1,%rcx
movzbl (%rcx),%edx
cmp    $0x2d,%dl
je     1110 <exchange+0x10>
test   %dl,%dl
jne    1113 <exchange+0x13>
ret

LLVM IR (-O0):
define i8* @exchange(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %25, %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 = sext i8 %9 to i32
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %28
12: ; preds = %4
%13 = load i8*, i8** %2
%14 = load i32, i32* %3
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8, i8* %13, i64 %15
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = icmp eq i32 %18, 45
br i1 %19, label %20, label %25
20: ; preds = %12
%21 = load i8*, i8** %2
%22 = load i32, i32* %3
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds i8, i8* %21, i64 %23
store i8 95, i8* %24
br label %25
25: ; preds = %20, %12
%26 = load i32, i32* %3
%27 = add nsw i32 %26, 1
store i32 %27, i32* %3
br label %4
28: ; preds = %4
%29 = load i8*, i8** %2
ret i8* %29
}

LLVM IR (-O2):
define i8* @exchange(i8* returned %0) {
br label %2
2: ; preds = %7, %1
%3 = phi i64 [ %8, %7 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
switch i8 %5, label %7 [
i8 0, label %9
i8 45, label %6
]
6: ; preds = %2
store i8 95, i8* %4
br label %7
7: ; preds = %2, %6
%8 = add nuw i64 %3, 1
br label %2
9: ; preds = %2
ret i8* %0
}
/* Variables and functions */
int write(int, unsigned char *, int);
int WriteDword(int hFilename, unsigned dValue) {
  unsigned char cBuffer[4];
  cBuffer[0] = dValue & 0xFF;
  cBuffer[1] = (dValue >> 8) & 0xFF;
  cBuffer[2] = (dValue >> 16) & 0xFF;
  cBuffer[3] = (dValue >> 24) & 0xFF;
  return write(hFilename, cBuffer, 4);
}


x86 assembly (clang, -O0):
<WriteDword>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0xff,%eax
mov    %al,-0xc(%rbp)
mov    -0x8(%rbp),%eax
shr    $0x8,%eax
and    $0xff,%eax
mov    %al,-0xb(%rbp)
mov    -0x8(%rbp),%eax
shr    $0x10,%eax
and    $0xff,%eax
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%eax
shr    $0x18,%eax
and    $0xff,%eax
mov    %al,-0x9(%rbp)
mov    -0x4(%rbp),%edi
lea    -0xc(%rbp),%rsi
mov    $0x4,%edx
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<WriteDword>:
push   %rax
mov    %esi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x4,%edx
call   1030 <write@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @WriteDword(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca [4 x i8]
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = and i32 %6, 255
%8 = trunc i32 %7 to i8
%9 = getelementptr inbounds [4 x i8], [4 x i8]* %5, i64 0, i64 0
store i8 %8, i8* %9
%10 = load i32, i32* %4
%11 = lshr i32 %10, 8
%12 = and i32 %11, 255
%13 = trunc i32 %12 to i8
%14 = getelementptr inbounds [4 x i8], [4 x i8]* %5, i64 0, i64 1
store i8 %13, i8* %14
%15 = load i32, i32* %4
%16 = lshr i32 %15, 16
%17 = and i32 %16, 255
%18 = trunc i32 %17 to i8
%19 = getelementptr inbounds [4 x i8], [4 x i8]* %5, i64 0, i64 2
store i8 %18, i8* %19
%20 = load i32, i32* %4
%21 = lshr i32 %20, 24
%22 = and i32 %21, 255
%23 = trunc i32 %22 to i8
%24 = getelementptr inbounds [4 x i8], [4 x i8]* %5, i64 0, i64 3
store i8 %23, i8* %24
%25 = load i32, i32* %3
%26 = getelementptr inbounds [4 x i8], [4 x i8]* %5, i64 0, i64 0
%27 = call i32 @write(i32 %25, i8* %26, i32 4)
ret i32 %27
}

LLVM IR (-O2):
define i32 @WriteDword(i32 %0, i32 %1) {
%3 = alloca [4 x i8]
%4 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 0
%5 = trunc i32 %1 to i8
store i8 %5, i8* %4
%6 = lshr i32 %1, 8
%7 = trunc i32 %6 to i8
%8 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 1
store i8 %7, i8* %8
%9 = lshr i32 %1, 16
%10 = trunc i32 %9 to i8
%11 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 2
store i8 %10, i8* %11
%12 = lshr i32 %1, 24
%13 = trunc i32 %12 to i8
%14 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 3
store i8 %13, i8* %14
%15 = call i32 @write(i32 %0, i8* %4, i32 4)
ret i32 %15
}
__attribute__((no, noclone)) void baz(const char *t, ...) {
  asm volatile("" ::"r"(t) : "memory");
  if (*t == 'T')
    __builtin_abort();
}


x86 assembly (clang, -O0):
<baz>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x54,%eax
jne    1135 <baz+0x25>
call   1030 <abort@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<baz>:
push   %rax
cmpb   $0x54,(%rdi)
je     1118 <baz+0x8>
pop    %rax
ret
call   1030 <abort@plt>

LLVM IR (-O0):
define void @baz(i8* %0, ...) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 84
br i1 %7, label %8, label %9
8: ; preds = %1
unreachable
9: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @baz(i8* %0, ...) {
tail call void asm sideeffect "", "r,~{memory},~{dirflag},~{fpsr},~{flags}"(i8* %0)
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 84
br i1 %3, label %4, label %5
4: ; preds = %1
tail call void @abort()
unreachable
5: ; preds = %1
ret void
}
void gtk_menu_reorder_child() {}


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

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

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

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


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
movslq -0x4(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%esi
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\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 = shl i32 %4, 2
%6 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Type definitions */
struct ottery_state {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ottery_st_rand_bytes_impl(struct ottery_state *, void *,
                                             size_t);
scalar_t__ ottery_st_rand_lock_and_check(struct ottery_state *);
void ottery_st_rand_bytes(struct ottery_state *st, void *out_, size_t n) {
  if (ottery_st_rand_lock_and_check(st))
    return;
  ottery_st_rand_bytes_impl(st, out_, n);
  ((void)0);
}


x86 assembly (clang, -O0):
<ottery_st_rand_bytes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <ottery_st_rand_lock_and_check@plt>
cmp    $0x0,%rax
je     114c <ottery_st_rand_bytes+0x2c>
jmp    115d <ottery_st_rand_bytes+0x3d>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <ottery_st_rand_bytes_impl@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ottery_st_rand_bytes>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
call   1040 <ottery_st_rand_lock_and_check@plt>
test   %rax,%rax
je     113e <ottery_st_rand_bytes+0x1e>
pop    %rbx
pop    %r14
pop    %r15
ret
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <ottery_st_rand_bytes_impl@plt>

LLVM IR (-O0):
%struct.ottery_state = type { i32 }
define void @ottery_st_rand_bytes(%struct.ottery_state* %0, i8* %1, i64 %2) {
%4 = alloca %struct.ottery_state*
%5 = alloca i8*
%6 = alloca i64
store %struct.ottery_state* %0, %struct.ottery_state** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load %struct.ottery_state*, %struct.ottery_state** %4
%8 = call i64 @ottery_st_rand_lock_and_check(%struct.ottery_state* %7)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %3
br label %16
11: ; preds = %3
%12 = load %struct.ottery_state*, %struct.ottery_state** %4
%13 = load i8*, i8** %5
%14 = load i64, i64* %6
%15 = call i32 @ottery_st_rand_bytes_impl(%struct.ottery_state* %12, i8* %13, i64 %14)
br label %16
16: ; preds = %11, %10
ret void
}

LLVM IR (-O2):
%struct.ottery_state = type { i32 }
define void @ottery_st_rand_bytes(%struct.ottery_state* %0, i8* %1, i64 %2) {
%4 = tail call i64 @ottery_st_rand_lock_and_check(%struct.ottery_state* %0)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @ottery_st_rand_bytes_impl(%struct.ottery_state* %0, i8* %1, i64 %2)
br label %8
8: ; preds = %3, %6
ret void
}
/* Variables and functions */
size_t strlncat(char *, size_t, char const *, size_t);
size_t strlcat(char *dst, const char *src, size_t len) {
  return strlncat(dst, len, src, (size_t)-1);
}


x86 assembly (clang, -O0):
<strlcat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    $0xffffffffffffffff,%rcx
call   1030 <strlncat@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlcat>:
mov    %rsi,%rax
mov    %rdx,%rsi
mov    %rax,%rdx
mov    $0xffffffffffffffff,%rcx
jmp    1030 <strlncat@plt>

LLVM IR (-O0):
define i64 @strlcat(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i8*, i8** %4
%8 = load i64, i64* %6
%9 = load i8*, i8** %5
%10 = call i64 @strlncat(i8* %7, i64 %8, i8* %9, i64 -1)
ret i64 %10
}

LLVM IR (-O2):
define i64 @strlcat(i8* %0, i8* %1, i64 %2) {
%4 = tail call i64 @strlncat(i8* %0, i64 %2, i8* %1, i64 -1)
ret i64 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ le16toh(int /*<<< orphan*/);
uint16_t unaligned_read_le16(const void *_u) {
  const struct __attribute__((packed, may_alias)) { uint16_t x; } *u = _u;
  return le16toh(u->x);
}


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

x86 assembly (clang, -O2):
<unaligned_read_le16>:
mov    (%rdi),%edi
jmp    1030 <le16toh@plt>

LLVM IR (-O0):
%struct.anon = type { i32 }
define i32 @unaligned_read_le16(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.anon*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to %struct.anon*
store %struct.anon* %5, %struct.anon** %3
%6 = load %struct.anon*, %struct.anon** %3
%7 = getelementptr inbounds %struct.anon, %struct.anon* %6, i32 0, i32 0
%8 = load i32, i32* %7
%9 = call i32 @le16toh(i32 %8)
ret i32 %9
}

LLVM IR (-O2):
define i32 @unaligned_read_le16(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = tail call i32 @le16toh(i32 %3)
ret i32 %4
}
char *des_options() {
  if (sizeof(unsigned long) != sizeof(long))
    return ("des(idx,int)");
  else
    return ("des(idx,long)");
}


x86 assembly (clang, -O0):
<des_options>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<des_options>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [14 x i8] c"des(idx,long)\00"
define i8* @des_options() {
ret i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [14 x i8] c"des(idx,long)\00"
define i8* @des_options() {
ret i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void mpgdecoder_free(void *ctx) {
  if (ctx) {
    free(ctx);
  }
}


x86 assembly (clang, -O0):
<mpgdecoder_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <mpgdecoder_free+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mpgdecoder_free>:
test   %rdi,%rdi
je     111a <mpgdecoder_free+0xa>
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
define void @mpgdecoder_free(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i32 @free(i8* %6)
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @mpgdecoder_free(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %3, %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ const uint8_t;

/* Variables and functions */
uint8_t hci_event_data_buffer_overflow_get_link_type(const uint8_t *event) {
  return event[2];
}


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

x86 assembly (clang, -O2):
<hci_event_data_buffer_overflow_get_link_type>:
mov    0x8(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @hci_event_data_buffer_overflow_get_link_type(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 2
%5 = load i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @hci_event_data_buffer_overflow_get_link_type(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 2
%3 = load i32, i32* %2
ret i32 %3
}
int main(void) {
  { return ((int)(((1UL - sizeof(int)) >> 16) >> 16)); }
}


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

x86 assembly (clang, -O2):
<main>:
mov    $0xffffffff,%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
}
/* Variables and functions */
int /*<<< orphan*/ indigoFree(int);
int indigoLoadReaction(int);
int indigoReadString(char const *);
__attribute__((visibility("default"))) int
indigoLoadReactionFromString(const char *string) {
  int source = indigoReadString(string);
  int result;
  if (source <= 0)
    return -1;
  result = indigoLoadReaction(source);
  indigoFree(source);
  return result;
}


x86 assembly (clang, -O0):
<indigoLoadReactionFromString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <indigoReadString@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jg     115e <indigoLoadReactionFromString+0x2e>
movl   $0xffffffff,-0x4(%rbp)
jmp    1177 <indigoLoadReactionFromString+0x47>
mov    -0x14(%rbp),%edi
call   1040 <indigoLoadReaction@plt>
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%edi
call   1030 <indigoFree@plt>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<indigoLoadReactionFromString>:
push   %rbp
push   %rbx
push   %rax
call   1050 <indigoReadString@plt>
test   %eax,%eax
jle    1152 <indigoLoadReactionFromString+0x22>
mov    %eax,%ebx
mov    %eax,%edi
call   1040 <indigoLoadReaction@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1030 <indigoFree@plt>
mov    %ebp,%eax
jmp    1157 <indigoLoadReactionFromString+0x27>
mov    $0xffffffff,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @indigoLoadReactionFromString(i8* %0) {
%2 = tail call i32 @indigoReadString(i8* %0)
%3 = icmp slt i32 %2, 1
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = tail call i32 @indigoLoadReaction(i32 %2)
%6 = tail call i32 @indigoFree(i32 %2)
br label %7
7: ; preds = %1, %4
%8 = phi i32 [ %5, %4 ], [ -1, %1 ]
ret i32 %8
}
char *strchrnul(const char *s, int c) {
  for (; *s != '\0' && *s != c; s++)
    ;
  return (char *)s;
}


x86 assembly (clang, -O0):
<strchrnul>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0xd(%rbp)
je     1130 <strchrnul+0x30>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    -0xc(%rbp),%eax
setne  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    1140 <strchrnul+0x40>
jmp    1156 <strchrnul+0x56>
jmp    1145 <strchrnul+0x45>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110b <strchrnul+0xb>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strchrnul>:
mov    %rdi,%rax
add    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
movsbl 0x1(%rax),%ecx
add    $0x1,%rax
test   %ecx,%ecx
je     1120 <strchrnul+0x20>
cmp    %esi,%ecx
jne    1110 <strchrnul+0x10>
ret

LLVM IR (-O0):
define i8* @strchrnul(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
br label %5
5: ; preds = %19, %2
%6 = load i8*, i8** %3
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %16
10: ; preds = %5
%11 = load i8*, i8** %3
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = load i32, i32* %4
%15 = icmp ne i32 %13, %14
br label %16
16: ; preds = %10, %5
%17 = phi i1 [ false, %5 ], [ %15, %10 ]
br i1 %17, label %18, label %22
18: ; preds = %16
br label %19
19: ; preds = %18
%20 = load i8*, i8** %3
%21 = getelementptr inbounds i8, i8* %20, i32 1
store i8* %21, i8** %3
br label %5
22: ; preds = %16
%23 = load i8*, i8** %3
ret i8* %23
}

LLVM IR (-O2):
define i8* @strchrnul(i8* %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %10, %3 ]
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = sext i8 %5 to i32
%8 = icmp eq i32 %7, %1
%9 = or i1 %6, %8
%10 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %9, label %11, label %3
11: ; preds = %3
ret i8* %4
}
/* Type definitions */
typedef unsigned long uint32_t;
typedef long int32_t;

/* Variables and functions */
unsigned long abs64(long);
void yodel_format_hpacc2accuracy(int32_t whole, int32_t *metersp,
                                 uint32_t *tenthousandthsp) {
  *metersp = whole / 10000L;
  *tenthousandthsp = abs64(whole) % 10000UL;
}


x86 assembly (clang, -O0):
<yodel_format_hpacc2accuracy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    $0x2710,%ecx
cqto
idiv   %rcx
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rdi
call   1030 <abs64@plt>
mov    $0x2710,%ecx
xor    %edx,%edx
div    %rcx
mov    -0x18(%rbp),%rax
mov    %rdx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yodel_format_hpacc2accuracy>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%rbx
movabs $0x346dc5d63886594b,%r14
c5 6d 34
mov    %rdi,%rax
imul   %r14
mov    %rdx,%rax
shr    $0x3f,%rax
sar    $0xb,%rdx
add    %rax,%rdx
mov    %rdx,(%rsi)
call   1030 <abs64@plt>
mov    %rax,%rcx
mul    %r14
shr    $0xb,%rdx
imul   $0x2710,%rdx,%rax
sub    %rax,%rcx
mov    %rcx,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @yodel_format_hpacc2accuracy(i64 %0, i64* %1, i64* %2) {
%4 = alloca i64
%5 = alloca i64*
%6 = alloca i64*
store i64 %0, i64* %4
store i64* %1, i64** %5
store i64* %2, i64** %6
%7 = load i64, i64* %4
%8 = sdiv i64 %7, 10000
%9 = load i64*, i64** %5
store i64 %8, i64* %9
%10 = load i64, i64* %4
%11 = call i64 @abs64(i64 %10)
%12 = urem i64 %11, 10000
%13 = load i64*, i64** %6
store i64 %12, i64* %13
ret void
}

LLVM IR (-O2):
define void @yodel_format_hpacc2accuracy(i64 %0, i64* nocapture writeonly %1, i64* nocapture writeonly %2) {
%4 = sdiv i64 %0, 10000
store i64 %4, i64* %1
%5 = tail call i64 @abs64(i64 %0)
%6 = urem i64 %5, 10000
store i64 %6, i64* %2
ret void
}
float __ocl_dot_float(float src1, float src2) { return src1 * src2; }


x86 assembly (clang, -O0):
<__ocl_dot_float>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<__ocl_dot_float>:
mulss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @__ocl_dot_float(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fmul float %5, %6
ret float %7
}

LLVM IR (-O2):
define float @__ocl_dot_float(float %0, float %1) {
%3 = fmul float %0, %1
ret float %3
}
/* Variables and functions */
char const *weak_l2();
const char *__attribute__((section(".test.b"))) sibcall_weak_l2(void) {
  return weak_l2();
}


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

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

LLVM IR (-O0):
define i8* @sibcall_weak_l2() section ".test.b" {
%1 = call i8* (...) @weak_l2()
ret i8* %1
}

LLVM IR (-O2):
define i8* @sibcall_weak_l2() section ".test.b" {
%1 = tail call i8* (...) @weak_l2()
ret i8* %1
}
/* Type definitions */
typedef int /*<<< orphan*/ gid_t;

/* Variables and functions */
int /*<<< orphan*/ getgid();
gid_t getegid(void) { return getgid(); }


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

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

LLVM IR (-O0):
define i32 @getegid() {
%1 = call i32 (...) @getgid()
ret i32 %1
}

LLVM IR (-O2):
define i32 @getegid() {
%1 = tail call i32 (...) @getgid()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0xad() {
  Assert_real((isspace(173) == 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_isspace.c",
              870, ("isspace should be 0 for 0xad"));
}


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

x86 assembly (clang, -O2):
<t_isspace_0xad>:
push   %rax
mov    $0xad,%edi
call   1030 <isspace@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x366,%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_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0xad\00"
define void @t_isspace_0xad() {
%1 = call i64 @isspace(i32 173)
%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 870, i8* getelementptr inbounds ([29 x i8], [29 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_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0xad\00"
define void @t_isspace_0xad() {
%1 = tail call i64 @isspace(i32 173)
%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 870, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("hello world!\n");
  printf("hello world!\n");
  printf("hello world!\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <printf@plt>
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@str.2 = [13 x i8] c"hello world!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.2, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.2, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.2, i64 0, i64 0))
ret i32 0
}
int is_fence_end(int c) { return ((char)(c) == '|') ? 1 : 0; }


x86 assembly (clang, -O0):
<is_fence_end>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
movsbl %al,%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x7c,%edx
cmove  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_fence_end>:
xor    %eax,%eax
cmp    $0x7c,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @is_fence_end(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = trunc i32 %3 to i8
%5 = sext i8 %4 to i32
%6 = icmp eq i32 %5, 124
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 1, i32 0
ret i32 %8
}

LLVM IR (-O2):
define i32 @is_fence_end(i32 %0) {
%2 = and i32 %0, 255
%3 = icmp eq i32 %2, 124
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int rand();
int mapPick(int fillprob) {
  int pick = rand() % 100;
  if (pick < fillprob)
    return 0;
  else
    return 1;
}


x86 assembly (clang, -O0):
<mapPick>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1145 <mapPick+0x35>
movl   $0x0,-0x4(%rbp)
jmp    114c <mapPick+0x3c>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mapPick>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <rand@plt>
movslq %eax,%rcx
imul   $0x51eb851f,%rcx,%rax
mov    %rax,%rdx
shr    $0x3f,%rdx
sar    $0x25,%rax
add    %edx,%eax
imul   $0x64,%eax,%eax
sub    %eax,%ecx
xor    %eax,%eax
cmp    %ebx,%ecx
setge  %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @mapPick(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
%5 = call i32 (...) @rand()
%6 = srem i32 %5, 100
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = load i32, i32* %3
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %11
10: ; preds = %1
store i32 0, i32* %2
br label %12
11: ; preds = %1
store i32 1, i32* %2
br label %12
12: ; preds = %11, %10
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
define i32 @mapPick(i32 %0) {
%2 = tail call i32 (...) @rand()
%3 = srem i32 %2, 100
%4 = icmp sge i32 %3, %0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void showSumExceedsMaximumValueMessage() {
  fprintf(stderr, "Error. Addition results in sum that exceeds maximum "
                  "allowable value of 3999.\n");
}


x86 assembly (clang, -O0):
<showSumExceedsMaximumValueMessage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<showSumExceedsMaximumValueMessage>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [78 x i8] c"Error. Addition results in sum that exceeds maximum allowable value of 3999.\0A\00"
define void @showSumExceedsMaximumValueMessage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [78 x i8] c"Error. Addition results in sum that exceeds maximum allowable value of 3999.\0A\00"
define void @showSumExceedsMaximumValueMessage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int);
void bson_numstr(char *str, int i) { sprintf(str, "%d", i); }


x86 assembly (clang, -O0):
<bson_numstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
lea    0xed3(%rip),%rsi
call   1030 <sprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bson_numstr>:
mov    %esi,%edx
lea    0xee7(%rip),%rsi
jmp    1030 <sprintf@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define void @bson_numstr(i8* nocapture writeonly %0, i32 %1) {
%3 = tail call i32 @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
CONSTRUCTOR() { printf("In CONSTRUCTOR\n"); }


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

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

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

LLVM IR (-O2):
@str = [15 x i8] c"In CONSTRUCTOR\00"
define i32 @CONSTRUCTOR() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
void lua_closestring(void) {}


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

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

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

LLVM IR (-O2):
define void @lua_closestring() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sleep(int);
int main(void) {
  sleep(5);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x5,%edi
call   1030 <sleep@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x5,%edi
call   1030 <sleep@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @sleep(i32 5)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ m34setParams7FFE(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ m34setRAM(int /*<<< orphan*/, int /*<<< orphan*/);
void m34setParams7FFE_RAM(uint16_t addr, uint8_t val) {
  m34setRAM(addr, val);
  m34setParams7FFE(addr, val);
}


x86 assembly (clang, -O0):
<m34setParams7FFE_RAM>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <m34setRAM@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <m34setParams7FFE@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m34setParams7FFE_RAM>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
call   1040 <m34setRAM@plt>
mov    %ebp,%edi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <m34setParams7FFE@plt>

LLVM IR (-O0):
define void @m34setParams7FFE_RAM(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 @m34setRAM(i32 %5, i32 %6)
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = call i32 @m34setParams7FFE(i32 %8, i32 %9)
ret void
}

LLVM IR (-O2):
define void @m34setParams7FFE_RAM(i32 %0, i32 %1) {
%3 = tail call i32 @m34setRAM(i32 %0, i32 %1)
%4 = tail call i32 @m34setParams7FFE(i32 %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ TCIOFLUSH;
int /*<<< orphan*/ send_command(int, int);
scalar_t__ tcflush(int, int /*<<< orphan*/);
void set_high(int fd, int channel) {
  unsigned char buffer[100];
  int got, intvalue;
  if ((channel < 1) || (channel > 8))
    return;
  if (tcflush(fd, TCIOFLUSH) != 0)
    return;
  send_command(fd, channel + '0');
}


x86 assembly (clang, -O0):
<set_high>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jl     1145 <set_high+0x25>
cmpl   $0x8,-0x8(%rbp)
jle    114a <set_high+0x2a>
jmp    1178 <set_high+0x58>
mov    -0x4(%rbp),%edi
mov    0x2e8c(%rip),%rax
mov    (%rax),%esi
call   1030 <tcflush@plt>
cmp    $0x0,%rax
je     116a <set_high+0x4a>
jmp    1178 <set_high+0x58>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
add    $0x30,%esi
call   1040 <send_command@plt>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_high>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
lea    -0x9(%rbx),%eax
cmp    $0xfffffff8,%eax
jb     1142 <set_high+0x22>
mov    %edi,%ebp
mov    0x2eaa(%rip),%rax
mov    (%rax),%esi
call   1030 <tcflush@plt>
test   %rax,%rax
je     1149 <set_high+0x29>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
add    $0x30,%ebx
mov    %ebp,%edi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <send_command@plt>

LLVM IR (-O0):
@TCIOFLUSH = global i32 0
define void @set_high(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca [100 x i8]
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%8 = load i32, i32* %4
%9 = icmp slt i32 %8, 1
br i1 %9, label %13, label %10
10: ; preds = %2
%11 = load i32, i32* %4
%12 = icmp sgt i32 %11, 8
br i1 %12, label %13, label %14
13: ; preds = %10, %2
br label %25
14: ; preds = %10
%15 = load i32, i32* %3
%16 = load i32, i32* @TCIOFLUSH
%17 = call i64 @tcflush(i32 %15, i32 %16)
%18 = icmp ne i64 %17, 0
br i1 %18, label %19, label %20
19: ; preds = %14
br label %25
20: ; preds = %14
%21 = load i32, i32* %3
%22 = load i32, i32* %4
%23 = add nsw i32 %22, 48
%24 = call i32 @send_command(i32 %21, i32 %23)
br label %25
25: ; preds = %20, %19, %13
ret void
}

LLVM IR (-O2):
@TCIOFLUSH = global i32 0
define void @set_high(i32 %0, i32 %1) {
%3 = add i32 %1, -9
%4 = icmp ult i32 %3, -8
br i1 %4, label %12, label %5
5: ; preds = %2
%6 = load i32, i32* @TCIOFLUSH
%7 = tail call i64 @tcflush(i32 %0, i32 %6)
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %5
%10 = add nuw nsw i32 %1, 48
%11 = tail call i32 @send_command(i32 %0, i32 %10)
br label %12
12: ; preds = %5, %2, %9
ret void
}
/* Variables and functions */
int truncf(float);
void trunc_w_s(float *source, int *dest) { *dest = truncf(*source); }


x86 assembly (clang, -O0):
<trunc_w_s>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
call   1030 <truncf@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<trunc_w_s>:
push   %rbx
mov    %rsi,%rbx
movss  (%rdi),%xmm0
call   1030 <truncf@plt>
mov    %eax,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @trunc_w_s(float* nocapture %0, i32* nocapture writeonly %1) {
%3 = load float, float* %0
%4 = tail call i32 @truncf(float %3)
store i32 %4, i32* %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ _exit(int /*<<< orphan*/);
int /*<<< orphan*/ close(int /*<<< orphan*/);
int /*<<< orphan*/ write(int /*<<< orphan*/, char *, int);
void close_child(pid_t pid) {
  char success = 0;
  write(-pid, &success, 1);
  close(-pid);
  _exit(0);
}


x86 assembly (clang, -O0):
<close_child>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movb   $0x0,-0x5(%rbp)
xor    %edi,%edi
sub    -0x4(%rbp),%edi
lea    -0x5(%rbp),%rsi
mov    $0x1,%edx
call   1040 <write@plt>
xor    %edi,%edi
sub    -0x4(%rbp),%edi
call   1050 <close@plt>
xor    %edi,%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<close_child>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
movb   $0x0,0xf(%rsp)
neg    %ebx
lea    0xf(%rsp),%rsi
mov    %ebx,%edi
mov    $0x1,%edx
call   1040 <write@plt>
mov    %ebx,%edi
call   1050 <close@plt>
xor    %edi,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
define void @close_child(i32 %0) {
%2 = alloca i32
%3 = alloca i8
store i32 %0, i32* %2
store i8 0, i8* %3
%4 = load i32, i32* %2
%5 = sub nsw i32 0, %4
%6 = call i32 @write(i32 %5, i8* %3, i32 1)
%7 = load i32, i32* %2
%8 = sub nsw i32 0, %7
%9 = call i32 @close(i32 %8)
%10 = call i32 @_exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @close_child(i32 %0) {
%2 = alloca i8
store i8 0, i8* %2
%3 = sub nsw i32 0, %0
%4 = call i32 @write(i32 %3, i8* %2, i32 1)
%5 = tail call i32 @close(i32 %3)
%6 = tail call i32 @_exit(i32 0)
unreachable
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
bool dmc_unrar_huff_tree_node_is_invalid(uint32_t node_value) {
  return node_value == 0xFFFFFFFF;
}


x86 assembly (clang, -O0):
<dmc_unrar_huff_tree_node_is_invalid>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0xffffffff,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dmc_unrar_huff_tree_node_is_invalid>:
xor    %eax,%eax
cmp    $0xffffffff,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @dmc_unrar_huff_tree_node_is_invalid(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, -1
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @dmc_unrar_huff_tree_node_is_invalid(i32 %0) {
%2 = icmp eq i32 %0, -1
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ reshape(int, int);
void win_resize(int width, int height) { reshape(width, height); }


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

x86 assembly (clang, -O2):
<win_resize>:
jmp    1030 <reshape@plt>

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

LLVM IR (-O2):
define void @win_resize(i32 %0, i32 %1) {
%3 = tail call i32 @reshape(i32 %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void expfn_version() {
  puts("@"
       "(#)"
       "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
       "2022-01-22/02-19-57/repos/PawelNabe/EOS/refs/heads/master/SRC/expfn.c"
       " "
       "Sat Jan 22 08:19:10 2022"
       " compiled: "
       "Mar 15 2022"
       " "
       "23:01:07");
}


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

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

LLVM IR (-O0):
@.str = [194 x i8] c"@(#)/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/PawelNabe/EOS/refs/heads/master/SRC/expfn.c Sat Jan 22 08:19:10 2022 compiled: Mar 15 2022 23:01:07\00"
define void @expfn_version() {
%1 = call i32 @puts(i8* getelementptr inbounds ([194 x i8], [194 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [194 x i8] c"@(#)/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/PawelNabe/EOS/refs/heads/master/SRC/expfn.c Sat Jan 22 08:19:10 2022 compiled: Mar 15 2022 23:01:07\00"
define void @expfn_version() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([194 x i8], [194 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ install(char *, char *);
int main() {
  install("test", "1");
  install("test", "2");
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
lea    0xee6(%rip),%rsi
mov    %rbx,%rdi
call   1030 <install@plt>
lea    0xed9(%rip),%rsi
mov    %rbx,%rdi
call   1030 <install@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"test\00"
@.str.1 = [2 x i8] c"1\00"
@.str.2 = [2 x i8] c"2\00"
define i32 @main() {
%1 = call i32 @install(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 @install(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"test\00"
@.str.1 = [2 x i8] c"1\00"
@.str.2 = [2 x i8] c"2\00"
define i32 @main() {
%1 = tail call i32 @install(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @install(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void __attribute__((constructor)) ctor() { printf("ctor()\n"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"ctor()\0A\00"
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @ctor, i8* null }]
define void @ctor() {
%1 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @ctor, i8* null }]
@str = [7 x i8] c"ctor()\00"
define void @ctor() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
ret void
}
void tgl_out_cstring(const char *str, long len) {}


x86 assembly (clang, -O0):
<tgl_out_cstring>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @tgl_out_cstring(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
ret void
}

LLVM IR (-O2):
define void @tgl_out_cstring(i8* nocapture %0, i64 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void freesettingsarray(char **a) {
  while (*a) {
    free(*a);
    a++;
  }
}


x86 assembly (clang, -O0):
<freesettingsarray>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     1147 <freesettingsarray+0x37>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <freesettingsarray+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<freesettingsarray>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1131 <freesettingsarray+0x21>
add    $0x8,%rbx
call   1030 <free@plt>
mov    (%rbx),%rdi
add    $0x8,%rbx
test   %rdi,%rdi
jne    1120 <freesettingsarray+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @freesettingsarray(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = icmp eq i8* %2, null
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8* [ %9, %4 ], [ %2, %1 ]
%6 = phi i8** [ %8, %4 ], [ %0, %1 ]
%7 = tail call i32 @free(i8* %5)
%8 = getelementptr inbounds i8*, i8** %6, i64 1
%9 = load i8*, i8** %8
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %4
11: ; preds = %4, %1
ret void
}