xunge/DecIR huggingface dataset:
char decodeUnixCtrlChar(char ch) {
  const char ctrlKeys[] = {
      '@', 'A', 'B', 'C', 'D', 'E', 'F',  'G', 'H', 'I', 'J',
      'K', 'L', 'M', 'N', 'O', 'P', 'Q',  'R', 'S', 'T', 'U',
      'V', 'W', 'X', 'Y', 'Z', '[', '\\', ']', '^', '_',
  };
  unsigned char uch = ch;
  if (uch < 32) {
    return ctrlKeys[uch];
  } else if (uch == 127) {
    return '?';
  } else {
    return '\0';
  }
}


x86 assembly (clang, -O0):
<decodeUnixCtrlChar>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
mov    0xeef(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xeec(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xee9(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xee6(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x2(%rbp),%al
mov    %al,-0x31(%rbp)
movzbl -0x31(%rbp),%eax
cmp    $0x20,%eax
jge    1159 <decodeUnixCtrlChar+0x59>
movzbl -0x31(%rbp),%eax
mov    -0x30(%rbp,%rax,1),%al
mov    %al,-0x1(%rbp)
jmp    1173 <decodeUnixCtrlChar+0x73>
movzbl -0x31(%rbp),%eax
cmp    $0x7f,%eax
jne    116f <decodeUnixCtrlChar+0x6f>
movb   $0x3f,-0x1(%rbp)
jmp    1173 <decodeUnixCtrlChar+0x73>
movb   $0x0,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<decodeUnixCtrlChar>:
cmp    $0x1f,%dil
ja     1115 <decodeUnixCtrlChar+0x15>
movzbl %dil,%eax
lea    0xeef(%rip),%rcx
mov    (%rax,%rcx,1),%al
ret
xor    %ecx,%ecx
cmp    $0x7f,%dil
mov    $0x3f,%eax
cmovne %ecx,%eax
ret

LLVM IR (-O0):
@__const.decodeUnixCtrlChar.ctrlKeys = [32 x i8] c"@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_"
define signext i8 @decodeUnixCtrlChar(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
%4 = alloca [32 x i8]
%5 = alloca i8
store i8 %0, i8* %3
%6 = bitcast [32 x i8]* %4 to i8*
%7 = load i8, i8* %3
store i8 %7, i8* %5
%8 = load i8, i8* %5
%9 = zext i8 %8 to i32
%10 = icmp slt i32 %9, 32
br i1 %10, label %11, label %16
11: ; preds = %1
%12 = load i8, i8* %5
%13 = zext i8 %12 to i64
%14 = getelementptr inbounds [32 x i8], [32 x i8]* %4, i64 0, i64 %13
%15 = load i8, i8* %14
store i8 %15, i8* %2
br label %22
16: ; preds = %1
%17 = load i8, i8* %5
%18 = zext i8 %17 to i32
%19 = icmp eq i32 %18, 127
br i1 %19, label %20, label %21
20: ; preds = %16
store i8 63, i8* %2
br label %22
21: ; preds = %16
store i8 0, i8* %2
br label %22
22: ; preds = %21, %20, %11
%23 = load i8, i8* %2
ret i8 %23
}

LLVM IR (-O2):
@__const.decodeUnixCtrlChar.ctrlKeys = [32 x i8] c"@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_"
define signext i8 @decodeUnixCtrlChar(i8 signext %0) {
%2 = icmp ult i8 %0, 32
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = zext i8 %0 to i64
%5 = getelementptr inbounds [32 x i8], [32 x i8]* @__const.decodeUnixCtrlChar.ctrlKeys, i64 0, i64 %4
%6 = load i8, i8* %5
br label %10
7: ; preds = %1
%8 = icmp eq i8 %0, 127
%9 = select i1 %8, i8 63, i8 0
br label %10
10: ; preds = %7, %3
%11 = phi i8 [ %6, %3 ], [ %9, %7 ]
ret i8 %11
}
/* Type definitions */
typedef scalar_t__ pid_t;

/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
scalar_t__ fork();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ sleep(int);
int /*<<< orphan*/ waitpid(scalar_t__, int *, int /*<<< orphan*/);
int main() {
  int status;
  pid_t pid;
  for (;;) {
    sleep(5);
    pid = fork();
    if (pid == 0) {
      sleep(100);
      printf("hello\n");
      exit(0);
    }
    waitpid(pid, &status, 0);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x5,%edi
call   1060 <sleep@plt>
mov    $0x0,%al
call   1070 <fork@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    119c <main+0x4c>
mov    $0x64,%edi
call   1060 <sleep@plt>
lea    0xe70(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rdi
lea    -0x8(%rbp),%rsi
xor    %edx,%edx
call   1040 <waitpid@plt>
jmp    115f <main+0xf>

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
mov    $0x5,%edi
call   1060 <sleep@plt>
xor    %eax,%eax
call   1070 <fork@plt>
test   %rax,%rax
je     1193 <main+0x43>
lea    0xc(%rsp),%rbx
mov    %rax,%rdi
mov    %rbx,%rsi
xor    %edx,%edx
call   1040 <waitpid@plt>
mov    $0x5,%edi
call   1060 <sleep@plt>
xor    %eax,%eax
call   1070 <fork@plt>
test   %rax,%rax
jne    1170 <main+0x20>
mov    $0x64,%edi
call   1060 <sleep@plt>
lea    0xe5c(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"hello\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i64
store i32 0, i32* %1
br label %4
4: ; preds = %13, %0
%5 = call i32 @sleep(i32 5)
%6 = call i64 (...) @fork()
store i64 %6, i64* %3
%7 = load i64, i64* %3
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %4
%10 = call i32 @sleep(i32 100)
%11 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%12 = call i32 @exit(i32 0)
unreachable
13: ; preds = %4
%14 = load i64, i64* %3
%15 = call i32 @waitpid(i64 %14, i32* %2, i32 0)
br label %4
}

LLVM IR (-O2):
@str = [6 x i8] c"hello\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @sleep(i32 5)
%4 = call i64 (...) @fork()
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %10, %0
%7 = call i32 @sleep(i32 100)
%8 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
%9 = call i32 @exit(i32 0)
unreachable
10: ; preds = %0, %10
%11 = phi i64 [ %14, %10 ], [ %4, %0 ]
%12 = call i32 @waitpid(i64 %11, i32* %1, i32 0)
%13 = call i32 @sleep(i32 5)
%14 = call i64 (...) @fork()
%15 = icmp eq i64 %14, 0
br i1 %15, label %6, label %10
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_156() {
  Assert_real((isqrt(156) == 12),
              "/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/stdlib/isqrt.c",
              785, ("Integer square root of 156 should be 12"));
}


x86 assembly (clang, -O0):
<t_sqrt_156>:
push   %rbp
mov    %rsp,%rbp
mov    $0x9c,%edi
call   1030 <isqrt@plt>
cmp    $0xc,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xec0(%rip),%rsi
mov    $0x311,%edx
lea    0xf56(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_sqrt_156>:
push   %rax
mov    $0x9c,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
cmp    $0xc,%eax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0x311,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [40 x i8] c"Integer square root of 156 should be 12\00"
define void @t_sqrt_156() {
%1 = call i32 @isqrt(i32 156)
%2 = icmp eq i32 %1, 12
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 785, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [40 x i8] c"Integer square root of 156 should be 12\00"
define void @t_sqrt_156() {
%1 = tail call i32 @isqrt(i32 156)
%2 = icmp eq i32 %1, 12
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 785, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int test_imm_35uint16_mem(unsigned short *val) {
  return ((*val) & (0x35 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_35uint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 53
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_mode;
};
struct stack {
  int dummy;
};

/* Variables and functions */
scalar_t__ path_stat(struct stack **, char const *, struct stat *);
int st_is_dir(int /*<<< orphan*/);
int path_is_dir(struct stack **path, const char *fname) {
  struct stat st;
  if (path_stat(path, fname, &st))
    return 0;
  return st_is_dir(st.st_mode);
}


x86 assembly (clang, -O0):
<path_is_dir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
lea    -0x20(%rbp),%rdx
call   1030 <path_stat@plt>
cmp    $0x0,%rax
je     1157 <path_is_dir+0x37>
movl   $0x0,-0x4(%rbp)
jmp    1162 <path_is_dir+0x42>
mov    -0x20(%rbp),%edi
call   1040 <st_is_dir@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<path_is_dir>:
push   %rax
mov    %rsp,%rdx
call   1030 <path_stat@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
je     1135 <path_is_dir+0x15>
pop    %rcx
ret
mov    (%rsp),%edi
call   1040 <st_is_dir@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.stack = type { i32 }
%struct.stat = type { i32 }
define i32 @path_is_dir(%struct.stack** %0, i8* %1) {
%3 = alloca i32
%4 = alloca %struct.stack**
%5 = alloca i8*
%6 = alloca %struct.stat
store %struct.stack** %0, %struct.stack*** %4
store i8* %1, i8** %5
%7 = load %struct.stack**, %struct.stack*** %4
%8 = load i8*, i8** %5
%9 = call i64 @path_stat(%struct.stack** %7, i8* %8, %struct.stat* %6)
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %2
store i32 0, i32* %3
br label %16
12: ; preds = %2
%13 = getelementptr inbounds %struct.stat, %struct.stat* %6, i32 0, i32 0
%14 = load i32, i32* %13
%15 = call i32 @st_is_dir(i32 %14)
store i32 %15, i32* %3
br label %16
16: ; preds = %12, %11
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
%struct.stack = type { i32 }
%struct.stat = type { i32 }
define i32 @path_is_dir(%struct.stack** %0, i8* %1) {
%3 = alloca %struct.stat
%4 = bitcast %struct.stat* %3 to i8*
%5 = call i64 @path_stat(%struct.stack** %0, i8* %1, %struct.stat* %3)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %2
%8 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 0
%9 = load i32, i32* %8
%10 = call i32 @st_is_dir(i32 %9)
br label %11
11: ; preds = %2, %7
%12 = phi i32 [ %10, %7 ], [ 0, %2 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ qprintf(char *, char const *, int);
int q__FIO_CreateFile(const char *filename) {
  static int fd = 1;
  qprintf("*** FIO_CreateFile('%s') => %d\n", filename, fd);
  return fd++;
}


x86 assembly (clang, -O0):
<q__FIO_CreateFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
mov    0x2f02(%rip),%edx
lea    0xed3(%rip),%rdi
call   1030 <qprintf@plt>
mov    0x2ef0(%rip),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,0x2ee5(%rip)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<q__FIO_CreateFile>:
push   %rax
mov    %rdi,%rsi
mov    0x2f0e(%rip),%edx
lea    0xedf(%rip),%rdi
call   1030 <qprintf@plt>
mov    0x2efc(%rip),%eax
lea    0x1(%rax),%ecx
mov    %ecx,0x2ef3(%rip)
pop    %rcx
ret

LLVM IR (-O0):
@q__FIO_CreateFile.fd = internal global i32 1
@.str = [32 x i8] c"*** FIO_CreateFile('%s') => %d\0A\00"
define i32 @q__FIO_CreateFile(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @q__FIO_CreateFile.fd
%5 = call i32 @qprintf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %3, i32 %4)
%6 = load i32, i32* @q__FIO_CreateFile.fd
%7 = add nsw i32 %6, 1
store i32 %7, i32* @q__FIO_CreateFile.fd
ret i32 %6
}

LLVM IR (-O2):
@q__FIO_CreateFile.fd = internal unnamed_addr global i32 1
@.str = [32 x i8] c"*** FIO_CreateFile('%s') => %d\0A\00"
define i32 @q__FIO_CreateFile(i8* %0) {
%2 = load i32, i32* @q__FIO_CreateFile.fd
%3 = tail call i32 @qprintf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %2)
%4 = load i32, i32* @q__FIO_CreateFile.fd
%5 = add nsw i32 %4, 1
store i32 %5, i32* @q__FIO_CreateFile.fd
ret i32 %4
}
int as_int(char *_c) {
  unsigned char *c = (unsigned char *)_c;
  return c[0] | ((int)c[1] << 8) | ((int)c[2] << 16) | ((int)c[3] << 24);
}


x86 assembly (clang, -O0):
<as_int>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movzbl (%rax),%eax
mov    -0x10(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%rcx
movzbl 0x2(%rcx),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%rcx
movzbl 0x3(%rcx),%ecx
shl    $0x18,%ecx
or     %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @as_int(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
store i8* %4, i8** %3
%5 = load i8*, i8** %3
%6 = getelementptr inbounds i8, i8* %5, i64 0
%7 = load i8, i8* %6
%8 = zext i8 %7 to i32
%9 = load i8*, i8** %3
%10 = getelementptr inbounds i8, i8* %9, i64 1
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = shl i32 %12, 8
%14 = or i32 %8, %13
%15 = load i8*, i8** %3
%16 = getelementptr inbounds i8, i8* %15, i64 2
%17 = load i8, i8* %16
%18 = zext i8 %17 to i32
%19 = shl i32 %18, 16
%20 = or i32 %14, %19
%21 = load i8*, i8** %3
%22 = getelementptr inbounds i8, i8* %21, i64 3
%23 = load i8, i8* %22
%24 = zext i8 %23 to i32
%25 = shl i32 %24, 24
%26 = or i32 %20, %25
ret i32 %26
}

LLVM IR (-O2):
define i32 @as_int(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i32
%4 = getelementptr inbounds i8, i8* %0, i64 1
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = shl nuw nsw i32 %6, 8
%8 = or i32 %7, %3
%9 = getelementptr inbounds i8, i8* %0, i64 2
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = shl nuw nsw i32 %11, 16
%13 = or i32 %8, %12
%14 = getelementptr inbounds i8, i8* %0, i64 3
%15 = load i8, i8* %14
%16 = zext i8 %15 to i32
%17 = shl nuw i32 %16, 24
%18 = or i32 %13, %17
ret i32 %18
}
/* Type definitions */
struct task_struct {
  int dummy;
};

/* Variables and functions */
scalar_t__ task_thread_info(struct task_struct *);
unsigned long *end_of_stack(struct task_struct *p) {
  return (unsigned long *)(task_thread_info(p) + 1);
}


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

x86 assembly (clang, -O2):
<end_of_stack>:
push   %rax
call   1030 <task_thread_info@plt>
add    $0x1,%rax
pop    %rcx
ret

LLVM IR (-O0):
%struct.task_struct = type { i32 }
define i64* @end_of_stack(%struct.task_struct* %0) {
%2 = alloca %struct.task_struct*
store %struct.task_struct* %0, %struct.task_struct** %2
%3 = load %struct.task_struct*, %struct.task_struct** %2
%4 = call i64 @task_thread_info(%struct.task_struct* %3)
%5 = add nsw i64 %4, 1
%6 = inttoptr i64 %5 to i64*
ret i64* %6
}

LLVM IR (-O2):
%struct.task_struct = type { i32 }
define i64* @end_of_stack(%struct.task_struct* %0) {
%2 = tail call i64 @task_thread_info(%struct.task_struct* %0)
%3 = add nsw i64 %2, 1
%4 = inttoptr i64 %3 to i64*
ret i64* %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void *desordenado(void *valor) {
  printf("Thread desordenada %d\n", *((int *)valor));
  return NULL;
}


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

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

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

LLVM IR (-O2):
@.str = [23 x i8] c"Thread desordenada %d\0A\00"
define noalias i8* @desordenado(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i8* null
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int write_multprec_target_solutions(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(497, a, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<write_multprec_target_solutions>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x1f1,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_multprec_target_solutions>:
mov    $0x1f1,%edi
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @write_multprec_target_solutions() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc(i32 497, i32* %5, i32* %6, double* %7)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @write_multprec_target_solutions() {
%1 = tail call i32 @_ada_use_c2phc(i32 497, i32* undef, i32* undef, double* undef)
ret i32 %1
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int /*<<< orphan*/ *display;
};
typedef TYPE_1__ XCrossingEvent;
typedef int /*<<< orphan*/ Display;

/* Variables and functions */
void set_XCrossingEvent_display(void *_p, void *_v) {
  ((XCrossingEvent *)_p)->display = (Display *)_v;
}


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

x86 assembly (clang, -O2):
<set_XCrossingEvent_display>:
mov    %rsi,(%rdi)
ret

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

LLVM IR (-O2):
define void @set_XCrossingEvent_display(i8* nocapture writeonly %0, i8* %1) {
%3 = bitcast i8* %0 to i8**
store i8* %1, i8** %3
ret void
}
/* Variables and functions */
scalar_t__ isspace(int);
char *space2underscore(char *str) {
  char *c;
  for (c = str; *c != '\0'; c++) {
    if (isspace((int)*c))
      *c = '_';
  }
  return str;
}


x86 assembly (clang, -O0):
<space2underscore>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1167 <space2underscore+0x57>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
je     1151 <space2underscore+0x41>
mov    -0x10(%rbp),%rax
movb   $0x5f,(%rax)
jmp    1156 <space2underscore+0x46>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1124 <space2underscore+0x14>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<space2underscore>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    (%rdi),%al
test   %al,%al
je     114e <space2underscore+0x3e>
lea    0x1(%r14),%rbx
jmp    113b <space2underscore+0x2b>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
je     114e <space2underscore+0x3e>
movsbl %al,%edi
call   1030 <isspace@plt>
test   %rax,%rax
je     1130 <space2underscore+0x20>
movb   $0x5f,-0x1(%rbx)
jmp    1130 <space2underscore+0x20>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @space2underscore(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
store i8* %4, i8** %3
br label %5
5: ; preds = %19, %1
%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 %22
10: ; preds = %5
%11 = load i8*, i8** %3
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = call i64 @isspace(i32 %13)
%15 = icmp ne i64 %14, 0
br i1 %15, label %16, label %18
16: ; preds = %10
%17 = load i8*, i8** %3
store i8 95, i8* %17
br label %18
18: ; preds = %16, %10
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 = %5
%23 = load i8*, i8** %2
ret i8* %23
}

LLVM IR (-O2):
define i8* @space2underscore(i8* returned %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %15, label %4
4: ; preds = %1, %11
%5 = phi i8 [ %13, %11 ], [ %2, %1 ]
%6 = phi i8* [ %12, %11 ], [ %0, %1 ]
%7 = sext i8 %5 to i32
%8 = tail call i64 @isspace(i32 %7)
%9 = icmp eq i64 %8, 0
br i1 %9, label %11, label %10
10: ; preds = %4
store i8 95, i8* %6
br label %11
11: ; preds = %4, %10
%12 = getelementptr inbounds i8, i8* %6, i64 1
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %4
15: ; preds = %11, %1
ret i8* %0
}
int c_tolower(int c) { return (c >= 'A' && c <= 'Z' ? c - 'A' + 'a' : c); }


x86 assembly (clang, -O0):
<c_tolower>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x41,-0x4(%rbp)
jl     112c <c_tolower+0x2c>
cmpl   $0x5a,-0x4(%rbp)
jg     112c <c_tolower+0x2c>
mov    -0x4(%rbp),%eax
sub    $0x41,%eax
add    $0x61,%eax
mov    %eax,-0x8(%rbp)
jmp    1132 <c_tolower+0x32>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_tolower>:
lea    -0x41(%rdi),%ecx
lea    0x20(%rdi),%eax
cmp    $0x1a,%ecx
cmovae %edi,%eax
ret

LLVM IR (-O0):
define i32 @c_tolower(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 65
br i1 %4, label %5, label %12
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 90
br i1 %7, label %8, label %12
8: ; preds = %5
%9 = load i32, i32* %2
%10 = sub nsw i32 %9, 65
%11 = add nsw i32 %10, 97
br label %14
12: ; preds = %5, %1
%13 = load i32, i32* %2
br label %14
14: ; preds = %12, %8
%15 = phi i32 [ %11, %8 ], [ %13, %12 ]
ret i32 %15
}

LLVM IR (-O2):
define i32 @c_tolower(i32 %0) {
%2 = add i32 %0, -65
%3 = icmp ult i32 %2, 26
%4 = add nsw i32 %0, 32
%5 = select i1 %3, i32 %4, i32 %0
ret i32 %5
}
int sec_init_key(unsigned char *rsa_n, unsigned int n_len, unsigned char *rsa_e,
                 unsigned int e_len) {
  return 0;
}


x86 assembly (clang, -O0):
<sec_init_key>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @sec_init_key(i8* nocapture readnone %0, i32 %1, i8* nocapture readnone %2, i32 %3) {
ret i32 0
}
int main(void) {
  'a' && 'b';
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Type definitions */
struct katcp_notice {
  int dummy;
};
struct katcp_dispatch {
  int dummy;
};

/* Variables and functions */
int configure_notice_katcp(struct katcp_dispatch *, struct katcp_notice *, int,
                           void *);
int trigger_single_notice_katcp(struct katcp_dispatch *d,
                                struct katcp_notice *n, void *data) {
  return configure_notice_katcp(d, n, 2, data);
}


x86 assembly (clang, -O0):
<trigger_single_notice_katcp>:
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    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rcx
mov    $0x2,%edx
call   1030 <configure_notice_katcp@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<trigger_single_notice_katcp>:
mov    %rdx,%rcx
mov    $0x2,%edx
jmp    1030 <configure_notice_katcp@plt>

LLVM IR (-O0):
%struct.katcp_dispatch = type { i32 }
%struct.katcp_notice = type { i32 }
define i32 @trigger_single_notice_katcp(%struct.katcp_dispatch* %0, %struct.katcp_notice* %1, i8* %2) {
%4 = alloca %struct.katcp_dispatch*
%5 = alloca %struct.katcp_notice*
%6 = alloca i8*
store %struct.katcp_dispatch* %0, %struct.katcp_dispatch** %4
store %struct.katcp_notice* %1, %struct.katcp_notice** %5
store i8* %2, i8** %6
%7 = load %struct.katcp_dispatch*, %struct.katcp_dispatch** %4
%8 = load %struct.katcp_notice*, %struct.katcp_notice** %5
%9 = load i8*, i8** %6
%10 = call i32 @configure_notice_katcp(%struct.katcp_dispatch* %7, %struct.katcp_notice* %8, i32 2, i8* %9)
ret i32 %10
}

LLVM IR (-O2):
%struct.katcp_dispatch = type { i32 }
%struct.katcp_notice = type { i32 }
define i32 @trigger_single_notice_katcp(%struct.katcp_dispatch* %0, %struct.katcp_notice* %1, i8* %2) {
%4 = tail call i32 @configure_notice_katcp(%struct.katcp_dispatch* %0, %struct.katcp_notice* %1, i32 2, i8* %2)
ret i32 %4
}
int isnota_num(char d) {
  if (d != '0' && d != '1' && d != '2' && d != '3' && d != '4' && d != '5' &&
      d != '6' && d != '7' && d != '8' && d != '9') {
    return 1;
  } else
    return 0;
  return 0;
}


x86 assembly (clang, -O0):
<isnota_num>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x30,%eax
je     1198 <isnota_num+0x98>
movsbl -0x5(%rbp),%eax
cmp    $0x31,%eax
je     1198 <isnota_num+0x98>
movsbl -0x5(%rbp),%eax
cmp    $0x32,%eax
je     1198 <isnota_num+0x98>
movsbl -0x5(%rbp),%eax
cmp    $0x33,%eax
je     1198 <isnota_num+0x98>
movsbl -0x5(%rbp),%eax
cmp    $0x34,%eax
je     1198 <isnota_num+0x98>
movsbl -0x5(%rbp),%eax
cmp    $0x35,%eax
je     1198 <isnota_num+0x98>
movsbl -0x5(%rbp),%eax
cmp    $0x36,%eax
je     1198 <isnota_num+0x98>
movsbl -0x5(%rbp),%eax
cmp    $0x37,%eax
je     1198 <isnota_num+0x98>
movsbl -0x5(%rbp),%eax
cmp    $0x38,%eax
je     1198 <isnota_num+0x98>
movsbl -0x5(%rbp),%eax
cmp    $0x39,%eax
je     1198 <isnota_num+0x98>
movl   $0x1,-0x4(%rbp)
jmp    119f <isnota_num+0x9f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isnota_num>:
add    $0xc6,%dil
xor    %eax,%eax
cmp    $0xf6,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @isnota_num(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp ne i32 %5, 48
br i1 %6, label %7, label %44
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp ne i32 %9, 49
br i1 %10, label %11, label %44
11: ; preds = %7
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = icmp ne i32 %13, 50
br i1 %14, label %15, label %44
15: ; preds = %11
%16 = load i8, i8* %3
%17 = sext i8 %16 to i32
%18 = icmp ne i32 %17, 51
br i1 %18, label %19, label %44
19: ; preds = %15
%20 = load i8, i8* %3
%21 = sext i8 %20 to i32
%22 = icmp ne i32 %21, 52
br i1 %22, label %23, label %44
23: ; preds = %19
%24 = load i8, i8* %3
%25 = sext i8 %24 to i32
%26 = icmp ne i32 %25, 53
br i1 %26, label %27, label %44
27: ; preds = %23
%28 = load i8, i8* %3
%29 = sext i8 %28 to i32
%30 = icmp ne i32 %29, 54
br i1 %30, label %31, label %44
31: ; preds = %27
%32 = load i8, i8* %3
%33 = sext i8 %32 to i32
%34 = icmp ne i32 %33, 55
br i1 %34, label %35, label %44
35: ; preds = %31
%36 = load i8, i8* %3
%37 = sext i8 %36 to i32
%38 = icmp ne i32 %37, 56
br i1 %38, label %39, label %44
39: ; preds = %35
%40 = load i8, i8* %3
%41 = sext i8 %40 to i32
%42 = icmp ne i32 %41, 57
br i1 %42, label %43, label %44
43: ; preds = %39
store i32 1, i32* %2
br label %45
44: ; preds = %39, %35, %31, %27, %23, %19, %15, %11, %7, %1
store i32 0, i32* %2
br label %45
45: ; preds = %44, %43
%46 = load i32, i32* %2
ret i32 %46
}

LLVM IR (-O2):
define i32 @isnota_num(i8 signext %0) {
%2 = add i8 %0, -58
%3 = icmp ult i8 %2, -10
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int foo();
int main() {
  if (foo() != 26)
    abort();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <foo@plt>
cmp    $0x1a,%eax
je     1156 <main+0x26>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <foo@plt>
cmp    $0x1a,%eax
jne    1144 <main+0x14>
xor    %edi,%edi
call   1050 <exit@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @foo()
%3 = icmp ne i32 %2, 26
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @abort()
unreachable
6: ; preds = %0
%7 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @foo()
%2 = icmp eq i32 %1, 26
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = tail call i32 @exit(i32 0)
unreachable
}
int func3() {
  int bar;
  float func1 = 0.3;
  if (func1 > 1)
    bar = 2;
  else
    bar = 1;
  return bar;
}


x86 assembly (clang, -O0):
<func3>:
push   %rbp
mov    %rsp,%rbp
movss  0xef8(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
movss  0xee2(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    1133 <func3+0x33>
movl   $0x2,-0x4(%rbp)
jmp    113a <func3+0x3a>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @func3() {
%1 = alloca i32
%2 = alloca float
store float 0x3FD3333340000000, float* %2
%3 = load float, float* %2
%4 = fcmp ogt float %3, 1.000000e+00
br i1 %4, label %5, label %6
5: ; preds = %0
store i32 2, i32* %1
br label %7
6: ; preds = %0
store i32 1, i32* %1
br label %7
7: ; preds = %6, %5
%8 = load i32, i32* %1
ret i32 %8
}

LLVM IR (-O2):
define i32 @func3() {
ret i32 1
}
int gpio_export_link(struct device *dev, const char *name, unsigned gpio) {
  return -38;
}


x86 assembly (clang, -O0):
<gpio_export_link>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    $0xffffffda,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.device = type opaque
define i32 @gpio_export_link(%struct.device* %0, i8* %1, i32 %2) {
%4 = alloca %struct.device*
%5 = alloca i8*
%6 = alloca i32
store %struct.device* %0, %struct.device** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
ret i32 -38
}

LLVM IR (-O2):
%struct.device = type opaque
define i32 @gpio_export_link(%struct.device* nocapture readnone %0, i8* nocapture readnone %1, i32 %2) {
ret i32 -38
}
void test_asserting() {
  do {
    seatest_assert_true(1 == 1, __FUNCTION__, 5);
  } while (0);
  do {
    seatest_assert_false(1 == 2, __FUNCTION__, 6);
  } while (0);
  do {
    seatest_assert_int_equal(1, 1, __FUNCTION__, 7);
  } while (0);
}


x86 assembly (clang, -O0):
<test_asserting>:
push   %rbp
mov    %rsp,%rbp
jmp    1139 <test_asserting+0x9>
mov    $0x1,%edi
lea    0xebb(%rip),%rsi
mov    $0x5,%edx
mov    $0x0,%al
call   1030 <seatest_assert_true@plt>
jmp    1156 <test_asserting+0x26>
xor    %edi,%edi
lea    0xea1(%rip),%rsi
mov    $0x6,%edx
mov    $0x0,%al
call   1040 <seatest_assert_false@plt>
jmp    1170 <test_asserting+0x40>
mov    $0x1,%esi
lea    0xe84(%rip),%rdx
mov    $0x7,%ecx
mov    %esi,%edi
mov    $0x0,%al
call   1050 <seatest_assert_int_equal@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_asserting>:
push   %rbx
lea    0xec8(%rip),%rbx
mov    $0x1,%edi
mov    %rbx,%rsi
mov    $0x5,%edx
xor    %eax,%eax
call   1030 <seatest_assert_true@plt>
xor    %edi,%edi
mov    %rbx,%rsi
mov    $0x6,%edx
xor    %eax,%eax
call   1040 <seatest_assert_false@plt>
mov    $0x1,%edi
mov    $0x1,%esi
mov    %rbx,%rdx
mov    $0x7,%ecx
xor    %eax,%eax
pop    %rbx
jmp    1050 <seatest_assert_int_equal@plt>

LLVM IR (-O0):
@__FUNCTION__.test_asserting = [15 x i8] c"test_asserting\00"
define void @test_asserting() {
br label %1
1: ; preds = %0
%2 = call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @seatest_assert_true to i32 (i32, i8*, i32, ...)*)(i32 1, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @__FUNCTION__.test_asserting, i64 0, i64 0), i32 5)
br label %3
3: ; preds = %1
br label %4
4: ; preds = %3
%5 = call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @seatest_assert_false to i32 (i32, i8*, i32, ...)*)(i32 0, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @__FUNCTION__.test_asserting, i64 0, i64 0), i32 6)
br label %6
6: ; preds = %4
br label %7
7: ; preds = %6
%8 = call i32 (i32, i32, i8*, i32, ...) bitcast (i32 (...)* @seatest_assert_int_equal to i32 (i32, i32, i8*, i32, ...)*)(i32 1, i32 1, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @__FUNCTION__.test_asserting, i64 0, i64 0), i32 7)
br label %9
9: ; preds = %7
ret void
}

LLVM IR (-O2):
@__FUNCTION__.test_asserting = [15 x i8] c"test_asserting\00"
define void @test_asserting() {
%1 = tail call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @seatest_assert_true to i32 (i32, i8*, i32, ...)*)(i32 1, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @__FUNCTION__.test_asserting, i64 0, i64 0), i32 5)
%2 = tail call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @seatest_assert_false to i32 (i32, i8*, i32, ...)*)(i32 0, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @__FUNCTION__.test_asserting, i64 0, i64 0), i32 6)
%3 = tail call i32 (i32, i32, i8*, i32, ...) bitcast (i32 (...)* @seatest_assert_int_equal to i32 (i32, i32, i8*, i32, ...)*)(i32 1, i32 1, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @__FUNCTION__.test_asserting, i64 0, i64 0), i32 7)
ret void
}
/* Variables and functions */
scalar_t__ access(char *, int);
int fExists(char *fn, int AccessMode) {
  if ((access(fn, AccessMode)) == 0)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<fExists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <access@plt>
cmp    $0x0,%rax
jne    1141 <fExists+0x31>
movl   $0x1,-0x4(%rbp)
jmp    1148 <fExists+0x38>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fExists>:
push   %rax
call   1030 <access@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @fExists(i8* nocapture %0, i32 %1) {
%3 = tail call i64 @access(i8* %0, i32 %1)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ IntEnable(int);
int /*<<< orphan*/ IntRegister(int, void (*)());
void SysExcIntRegister(void (*pfnHandler)(void)) {
  IntRegister(122, pfnHandler);
  IntEnable(122);
}


x86 assembly (clang, -O0):
<SysExcIntRegister>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
mov    $0x7a,%edi
call   1040 <IntRegister@plt>
mov    $0x7a,%edi
call   1030 <IntEnable@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SysExcIntRegister>:
push   %rax
mov    %rdi,%rsi
mov    $0x7a,%edi
call   1040 <IntRegister@plt>
mov    $0x7a,%edi
pop    %rax
jmp    1030 <IntEnable@plt>

LLVM IR (-O0):
define void @SysExcIntRegister(void ()* %0) {
%2 = alloca void ()*
store void ()* %0, void ()** %2
%3 = load void ()*, void ()** %2
%4 = bitcast void ()* %3 to void (...)*
%5 = call i32 @IntRegister(i32 122, void (...)* %4)
%6 = call i32 @IntEnable(i32 122)
ret void
}

LLVM IR (-O2):
define void @SysExcIntRegister(void ()* %0) {
%2 = bitcast void ()* %0 to void (...)*
%3 = tail call i32 @IntRegister(i32 122, void (...)* %2)
%4 = tail call i32 @IntEnable(i32 122)
ret void
}
int isgraph(int c) { return (c >= 33 && c <= 126); }


x86 assembly (clang, -O0):
<isgraph>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x21,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1120 <isgraph+0x20>
cmpl   $0x7e,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isgraph>:
add    $0xffffffdf,%edi
xor    %eax,%eax
cmp    $0x5e,%edi
setb   %al
ret

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

LLVM IR (-O2):
define i32 @isgraph(i32 %0) {
%2 = add i32 %0, -33
%3 = icmp ult i32 %2, 94
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void efree(void **ptr) {
  if ((*ptr) != 0)
    free((*ptr));
  *ptr = 0;
}


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

x86 assembly (clang, -O2):
<efree>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1121 <efree+0x11>
call   1030 <free@plt>
movq   $0x0,(%rbx)
pop    %rbx
ret

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

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

/* Variables and functions */
int ssl_prepare_clienthello_tlsext(SSL *s) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @ssl_prepare_clienthello_tlsext(i32* nocapture readnone %0) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int getdtablesize();
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char **argv) {
  printf("max fds: %d\n", getdtablesize());
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1050 <getdtablesize@plt>
mov    %eax,%esi
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <getdtablesize@plt>
lea    0xec1(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
@.str = [13 x i8] c"max fds: %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @getdtablesize()
%4 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void code_pirate(void) { printf("Code pirate execute !\n"); }


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

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

LLVM IR (-O0):
@.str = [23 x i8] c"Code pirate execute !\0A\00"
define void @code_pirate() {
%1 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [22 x i8] c"Code pirate execute !\00"
define void @code_pirate() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int ntohll(int);
uint64_t unpack_uint64(const void **pp) {
  int val = ntohll(*((uint64_t *)(*pp)));
  *pp += sizeof(uint64_t);
  return val;
}


x86 assembly (clang, -O0):
<unpack_uint64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%edi
call   1030 <ntohll@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x4,%rcx
mov    %rcx,(%rax)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unpack_uint64>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rax
mov    (%rax),%edi
call   1030 <ntohll@plt>
addq   $0x4,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define i32 @unpack_uint64(i8** %0) {
%2 = alloca i8**
%3 = alloca i32
store i8** %0, i8*** %2
%4 = load i8**, i8*** %2
%5 = load i8*, i8** %4
%6 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = call i32 @ntohll(i32 %7)
store i32 %8, i32* %3
%9 = load i8**, i8*** %2
%10 = load i8*, i8** %9
%11 = getelementptr i8, i8* %10, i64 4
store i8* %11, i8** %9
%12 = load i32, i32* %3
ret i32 %12
}

LLVM IR (-O2):
define i32 @unpack_uint64(i8** nocapture %0) {
%2 = bitcast i8** %0 to i32**
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = tail call i32 @ntohll(i32 %4)
%6 = load i8*, i8** %0
%7 = getelementptr i8, i8* %6, i64 4
store i8* %7, i8** %0
ret i32 %5
}
/* Variables and functions */
scalar_t__ isalpha(int);
scalar_t__ islower(int);
int toupper(int c) {
  if (isalpha(c) && islower(c))
    return (c - 32);
  return c;
}


x86 assembly (clang, -O0):
<toupper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <isalpha@plt>
cmp    $0x0,%rax
je     115d <toupper+0x3d>
mov    -0x8(%rbp),%edi
call   1030 <islower@plt>
cmp    $0x0,%rax
je     115d <toupper+0x3d>
mov    -0x8(%rbp),%eax
sub    $0x20,%eax
mov    %eax,-0x4(%rbp)
jmp    1163 <toupper+0x43>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<toupper>:
push   %rbx
mov    %edi,%ebx
call   1040 <isalpha@plt>
test   %rax,%rax
je     113f <toupper+0x1f>
mov    %ebx,%edi
call   1030 <islower@plt>
lea    -0x20(%rbx),%ecx
test   %rax,%rax
cmove  %ebx,%ecx
mov    %ecx,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @toupper(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = call i64 @isalpha(i32 %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %14
7: ; preds = %1
%8 = load i32, i32* %3
%9 = call i64 @islower(i32 %8)
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %7
%12 = load i32, i32* %3
%13 = sub nsw i32 %12, 32
store i32 %13, i32* %2
br label %16
14: ; preds = %7, %1
%15 = load i32, i32* %3
store i32 %15, i32* %2
br label %16
16: ; preds = %14, %11
%17 = load i32, i32* %2
ret i32 %17
}

LLVM IR (-O2):
define i32 @toupper(i32 %0) {
%2 = tail call i64 @isalpha(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %9, label %4
4: ; preds = %1
%5 = tail call i64 @islower(i32 %0)
%6 = icmp eq i64 %5, 0
%7 = add nsw i32 %0, -32
%8 = select i1 %6, i32 %0, i32 %7
br label %9
9: ; preds = %4, %1
%10 = phi i32 [ %0, %1 ], [ %8, %4 ]
ret i32 %10
}
/* Type definitions */
struct twopence_target {
  int dummy;
};

/* Variables and functions */
int __twopence_target_new(char *, struct twopence_target **);
int /*<<< orphan*/ free(char *);
char *twopence_strdup(char const *);
int twopence_target_new(const char *target_spec, struct twopence_target **ret) {
  char *spec_copy;
  int rv;
  spec_copy = twopence_strdup(target_spec);
  rv = __twopence_target_new(spec_copy, ret);
  free(spec_copy);
  return rv;
}


x86 assembly (clang, -O0):
<twopence_target_new>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <twopence_strdup@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <__twopence_target_new@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <free@plt>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<twopence_target_new>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
call   1050 <twopence_strdup@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <__twopence_target_new@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1040 <free@plt>
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
%struct.twopence_target = type { i32 }
define i32 @twopence_target_new(i8* %0, %struct.twopence_target** %1) {
%3 = alloca i8*
%4 = alloca %struct.twopence_target**
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %3
store %struct.twopence_target** %1, %struct.twopence_target*** %4
%7 = load i8*, i8** %3
%8 = call i8* @twopence_strdup(i8* %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = load %struct.twopence_target**, %struct.twopence_target*** %4
%11 = call i32 @__twopence_target_new(i8* %9, %struct.twopence_target** %10)
store i32 %11, i32* %6
%12 = load i8*, i8** %5
%13 = call i32 @free(i8* %12)
%14 = load i32, i32* %6
ret i32 %14
}

LLVM IR (-O2):
%struct.twopence_target = type { i32 }
define i32 @twopence_target_new(i8* %0, %struct.twopence_target** %1) {
%3 = tail call i8* @twopence_strdup(i8* %0)
%4 = tail call i32 @__twopence_target_new(i8* %3, %struct.twopence_target** %1)
%5 = tail call i32 @free(i8* %3)
ret i32 %4
}