xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ ft_memcpy(char *, char const *, int);
int ft_strlen(char const *);
char *ft_strcat(char *s1, const char *s2) {
  ft_memcpy(s1 + ft_strlen(s1), s2, ft_strlen(s2) + 1);
  return (s1);
}


x86 assembly (clang, -O0):
<ft_strcat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <ft_strlen@plt>
mov    %eax,%ecx
mov    -0x28(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <ft_strlen@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
add    $0x1,%edx
call   1040 <ft_memcpy@plt>
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_strcat>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
call   1030 <ft_strlen@plt>
movslq %eax,%rbx
add    %r15,%rbx
mov    %r14,%rdi
call   1030 <ft_strlen@plt>
lea    0x1(%rax),%edx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <ft_memcpy@plt>
mov    %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @ft_strcat(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %3
%7 = call i32 @ft_strlen(i8* %6)
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %5, i64 %8
%10 = load i8*, i8** %4
%11 = load i8*, i8** %4
%12 = call i32 @ft_strlen(i8* %11)
%13 = add nsw i32 %12, 1
%14 = call i32 @ft_memcpy(i8* %9, i8* %10, i32 %13)
%15 = load i8*, i8** %3
ret i8* %15
}

LLVM IR (-O2):
define i8* @ft_strcat(i8* returned %0, i8* %1) {
%3 = tail call i32 @ft_strlen(i8* %0)
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = tail call i32 @ft_strlen(i8* %1)
%7 = add nsw i32 %6, 1
%8 = tail call i32 @ft_memcpy(i8* %5, i8* %1, i32 %7)
ret i8* %0
}
void Sys_FS_UnlockFile(void *handle) {}


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

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

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

LLVM IR (-O2):
define void @Sys_FS_UnlockFile(i8* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
scalar_t__ iv_size(int /*<<< orphan*/ *);
bool iv_is_empty(int32_t *v) { return v == NULL || iv_size(v) == 0; }


x86 assembly (clang, -O0):
<iv_is_empty>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x1,%al
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     113f <iv_is_empty+0x2f>
mov    -0x8(%rbp),%rdi
call   1030 <iv_size@plt>
cmp    $0x0,%rax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iv_is_empty>:
test   %rdi,%rdi
je     112b <iv_is_empty+0x1b>
push   %rax
call   1030 <iv_size@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
add    $0x8,%rsp
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @iv_is_empty(i32* %0) {
%2 = icmp eq i32* %0, null
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = tail call i64 @iv_size(i32* %0)
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %1
%8 = phi i32 [ 1, %1 ], [ %6, %3 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void *calloc(size_t, size_t);
void *xcalloc(size_t n, size_t m) {
  void *v;
  v = calloc(n, m);
  if (!v)
    abort();
  return v;
}


x86 assembly (clang, -O0):
<xcalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <calloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1153 <xcalloc+0x33>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xcalloc>:
push   %rax
call   1040 <calloc@plt>
test   %rax,%rax
je     112d <xcalloc+0xd>
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

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

LLVM IR (-O2):
define noalias i8* @xcalloc(i64 %0, i64 %1) {
%3 = tail call i8* @calloc(i64 %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 (...) @abort()
unreachable
7: ; preds = %2
ret i8* %3
}
void init_array(char *array) {
  int i, s = 0;
  s = sizeof(array);
  for (i = 0; i < s; i++)
    array[i] = '\0';
}


x86 assembly (clang, -O0):
<init_array>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x8,-0x10(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1143 <init_array+0x43>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    111d <init_array+0x1d>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_array>:
movq   $0x0,(%rdi)
ret

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

LLVM IR (-O2):
define void @init_array(i8* nocapture writeonly %0) {
%2 = bitcast i8* %0 to i64*
store i64 0, i64* %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(unsigned char *, unsigned char *, unsigned int);
void MD5_memcpy(unsigned char *output, unsigned char *input, unsigned int len) {
  memcpy(output, input, len);
}


x86 assembly (clang, -O0):
<MD5_memcpy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <memcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MD5_memcpy>:
jmp    1030 <memcpy@plt>

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

LLVM IR (-O2):
define void @MD5_memcpy(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @memcpy(i8* %0, i8* %1, i32 %2)
ret void
}
/* Type definitions */
struct _mgmt_sysinfo_req {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ osapi_free(struct _mgmt_sysinfo_req *);
void mgmt_sysinfo_req_free(struct _mgmt_sysinfo_req *ptr) { osapi_free(ptr); }


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

x86 assembly (clang, -O2):
<mgmt_sysinfo_req_free>:
jmp    1030 <osapi_free@plt>

LLVM IR (-O0):
%struct._mgmt_sysinfo_req = type { i32 }
define void @mgmt_sysinfo_req_free(%struct._mgmt_sysinfo_req* %0) {
%2 = alloca %struct._mgmt_sysinfo_req*
store %struct._mgmt_sysinfo_req* %0, %struct._mgmt_sysinfo_req** %2
%3 = load %struct._mgmt_sysinfo_req*, %struct._mgmt_sysinfo_req** %2
%4 = call i32 @osapi_free(%struct._mgmt_sysinfo_req* %3)
ret void
}

LLVM IR (-O2):
%struct._mgmt_sysinfo_req = type { i32 }
define void @mgmt_sysinfo_req_free(%struct._mgmt_sysinfo_req* %0) {
%2 = tail call i32 @osapi_free(%struct._mgmt_sysinfo_req* %0)
ret void
}
/* Type definitions */
struct proctal {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ proctal_implementation_watch_stop(struct proctal *);
void proctal_watch_stop(struct proctal *p) {
  proctal_implementation_watch_stop(p);
}


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

x86 assembly (clang, -O2):
<proctal_watch_stop>:
jmp    1030 <proctal_implementation_watch_stop@plt>

LLVM IR (-O0):
%struct.proctal = type { i32 }
define void @proctal_watch_stop(%struct.proctal* %0) {
%2 = alloca %struct.proctal*
store %struct.proctal* %0, %struct.proctal** %2
%3 = load %struct.proctal*, %struct.proctal** %2
%4 = call i32 @proctal_implementation_watch_stop(%struct.proctal* %3)
ret void
}

LLVM IR (-O2):
%struct.proctal = type { i32 }
define void @proctal_watch_stop(%struct.proctal* %0) {
%2 = tail call i32 @proctal_implementation_watch_stop(%struct.proctal* %0)
ret void
}
/* Variables and functions */
int db_add_playlist(char **, char *, int, char *, char *, int, int *);
int pi_db_add_playlist(char **pe, char *name, int type, char *clause,
                       char *path, int index, int *playlistid) {
  return db_add_playlist(pe, name, type, clause, path, index, playlistid);
}


x86 assembly (clang, -O0):
<pi_db_add_playlist>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x2c(%rbp),%r9d
mov    0x10(%rbp),%rax
mov    %rax,(%rsp)
call   1030 <db_add_playlist@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pi_db_add_playlist>:
jmp    1030 <db_add_playlist@plt>

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

LLVM IR (-O2):
define i32 @pi_db_add_playlist(i8** %0, i8* %1, i32 %2, i8* %3, i8* %4, i32 %5, i32* %6) {
%8 = tail call i32 @db_add_playlist(i8** %0, i8* %1, i32 %2, i8* %3, i8* %4, i32 %5, i32* %6)
ret i32 %8
}
void processor_explicatory_abort(void *process_state) {}


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

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

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

LLVM IR (-O2):
define void @processor_explicatory_abort(i8* nocapture %0) {
ret void
}
int test_imm_CCint8_reg(signed char val) {
  return ((val) & (0xCC << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_CCint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
and    $0xcc,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_CCint8_reg>:
test   $0xcc,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_CCint8_reg(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = and i32 %4, 204
%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_CCint8_reg(i8 signext %0) {
%2 = and i8 %0, -52
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
char *skipWhite(char *start) {
  while (*start == ' ' || *start == '\t')
    start++;
  return start;
}


x86 assembly (clang, -O0):
<skipWhite>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x9(%rbp)
je     112d <skipWhite+0x2d>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    113d <skipWhite+0x3d>
jmp    114e <skipWhite+0x4e>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <skipWhite+0x8>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i8* @skipWhite(i8* %0) {
br label %2
2: ; preds = %5, %1
%3 = phi i8* [ %0, %1 ], [ %6, %5 ]
%4 = load i8, i8* %3
switch i8 %4, label %7 [
i8 32, label %5
i8 9, label %5
]
5: ; preds = %2, %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
7: ; preds = %2
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ c(char *);
int /*<<< orphan*/ mark_back();
void QuestDo() {
  c("(?do)");
  mark_back();
}


x86 assembly (clang, -O0):
<QuestDo>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <c@plt>
mov    $0x0,%al
call   1030 <mark_back@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<QuestDo>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <c@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <mark_back@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"(?do)\00"
define void @QuestDo() {
%1 = call i32 @c(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @mark_back()
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"(?do)\00"
define void @QuestDo() {
%1 = tail call i32 @c(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @mark_back()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
void err_exit(char *msg) {
  perror(msg);
  exit(1);
}


x86 assembly (clang, -O0):
<err_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<err_exit>:
push   %rax
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @err_exit(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @perror(i8* %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @err_exit(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
void eng_msg_loop() {}


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

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

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

LLVM IR (-O2):
define void @eng_msg_loop() {
ret void
}
int test_imm_1Euint64_lowword_reg(unsigned long long val) {
  return ((val) & (0x1E << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_1Euint64_lowword_reg>:
test   $0x1e,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_1Euint64_lowword_reg(i64 %0) {
%2 = and i64 %0, 30
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_mode;
};

/* Variables and functions */
scalar_t__ S_ISDIR(int /*<<< orphan*/);
int /*<<< orphan*/ stat(char const *, struct stat *);
bool is_dir(const char *path) {
  struct stat statbuf;
  stat(path, &statbuf);
  if (S_ISDIR(statbuf.st_mode))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<is_dir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <stat@plt>
mov    -0x18(%rbp),%edi
call   1030 <S_ISDIR@plt>
cmp    $0x0,%rax
je     1157 <is_dir+0x37>
movl   $0x1,-0x4(%rbp)
jmp    115e <is_dir+0x3e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_dir>:
push   %rax
mov    %rsp,%rsi
call   1040 <stat@plt>
mov    (%rsp),%edi
call   1030 <S_ISDIR@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @is_dir(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca %struct.stat
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i32 @stat(i8* %5, %struct.stat* %4)
%7 = getelementptr inbounds %struct.stat, %struct.stat* %4, i32 0, i32 0
%8 = load i32, i32* %7
%9 = call i64 @S_ISDIR(i32 %8)
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %1
store i32 1, i32* %2
br label %13
12: ; preds = %1
store i32 0, i32* %2
br label %13
13: ; preds = %12, %11
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @is_dir(i8* nocapture %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i32 @stat(i8* %0, %struct.stat* %2)
%5 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%6 = load i32, i32* %5
%7 = tail call i64 @S_ISDIR(i32 %6)
%8 = icmp ne i64 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}
/* Variables and functions */
char *mbo_filename(void) { return NULL; }


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

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

LLVM IR (-O0):
define i8* @mbo_filename() {
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @mbo_filename() {
ret i8* null
}
/* Variables and functions */
long double nan(char const *);
long double nanl(const char *s) { return nan(s); }


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

x86 assembly (clang, -O2):
<nanl>:
jmp    1030 <nan@plt>

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

LLVM IR (-O2):
define x86_fp80 @nanl(i8* %0) {
%2 = tail call x86_fp80 @nan(i8* %0)
ret x86_fp80 %2
}
/* Variables and functions */
int /*<<< orphan*/ generateGrayCode(int);
int /*<<< orphan*/ getchar();
int main() {
  generateGrayCode(4);
  getchar();
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x4,%edi
call   1040 <generateGrayCode@plt>
xor    %eax,%eax
call   1030 <getchar@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @generateGrayCode(i32 4)
%2 = tail call i32 (...) @getchar()
ret i32 0
}
long DynamicOperation(long n1, long n2) { return n1 * n2; }


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

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

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

LLVM IR (-O2):
define i64 @DynamicOperation(i64 %0, i64 %1) {
%3 = mul nsw i64 %1, %0
ret i64 %3
}
void error(void) {
  {
  ERROR:;
    goto ERROR;
    return;
  }
}


x86 assembly (clang, -O0):
<error>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <error+0x9>
jmp    1109 <error+0x9>

x86 assembly (clang, -O2):
<error>:
jmp    1100 <error>

LLVM IR (-O0):
define void @error() {
br label %1
1: ; preds = %1, %0
br label %1
}

LLVM IR (-O2):
define void @error() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ bar();
void foo(void) {
#pragma omp target teams
  {
#pragma omp parallel
    {}
    bar();
#pragma omp parallel
    {}
  }
}


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

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

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

LLVM IR (-O2):
define void @foo() {
%1 = tail call i32 (...) @bar()
ret void
}
void msleep(unsigned long x) {}


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

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

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

LLVM IR (-O2):
define void @msleep(i64 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isbdigit(int);
void t_isbdigit_0xb4() {
  Assert_real((isbdigit(180) == 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_isbdigit.c",
              905, ("isbdigit should be 0 for 0xb4"));
}


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

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

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

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isbdigit.c\00"
@.str.1 = [30 x i8] c"isbdigit should be 0 for 0xb4\00"
define void @t_isbdigit_0xb4() {
%1 = tail call i64 @isbdigit(i32 180)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 905, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cout(char);
void putchar(char c) {
  if (c == '\n') {
    cout('\r');
  }
  cout(c);
}


x86 assembly (clang, -O0):
<putchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0xa,%eax
jne    1135 <putchar+0x25>
mov    $0xd,%edi
call   1030 <cout@plt>
movsbl -0x1(%rbp),%edi
call   1030 <cout@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putchar>:
push   %rbx
mov    %edi,%ebx
cmp    $0xa,%bl
jne    1122 <putchar+0x12>
mov    $0xd,%edi
call   1030 <cout@plt>
movsbl %bl,%edi
pop    %rbx
jmp    1030 <cout@plt>

LLVM IR (-O0):
define void @putchar(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 10
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @cout(i8 signext 13)
br label %8
8: ; preds = %6, %1
%9 = load i8, i8* %2
%10 = call i32 @cout(i8 signext %9)
ret void
}

LLVM IR (-O2):
define void @putchar(i8 signext %0) {
%2 = icmp eq i8 %0, 10
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @cout(i8 signext 13)
br label %5
5: ; preds = %3, %1
%6 = tail call i32 @cout(i8 signext %0)
ret void
}
/* Type definitions */
typedef double int32_t;

/* Variables and functions */
int /*<<< orphan*/ _pos_goto(double, double);
void pos_rotate_rad(double rad) {
  int32_t length = rad * 32;
  _pos_goto(-length, length);
}


x86 assembly (clang, -O0):
<pos_rotate_rad>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xedb(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <_pos_goto@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pos_rotate_rad>:
movapd %xmm0,%xmm1
mulsd  0xee4(%rip),%xmm1
movapd 0xeec(%rip),%xmm0
xorpd  %xmm1,%xmm0
jmp    1030 <_pos_goto@plt>

LLVM IR (-O0):
define void @pos_rotate_rad(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = fmul double %4, 3.200000e+01
store double %5, double* %3
%6 = load double, double* %3
%7 = fneg double %6
%8 = load double, double* %3
%9 = call i32 @_pos_goto(double %7, double %8)
ret void
}

LLVM IR (-O2):
define void @pos_rotate_rad(double %0) {
%2 = fmul double %0, 3.200000e+01
%3 = fneg double %2
%4 = tail call i32 @_pos_goto(double %3, double %2)
ret void
}
/* Variables and functions */
char *strtok_r(char *, char const *, char **);
char *strtokAndTrim(char *s1, const char *s2, char **s3) {
  char *str = strtok_r(s1, s2, s3);
  return str;
}


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

x86 assembly (clang, -O2):
<strtokAndTrim>:
jmp    1030 <strtok_r@plt>

LLVM IR (-O0):
define i8* @strtokAndTrim(i8* %0, i8* %1, i8** %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8**
%7 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8** %2, i8*** %6
%8 = load i8*, i8** %4
%9 = load i8*, i8** %5
%10 = load i8**, i8*** %6
%11 = call i8* @strtok_r(i8* %8, i8* %9, i8** %10)
store i8* %11, i8** %7
%12 = load i8*, i8** %7
ret i8* %12
}

LLVM IR (-O2):
define i8* @strtokAndTrim(i8* %0, i8* nocapture %1, i8** %2) {
%4 = tail call i8* @strtok_r(i8* %0, i8* %1, i8** %2)
ret i8* %4
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
int32_t return_int32_1() { return -1073741824; }


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

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

LLVM IR (-O0):
define i32 @return_int32_1() {
ret i32 -1073741824
}

LLVM IR (-O2):
define i32 @return_int32_1() {
ret i32 -1073741824
}
/* Type definitions */
struct multiply_fcb_line_attr {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct multiply_fcb_line_attr *);
int multiply_fcb_line_attr_destroy(struct multiply_fcb_line_attr *attr) {
  free(attr);
  return 0;
}


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

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

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

LLVM IR (-O2):
%struct.multiply_fcb_line_attr = type { i32 }
define i32 @multiply_fcb_line_attr_destroy(%struct.multiply_fcb_line_attr* nocapture %0) {
%2 = tail call i32 @free(%struct.multiply_fcb_line_attr* %0)
ret i32 0
}
void giveMeUnsafePointer(const int *param) {}


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

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

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

LLVM IR (-O2):
define void @giveMeUnsafePointer(i32* nocapture %0) {
ret void
}
signed int signedint_ignoring_signedlong(signed int x, signed long y) {
  return x;
}


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

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

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

LLVM IR (-O2):
define i32 @signedint_ignoring_signedlong(i32 returned %0, i64 %1) {
ret i32 %0
}
void radio_df_ant_switching_pin_sel_cfg(void) {}


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

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

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

LLVM IR (-O2):
define void @radio_df_ant_switching_pin_sel_cfg() {
ret void
}
signed int rt_thread_setconcurrency(signed int nthr) {
  signed int status = 0;
  return status;
}


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

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

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

LLVM IR (-O2):
define i32 @rt_thread_setconcurrency(i32 %0) {
ret i32 0
}
void mhl_unpowered_detected_1k(void) {}


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

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

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

LLVM IR (-O2):
define void @mhl_unpowered_detected_1k() {
ret void
}
/* Type definitions */
struct script_stack_element {
  int dummy;
};
typedef int /*<<< orphan*/ mpz_t;

/* Variables and functions */
int /*<<< orphan*/ get_num(struct script_stack_element *, int /*<<< orphan*/);
int /*<<< orphan*/ mpz_clear(int /*<<< orphan*/);
unsigned int mpz_get_ui(int /*<<< orphan*/);
int /*<<< orphan*/ mpz_init(int /*<<< orphan*/);
unsigned int get_uint32(struct script_stack_element *element) {
  mpz_t r;
  mpz_init(r);
  get_num(element, r);
  unsigned int v = mpz_get_ui(r);
  mpz_clear(r);
  return v;
}


x86 assembly (clang, -O0):
<get_uint32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0xc(%rbp),%edi
call   1040 <mpz_init@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <get_num@plt>
mov    -0xc(%rbp),%edi
call   1050 <mpz_get_ui@plt>
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%edi
call   1060 <mpz_clear@plt>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_uint32>:
push   %rbx
mov    %rdi,%rbx
call   1040 <mpz_init@plt>
mov    %rbx,%rdi
call   1030 <get_num@plt>
call   1050 <mpz_get_ui@plt>
mov    %eax,%ebx
call   1060 <mpz_clear@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.script_stack_element = type { i32 }
define i32 @get_uint32(%struct.script_stack_element* %0) {
%2 = alloca %struct.script_stack_element*
%3 = alloca i32
%4 = alloca i32
store %struct.script_stack_element* %0, %struct.script_stack_element** %2
%5 = load i32, i32* %3
%6 = call i32 @mpz_init(i32 %5)
%7 = load %struct.script_stack_element*, %struct.script_stack_element** %2
%8 = load i32, i32* %3
%9 = call i32 @get_num(%struct.script_stack_element* %7, i32 %8)
%10 = load i32, i32* %3
%11 = call i32 @mpz_get_ui(i32 %10)
store i32 %11, i32* %4
%12 = load i32, i32* %3
%13 = call i32 @mpz_clear(i32 %12)
%14 = load i32, i32* %4
ret i32 %14
}

LLVM IR (-O2):
%struct.script_stack_element = type { i32 }
define i32 @get_uint32(%struct.script_stack_element* %0) {
%2 = tail call i32 @mpz_init(i32 undef)
%3 = tail call i32 @get_num(%struct.script_stack_element* %0, i32 undef)
%4 = tail call i32 @mpz_get_ui(i32 undef)
%5 = tail call i32 @mpz_clear(i32 undef)
ret i32 %4
}
void genc_ueq_d() {}


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

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

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

LLVM IR (-O2):
define void @genc_ueq_d() {
ret void
}
/* Variables and functions */
double fmod(double, double);
double nan(const char *tagp) {
  tagp = tagp;
  return fmod(1.0, 0.0);
}


x86 assembly (clang, -O0):
<nan>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
movsd  0xed4(%rip),%xmm0
xorps  %xmm1,%xmm1
call   1030 <fmod@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nan>:
movsd  0xee8(%rip),%xmm0
xorps  %xmm1,%xmm1
jmp    1030 <fmod@plt>

LLVM IR (-O0):
define double @nan(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
store i8* %3, i8** %2
%4 = call double @fmod(double 1.000000e+00, double 0.000000e+00)
ret double %4
}

LLVM IR (-O2):
define double @nan(i8* nocapture readnone %0) {
%2 = tail call double @fmod(double 1.000000e+00, double 0.000000e+00)
ret double %2
}
/* Type definitions */
typedef int uint8_t;
typedef int const uint16_t;

/* Variables and functions */
uint16_t s337_get_length(const uint8_t *p_s337) {
  return (p_s337[6] << 8) | p_s337[7];
}


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

x86 assembly (clang, -O2):
<s337_get_length>:
mov    0x18(%rdi),%eax
shl    $0x8,%eax
or     0x1c(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @s337_get_length(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 6
%5 = load i32, i32* %4
%6 = shl i32 %5, 8
%7 = load i32*, i32** %2
%8 = getelementptr inbounds i32, i32* %7, i64 7
%9 = load i32, i32* %8
%10 = or i32 %6, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @s337_get_length(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 6
%3 = load i32, i32* %2
%4 = shl i32 %3, 8
%5 = getelementptr inbounds i32, i32* %0, i64 7
%6 = load i32, i32* %5
%7 = or i32 %4, %6
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ p;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int, int, int, int, int);
int main() {
  int x = 10;
  int *p = &x;
  printf(
      "char=%d, short=%d, int=%d, long=%d, float=%d, double=%d, pointer=%d\n",
      sizeof(char), sizeof(short), sizeof(int), sizeof(long), sizeof(float),
      sizeof(double), sizeof(p));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
lea    0xecb(%rip),%rdi
mov    $0x1,%esi
mov    $0x2,%edx
mov    $0x4,%r9d
mov    $0x8,%r8d
mov    %r9d,%ecx
movl   $0x8,(%rsp)
movl   $0x8,0x8(%rsp)
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x1,%esi
mov    $0x2,%edx
mov    $0x4,%ecx
mov    $0x8,%r8d
mov    $0x4,%r9d
push   $0x8
push   $0x8
call   1030 <printf@plt>
add    $0x10,%rsp
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [69 x i8] c"char=%d, short=%d, int=%d, long=%d, float=%d, double=%d, pointer=%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32*
store i32 0, i32* %1
store i32 10, i32* %2
store i32* %2, i32** %3
%4 = call i32 @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str, i64 0, i64 0), i32 1, i32 2, i32 4, i32 8, i32 4, i32 8, i32 8)
ret i32 0
}

LLVM IR (-O2):
@.str = [69 x i8] c"char=%d, short=%d, int=%d, long=%d, float=%d, double=%d, pointer=%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str, i64 0, i64 0), i32 1, i32 2, i32 4, i32 8, i32 4, i32 8, i32 8)
ret i32 0
}
int underapprox_min_minus_min_linear_CAF(int x) {
  int size1[1];
  int y = 10;
  if (x < 5)
    y = x + 20;
  if (y > 24) {
    size1[-1] = 0;
  }
  return y;
}


x86 assembly (clang, -O0):
<underapprox_min_minus_min_linear_CAF>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0xa,-0xc(%rbp)
cmpl   $0x5,-0x4(%rbp)
jge    1121 <underapprox_min_minus_min_linear_CAF+0x21>
mov    -0x4(%rbp),%eax
add    $0x14,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x18,-0xc(%rbp)
jle    1132 <underapprox_min_minus_min_linear_CAF+0x32>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<underapprox_min_minus_min_linear_CAF>:
lea    0x14(%rdi),%ecx
cmp    $0x5,%edi
mov    $0xa,%eax
cmovl  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @underapprox_min_minus_min_linear_CAF(i32 %0) {
%2 = alloca i32
%3 = alloca [1 x i32]
%4 = alloca i32
store i32 %0, i32* %2
store i32 10, i32* %4
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 5
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i32, i32* %2
%9 = add nsw i32 %8, 20
store i32 %9, i32* %4
br label %10
10: ; preds = %7, %1
%11 = load i32, i32* %4
%12 = icmp sgt i32 %11, 24
br i1 %12, label %13, label %15
13: ; preds = %10
%14 = getelementptr inbounds [1 x i32], [1 x i32]* %3, i64 0, i64 -1
store i32 0, i32* %14
br label %15
15: ; preds = %13, %10
%16 = load i32, i32* %4
ret i32 %16
}

LLVM IR (-O2):
define i32 @underapprox_min_minus_min_linear_CAF(i32 %0) {
%2 = icmp slt i32 %0, 5
%3 = add nsw i32 %0, 20
%4 = select i1 %2, i32 %3, i32 10
ret i32 %4
}
unsigned long spi_read_reg(unsigned int regnum) {
  volatile unsigned long *base = (volatile unsigned long *)0x80004000;
  return base[regnum];
}


x86 assembly (clang, -O0):
<spi_read_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x80004000,%eax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x4(%rbp),%ecx
mov    (%rax,%rcx,8),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<spi_read_reg>:
mov    %edi,%eax
mov    $0x80004000,%ecx
mov    (%rcx,%rax,8),%rax
ret

LLVM IR (-O0):
define i64 @spi_read_reg(i32 %0) {
%2 = alloca i32
%3 = alloca i64*
store i32 %0, i32* %2
store i64* inttoptr (i64 2147500032 to i64*), i64** %3
%4 = load i64*, i64** %3
%5 = load i32, i32* %2
%6 = zext i32 %5 to i64
%7 = getelementptr inbounds i64, i64* %4, i64 %6
%8 = load volatile i64, i64* %7
ret i64 %8
}

LLVM IR (-O2):
define i64 @spi_read_reg(i32 %0) {
%2 = zext i32 %0 to i64
%3 = getelementptr inbounds i64, i64* inttoptr (i64 2147500032 to i64*), i64 %2
%4 = load volatile i64, i64* %3
ret i64 %4
}
void gtk_progress_bar_new() {}


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

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

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

LLVM IR (-O2):
define void @gtk_progress_bar_new() {
ret void
}
int withinSameBlock(int *ptr1, int *ptr2) { return 2; }


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

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

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

LLVM IR (-O2):
define i32 @withinSameBlock(i32* nocapture readnone %0, i32* nocapture readnone %1) {
ret i32 2
}
/* Variables and functions */
scalar_t__ RAND_MAX;
int random();
float random_double() {
  int x;
  double f;
  x = random();
  f = (double)x / (double)RAND_MAX;
  return f;
}


x86 assembly (clang, -O0):
<random_double>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <random@plt>
mov    %eax,-0x4(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
mov    0x2eba(%rip),%rax
cvtsi2sdq (%rax),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<random_double>:
push   %rax
xor    %eax,%eax
call   1030 <random@plt>
cvtsi2sd %eax,%xmm0
mov    0x2ec5(%rip),%rax
cvtsi2sdq (%rax),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@RAND_MAX = global i64 0
define float @random_double() {
%1 = alloca i32
%2 = alloca double
%3 = call i32 (...) @random()
store i32 %3, i32* %1
%4 = load i32, i32* %1
%5 = sitofp i32 %4 to double
%6 = load i64, i64* @RAND_MAX
%7 = sitofp i64 %6 to double
%8 = fdiv double %5, %7
store double %8, double* %2
%9 = load double, double* %2
%10 = fptrunc double %9 to float
ret float %10
}

LLVM IR (-O2):
@RAND_MAX = global i64 0
define float @random_double() {
%1 = tail call i32 (...) @random()
%2 = sitofp i32 %1 to double
%3 = load i64, i64* @RAND_MAX
%4 = sitofp i64 %3 to double
%5 = fdiv double %2, %4
%6 = fptrunc double %5 to float
ret float %6
}
void TRACE_ALLOC_INF_FMT(const char *const format, ...) {}


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

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

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

LLVM IR (-O2):
define void @TRACE_ALLOC_INF_FMT(i8* nocapture %0, ...) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
scalar_t__ test_add_num_num(unsigned int, unsigned int);
void check_add_num_num(unsigned int number_of_tests, unsigned int seed) {
  printf("Add:\n");
  if (test_add_num_num(number_of_tests, seed)) {
    printf("Success\n");
  } else {
    printf("Failed\n");
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<check_add_num_num>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <test_add_num_num@plt>
cmp    $0x0,%rax
je     1160 <check_add_num_num+0x40>
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
jmp    116c <check_add_num_num+0x4c>
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
lea    0xe91(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_add_num_num>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
lea    0xec2(%rip),%rdi
call   1040 <puts@plt>
mov    %ebp,%edi
mov    %ebx,%esi
call   1050 <test_add_num_num@plt>
test   %rax,%rax
lea    0xeaf(%rip),%rax
lea    0xeaf(%rip),%rdi
cmove  %rax,%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"Add:\0A\00"
@.str.1 = [9 x i8] c"Success\0A\00"
@.str.2 = [8 x i8] c"Failed\0A\00"
@.str.3 = [2 x i8] c"\0A\00"
define void @check_add_num_num(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = call i64 @test_add_num_num(i32 %6, i32 %7)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
br label %14
12: ; preds = %2
%13 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
br label %14
14: ; preds = %12, %10
%15 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [5 x i8] c"Add:\00"
@str.4 = [7 x i8] c"Failed\00"
@str.5 = [8 x i8] c"Success\00"
define void @check_add_num_num(i32 %0, i32 %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
%4 = tail call i64 @test_add_num_num(i32 %0, i32 %1)
%5 = icmp eq i64 %4, 0
%6 = select i1 %5, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @str.4, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str.5, i64 0, i64 0)
%7 = tail call i32 @puts(i8* dereferenceable(1) %6)
%8 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ err(int, int /*<<< orphan*/ *);
void enomem(void) { err(2, NULL); }


x86 assembly (clang, -O0):
<enomem>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <err@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<enomem>:
mov    $0x2,%edi
xor    %esi,%esi
jmp    1030 <err@plt>

LLVM IR (-O0):
define void @enomem() {
%1 = call i32 @err(i32 2, i32* null)
ret void
}

LLVM IR (-O2):
define void @enomem() {
%1 = tail call i32 @err(i32 2, i32* null)
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ delta;
};
typedef TYPE_1__ XTextItem;

/* Variables and functions */
int get_XTextItem_delta(void *_p) { return (int)((XTextItem *)_p)->delta; }


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

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

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

LLVM IR (-O2):
define i32 @get_XTextItem_delta(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}