xunge/DecIR huggingface dataset:
const char *DELEGATE_SrcSign() {
  return "\n{SrcSign=9.9.2-pre3:20090215114817+0900:9fd8879636f9934b:Author@"
         "DeleGate.ORG:s7F+zgs2D6yvuw+"
         "K1c3xJg4C9AJLSTuOGi2TAIPVQ52AwW0aqwRdJl3vME+/"
         "AaJpt3gKiH7b\r\nod6uyzyUFdkSIOgaTrMMdJBYBvCm0s7YhOpqCePnThu4e4RnMYTTp"
         "sI693BTt80KFXHwz4X3\r\nKO5W8Q4noFBPBme3yWwx/frGMMw=\r\n}\n" +
         10;
}


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

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

LLVM IR (-O0):
@.str = [259 x i8] c"\0A{SrcSign=9.9.2-pre3:20090215114817+0900:9fd8879636f9934b:Author@DeleGate.ORG:s7F+zgs2D6yvuw+K1c3xJg4C9AJLSTuOGi2TAIPVQ52AwW0aqwRdJl3vME+/AaJpt3gKiH7b\0D\0Aod6uyzyUFdkSIOgaTrMMdJBYBvCm0s7YhOpqCePnThu4e4RnMYTTpsI693BTt80KFXHwz4X3\0D\0AKO5W8Q4noFBPBme3yWwx/frGMMw=\0D\0A}\0A\00"
define i8* @DELEGATE_SrcSign() {
ret i8* getelementptr inbounds ([259 x i8], [259 x i8]* @.str, i64 0, i64 10)
}

LLVM IR (-O2):
@.str = [259 x i8] c"\0A{SrcSign=9.9.2-pre3:20090215114817+0900:9fd8879636f9934b:Author@DeleGate.ORG:s7F+zgs2D6yvuw+K1c3xJg4C9AJLSTuOGi2TAIPVQ52AwW0aqwRdJl3vME+/AaJpt3gKiH7b\0D\0Aod6uyzyUFdkSIOgaTrMMdJBYBvCm0s7YhOpqCePnThu4e4RnMYTTpsI693BTt80KFXHwz4X3\0D\0AKO5W8Q4noFBPBme3yWwx/frGMMw=\0D\0A}\0A\00"
define i8* @DELEGATE_SrcSign() {
ret i8* getelementptr inbounds ([259 x i8], [259 x i8]* @.str, i64 0, i64 10)
}
/* Variables and functions */
#define SIGHUP 131
#define SIGINT 130
#define SIGQUIT 129
#define SIGTERM 128
int /*<<< orphan*/ close_gpio_channel(int);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void signal_handler(int sig) {
  switch (sig) {
  case SIGTERM:
  case SIGHUP:
  case SIGQUIT:
  case SIGINT:
    close_gpio_channel(902);
    close_gpio_channel(893);
    exit(0);
  default:
    break;
  }
}


x86 assembly (clang, -O0):
<signal_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffff80,%eax
sub    $0x3,%eax
ja     115a <signal_handler+0x3a>
jmp    113f <signal_handler+0x1f>
mov    $0x386,%edi
call   1030 <close_gpio_channel@plt>
mov    $0x37d,%edi
call   1030 <close_gpio_channel@plt>
xor    %edi,%edi
call   1040 <exit@plt>
jmp    115f <signal_handler+0x3f>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<signal_handler>:
and    $0xfffffffc,%edi
cmp    $0x80,%edi
je     112c <signal_handler+0xc>
ret
push   %rax
mov    $0x386,%edi
call   1030 <close_gpio_channel@plt>
mov    $0x37d,%edi
call   1030 <close_gpio_channel@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @signal_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %8 [
i32 128, label %4
i32 131, label %4
i32 129, label %4
i32 130, label %4
]
4: ; preds = %1, %1, %1, %1
%5 = call i32 @close_gpio_channel(i32 902)
%6 = call i32 @close_gpio_channel(i32 893)
%7 = call i32 @exit(i32 0)
unreachable
8: ; preds = %1
br label %9
9: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @signal_handler(i32 %0) {
%2 = and i32 %0, -4
%3 = icmp eq i32 %2, 128
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i32 @close_gpio_channel(i32 902)
%6 = tail call i32 @close_gpio_channel(i32 893)
%7 = tail call i32 @exit(i32 0)
unreachable
8: ; preds = %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cleanUpAndExit(int);
void handleSocketClose() { cleanUpAndExit((995)); }


x86 assembly (clang, -O0):
<handleSocketClose>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3e3,%edi
call   1030 <cleanUpAndExit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<handleSocketClose>:
mov    $0x3e3,%edi
jmp    1030 <cleanUpAndExit@plt>

LLVM IR (-O0):
define void @handleSocketClose() {
%1 = call i32 @cleanUpAndExit(i32 995)
ret void
}

LLVM IR (-O2):
define void @handleSocketClose() {
%1 = tail call i32 @cleanUpAndExit(i32 995)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int bad_file_format(void) {
  puts("Bad file format.");
  return -1;
}


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

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

LLVM IR (-O0):
@.str = [17 x i8] c"Bad file format.\00"
define i32 @bad_file_format() {
%1 = call i32 @puts(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret i32 -1
}

LLVM IR (-O2):
@.str = [17 x i8] c"Bad file format.\00"
define i32 @bad_file_format() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
int yyerror(char *msg) {
  printf("error while parsing config file: %s\n", msg);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<yyerror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<yyerror>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [37 x i8] c"error while parsing config file: %s\0A\00"
@EXIT_FAILURE = global i32 0
define i32 @yyerror(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = load i32, i32* @EXIT_FAILURE
%6 = call i32 @exit(i32 %5)
unreachable
}

LLVM IR (-O2):
@.str = [37 x i8] c"error while parsing config file: %s\0A\00"
@EXIT_FAILURE = global i32 0
define i32 @yyerror(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = load i32, i32* @EXIT_FAILURE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
long __max_impl_long(long a, long b) { return (a > b) ? a : b; }


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

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

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

LLVM IR (-O2):
define i64 @__max_impl_long(i64 %0, i64 %1) {
%3 = icmp sgt i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
/* Variables and functions */
int usage(int, char **);
int main(int argc, char **argv) {
  if (argc <= 1)
    return usage(argc, argv);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
jg     1144 <main+0x34>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <usage@plt>
mov    %eax,-0x4(%rbp)
jmp    114b <main+0x3b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
cmp    $0x1,%edi
jg     111a <main+0xa>
jmp    1030 <usage@plt>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @usage(i32 %0, i8** %1)
br label %6
6: ; preds = %2, %4
%7 = phi i32 [ %5, %4 ], [ 0, %2 ]
ret i32 %7
}
/* Variables and functions */
size_t strlen(const char *str) {
  size_t ret;
  for (ret = 0; *str != '\0'; ret++, str++)
    ;
  return ret;
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1142 <strlen+0x42>
jmp    1125 <strlen+0x25>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1110 <strlen+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
cmpb   $0x0,(%rdi)
je     111f <strlen+0x1f>
xor    %ecx,%ecx
nopw   0x0(%rax,%rax,1)
lea    0x1(%rcx),%rax
cmpb   $0x0,0x1(%rdi,%rcx,1)
mov    %rax,%rcx
jne    1110 <strlen+0x10>
ret
xor    %eax,%eax
ret

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

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


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

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

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

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


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *, int /*<<< orphan*/ *, int);
int __int8_t_decode_array(const void *_buf, int offset, int maxlen, int8_t *p,
                          int elements) {
  if (maxlen < elements)
    return -1;
  int8_t *buf = (int8_t *)_buf;
  memcpy(p, &buf[offset], elements);
  return elements;
}


x86 assembly (clang, -O0):
<__int8_t_decode_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    1142 <__int8_t_decode_array+0x32>
movl   $0xffffffff,-0x4(%rbp)
jmp    116b <__int8_t_decode_array+0x5b>
mov    -0x10(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x30(%rbp),%rsi
movslq -0x14(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
mov    -0x24(%rbp),%edx
call   1030 <memcpy@plt>
mov    -0x24(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__int8_t_decode_array>:
mov    $0xffffffff,%eax
cmp    %r8d,%edx
jl     1133 <__int8_t_decode_array+0x23>
push   %rbx
mov    %r8d,%ebx
movslq %esi,%rax
lea    (%rdi,%rax,4),%rsi
mov    %rcx,%rdi
mov    %r8d,%edx
call   1030 <memcpy@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @__int8_t_decode_array(i8* %0, i32 %1, i32 %2, i32* %3, i32 %4) {
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32*
%11 = alloca i32
%12 = alloca i32*
store i8* %0, i8** %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i32* %3, i32** %10
store i32 %4, i32* %11
%13 = load i32, i32* %9
%14 = load i32, i32* %11
%15 = icmp slt i32 %13, %14
br i1 %15, label %16, label %17
16: ; preds = %5
store i32 -1, i32* %6
br label %28
17: ; preds = %5
%18 = load i8*, i8** %7
%19 = bitcast i8* %18 to i32*
store i32* %19, i32** %12
%20 = load i32*, i32** %10
%21 = load i32*, i32** %12
%22 = load i32, i32* %8
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds i32, i32* %21, i64 %23
%25 = load i32, i32* %11
%26 = call i32 @memcpy(i32* %20, i32* %24, i32 %25)
%27 = load i32, i32* %11
store i32 %27, i32* %6
br label %28
28: ; preds = %17, %16
%29 = load i32, i32* %6
ret i32 %29
}

LLVM IR (-O2):
define i32 @__int8_t_decode_array(i8* %0, i32 %1, i32 %2, i32* %3, i32 %4) {
%6 = icmp slt i32 %2, %4
br i1 %6, label %12, label %7
7: ; preds = %5
%8 = bitcast i8* %0 to i32*
%9 = sext i32 %1 to i64
%10 = getelementptr inbounds i32, i32* %8, i64 %9
%11 = tail call i32 @memcpy(i32* %3, i32* %10, i32 %4)
br label %12
12: ; preds = %5, %7
%13 = phi i32 [ %4, %7 ], [ -1, %5 ]
ret i32 %13
}
long core___core__Int___Object__object_id(long self) {
  long var;
  var = self;
  goto RET_LABEL;
RET_LABEL:;
  return var;
}


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

x86 assembly (clang, -O2):
<core___core__Int___Object__object_id>:
mov    %rdi,%rax
ret

LLVM IR (-O0):
define i64 @core___core__Int___Object__object_id(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
%4 = load i64, i64* %2
store i64 %4, i64* %3
br label %5
5: ; preds = %1
%6 = load i64, i64* %3
ret i64 %6
}

LLVM IR (-O2):
define i64 @core___core__Int___Object__object_id(i64 returned %0) {
ret i64 %0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int a = 21, b = 10, c;
  c = a++;
  printf("Line 1 - Value of c is %d\n", c);
  c = a--;
  printf("Line 2 - Value of c is %d\n", c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x15,-0x8(%rbp)
movl   $0xa,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x8(%rbp)
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%esi
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x8(%rbp)
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%esi
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [27 x i8] c"Line 1 - Value of c is %d\0A\00"
@.str.1 = [27 x i8] c"Line 2 - Value of c is %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 21, i32* %2
store i32 10, i32* %3
%5 = load i32, i32* %2
%6 = add nsw i32 %5, 1
store i32 %6, i32* %2
store i32 %5, i32* %4
%7 = load i32, i32* %4
%8 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = load i32, i32* %2
%10 = add nsw i32 %9, -1
store i32 %10, i32* %2
store i32 %9, i32* %4
%11 = load i32, i32* %4
%12 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i32 %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [27 x i8] c"Line 1 - Value of c is %d\0A\00"
@.str.1 = [27 x i8] c"Line 2 - Value of c is %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 21)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i32 22)
ret i32 0
}
__attribute__((always_)) void __ISB(void) { __asm volatile("nop"); }


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

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

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

LLVM IR (-O2):
define void @__ISB() {
tail call void asm sideeffect "nop", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
void hisi_lowmem_dbg_timeout(struct task_struct *p,
                             struct task_struct *leader) {}


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

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

LLVM IR (-O0):
%struct.task_struct = type opaque
define void @hisi_lowmem_dbg_timeout(%struct.task_struct* %0, %struct.task_struct* %1) {
%3 = alloca %struct.task_struct*
%4 = alloca %struct.task_struct*
store %struct.task_struct* %0, %struct.task_struct** %3
store %struct.task_struct* %1, %struct.task_struct** %4
ret void
}

LLVM IR (-O2):
%struct.task_struct = type opaque
define void @hisi_lowmem_dbg_timeout(%struct.task_struct* nocapture %0, %struct.task_struct* nocapture %1) {
ret void
}
/* Variables and functions */
int printf(char *, ...);
int main() {
  printf("%d", printf("egeg"));
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [5 x i8] c"egeg\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_t;
typedef int /*<<< orphan*/ pthread_attr_t;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
int pthread_create(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                   void *(*)(void *), void *);
void std_pthread_create(pthread_t *thread, pthread_attr_t *attr,
                        void *(*start_routine)(void *), void *arg) {
  if (pthread_create(thread, attr, start_routine, arg) == -1) {
    perror("pthread_create");
    exit(1);
  }
}


x86 assembly (clang, -O0):
<std_pthread_create>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1030 <pthread_create@plt>
cmp    $0xffffffff,%eax
jne    117c <std_pthread_create+0x4c>
lea    0xe93(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<std_pthread_create>:
push   %rax
call   1030 <pthread_create@plt>
cmp    $0xffffffff,%eax
je     113d <std_pthread_create+0xd>
pop    %rax
ret
lea    0xebc(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

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

LLVM IR (-O2):
@.str = [15 x i8] c"pthread_create\00"
define void @std_pthread_create(i32* %0, i32* %1, i8* (i8*)* %2, i8* %3) {
%5 = tail call i32 @pthread_create(i32* %0, i32* %1, i8* (i8*)* %2, i8* %3)
%6 = icmp eq i32 %5, -1
br i1 %6, label %7, label %10
7: ; preds = %4
%8 = tail call i32 @perror(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%9 = tail call i32 @exit(i32 1)
unreachable
10: ; preds = %4
ret void
}
/* Variables and functions */
scalar_t__ strpbrk(char const *, char *);
const char *url_skip_credentials(const char *url) {
  const char *p = (const char *)strpbrk(url, "@/?#;");
  if (!p || *p != '@')
    return url;
  return p + 1;
}


x86 assembly (clang, -O0):
<url_skip_credentials>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strpbrk@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     114b <url_skip_credentials+0x3b>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x40,%eax
je     1158 <url_skip_credentials+0x48>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1164 <url_skip_credentials+0x54>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<url_skip_credentials>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rsi
call   1030 <strpbrk@plt>
test   %rax,%rax
je     1133 <url_skip_credentials+0x23>
mov    %rax,%rcx
add    $0x1,%rcx
cmpb   $0x40,(%rax)
cmove  %rcx,%rbx
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"@/?#;\00"
define i8* @url_skip_credentials(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i64 @strpbrk(i8* %5, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%7 = inttoptr i64 %6 to i8*
store i8* %7, i8** %4
%8 = load i8*, i8** %4
%9 = icmp ne i8* %8, null
br i1 %9, label %10, label %15
10: ; preds = %1
%11 = load i8*, i8** %4
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = icmp ne i32 %13, 64
br i1 %14, label %15, label %17
15: ; preds = %10, %1
%16 = load i8*, i8** %3
store i8* %16, i8** %2
br label %20
17: ; preds = %10
%18 = load i8*, i8** %4
%19 = getelementptr inbounds i8, i8* %18, i64 1
store i8* %19, i8** %2
br label %20
20: ; preds = %17, %15
%21 = load i8*, i8** %2
ret i8* %21
}

LLVM IR (-O2):
@.str = [6 x i8] c"@/?#;\00"
define i8* @url_skip_credentials(i8* %0) {
%2 = tail call i64 @strpbrk(i8* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%3 = inttoptr i64 %2 to i8*
%4 = icmp eq i64 %2, 0
br i1 %4, label %10, label %5
5: ; preds = %1
%6 = load i8, i8* %3
%7 = icmp eq i8 %6, 64
%8 = getelementptr inbounds i8, i8* %3, i64 1
%9 = select i1 %7, i8* %8, i8* %0
br label %10
10: ; preds = %5, %1
%11 = phi i8* [ %0, %1 ], [ %9, %5 ]
ret i8* %11
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int celcon_mixed_volume(int i, int *mv) {
  int fail;
  double *c;
  fail = _ada_use_c2phc4c(90, &i, mv, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<celcon_mixed_volume>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x5a,%edi
lea    -0x4(%rbp),%rsi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<celcon_mixed_volume>:
push   %rax
mov    %rsi,%rdx
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x5a,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @celcon_mixed_volume(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32
%6 = alloca double*
store i32 %0, i32* %3
store i32* %1, i32** %4
%7 = load i32*, i32** %4
%8 = load double*, double** %6
%9 = call i32 @_ada_use_c2phc4c(i32 90, i32* %3, i32* %7, double* %8, i32 0)
store i32 %9, i32* %5
%10 = load i32, i32* %5
ret i32 %10
}

LLVM IR (-O2):
define i32 @celcon_mixed_volume(i32 %0, i32* %1) {
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 @_ada_use_c2phc4c(i32 90, i32* %3, i32* %1, double* undef, i32 0)
ret i32 %4
}
/* Type definitions */
struct pot {
  int dummy;
};

/* Variables and functions */
int atoi(char *);
char *pot_value(struct pot *);
int pot_int(struct pot *pot) {
  char *value = pot_value(pot);
  return atoi(value);
}


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

x86 assembly (clang, -O2):
<pot_int>:
push   %rax
call   1030 <pot_value@plt>
mov    %rax,%rdi
pop    %rax
jmp    1040 <atoi@plt>

LLVM IR (-O0):
%struct.pot = type { i32 }
define i32 @pot_int(%struct.pot* %0) {
%2 = alloca %struct.pot*
%3 = alloca i8*
store %struct.pot* %0, %struct.pot** %2
%4 = load %struct.pot*, %struct.pot** %2
%5 = call i8* @pot_value(%struct.pot* %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = call i32 @atoi(i8* %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.pot = type { i32 }
define i32 @pot_int(%struct.pot* %0) {
%2 = tail call i8* @pot_value(%struct.pot* %0)
%3 = tail call i32 @atoi(i8* %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ puts(char const *);
int fsiERROR(const char *txt) {
  puts("--------");
  puts("FILE SYS ERROR");
  puts(txt);
  puts("--------");
  return 1;
}


x86 assembly (clang, -O0):
<fsiERROR>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
call   1030 <puts@plt>
lea    0xeda(%rip),%rdi
call   1030 <puts@plt>
mov    -0x8(%rbp),%rdi
call   1030 <puts@plt>
lea    0xebc(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fsiERROR>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0xee2(%rip),%r14
mov    %r14,%rdi
call   1030 <puts@plt>
lea    0xedc(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    %r14,%rdi
call   1030 <puts@plt>
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [9 x i8] c"--------\00"
@.str.1 = [15 x i8] c"FILE SYS ERROR\00"
define i32 @fsiERROR(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @puts(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @puts(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%5 = load i8*, i8** %2
%6 = call i32 @puts(i8* %5)
%7 = call i32 @puts(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@.str = [9 x i8] c"--------\00"
@.str.1 = [15 x i8] c"FILE SYS ERROR\00"
define i32 @fsiERROR(i8* nocapture %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) %0)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret i32 1
}
int test_imm_7Fuint64_midword_reg(unsigned long long val) {
  return ((val >> 16) & (0x7F << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_7Fuint64_midword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
shr    $0x10,%rdx
and    $0x7f,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_7Fuint64_midword_reg>:
test   $0x7f0000,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_7Fuint64_midword_reg(i64 %0) {
%2 = and i64 %0, 8323072
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
void error(char *message) {
  perror(message);
  exit(1);
}


x86 assembly (clang, -O0):
<error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<error>:
push   %rax
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @perror(i8* %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @error(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
int get_asn1c_environment_version() { return 922; }


x86 assembly (clang, -O0):
<get_asn1c_environment_version>:
push   %rbp
mov    %rsp,%rbp
mov    $0x39a,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @get_asn1c_environment_version() {
ret i32 922
}

LLVM IR (-O2):
define i32 @get_asn1c_environment_version() {
ret i32 922
}
__attribute__((always_)) void insl(int port, void *addr, unsigned long count) {
  asm volatile("rep; ins"
               "l"
               : "+D"(addr), "+c"(count)
               : "d"(port));
}


x86 assembly (clang, -O0):
<insl>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rcx
mov    -0x4(%rbp),%edx
rep insl (%dx),%es:(%rdi)
mov    %rdi,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<insl>:
mov    %rdx,%rcx
mov    %edi,%edx
mov    %rsi,%rdi
rep insl (%dx),%es:(%rdi)
ret

LLVM IR (-O0):
define void @insl(i32 %0, i8* %1, i64 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i64
store i32 %0, i32* %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i8*, i8** %5
%8 = load i64, i64* %6
%9 = load i32, i32* %4
%10 = call { i8*, i64 } asm sideeffect "rep; insl", "={di},={cx},{dx},0,1,~{dirflag},~{fpsr},~{flags}"(i32 %9, i8* %7, i64 %8)
%11 = extractvalue { i8*, i64 } %10, 0
%12 = extractvalue { i8*, i64 } %10, 1
store i8* %11, i8** %5
store i64 %12, i64* %6
ret void
}

LLVM IR (-O2):
define void @insl(i32 %0, i8* %1, i64 %2) {
%4 = tail call { i8*, i64 } asm sideeffect "rep; insl", "={di},={cx},{dx},0,1,~{dirflag},~{fpsr},~{flags}"(i32 %0, i8* %1, i64 %2)
ret void
}
void genbc1fl_idle() {}


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

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

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

LLVM IR (-O2):
define void @genbc1fl_idle() {
ret void
}
/* Variables and functions */
void *calloc(size_t, size_t);
int /*<<< orphan*/ xalloc_die();
void *xcalloc(size_t count, size_t size) {
  void *res = calloc(count, size);
  if (size && count && !res) {
    xalloc_die();
  }
  return res;
}


x86 assembly (clang, -O0):
<xcalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <calloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1169 <xcalloc+0x49>
cmpq   $0x0,-0x8(%rbp)
je     1169 <xcalloc+0x49>
cmpq   $0x0,-0x18(%rbp)
jne    1169 <xcalloc+0x49>
mov    $0x0,%al
call   1040 <xalloc_die@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xcalloc>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r15
mov    %rdi,%rbx
call   1030 <calloc@plt>
mov    %rax,%r14
test   %rbx,%rbx
je     1149 <xcalloc+0x29>
test   %r15,%r15
je     1149 <xcalloc+0x29>
test   %r14,%r14
jne    1149 <xcalloc+0x29>
xor    %eax,%eax
call   1040 <xalloc_die@plt>
mov    %r14,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define noalias i8* @xcalloc(i64 %0, i64 %1) {
%3 = tail call i8* @calloc(i64 %0, i64 %1)
%4 = icmp eq i64 %1, 0
%5 = icmp eq i64 %0, 0
%6 = or i1 %5, %4
%7 = icmp ne i8* %3, null
%8 = or i1 %6, %7
br i1 %8, label %11, label %9
9: ; preds = %2
%10 = tail call i32 (...) @xalloc_die()
br label %11
11: ; preds = %9, %2
ret i8* %3
}
/* Variables and functions */
int divider();
int divider_run() { return divider(); }


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

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

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

LLVM IR (-O2):
define i32 @divider_run() {
%1 = tail call i32 (...) @divider()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ printid(float);
void main() {
  int a = 3, b = 5;
  float c = 3.14;
  c = (a > b) ? a : (c > 0) ? c : b;
  printid(c);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x3,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
movss  0xed2(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    114e <main+0x3e>
cvtsi2ssl -0x4(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
jmp    1182 <main+0x72>
movss  -0xc(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    116e <main+0x5e>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    1178 <main+0x68>
cvtsi2ssl -0x8(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
call   1030 <printid@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
movss  0xee8(%rip),%xmm0
jmp    1030 <printid@plt>

LLVM IR (-O0):
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca float
store i32 3, i32* %1
store i32 5, i32* %2
store float 0x40091EB860000000, float* %3
%4 = load i32, i32* %1
%5 = load i32, i32* %2
%6 = icmp sgt i32 %4, %5
br i1 %6, label %7, label %10
7: ; preds = %0
%8 = load i32, i32* %1
%9 = sitofp i32 %8 to float
br label %20
10: ; preds = %0
%11 = load float, float* %3
%12 = fcmp ogt float %11, 0.000000e+00
br i1 %12, label %13, label %15
13: ; preds = %10
%14 = load float, float* %3
br label %18
15: ; preds = %10
%16 = load i32, i32* %2
%17 = sitofp i32 %16 to float
br label %18
18: ; preds = %15, %13
%19 = phi float [ %14, %13 ], [ %17, %15 ]
br label %20
20: ; preds = %18, %7
%21 = phi float [ %9, %7 ], [ %19, %18 ]
store float %21, float* %3
%22 = load float, float* %3
%23 = call i32 @printid(float %22)
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 @printid(float 0x40091EB860000000)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void usage(char *program) {
  printf("%s LOCKRES\n", program);
  printf("prints out information based on the lockres name\n");
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xed3(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"%s LOCKRES\0A\00"
@.str.1 = [50 x i8] c"prints out information based on the lockres name\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"%s LOCKRES\0A\00"
@str = [49 x i8] c"prints out information based on the lockres name\00"
define void @usage(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Send1(unsigned char, int /*<<< orphan*/);
void LCD_X_Write00(unsigned char Cmd) {
  ;
  Send1(Cmd, 0);
  ;
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
xor    %esi,%esi
movzbl -0x1(%rbp),%edi
call   1030 <Send1@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @LCD_X_Write00(i8 zeroext %0) {
%2 = tail call i32 @Send1(i8 zeroext %0, i32 0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ DES_cblock;

/* Variables and functions */
scalar_t__ DES_is_weak_key(int /*<<< orphan*/ *);
int /*<<< orphan*/ DES_set_odd_parity(int /*<<< orphan*/ *);
int RAND_bytes(unsigned char *, int);
int DES_random_key(DES_cblock *ret) {
  do {
    if (RAND_bytes((unsigned char *)ret, sizeof(DES_cblock)) != 1)
      return (0);
  } while (DES_is_weak_key(ret));
  DES_set_odd_parity(ret);
  return (1);
}


x86 assembly (clang, -O0):
<DES_random_key>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x4,%esi
call   1030 <RAND_bytes@plt>
cmp    $0x1,%eax
je     115f <DES_random_key+0x2f>
movl   $0x0,-0x4(%rbp)
jmp    1187 <DES_random_key+0x57>
jmp    1164 <DES_random_key+0x34>
mov    -0x10(%rbp),%rdi
call   1040 <DES_is_weak_key@plt>
cmp    $0x0,%rax
jne    113c <DES_random_key+0xc>
mov    -0x10(%rbp),%rdi
call   1050 <DES_set_odd_parity@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DES_random_key>:
push   %rbx
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rbx,%rdi
mov    $0x4,%esi
call   1030 <RAND_bytes@plt>
cmp    $0x1,%eax
jne    116e <DES_random_key+0x3e>
mov    %rbx,%rdi
call   1040 <DES_is_weak_key@plt>
test   %rax,%rax
jne    1140 <DES_random_key+0x10>
mov    %rbx,%rdi
call   1050 <DES_set_odd_parity@plt>
mov    $0x1,%eax
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @DES_random_key(i32* %0) {
%2 = bitcast i32* %0 to i8*
br label %3
3: ; preds = %6, %1
%4 = tail call i32 @RAND_bytes(i8* %2, i32 4)
%5 = icmp eq i32 %4, 1
br i1 %5, label %6, label %11
6: ; preds = %3
%7 = tail call i64 @DES_is_weak_key(i32* %0)
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %3
9: ; preds = %6
%10 = tail call i32 @DES_set_odd_parity(i32* %0)
br label %11
11: ; preds = %3, %9
%12 = phi i32 [ 1, %9 ], [ 0, %3 ]
ret i32 %12
}
/* Variables and functions */
int f195(int *);
int f196(int *p) { return f195(p); }


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

x86 assembly (clang, -O2):
<f196>:
jmp    1030 <f195@plt>

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

LLVM IR (-O2):
define i32 @f196(i32* %0) {
%2 = tail call i32 @f195(i32* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, char *, int);
int mcharprint(char **s, char *chars, int length) {
  memcpy(*s, chars, length);
  *s += length;
  return length;
}


x86 assembly (clang, -O0):
<mcharprint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <memcpy@plt>
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
movslq %edx,%rdx
add    %rdx,%rcx
mov    %rcx,(%rax)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mcharprint>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebp
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1030 <memcpy@plt>
movslq %ebp,%rax
add    %rax,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @mcharprint(i8** nocapture %0, i8* %1, i32 returned %2) {
%4 = load i8*, i8** %0
%5 = tail call i32 @memcpy(i8* %4, i8* %1, i32 %2)
%6 = load i8*, i8** %0
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i8, i8* %6, i64 %7
store i8* %8, i8** %0
ret i32 %2
}
void WIN32_RemoveService(void) {}


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

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

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

LLVM IR (-O2):
define void @WIN32_RemoveService() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ log_init(int /*<<< orphan*/);
void log_init_quiet() { log_init(0); }


x86 assembly (clang, -O0):
<log_init_quiet>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <log_init@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<log_init_quiet>:
xor    %edi,%edi
jmp    1030 <log_init@plt>

LLVM IR (-O0):
define void @log_init_quiet() {
%1 = call i32 @log_init(i32 0)
ret void
}

LLVM IR (-O2):
define void @log_init_quiet() {
%1 = tail call i32 @log_init(i32 0)
ret void
}
void *eap_otp_init(struct eap_sm *sm) { return (void *)1; }


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

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

LLVM IR (-O0):
%struct.eap_sm = type opaque
define i8* @eap_otp_init(%struct.eap_sm* %0) {
%2 = alloca %struct.eap_sm*
store %struct.eap_sm* %0, %struct.eap_sm** %2
ret i8* inttoptr (i64 1 to i8*)
}

LLVM IR (-O2):
%struct.eap_sm = type opaque
define i8* @eap_otp_init(%struct.eap_sm* nocapture readnone %0) {
ret i8* inttoptr (i64 1 to i8*)
}
/* Variables and functions */
scalar_t__ divby2(int);
scalar_t__ divby3(int);
__attribute__((no)) int divby6(int i) { return divby2(i) && divby3(i); }


x86 assembly (clang, -O0):
<divby6>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <divby2@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
je     1157 <divby6+0x37>
mov    -0x4(%rbp),%edi
call   1030 <divby3@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<divby6>:
push   %rbx
mov    %edi,%ebx
call   1040 <divby2@plt>
test   %rax,%rax
je     1141 <divby6+0x21>
mov    %ebx,%edi
call   1030 <divby3@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @divby6(i32 %0) {
%2 = tail call i64 @divby2(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i64 @divby3(i32 %0)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 0, %1 ], [ %7, %4 ]
ret i32 %9
}