xunge/DecIR huggingface dataset:
void swapInt(int *x, int *y) {
  *x ^= *y;
  *y ^= *x;
  *x ^= *y;
}


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

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

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

LLVM IR (-O2):
define void @swapInt(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = load i32, i32* %0
%5 = xor i32 %4, %3
store i32 %5, i32* %0
%6 = load i32, i32* %1
%7 = xor i32 %6, %5
store i32 %7, i32* %1
%8 = load i32, i32* %0
%9 = xor i32 %8, %7
store i32 %9, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ pthread_exit(int /*<<< orphan*/ *);
void *socket_handler_connection_handler(void *connection) {
  if (connection == NULL)
    return NULL;
  int sock = *((int *)connection);
  pthread_exit(NULL);
}


x86 assembly (clang, -O0):
<socket_handler_connection_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1134 <socket_handler_connection_handler+0x24>
movq   $0x0,-0x8(%rbp)
jmp    1146 <socket_handler_connection_handler+0x36>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1030 <pthread_exit@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<socket_handler_connection_handler>:
test   %rdi,%rdi
je     1121 <socket_handler_connection_handler+0x11>
push   %rax
xor    %edi,%edi
call   1030 <pthread_exit@plt>
add    $0x8,%rsp
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define noalias i8* @socket_handler_connection_handler(i8* readnone %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @pthread_exit(i32* null)
br label %5
5: ; preds = %1, %3
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
int main(int argc, const char *argv[]) {
  float pi = 3.14;
  float radius = 42.0;
  double perimeter = 2 * pi * radius;
  printf("The perimeter of the circle is %f.\n", perimeter);
  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)
movss  0xeda(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  0xec9(%rip),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  0xeb8(%rip),%xmm0
mulss  -0x14(%rbp),%xmm0
mulss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xef0(%rip),%rdi
movsd  0xee0(%rip),%xmm0
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [36 x i8] c"The perimeter of the circle is %f.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca float
%7 = alloca float
%8 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store float 0x40091EB860000000, float* %6
store float 4.200000e+01, float* %7
%9 = load float, float* %6
%10 = fmul float 2.000000e+00, %9
%11 = load float, float* %7
%12 = fmul float %10, %11
%13 = fpext float %12 to double
store double %13, double* %8
%14 = load double, double* %8
%15 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), double %14)
ret i32 0
}

LLVM IR (-O2):
@.str = [36 x i8] c"The perimeter of the circle is %f.\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), double 0x40707C2900000000)
ret i32 0
}
void gdk_pointer_grab() {}


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

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

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

LLVM IR (-O2):
define void @gdk_pointer_grab() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ message(int, char const *, char *);
void enomem(const char *fname) {
  message(2, fname, ("cannot find enough memory"));
}


x86 assembly (clang, -O0):
<enomem>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
mov    $0x2,%edi
lea    0xed4(%rip),%rdx
call   1030 <message@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<enomem>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdx
mov    $0x2,%edi
jmp    1030 <message@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"cannot find enough memory\00"
define void @enomem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @message(i32 2, i8* %3, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"cannot find enough memory\00"
define void @enomem(i8* %0) {
%2 = tail call i32 @message(i32 2, i8* %0, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int system(char *);
void call_stty(int reset) {
  if (reset) {
    reset = system("stty -raw");
  } else {
    reset = system("stty raw");
  }
}


x86 assembly (clang, -O0):
<call_stty>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1139 <call_stty+0x29>
lea    0xed4(%rip),%rdi
call   1030 <system@plt>
mov    %eax,-0x4(%rbp)
jmp    1148 <call_stty+0x38>
lea    0xeca(%rip),%rdi
call   1030 <system@plt>
mov    %eax,-0x4(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<call_stty>:
test   %edi,%edi
lea    0xef1(%rip),%rax
lea    0xee0(%rip),%rdi
cmove  %rax,%rdi
jmp    1030 <system@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"stty -raw\00"
@.str.1 = [9 x i8] c"stty raw\00"
define void @call_stty(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 @system(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
store i32 %6, i32* %2
br label %9
7: ; preds = %1
%8 = call i32 @system(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
store i32 %8, i32* %2
br label %9
9: ; preds = %7, %5
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"stty -raw\00"
@.str.1 = [9 x i8] c"stty raw\00"
define void @call_stty(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = select i1 %2, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0)
%4 = tail call i32 @system(i8* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print(char *);
void writeLine() { print(""); }


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

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

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define void @writeLine() {
%1 = call i32 @print(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define void @writeLine() {
%1 = tail call i32 @print(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int scanf(char *, long long *);
void checkIntInput(long long *a) {
  if ((scanf("%lld", a)) != 1) {
    printf("Not digit!");
    exit(EXIT_FAILURE);
  }
}


x86 assembly (clang, -O0):
<checkIntInput>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xeb9(%rip),%rdi
call   1040 <scanf@plt>
cmp    $0x1,%eax
je     116f <checkIntInput+0x3f>
lea    0xea9(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e78(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checkIntInput>:
push   %rax
mov    %rdi,%rsi
lea    0xec5(%rip),%rdi
call   1040 <scanf@plt>
cmp    $0x1,%eax
jne    1147 <checkIntInput+0x17>
pop    %rax
ret
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e86(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"%lld\00"
@.str.1 = [11 x i8] c"Not digit!\00"
@EXIT_FAILURE = global i32 0
define void @checkIntInput(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64* %3)
%5 = icmp ne i32 %4, 1
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%8 = load i32, i32* @EXIT_FAILURE
%9 = call i32 @exit(i32 %8)
unreachable
10: ; preds = %1
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"%lld\00"
@.str.1 = [11 x i8] c"Not digit!\00"
@EXIT_FAILURE = global i32 0
define void @checkIntInput(i64* %0) {
%2 = tail call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64* %0)
%3 = icmp eq i32 %2, 1
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%6 = load i32, i32* @EXIT_FAILURE
%7 = tail call i32 @exit(i32 %6)
unreachable
8: ; preds = %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print_message(char *, unsigned int);
void cmprintf_group_start_tap(const size_t num_tests) {
  print_message("1..%u\n", (unsigned)num_tests);
}


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

x86 assembly (clang, -O2):
<cmprintf_group_start_tap>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <print_message@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"1..%u\0A\00"
define void @cmprintf_group_start_tap(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
%5 = call i32 @print_message(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %4)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"1..%u\0A\00"
define void @cmprintf_group_start_tap(i64 %0) {
%2 = trunc i64 %0 to i32
%3 = tail call i32 @print_message(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %2)
ret void
}
/* Variables and functions */
char const *strerror(int);
const char *os_error_string(int err) { return strerror(err); }


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

x86 assembly (clang, -O2):
<os_error_string>:
jmp    1030 <strerror@plt>

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

LLVM IR (-O2):
define i8* @os_error_string(i32 %0) {
%2 = tail call i8* @strerror(i32 %0)
ret i8* %2
}
int test_two_params(int a, int b) { return a + b; }


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

x86 assembly (clang, -O2):
<test_two_params>:
lea    (%rdi,%rsi,1),%eax
ret

LLVM IR (-O0):
define i32 @test_two_params(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 = add nsw i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @test_two_params(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
int cloog_version_major(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @cloog_version_major() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void getPassResult(double average) {
  if (average >= 7) {
    printf("--> The student passed! Congratulation!\n");
  } else {
    printf("--> Sorry. The student failed!\n");
  }
}


x86 assembly (clang, -O0):
<getPassResult>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xed6(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     1145 <getPassResult+0x35>
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
jmp    1151 <getPassResult+0x41>
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getPassResult>:
ucomisd 0xee8(%rip),%xmm0
lea    0xee9(%rip),%rax
lea    0xf01(%rip),%rdi
cmovb  %rax,%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [41 x i8] c"--> The student passed! Congratulation!\0A\00"
@.str.1 = [32 x i8] c"--> Sorry. The student failed!\0A\00"
define void @getPassResult(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp oge double %3, 7.000000e+00
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
br label %9
7: ; preds = %1
%8 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0))
br label %9
9: ; preds = %7, %5
ret void
}

LLVM IR (-O2):
@str = [31 x i8] c"--> Sorry. The student failed!\00"
@str.2 = [40 x i8] c"--> The student passed! Congratulation!\00"
define void @getPassResult(double %0) {
%2 = fcmp ult double %0, 7.000000e+00
%3 = select i1 %2, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0), i8* getelementptr inbounds ([40 x i8], [40 x i8]* @str.2, i64 0, i64 0)
%4 = tail call i32 @puts(i8* dereferenceable(1) %3)
ret void
}
/* Type definitions */
struct UPnPService {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, char *, char *, char *);
void RNDResponseSink_AVTransport_GetDeviceCapabilities(
    struct UPnPService *Service, int ErrorCode, void *User, char *PlayMedia,
    char *RecMedia, char *RecQualityModes) {
  printf("RND Invoke Response: "
         "AVTransport/GetDeviceCapabilities[ErrorCode:%d](%s,%s,%s)\r\n",
         ErrorCode, PlayMedia, RecMedia, RecQualityModes);
}


x86 assembly (clang, -O0):
<RNDResponseSink_AVTransport_GetDeviceCapabilities>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0xc(%rbp),%esi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    -0x30(%rbp),%r8
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RNDResponseSink_AVTransport_GetDeviceCapabilities>:
lea    0xee9(%rip),%rdi
mov    %rcx,%rdx
mov    %r8,%rcx
mov    %r9,%r8
jmp    1030 <printf@plt>

LLVM IR (-O0):
%struct.UPnPService = type { i32 }
@.str = [81 x i8] c"RND Invoke Response: AVTransport/GetDeviceCapabilities[ErrorCode:%d](%s,%s,%s)\0D\0A\00"
define void @RNDResponseSink_AVTransport_GetDeviceCapabilities(%struct.UPnPService* %0, i32 %1, i8* %2, i8* %3, i8* %4, i8* %5) {
%7 = alloca %struct.UPnPService*
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i8*
store %struct.UPnPService* %0, %struct.UPnPService** %7
store i32 %1, i32* %8
store i8* %2, i8** %9
store i8* %3, i8** %10
store i8* %4, i8** %11
store i8* %5, i8** %12
%13 = load i32, i32* %8
%14 = load i8*, i8** %10
%15 = load i8*, i8** %11
%16 = load i8*, i8** %12
%17 = call i32 @printf(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str, i64 0, i64 0), i32 %13, i8* %14, i8* %15, i8* %16)
ret void
}

LLVM IR (-O2):
%struct.UPnPService = type { i32 }
@.str = [81 x i8] c"RND Invoke Response: AVTransport/GetDeviceCapabilities[ErrorCode:%d](%s,%s,%s)\0D\0A\00"
define void @RNDResponseSink_AVTransport_GetDeviceCapabilities(%struct.UPnPService* nocapture readnone %0, i32 %1, i8* nocapture readnone %2, i8* %3, i8* %4, i8* %5) {
%7 = tail call i32 @printf(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str, i64 0, i64 0), i32 %1, i8* %3, i8* %4, i8* %5)
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void print8hex(uint8_t value) { printf("%02X", value); }


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

x86 assembly (clang, -O2):
<print8hex>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"%02X\00"
define void @print8hex(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"%02X\00"
define void @print8hex(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Type definitions */
struct tm {
  int tm_mday;
};

/* Variables and functions */
unsigned Sys_Day(void *t) { return ((struct tm *)t)->tm_mday; }


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

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

LLVM IR (-O0):
%struct.tm = type { i32 }
define i32 @Sys_Day(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.tm*
%5 = getelementptr inbounds %struct.tm, %struct.tm* %4, i32 0, i32 0
%6 = load i32, i32* %5
ret i32 %6
}

LLVM IR (-O2):
define i32 @Sys_Day(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void badusage(void) {
  fprintf(stderr, "Usage: fsareverse [-s] [-midfa] [-ip d/s[dr]] [-op d/s]\n");
  fprintf(stderr, "                  [-silent] [-v] [-l/-h] filename\n");
  exit(1);
}


x86 assembly (clang, -O0):
<badusage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2ea0(%rip),%rax
mov    (%rax),%edi
lea    0xef0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<badusage>:
push   %rbx
mov    0x2eb8(%rip),%rbx
mov    (%rbx),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xefa(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [57 x i8] c"Usage: fsareverse [-s] [-midfa] [-ip d/s[dr]] [-op d/s]\0A\00"
@.str.1 = [51 x i8] c" [-silent] [-v] [-l/-h] filename\0A\00"
define void @badusage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [57 x i8] c"Usage: fsareverse [-s] [-midfa] [-ip d/s[dr]] [-op d/s]\0A\00"
@.str.1 = [51 x i8] c" [-silent] [-v] [-l/-h] filename\0A\00"
define void @badusage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int strlen(char *);
void chopslash(char *s) {
  char *t;
  t = s + strlen(s);
  while (--t >= s && *t == '/')
    *t = 0;
}


x86 assembly (clang, -O0):
<chopslash>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x10(%rbp)
xor    %eax,%eax
cmp    -0x8(%rbp),%rcx
mov    %al,-0x19(%rbp)
jb     1168 <chopslash+0x58>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2f,%eax
sete   %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
test   $0x1,%al
jne    1178 <chopslash+0x68>
jmp    1184 <chopslash+0x74>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
jmp    113d <chopslash+0x2d>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chopslash>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
cltq
add    %rbx,%rax
add    $0xffffffffffffffff,%rax
cmp    %rbx,%rax
jb     1141 <chopslash+0x31>
nopw   0x0(%rax,%rax,1)
cmpb   $0x2f,(%rax)
jne    1141 <chopslash+0x31>
movb   $0x0,(%rax)
add    $0xffffffffffffffff,%rax
cmp    %rbx,%rax
jae    1130 <chopslash+0x20>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @chopslash(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = sext i32 %2 to i64
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = getelementptr inbounds i8, i8* %4, i64 -1
%6 = icmp ult i8* %5, %0
br i1 %6, label %14, label %7
7: ; preds = %1, %11
%8 = phi i8* [ %12, %11 ], [ %5, %1 ]
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 47
br i1 %10, label %11, label %14
11: ; preds = %7
store i8 0, i8* %8
%12 = getelementptr inbounds i8, i8* %8, i64 -1
%13 = icmp ult i8* %12, %0
br i1 %13, label %14, label %7
14: ; preds = %7, %11, %1
ret void
}
unsigned int gsl_version_id(void) { return 0x20140421; }


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

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

LLVM IR (-O0):
define i32 @gsl_version_id() {
ret i32 538182689
}

LLVM IR (-O2):
define i32 @gsl_version_id() {
ret i32 538182689
}
void handle_signal(int signum) { return; }


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

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

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

LLVM IR (-O2):
define void @handle_signal(i32 %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
struct tm *localtime(int /*<<< orphan*/ const *);
int /*<<< orphan*/ strftime(char *, int, char const *, struct tm *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
void get_arpadate(char *d_string) {
  struct tm *date;
  time_t now;
  const char *format = "%a, %d %b %Y %H:%M:%S %z";
  now = time(NULL);
  date = localtime((const time_t *)&now);
  (void)strftime(d_string, 32, format, date);
}


x86 assembly (clang, -O0):
<get_arpadate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xebd(%rip),%rax
mov    %rax,-0x20(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    %eax,-0x14(%rbp)
lea    -0x14(%rbp),%rdi
call   1030 <localtime@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    $0x20,%esi
call   1050 <strftime@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_arpadate>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,0xc(%rsp)
lea    0xc(%rsp),%rdi
call   1030 <localtime@plt>
lea    0xeac(%rip),%rdx
mov    %rbx,%rdi
mov    $0x20,%esi
mov    %rax,%rcx
call   1050 <strftime@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
@.str = [25 x i8] c"%a, %d %b %Y %H:%M:%S %z\00"
define void @get_arpadate(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.tm*
%4 = alloca i32
%5 = alloca i8*
store i8* %0, i8** %2
store i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8** %5
%6 = call i32 @time(i32* null)
store i32 %6, i32* %4
%7 = call %struct.tm* @localtime(i32* %4)
store %struct.tm* %7, %struct.tm** %3
%8 = load i8*, i8** %2
%9 = load i8*, i8** %5
%10 = load %struct.tm*, %struct.tm** %3
%11 = call i32 @strftime(i8* %8, i32 32, i8* %9, %struct.tm* %10)
ret void
}

LLVM IR (-O2):
%struct.tm = type { i32 }
@.str = [25 x i8] c"%a, %d %b %Y %H:%M:%S %z\00"
define void @get_arpadate(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = tail call i32 @time(i32* null)
store i32 %4, i32* %2
%5 = call %struct.tm* @localtime(i32* %2)
%6 = call i32 @strftime(i8* %0, i32 32, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), %struct.tm* %5)
ret void
}
unsigned int ccuEvent2(unsigned int is, unsigned int em, unsigned int lm,
                       unsigned int lpf) {
  return ((is << 8) | (em << 20) | (lm << 24) | (lpf << 29));
}


x86 assembly (clang, -O0):
<ccuEvent2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%ecx
shl    $0x14,%ecx
or     %ecx,%eax
mov    -0xc(%rbp),%ecx
shl    $0x18,%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%ecx
shl    $0x1d,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ccuEvent2>:
mov    %ecx,%eax
shl    $0x8,%edi
shl    $0x14,%esi
or     %edi,%esi
shl    $0x18,%edx
shl    $0x1d,%eax
or     %edx,%eax
or     %esi,%eax
ret

LLVM IR (-O0):
define i32 @ccuEvent2(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = shl i32 %9, 8
%11 = load i32, i32* %6
%12 = shl i32 %11, 20
%13 = or i32 %10, %12
%14 = load i32, i32* %7
%15 = shl i32 %14, 24
%16 = or i32 %13, %15
%17 = load i32, i32* %8
%18 = shl i32 %17, 29
%19 = or i32 %16, %18
ret i32 %19
}

LLVM IR (-O2):
define i32 @ccuEvent2(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = shl i32 %0, 8
%6 = shl i32 %1, 20
%7 = or i32 %6, %5
%8 = shl i32 %2, 24
%9 = or i32 %7, %8
%10 = shl i32 %3, 29
%11 = or i32 %9, %10
ret i32 %11
}
char *jump_over_blank(char *where) {
  char *now = where;
  while ((*now) && ((*now == ' ') || (*now == '\t')))
    now++;
  return now;
}


x86 assembly (clang, -O0):
<jump_over_blank>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x11(%rbp)
je     1150 <jump_over_blank+0x50>
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x12(%rbp)
je     114a <jump_over_blank+0x4a>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
sete   %al
mov    %al,-0x12(%rbp)
mov    -0x12(%rbp),%al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1160 <jump_over_blank+0x60>
jmp    1171 <jump_over_blank+0x71>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <jump_over_blank+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i8* @jump_over_blank(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 9, label %5
i8 32, label %5
]
5: ; preds = %2, %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
7: ; preds = %2
ret i8* %3
}
/* Variables and functions */
unsigned char PDCRead(int);
unsigned char PDCGPIODirRead(unsigned char ucIdx) {
  ;
  if (ucIdx == 0) {
    return (PDCRead(0x9));
  } else if (ucIdx == 1) {
    return (PDCRead(0xB));
  } else {
    return (PDCRead(0xD));
  }
}


x86 assembly (clang, -O0):
<PDCGPIODirRead>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movzbl -0x2(%rbp),%eax
cmp    $0x0,%eax
jne    113d <PDCGPIODirRead+0x2d>
mov    $0x9,%edi
call   1030 <PDCRead@plt>
mov    %al,-0x1(%rbp)
jmp    1169 <PDCGPIODirRead+0x59>
movzbl -0x2(%rbp),%eax
cmp    $0x1,%eax
jne    115c <PDCGPIODirRead+0x4c>
mov    $0xb,%edi
call   1030 <PDCRead@plt>
mov    %al,-0x1(%rbp)
jmp    1169 <PDCGPIODirRead+0x59>
mov    $0xd,%edi
call   1030 <PDCRead@plt>
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PDCGPIODirRead>:
xor    %eax,%eax
cmp    $0x1,%dil
setne  %al
add    %eax,%eax
add    $0xb,%eax
test   %edi,%edi
mov    $0x9,%edi
cmovne %eax,%edi
jmp    1030 <PDCRead@plt>

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

LLVM IR (-O2):
define zeroext i8 @PDCGPIODirRead(i8 zeroext %0) {
%2 = icmp eq i8 %0, 1
%3 = select i1 %2, i32 11, i32 13
%4 = icmp eq i8 %0, 0
%5 = select i1 %4, i32 9, i32 %3
%6 = tail call zeroext i8 @PDCRead(i32 %5)
ret i8 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
void vypisVysledek(double vysledneCislo) { printf("%.10le\n", vysledneCislo); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"%.10le\0A\00"
define void @vypisVysledek(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), double %3)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"%.10le\0A\00"
define void @vypisVysledek(double %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), double %0)
ret void
}
int main(int argc, char *argv[]) {
  union {
    int i;
    char c;
    float f;
  };
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
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
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
char *getenv(int /*<<< orphan*/);
int /*<<< orphan*/ lua_check_string(int, char *);
int /*<<< orphan*/ lua_pushnil();
int /*<<< orphan*/ lua_pushstring(char *);
void io_getenv(void) {
  char *env = getenv(lua_check_string(1, "getenv"));
  if (env == NULL)
    lua_pushnil();
  else
    lua_pushstring(env);
}


x86 assembly (clang, -O0):
<io_getenv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x1,%edi
lea    0xeac(%rip),%rsi
call   1040 <lua_check_string@plt>
mov    %eax,%edi
call   1030 <getenv@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    117b <io_getenv+0x3b>
mov    $0x0,%al
call   1050 <lua_pushnil@plt>
jmp    1184 <io_getenv+0x44>
mov    -0x8(%rbp),%rdi
call   1060 <lua_pushstring@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<io_getenv>:
push   %rax
lea    0xeb8(%rip),%rsi
mov    $0x1,%edi
call   1040 <lua_check_string@plt>
mov    %eax,%edi
call   1030 <getenv@plt>
test   %rax,%rax
je     1167 <io_getenv+0x27>
mov    %rax,%rdi
pop    %rax
jmp    1060 <lua_pushstring@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <lua_pushnil@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"getenv\00"
define void @io_getenv() {
%1 = alloca i8*
%2 = call i32 @lua_check_string(i32 1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%3 = call i8* @getenv(i32 %2)
store i8* %3, i8** %1
%4 = load i8*, i8** %1
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 (...) @lua_pushnil()
br label %11
8: ; preds = %0
%9 = load i8*, i8** %1
%10 = call i32 @lua_pushstring(i8* %9)
br label %11
11: ; preds = %8, %6
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"getenv\00"
define void @io_getenv() {
%1 = tail call i32 @lua_check_string(i32 1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%2 = tail call i8* @getenv(i32 %1)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = tail call i32 (...) @lua_pushnil()
br label %8
6: ; preds = %0
%7 = tail call i32 @lua_pushstring(i8* %2)
br label %8
8: ; preds = %6, %4
ret void
}
void NOR_TX_DMA_COMPLETE_Interrupt(void) {}


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

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

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

LLVM IR (-O2):
define void @NOR_TX_DMA_COMPLETE_Interrupt() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ft_putchar(char);
int /*<<< orphan*/ ft_putstr(char const *);
void ft_putendl(const char *str) {
  ft_putstr(str);
  ft_putchar('\n');
}


x86 assembly (clang, -O0):
<ft_putendl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <ft_putstr@plt>
mov    $0xa,%edi
call   1030 <ft_putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_putendl>:
push   %rax
call   1040 <ft_putstr@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <ft_putchar@plt>

LLVM IR (-O0):
define void @ft_putendl(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @ft_putstr(i8* %3)
%5 = call i32 @ft_putchar(i8 signext 10)
ret void
}

LLVM IR (-O2):
define void @ft_putendl(i8* %0) {
%2 = tail call i32 @ft_putstr(i8* %0)
%3 = tail call i32 @ft_putchar(i8 signext 10)
ret void
}
/* Variables and functions */
scalar_t__ geteuid();
int /*<<< orphan*/ printf(char *);
int main() {
  if (geteuid() != 0) {
    printf("No\n");
  } else {
    printf("Yes\n");
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <geteuid@plt>
cmp    $0x0,%rax
je     1151 <main+0x31>
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
jmp    115d <main+0x3d>
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <geteuid@plt>
test   %rax,%rax
lea    0xece(%rip),%rax
lea    0xecb(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"No\0A\00"
@.str.1 = [5 x i8] c"Yes\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 (...) @geteuid()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
br label %8
6: ; preds = %0
%7 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %8
8: ; preds = %6, %4
%9 = load i32, i32* %1
ret i32 %9
}

LLVM IR (-O2):
@str = [4 x i8] c"Yes\00"
@str.2 = [3 x i8] c"No\00"
define i32 @main() {
%1 = tail call i64 (...) @geteuid()
%2 = icmp eq i64 %1, 0
%3 = select i1 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @str.2, i64 0, i64 0)
%4 = tail call i32 @puts(i8* dereferenceable(1) %3)
ret i32 0
}
/* Type definitions */
typedef unsigned char const uint32_t;

/* Variables and functions */
uint32_t get_uint32_be(const unsigned char *ptr) {
  return ptr[3] | (ptr[2] << 8) | (ptr[1] << 16) | (ptr[0] << 24);
}


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

x86 assembly (clang, -O2):
<get_uint32_be>:
mov    0x3(%rdi),%al
ret

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

LLVM IR (-O2):
define zeroext i8 @get_uint32_be(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 3
%3 = load i8, i8* %2
ret i8 %3
}
int *asus_get_pinToGpio(int rev) {
  static int pinToGpio_AP[64] = {
      (12 + 152), (184),      (14 + 152), (15 + 152), (10 + 152), (11 + 152),
      (19 + 152), 17,         (4 + 248),  (5 + 248),  (7 + 248),  (3 + 248),
      (9 + 248),  (8 + 248),  (6 + 248),  (9 + 152),  (8 + 152),  -1,
      -1,         -1,         -1,         (13 + 152), (16 + 152), (22 + 216),
      (1 + 184),  (8 + 216),  (23 + 216), (7 + 216),  (3 + 184),  (4 + 184),
      (17 + 216), (18 + 216), -1,         -1,         -1,         -1,
      -1,         -1,         -1,         -1,         -1,         -1,
      -1,         -1,         -1,         -1,         -1,         -1,
      -1,         -1,         -1,         -1,         -1,         -1,
      -1,         -1,         -1,         -1,         -1,         -1,
      -1,         -1,         -1,         -1,
  };
  return pinToGpio_AP;
}


x86 assembly (clang, -O0):
<asus_get_pinToGpio>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
lea    0x2f22(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
@asus_get_pinToGpio.pinToGpio_AP = internal global [64 x i32] [i32 164, i32 184, i32 166, i32 167, i32 162, i32 163, i32 171, i32 17, i32 252, i32 253, i32 255, i32 251, i32 257, i32 256, i32 254, i32 161, i32 160, i32 -1, i32 -1, i32 -1, i32 -1, i32 165, i32 168, i32 238, i32 185, i32 224, i32 239, i32 223, i32 187, i32 188, i32 233, i32 234, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1]
define i32* @asus_get_pinToGpio(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret i32* getelementptr inbounds ([64 x i32], [64 x i32]* @asus_get_pinToGpio.pinToGpio_AP, i64 0, i64 0)
}

LLVM IR (-O2):
@asus_get_pinToGpio.pinToGpio_AP = internal global [64 x i32] [i32 164, i32 184, i32 166, i32 167, i32 162, i32 163, i32 171, i32 17, i32 252, i32 253, i32 255, i32 251, i32 257, i32 256, i32 254, i32 161, i32 160, i32 -1, i32 -1, i32 -1, i32 -1, i32 165, i32 168, i32 238, i32 185, i32 224, i32 239, i32 223, i32 187, i32 188, i32 233, i32 234, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1]
define i32* @asus_get_pinToGpio(i32 %0) {
ret i32* getelementptr inbounds ([64 x i32], [64 x i32]* @asus_get_pinToGpio.pinToGpio_AP, i64 0, i64 0)
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ Ttl_TPM_PhysicalDisable();
uint32_t TtlClearEnable(void) {
  do {
  } while (0);
  return Ttl_TPM_PhysicalDisable();
}


x86 assembly (clang, -O0):
<TtlClearEnable>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <TtlClearEnable+0x9>
jmp    111e <TtlClearEnable+0xe>
mov    $0x0,%al
call   1030 <Ttl_TPM_PhysicalDisable@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @TtlClearEnable() {
br label %1
1: ; preds = %0
br label %2
2: ; preds = %1
%3 = call i32 (...) @Ttl_TPM_PhysicalDisable()
ret i32 %3
}

LLVM IR (-O2):
define i32 @TtlClearEnable() {
%1 = tail call i32 (...) @Ttl_TPM_PhysicalDisable()
ret i32 %1
}
char tohex(char c) { return (char)(c >= 10 ? c - 10 + 'a' : c + '0'); }


x86 assembly (clang, -O0):
<tohex>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0xa,%eax
jl     1129 <tohex+0x29>
movsbl -0x1(%rbp),%eax
sub    $0xa,%eax
add    $0x61,%eax
mov    %eax,-0x8(%rbp)
jmp    1133 <tohex+0x33>
movsbl -0x1(%rbp),%eax
add    $0x30,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tohex>:
cmp    $0xa,%dil
mov    $0x57,%ecx
mov    $0x30,%eax
cmovge %ecx,%eax
add    %dil,%al
ret

LLVM IR (-O0):
define signext i8 @tohex(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sge i32 %4, 10
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = sub nsw i32 %8, 10
%10 = add nsw i32 %9, 97
br label %15
11: ; preds = %1
%12 = load i8, i8* %2
%13 = sext i8 %12 to i32
%14 = add nsw i32 %13, 48
br label %15
15: ; preds = %11, %6
%16 = phi i32 [ %10, %6 ], [ %14, %11 ]
%17 = trunc i32 %16 to i8
ret i8 %17
}

LLVM IR (-O2):
define signext i8 @tohex(i8 signext %0) {
%2 = icmp sgt i8 %0, 9
%3 = select i1 %2, i8 87, i8 48
%4 = add i8 %3, %0
ret i8 %4
}
/* Variables and functions */
void *heap_min(void *array, size_t elemsize) {
  return (void *)&((unsigned char *)array)[(0) * elemsize];
}


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

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

LLVM IR (-O0):
define i8* @heap_min(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = load i64, i64* %4
%7 = mul i64 0, %6
%8 = getelementptr inbounds i8, i8* %5, i64 %7
ret i8* %8
}

LLVM IR (-O2):
define i8* @heap_min(i8* readnone returned %0, i64 %1) {
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ core12_print(char *, char const *);
void U_EMRCREATEMONOBRUSH_print(const char *contents) {
  core12_print("U_EMRCREATEMONOBRUSH", contents);
}


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

x86 assembly (clang, -O2):
<U_EMRCREATEMONOBRUSH_print>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <core12_print@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"U_EMRCREATEMONOBRUSH\00"
define void @U_EMRCREATEMONOBRUSH_print(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @core12_print(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"U_EMRCREATEMONOBRUSH\00"
define void @U_EMRCREATEMONOBRUSH_print(i8* %0) {
%2 = tail call i32 @core12_print(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}