xunge/DecIR huggingface dataset:
void rop3_254_0_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = T | S;
  stk1 = *D | stk2;
  *D = stk1;
}


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

x86 assembly (clang, -O2):
<rop3_254_0_0>:
or     %edx,%esi
or     %sil,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_254_0_0(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* %6
%10 = zext i8 %9 to i32
%11 = load i8, i8* %5
%12 = zext i8 %11 to i32
%13 = or i32 %10, %12
%14 = trunc i32 %13 to i8
store i8 %14, i8* %8
%15 = load i8*, i8** %4
%16 = load i8, i8* %15
%17 = zext i8 %16 to i32
%18 = load i8, i8* %8
%19 = zext i8 %18 to i32
%20 = or i32 %17, %19
%21 = trunc i32 %20 to i8
store i8 %21, i8* %7
%22 = load i8, i8* %7
%23 = load i8*, i8** %4
store i8 %22, i8* %23
ret void
}

LLVM IR (-O2):
define void @rop3_254_0_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = or i8 %2, %1
%5 = load i8, i8* %0
%6 = or i8 %4, %5
store i8 %6, i8* %0
ret void
}
void g_cclosure_marshal_STRING__OBJECT_POINTER() {}


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

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

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

LLVM IR (-O2):
define void @g_cclosure_marshal_STRING__OBJECT_POINTER() {
ret void
}
int f(int a, int c) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @f(i32 %0, i32 %1) {
ret i32 0
}
/* Variables and functions */
void *calloc(size_t, size_t);
void *cdf_calloc(const char *file __attribute__((__unused__)),
                 size_t line __attribute__((__unused__)), size_t n, size_t u) {
  ;
  return calloc(n, u);
}


x86 assembly (clang, -O0):
<cdf_calloc>:
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    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1030 <calloc@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cdf_calloc>:
mov    %rdx,%rdi
mov    %rcx,%rsi
jmp    1030 <calloc@plt>

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

LLVM IR (-O2):
define noalias i8* @cdf_calloc(i8* nocapture readnone %0, i64 %1, i64 %2, i64 %3) {
%5 = tail call i8* @calloc(i64 %2, i64 %3)
ret i8* %5
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
uint64_t ToLE64(uint64_t value) { return value; }


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

x86 assembly (clang, -O2):
<ToLE64>:
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @ToLE64(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ assert_int_equal(int /*<<< orphan*/, int);
int /*<<< orphan*/ ne_occluded_fill(int, int);
void ne_occluded_fill_test(void **state) {
  assert_int_equal(ne_occluded_fill(0x0000000010040100ul, 0x00FFFFFFFFFFFF00ul),
                   0x00E070381C060100ul);
}


x86 assembly (clang, -O0):
<ne_occluded_fill_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x10040100,%edi
mov    $0xffffff00,%esi
call   1040 <ne_occluded_fill@plt>
mov    %eax,%edi
mov    $0x1c060100,%esi
call   1030 <assert_int_equal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ne_occluded_fill_test>:
push   %rax
mov    $0x10040100,%edi
mov    $0xffffff00,%esi
call   1040 <ne_occluded_fill@plt>
mov    %eax,%edi
mov    $0x1c060100,%esi
pop    %rax
jmp    1030 <assert_int_equal@plt>

LLVM IR (-O0):
define void @ne_occluded_fill_test(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = call i32 @ne_occluded_fill(i32 268697856, i32 -256)
%4 = call i32 @assert_int_equal(i32 %3, i32 470155520)
ret void
}

LLVM IR (-O2):
define void @ne_occluded_fill_test(i8** nocapture readnone %0) {
%2 = tail call i32 @ne_occluded_fill(i32 268697856, i32 -256)
%3 = tail call i32 @assert_int_equal(i32 %2, i32 470155520)
ret void
}
void of_delete_node(struct device_node *node) {}


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

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

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

LLVM IR (-O2):
%struct.device_node = type opaque
define void @of_delete_node(%struct.device_node* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
void local_server_destroy(int fd) { close(fd); }


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

x86 assembly (clang, -O2):
<local_server_destroy>:
jmp    1030 <close@plt>

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

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

/* Variables and functions */
int /*<<< orphan*/ eeprom_write_byte(int /*<<< orphan*/ *, int /*<<< orphan*/);
void eeprom_update_byte(uint8_t *addr, uint8_t value) {
  eeprom_write_byte(addr, value);
}


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

x86 assembly (clang, -O2):
<eeprom_update_byte>:
jmp    1030 <eeprom_write_byte@plt>

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

LLVM IR (-O2):
define void @eeprom_update_byte(i32* %0, i32 %1) {
%3 = tail call i32 @eeprom_write_byte(i32* %0, i32 %1)
ret void
}
int calcbufsize(int rate, int chans, int bits) {
  int size1 = (rate * chans * bits / 8 * 10) / 1000;
  int size2 = (((size1) + 0x3ff) & ~0x3ff);
  return (size2);
}


x86 assembly (clang, -O0):
<calcbufsize>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x8(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
imul   $0xa,%eax,%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x3ff,%eax
and    $0xfffffc00,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<calcbufsize>:
imul   %esi,%edi
imul   %edx,%edi
movslq %edi,%rax
imul   $0x51eb851f,%rax,%rax
mov    %rax,%rcx
sar    $0x28,%rcx
shr    $0x3f,%rax
add    %ecx,%eax
add    $0x3ff,%eax
and    $0xfffffc00,%eax
ret

LLVM IR (-O0):
define i32 @calcbufsize(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%9 = load i32, i32* %4
%10 = load i32, i32* %5
%11 = mul nsw i32 %9, %10
%12 = load i32, i32* %6
%13 = mul nsw i32 %11, %12
%14 = sdiv i32 %13, 8
%15 = mul nsw i32 %14, 10
%16 = sdiv i32 %15, 1000
store i32 %16, i32* %7
%17 = load i32, i32* %7
%18 = add nsw i32 %17, 1023
%19 = and i32 %18, -1024
store i32 %19, i32* %8
%20 = load i32, i32* %8
ret i32 %20
}

LLVM IR (-O2):
define i32 @calcbufsize(i32 %0, i32 %1, i32 %2) {
%4 = mul nsw i32 %1, %0
%5 = mul nsw i32 %4, %2
%6 = sdiv i32 %5, 800
%7 = add nsw i32 %6, 1023
%8 = and i32 %7, -1024
ret i32 %8
}
void help_unload(void) {}


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

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

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

LLVM IR (-O2):
define void @help_unload() {
ret void
}
struct dir_i2c_t *get_dir0(void) {
  static struct dir_i2c_t *dir0 = (struct dir_i2c_t *)(0x3F205000UL);
  return dir0;
}


x86 assembly (clang, -O0):
<get_dir0>:
push   %rbp
mov    %rsp,%rbp
mov    0x2f15(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.dir_i2c_t = type opaque
@get_dir0.dir0 = internal global %struct.dir_i2c_t* inttoptr (i64 1059082240 to %struct.dir_i2c_t*)
define %struct.dir_i2c_t* @get_dir0() {
%1 = load %struct.dir_i2c_t*, %struct.dir_i2c_t** @get_dir0.dir0
ret %struct.dir_i2c_t* %1
}

LLVM IR (-O2):
%struct.dir_i2c_t = type opaque
define %struct.dir_i2c_t* @get_dir0() {
ret %struct.dir_i2c_t* inttoptr (i64 1059082240 to %struct.dir_i2c_t*)
}
/* Type definitions */
struct sockaddr {
  int dummy;
};

/* Variables and functions */
int machdep_sys_recvfrom(int, void *, int, int, struct sockaddr *,
                         int /*<<< orphan*/);
machdep_sys_recv(int s, void *buf, int len, int flags) {
  return (machdep_sys_recvfrom(s, buf, len, flags, (struct sockaddr *)NULL, 0));
}


x86 assembly (clang, -O0):
<machdep_sys_recv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
xor    %eax,%eax
mov    %eax,%r8d
xor    %r9d,%r9d
call   1030 <machdep_sys_recvfrom@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<machdep_sys_recv>:
xor    %r8d,%r8d
xor    %r9d,%r9d
jmp    1030 <machdep_sys_recvfrom@plt>

LLVM IR (-O0):
%struct.sockaddr = type { i32 }
define i32 @machdep_sys_recv(i32 %0, i8* %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = load i8*, i8** %6
%11 = load i32, i32* %7
%12 = load i32, i32* %8
%13 = call i32 @machdep_sys_recvfrom(i32 %9, i8* %10, i32 %11, i32 %12, %struct.sockaddr* null, i32 0)
ret i32 %13
}

LLVM IR (-O2):
%struct.sockaddr = type { i32 }
define i32 @machdep_sys_recv(i32 %0, i8* %1, i32 %2, i32 %3) {
%5 = tail call i32 @machdep_sys_recvfrom(i32 %0, i8* %1, i32 %2, i32 %3, %struct.sockaddr* null, i32 0)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ MIPS_CLEAR_BIT(int, int);
void xburst_cgm_ungate_otg1() { MIPS_CLEAR_BIT((0xB0000000 + 0x28), 8); }


x86 assembly (clang, -O0):
<xburst_cgm_ungate_otg1>:
push   %rbp
mov    %rsp,%rbp
mov    $0xb0000028,%edi
mov    $0x8,%esi
call   1030 <MIPS_CLEAR_BIT@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<xburst_cgm_ungate_otg1>:
mov    $0xb0000028,%edi
mov    $0x8,%esi
jmp    1030 <MIPS_CLEAR_BIT@plt>

LLVM IR (-O0):
define void @xburst_cgm_ungate_otg1() {
%1 = call i32 @MIPS_CLEAR_BIT(i32 -1342177240, i32 8)
ret void
}

LLVM IR (-O2):
define void @xburst_cgm_ungate_otg1() {
%1 = tail call i32 @MIPS_CLEAR_BIT(i32 -1342177240, i32 8)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test();
int main() { test(); }


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <test@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @test()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test()
ret i32 0
}
/* Variables and functions */
float exponentialIn(int, float, float);
float exponentialOut(float fraction, float start, float delta) {
  return exponentialIn(1 - fraction, start + delta, -delta);
}


x86 assembly (clang, -O0):
<exponentialOut>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  0xed1(%rip),%xmm0
subss  -0x4(%rbp),%xmm0
cvttss2si %xmm0,%edi
movss  -0x8(%rbp),%xmm0
addss  -0xc(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
call   1030 <exponentialIn@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exponentialOut>:
movss  0xee8(%rip),%xmm3
subss  %xmm0,%xmm3
cvttss2si %xmm3,%edi
movaps %xmm1,%xmm0
addss  %xmm2,%xmm0
xorps  0xee2(%rip),%xmm2
movaps %xmm2,%xmm1
jmp    1030 <exponentialIn@plt>

LLVM IR (-O0):
define float @exponentialOut(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%7 = load float, float* %4
%8 = fsub float 1.000000e+00, %7
%9 = fptosi float %8 to i32
%10 = load float, float* %5
%11 = load float, float* %6
%12 = fadd float %10, %11
%13 = load float, float* %6
%14 = fneg float %13
%15 = call float @exponentialIn(i32 %9, float %12, float %14)
ret float %15
}

LLVM IR (-O2):
define float @exponentialOut(float %0, float %1, float %2) {
%4 = fsub float 1.000000e+00, %0
%5 = fptosi float %4 to i32
%6 = fadd float %1, %2
%7 = fneg float %2
%8 = tail call float @exponentialIn(i32 %5, float %6, float %7)
ret float %8
}
/* Variables and functions */
scalar_t__ memcmp(float const *, unsigned char const *, int);
int is_mv_float(const float *f) {
  const unsigned char u[sizeof(float)] = {0xFF, 0xFF, 0xFF, 0xFF};
  return (memcmp(f, u, sizeof(float)) == 0);
}


x86 assembly (clang, -O0):
<is_mv_float>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0xede(%rip),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x4,%edx
call   1030 <memcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_mv_float>:
push   %rax
movl   $0xffffffff,0x4(%rsp)
ff
lea    0x4(%rsp),%rsi
mov    $0x4,%edx
call   1030 <memcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@__const.is_mv_float.u = [4 x i8] c"\FF\FF\FF\FF"
define i32 @is_mv_float(float* %0) {
%2 = alloca float*
%3 = alloca [4 x i8]
store float* %0, float** %2
%4 = bitcast [4 x i8]* %3 to i8*
%5 = load float*, float** %2
%6 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 0
%7 = call i64 @memcmp(float* %5, i8* %6, i32 4)
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @is_mv_float(float* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 -1, i32* %2
%4 = call i64 @memcmp(float* %0, i8* %3, i32 4)
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int pigpio_command(int, int, unsigned int, unsigned int, int);
int set_glitch_filter(int pi, unsigned user_gpio, unsigned steady) {
  return pigpio_command(pi, 97, user_gpio, steady, 1);
}


x86 assembly (clang, -O0):
<set_glitch_filter>:
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),%edx
mov    -0xc(%rbp),%ecx
mov    $0x61,%esi
mov    $0x1,%r8d
call   1030 <pigpio_command@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_glitch_filter>:
mov    %edx,%ecx
mov    %esi,%edx
mov    $0x61,%esi
mov    $0x1,%r8d
jmp    1030 <pigpio_command@plt>

LLVM IR (-O0):
define i32 @set_glitch_filter(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 @pigpio_command(i32 %7, i32 97, i32 %8, i32 %9, i32 1)
ret i32 %10
}

LLVM IR (-O2):
define i32 @set_glitch_filter(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @pigpio_command(i32 %0, i32 97, i32 %1, i32 %2, i32 1)
ret i32 %4
}
void set_data(unsigned char p_data[4][4]) {
  unsigned int i, j, ii = 0;
  for (i = 0; i < 4; i++)
    for (j = 0; j < 4; j++, ii++)
      p_data[j][i] = (ii << 4) | ii;
}


x86 assembly (clang, -O0):
<set_data>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x4,-0xc(%rbp)
jae    117a <set_data+0x7a>
movl   $0x0,-0x10(%rbp)
cmpl   $0x4,-0x10(%rbp)
jae    1167 <set_data+0x67>
mov    -0x14(%rbp),%eax
shl    $0x4,%eax
or     -0x14(%rbp),%eax
mov    %al,%dl
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
shl    $0x2,%rcx
add    %rcx,%rax
mov    -0xc(%rbp),%ecx
mov    %dl,(%rax,%rcx,1)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1127 <set_data+0x27>
jmp    116c <set_data+0x6c>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1116 <set_data+0x16>
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_data>:
movaps 0xef9(%rip),%xmm0
movups %xmm0,(%rdi)
ret

LLVM IR (-O0):
define void @set_data([4 x i8]* %0) {
%2 = alloca [4 x i8]*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store [4 x i8]* %0, [4 x i8]** %2
store i32 0, i32* %5
store i32 0, i32* %3
br label %6
6: ; preds = %32, %1
%7 = load i32, i32* %3
%8 = icmp ult i32 %7, 4
br i1 %8, label %9, label %35
9: ; preds = %6
store i32 0, i32* %4
br label %10
10: ; preds = %26, %9
%11 = load i32, i32* %4
%12 = icmp ult i32 %11, 4
br i1 %12, label %13, label %31
13: ; preds = %10
%14 = load i32, i32* %5
%15 = shl i32 %14, 4
%16 = load i32, i32* %5
%17 = or i32 %15, %16
%18 = trunc i32 %17 to i8
%19 = load [4 x i8]*, [4 x i8]** %2
%20 = load i32, i32* %4
%21 = zext i32 %20 to i64
%22 = getelementptr inbounds [4 x i8], [4 x i8]* %19, i64 %21
%23 = load i32, i32* %3
%24 = zext i32 %23 to i64
%25 = getelementptr inbounds [4 x i8], [4 x i8]* %22, i64 0, i64 %24
store i8 %18, i8* %25
br label %26
26: ; preds = %13
%27 = load i32, i32* %4
%28 = add i32 %27, 1
store i32 %28, i32* %4
%29 = load i32, i32* %5
%30 = add i32 %29, 1
store i32 %30, i32* %5
br label %10
31: ; preds = %10
br label %32
32: ; preds = %31
%33 = load i32, i32* %3
%34 = add i32 %33, 1
store i32 %34, i32* %3
br label %6
35: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @set_data([4 x i8]* nocapture writeonly %0) {
%2 = bitcast [4 x i8]* %0 to <16 x i8>*
store <16 x i8> <i8 0, i8 68, i8 -120, i8 -52, i8 17, i8 85, i8 -103, i8 -35, i8 34, i8 102, i8 -86, i8 -18, i8 51, i8 119, i8 -69, i8 -1>, <16 x i8>* %2
ret void
}
void fun_call(long l) {
  *(long *)(0x100000208) = l;
  return;
}


x86 assembly (clang, -O0):
<fun_call>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
movabs $0x100000208,%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun_call>:
movabs $0x100000208,%rax
mov    %rdi,(%rax)
ret

LLVM IR (-O0):
define void @fun_call(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
store i64 %3, i64* inttoptr (i64 4294967816 to i64*)
ret void
}

LLVM IR (-O2):
define void @fun_call(i64 %0) {
store i64 %0, i64* inttoptr (i64 4294967816 to i64*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __svgalib_driver8p_getbox(int, int, int, int, void *, int);
void __svgalib_driver16p_getbox(int x, int y, int w, int h, void *b, int bw) {
  __svgalib_driver8p_getbox(x * 2, y, w * 2, h, b, bw * 2);
}


x86 assembly (clang, -O0):
<__svgalib_driver16p_getbox>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9d,-0x1c(%rbp)
mov    -0x4(%rbp),%edi
shl    $0x1,%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
shl    $0x1,%edx
mov    -0x10(%rbp),%ecx
mov    -0x18(%rbp),%r8
mov    -0x1c(%rbp),%r9d
shl    $0x1,%r9d
call   1030 <__svgalib_driver8p_getbox@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__svgalib_driver16p_getbox>:
add    %edi,%edi
add    %edx,%edx
add    %r9d,%r9d
jmp    1030 <__svgalib_driver8p_getbox@plt>

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

LLVM IR (-O2):
define void @__svgalib_driver16p_getbox(i32 %0, i32 %1, i32 %2, i32 %3, i8* %4, i32 %5) {
%7 = shl nsw i32 %0, 1
%8 = shl nsw i32 %2, 1
%9 = shl nsw i32 %5, 1
%10 = tail call i32 @__svgalib_driver8p_getbox(i32 %7, i32 %1, i32 %8, i32 %3, i8* %4, i32 %9)
ret void
}
int verify_benchmark(int res __attribute((unused))) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @verify_benchmark(i32 %0) {
ret i32 -1
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ _mm_and_si128(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ _mm_andnot_si128(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ _mm_or_si128(int /*<<< orphan*/, int /*<<< orphan*/);
__m128i _mm_blendv_si128(__m128i x, __m128i y, __m128i mask) {
  return _mm_or_si128(_mm_andnot_si128(mask, x), _mm_and_si128(mask, y));
}


x86 assembly (clang, -O0):
<_mm_blendv_si128>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x4(%rbp),%esi
call   1040 <_mm_andnot_si128@plt>
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1050 <_mm_and_si128@plt>
mov    -0x10(%rbp),%edi
mov    %eax,%esi
call   1030 <_mm_or_si128@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_mm_blendv_si128>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebx
mov    %esi,%r14d
mov    %edi,%esi
mov    %edx,%edi
call   1040 <_mm_andnot_si128@plt>
mov    %eax,%ebp
mov    %ebx,%edi
mov    %r14d,%esi
call   1050 <_mm_and_si128@plt>
mov    %ebp,%edi
mov    %eax,%esi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <_mm_or_si128@plt>

LLVM IR (-O0):
define i32 @_mm_blendv_si128(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* %6
%8 = load i32, i32* %4
%9 = call i32 @_mm_andnot_si128(i32 %7, i32 %8)
%10 = load i32, i32* %6
%11 = load i32, i32* %5
%12 = call i32 @_mm_and_si128(i32 %10, i32 %11)
%13 = call i32 @_mm_or_si128(i32 %9, i32 %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @_mm_blendv_si128(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @_mm_andnot_si128(i32 %2, i32 %0)
%5 = tail call i32 @_mm_and_si128(i32 %2, i32 %1)
%6 = tail call i32 @_mm_or_si128(i32 %4, i32 %5)
ret i32 %6
}
/* Variables and functions */
double __ocml_exp10_f64(double);
double exp10(double x) { return __ocml_exp10_f64(x); }


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

x86 assembly (clang, -O2):
<exp10>:
jmp    1030 <__ocml_exp10_f64@plt>

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

LLVM IR (-O2):
define double @exp10(double %0) {
%2 = tail call double @__ocml_exp10_f64(double %0)
ret double %2
}
void RTPathJoinEx(void) {}


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

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

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

LLVM IR (-O2):
define void @RTPathJoinEx() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
void side_channel() {
  system("insmod /home/debian/attack/root-kit/simple-rootkit.ko");
}


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

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

LLVM IR (-O0):
@.str = [54 x i8] c"insmod /home/debian/attack/root-kit/simple-rootkit.ko\00"
define void @side_channel() {
%1 = call i32 @system(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [54 x i8] c"insmod /home/debian/attack/root-kit/simple-rootkit.ko\00"
define void @side_channel() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
char *strchr(char const *, int);
int type(const char *optstr, int c) {
  const char *s;
  if (!(s = strchr(optstr, c)))
    return 0;
  return *++s == ':' ? 2 : 1;
}


x86 assembly (clang, -O0):
<type>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <strchr@plt>
mov    %rax,-0x20(%rbp)
cmp    $0x0,%rax
jne    1145 <type+0x35>
movl   $0x0,-0x4(%rbp)
jmp    116b <type+0x5b>
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x20(%rbp)
movsbl 0x1(%rax),%edx
mov    $0x1,%eax
mov    $0x2,%ecx
cmp    $0x3a,%edx
cmove  %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<type>:
push   %rax
call   1030 <strchr@plt>
test   %rax,%rax
je     112c <type+0x1c>
mov    %rax,%rcx
xor    %eax,%eax
cmpb   $0x3a,0x1(%rcx)
sete   %al
add    $0x1,%eax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @type(i8* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
store i8* %0, i8** %4
store i32 %1, i32* %5
%7 = load i8*, i8** %4
%8 = load i32, i32* %5
%9 = call i8* @strchr(i8* %7, i32 %8)
store i8* %9, i8** %6
%10 = icmp ne i8* %9, null
br i1 %10, label %12, label %11
11: ; preds = %2
store i32 0, i32* %3
br label %20
12: ; preds = %2
%13 = load i8*, i8** %6
%14 = getelementptr inbounds i8, i8* %13, i32 1
store i8* %14, i8** %6
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = icmp eq i32 %16, 58
%18 = zext i1 %17 to i64
%19 = select i1 %17, i32 2, i32 1
store i32 %19, i32* %3
br label %20
20: ; preds = %12, %11
%21 = load i32, i32* %3
ret i32 %21
}

LLVM IR (-O2):
define i32 @type(i8* %0, i32 %1) {
%3 = tail call i8* @strchr(i8* dereferenceable(1) %0, i32 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %10, label %5
5: ; preds = %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 58
%9 = select i1 %8, i32 2, i32 1
br label %10
10: ; preds = %2, %5
%11 = phi i32 [ %9, %5 ], [ 0, %2 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ Inst_Printf(char *, char *, char *);
int /*<<< orphan*/ Label_Printf(char *, char *, int);
void Dico_String(int str_no, char *asciiz) {
  Label_Printf("%s%d:", ".LC", str_no);
  Inst_Printf(".asciz", "%s", asciiz);
}


x86 assembly (clang, -O0):
<Dico_String>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edx
lea    0xec7(%rip),%rdi
lea    0xec6(%rip),%rsi
call   1040 <Label_Printf@plt>
mov    -0x10(%rbp),%rdx
lea    0xeba(%rip),%rdi
lea    0xeba(%rip),%rsi
call   1030 <Inst_Printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Dico_String>:
push   %rbx
mov    %rsi,%rbx
mov    %edi,%edx
lea    0xed3(%rip),%rdi
lea    0xed2(%rip),%rsi
call   1040 <Label_Printf@plt>
lea    0xeca(%rip),%rdi
lea    0xeca(%rip),%rsi
mov    %rbx,%rdx
pop    %rbx
jmp    1030 <Inst_Printf@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"%s%d:\00"
@.str.1 = [4 x i8] c".LC\00"
@.str.2 = [7 x i8] c".asciz\00"
@.str.3 = [3 x i8] c"%s\00"
define void @Dico_String(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = call i32 @Label_Printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %5)
%7 = load i8*, i8** %4
%8 = call i32 @Inst_Printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %7)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"%s%d:\00"
@.str.1 = [4 x i8] c".LC\00"
@.str.2 = [7 x i8] c".asciz\00"
@.str.3 = [3 x i8] c"%s\00"
define void @Dico_String(i32 %0, i8* %1) {
%3 = tail call i32 @Label_Printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %0)
%4 = tail call i32 @Inst_Printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %1)
ret void
}
/* Variables and functions */
scalar_t__ getpid();
int rand();
int /*<<< orphan*/ srand(unsigned int);
scalar_t__ time(int /*<<< orphan*/ *);
char get_rand() {
  char letter;
  srand((unsigned)(getpid() + time(NULL)));
  letter = (char)((rand() % 26) + 'A');
  return letter;
}


x86 assembly (clang, -O0):
<get_rand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %rax,-0x10(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1050 <time@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
add    %rcx,%rax
mov    %eax,%edi
call   1040 <srand@plt>
mov    $0x0,%al
call   1060 <rand@plt>
mov    $0x1a,%ecx
cltd
idiv   %ecx
add    $0x41,%edx
mov    %dl,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_rand>:
push   %rbx
xor    %eax,%eax
call   1030 <getpid@plt>
mov    %rax,%rbx
xor    %edi,%edi
call   1050 <time@plt>
add    %eax,%ebx
mov    %ebx,%edi
call   1040 <srand@plt>
xor    %eax,%eax
call   1060 <rand@plt>
cltq
imul   $0x4ec4ec4f,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x23,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,4),%edx
lea    (%rdx,%rdx,4),%edx
add    %ecx,%edx
sub    %edx,%eax
add    $0x41,%al
pop    %rbx
ret

LLVM IR (-O0):
define signext i8 @get_rand() {
%1 = alloca i8
%2 = call i64 (...) @getpid()
%3 = call i64 @time(i32* null)
%4 = add nsw i64 %2, %3
%5 = trunc i64 %4 to i32
%6 = call i32 @srand(i32 %5)
%7 = call i32 (...) @rand()
%8 = srem i32 %7, 26
%9 = add nsw i32 %8, 65
%10 = trunc i32 %9 to i8
store i8 %10, i8* %1
%11 = load i8, i8* %1
ret i8 %11
}

LLVM IR (-O2):
define signext i8 @get_rand() {
%1 = tail call i64 (...) @getpid()
%2 = tail call i64 @time(i32* null)
%3 = add nsw i64 %2, %1
%4 = trunc i64 %3 to i32
%5 = tail call i32 @srand(i32 %4)
%6 = tail call i32 (...) @rand()
%7 = srem i32 %6, 26
%8 = trunc i32 %7 to i8
%9 = add nsw i8 %8, 65
ret i8 %9
}
/* Variables and functions */
int /*<<< orphan*/ escape(char *, char *);
int /*<<< orphan*/ puts(char *);
int main() {
  char dest[100];
  escape("abhijith\treddy\n\n", dest);
  puts(dest);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rsi
lea    0xec6(%rip),%rdi
call   1040 <escape@plt>
lea    -0x70(%rbp),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x70,%rsp
lea    0xed4(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1040 <escape@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"abhijith\09reddy\0A\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [100 x i8]
store i32 0, i32* %1
%3 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%4 = call i32 @escape(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%6 = call i32 @puts(i8* %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"abhijith\09reddy\0A\0A\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%3 = call i32 @escape(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i32 @puts(i8* %2)
ret i32 0
}
void INI_Rename_fstr_ctx() { ; }


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

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

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

LLVM IR (-O2):
define void @INI_Rename_fstr_ctx() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ol(char *);
void swap(void) { ol("ex\tde,hl"); }


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

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

LLVM IR (-O0):
@.str = [9 x i8] c"ex\09de,hl\00"
define void @swap() {
%1 = call i32 @ol(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"ex\09de,hl\00"
define void @swap() {
%1 = tail call i32 @ol(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *);
void validate_usage(int argc, int count, char *usage, char *argv0) {
  if (argc != count) {
    printf(usage, argv0);
    exit(1);
  }
}


x86 assembly (clang, -O0):
<validate_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
je     1159 <validate_usage+0x39>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<validate_usage>:
cmp    %esi,%edi
jne    1125 <validate_usage+0x5>
ret
push   %rax
mov    %rdx,%rdi
mov    %rcx,%rsi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @validate_usage(i32 %0, i32 %1, i8* %2, i8* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
store i32 %0, i32* %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = icmp ne i32 %9, %10
br i1 %11, label %12, label %17
12: ; preds = %4
%13 = load i8*, i8** %7
%14 = load i8*, i8** %8
%15 = call i32 @printf(i8* %13, i8* %14)
%16 = call i32 @exit(i32 1)
unreachable
17: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @validate_usage(i32 %0, i32 %1, i8* %2, i8* %3) {
%5 = icmp eq i32 %0, %1
br i1 %5, label %9, label %6
6: ; preds = %4
%7 = tail call i32 @printf(i8* %2, i8* %3)
%8 = tail call i32 @exit(i32 1)
unreachable
9: ; preds = %4
ret void
}
/* Type definitions */
struct sockaddr {
  int dummy;
};
typedef int /*<<< orphan*/ socklen_t;

/* Variables and functions */
int bind(int, struct sockaddr const *, int /*<<< orphan*/);
int ab_bind(int sockfd, const struct sockaddr *addr, socklen_t addrlen) {
  return bind(sockfd, addr, addrlen);
}


x86 assembly (clang, -O0):
<ab_bind>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <bind@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ab_bind>:
jmp    1030 <bind@plt>

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

LLVM IR (-O2):
%struct.sockaddr = type { i32 }
define i32 @ab_bind(i32 %0, %struct.sockaddr* %1, i32 %2) {
%4 = tail call i32 @bind(i32 %0, %struct.sockaddr* %1, i32 %2)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ sigset_t;

/* Variables and functions */
int ENOSYS;
int pthread_sigmask(int how, const sigset_t *set, sigset_t *oset) {
  return -ENOSYS;
}


x86 assembly (clang, -O0):
<pthread_sigmask>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
xor    %eax,%eax
mov    0x2ed0(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pthread_sigmask>:
mov    0x2ee1(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
define i32 @pthread_sigmask(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* @ENOSYS
%8 = sub nsw i32 0, %7
ret i32 %8
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @pthread_sigmask(i32 %0, i32* nocapture readnone %1, i32* nocapture readnone %2) {
%4 = load i32, i32* @ENOSYS
%5 = sub nsw i32 0, %4
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
extern void shmem_fence(void) { printf("\nOpenSHMEM Analyzer\n"); }


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

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

LLVM IR (-O0):
@.str = [21 x i8] c"\0AOpenSHMEM Analyzer\0A\00"
define void @shmem_fence() {
%1 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [20 x i8] c"\0AOpenSHMEM Analyzer\00"
define void @shmem_fence() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint32_t;

/* Variables and functions */
uint32_t load_bigendian_32(const uint8_t *x) {
  return (uint32_t)(x[3]) | (((uint32_t)(x[2])) << 8) |
         (((uint32_t)(x[1])) << 16) | (((uint32_t)(x[0])) << 24);
}


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

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

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

LLVM IR (-O2):
define i32 @load_bigendian_32(i64* nocapture %0) {
%2 = getelementptr inbounds i64, i64* %0, i64 3
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
%5 = getelementptr inbounds i64, i64* %0, i64 2
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
%8 = shl i32 %7, 8
%9 = or i32 %8, %4
%10 = getelementptr inbounds i64, i64* %0, i64 1
%11 = load i64, i64* %10
%12 = trunc i64 %11 to i32
%13 = shl i32 %12, 16
%14 = or i32 %9, %13
%15 = load i64, i64* %0
%16 = trunc i64 %15 to i32
%17 = shl i32 %16, 24
%18 = or i32 %14, %17
ret i32 %18
}
unsigned long _yy_map_hash_callback_default(const void *key) {
  return (unsigned long)key;
}


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

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

LLVM IR (-O0):
define i64 @_yy_map_hash_callback_default(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = ptrtoint i8* %3 to i64
ret i64 %4
}

LLVM IR (-O2):
define i64 @_yy_map_hash_callback_default(i8* %0) {
%2 = ptrtoint i8* %0 to i64
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0x54() {
  Assert_real((isxdigit(84) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isxdigit.c",
              425, ("isxdigit should be 0 for T"));
}


x86 assembly (clang, -O0):
<t_isxdigit_0x54>:
push   %rbp
mov    %rsp,%rbp
mov    $0x54,%edi
call   1030 <isxdigit@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x1a9,%edx
lea    0xf5c(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isxdigit_0x54>:
push   %rax
mov    $0x54,%edi
call   1030 <isxdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x1a9,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isxdigit.c\00"
@.str.1 = [27 x i8] c"isxdigit should be 0 for T\00"
define void @t_isxdigit_0x54() {
%1 = call i64 @isxdigit(i32 84)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 425, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isxdigit.c\00"
@.str.1 = [27 x i8] c"isxdigit should be 0 for T\00"
define void @t_isxdigit_0x54() {
%1 = tail call i64 @isxdigit(i32 84)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 425, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int Request_WriteVariable(struct VariableShare *vsh, unsigned int peer_id,
                          unsigned int var_id, unsigned int mt_id,
                          unsigned char *groupid,
                          unsigned char *protocol_progress,
                          unsigned int *last_protocol_mid) {
  return 0;
}


x86 assembly (clang, -O0):
<Request_WriteVariable>:
push   %rbp
mov    %rsp,%rbp
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.VariableShare = type opaque
define i32 @Request_WriteVariable(%struct.VariableShare* %0, i32 %1, i32 %2, i32 %3, i8* %4, i8* %5, i32* %6) {
%8 = alloca %struct.VariableShare*
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i8*
%13 = alloca i8*
%14 = alloca i32*
store %struct.VariableShare* %0, %struct.VariableShare** %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i8* %4, i8** %12
store i8* %5, i8** %13
store i32* %6, i32** %14
ret i32 0
}

LLVM IR (-O2):
%struct.VariableShare = type opaque
define i32 @Request_WriteVariable(%struct.VariableShare* nocapture readnone %0, i32 %1, i32 %2, i32 %3, i8* nocapture readnone %4, i8* nocapture readnone %5, i32* nocapture readnone %6) {
ret i32 0
}
void INT_Excep_IRQ5(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_IRQ5() {
ret void
}
/* Type definitions */
struct timezone {
  int dummy;
};
struct timeval {
  double tv_sec;
  scalar_t__ tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, struct timezone *);
double secs() {
  struct timeval ru;
  gettimeofday(&ru, (struct timezone *)0);
  return (ru.tv_sec + ((double)ru.tv_usec) / 1000000);
}


x86 assembly (clang, -O0):
<secs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
movsd  -0x10(%rbp),%xmm0
cvtsi2sdq -0x8(%rbp),%xmm1
movsd  0xec8(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<secs>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
cvtsi2sdq 0x10(%rsp),%xmm0
divsd  0xed1(%rip),%xmm0
addsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { double, i64 }
%struct.timezone = type { i32 }
define double @secs() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, %struct.timezone* null)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%4 = load double, double* %3
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%6 = load i64, i64* %5
%7 = sitofp i64 %6 to double
%8 = fdiv double %7, 1.000000e+06
%9 = fadd double %4, %8
ret double %9
}

LLVM IR (-O2):
%struct.timeval = type { double, i64 }
%struct.timezone = type { i32 }
define double @secs() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, %struct.timezone* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%5 = load double, double* %4
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%7 = load i64, i64* %6
%8 = sitofp i64 %7 to double
%9 = fdiv double %8, 1.000000e+06
%10 = fadd double %5, %9
ret double %10
}
void gtk_file_filter_flags_get_type() {}


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

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

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

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