xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ delay(int);
int /*<<< orphan*/ mbus_remote_register_write(int, int, int);
void set_pmu_sleep_clk_default() {
  mbus_remote_register_write(0x6, 0x19,
                             ((1 << 13) | (1 << 9) | (1 << 5) | (1)));
  delay(100);
  mbus_remote_register_write(0x6, 0x19,
                             ((1 << 13) | (1 << 9) | (1 << 5) | (1)));
  delay(100);
  mbus_remote_register_write(0x6, 0x15,
                             ((0 << 19) | (0 << 18) | (0 << 17) | (3 << 14) |
                              (1 << 13) | (1 << 9) | (1 << 5) | (6)));
  delay(100 * 10);
}


x86 assembly (clang, -O0):
<set_pmu_sleep_clk_default>:
push   %rbp
mov    %rsp,%rbp
mov    $0x6,%edi
mov    $0x19,%esi
mov    $0x2221,%edx
call   1040 <mbus_remote_register_write@plt>
mov    $0x64,%edi
call   1030 <delay@plt>
mov    $0x6,%edi
mov    $0x19,%esi
mov    $0x2221,%edx
call   1040 <mbus_remote_register_write@plt>
mov    $0x64,%edi
call   1030 <delay@plt>
mov    $0x6,%edi
mov    $0x15,%esi
mov    $0xe226,%edx
call   1040 <mbus_remote_register_write@plt>
mov    $0x3e8,%edi
call   1030 <delay@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_pmu_sleep_clk_default>:
push   %rax
mov    $0x6,%edi
mov    $0x19,%esi
mov    $0x2221,%edx
call   1040 <mbus_remote_register_write@plt>
mov    $0x64,%edi
call   1030 <delay@plt>
mov    $0x6,%edi
mov    $0x19,%esi
mov    $0x2221,%edx
call   1040 <mbus_remote_register_write@plt>
mov    $0x64,%edi
call   1030 <delay@plt>
mov    $0x6,%edi
mov    $0x15,%esi
mov    $0xe226,%edx
call   1040 <mbus_remote_register_write@plt>
mov    $0x3e8,%edi
pop    %rax
jmp    1030 <delay@plt>

LLVM IR (-O0):
define void @set_pmu_sleep_clk_default() {
%1 = call i32 @mbus_remote_register_write(i32 6, i32 25, i32 8737)
%2 = call i32 @delay(i32 100)
%3 = call i32 @mbus_remote_register_write(i32 6, i32 25, i32 8737)
%4 = call i32 @delay(i32 100)
%5 = call i32 @mbus_remote_register_write(i32 6, i32 21, i32 57894)
%6 = call i32 @delay(i32 1000)
ret void
}

LLVM IR (-O2):
define void @set_pmu_sleep_clk_default() {
%1 = tail call i32 @mbus_remote_register_write(i32 6, i32 25, i32 8737)
%2 = tail call i32 @delay(i32 100)
%3 = tail call i32 @mbus_remote_register_write(i32 6, i32 25, i32 8737)
%4 = tail call i32 @delay(i32 100)
%5 = tail call i32 @mbus_remote_register_write(i32 6, i32 21, i32 57894)
%6 = tail call i32 @delay(i32 1000)
ret void
}
/* Variables and functions */
scalar_t__ dbwt_getbits(unsigned short *, unsigned long, int);
unsigned int get2(unsigned short *B, unsigned long i, int d) {
  unsigned short *b;
  b = B + (i >> 4) * d;
  i = (i % 16) * d;
  return (unsigned int)dbwt_getbits(b, i, d);
}


x86 assembly (clang, -O0):
<get2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
shr    $0x4,%rcx
movslq -0x14(%rbp),%rdx
imul   %rdx,%rcx
shl    $0x1,%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
and    $0xf,%rax
movslq -0x14(%rbp),%rcx
imul   %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <dbwt_getbits@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get2>:
mov    %rsi,%rax
shr    $0x4,%rax
movslq %edx,%rdx
imul   %rdx,%rax
lea    (%rdi,%rax,2),%rdi
and    $0xf,%esi
imul   %rdx,%rsi
jmp    1030 <dbwt_getbits@plt>

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

LLVM IR (-O2):
define i32 @get2(i16* %0, i64 %1, i32 %2) {
%4 = lshr i64 %1, 4
%5 = sext i32 %2 to i64
%6 = mul i64 %4, %5
%7 = getelementptr inbounds i16, i16* %0, i64 %6
%8 = and i64 %1, 15
%9 = mul nsw i64 %8, %5
%10 = tail call i64 @dbwt_getbits(i16* %7, i64 %9, i32 %2)
%11 = trunc i64 %10 to i32
ret i32 %11
}
void lookupKeyRead(void) {
  _serverPanic("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/"
               "heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c",
               86, "Function '%s' is disabled.", __func__);
}


x86 assembly (clang, -O0):
<lookupKeyRead>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x56,%esi
lea    0xf79(%rip),%rdx
lea    0xf8d(%rip),%rcx
mov    $0x0,%al
call   1030 <_serverPanic@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<lookupKeyRead>:
lea    0xee9(%rip),%rdi
lea    0xf82(%rip),%rdx
lea    0xf96(%rip),%rcx
mov    $0x56,%esi
xor    %eax,%eax
jmp    1030 <_serverPanic@plt>

LLVM IR (-O0):
@.str = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c\00"
@.str.1 = [27 x i8] c"Function '%s' is disabled.\00"
@__func__.lookupKeyRead = [14 x i8] c"lookupKeyRead\00"
define void @lookupKeyRead() {
%1 = call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @_serverPanic to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str, i64 0, i64 0), i32 86, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @__func__.lookupKeyRead, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c\00"
@.str.1 = [27 x i8] c"Function '%s' is disabled.\00"
@__func__.lookupKeyRead = [14 x i8] c"lookupKeyRead\00"
define void @lookupKeyRead() {
%1 = tail call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @_serverPanic to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str, i64 0, i64 0), i32 86, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @__func__.lookupKeyRead, i64 0, i64 0))
ret void
}
int xisnanf(float x) { return x != x; }


x86 assembly (clang, -O0):
<xisnanf>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
ucomiss -0x4(%rbp),%xmm0
setne  %al
setp   %cl
or     %cl,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xisnanf>:
xor    %eax,%eax
ucomiss %xmm0,%xmm0
setp   %al
ret

LLVM IR (-O0):
define i32 @xisnanf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = load float, float* %2
%5 = fcmp une float %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @xisnanf(float %0) {
%2 = fcmp uno float %0, 0.000000e+00
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ i2d_of_void;
typedef int /*<<< orphan*/ DSA;
typedef int /*<<< orphan*/ BIO;

/* Variables and functions */
int PEM_ASN1_write_bio(int /*<<< orphan*/ *, int /*<<< orphan*/,
                       int /*<<< orphan*/ *, void *, int /*<<< orphan*/ *,
                       int /*<<< orphan*/ *, int /*<<< orphan*/,
                       int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ PEM_STRING_DSAPARAMS;
scalar_t__ i2d_DSAparams;
int PEM_write_bio_DSAparams(BIO *bp, const DSA *x) {
  return PEM_ASN1_write_bio((i2d_of_void *)i2d_DSAparams, PEM_STRING_DSAPARAMS,
                            bp, (void *)x, NULL, NULL, 0, NULL, NULL);
}


x86 assembly (clang, -O0):
<PEM_write_bio_DSAparams>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eb9(%rip),%rax
mov    (%rax),%rdi
mov    0x2ebf(%rip),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
xor    %eax,%eax
mov    %eax,%r9d
xor    %eax,%eax
mov    %r9,%r8
movl   $0x0,(%rsp)
movq   $0x0,0x8(%rsp)
movq   $0x0,0x10(%rsp)
call   1030 <PEM_ASN1_write_bio@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PEM_write_bio_DSAparams>:
sub    $0x18,%rsp
mov    %rsi,%rcx
mov    %rdi,%rdx
mov    0x2ebf(%rip),%rax
mov    (%rax),%rdi
mov    0x2ec5(%rip),%rax
mov    (%rax),%esi
xorps  %xmm0,%xmm0
movups %xmm0,0x8(%rsp)
movl   $0x0,(%rsp)
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1030 <PEM_ASN1_write_bio@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@i2d_DSAparams = global i64 0
@PEM_STRING_DSAPARAMS = global i32 0
define i32 @PEM_write_bio_DSAparams(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%5 = load i64, i64* @i2d_DSAparams
%6 = inttoptr i64 %5 to i32*
%7 = load i32, i32* @PEM_STRING_DSAPARAMS
%8 = load i32*, i32** %3
%9 = load i32*, i32** %4
%10 = bitcast i32* %9 to i8*
%11 = call i32 @PEM_ASN1_write_bio(i32* %6, i32 %7, i32* %8, i8* %10, i32* null, i32* null, i32 0, i32* null, i32* null)
ret i32 %11
}

LLVM IR (-O2):
@i2d_DSAparams = global i64 0
@PEM_STRING_DSAPARAMS = global i32 0
define i32 @PEM_write_bio_DSAparams(i32* %0, i32* %1) {
%3 = load i64, i64* @i2d_DSAparams
%4 = inttoptr i64 %3 to i32*
%5 = load i32, i32* @PEM_STRING_DSAPARAMS
%6 = bitcast i32* %1 to i8*
%7 = tail call i32 @PEM_ASN1_write_bio(i32* %4, i32 %5, i32* %0, i8* %6, i32* null, i32* null, i32 0, i32* null, i32* null)
ret i32 %7
}
int rr_is_valid_bar(unsigned long address) {
  int bar = ((address) >> 28);
  return bar == 0 || bar == 2 || bar == 4 || bar == 0x0c;
}


x86 assembly (clang, -O0):
<rr_is_valid_bar>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x1c,%rax
mov    %eax,-0xc(%rbp)
mov    $0x1,%al
cmpl   $0x0,-0xc(%rbp)
mov    %al,-0xd(%rbp)
je     114a <rr_is_valid_bar+0x4a>
mov    $0x1,%al
cmpl   $0x2,-0xc(%rbp)
mov    %al,-0xd(%rbp)
je     114a <rr_is_valid_bar+0x4a>
mov    $0x1,%al
cmpl   $0x4,-0xc(%rbp)
mov    %al,-0xd(%rbp)
je     114a <rr_is_valid_bar+0x4a>
cmpl   $0xc,-0xc(%rbp)
sete   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rr_is_valid_bar>:
shr    $0x1c,%rdi
cmp    $0x4,%edi
ja     1119 <rr_is_valid_bar+0x19>
mov    $0x1,%eax
mov    $0x15,%ecx
bt     %edi,%ecx
jae    1119 <rr_is_valid_bar+0x19>
ret
xor    %eax,%eax
cmp    $0xc,%edi
sete   %al
ret

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

LLVM IR (-O2):
define i32 @rr_is_valid_bar(i64 %0) {
%2 = lshr i64 %0, 28
%3 = trunc i64 %2 to i32
switch i32 %3, label %4 [
i32 4, label %7
i32 2, label %7
i32 0, label %7
]
4: ; preds = %1
%5 = icmp eq i32 %3, 12
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %1, %1, %1, %4
%8 = phi i32 [ 1, %1 ], [ %6, %4 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %8
}
int generic_phy_reset(struct phy *phy) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.phy = type opaque
define i32 @generic_phy_reset(%struct.phy* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isdigit(int);
void t_isdigit_0xea() {
  Assert_real((isdigit(234) == 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_isdigit.c",
              1175, ("isdigit should be 0 for 0xea"));
}


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

x86 assembly (clang, -O2):
<t_isdigit_0xea>:
push   %rax
mov    $0xea,%edi
call   1030 <isdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x497,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 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_isdigit.c\00"
@.str.1 = [29 x i8] c"isdigit should be 0 for 0xea\00"
define void @t_isdigit_0xea() {
%1 = call i64 @isdigit(i32 234)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1175, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 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_isdigit.c\00"
@.str.1 = [29 x i8] c"isdigit should be 0 for 0xea\00"
define void @t_isdigit_0xea() {
%1 = tail call i64 @isdigit(i32 234)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1175, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
extern int in_be32(volatile unsigned int *addr) {
  return ({
    unsigned int __v = (*(volatile unsigned int *)(addr));
    __v;
  });
}


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

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

LLVM IR (-O0):
define i32 @in_be32(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
store i32* %0, i32** %2
%5 = load i32*, i32** %2
%6 = load volatile i32, i32* %5
store i32 %6, i32* %3
%7 = load i32, i32* %3
store i32 %7, i32* %4
%8 = load i32, i32* %4
ret i32 %8
}

LLVM IR (-O2):
define i32 @in_be32(i32* %0) {
%2 = load volatile i32, i32* %0
ret i32 %2
}
/* Variables and functions */
char *alloc(int /*<<< orphan*/);
int /*<<< orphan*/ length(char const *);
int /*<<< orphan*/ movstr(char const *, char *);
char *make(const char *v) {
  register char *p;
  if (v) {
    movstr(v, p = alloc(length(v)));
    return p;
  } else
    return 0;
}


x86 assembly (clang, -O0):
<make>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     117c <make+0x4c>
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <length@plt>
mov    %eax,%edi
call   1040 <alloc@plt>
mov    -0x20(%rbp),%rdi
mov    %rax,%rsi
mov    %rsi,-0x18(%rbp)
call   1050 <movstr@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1184 <make+0x54>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<make>:
push   %r14
push   %rbx
push   %rax
test   %rdi,%rdi
je     1158 <make+0x28>
mov    %rdi,%rbx
call   1030 <length@plt>
mov    %eax,%edi
call   1040 <alloc@plt>
mov    %rax,%r14
mov    %rbx,%rdi
mov    %rax,%rsi
call   1050 <movstr@plt>
jmp    115b <make+0x2b>
xor    %r14d,%r14d
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @make(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = tail call i32 @length(i8* %0)
%5 = tail call i8* @alloc(i32 %4)
%6 = tail call i32 @movstr(i8* %0, i8* %5)
br label %7
7: ; preds = %1, %3
%8 = phi i8* [ %5, %3 ], [ null, %1 ]
ret i8* %8
}
/* Variables and functions */
scalar_t__ get_source_line();
int /*<<< orphan*/ init_lister(char *);
int main(int argc, char *argv[]) {
  init_lister(argv[1]);
  while (get_source_line())
    ;
  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    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <init_lister@plt>
mov    $0x0,%al
call   1040 <get_source_line@plt>
cmp    $0x0,%rax
je     1159 <main+0x39>
jmp    1143 <main+0x23>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x8(%rsi),%rdi
call   1030 <init_lister@plt>
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <get_source_line@plt>
test   %rax,%rax
jne    1130 <main+0x10>
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 = load i8**, i8*** %5
%7 = getelementptr inbounds i8*, i8** %6, i64 1
%8 = load i8*, i8** %7
%9 = call i32 @init_lister(i8* %8)
br label %10
10: ; preds = %13, %2
%11 = call i64 (...) @get_source_line()
%12 = icmp ne i64 %11, 0
br i1 %12, label %13, label %14
13: ; preds = %10
br label %10
14: ; preds = %10
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @init_lister(i8* %4)
br label %6
6: ; preds = %6, %2
%7 = tail call i64 (...) @get_source_line()
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %6
9: ; preds = %6
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
scalar_t__ raise(int);
void gt_xraise(int sig) {
  if (raise(sig)) {
    perror("cannot raise");
    exit(EXIT_FAILURE);
  }
}


x86 assembly (clang, -O0):
<gt_xraise>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <raise@plt>
cmp    $0x0,%rax
je     1167 <gt_xraise+0x37>
lea    0xeac(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e80(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gt_xraise>:
push   %rax
call   1030 <raise@plt>
test   %rax,%rax
jne    113d <gt_xraise+0xd>
pop    %rax
ret
lea    0xebc(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e90(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

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

LLVM IR (-O2):
@.str = [13 x i8] c"cannot raise\00"
@EXIT_FAILURE = global i32 0
define void @gt_xraise(i32 %0) {
%2 = tail call i64 @raise(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i32 @perror(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* @EXIT_FAILURE
%7 = tail call i32 @exit(i32 %6)
unreachable
8: ; preds = %1
ret void
}
void timer_loop() {}


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

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

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

LLVM IR (-O2):
define void @timer_loop() {
ret void
}
int priority(char op) {
  switch (op) {
  case '=':
    return 1;
  case '+':
  case '-':
    return 2;
  case '*':
  case '/':
    return 3;
  default:
    return -1;
  }
}


x86 assembly (clang, -O0):
<priority>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
add    $0xffffffd6,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x13,%eax
ja     1158 <priority+0x58>
mov    -0x10(%rbp),%rax
lea    0xed5(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x1,-0x4(%rbp)
jmp    115f <priority+0x5f>
movl   $0x2,-0x4(%rbp)
jmp    115f <priority+0x5f>
movl   $0x3,-0x4(%rbp)
jmp    115f <priority+0x5f>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<priority>:
add    $0xffffffd6,%edi
cmp    $0x13,%edi
ja     1129 <priority+0x29>
mov    $0x1,%eax
lea    0xeec(%rip),%rcx
movslq (%rcx,%rdi,4),%rdx
add    %rcx,%rdx
jmp    *%rdx
mov    $0x3,%eax
ret
mov    $0x2,%eax
ret
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @priority(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
switch i32 %5, label %9 [
i32 61, label %6
i32 43, label %7
i32 45, label %7
i32 42, label %8
i32 47, label %8
]
6: ; preds = %1
store i32 1, i32* %2
br label %10
7: ; preds = %1, %1
store i32 2, i32* %2
br label %10
8: ; preds = %1, %1
store i32 3, i32* %2
br label %10
9: ; preds = %1
store i32 -1, i32* %2
br label %10
10: ; preds = %9, %8, %7, %6
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
define i32 @priority(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %5 [
i32 61, label %6
i32 43, label %3
i32 45, label %3
i32 42, label %4
i32 47, label %4
]
3: ; preds = %1, %1
br label %6
4: ; preds = %1, %1
br label %6
5: ; preds = %1
br label %6
6: ; preds = %1, %5, %4, %3
%7 = phi i32 [ -1, %5 ], [ 3, %4 ], [ 2, %3 ], [ 1, %1 ]
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void my_free(void *mem) { free(mem); }


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

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

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

LLVM IR (-O2):
define void @my_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int EINVAL;
__attribute__((visibility("default"))) int
sd_bus_creds_get_exe(void *c, const char **ret) {
  return -EINVAL;
}


x86 assembly (clang, -O0):
<sd_bus_creds_get_exe>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
mov    0x2ecb(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@EINVAL = global i32 0
define i32 @sd_bus_creds_get_exe(i8* %0, i8** %1) {
%3 = alloca i8*
%4 = alloca i8**
store i8* %0, i8** %3
store i8** %1, i8*** %4
%5 = load i32, i32* @EINVAL
%6 = sub nsw i32 0, %5
ret i32 %6
}

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @sd_bus_creds_get_exe(i8* nocapture readnone %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @EINVAL
%4 = sub nsw i32 0, %3
ret i32 %4
}
__attribute__((always_)) int
rt_mutex_debug_check_no_locks_freed(const void *from, unsigned long len) {
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @rt_mutex_debug_check_no_locks_freed(i8* nocapture readnone %0, i64 %1) {
ret i32 0
}
int utf32valid(unsigned int unichar) { return unichar < 0x110000; }


x86 assembly (clang, -O0):
<utf32valid>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x110000,-0x4(%rbp)
setb   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<utf32valid>:
xor    %eax,%eax
cmp    $0x110000,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @utf32valid(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ult i32 %3, 1114112
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @utf32valid(i32 %0) {
%2 = icmp ult i32 %0, 1114112
%3 = zext i1 %2 to i32
ret i32 %3
}
int main() {
  int x, y, z;
  x = 0;
  if (y > 5) {
    x++;
    z++;
  }
  y++;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x5,-0xc(%rbp)
jle    112e <main+0x2e>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
char to_hex(char code) {
  const char hex[] = "0123456789abcdef";
  return hex[code & 15];
}


x86 assembly (clang, -O0):
<to_hex>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    0xeef(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xeec(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xeea(%rip),%al
mov    %al,-0x10(%rbp)
movsbl -0x1(%rbp),%eax
and    $0xf,%eax
cltq
movsbl -0x20(%rbp,%rax,1),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<to_hex>:
and    $0xf,%edi
lea    0xef6(%rip),%rax
mov    (%rdi,%rax,1),%al
ret

LLVM IR (-O0):
@__const.to_hex.hex = [17 x i8] c"0123456789abcdef\00"
define signext i8 @to_hex(i8 signext %0) {
%2 = alloca i8
%3 = alloca [17 x i8]
store i8 %0, i8* %2
%4 = bitcast [17 x i8]* %3 to i8*
%5 = load i8, i8* %2
%6 = sext i8 %5 to i32
%7 = and i32 %6, 15
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds [17 x i8], [17 x i8]* %3, i64 0, i64 %8
%10 = load i8, i8* %9
ret i8 %10
}

LLVM IR (-O2):
@__const.to_hex.hex = [17 x i8] c"0123456789abcdef\00"
define signext i8 @to_hex(i8 signext %0) {
%2 = and i8 %0, 15
%3 = zext i8 %2 to i64
%4 = getelementptr inbounds [17 x i8], [17 x i8]* @__const.to_hex.hex, i64 0, i64 %3
%5 = load i8, i8* %4
ret i8 %5
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
scalar_t__ test_cbmap(int, char **);
int main(int argc, char **argv) {
  assert(test_cbmap(argc, argv) == 0);
  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    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <test_cbmap@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
call   1030 <test_cbmap@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
call   1040 <assert@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 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = call i64 @test_cbmap(i32 %6, i8** %7)
%9 = icmp eq i64 %8, 0
%10 = zext i1 %9 to i32
%11 = call i32 @assert(i32 %10)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i64 @test_cbmap(i32 %0, i8** %1)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
%6 = tail call i32 @assert(i32 %5)
ret i32 0
}
int foo() { return 43; }


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

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

LLVM IR (-O0):
define i32 @foo() {
ret i32 43
}

LLVM IR (-O2):
define i32 @foo() {
ret i32 43
}
/* Variables and functions */
int /*<<< orphan*/ SIGUSR1;
void SIG_IGN(int);
int /*<<< orphan*/ send_message();
int /*<<< orphan*/ signal(int /*<<< orphan*/, void (*)(int));
void SIGhandler(int sig) {
  signal(SIGUSR1, SIG_IGN);
  send_message();
  signal(SIGUSR1, SIGhandler);
}


x86 assembly (clang, -O0):
<SIGhandler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eb6(%rip),%rax
mov    (%rax),%edi
mov    0x2e9d(%rip),%rsi
call   1040 <signal@plt>
mov    $0x0,%al
call   1030 <send_message@plt>
mov    0x2e9a(%rip),%rax
mov    (%rax),%edi
mov    0x2e89(%rip),%rsi
call   1040 <signal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SIGhandler>:
push   %rbx
mov    0x2ec0(%rip),%rbx
mov    (%rbx),%edi
mov    0x2ea7(%rip),%rsi
call   1040 <signal@plt>
xor    %eax,%eax
call   1030 <send_message@plt>
mov    (%rbx),%edi
mov    0x2e9a(%rip),%rsi
pop    %rbx
jmp    1040 <signal@plt>

LLVM IR (-O0):
@SIGUSR1 = global i32 0
define void @SIGhandler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @SIGUSR1
%4 = call i32 @signal(i32 %3, void (i32)* @SIG_IGN)
%5 = call i32 (...) @send_message()
%6 = load i32, i32* @SIGUSR1
%7 = call i32 @signal(i32 %6, void (i32)* @SIGhandler)
ret void
}

LLVM IR (-O2):
@SIGUSR1 = global i32 0
define void @SIGhandler(i32 %0) {
%2 = load i32, i32* @SIGUSR1
%3 = tail call i32 @signal(i32 %2, void (i32)* @SIG_IGN)
%4 = tail call i32 (...) @send_message()
%5 = load i32, i32* @SIGUSR1
%6 = tail call i32 @signal(i32 %5, void (i32)* @SIGhandler)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
double sqrt(int /*<<< orphan*/);
int /*<<< orphan*/ stdlib_strided_dvariancetk(int /*<<< orphan*/ const,
                                              double const, double const *,
                                              int /*<<< orphan*/ const);
double stdlib_strided_dstdevtk(const int64_t N, const double correction,
                               const double *X, const int64_t stride) {
  return sqrt(stdlib_strided_dvariancetk(N, correction, X, stride));
}


x86 assembly (clang, -O0):
<stdlib_strided_dstdevtk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x4(%rbp),%edi
movsd  -0x10(%rbp),%xmm0
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1030 <stdlib_strided_dvariancetk@plt>
mov    %eax,%edi
call   1040 <sqrt@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define double @stdlib_strided_dstdevtk(i32 %0, double %1, double* %2, i32 %3) {
%5 = alloca i32
%6 = alloca double
%7 = alloca double*
%8 = alloca i32
store i32 %0, i32* %5
store double %1, double* %6
store double* %2, double** %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = load double, double* %6
%11 = load double*, double** %7
%12 = load i32, i32* %8
%13 = call i32 @stdlib_strided_dvariancetk(i32 %9, double %10, double* %11, i32 %12)
%14 = call double @sqrt(i32 %13)
ret double %14
}

LLVM IR (-O2):
define double @stdlib_strided_dstdevtk(i32 %0, double %1, double* %2, i32 %3) {
%5 = tail call i32 @stdlib_strided_dvariancetk(i32 %0, double %1, double* %2, i32 %3)
%6 = tail call double @sqrt(i32 %5)
ret double %6
}
/* Variables and functions */
int /*<<< orphan*/ map_pack();
int /*<<< orphan*/ pthread_detach(int /*<<< orphan*/);
int /*<<< orphan*/ pthread_self();
int /*<<< orphan*/ usleep(int);
void *netstat_task(void *arg) {
  pthread_detach(pthread_self());
  while (1) {
    map_pack();
    usleep(100 * 1000);
  }
  return 0;
}


x86 assembly (clang, -O0):
<netstat_task>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1050 <pthread_self@plt>
mov    %eax,%edi
call   1040 <pthread_detach@plt>
mov    $0x0,%al
call   1030 <map_pack@plt>
mov    $0x186a0,%edi
call   1060 <usleep@plt>
jmp    115a <netstat_task+0x1a>

x86 assembly (clang, -O2):
<netstat_task>:
push   %rax
xor    %eax,%eax
call   1050 <pthread_self@plt>
mov    %eax,%edi
call   1040 <pthread_detach@plt>
nop
xor    %eax,%eax
call   1030 <map_pack@plt>
mov    $0x186a0,%edi
call   1060 <usleep@plt>
jmp    1150 <netstat_task+0x10>

LLVM IR (-O0):
define i8* @netstat_task(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @pthread_self()
%4 = call i32 @pthread_detach(i32 %3)
br label %5
5: ; preds = %1, %5
%6 = call i32 (...) @map_pack()
%7 = call i32 @usleep(i32 100000)
br label %5
}

LLVM IR (-O2):
define noalias i8* @netstat_task(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @pthread_self()
%3 = tail call i32 @pthread_detach(i32 %2)
br label %4
4: ; preds = %1, %4
%5 = tail call i32 (...) @map_pack()
%6 = tail call i32 @usleep(i32 100000)
br label %4
}
/* Type definitions */
struct buffer {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ buffer_append(struct buffer *, char const *,
                                 int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char const *);
void buffer_append_str(struct buffer *b, const char *str) {
  buffer_append(b, str, strlen(str));
}


x86 assembly (clang, -O0):
<buffer_append_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1040 <buffer_append@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<buffer_append_str>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <strlen@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <buffer_append@plt>

LLVM IR (-O0):
%struct.buffer = type { i32 }
define void @buffer_append_str(%struct.buffer* %0, i8* %1) {
%3 = alloca %struct.buffer*
%4 = alloca i8*
store %struct.buffer* %0, %struct.buffer** %3
store i8* %1, i8** %4
%5 = load %struct.buffer*, %struct.buffer** %3
%6 = load i8*, i8** %4
%7 = load i8*, i8** %4
%8 = call i32 @strlen(i8* %7)
%9 = call i32 @buffer_append(%struct.buffer* %5, i8* %6, i32 %8)
ret void
}

LLVM IR (-O2):
%struct.buffer = type { i32 }
define void @buffer_append_str(%struct.buffer* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i32 @buffer_append(%struct.buffer* %0, i8* %1, i32 %3)
ret void
}
void gtk_expander_get_label() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ objc_msgSend(int /*<<< orphan*/, int /*<<< orphan*/,
                                int /*<<< orphan*/);
void msgSend1IdHACK(id theReceiver, SEL theSender, id id) {
  objc_msgSend(theReceiver, theSender, id);
}


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

x86 assembly (clang, -O2):
<msgSend1IdHACK>:
jmp    1030 <objc_msgSend@plt>

LLVM IR (-O0):
define void @msgSend1IdHACK(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 @objc_msgSend(i32 %7, i32 %8, i32 %9)
ret void
}

LLVM IR (-O2):
define void @msgSend1IdHACK(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @objc_msgSend(i32 %0, i32 %1, i32 %2)
ret void
}
double test5(double x) { return __builtin_log(x); }


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

x86 assembly (clang, -O2):
<test5>:
jmp    1030 <log@plt>

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

LLVM IR (-O2):
define double @test5(double %0) {
%2 = tail call double @log(double %0)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ write(int, char *, int);
void missed_alarm(int signum) { write(2, "Missed Alarm!\n", 14); }


x86 assembly (clang, -O0):
<missed_alarm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x2,%edi
lea    0xed9(%rip),%rsi
mov    $0xe,%edx
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<missed_alarm>:
lea    0xee9(%rip),%rsi
mov    $0x2,%edi
mov    $0xe,%edx
jmp    1030 <write@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"Missed Alarm!\0A\00"
define void @missed_alarm(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @write(i32 2, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 14)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"Missed Alarm!\0A\00"
define void @missed_alarm(i32 %0) {
%2 = tail call i32 @write(i32 2, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 14)
ret void
}
/* Variables and functions */
scalar_t__ get_line(char *, int /*<<< orphan*/);
int /*<<< orphan*/ output_row(char *);
int /*<<< orphan*/ stdin;
int main(void) {
  char buffer[128];
  while (get_line(buffer, stdin)) {
    output_row(buffer);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x90(%rbp),%rdi
mov    0x2ea8(%rip),%rax
mov    (%rax),%esi
call   1040 <get_line@plt>
cmp    $0x0,%rax
je     1162 <main+0x42>
lea    -0x90(%rbp),%rdi
call   1030 <output_row@plt>
jmp    1132 <main+0x12>
xor    %eax,%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x88,%rsp
mov    0x2eb7(%rip),%r14
mov    (%r14),%esi
mov    %rsp,%rdi
call   1040 <get_line@plt>
test   %rax,%rax
je     1168 <main+0x48>
mov    %rsp,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rbx,%rdi
call   1030 <output_row@plt>
mov    (%r14),%esi
mov    %rbx,%rdi
call   1040 <get_line@plt>
test   %rax,%rax
jne    1150 <main+0x30>
xor    %eax,%eax
add    $0x88,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@stdin = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca [128 x i8]
store i32 0, i32* %1
br label %3
3: ; preds = %8, %0
%4 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 0
%5 = load i32, i32* @stdin
%6 = call i64 @get_line(i8* %4, i32 %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %3
%9 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 0
%10 = call i32 @output_row(i8* %9)
br label %3
11: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@stdin = global i32 0
define i32 @main() {
%1 = alloca [128 x i8]
%2 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 0
%3 = load i32, i32* @stdin
%4 = call i64 @get_line(i8* %2, i32 %3)
%5 = icmp eq i64 %4, 0
br i1 %5, label %11, label %6
6: ; preds = %0, %6
%7 = call i32 @output_row(i8* %2)
%8 = load i32, i32* @stdin
%9 = call i64 @get_line(i8* %2, i32 %8)
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %6
11: ; preds = %6, %0
ret i32 0
}
/* Variables and functions */
bool nrf91_errata_32(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @nrf91_errata_32() {
ret i32 0
}
void hieth_phy_suspend(void) {}


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

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

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

LLVM IR (-O2):
define void @hieth_phy_suspend() {
ret void
}
void foo680(int p) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ __NR_io_submit;
int syscall(int /*<<< orphan*/, int /*<<< orphan*/, long, struct iocb **);
int __io_submit(aio_context_t ctx_id, long nr, struct iocb **iocbpp) {
  return syscall(__NR_io_submit, ctx_id, nr, iocbpp);
}


x86 assembly (clang, -O0):
<__io_submit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2ebe(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
call   1030 <syscall@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__io_submit>:
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %edi,%esi
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
%struct.iocb = type { i32 }
@__NR_io_submit = global i32 0
define i32 @__io_submit(i32 %0, i64 %1, %struct.iocb** %2) {
%4 = alloca i32
%5 = alloca i64
%6 = alloca %struct.iocb**
store i32 %0, i32* %4
store i64 %1, i64* %5
store %struct.iocb** %2, %struct.iocb*** %6
%7 = load i32, i32* @__NR_io_submit
%8 = load i32, i32* %4
%9 = load i64, i64* %5
%10 = load %struct.iocb**, %struct.iocb*** %6
%11 = call i32 @syscall(i32 %7, i32 %8, i64 %9, %struct.iocb** %10)
ret i32 %11
}

LLVM IR (-O2):
%struct.iocb = type { i32 }
@__NR_io_submit = global i32 0
define i32 @__io_submit(i32 %0, i64 %1, %struct.iocb** %2) {
%4 = load i32, i32* @__NR_io_submit
%5 = tail call i32 @syscall(i32 %4, i32 %0, i64 %1, %struct.iocb** %2)
ret i32 %5
}
int test_imm_D4uint16_mem(unsigned short *val) {
  return ((*val) & (-0xD4 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_D4uint16_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzwl (%rax),%edx
and    $0xffffff2c,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_D4uint16_mem>:
movzwl (%rdi),%eax
test   $0xff2c,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_D4uint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -212
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int m_to_dec(int, int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main(int argc, const char *argv[]) {
  int n, m;
  scanf("%x %d", &n, &m);
  printf("%d\n", m_to_dec(n, m));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeb3(%rip),%rdi
lea    -0x14(%rbp),%rsi
lea    -0x18(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
call   1050 <m_to_dec@plt>
mov    %eax,%esi
lea    0xe98(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    0x4(%rsp),%edi
mov    (%rsp),%esi
call   1050 <m_to_dec@plt>
lea    0xeae(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"%x %d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %3 to i8*
%6 = bitcast i32* %4 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %3, i32* %4)
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = call i32 @m_to_dec(i32 %8, i32 %9)
%11 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %10)
ret i32 0
}
int authenticated(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @authenticated() {
ret i32 0
}