xunge/DecIR huggingface dataset:
void g_thread_exit() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ htonl(int);
int get_net_flags(void *data) {
  uint32_t *nf = (uint32_t *)data;
  *nf = htonl(0x20000000 | 0x40000000 | 0x10000000);
  return 1;
}


x86 assembly (clang, -O0):
<get_net_flags>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x70000000,%edi
call   1030 <htonl@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_net_flags>:
push   %rbx
mov    %rdi,%rbx
mov    $0x70000000,%edi
call   1030 <htonl@plt>
mov    %eax,(%rbx)
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @get_net_flags(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i32*
store i32* %5, i32** %3
%6 = call i32 @htonl(i32 1879048192)
%7 = load i32*, i32** %3
store i32 %6, i32* %7
ret i32 1
}

LLVM IR (-O2):
define i32 @get_net_flags(i8* nocapture writeonly %0) {
%2 = bitcast i8* %0 to i32*
%3 = tail call i32 @htonl(i32 1879048192)
store i32 %3, i32* %2
ret i32 1
}
void swift_retain() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ rotl64(int /*<<< orphan*/, int);
uint64_t bmw_large_r4(uint64_t x) {
  uint64_t r;
  r = rotl64(x, 32);
  return r;
}


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

x86 assembly (clang, -O2):
<bmw_large_r4>:
mov    $0x20,%esi
jmp    1030 <rotl64@plt>

LLVM IR (-O0):
define i32 @bmw_large_r4(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @rotl64(i32 %4, i32 32)
store i32 %5, i32* %3
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @bmw_large_r4(i32 %0) {
%2 = tail call i32 @rotl64(i32 %0, i32 32)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ bbm_word_read(void *, int, unsigned short *);
int /*<<< orphan*/ bbm_word_write(void *, int, unsigned short);
int /*<<< orphan*/ fc8080_data(void *, unsigned short);
void fc8080_isr(void *handle) {
  unsigned short buf_int_status = 0;
  bbm_word_read(handle, 0x0900, &buf_int_status);
  if (buf_int_status) {
    bbm_word_write(handle, 0x0900, buf_int_status);
    fc8080_data(handle, buf_int_status);
  }
}


x86 assembly (clang, -O0):
<fc8080_isr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movw   $0x0,-0xa(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x900,%esi
lea    -0xa(%rbp),%rdx
call   1050 <bbm_word_read@plt>
cmpw   $0x0,-0xa(%rbp)
je     117e <fc8080_isr+0x4e>
mov    -0x8(%rbp),%rdi
mov    $0x900,%esi
movzwl -0xa(%rbp),%edx
call   1040 <bbm_word_write@plt>
mov    -0x8(%rbp),%rdi
movzwl -0xa(%rbp),%esi
call   1030 <fc8080_data@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fc8080_isr>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
movw   $0x0,0xe(%rsp)
lea    0xe(%rsp),%rdx
mov    $0x900,%esi
call   1050 <bbm_word_read@plt>
movzwl 0xe(%rsp),%eax
test   %ax,%ax
je     1175 <fc8080_isr+0x45>
movzwl %ax,%edx
mov    %rbx,%rdi
mov    $0x900,%esi
call   1040 <bbm_word_write@plt>
movzwl 0xe(%rsp),%esi
mov    %rbx,%rdi
call   1030 <fc8080_data@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @fc8080_isr(i8* %0) {
%2 = alloca i8*
%3 = alloca i16
store i8* %0, i8** %2
store i16 0, i16* %3
%4 = load i8*, i8** %2
%5 = call i32 @bbm_word_read(i8* %4, i32 2304, i16* %3)
%6 = load i16, i16* %3
%7 = icmp ne i16 %6, 0
br i1 %7, label %8, label %15
8: ; preds = %1
%9 = load i8*, i8** %2
%10 = load i16, i16* %3
%11 = call i32 @bbm_word_write(i8* %9, i32 2304, i16 zeroext %10)
%12 = load i8*, i8** %2
%13 = load i16, i16* %3
%14 = call i32 @fc8080_data(i8* %12, i16 zeroext %13)
br label %15
15: ; preds = %8, %1
ret void
}

LLVM IR (-O2):
define void @fc8080_isr(i8* %0) {
%2 = alloca i16
%3 = bitcast i16* %2 to i8*
store i16 0, i16* %2
%4 = call i32 @bbm_word_read(i8* %0, i32 2304, i16* %2)
%5 = load i16, i16* %2
%6 = icmp eq i16 %5, 0
br i1 %6, label %11, label %7
7: ; preds = %1
%8 = call i32 @bbm_word_write(i8* %0, i32 2304, i16 zeroext %5)
%9 = load i16, i16* %2
%10 = call i32 @fc8080_data(i8* %0, i16 zeroext %9)
br label %11
11: ; preds = %7, %1
ret void
}
void pm_runtime_init(struct device *dev) {}


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

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

LLVM IR (-O0):
%struct.device = type opaque
define void @pm_runtime_init(%struct.device* %0) {
%2 = alloca %struct.device*
store %struct.device* %0, %struct.device** %2
ret void
}

LLVM IR (-O2):
%struct.device = type opaque
define void @pm_runtime_init(%struct.device* nocapture %0) {
ret void
}
int IsRowSymmetric(int *PixelSet) {
  int FirstIndex = 0;
  int LastIndex = 320 - 1;
  while (FirstIndex < LastIndex) {
    if (PixelSet[FirstIndex] != PixelSet[LastIndex]) {
      return 0;
    }
    FirstIndex++;
    LastIndex--;
  }
  return 1;
}


x86 assembly (clang, -O0):
<IsRowSymmetric>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x13f,-0x18(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    1161 <IsRowSymmetric+0x61>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    -0x10(%rbp),%rcx
movslq -0x18(%rbp),%rdx
cmp    (%rcx,%rdx,4),%eax
je     114a <IsRowSymmetric+0x4a>
movl   $0x0,-0x4(%rbp)
jmp    1168 <IsRowSymmetric+0x68>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x18(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x18(%rbp)
jmp    1116 <IsRowSymmetric+0x16>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<IsRowSymmetric>:
mov    $0x13e,%ecx
xor    %eax,%eax
xor    %edx,%edx
nopl   0x0(%rax)
mov    (%rdi,%rdx,4),%esi
cmp    0x4(%rdi,%rcx,4),%esi
jne    112e <IsRowSymmetric+0x2e>
add    $0x1,%rdx
lea    -0x1(%rcx),%rsi
cmp    %rcx,%rdx
mov    %rsi,%rcx
jl     1110 <IsRowSymmetric+0x10>
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @IsRowSymmetric(i32* nocapture %0) {
br label %2
2: ; preds = %1, %10
%3 = phi i64 [ 0, %1 ], [ %11, %10 ]
%4 = phi i64 [ 319, %1 ], [ %12, %10 ]
%5 = getelementptr inbounds i32, i32* %0, i64 %3
%6 = load i32, i32* %5
%7 = getelementptr inbounds i32, i32* %0, i64 %4
%8 = load i32, i32* %7
%9 = icmp eq i32 %6, %8
br i1 %9, label %10, label %14
10: ; preds = %2
%11 = add nuw nsw i64 %3, 1
%12 = add nsw i64 %4, -1
%13 = icmp slt i64 %11, %12
br i1 %13, label %2, label %14
14: ; preds = %10, %2
%15 = phi i32 [ 0, %2 ], [ 1, %10 ]
ret i32 %15
}
void ff_hevc_put_hevc_bi_w_pel_pixels16_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_w_pel_pixels16_12_sse4() {
ret void
}
double astro_julian_century(double jd) { return (jd - 2451545.0) / 36525.0; }


x86 assembly (clang, -O0):
<astro_julian_century>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xef2(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xede(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<astro_julian_century>:
addsd  0xef8(%rip),%xmm0
divsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @astro_julian_century(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fsub double %3, 0x4142B42C80000000
%5 = fdiv double %4, 3.652500e+04
ret double %5
}

LLVM IR (-O2):
define double @astro_julian_century(double %0) {
%2 = fadd double %0, 0xC142B42C80000000
%3 = fdiv double %2, 3.652500e+04
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void processor() {
  printf("\nMain Processor : %s\n", "PLY Powertron(tm) 23Mhz");
}


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

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

LLVM IR (-O0):
@.str = [22 x i8] c"\0AMain Processor : %s\0A\00"
@.str.1 = [24 x i8] c"PLY Powertron(tm) 23Mhz\00"
define void @processor() {
%1 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"\0AMain Processor : %s\0A\00"
@.str.1 = [24 x i8] c"PLY Powertron(tm) 23Mhz\00"
define void @processor() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int multiply(int a, int b) {
  if (a > 0)
    return multiply(a - 1, b) + b;
  if (a < 0)
    return multiply(a + 1, b) - b;
  return 0;
}


x86 assembly (clang, -O0):
<multiply>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    1141 <multiply+0x31>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
mov    -0xc(%rbp),%esi
call   1030 <multiply@plt>
add    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    116b <multiply+0x5b>
cmpl   $0x0,-0x8(%rbp)
jge    1164 <multiply+0x54>
mov    -0x8(%rbp),%edi
add    $0x1,%edi
mov    -0xc(%rbp),%esi
call   1030 <multiply@plt>
sub    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    116b <multiply+0x5b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<multiply>:
push   %rbx
mov    %esi,%ebx
test   %edi,%edi
jle    111e <multiply+0xe>
imul   %edi,%ebx
mov    %ebx,%eax
pop    %rbx
ret
xor    %eax,%eax
test   %edi,%edi
js     1126 <multiply+0x16>
pop    %rbx
ret
add    $0x1,%edi
mov    %ebx,%esi
call   1030 <multiply@plt>
sub    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @multiply(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %4
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %15
8: ; preds = %2
%9 = load i32, i32* %4
%10 = sub nsw i32 %9, 1
%11 = load i32, i32* %5
%12 = call i32 @multiply(i32 %10, i32 %11)
%13 = load i32, i32* %5
%14 = add nsw i32 %12, %13
store i32 %14, i32* %3
br label %26
15: ; preds = %2
%16 = load i32, i32* %4
%17 = icmp slt i32 %16, 0
br i1 %17, label %18, label %25
18: ; preds = %15
%19 = load i32, i32* %4
%20 = add nsw i32 %19, 1
%21 = load i32, i32* %5
%22 = call i32 @multiply(i32 %20, i32 %21)
%23 = load i32, i32* %5
%24 = sub nsw i32 %22, %23
store i32 %24, i32* %3
br label %26
25: ; preds = %15
store i32 0, i32* %3
br label %26
26: ; preds = %25, %18, %8
%27 = load i32, i32* %3
ret i32 %27
}

LLVM IR (-O2):
define i32 @multiply(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = mul i32 %1, %0
br label %8
6: ; preds = %2
%7 = icmp slt i32 %0, 0
br i1 %7, label %10, label %8
8: ; preds = %4, %6, %10
%9 = phi i32 [ %13, %10 ], [ 0, %6 ], [ %5, %4 ]
ret i32 %9
10: ; preds = %6
%11 = add nsw i32 %0, 1
%12 = tail call i32 @multiply(i32 %11, i32 %1)
%13 = sub i32 %12, %1
br label %8
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
long strtol(char *, char **, int /*<<< orphan*/);
void test6(char *array, char *endptr) {
  array[0] = ' ';
  array[1] = array[2] = 'z';
  long r = strtol(array, &endptr, 0);
  assert(array == endptr);
  assert(r == 0);
}


x86 assembly (clang, -O0):
<test6>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movb   $0x20,(%rax)
mov    -0x8(%rbp),%rax
movb   $0x7a,0x2(%rax)
mov    -0x8(%rbp),%rax
movb   $0x7a,0x1(%rax)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
xor    %edx,%edx
call   1040 <strtol@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpq   $0x0,-0x18(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test6>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    %rsi,(%rsp)
movw   $0x7a20,(%rdi)
movb   $0x7a,0x2(%rdi)
mov    %rsp,%rsi
xor    %edx,%edx
call   1040 <strtol@plt>
mov    %rax,%r14
xor    %edi,%edi
cmp    %rbx,(%rsp)
sete   %dil
call   1030 <assert@plt>
xor    %edi,%edi
test   %r14,%r14
sete   %dil
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <assert@plt>

LLVM IR (-O0):
define void @test6(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = getelementptr inbounds i8, i8* %6, i64 0
store i8 32, i8* %7
%8 = load i8*, i8** %3
%9 = getelementptr inbounds i8, i8* %8, i64 2
store i8 122, i8* %9
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i64 1
store i8 122, i8* %11
%12 = load i8*, i8** %3
%13 = call i64 @strtol(i8* %12, i8** %4, i32 0)
store i64 %13, i64* %5
%14 = load i8*, i8** %3
%15 = load i8*, i8** %4
%16 = icmp eq i8* %14, %15
%17 = zext i1 %16 to i32
%18 = call i32 @assert(i32 %17)
%19 = load i64, i64* %5
%20 = icmp eq i64 %19, 0
%21 = zext i1 %20 to i32
%22 = call i32 @assert(i32 %21)
ret void
}

LLVM IR (-O2):
define void @test6(i8* %0, i8* %1) {
%3 = alloca i8*
store i8* %1, i8** %3
store i8 32, i8* %0
%4 = getelementptr inbounds i8, i8* %0, i64 2
store i8 122, i8* %4
%5 = getelementptr inbounds i8, i8* %0, i64 1
store i8 122, i8* %5
%6 = call i64 @strtol(i8* %0, i8** %3, i32 0)
%7 = load i8*, i8** %3
%8 = icmp eq i8* %7, %0
%9 = zext i1 %8 to i32
%10 = tail call i32 @assert(i32 %9)
%11 = icmp eq i64 %6, 0
%12 = zext i1 %11 to i32
%13 = tail call i32 @assert(i32 %12)
ret void
}
/* Variables and functions */
int _rdrand64_step(unsigned long long *);
int foo(unsigned long long *x) { return _rdrand64_step(x); }


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

x86 assembly (clang, -O2):
<foo>:
jmp    1030 <_rdrand64_step@plt>

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

LLVM IR (-O2):
define i32 @foo(i64* %0) {
%2 = tail call i32 @_rdrand64_step(i64* %0)
ret i32 %2
}
void RTLdrOpen(void) {}


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

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

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

LLVM IR (-O2):
define void @RTLdrOpen() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ my_memcpy(char *, char *, size_t);
size_t my_strlen(char *);
char *copy_stack_string(uintptr_t *stack_alloc, char *string) {
  size_t length = my_strlen(string);
  *stack_alloc -= length + 1;
  char *dest = (char *)*stack_alloc;
  my_memcpy(dest, string, length + 1);
  return dest;
}


x86 assembly (clang, -O0):
<copy_stack_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <my_strlen@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdx
add    $0x1,%rdx
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
sub    %rdx,%rcx
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
add    $0x1,%rdx
call   1040 <my_memcpy@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_stack_string>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
mov    %rsi,%rdi
call   1030 <my_strlen@plt>
lea    0x1(%rax),%rdx
mov    (%r15),%rbx
sub    %rdx,%rbx
mov    %rbx,(%r15)
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <my_memcpy@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @copy_stack_string(i64* %0, i8* %1) {
%3 = alloca i64*
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i8*
store i64* %0, i64** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %4
%8 = call i64 @my_strlen(i8* %7)
store i64 %8, i64* %5
%9 = load i64, i64* %5
%10 = add i64 %9, 1
%11 = load i64*, i64** %3
%12 = load i64, i64* %11
%13 = sub i64 %12, %10
store i64 %13, i64* %11
%14 = load i64*, i64** %3
%15 = load i64, i64* %14
%16 = inttoptr i64 %15 to i8*
store i8* %16, i8** %6
%17 = load i8*, i8** %6
%18 = load i8*, i8** %4
%19 = load i64, i64* %5
%20 = add i64 %19, 1
%21 = call i32 @my_memcpy(i8* %17, i8* %18, i64 %20)
%22 = load i8*, i8** %6
ret i8* %22
}

LLVM IR (-O2):
define i8* @copy_stack_string(i64* nocapture %0, i8* %1) {
%3 = tail call i64 @my_strlen(i8* %1)
%4 = add i64 %3, 1
%5 = load i64, i64* %0
%6 = sub i64 %5, %4
store i64 %6, i64* %0
%7 = inttoptr i64 %6 to i8*
%8 = tail call i32 @my_memcpy(i8* %7, i8* %1, i64 %4)
ret i8* %7
}
/* Variables and functions */
int /*<<< orphan*/ __builtin_arm_nop();
int /*<<< orphan*/ __builtin_arm_sev();
int /*<<< orphan*/ __builtin_arm_sevl();
int /*<<< orphan*/ __builtin_arm_wfe();
int /*<<< orphan*/ __builtin_arm_wfi();
int /*<<< orphan*/ __builtin_arm_yield();
void hints() {
  __builtin_arm_nop();
  __builtin_arm_yield();
  __builtin_arm_wfe();
  __builtin_arm_wfi();
  __builtin_arm_sev();
  __builtin_arm_sevl();
}


x86 assembly (clang, -O0):
<hints>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1060 <__builtin_arm_nop@plt>
mov    $0x0,%al
call   1050 <__builtin_arm_yield@plt>
mov    $0x0,%al
call   1080 <__builtin_arm_wfe@plt>
mov    $0x0,%al
call   1070 <__builtin_arm_wfi@plt>
mov    $0x0,%al
call   1040 <__builtin_arm_sev@plt>
mov    $0x0,%al
call   1030 <__builtin_arm_sevl@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<hints>:
push   %rax
xor    %eax,%eax
call   1060 <__builtin_arm_nop@plt>
xor    %eax,%eax
call   1050 <__builtin_arm_yield@plt>
xor    %eax,%eax
call   1080 <__builtin_arm_wfe@plt>
xor    %eax,%eax
call   1070 <__builtin_arm_wfi@plt>
xor    %eax,%eax
call   1040 <__builtin_arm_sev@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <__builtin_arm_sevl@plt>

LLVM IR (-O0):
define void @hints() {
%1 = call i32 (...) @__builtin_arm_nop()
%2 = call i32 (...) @__builtin_arm_yield()
%3 = call i32 (...) @__builtin_arm_wfe()
%4 = call i32 (...) @__builtin_arm_wfi()
%5 = call i32 (...) @__builtin_arm_sev()
%6 = call i32 (...) @__builtin_arm_sevl()
ret void
}

LLVM IR (-O2):
define void @hints() {
%1 = tail call i32 (...) @__builtin_arm_nop()
%2 = tail call i32 (...) @__builtin_arm_yield()
%3 = tail call i32 (...) @__builtin_arm_wfe()
%4 = tail call i32 (...) @__builtin_arm_wfi()
%5 = tail call i32 (...) @__builtin_arm_sev()
%6 = tail call i32 (...) @__builtin_arm_sevl()
ret void
}
int xxx() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @xxx() {
ret i32 0
}
/* Variables and functions */
int evenlyDivisible();
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int result;
  result = evenlyDivisible();
  printf("%d\n", result);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @evenlyDivisible()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ g_load(int);
void dload(int n) { g_load(n); }


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

x86 assembly (clang, -O2):
<dload>:
jmp    1030 <g_load@plt>

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

LLVM IR (-O2):
define void @dload(i32 %0) {
%2 = tail call i32 @g_load(i32 %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
size_t fwrite(void const *, size_t, size_t, int /*<<< orphan*/ *);
size_t hoof_hook_fwrite(const void *ptr, size_t size, size_t nmemb,
                        FILE *stream) {
  return fwrite(ptr, size, nmemb, stream);
}


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

x86 assembly (clang, -O2):
<hoof_hook_fwrite>:
jmp    1030 <fwrite@plt>

LLVM IR (-O0):
define i64 @hoof_hook_fwrite(i8* %0, i64 %1, i64 %2, i32* %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
%8 = alloca i32*
store i8* %0, i8** %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i32* %3, i32** %8
%9 = load i8*, i8** %5
%10 = load i64, i64* %6
%11 = load i64, i64* %7
%12 = load i32*, i32** %8
%13 = call i64 @fwrite(i8* %9, i64 %10, i64 %11, i32* %12)
ret i64 %13
}

LLVM IR (-O2):
define i64 @hoof_hook_fwrite(i8* nocapture %0, i64 %1, i64 %2, i32* nocapture %3) {
%5 = tail call i64 @fwrite(i8* %0, i64 %1, i64 %2, i32* %3)
ret i64 %5
}
/* Variables and functions */
int R(int /*<<< orphan*/);
int /*<<< orphan*/ cudaFree(void *);
int Free(void *devPtr) { return R(cudaFree(devPtr)); }


x86 assembly (clang, -O0):
<Free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <cudaFree@plt>
mov    %eax,%edi
call   1030 <R@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Free>:
push   %rax
call   1040 <cudaFree@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <R@plt>

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

LLVM IR (-O2):
define i32 @Free(i8* %0) {
%2 = tail call i32 @cudaFree(i8* %0)
%3 = tail call i32 @R(i32 %2)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *);
int /*<<< orphan*/ *stderr;
int end(char *name, char *buf, int sze, void *data) {
  FILE *fp = NULL;
  if (data != NULL)
    fp = (FILE *)data;
  else
    fp = stderr;
  fprintf(fp, "\nEnd Tag:%s\n", name);
  return 0;
}


x86 assembly (clang, -O0):
<end>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
movq   $0x0,-0x28(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     1147 <end+0x37>
mov    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
jmp    1155 <end+0x45>
mov    0x2e92(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xe9c(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<end>:
push   %rax
mov    %rdi,%rdx
test   %rcx,%rcx
jne    1123 <end+0x13>
mov    0x2ec0(%rip),%rax
mov    (%rax),%rcx
lea    0xed6(%rip),%rsi
mov    %rcx,%rdi
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32* null
@.str = [13 x i8] c"\0AEnd Tag:%s\0A\00"
define i32 @end(i8* %0, i8* %1, i32 %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i32*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i8* %3, i8** %8
store i32* null, i32** %9
%10 = load i8*, i8** %8
%11 = icmp ne i8* %10, null
br i1 %11, label %12, label %15
12: ; preds = %4
%13 = load i8*, i8** %8
%14 = bitcast i8* %13 to i32*
store i32* %14, i32** %9
br label %17
15: ; preds = %4
%16 = load i32*, i32** @stderr
store i32* %16, i32** %9
br label %17
17: ; preds = %15, %12
%18 = load i32*, i32** %9
%19 = load i8*, i8** %5
%20 = call i32 @fprintf(i32* %18, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %19)
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32* null
@.str = [13 x i8] c"\0AEnd Tag:%s\0A\00"
define i32 @end(i8* %0, i8* nocapture readnone %1, i32 %2, i8* %3) {
%5 = icmp eq i8* %3, null
%6 = bitcast i8* %3 to i32*
%7 = load i32*, i32** @stderr
%8 = select i1 %5, i32* %7, i32* %6
%9 = tail call i32 @fprintf(i32* %8, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 0
}
/* Variables and functions */
char *bin(unsigned int);
int /*<<< orphan*/ printf(char *, unsigned int, char *, char *, unsigned int);
char printb(unsigned int x, char *str) {
  printf("%+8X : %s [%s (%u)]\n", x, str, bin(x), x);
}


x86 assembly (clang, -O0):
<printb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <bin@plt>
mov    -0x1c(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    %rax,%rcx
mov    -0x8(%rbp),%r8d
lea    0xea6(%rip),%rdi
call   1040 <printf@plt>
movsbl -0x1(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printb>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
call   1030 <bin@plt>
lea    0xecc(%rip),%rdi
mov    %ebp,%esi
mov    %rbx,%rdx
mov    %rax,%rcx
mov    %ebp,%r8d
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"%+8X : %s [%s (%u)]\0A\00"
define signext i8 @printb(i32 %0, i8* %1) {
%3 = alloca i8
%4 = alloca i32
%5 = alloca i8*
store i32 %0, i32* %4
store i8* %1, i8** %5
%6 = load i32, i32* %4
%7 = load i8*, i8** %5
%8 = load i32, i32* %4
%9 = call i8* @bin(i32 %8)
%10 = load i32, i32* %4
%11 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %6, i8* %7, i8* %9, i32 %10)
%12 = load i8, i8* %3
ret i8 %12
}

LLVM IR (-O2):
@.str = [21 x i8] c"%+8X : %s [%s (%u)]\0A\00"
define signext i8 @printb(i32 %0, i8* %1) {
%3 = tail call i8* @bin(i32 %0)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %0, i8* %1, i8* %3, i32 %0)
ret i8 undef
}
/* Variables and functions */
int /*<<< orphan*/ cimpl_test();
int main(int argc, const char *argv[]) {
  cimpl_test();
  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)
mov    $0x0,%al
call   1030 <cimpl_test@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <cimpl_test@plt>
xor    %eax,%eax
pop    %rcx
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 = call i32 (...) @cimpl_test()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @cimpl_test()
ret i32 0
}
void rop3_249_1_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = *D ^ S;
  stk2 = ~stk2;
  stk1 = T | stk2;
  *D = (stk1 & (~S) & (~T)) | (*D & S) | (*D & T);
}


x86 assembly (clang, -O0):
<rop3_249_1_1>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0x9(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0xc(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xc(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0xc(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
movzbl -0xa(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0xa(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_249_1_1>:
mov    (%rdi),%al
mov    %eax,%ecx
xor    %sil,%cl
or     %esi,%edx
or     %dl,%cl
not    %cl
and    %dl,%al
or     %cl,%al
mov    %al,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_249_1_1(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%9 = load i8*, i8** %4
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = load i8, i8* %5
%13 = zext i8 %12 to i32
%14 = xor i32 %11, %13
%15 = trunc i32 %14 to i8
store i8 %15, i8* %8
%16 = load i8, i8* %8
%17 = zext i8 %16 to i32
%18 = xor i32 %17, -1
%19 = trunc i32 %18 to i8
store i8 %19, i8* %8
%20 = load i8, i8* %6
%21 = zext i8 %20 to i32
%22 = load i8, i8* %8
%23 = zext i8 %22 to i32
%24 = or i32 %21, %23
%25 = trunc i32 %24 to i8
store i8 %25, i8* %7
%26 = load i8, i8* %7
%27 = zext i8 %26 to i32
%28 = load i8, i8* %5
%29 = zext i8 %28 to i32
%30 = xor i32 %29, -1
%31 = and i32 %27, %30
%32 = load i8, i8* %6
%33 = zext i8 %32 to i32
%34 = xor i32 %33, -1
%35 = and i32 %31, %34
%36 = load i8*, i8** %4
%37 = load i8, i8* %36
%38 = zext i8 %37 to i32
%39 = load i8, i8* %5
%40 = zext i8 %39 to i32
%41 = and i32 %38, %40
%42 = or i32 %35, %41
%43 = load i8*, i8** %4
%44 = load i8, i8* %43
%45 = zext i8 %44 to i32
%46 = load i8, i8* %6
%47 = zext i8 %46 to i32
%48 = and i32 %45, %47
%49 = or i32 %42, %48
%50 = trunc i32 %49 to i8
%51 = load i8*, i8** %4
store i8 %50, i8* %51
ret void
}

LLVM IR (-O2):
define void @rop3_249_1_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = xor i8 %4, %1
%6 = or i8 %2, %1
%7 = or i8 %6, %5
%8 = xor i8 %7, -1
%9 = and i8 %4, %6
%10 = or i8 %9, %8
store i8 %10, i8* %0
ret void
}
void wifi_evt_sme_connected(const struct wifi_msg_sme_connected_evt_t *msg) {}


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

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

LLVM IR (-O0):
%struct.wifi_msg_sme_connected_evt_t = type opaque
define void @wifi_evt_sme_connected(%struct.wifi_msg_sme_connected_evt_t* %0) {
%2 = alloca %struct.wifi_msg_sme_connected_evt_t*
store %struct.wifi_msg_sme_connected_evt_t* %0, %struct.wifi_msg_sme_connected_evt_t** %2
ret void
}

LLVM IR (-O2):
%struct.wifi_msg_sme_connected_evt_t = type opaque
define void @wifi_evt_sme_connected(%struct.wifi_msg_sme_connected_evt_t* nocapture %0) {
ret void
}
void gtk_tree_view_column_set_alignment() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tree_view_column_set_alignment() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *, char *, char *);
void print_version(void) {
  printf("str2hex - Data formats convertion utility.\n"
         "str2hex version: %s\n"
         "str2hex built:  %s %s\n"
         "(C) 2005 Dzmitry Plashchynski <plashchynski@gmail.com>\n",
         "0.2", "12:37:03", "Mar 15 2022");
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<print_version>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xf5b(%rip),%rsi
lea    0xf58(%rip),%rdx
lea    0xf5a(%rip),%rcx
call   1030 <printf@plt>
mov    0x2e94(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<print_version>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xf5e(%rip),%rsi
lea    0xf5b(%rip),%rdx
lea    0xf5d(%rip),%rcx
call   1030 <printf@plt>
mov    0x2e97(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [141 x i8] c"str2hex - Data formats convertion utility.\0Astr2hex version: %s\0Astr2hex built: %s %s\0A(C) 2005 Dzmitry Plashchynski <plashchynski@gmail.com>\0A\00"
@.str.1 = [4 x i8] c"0.2\00"
@.str.2 = [9 x i8] c"12:37:03\00"
@.str.3 = [12 x i8] c"Mar 15 2022\00"
@EXIT_SUCCESS = global i32 0
define void @print_version() {
%1 = call i32 @printf(i8* getelementptr inbounds ([141 x i8], [141 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0))
%2 = load i32, i32* @EXIT_SUCCESS
%3 = call i32 @exit(i32 %2)
unreachable
}

LLVM IR (-O2):
@.str = [141 x i8] c"str2hex - Data formats convertion utility.\0Astr2hex version: %s\0Astr2hex built: %s %s\0A(C) 2005 Dzmitry Plashchynski <plashchynski@gmail.com>\0A\00"
@.str.1 = [4 x i8] c"0.2\00"
@.str.2 = [9 x i8] c"12:37:03\00"
@.str.3 = [12 x i8] c"Mar 15 2022\00"
@EXIT_SUCCESS = global i32 0
define void @print_version() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([141 x i8], [141 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0))
%2 = load i32, i32* @EXIT_SUCCESS
%3 = tail call i32 @exit(i32 %2)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *, char *,
                           int);
int /*<<< orphan*/ stderr;
void bt_error_fn(const char *str, char *file, int line) {
  fprintf(stderr, "%s in file:%s, line:%d.\n", str, file, line);
  exit(0);
}


x86 assembly (clang, -O0):
<bt_error_fn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    0x2ea6(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x14(%rbp),%r8d
lea    0xeb1(%rip),%rsi
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<bt_error_fn>:
push   %rax
mov    %edx,%r8d
mov    %rsi,%rcx
mov    %rdi,%rdx
mov    0x2eaf(%rip),%rax
mov    (%rax),%edi
lea    0xec6(%rip),%rsi
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [25 x i8] c"%s in file:%s, line:%d.\0A\00"
define void @bt_error_fn(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 i32, i32* @stderr
%8 = load i8*, i8** %4
%9 = load i8*, i8** %5
%10 = load i32, i32* %6
%11 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %8, i8* %9, i32 %10)
%12 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [25 x i8] c"%s in file:%s, line:%d.\0A\00"
define void @bt_error_fn(i8* %0, i8* %1, i32 %2) {
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1, i32 %2)
%6 = tail call i32 @exit(i32 0)
unreachable
}
/* Type definitions */
struct option {
  int dummy;
};

/* Variables and functions */
int ya_getopt_internal(int, char *const *, char const *, struct option const *,
                       int *, int /*<<< orphan*/);
int ya_getopt_long(int argc, char *const argv[], const char *optstring,
                   const struct option *longopts, int *longindex) {
  return ya_getopt_internal(argc, argv, optstring, longopts, longindex, 0);
}


x86 assembly (clang, -O0):
<ya_getopt_long>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
xor    %r9d,%r9d
call   1030 <ya_getopt_internal@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ya_getopt_long>:
xor    %r9d,%r9d
jmp    1030 <ya_getopt_internal@plt>

LLVM IR (-O0):
%struct.option = type { i32 }
define i32 @ya_getopt_long(i32 %0, i8** %1, i8* %2, %struct.option* %3, i32* %4) {
%6 = alloca i32
%7 = alloca i8**
%8 = alloca i8*
%9 = alloca %struct.option*
%10 = alloca i32*
store i32 %0, i32* %6
store i8** %1, i8*** %7
store i8* %2, i8** %8
store %struct.option* %3, %struct.option** %9
store i32* %4, i32** %10
%11 = load i32, i32* %6
%12 = load i8**, i8*** %7
%13 = load i8*, i8** %8
%14 = load %struct.option*, %struct.option** %9
%15 = load i32*, i32** %10
%16 = call i32 @ya_getopt_internal(i32 %11, i8** %12, i8* %13, %struct.option* %14, i32* %15, i32 0)
ret i32 %16
}

LLVM IR (-O2):
%struct.option = type { i32 }
define i32 @ya_getopt_long(i32 %0, i8** %1, i8* %2, %struct.option* %3, i32* %4) {
%6 = tail call i32 @ya_getopt_internal(i32 %0, i8** %1, i8* %2, %struct.option* %3, i32* %4, i32 0)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ glWindowPos4f(int, int, int, int);
void glWindowPos3i(int x, int y, int z) { glWindowPos4f(x, y, z, 1); }


x86 assembly (clang, -O0):
<glWindowPos3i>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    $0x1,%ecx
call   1030 <glWindowPos4f@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<glWindowPos3i>:
mov    $0x1,%ecx
jmp    1030 <glWindowPos4f@plt>

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

LLVM IR (-O2):
define void @glWindowPos3i(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @glWindowPos4f(i32 %0, i32 %1, i32 %2, i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, int);
void myhandler(int signo) {
  printf("Test FAILED: %d seconds have elapsed and sigtimedwait() has not yet "
         "returned.\n",
         2);
  exit(1);
}


x86 assembly (clang, -O0):
<myhandler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<myhandler>:
push   %rax
lea    0xed8(%rip),%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [79 x i8] c"Test FAILED: %d seconds have elapsed and sigtimedwait() has not yet returned.\0A\00"
define void @myhandler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str, i64 0, i64 0), i32 2)
%4 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [79 x i8] c"Test FAILED: %d seconds have elapsed and sigtimedwait() has not yet returned.\0A\00"
define void @myhandler(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str, i64 0, i64 0), i32 2)
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ EVP_PKEY;
typedef int /*<<< orphan*/ BIO;

/* Variables and functions */
int /*<<< orphan*/ BIO_free(int /*<<< orphan*/ *);
int /*<<< orphan*/ *BIO_new_file(char const *, char *);
int /*<<< orphan*/
PEM_write_bio_PrivateKey(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                         int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                         int /*<<< orphan*/, int /*<<< orphan*/,
                         int /*<<< orphan*/ *);
void pki_write_privatekey(EVP_PKEY *privatekey, const char *filename) {
  BIO *bio_file = NULL;
  bio_file = BIO_new_file(filename, "w");
  PEM_write_bio_PrivateKey(bio_file, privatekey, NULL, NULL, 0, 0, NULL);
  BIO_free(bio_file);
}


x86 assembly (clang, -O0):
<pki_write_privatekey>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xead(%rip),%rsi
call   1050 <BIO_new_file@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%ecx
xor    %r9d,%r9d
mov    %rcx,%rdx
mov    %r9d,%r8d
movq   $0x0,(%rsp)
call   1040 <PEM_write_bio_PrivateKey@plt>
mov    -0x18(%rbp),%rdi
call   1030 <BIO_free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pki_write_privatekey>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rax
mov    %rdi,%r14
lea    0xebf(%rip),%rsi
mov    %rax,%rdi
call   1050 <BIO_new_file@plt>
mov    %rax,%rbx
movq   $0x0,(%rsp)
mov    %rax,%rdi
mov    %r14,%rsi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1040 <PEM_write_bio_PrivateKey@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <BIO_free@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"w\00"
define void @pki_write_privatekey(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
%5 = alloca i32*
store i32* %0, i32** %3
store i8* %1, i8** %4
store i32* null, i32** %5
%6 = load i8*, i8** %4
%7 = call i32* @BIO_new_file(i8* %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %7, i32** %5
%8 = load i32*, i32** %5
%9 = load i32*, i32** %3
%10 = call i32 @PEM_write_bio_PrivateKey(i32* %8, i32* %9, i32* null, i32* null, i32 0, i32 0, i32* null)
%11 = load i32*, i32** %5
%12 = call i32 @BIO_free(i32* %11)
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"w\00"
define void @pki_write_privatekey(i32* %0, i8* %1) {
%3 = tail call i32* @BIO_new_file(i8* %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @PEM_write_bio_PrivateKey(i32* %3, i32* %0, i32* null, i32* null, i32 0, i32 0, i32* null)
%5 = tail call i32 @BIO_free(i32* %3)
ret void
}
int isSpace(char c) {
  return (c == ' ' || c == '\t' || c == '\r' || c == '\n');
}


x86 assembly (clang, -O0):
<isSpace>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x2(%rbp)
je     114d <isSpace+0x4d>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x9,%ecx
mov    %al,-0x2(%rbp)
je     114d <isSpace+0x4d>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0xd,%ecx
mov    %al,-0x2(%rbp)
je     114d <isSpace+0x4d>
movsbl -0x1(%rbp),%eax
cmp    $0xa,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isSpace>:
cmp    $0x20,%dil
ja     1120 <isSpace+0x20>
mov    $0x1,%eax
movzbl %dil,%ecx
movabs $0x100002200,%rdx
bt     %rcx,%rdx
jae    1120 <isSpace+0x20>
ret
xor    %eax,%eax
cmp    $0xa,%dil
sete   %al
ret

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

LLVM IR (-O2):
define i32 @isSpace(i8 signext %0) {
switch i8 %0, label %2 [
i8 32, label %5
i8 13, label %5
i8 9, label %5
]
2: ; preds = %1
%3 = icmp eq i8 %0, 10
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %6
}
/* Type definitions */
typedef char *uint32_t;

/* Variables and functions */
__attribute__((always_)) uint32_t __attribute__((const))
OF_BSWAP32_NONCONST(uint32_t i) {
  __asm__("bswap  %0" : "=q"(i) : "0"(i));
  return i;
}


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

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

LLVM IR (-O0):
define i8* @OF_BSWAP32_NONCONST(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* asm "bswap $0", "=q,0,~{dirflag},~{fpsr},~{flags}"(i8* %3)
store i8* %4, i8** %2
%5 = load i8*, i8** %2
ret i8* %5
}

LLVM IR (-O2):
define i8* @OF_BSWAP32_NONCONST(i8* readnone %0) {
%2 = tail call i8* asm "bswap $0", "=q,0,~{dirflag},~{fpsr},~{flags}"(i8* %0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ fatal(char *, char *);
void out_of_memory() { fatal("Out of memory", ""); }


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

x86 assembly (clang, -O2):
<out_of_memory>:
lea    0xee9(%rip),%rdi
lea    0xeef(%rip),%rsi
jmp    1030 <fatal@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"Out of memory\00"
@.str.1 = [1 x i8] zeroinitializer
define void @out_of_memory() {
%1 = call i32 @fatal(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"Out of memory\00"
@.str.1 = [1 x i8] zeroinitializer
define void @out_of_memory() {
%1 = tail call i32 @fatal(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
ret void
}