xunge/DecIR huggingface dataset:
/* Variables and functions */
int rom_present(char *);
int xebec_available() { return rom_present("ibm_xebec_62x0822_1985.bin"); }


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

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

LLVM IR (-O0):
@.str = [27 x i8] c"ibm_xebec_62x0822_1985.bin\00"
define i32 @xebec_available() {
%1 = call i32 @rom_present(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [27 x i8] c"ibm_xebec_62x0822_1985.bin\00"
define i32 @xebec_available() {
%1 = tail call i32 @rom_present(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ Unix_IsValidParallelDevice(char const *, char **, char **);
int SerparMatch(const char *portstring, const char *arg) {
  char *sername = NULL, *parname = NULL;
  (arg = arg);
  Unix_IsValidParallelDevice(portstring, &sername, &parname);
  if (sername == NULL || parname == NULL)
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<SerparMatch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
movq   $0x0,-0x28(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x20(%rbp),%rsi
lea    -0x28(%rbp),%rdx
call   1030 <Unix_IsValidParallelDevice@plt>
cmpq   $0x0,-0x20(%rbp)
je     115f <SerparMatch+0x4f>
cmpq   $0x0,-0x28(%rbp)
jne    116b <SerparMatch+0x5b>
movl   $0xffffffff,-0x4(%rbp)
jmp    1172 <SerparMatch+0x62>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SerparMatch>:
sub    $0x18,%rsp
movq   $0x0,0x10(%rsp)
movq   $0x0,0x8(%rsp)
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1030 <Unix_IsValidParallelDevice@plt>
cmpq   $0x0,0x10(%rsp)
sete   %al
cmpq   $0x0,0x8(%rsp)
sete   %cl
or     %al,%cl
movzbl %cl,%eax
neg    %eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
define i32 @SerparMatch(i8* %0, i8* nocapture readnone %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = bitcast i8** %3 to i8*
store i8* null, i8** %3
%6 = bitcast i8** %4 to i8*
store i8* null, i8** %4
%7 = call i32 @Unix_IsValidParallelDevice(i8* %0, i8** %3, i8** %4)
%8 = load i8*, i8** %3
%9 = icmp eq i8* %8, null
%10 = load i8*, i8** %4
%11 = icmp eq i8* %10, null
%12 = select i1 %9, i1 true, i1 %11
%13 = sext i1 %12 to i32
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ closelog();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ unlink(char *);
void wrapUp() {
  closelog();
  unlink("/tmp/sysdifflog_pid");
  exit(0);
}


x86 assembly (clang, -O0):
<wrapUp>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <closelog@plt>
lea    0xebe(%rip),%rdi
call   1040 <unlink@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<wrapUp>:
push   %rax
xor    %eax,%eax
call   1030 <closelog@plt>
lea    0xec1(%rip),%rdi
call   1040 <unlink@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"/tmp/sysdifflog_pid\00"
define void @wrapUp() {
%1 = call i32 (...) @closelog()
%2 = call i32 @unlink(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [20 x i8] c"/tmp/sysdifflog_pid\00"
define void @wrapUp() {
%1 = tail call i32 (...) @closelog()
%2 = tail call i32 @unlink(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 0)
unreachable
}
int test_imm_D6int64_lowword_mem(long long *val) {
  return ((*val) & (0xD6 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_D6int64_lowword_mem>:
testb  $0xd6,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_D6int64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 214
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int tty_height(void) { return 25; }


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

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

LLVM IR (-O0):
define i32 @tty_height() {
ret i32 25
}

LLVM IR (-O2):
define i32 @tty_height() {
ret i32 25
}
int test_imm_00int16_reg(short val) {
  return ((val) & (0x00 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%edx
and    $0x0,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
mov    $0xffffffd8,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_00int16_reg(i16 signext %0) {
ret i32 -40
}
/* Variables and functions */
bool nrf52_errata_15(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @nrf52_errata_15() {
ret i32 0
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
uint64_t log2_u64(uint64_t y) {
  uint64_t ret = 0;
  while (y >>= 1) {
    ret++;
  }
  return ret;
}


x86 assembly (clang, -O0):
<log2_u64>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x4(%rbp)
cmp    $0x0,%eax
je     112e <log2_u64+0x2e>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <log2_u64+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<log2_u64>:
xor    %eax,%eax
cmp    $0x2,%edi
jb     111c <log2_u64+0x1c>
xor    %eax,%eax
mov    %edi,%ecx
nopl   0x0(%rax,%rax,1)
sar    %ecx
add    $0x1,%eax
cmp    $0x3,%edi
mov    %ecx,%edi
ja     1110 <log2_u64+0x10>
ret

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

LLVM IR (-O2):
define i32 @log2_u64(i32 %0) {
%2 = icmp ult i32 %0, 2
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 0, %1 ]
%5 = phi i32 [ %6, %3 ], [ %0, %1 ]
%6 = ashr i32 %5, 1
%7 = add nuw nsw i32 %4, 1
%8 = icmp ult i32 %5, 4
br i1 %8, label %9, label %3
9: ; preds = %3, %1
%10 = phi i32 [ 0, %1 ], [ %7, %3 ]
ret i32 %10
}
/* Type definitions */
typedef int /*<<< orphan*/ sigset_t;

/* Variables and functions */
int /*<<< orphan*/ SIGUSR1;
int /*<<< orphan*/ SIG_BLOCK;
int /*<<< orphan*/ sigaddset(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ sigemptyset(int /*<<< orphan*/ *);
int /*<<< orphan*/ sigprocmask(int /*<<< orphan*/, int /*<<< orphan*/ *,
                               int /*<<< orphan*/ *);
void block_sigchld(void) {
  sigset_t s;
  sigemptyset(&s);
  sigaddset(&s, SIGUSR1);
  sigprocmask(SIG_BLOCK, &s, NULL);
}


x86 assembly (clang, -O0):
<block_sigchld>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x4(%rbp),%rdi
call   1040 <sigemptyset@plt>
mov    0x2ea0(%rip),%rax
mov    (%rax),%esi
lea    -0x4(%rbp),%rdi
call   1050 <sigaddset@plt>
mov    0x2e7e(%rip),%rax
mov    (%rax),%edi
lea    -0x4(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <sigprocmask@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<block_sigchld>:
push   %rbx
sub    $0x10,%rsp
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <sigemptyset@plt>
mov    0x2e9f(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
call   1050 <sigaddset@plt>
mov    0x2e7e(%rip),%rax
mov    (%rax),%edi
mov    %rbx,%rsi
xor    %edx,%edx
call   1030 <sigprocmask@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@SIGUSR1 = global i32 0
@SIG_BLOCK = global i32 0
define void @block_sigchld() {
%1 = alloca i32
%2 = call i32 @sigemptyset(i32* %1)
%3 = load i32, i32* @SIGUSR1
%4 = call i32 @sigaddset(i32* %1, i32 %3)
%5 = load i32, i32* @SIG_BLOCK
%6 = call i32 @sigprocmask(i32 %5, i32* %1, i32* null)
ret void
}

LLVM IR (-O2):
@SIGUSR1 = global i32 0
@SIG_BLOCK = global i32 0
define void @block_sigchld() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @sigemptyset(i32* %1)
%4 = load i32, i32* @SIGUSR1
%5 = call i32 @sigaddset(i32* %1, i32 %4)
%6 = load i32, i32* @SIG_BLOCK
%7 = call i32 @sigprocmask(i32 %6, i32* %1, i32* null)
ret void
}
void updateByIndex(int *a, int index, int val) { a[index] = val; }


x86 assembly (clang, -O0):
<updateByIndex>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<updateByIndex>:
movslq %esi,%rax
mov    %edx,(%rdi,%rax,4)
ret

LLVM IR (-O0):
define void @updateByIndex(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 = load i32, i32* %5
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i32, i32* %8, i64 %10
store i32 %7, i32* %11
ret void
}

LLVM IR (-O2):
define void @updateByIndex(i32* nocapture writeonly %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
store i32 %2, i32* %5
ret void
}
/* Type definitions */
struct fru_type_length {
  int dummy;
};

/* Variables and functions */
int fru_length(struct fru_type_length *);
int fru_strlen(struct fru_type_length *tl) { return fru_length(tl) - 1; }


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

x86 assembly (clang, -O2):
<fru_strlen>:
push   %rax
call   1030 <fru_length@plt>
add    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.fru_type_length = type { i32 }
define i32 @fru_strlen(%struct.fru_type_length* %0) {
%2 = alloca %struct.fru_type_length*
store %struct.fru_type_length* %0, %struct.fru_type_length** %2
%3 = load %struct.fru_type_length*, %struct.fru_type_length** %2
%4 = call i32 @fru_length(%struct.fru_type_length* %3)
%5 = sub nsw i32 %4, 1
ret i32 %5
}

LLVM IR (-O2):
%struct.fru_type_length = type { i32 }
define i32 @fru_strlen(%struct.fru_type_length* %0) {
%2 = tail call i32 @fru_length(%struct.fru_type_length* %0)
%3 = add nsw i32 %2, -1
ret i32 %3
}
float imc(float peso, float altura) { return peso / (altura * altura); }


x86 assembly (clang, -O0):
<imc>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
mulss  -0x8(%rbp),%xmm1
divss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<imc>:
mulss  %xmm1,%xmm1
divss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @imc(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = load float, float* %4
%8 = fmul float %6, %7
%9 = fdiv float %5, %8
ret float %9
}

LLVM IR (-O2):
define float @imc(float %0, float %1) {
%3 = fmul float %1, %1
%4 = fdiv float %0, %3
ret float %4
}
int spacep(int ch) { return (ch == ' ' || ch == ',' || ch == '.'); }


x86 assembly (clang, -O0):
<spacep>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x20,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     112f <spacep+0x2f>
mov    $0x1,%al
cmpl   $0x2c,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     112f <spacep+0x2f>
cmpl   $0x2e,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<spacep>:
mov    $0x1,%eax
cmp    $0x20,%edi
je     110f <spacep+0xf>
cmp    $0x2c,%edi
jne    1110 <spacep+0x10>
ret
xor    %eax,%eax
cmp    $0x2e,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @spacep(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 32
br i1 %4, label %11, label %5
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 44
br i1 %7, label %11, label %8
8: ; preds = %5
%9 = load i32, i32* %2
%10 = icmp eq i32 %9, 46
br label %11
11: ; preds = %8, %5, %1
%12 = phi i1 [ true, %5 ], [ true, %1 ], [ %10, %8 ]
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @spacep(i32 %0) {
switch i32 %0, label %2 [
i32 44, label %5
i32 32, label %5
]
2: ; preds = %1
%3 = icmp eq i32 %0, 46
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ]
ret i32 %6
}
char cast_int_char(int x) { return (char)x; }


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

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

LLVM IR (-O0):
define signext i8 @cast_int_char(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = trunc i32 %3 to i8
ret i8 %4
}

LLVM IR (-O2):
define signext i8 @cast_int_char(i32 %0) {
%2 = trunc i32 %0 to i8
ret i8 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
int _citrus_NONE_ctype_wcsrtombs(void *, char *, int /*<<< orphan*/ const **,
                                 size_t, int /*<<< orphan*/ *, size_t *);
int _citrus_NONE_ctype_wcstombs(void *__restrict cl, char *__restrict s,
                                const wchar_t *__restrict pwcs, size_t n,
                                size_t *__restrict nresult) {
  const wchar_t *rpwcs = pwcs;
  return (_citrus_NONE_ctype_wcsrtombs(cl, s, &rpwcs, n, NULL, nresult));
}


x86 assembly (clang, -O0):
<_citrus_NONE_ctype_wcstombs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r9
lea    -0x30(%rbp),%rdx
xor    %eax,%eax
mov    %eax,%r8d
call   1030 <_citrus_NONE_ctype_wcsrtombs@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_citrus_NONE_ctype_wcstombs>:
push   %rax
mov    %r8,%r9
mov    %rdx,(%rsp)
mov    %rsp,%rdx
xor    %r8d,%r8d
call   1030 <_citrus_NONE_ctype_wcsrtombs@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @_citrus_NONE_ctype_wcstombs(i8* noalias %0, i8* noalias %1, i32* noalias %2, i64 %3, i64* noalias %4) {
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32*
%9 = alloca i64
%10 = alloca i64*
%11 = alloca i32*
store i8* %0, i8** %6
store i8* %1, i8** %7
store i32* %2, i32** %8
store i64 %3, i64* %9
store i64* %4, i64** %10
%12 = load i32*, i32** %8
store i32* %12, i32** %11
%13 = load i8*, i8** %6
%14 = load i8*, i8** %7
%15 = load i64, i64* %9
%16 = load i64*, i64** %10
%17 = call i32 @_citrus_NONE_ctype_wcsrtombs(i8* %13, i8* %14, i32** %11, i64 %15, i32* null, i64* %16)
ret i32 %17
}

LLVM IR (-O2):
define i32 @_citrus_NONE_ctype_wcstombs(i8* noalias %0, i8* noalias %1, i32* noalias %2, i64 %3, i64* noalias %4) {
%6 = alloca i32*
%7 = bitcast i32** %6 to i8*
store i32* %2, i32** %6
%8 = call i32 @_citrus_NONE_ctype_wcsrtombs(i8* %0, i8* %1, i32** %6, i64 %3, i32* null, i64* %4)
ret i32 %8
}
long long bit61() { return 0x2000000000000000LL; }


x86 assembly (clang, -O0):
<bit61>:
push   %rbp
mov    %rsp,%rbp
movabs $0x2000000000000000,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bit61>:
movabs $0x2000000000000000,%rax
ret

LLVM IR (-O0):
define i64 @bit61() {
ret i64 2305843009213693952
}

LLVM IR (-O2):
define i64 @bit61() {
ret i64 2305843009213693952
}
/* Variables and functions */
int /*<<< orphan*/ sys_register_event(int, int, long, int /*<<< orphan*/);
void Register_DMA_Fix(void) {
  sys_register_event(6, 0x0B, ((1L << 16) | (1L << 24)) | 1, 0);
}


x86 assembly (clang, -O0):
<Register_DMA_Fix>:
push   %rbp
mov    %rsp,%rbp
mov    $0x6,%edi
mov    $0xb,%esi
mov    $0x1010001,%edx
xor    %ecx,%ecx
call   1030 <sys_register_event@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Register_DMA_Fix>:
mov    $0x1010001,%edx
mov    $0x6,%edi
mov    $0xb,%esi
xor    %ecx,%ecx
jmp    1030 <sys_register_event@plt>

LLVM IR (-O0):
define void @Register_DMA_Fix() {
%1 = call i32 @sys_register_event(i32 6, i32 11, i64 16842753, i32 0)
ret void
}

LLVM IR (-O2):
define void @Register_DMA_Fix() {
%1 = tail call i32 @sys_register_event(i32 6, i32 11, i64 16842753, i32 0)
ret void
}
/* Variables and functions */
scalar_t__ random_int();
double Random_Triangular(double mult) {
  return mult * ((double)(int)random_int() + (double)(int)random_int());
}


x86 assembly (clang, -O0):
<Random_Triangular>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    $0x0,%al
call   1030 <random_int@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    $0x0,%al
call   1030 <random_int@plt>
movsd  -0x18(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
cvtsi2sd %eax,%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Random_Triangular>:
sub    $0x18,%rsp
movsd  %xmm0,0x10(%rsp)
xor    %eax,%eax
call   1030 <random_int@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x8(%rsp)
xor    %eax,%eax
call   1030 <random_int@plt>
cvtsi2sd %eax,%xmm1
addsd  0x8(%rsp),%xmm1
movsd  0x10(%rsp),%xmm0
mulsd  %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @Random_Triangular(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i64 (...) @random_int()
%5 = trunc i64 %4 to i32
%6 = sitofp i32 %5 to double
%7 = call i64 (...) @random_int()
%8 = trunc i64 %7 to i32
%9 = sitofp i32 %8 to double
%10 = fadd double %6, %9
%11 = fmul double %3, %10
ret double %11
}

LLVM IR (-O2):
define double @Random_Triangular(double %0) {
%2 = tail call i64 (...) @random_int()
%3 = trunc i64 %2 to i32
%4 = sitofp i32 %3 to double
%5 = tail call i64 (...) @random_int()
%6 = trunc i64 %5 to i32
%7 = sitofp i32 %6 to double
%8 = fadd double %4, %7
%9 = fmul double %8, %0
ret double %9
}
/* Variables and functions */
char *nopath(char *);
int /*<<< orphan*/ printf(char *, char *, char *);
void show_version(char *argv) {
  printf("%s version %s\n", nopath(argv), "2.0");
}


x86 assembly (clang, -O0):
<show_version>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <nopath@plt>
mov    %rax,%rsi
lea    0xec1(%rip),%rdi
lea    0xec9(%rip),%rdx
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_version>:
push   %rax
call   1030 <nopath@plt>
lea    0xed3(%rip),%rdi
lea    0xedb(%rip),%rdx
mov    %rax,%rsi
pop    %rax
jmp    1040 <printf@plt>

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

LLVM IR (-O2):
@.str = [15 x i8] c"%s version %s\0A\00"
@.str.1 = [4 x i8] c"2.0\00"
define void @show_version(i8* %0) {
%2 = tail call i8* @nopath(i8* %0)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void gdk_drag_drop_succeeded() {}


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

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

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

LLVM IR (-O2):
define void @gdk_drag_drop_succeeded() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ test1();
int /*<<< orphan*/ test2();
int /*<<< orphan*/ test3();
int /*<<< orphan*/ test4();
int /*<<< orphan*/ test5();
int /*<<< orphan*/ test6();
int /*<<< orphan*/ test7();
int main(void) {
  test1();
  test2();
  test3();
  test4();
  test5();
  test6();
  test7();
  printf("Whew... survived.\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1060 <test1@plt>
mov    $0x0,%al
call   10a0 <test2@plt>
mov    $0x0,%al
call   1050 <test3@plt>
mov    $0x0,%al
call   1090 <test4@plt>
mov    $0x0,%al
call   1040 <test5@plt>
mov    $0x0,%al
call   1080 <test6@plt>
mov    $0x0,%al
call   1030 <test7@plt>
lea    0xe39(%rip),%rdi
call   1070 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1070 <test1@plt>
xor    %eax,%eax
call   10a0 <test2@plt>
xor    %eax,%eax
call   1060 <test3@plt>
xor    %eax,%eax
call   1090 <test4@plt>
xor    %eax,%eax
call   1050 <test5@plt>
xor    %eax,%eax
call   1080 <test6@plt>
xor    %eax,%eax
call   1040 <test7@plt>
lea    0xe47(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"Whew... survived.\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @test1()
%3 = call i32 (...) @test2()
%4 = call i32 (...) @test3()
%5 = call i32 (...) @test4()
%6 = call i32 (...) @test5()
%7 = call i32 (...) @test6()
%8 = call i32 (...) @test7()
%9 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [18 x i8] c"Whew... survived.\00"
define i32 @main() {
%1 = tail call i32 (...) @test1()
%2 = tail call i32 (...) @test2()
%3 = tail call i32 (...) @test3()
%4 = tail call i32 (...) @test4()
%5 = tail call i32 (...) @test5()
%6 = tail call i32 (...) @test6()
%7 = tail call i32 (...) @test7()
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
ret i32 0
}
deleteList() {}


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

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

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

LLVM IR (-O2):
define i32 @deleteList() {
ret i32 undef
}
/* Variables and functions */
int logf(int);
float exponentialcutoff(float theta, float percent) {
  percent = percent / 100.0;
  float x = (((-1) * logf(1 - percent)) * theta);
  return x;
}


x86 assembly (clang, -O0):
<exponentialcutoff>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xed5(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xeb8(%rip),%xmm0
subss  -0x8(%rbp),%xmm0
cvttss2si %xmm0,%edi
call   1030 <logf@plt>
imul   $0xffffffff,%eax,%eax
cvtsi2ss %eax,%xmm0
mulss  -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exponentialcutoff>:
push   %rax
movss  %xmm0,0x4(%rsp)
divss  0xee1(%rip),%xmm1
addss  0xedd(%rip),%xmm1
cvttss2si %xmm1,%edi
call   1030 <logf@plt>
neg    %eax
xorps  %xmm1,%xmm1
cvtsi2ss %eax,%xmm1
movss  0x4(%rsp),%xmm0
mulss  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @exponentialcutoff(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
store float %0, float* %3
store float %1, float* %4
%6 = load float, float* %4
%7 = fpext float %6 to double
%8 = fdiv double %7, 1.000000e+02
%9 = fptrunc double %8 to float
store float %9, float* %4
%10 = load float, float* %4
%11 = fsub float 1.000000e+00, %10
%12 = fptosi float %11 to i32
%13 = call i32 @logf(i32 %12)
%14 = mul nsw i32 -1, %13
%15 = sitofp i32 %14 to float
%16 = load float, float* %3
%17 = fmul float %15, %16
store float %17, float* %5
%18 = load float, float* %5
ret float %18
}

LLVM IR (-O2):
define float @exponentialcutoff(float %0, float %1) {
%3 = fdiv float %1, 1.000000e+02
%4 = fsub float 1.000000e+00, %3
%5 = fptosi float %4 to i32
%6 = tail call i32 @logf(i32 %5)
%7 = sub nsw i32 0, %6
%8 = sitofp i32 %7 to float
%9 = fmul float %8, %0
ret float %9
}
int mystrlen(char *str) {
  int i = 0;
  while (str[i] != '\0') {
    i++;
  }
  return i;
}


x86 assembly (clang, -O0):
<mystrlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1132 <mystrlen+0x32>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <mystrlen+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mystrlen>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <mystrlen+0x10>
ret

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

LLVM IR (-O2):
define i32 @mystrlen(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %7, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add nuw i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
ret i32 %9
}
unsigned int csum_fold(unsigned int sum) {
  sum = (sum & 0xffff) + (sum >> 16);
  sum = (sum & 0xffff) + (sum >> 16);
  return ~sum;
}


x86 assembly (clang, -O0):
<csum_fold>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xffff,%eax
mov    -0x4(%rbp),%ecx
shr    $0x10,%ecx
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xffff,%eax
mov    -0x4(%rbp),%ecx
shr    $0x10,%ecx
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
xor    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<csum_fold>:
movzwl %di,%eax
shr    $0x10,%edi
add    %edi,%eax
movzwl %ax,%ecx
shr    $0x10,%eax
add    %ecx,%eax
not    %eax
ret

LLVM IR (-O0):
define i32 @csum_fold(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 65535
%5 = load i32, i32* %2
%6 = lshr i32 %5, 16
%7 = add i32 %4, %6
store i32 %7, i32* %2
%8 = load i32, i32* %2
%9 = and i32 %8, 65535
%10 = load i32, i32* %2
%11 = lshr i32 %10, 16
%12 = add i32 %9, %11
store i32 %12, i32* %2
%13 = load i32, i32* %2
%14 = xor i32 %13, -1
ret i32 %14
}

LLVM IR (-O2):
define i32 @csum_fold(i32 %0) {
%2 = and i32 %0, 65535
%3 = lshr i32 %0, 16
%4 = add nuw nsw i32 %2, %3
%5 = and i32 %4, 65535
%6 = lshr i32 %4, 16
%7 = add nuw nsw i32 %5, %6
%8 = xor i32 %7, -1
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ EVP_cleanup();
int /*<<< orphan*/ dh_exit();
void cipher_exit(void) {
  dh_exit();
  EVP_cleanup();
}


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

x86 assembly (clang, -O2):
<cipher_exit>:
push   %rax
xor    %eax,%eax
call   1040 <dh_exit@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <EVP_cleanup@plt>

LLVM IR (-O0):
define void @cipher_exit() {
%1 = call i32 (...) @dh_exit()
%2 = call i32 (...) @EVP_cleanup()
ret void
}

LLVM IR (-O2):
define void @cipher_exit() {
%1 = tail call i32 (...) @dh_exit()
%2 = tail call i32 (...) @EVP_cleanup()
ret void
}
/* Forward declarations */
typedef struct pixel_gray TYPE_1__;

/* Type definitions */
struct pixel_gray {
  char m;
};

/* Variables and functions */
int /*<<< orphan*/ set_pixel_data(int, TYPE_1__ *);
int main() {
  struct pixel_gray {
    char m;
  } pg;
  struct pixel_color {
    char r;
    char g;
    char b;
  } pc;
  set_pixel_data(1, &pg);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x8(%rbp),%rsi
mov    $0x1,%edi
call   1030 <set_pixel_data@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    %rsp,%rsi
mov    $0x1,%edi
call   1030 <set_pixel_data@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.pixel_gray = type { i8 }
%struct.pixel_color = type { i8, i8, i8 }
%struct.pixel_gray.0 = type { i8 }
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.pixel_gray
%3 = alloca %struct.pixel_color
store i32 0, i32* %1
%4 = bitcast %struct.pixel_gray* %2 to %struct.pixel_gray.0*
%5 = call i32 @set_pixel_data(i32 1, %struct.pixel_gray.0* %4)
ret i32 0
}

LLVM IR (-O2):
%struct.pixel_gray = type { i8 }
%struct.pixel_color = type { i8, i8, i8 }
%struct.pixel_gray.0 = type { i8 }
define i32 @main() {
%1 = alloca %struct.pixel_gray
%2 = getelementptr inbounds %struct.pixel_gray, %struct.pixel_gray* %1, i64 0, i32 0
%3 = bitcast %struct.pixel_gray* %1 to %struct.pixel_gray.0*
%4 = call i32 @set_pixel_data(i32 1, %struct.pixel_gray.0* %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ keyboard_inputWait();
int /*<<< orphan*/ outb(int, unsigned char);
void keyboard_sendCommand(unsigned char command) {
  keyboard_inputWait();
  outb(0x64, command);
}


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

x86 assembly (clang, -O2):
<keyboard_sendCommand>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <keyboard_inputWait@plt>
mov    $0x64,%edi
mov    %ebx,%esi
pop    %rbx
jmp    1040 <outb@plt>

LLVM IR (-O0):
define void @keyboard_sendCommand(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call i32 (...) @keyboard_inputWait()
%4 = load i8, i8* %2
%5 = call i32 @outb(i32 100, i8 zeroext %4)
ret void
}

LLVM IR (-O2):
define void @keyboard_sendCommand(i8 zeroext %0) {
%2 = tail call i32 (...) @keyboard_inputWait()
%3 = tail call i32 @outb(i32 100, i8 zeroext %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ fpos_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int __infer_nondet_int();
int fsetpos(FILE *stream, const fpos_t *pos) {
  int success;
  FILE tmp;
  tmp = *stream;
  fpos_t t;
  t = *pos;
  success = __infer_nondet_int();
  if (success)
    return 0;
  else
    return -1;
}


x86 assembly (clang, -O0):
<fsetpos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x24(%rbp)
mov    $0x0,%al
call   1030 <__infer_nondet_int@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     1152 <fsetpos+0x42>
movl   $0x0,-0x4(%rbp)
jmp    1159 <fsetpos+0x49>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fsetpos>:
push   %rax
xor    %eax,%eax
call   1030 <__infer_nondet_int@plt>
cmp    $0x1,%eax
sbb    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @fsetpos(i32* %0, i32* %1) {
%3 = alloca i32
%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
%9 = load i32*, i32** %4
%10 = load i32, i32* %9
store i32 %10, i32* %7
%11 = load i32*, i32** %5
%12 = load i32, i32* %11
store i32 %12, i32* %8
%13 = call i32 (...) @__infer_nondet_int()
store i32 %13, i32* %6
%14 = load i32, i32* %6
%15 = icmp ne i32 %14, 0
br i1 %15, label %16, label %17
16: ; preds = %2
store i32 0, i32* %3
br label %18
17: ; preds = %2
store i32 -1, i32* %3
br label %18
18: ; preds = %17, %16
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
define i32 @fsetpos(i32* nocapture readnone %0, i32* nocapture readnone %1) {
%3 = tail call i32 (...) @__infer_nondet_int()
%4 = icmp eq i32 %3, 0
%5 = sext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
scalar_t__ islower(int);
int toupper(int c) {
  if (islower(c))
    return c + 'A' - 'a';
  else
    return c;
}


x86 assembly (clang, -O0):
<toupper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <islower@plt>
cmp    $0x0,%rax
je     113e <toupper+0x2e>
mov    -0x8(%rbp),%eax
add    $0x41,%eax
sub    $0x61,%eax
mov    %eax,-0x4(%rbp)
jmp    1144 <toupper+0x34>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<toupper>:
push   %rbx
mov    %edi,%ebx
call   1030 <islower@plt>
lea    -0x20(%rbx),%ecx
test   %rax,%rax
cmove  %ebx,%ecx
mov    %ecx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @toupper(i32 %0) {
%2 = tail call i64 @islower(i32 %0)
%3 = icmp eq i64 %2, 0
%4 = add nsw i32 %0, -32
%5 = select i1 %3, i32 %0, i32 %4
ret i32 %5
}
/* Type definitions */
struct cnt_deque_iterator {
  int dummy;
};
struct cnt_deque {
  int dummy;
};

/* Variables and functions */
struct cnt_deque_iterator *cnt_deque_iterator_both(struct cnt_deque const *,
                                                   int /*<<< orphan*/);
struct cnt_deque_iterator *
cnt_deque_reverse_iterator_new(const struct cnt_deque *cd) {
  return cnt_deque_iterator_both(cd, 0);
}


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

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

LLVM IR (-O0):
%struct.cnt_deque_iterator = type { i32 }
%struct.cnt_deque = type { i32 }
define %struct.cnt_deque_iterator* @cnt_deque_reverse_iterator_new(%struct.cnt_deque* %0) {
%2 = alloca %struct.cnt_deque*
store %struct.cnt_deque* %0, %struct.cnt_deque** %2
%3 = load %struct.cnt_deque*, %struct.cnt_deque** %2
%4 = call %struct.cnt_deque_iterator* @cnt_deque_iterator_both(%struct.cnt_deque* %3, i32 0)
ret %struct.cnt_deque_iterator* %4
}

LLVM IR (-O2):
%struct.cnt_deque_iterator = type { i32 }
%struct.cnt_deque = type { i32 }
define %struct.cnt_deque_iterator* @cnt_deque_reverse_iterator_new(%struct.cnt_deque* %0) {
%2 = tail call %struct.cnt_deque_iterator* @cnt_deque_iterator_both(%struct.cnt_deque* %0, i32 0)
ret %struct.cnt_deque_iterator* %2
}
/* Variables and functions */
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, size_t);
void *pvPortMalloc(size_t);
int /*<<< orphan*/ vPortFree(void *);
void *pvPortRealloc(void *ptr, size_t size) {
  vPortFree(ptr);
  ptr = pvPortMalloc(size);
  if (ptr != NULL)
    memset(ptr, 0, size);
  return ptr;
}


x86 assembly (clang, -O0):
<pvPortRealloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <vPortFree@plt>
mov    -0x10(%rbp),%rdi
call   1050 <pvPortMalloc@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1170 <pvPortRealloc+0x40>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
xor    %esi,%esi
call   1040 <memset@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pvPortRealloc>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
call   1030 <vPortFree@plt>
mov    %r14,%rdi
call   1050 <pvPortMalloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1159 <pvPortRealloc+0x29>
mov    %rbx,%rdi
xor    %esi,%esi
mov    %r14,%rdx
call   1040 <memset@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @pvPortRealloc(i8* %0, i64 %1) {
%3 = tail call i32 @vPortFree(i8* %0)
%4 = tail call i8* @pvPortMalloc(i64 %1)
%5 = icmp eq i8* %4, null
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 @memset(i8* %4, i32 0, i64 %1)
br label %8
8: ; preds = %6, %2
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ CP15ICacheFlushBuff(unsigned int, unsigned int);
void CacheInstInvalidateBuff(unsigned int startAddr, unsigned int numBytes) {
  CP15ICacheFlushBuff(startAddr, numBytes);
}


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

x86 assembly (clang, -O2):
<CacheInstInvalidateBuff>:
jmp    1030 <CP15ICacheFlushBuff@plt>

LLVM IR (-O0):
define void @CacheInstInvalidateBuff(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 @CP15ICacheFlushBuff(i32 %5, i32 %6)
ret void
}

LLVM IR (-O2):
define void @CacheInstInvalidateBuff(i32 %0, i32 %1) {
%3 = tail call i32 @CP15ICacheFlushBuff(i32 %0, i32 %1)
ret void
}
int f2(int x, int y) { return (x - y); }


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

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

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

LLVM IR (-O2):
define i32 @f2(i32 %0, i32 %1) {
%3 = sub nsw i32 %0, %1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ __coverity_panic__();
void exit_test(const int quit_application) { __coverity_panic__(); }


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

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

LLVM IR (-O0):
define void @exit_test(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @__coverity_panic__()
ret void
}

LLVM IR (-O2):
define void @exit_test(i32 %0) {
%2 = tail call i32 (...) @__coverity_panic__()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ HplMsp430GeneralIOP__5__IO__set();
void Msp430GpioC__12__HplGeneralIO__set(void) {
  HplMsp430GeneralIOP__5__IO__set();
}


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

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

LLVM IR (-O0):
define void @Msp430GpioC__12__HplGeneralIO__set() {
%1 = call i32 (...) @HplMsp430GeneralIOP__5__IO__set()
ret void
}

LLVM IR (-O2):
define void @Msp430GpioC__12__HplGeneralIO__set() {
%1 = tail call i32 (...) @HplMsp430GeneralIOP__5__IO__set()
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int tv_sec;
  int tv_usec;
};
struct utmp {
  TYPE_1__ ut_tv;
  int /*<<< orphan*/ member_0;
};

/* Variables and functions */
int main(void) {
  struct utmp ut = {0};
  return ut.ut_tv.tv_sec + ut.ut_tv.tv_usec;
}


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

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

LLVM IR (-O0):
%struct.utmp = type { %struct.TYPE_2__, i32 }
%struct.TYPE_2__ = type { i32, i32 }
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.utmp
store i32 0, i32* %1
%3 = bitcast %struct.utmp* %2 to i8*
%4 = getelementptr inbounds %struct.utmp, %struct.utmp* %2, i32 0, i32 0
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i32, i32* %5
%7 = getelementptr inbounds %struct.utmp, %struct.utmp* %2, i32 0, i32 0
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 1
%9 = load i32, i32* %8
%10 = add nsw i32 %6, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
void foo576() {}


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

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

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

LLVM IR (-O2):
define void @foo576() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void yyEnWinfree(void *ptr) { free((char *)ptr); }


x86 assembly (clang, -O0):
<yyEnWinfree>:
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):
<yyEnWinfree>:
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @yyEnWinfree(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 @yyEnWinfree(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int print(int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void error_not_number(int64_t val) {
  fprintf(stderr, "expected a number: %#010x\n", print(val));
  exit(1);
}


x86 assembly (clang, -O0):
<error_not_number>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2e9e(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <print@plt>
mov    -0x8(%rbp),%edi
mov    %eax,%edx
lea    0xea5(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<error_not_number>:
push   %rbx
mov    0x2ea8(%rip),%rax
mov    (%rax),%ebx
call   1030 <print@plt>
lea    0xeba(%rip),%rsi
mov    %ebx,%edi
mov    %eax,%edx
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [27 x i8] c"expected a number: %x\0A\00"
define void @error_not_number(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stderr
%4 = load i32, i32* %2
%5 = call i32 @print(i32 %4)
%6 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [27 x i8] c"expected a number: %x\0A\00"
define void @error_not_number(i32 %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @print(i32 %0)
%4 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i32 @exit(i32 1)
unreachable
}
int count_commas(char *s) {
  int counter = 0;
  for (char *c = s; *c != '\0'; c++) {
    counter += (*c == ',');
  }
  return counter;
}


x86 assembly (clang, -O0):
<count_commas>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1150 <count_commas+0x50>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2c,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1117 <count_commas+0x17>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<count_commas>:
mov    (%rdi),%cl
test   %cl,%cl
je     1126 <count_commas+0x26>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
xor    %edx,%edx
cmp    $0x2c,%cl
sete   %dl
add    %edx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <count_commas+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @count_commas(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %6, %1
%5 = phi i32 [ 0, %1 ], [ %12, %6 ]
ret i32 %5
6: ; preds = %1, %6
%7 = phi i8 [ %14, %6 ], [ %2, %1 ]
%8 = phi i8* [ %13, %6 ], [ %0, %1 ]
%9 = phi i32 [ %12, %6 ], [ 0, %1 ]
%10 = icmp eq i8 %7, 44
%11 = zext i1 %10 to i32
%12 = add nuw nsw i32 %9, %11
%13 = getelementptr inbounds i8, i8* %8, i64 1
%14 = load i8, i8* %13
%15 = icmp eq i8 %14, 0
br i1 %15, label %4, label %6
}
void f4() { const unsigned char G___152598331 = 0; }


x86 assembly (clang, -O0):
<f4>:
push   %rbp
mov    %rsp,%rbp
movb   $0x0,-0x1(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @f4() {
%1 = alloca i8
store i8 0, i8* %1
ret void
}

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