xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int main(int argc, char *argv[]) {
  int var = 0;
#pragma omp parallel num_threads(2) shared(var)
  {
#pragma omp critical
    {}
    var++;
  }
  fprintf(stderr, "DONE\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%edi
lea    0xec1(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [6 x i8] c"DONE\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i32
store i32 %0, i32* %3
store i8** %1, i8*** %4
store i32 0, i32* %5
%6 = load i32, i32* %5
%7 = add nsw i32 %6, 1
store i32 %7, i32* %5
%8 = load i32, i32* @stderr
%9 = call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [6 x i8] c"DONE\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
struct Settings {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *load_config(char *);
int /*<<< orphan*/ parse_config(struct Settings *, char *);
int load_config_from_file(struct Settings *settings, char *path) {
  char *cfg;
  if ((cfg = load_config(path)) == NULL)
    return -1;
  parse_config(settings, cfg);
  free(cfg);
  return 0;
}


x86 assembly (clang, -O0):
<load_config_from_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1050 <load_config@plt>
mov    %rax,-0x20(%rbp)
cmp    $0x0,%rax
jne    1163 <load_config_from_file+0x33>
movl   $0xffffffff,-0x4(%rbp)
jmp    1180 <load_config_from_file+0x50>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1040 <parse_config@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<load_config_from_file>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    %rsi,%rdi
call   1050 <load_config@plt>
test   %rax,%rax
je     115e <load_config_from_file+0x2e>
mov    %rax,%rbx
mov    %r14,%rdi
mov    %rax,%rsi
call   1040 <parse_config@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
jmp    1163 <load_config_from_file+0x33>
mov    $0xffffffff,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.Settings = type { i32 }
define i32 @load_config_from_file(%struct.Settings* %0, i8* %1) {
%3 = alloca i32
%4 = alloca %struct.Settings*
%5 = alloca i8*
%6 = alloca i8*
store %struct.Settings* %0, %struct.Settings** %4
store i8* %1, i8** %5
%7 = load i8*, i8** %5
%8 = call i8* @load_config(i8* %7)
store i8* %8, i8** %6
%9 = icmp eq i8* %8, null
br i1 %9, label %10, label %11
10: ; preds = %2
store i32 -1, i32* %3
br label %17
11: ; preds = %2
%12 = load %struct.Settings*, %struct.Settings** %4
%13 = load i8*, i8** %6
%14 = call i32 @parse_config(%struct.Settings* %12, i8* %13)
%15 = load i8*, i8** %6
%16 = call i32 @free(i8* %15)
store i32 0, i32* %3
br label %17
17: ; preds = %11, %10
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
%struct.Settings = type { i32 }
define i32 @load_config_from_file(%struct.Settings* %0, i8* %1) {
%3 = tail call i8* @load_config(i8* %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i32 @parse_config(%struct.Settings* %0, i8* %3)
%7 = tail call i32 @free(i8* %3)
br label %8
8: ; preds = %2, %5
%9 = phi i32 [ 0, %5 ], [ -1, %2 ]
ret i32 %9
}
/* Variables and functions */
int read_device_file(size_t, char *, char *, size_t);
int get_triggers(size_t led_number, char *buf, size_t buf_len) {
  return read_device_file(led_number, "trigger", buf, buf_len);
}


x86 assembly (clang, -O0):
<get_triggers>:
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),%rdx
mov    -0x18(%rbp),%rcx
lea    0xec9(%rip),%rsi
call   1030 <read_device_file@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_triggers>:
mov    %rdx,%rcx
mov    %rsi,%rdx
lea    0xee3(%rip),%rsi
jmp    1030 <read_device_file@plt>

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

LLVM IR (-O2):
@.str = [8 x i8] c"trigger\00"
define i32 @get_triggers(i64 %0, i8* %1, i64 %2) {
%4 = tail call i32 @read_device_file(i64 %0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %1, i64 %2)
ret i32 %4
}
int tick_resume_broadcast(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @tick_resume_broadcast() {
ret i32 0
}
void wifi_disable(void) { return; }


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

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

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

LLVM IR (-O2):
define void @wifi_disable() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ AES_KEY;

/* Variables and functions */
int /*<<< orphan*/ OAES_CBC_ENCRYPT(unsigned char const *, unsigned char *,
                                    unsigned long, int /*<<< orphan*/ *,
                                    unsigned char *, int);
void hash_proto_aes_cbc_encrypt(const unsigned char *in, unsigned char *out,
                                unsigned long length, AES_KEY *key,
                                unsigned char ivec[16], int oper) {
  OAES_CBC_ENCRYPT(in, out, length, key, ivec, oper);
}


x86 assembly (clang, -O0):
<hash_proto_aes_cbc_encrypt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x2c(%rbp),%r9d
call   1030 <OAES_CBC_ENCRYPT@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_proto_aes_cbc_encrypt>:
jmp    1030 <OAES_CBC_ENCRYPT@plt>

LLVM IR (-O0):
define void @hash_proto_aes_cbc_encrypt(i8* %0, i8* %1, i64 %2, i32* %3, i8* %4, i32 %5) {
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i64
%10 = alloca i32*
%11 = alloca i8*
%12 = alloca i32
store i8* %0, i8** %7
store i8* %1, i8** %8
store i64 %2, i64* %9
store i32* %3, i32** %10
store i8* %4, i8** %11
store i32 %5, i32* %12
%13 = load i8*, i8** %7
%14 = load i8*, i8** %8
%15 = load i64, i64* %9
%16 = load i32*, i32** %10
%17 = load i8*, i8** %11
%18 = load i32, i32* %12
%19 = call i32 @OAES_CBC_ENCRYPT(i8* %13, i8* %14, i64 %15, i32* %16, i8* %17, i32 %18)
ret void
}

LLVM IR (-O2):
define void @hash_proto_aes_cbc_encrypt(i8* %0, i8* %1, i64 %2, i32* %3, i8* %4, i32 %5) {
%7 = tail call i32 @OAES_CBC_ENCRYPT(i8* %0, i8* %1, i64 %2, i32* %3, i8* %4, i32 %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_usange() {
  printf("\n\nUtilizzo: ./dadi [VALORE DADO] [NUMERO LANCI]\n\n");
}


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

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

LLVM IR (-O0):
@.str = [50 x i8] c"\0A\0AUtilizzo: ./dadi [VALORE DADO] [NUMERO LANCI]\0A\0A\00"
define void @print_usange() {
%1 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [49 x i8] c"\0A\0AUtilizzo: ./dadi [VALORE DADO] [NUMERO LANCI]\0A\00"
define void @print_usange() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str, i64 0, i64 0))
ret void
}
void return_output(struct cnode *cnode, unsigned int indent) {
  printf("%*s<description><p>\n", indent, "");
  outputchildren(cnode, indent, 1);
  printf("%*s</p></description>\n", indent, "");
}


x86 assembly (clang, -O0):
<return_output>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xec7(%rip),%rdi
lea    0xeeb(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    $0x1,%edx
mov    $0x0,%al
call   1040 <outputchildren@plt>
mov    -0xc(%rbp),%esi
lea    0xeb1(%rip),%rdi
lea    0xec0(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<return_output>:
push   %r15
push   %r14
push   %rbx
mov    %esi,%ebx
mov    %rdi,%r14
lea    0xecf(%rip),%rdi
lea    0xef3(%rip),%r15
mov    %r15,%rdx
xor    %eax,%eax
call   1030 <printf@plt>
mov    %r14,%rdi
mov    %ebx,%esi
mov    $0x1,%edx
xor    %eax,%eax
call   1040 <outputchildren@plt>
lea    0xebb(%rip),%rdi
mov    %ebx,%esi
mov    %r15,%rdx
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <printf@plt>

LLVM IR (-O0):
%struct.cnode = type opaque
@.str = [21 x i8] c"%*s<description><p>\0A\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [23 x i8] c"%*s</p></description>\0A\00"
define void @return_output(%struct.cnode* %0, i32 %1) {
%3 = alloca %struct.cnode*
%4 = alloca i32
store %struct.cnode* %0, %struct.cnode** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %5, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%7 = load %struct.cnode*, %struct.cnode** %3
%8 = load i32, i32* %4
%9 = call i32 (%struct.cnode*, i32, i32, ...) bitcast (i32 (...)* @outputchildren to i32 (%struct.cnode*, i32, i32, ...)*)(%struct.cnode* %7, i32 %8, i32 1)
%10 = load i32, i32* %4
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i32 %10, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.cnode = type opaque
@.str = [21 x i8] c"%*s<description><p>\0A\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [23 x i8] c"%*s</p></description>\0A\00"
define void @return_output(%struct.cnode* %0, i32 %1) {
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %1, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 (%struct.cnode*, i32, i32, ...) bitcast (i32 (...)* @outputchildren to i32 (%struct.cnode*, i32, i32, ...)*)(%struct.cnode* %0, i32 %1, i32 1)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i32 %1, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint32_t;

/* Variables and functions */
uint32_t read_be32(const void *src) {
  const uint8_t *s = src;
  return (((uint32_t)s[0]) << 24) | (((uint32_t)s[1]) << 16) |
         (((uint32_t)s[2]) << 8) | (((uint32_t)s[3]) << 0);
}


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

x86 assembly (clang, -O2):
<read_be32>:
mov    (%rdi),%eax
mov    0x8(%rdi),%ecx
shl    $0x18,%eax
shl    $0x10,%ecx
or     %eax,%ecx
mov    0x10(%rdi),%eax
shl    $0x8,%eax
or     %ecx,%eax
or     0x18(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @read_be32(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
%5 = shl i32 %4, 24
%6 = getelementptr inbounds i8, i8* %0, i64 8
%7 = bitcast i8* %6 to i64*
%8 = load i64, i64* %7
%9 = trunc i64 %8 to i32
%10 = shl i32 %9, 16
%11 = or i32 %10, %5
%12 = getelementptr inbounds i8, i8* %0, i64 16
%13 = bitcast i8* %12 to i64*
%14 = load i64, i64* %13
%15 = trunc i64 %14 to i32
%16 = shl i32 %15, 8
%17 = or i32 %11, %16
%18 = getelementptr inbounds i8, i8* %0, i64 24
%19 = bitcast i8* %18 to i64*
%20 = load i64, i64* %19
%21 = trunc i64 %20 to i32
%22 = or i32 %17, %21
ret i32 %22
}
char *skip_white(char *ptr) {
  while (*ptr == ' ' || *ptr == '\t')
    ptr++;
  return ptr;
}


x86 assembly (clang, -O0):
<skip_white>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x9(%rbp)
je     112d <skip_white+0x2d>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    113d <skip_white+0x3d>
jmp    114e <skip_white+0x4e>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <skip_white+0x8>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_white>:
mov    %rdi,%rax
jmp    1114 <skip_white+0x14>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%rax
movzbl (%rax),%ecx
cmp    $0x20,%cl
je     1110 <skip_white+0x10>
cmp    $0x9,%cl
je     1110 <skip_white+0x10>
ret

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

LLVM IR (-O2):
define i8* @skip_white(i8* %0) {
br label %2
2: ; preds = %5, %1
%3 = phi i8* [ %0, %1 ], [ %6, %5 ]
%4 = load i8, i8* %3
switch i8 %4, label %7 [
i8 32, label %5
i8 9, label %5
]
5: ; preds = %2, %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
7: ; preds = %2
ret i8* %3
}
int uwsgi_str2_num(char *str) {
  int num = 0;
  num = 10 * (str[0] - 48);
  num += str[1] - 48;
  return num;
}


x86 assembly (clang, -O0):
<uwsgi_str2_num>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
sub    $0x30,%eax
imul   $0xa,%eax,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl 0x1(%rax),%eax
sub    $0x30,%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<uwsgi_str2_num>:
movsbl (%rdi),%eax
lea    (%rax,%rax,4),%eax
movsbl 0x1(%rdi),%ecx
lea    (%rcx,%rax,2),%eax
add    $0xfffffdf0,%eax
ret

LLVM IR (-O0):
define i32 @uwsgi_str2_num(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
%4 = load i8*, i8** %2
%5 = getelementptr inbounds i8, i8* %4, i64 0
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = sub nsw i32 %7, 48
%9 = mul nsw i32 10, %8
store i32 %9, i32* %3
%10 = load i8*, i8** %2
%11 = getelementptr inbounds i8, i8* %10, i64 1
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = sub nsw i32 %13, 48
%15 = load i32, i32* %3
%16 = add nsw i32 %15, %14
store i32 %16, i32* %3
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
define i32 @uwsgi_str2_num(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = sext i8 %2 to i32
%4 = mul nsw i32 %3, 10
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = add nsw i32 %7, -528
%9 = add nsw i32 %8, %4
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *, char *, char const *,
                          char const *);
void gru_cli_program_usage(const char *appname, const char *program_name) {
  printf("%s%sUsage:%s\n%s %s <options>\n\nValid options:\n\n", "\x1B[00m",
         "\x1B[01;37m", "\x1B[00m", appname, program_name);
}


x86 assembly (clang, -O0):
<gru_cli_program_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%r8
mov    -0x10(%rbp),%r9
lea    0xed1(%rip),%rdi
lea    0xef9(%rip),%rcx
lea    0xef8(%rip),%rdx
mov    %rcx,%rsi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gru_cli_program_usage>:
mov    %rsi,%r9
mov    %rdi,%r8
lea    0xee3(%rip),%rdi
lea    0xf11(%rip),%rdx
lea    0xf04(%rip),%rcx
mov    %rcx,%rsi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [47 x i8] c"%s%sUsage:%s\0A%s %s <options>\0A\0AValid options:\0A\0A\00"
@.str.1 = [6 x i8] c"\1B[00m\00"
@.str.2 = [9 x i8] c"\1B[01;37m\00"
define void @gru_cli_program_usage(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %5, i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [47 x i8] c"%s%sUsage:%s\0A%s %s <options>\0A\0AValid options:\0A\0A\00"
@.str.1 = [6 x i8] c"\1B[00m\00"
@.str.2 = [9 x i8] c"\1B[01;37m\00"
define void @gru_cli_program_usage(i8* %0, i8* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %0, i8* %1)
ret void
}
/* Variables and functions */
int f370(int *);
int f371(int *p) { return f370(p); }


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

x86 assembly (clang, -O2):
<f371>:
jmp    1030 <f370@plt>

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

LLVM IR (-O2):
define i32 @f371(i32* %0) {
%2 = tail call i32 @f370(i32* %0)
ret i32 %2
}
/* Variables and functions */
int musmidi_start(int, int);
int mus_midi_start(int no, int loop) { return musmidi_start(no, loop); }


x86 assembly (clang, -O0):
<mus_midi_start>:
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 <musmidi_start@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mus_midi_start>:
jmp    1030 <musmidi_start@plt>

LLVM IR (-O0):
define i32 @mus_midi_start(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 @musmidi_start(i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @mus_midi_start(i32 %0, i32 %1) {
%3 = tail call i32 @musmidi_start(i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
double atof(char *);
int numcmp(char *s1, char *s2) {
  double v1, v2;
  v1 = atof(s1);
  v2 = atof(s2);
  if (v1 < v2)
    return -1;
  else if (v1 > v2)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<numcmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <atof@plt>
movsd  %xmm0,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <atof@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    115c <numcmp+0x4c>
movl   $0xffffffff,-0x4(%rbp)
jmp    117f <numcmp+0x6f>
movsd  -0x20(%rbp),%xmm0
ucomisd -0x28(%rbp),%xmm0
jbe    1178 <numcmp+0x68>
movl   $0x1,-0x4(%rbp)
jmp    117f <numcmp+0x6f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<numcmp>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
call   1030 <atof@plt>
movsd  %xmm0,0x8(%rsp)
mov    %rbx,%rdi
call   1030 <atof@plt>
xor    %ecx,%ecx
movsd  0x8(%rsp),%xmm1
ucomisd %xmm0,%xmm1
seta   %cl
ucomisd %xmm1,%xmm0
mov    $0xffffffff,%eax
cmovbe %ecx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @numcmp(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca double
%7 = alloca double
store i8* %0, i8** %4
store i8* %1, i8** %5
%8 = load i8*, i8** %4
%9 = call double @atof(i8* %8)
store double %9, double* %6
%10 = load i8*, i8** %5
%11 = call double @atof(i8* %10)
store double %11, double* %7
%12 = load double, double* %6
%13 = load double, double* %7
%14 = fcmp olt double %12, %13
br i1 %14, label %15, label %16
15: ; preds = %2
store i32 -1, i32* %3
br label %22
16: ; preds = %2
%17 = load double, double* %6
%18 = load double, double* %7
%19 = fcmp ogt double %17, %18
br i1 %19, label %20, label %21
20: ; preds = %16
store i32 1, i32* %3
br label %22
21: ; preds = %16
store i32 0, i32* %3
br label %22
22: ; preds = %21, %20, %15
%23 = load i32, i32* %3
ret i32 %23
}

LLVM IR (-O2):
define i32 @numcmp(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call double @atof(i8* %0)
%4 = tail call double @atof(i8* %1)
%5 = fcmp olt double %3, %4
%6 = fcmp ogt double %3, %4
%7 = zext i1 %6 to i32
%8 = select i1 %5, i32 -1, i32 %7
ret i32 %8
}
/* Variables and functions */
int included_fn(int);
int h(char c) { return included_fn(2 * c); }


x86 assembly (clang, -O0):
<h>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
shl    $0x1,%edi
call   1030 <included_fn@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<h>:
add    %edi,%edi
jmp    1030 <included_fn@plt>

LLVM IR (-O0):
define i32 @h(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = mul nsw i32 2, %4
%6 = call i32 @included_fn(i32 %5)
ret i32 %6
}

LLVM IR (-O2):
define i32 @h(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = shl nsw i32 %2, 1
%4 = tail call i32 @included_fn(i32 %3)
ret i32 %4
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t __hsail_bitinsert_u32(uint32_t src0, uint32_t src1, uint32_t src2,
                               uint32_t src3) {
  uint32_t offset = src2 & (sizeof(uint32_t) * 8 - 1);
  uint32_t width = src3 & (sizeof(uint32_t) * 8 - 1);
  uint32_t mask = ((uint32_t)1 << width) - 1;
  return (src0 & ~(mask << offset)) | ((src1 & mask) << offset);
}


x86 assembly (clang, -O0):
<__hsail_bitinsert_u32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
movslq -0xc(%rbp),%rax
and    $0x1f,%rax
mov    %eax,-0x14(%rbp)
movslq -0x10(%rbp),%rax
and    $0x1f,%rax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
sub    $0x1,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x1c(%rbp),%edx
mov    -0x14(%rbp),%ecx
shl    %cl,%edx
mov    %edx,%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%edx
and    -0x1c(%rbp),%edx
mov    -0x14(%rbp),%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__hsail_bitinsert_u32>:
mov    %edx,%r8d
mov    $0xffffffff,%eax
shl    %cl,%eax
not    %eax
mov    %eax,%edx
mov    %r8d,%ecx
shl    %cl,%edx
not    %edx
and    %edi,%edx
and    %esi,%eax
shl    %cl,%eax
or     %edx,%eax
ret

LLVM IR (-O0):
define i32 @__hsail_bitinsert_u32(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%12 = load i32, i32* %7
%13 = sext i32 %12 to i64
%14 = and i64 %13, 31
%15 = trunc i64 %14 to i32
store i32 %15, i32* %9
%16 = load i32, i32* %8
%17 = sext i32 %16 to i64
%18 = and i64 %17, 31
%19 = trunc i64 %18 to i32
store i32 %19, i32* %10
%20 = load i32, i32* %10
%21 = shl i32 1, %20
%22 = sub nsw i32 %21, 1
store i32 %22, i32* %11
%23 = load i32, i32* %5
%24 = load i32, i32* %11
%25 = load i32, i32* %9
%26 = shl i32 %24, %25
%27 = xor i32 %26, -1
%28 = and i32 %23, %27
%29 = load i32, i32* %6
%30 = load i32, i32* %11
%31 = and i32 %29, %30
%32 = load i32, i32* %9
%33 = shl i32 %31, %32
%34 = or i32 %28, %33
ret i32 %34
}

LLVM IR (-O2):
define i32 @__hsail_bitinsert_u32(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = and i32 %2, 31
%6 = and i32 %3, 31
%7 = shl nsw i32 -1, %6
%8 = xor i32 %7, -1
%9 = shl i32 %8, %5
%10 = xor i32 %9, -1
%11 = and i32 %10, %0
%12 = and i32 %8, %1
%13 = shl i32 %12, %5
%14 = or i32 %11, %13
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ line();
int /*<<< orphan*/ name(char const *);
int /*<<< orphan*/ space();
int /*<<< orphan*/ string(char *);
void log_cachedcname(const char *dn, const char *dn2) {
  string("     cc cname ");
  name(dn);
  space();
  name(dn2);
  line();
}


x86 assembly (clang, -O0):
<log_cachedcname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xea9(%rip),%rdi
call   1040 <string@plt>
mov    -0x8(%rbp),%rdi
call   1050 <name@plt>
mov    $0x0,%al
call   1030 <space@plt>
mov    -0x10(%rbp),%rdi
call   1050 <name@plt>
mov    $0x0,%al
call   1060 <line@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log_cachedcname>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xeaf(%rip),%rdi
call   1040 <string@plt>
mov    %rbx,%rdi
call   1050 <name@plt>
xor    %eax,%eax
call   1030 <space@plt>
mov    %r14,%rdi
call   1050 <name@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1060 <line@plt>

LLVM IR (-O0):
@.str = [15 x i8] c" cc cname \00"
define void @log_cachedcname(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = call i32 @string(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%6 = load i8*, i8** %3
%7 = call i32 @name(i8* %6)
%8 = call i32 (...) @space()
%9 = load i8*, i8** %4
%10 = call i32 @name(i8* %9)
%11 = call i32 (...) @line()
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c" cc cname \00"
define void @log_cachedcname(i8* %0, i8* %1) {
%3 = tail call i32 @string(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @name(i8* %0)
%5 = tail call i32 (...) @space()
%6 = tail call i32 @name(i8* %1)
%7 = tail call i32 (...) @line()
ret void
}
void PKCS7_SIGNER_INFO_new(void) {}


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

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

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

LLVM IR (-O2):
define void @PKCS7_SIGNER_INFO_new() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ benchfile(char *, int, int);
int /*<<< orphan*/ parsecmdargs(int, char **, int *, int *);
int main(int argc, char **argv) {
  int loadonly = 0, pageNo = -1;
  parsecmdargs(argc, argv, &loadonly, &pageNo);
  benchfile(argv[argc - 1], loadonly, pageNo);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0xffffffff,-0x18(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    -0x14(%rbp),%rdx
lea    -0x18(%rbp),%rcx
call   1040 <parsecmdargs@plt>
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
call   1030 <benchfile@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
movl   $0x0,0x4(%rsp)
movl   $0xffffffff,(%rsp)
lea    0x4(%rsp),%rdx
mov    %rsp,%rcx
call   1040 <parsecmdargs@plt>
movslq %ebp,%rax
mov    -0x8(%rbx,%rax,8),%rdi
mov    0x4(%rsp),%esi
mov    (%rsp),%edx
call   1030 <benchfile@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
store i32 -1, i32* %7
%8 = load i32, i32* %4
%9 = load i8**, i8*** %5
%10 = call i32 @parsecmdargs(i32 %8, i8** %9, i32* %6, i32* %7)
%11 = load i8**, i8*** %5
%12 = load i32, i32* %4
%13 = sub nsw i32 %12, 1
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8*, i8** %11, i64 %14
%16 = load i8*, i8** %15
%17 = load i32, i32* %6
%18 = load i32, i32* %7
%19 = call i32 @benchfile(i8* %16, i32 %17, i32 %18)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %3 to i8*
store i32 0, i32* %3
%6 = bitcast i32* %4 to i8*
store i32 -1, i32* %4
%7 = call i32 @parsecmdargs(i32 %0, i8** %1, i32* %3, i32* %4)
%8 = add nsw i32 %0, -1
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i8*, i8** %1, i64 %9
%11 = load i8*, i8** %10
%12 = load i32, i32* %3
%13 = load i32, i32* %4
%14 = call i32 @benchfile(i8* %11, i32 %12, i32 %13)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void exit_error(int s, char *msg) {
  fputs("Error: ", stderr);
  fputs(msg, stderr);
  fputs("\n", stderr);
  exit(s);
}


x86 assembly (clang, -O0):
<exit_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%esi
lea    0xec1(%rip),%rdi
call   1030 <fputs@plt>
mov    -0x10(%rbp),%rdi
mov    0x2e91(%rip),%rax
mov    (%rax),%esi
call   1030 <fputs@plt>
mov    0x2e83(%rip),%rax
mov    (%rax),%esi
lea    0xea2(%rip),%rdi
call   1030 <fputs@plt>
mov    -0x4(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<exit_error>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    %edi,%r14d
mov    0x2eaf(%rip),%rbp
mov    0x0(%rbp),%esi
lea    0xec5(%rip),%rdi
call   1030 <fputs@plt>
mov    0x0(%rbp),%esi
mov    %rbx,%rdi
call   1030 <fputs@plt>
mov    0x0(%rbp),%esi
lea    0xeb3(%rip),%rdi
call   1030 <fputs@plt>
mov    %r14d,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"Error: \00"
@stderr = global i32 0
@.str.1 = [2 x i8] c"\0A\00"
define void @exit_error(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* @stderr
%6 = call i32 @fputs(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = load i8*, i8** %4
%8 = load i32, i32* @stderr
%9 = call i32 @fputs(i8* %7, i32 %8)
%10 = load i32, i32* @stderr
%11 = call i32 @fputs(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 %10)
%12 = load i32, i32* %3
%13 = call i32 @exit(i32 %12)
unreachable
}

LLVM IR (-O2):
@.str = [8 x i8] c"Error: \00"
@stderr = global i32 0
@.str.1 = [2 x i8] c"\0A\00"
define void @exit_error(i32 %0, i8* %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fputs(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = load i32, i32* @stderr
%6 = tail call i32 @fputs(i8* %1, i32 %5)
%7 = load i32, i32* @stderr
%8 = tail call i32 @fputs(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 %7)
%9 = tail call i32 @exit(i32 %0)
unreachable
}
void call_fp(void (*fp)(int *), int *x) {
  (*fp)(x);
  return;
}


x86 assembly (clang, -O0):
<call_fp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rdi
call   *%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<call_fp>:
mov    %rdi,%rax
mov    %rsi,%rdi
jmp    *%rax

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

LLVM IR (-O2):
define void @call_fp(void (i32*)* nocapture %0, i32* %1) {
tail call void %0(i32* %1)
ret void
}
/* Type definitions */
struct Pessoa {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct Pessoa *);
void Pessoa_destruir(struct Pessoa *uma_pessoa) { free(uma_pessoa); }


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

x86 assembly (clang, -O2):
<Pessoa_destruir>:
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.Pessoa = type { i32 }
define void @Pessoa_destruir(%struct.Pessoa* %0) {
%2 = alloca %struct.Pessoa*
store %struct.Pessoa* %0, %struct.Pessoa** %2
%3 = load %struct.Pessoa*, %struct.Pessoa** %2
%4 = call i32 @free(%struct.Pessoa* %3)
ret void
}

LLVM IR (-O2):
%struct.Pessoa = type { i32 }
define void @Pessoa_destruir(%struct.Pessoa* nocapture %0) {
%2 = tail call i32 @free(%struct.Pessoa* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ pot2(int);
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int main() {
  printf("%ld\n", pot2(10));
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"%ld\0A\00"
define i32 @main() {
%1 = tail call i32 @pot2(i32 10)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int rand();
int get_random_number(int maxvalue) { return rand() % maxvalue; }


x86 assembly (clang, -O0):
<get_random_number>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
cltd
idivl  -0x4(%rbp)
mov    %edx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_random_number>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <rand@plt>
cltd
idiv   %ebx
mov    %edx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @get_random_number(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @rand()
%4 = load i32, i32* %2
%5 = srem i32 %3, %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @get_random_number(i32 %0) {
%2 = tail call i32 (...) @rand()
%3 = srem i32 %2, %0
ret i32 %3
}
void dskbww_(int *lun, int *lflag) { return; }


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

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

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

LLVM IR (-O2):
define void @dskbww_(i32* nocapture %0, i32* nocapture %1) {
ret void
}
void init_atmForum(void) { return; }


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

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

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

LLVM IR (-O2):
define void @init_atmForum() {
ret void
}
void block_operate(const unsigned char plain_text[8],
                   unsigned char *cipher_text[8], const unsigned char key[8]) {
  (void)plain_text;
  (void)cipher_text;
  (void)key;
}


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

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

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

LLVM IR (-O2):
define void @block_operate(i8* nocapture %0, i8** nocapture %1, i8* nocapture %2) {
ret void
}
/* Type definitions */
struct mmc_host {
  int dummy;
};
struct mmc_card {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ __mmc_claim_host(struct mmc_host *, struct mmc_card *);
void mmc_claim_host(struct mmc_host *host) {
  __mmc_claim_host(host, (struct mmc_card *)-1);
}


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

x86 assembly (clang, -O2):
<mmc_claim_host>:
mov    $0xffffffffffffffff,%rsi
jmp    1030 <__mmc_claim_host@plt>

LLVM IR (-O0):
%struct.mmc_host = type { i32 }
%struct.mmc_card = type { i32 }
define void @mmc_claim_host(%struct.mmc_host* %0) {
%2 = alloca %struct.mmc_host*
store %struct.mmc_host* %0, %struct.mmc_host** %2
%3 = load %struct.mmc_host*, %struct.mmc_host** %2
%4 = call i32 @__mmc_claim_host(%struct.mmc_host* %3, %struct.mmc_card* inttoptr (i64 -1 to %struct.mmc_card*))
ret void
}

LLVM IR (-O2):
%struct.mmc_host = type { i32 }
%struct.mmc_card = type { i32 }
define void @mmc_claim_host(%struct.mmc_host* %0) {
%2 = tail call i32 @__mmc_claim_host(%struct.mmc_host* %0, %struct.mmc_card* inttoptr (i64 -1 to %struct.mmc_card*))
ret void
}
void printString(void (*charPrinter)(char), char *string) {
  int i;
  for (i = 0; string[i]; ++i) {
    charPrinter(string[i]);
  }
}


x86 assembly (clang, -O0):
<printString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1149 <printString+0x49>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
movslq -0x14(%rbp),%rdx
movsbl (%rcx,%rdx,1),%edi
call   *%rax
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1117 <printString+0x17>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printString>:
push   %r14
push   %rbx
push   %rax
mov    (%rsi),%al
test   %al,%al
je     1131 <printString+0x31>
mov    %rsi,%rbx
mov    %rdi,%r14
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsbl %al,%edi
call   *%r14
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <printString+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @printString(void (i8)* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %12, label %5
5: ; preds = %2, %5
%6 = phi i64 [ %8, %5 ], [ 0, %2 ]
%7 = phi i8 [ %10, %5 ], [ %3, %2 ]
tail call void %0(i8 signext %7)
%8 = add nuw i64 %6, 1
%9 = getelementptr inbounds i8, i8* %1, i64 %8
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %5
12: ; preds = %5, %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ locale_t;

/* Variables and functions */
locale_t newlocale(int n, const char *loc, locale_t locale) {
  return (locale_t)NULL;
}


x86 assembly (clang, -O0):
<newlocale>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @newlocale(i32 %0, i8* nocapture readnone %1, i32 %2) {
ret i32 0
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned long root;
};
typedef TYPE_1__ XEnterWindowEvent;

/* Variables and functions */
void set_XEnterWindowEvent_root(void *_p, unsigned long _v) {
  ((XEnterWindowEvent *)_p)->root = (unsigned long)_v;
}


x86 assembly (clang, -O0):
<set_XEnterWindowEvent_root>:
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_XEnterWindowEvent_root>:
mov    %rsi,(%rdi)
ret

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

LLVM IR (-O2):
define void @set_XEnterWindowEvent_root(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
/* Type definitions */
struct timespec {
  unsigned int tv_nsec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ nanosleep(struct timespec *, int /*<<< orphan*/ *);
void delay(const unsigned int nanosecs) {
  struct timespec t;
  t.tv_sec = 0;
  t.tv_nsec = nanosecs;
  nanosleep(&t, NULL);
}


x86 assembly (clang, -O0):
<delay>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x18(%rbp)
lea    -0x18(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <nanosleep@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<delay>:
sub    $0x18,%rsp
movq   $0x0,0x10(%rsp)
mov    %edi,0x8(%rsp)
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <nanosleep@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timespec = type { i32, i64 }
define void @delay(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.timespec
store i32 %0, i32* %2
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 1
store i64 0, i64* %4
%5 = load i32, i32* %2
%6 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 0
store i32 %5, i32* %6
%7 = call i32 @nanosleep(%struct.timespec* %3, i32* null)
ret void
}

LLVM IR (-O2):
%struct.timespec = type { i32, i64 }
define void @delay(i32 %0) {
%2 = alloca %struct.timespec
%3 = bitcast %struct.timespec* %2 to i8*
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i64 0, i32 1
store i64 0, i64* %4
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i64 0, i32 0
store i32 %0, i32* %5
%6 = call i32 @nanosleep(%struct.timespec* %2, i32* null)
ret void
}
/* Type definitions */
struct Window {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ wputchar(struct Window *, int /*<<< orphan*/);
void wputs(struct Window *win, char *msg) {
  while (*msg) {
    wputchar(win, *msg++);
  }
}


x86 assembly (clang, -O0):
<wputs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     114d <wputs+0x3d>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%esi
call   1030 <wputchar@plt>
jmp    1120 <wputs+0x10>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wputs>:
push   %r14
push   %rbx
push   %rax
mov    (%rsi),%al
test   %al,%al
je     1146 <wputs+0x36>
mov    %rsi,%rbx
mov    %rdi,%r14
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsbl %al,%esi
mov    %r14,%rdi
call   1030 <wputchar@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <wputs+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
%struct.Window = type { i32 }
define void @wputs(%struct.Window* %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %11, %5 ], [ %3, %2 ]
%7 = phi i8* [ %8, %5 ], [ %1, %2 ]
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = sext i8 %6 to i32
%10 = tail call i32 @wputchar(%struct.Window* %0, i32 %9)
%11 = load i8, i8* %8
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5, %2
ret void
}
unsigned long *get_sp(void) { __asm__("movl	%esp,%eax"); }


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

x86 assembly (clang, -O2):
<get_sp>:
mov    %esp,%eax
ret

LLVM IR (-O0):
define i64* @get_sp() {
%1 = alloca i64*
%2 = load i64*, i64** %1
ret i64* %2
}

LLVM IR (-O2):
define i64* @get_sp() {
tail call void asm sideeffect "movl\09%esp,%eax", "~{dirflag},~{fpsr},~{flags}"()
ret i64* undef
}
void paddle_new() {}


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

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

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

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