xunge/DecIR huggingface dataset:
/* Variables and functions */
void *git_ptr_error(int);
void *malloc(size_t);
void *git__malloc(size_t n) {
  void *r = malloc(n);
  if (!r)
    return git_ptr_error((-1 - 3));
  return r;
}


x86 assembly (clang, -O0):
<git__malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1157 <git__malloc+0x37>
mov    $0xfffffffc,%edi
call   1030 <git_ptr_error@plt>
mov    %rax,-0x8(%rbp)
jmp    115f <git__malloc+0x3f>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<git__malloc>:
push   %rax
call   1040 <malloc@plt>
test   %rax,%rax
je     112d <git__malloc+0xd>
pop    %rcx
ret
mov    $0xfffffffc,%edi
pop    %rax
jmp    1030 <git_ptr_error@plt>

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

LLVM IR (-O2):
define i8* @git__malloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i8* @git_ptr_error(i32 -4)
br label %6
6: ; preds = %1, %4
%7 = phi i8* [ %5, %4 ], [ %2, %1 ]
ret i8* %7
}
/* Type definitions */
struct TreeNode {
  int dummy;
};

/* Variables and functions */
int maxd(struct TreeNode *, int /*<<< orphan*/);
int maxDepth(struct TreeNode *root) { return maxd(root, 0); }


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

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

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

LLVM IR (-O2):
%struct.TreeNode = type { i32 }
define i32 @maxDepth(%struct.TreeNode* %0) {
%2 = tail call i32 @maxd(%struct.TreeNode* %0, i32 0)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
scalar_t__ malloc(int);
int /*<<< orphan*/ qtime_localtime_strf(char *, int, int /*<<< orphan*/,
                                        char *);
char *qtime_localtime_str(time_t utctime) {
  int size = sizeof(char) * ((sizeof("00-Jan-0000 00:00:00 +0000") - 1) + 1);
  char *timestr = (char *)malloc(size);
  qtime_localtime_strf(timestr, size, utctime, "%d-%b-%Y %H:%M:%S %z");
  return timestr;
}


x86 assembly (clang, -O0):
<qtime_localtime_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x1b,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%esi
mov    -0x4(%rbp),%edx
lea    0xeb1(%rip),%rcx
call   1040 <qtime_localtime_strf@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<qtime_localtime_str>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
mov    $0x1b,%edi
call   1030 <malloc@plt>
mov    %rax,%rbx
lea    0xec7(%rip),%rcx
mov    %rax,%rdi
mov    $0x1b,%esi
mov    %ebp,%edx
call   1040 <qtime_localtime_strf@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [21 x i8] c"%d-%b-%Y %H:%M:%S %z\00"
define i8* @qtime_localtime_str(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %2
store i32 27, i32* %3
%5 = load i32, i32* %3
%6 = call i64 @malloc(i32 %5)
%7 = inttoptr i64 %6 to i8*
store i8* %7, i8** %4
%8 = load i8*, i8** %4
%9 = load i32, i32* %3
%10 = load i32, i32* %2
%11 = call i32 @qtime_localtime_strf(i8* %8, i32 %9, i32 %10, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%12 = load i8*, i8** %4
ret i8* %12
}

LLVM IR (-O2):
@.str = [21 x i8] c"%d-%b-%Y %H:%M:%S %z\00"
define i8* @qtime_localtime_str(i32 %0) {
%2 = tail call i64 @malloc(i32 27)
%3 = inttoptr i64 %2 to i8*
%4 = tail call i32 @qtime_localtime_strf(i8* %3, i32 27, i32 %0, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ STDIN_FILENO;
int /*<<< orphan*/ TCIFLUSH;
int read(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ tcflush(int /*<<< orphan*/, int /*<<< orphan*/);
char do_getch(void) {
  char ch = 0;
  int cnt = 1;
  cnt = read(STDIN_FILENO, &ch, cnt);
  tcflush(STDIN_FILENO, TCIFLUSH);
  if (cnt < 0)
    return -1;
  return ch;
}


x86 assembly (clang, -O0):
<do_getch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0x0,-0x2(%rbp)
movl   $0x1,-0x8(%rbp)
mov    0x2e9e(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%edx
lea    -0x2(%rbp),%rsi
call   1040 <read@plt>
mov    %eax,-0x8(%rbp)
mov    0x2e86(%rip),%rax
mov    (%rax),%edi
mov    0x2e85(%rip),%rax
mov    (%rax),%esi
call   1030 <tcflush@plt>
cmpl   $0x0,-0x8(%rbp)
jge    1175 <do_getch+0x55>
movb   $0xff,-0x1(%rbp)
jmp    117b <do_getch+0x5b>
mov    -0x2(%rbp),%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_getch>:
push   %r14
push   %rbx
push   %rax
movb   $0x0,0x7(%rsp)
mov    0x2ea8(%rip),%r14
mov    (%r14),%edi
lea    0x7(%rsp),%rsi
mov    $0x1,%edx
call   1040 <read@plt>
mov    %eax,%ebx
mov    (%r14),%edi
mov    0x2e92(%rip),%rax
mov    (%rax),%esi
call   1030 <tcflush@plt>
test   %ebx,%ebx
movzbl 0x7(%rsp),%ecx
mov    $0xff,%eax
cmovns %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@STDIN_FILENO = global i32 0
@TCIFLUSH = global i32 0
define signext i8 @do_getch() {
%1 = alloca i8
%2 = alloca i8
%3 = alloca i32
store i8 0, i8* %2
store i32 1, i32* %3
%4 = load i32, i32* @STDIN_FILENO
%5 = load i32, i32* %3
%6 = call i32 @read(i32 %4, i8* %2, i32 %5)
store i32 %6, i32* %3
%7 = load i32, i32* @STDIN_FILENO
%8 = load i32, i32* @TCIFLUSH
%9 = call i32 @tcflush(i32 %7, i32 %8)
%10 = load i32, i32* %3
%11 = icmp slt i32 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %0
store i8 -1, i8* %1
br label %15
13: ; preds = %0
%14 = load i8, i8* %2
store i8 %14, i8* %1
br label %15
15: ; preds = %13, %12
%16 = load i8, i8* %1
ret i8 %16
}

LLVM IR (-O2):
@STDIN_FILENO = global i32 0
@TCIFLUSH = global i32 0
define signext i8 @do_getch() {
%1 = alloca i8
store i8 0, i8* %1
%2 = load i32, i32* @STDIN_FILENO
%3 = call i32 @read(i32 %2, i8* %1, i32 1)
%4 = load i32, i32* @STDIN_FILENO
%5 = load i32, i32* @TCIFLUSH
%6 = tail call i32 @tcflush(i32 %4, i32 %5)
%7 = icmp slt i32 %3, 0
%8 = load i8, i8* %1
%9 = select i1 %7, i8 -1, i8 %8
ret i8 %9
}
void gtk_text_iter_starts_word() {}


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

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

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

LLVM IR (-O2):
define void @gtk_text_iter_starts_word() {
ret void
}
void portputc(unsigned short port, unsigned char data) {
  asm volatile("outb %1, %0" : : "dN"(port), "a"(data));
}


x86 assembly (clang, -O0):
<portputc>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %al,-0x3(%rbp)
mov    -0x2(%rbp),%dx
mov    -0x3(%rbp),%al
out    %al,(%dx)
pop    %rbp
ret

x86 assembly (clang, -O2):
<portputc>:
mov    %esi,%eax
mov    %edi,%edx
out    %al,(%dx)
ret

LLVM IR (-O0):
define void @portputc(i16 zeroext %0, i8 zeroext %1) {
%3 = alloca i16
%4 = alloca i8
store i16 %0, i16* %3
store i8 %1, i8* %4
%5 = load i16, i16* %3
%6 = load i8, i8* %4
ret void
}

LLVM IR (-O2):
define void @portputc(i16 zeroext %0, i8 zeroext %1) {
tail call void asm sideeffect "outb $1, $0", "{dx}N,{ax},~{dirflag},~{fpsr},~{flags}"(i16 %0, i8 %1)
ret void
}
/* Type definitions */
struct list_node {
  int dummy;
};

/* Variables and functions */
struct list_node *list_node_from_off_(void *ptr, size_t off) {
  return (struct list_node *)((char *)ptr + off);
}


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

x86 assembly (clang, -O2):
<list_node_from_off_>:
lea    (%rdi,%rsi,1),%rax
ret

LLVM IR (-O0):
%struct.list_node = type { i32 }
define %struct.list_node* @list_node_from_off_(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 = load i64, i64* %4
%7 = getelementptr inbounds i8, i8* %5, i64 %6
%8 = bitcast i8* %7 to %struct.list_node*
ret %struct.list_node* %8
}

LLVM IR (-O2):
%struct.list_node = type { i32 }
define %struct.list_node* @list_node_from_off_(i8* readnone %0, i64 %1) {
%3 = getelementptr inbounds i8, i8* %0, i64 %1
%4 = bitcast i8* %3 to %struct.list_node*
ret %struct.list_node* %4
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
scalar_t__ strlen(char *);
void printStr(char *szStr) {
  int i;
  for (i = 0; i < (int)strlen(szStr); i++)
    putchar(szStr[i]);
}


x86 assembly (clang, -O0):
<printStr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%eax
cmp    %ecx,%eax
jge    116f <printStr+0x4f>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <putchar@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1133 <printStr+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printStr>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
test   %eax,%eax
jle    115d <printStr+0x3d>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl (%r14,%rbx,1),%edi
call   1030 <putchar@plt>
add    $0x1,%rbx
mov    %r14,%rdi
call   1040 <strlen@plt>
cltq
cmp    %rax,%rbx
jl     1140 <printStr+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @printStr(i8* nocapture %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = trunc i64 %2 to i32
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %15
5: ; preds = %1, %5
%6 = phi i64 [ %10, %5 ], [ 0, %1 ]
%7 = getelementptr inbounds i8, i8* %0, i64 %6
%8 = load i8, i8* %7
%9 = tail call i32 @putchar(i8 signext %8)
%10 = add nuw nsw i64 %6, 1
%11 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%12 = shl i64 %11, 32
%13 = ashr exact i64 %12, 32
%14 = icmp slt i64 %10, %13
br i1 %14, label %5, label %15
15: ; preds = %5, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ get_default(char *, int);
int /*<<< orphan*/ get_hwaddr(char *, char *, int);
void getEthernetHWAddrLinux(char *address, int length) {
  char if_name[16];
  get_default(if_name, 16);
  get_hwaddr(if_name, address, length);
}


x86 assembly (clang, -O0):
<getEthernetHWAddrLinux>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    -0x20(%rbp),%rdi
mov    $0x10,%esi
call   1030 <get_default@plt>
lea    -0x20(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1040 <get_hwaddr@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getEthernetHWAddrLinux>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %esi,%ebp
mov    %rdi,%rbx
mov    %rsp,%r14
mov    %r14,%rdi
mov    $0x10,%esi
call   1030 <get_default@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %ebp,%edx
call   1040 <get_hwaddr@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @getEthernetHWAddrLinux(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca [16 x i8]
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = getelementptr inbounds [16 x i8], [16 x i8]* %5, i64 0, i64 0
%7 = call i32 @get_default(i8* %6, i32 16)
%8 = getelementptr inbounds [16 x i8], [16 x i8]* %5, i64 0, i64 0
%9 = load i8*, i8** %3
%10 = load i32, i32* %4
%11 = call i32 @get_hwaddr(i8* %8, i8* %9, i32 %10)
ret void
}

LLVM IR (-O2):
define void @getEthernetHWAddrLinux(i8* %0, i32 %1) {
%3 = alloca [16 x i8]
%4 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
%5 = call i32 @get_default(i8* %4, i32 16)
%6 = call i32 @get_hwaddr(i8* %4, i8* %0, i32 %1)
ret void
}
/* Type definitions */
struct mutex {
  int dummy;
};
struct i40e_spinlock {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ mutex_init(struct mutex *);
void i40e_init_spinlock_d(struct i40e_spinlock *sp) {
  mutex_init((struct mutex *)sp);
}


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

x86 assembly (clang, -O2):
<i40e_init_spinlock_d>:
jmp    1030 <mutex_init@plt>

LLVM IR (-O0):
%struct.i40e_spinlock = type { i32 }
%struct.mutex = type { i32 }
define void @i40e_init_spinlock_d(%struct.i40e_spinlock* %0) {
%2 = alloca %struct.i40e_spinlock*
store %struct.i40e_spinlock* %0, %struct.i40e_spinlock** %2
%3 = load %struct.i40e_spinlock*, %struct.i40e_spinlock** %2
%4 = bitcast %struct.i40e_spinlock* %3 to %struct.mutex*
%5 = call i32 @mutex_init(%struct.mutex* %4)
ret void
}

LLVM IR (-O2):
%struct.i40e_spinlock = type { i32 }
%struct.mutex = type { i32 }
define void @i40e_init_spinlock_d(%struct.i40e_spinlock* %0) {
%2 = bitcast %struct.i40e_spinlock* %0 to %struct.mutex*
%3 = tail call i32 @mutex_init(%struct.mutex* %2)
ret void
}
int f(int x, int y) {
  if (y == 0) {
    return x;
  } else {
    if (x == 0) {
      return f(y, y - 1);
    } else {
      return f(y, x - 1);
    }
  }
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1133 <f+0x23>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1164 <f+0x54>
cmpl   $0x0,-0x8(%rbp)
jne    1153 <f+0x43>
mov    -0xc(%rbp),%edi
mov    -0xc(%rbp),%esi
sub    $0x1,%esi
call   1030 <f@plt>
mov    %eax,-0x4(%rbp)
jmp    1164 <f+0x54>
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%esi
sub    $0x1,%esi
call   1030 <f@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
test   %esi,%esi
je     1121 <f+0x21>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %esi,%eax
test   %edi,%edi
cmove  %esi,%edi
add    $0xffffffff,%edi
mov    %edi,%esi
mov    %eax,%edi
jne    1110 <f+0x10>
ret
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @f(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %11, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %9, %4 ], [ %1, %2 ]
%6 = phi i32 [ %5, %4 ], [ %0, %2 ]
%7 = icmp eq i32 %6, 0
%8 = select i1 %7, i32 %5, i32 %6
%9 = add nsw i32 %8, -1
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %2
%12 = phi i32 [ %0, %2 ], [ %5, %4 ]
ret i32 %12
}
int main() {
  struct {
    int x;
    int y;
  } point;
  point.x = 20;
  point.y = 30;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x14,-0x8(%rbp)
movl   $0x1e,-0x4(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.anon = type { i32, i32 }
define i32 @main() {
%1 = alloca %struct.anon
%2 = getelementptr inbounds %struct.anon, %struct.anon* %1, i32 0, i32 0
store i32 20, i32* %2
%3 = getelementptr inbounds %struct.anon, %struct.anon* %1, i32 0, i32 1
store i32 30, i32* %3
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
float area(double, int);
int /*<<< orphan*/ printf(char *, float);
int main() {
  float size = area(3.0, 2);
  printf("Area is %f\n", size);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xec9(%rip),%xmm0
mov    $0x2,%edi
call   1040 <area@plt>
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
lea    0xeb6(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movsd  0xed7(%rip),%xmm0
mov    $0x2,%edi
call   1040 <area@plt>
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"Area is %f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
store i32 0, i32* %1
%3 = call float @area(double 3.000000e+00, i32 2)
store float %3, float* %2
%4 = load float, float* %2
%5 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), float %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"Area is %f\0A\00"
define i32 @main() {
%1 = tail call float @area(double 3.000000e+00, i32 2)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), float %1)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ mpq_t;

/* Variables and functions */
int /*<<< orphan*/ mpq_clear(int /*<<< orphan*/);
extern void QCLEAR(mpq_t *q, char *format, ...) {
  mpq_clear(*q);
  ;
}


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

x86 assembly (clang, -O2):
<QCLEAR>:
mov    (%rdi),%edi
jmp    1030 <mpq_clear@plt>

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

LLVM IR (-O2):
define void @QCLEAR(i32* nocapture %0, i8* nocapture readnone %1, ...) {
%3 = load i32, i32* %0
%4 = tail call i32 @mpq_clear(i32 %3)
ret void
}
/* Type definitions */
struct timeval {
  long tv_sec;
  scalar_t__ tv_usec;
};
struct fd_set {
  int dummy;
};

/* Variables and functions */
int select(int, int *, int /*<<< orphan*/ *, int /*<<< orphan*/ *,
           struct timeval *);
int empty(struct fd_set *mask, int sec) {
  struct timeval t;
  t.tv_sec = (long)sec;
  t.tv_usec = 0;
  return (select(32, (int *)mask, NULL, NULL, &t));
}


x86 assembly (clang, -O0):
<empty>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movslq -0xc(%rbp),%rax
mov    %rax,-0x20(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
mov    $0x20,%edi
xor    %eax,%eax
mov    %eax,%ecx
lea    -0x20(%rbp),%r8
mov    %rcx,%rdx
call   1030 <select@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<empty>:
sub    $0x18,%rsp
mov    %rdi,%rax
movslq %esi,%rcx
mov    %rcx,0x8(%rsp)
movq   $0x0,0x10(%rsp)
lea    0x8(%rsp),%r8
mov    $0x20,%edi
mov    %rax,%rsi
xor    %edx,%edx
xor    %ecx,%ecx
call   1030 <select@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.fd_set = type { i32 }
%struct.timeval = type { i64, i64 }
define i32 @empty(%struct.fd_set* %0, i32 %1) {
%3 = alloca %struct.fd_set*
%4 = alloca i32
%5 = alloca %struct.timeval
store %struct.fd_set* %0, %struct.fd_set** %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds %struct.timeval, %struct.timeval* %5, i32 0, i32 0
store i64 %7, i64* %8
%9 = getelementptr inbounds %struct.timeval, %struct.timeval* %5, i32 0, i32 1
store i64 0, i64* %9
%10 = load %struct.fd_set*, %struct.fd_set** %3
%11 = bitcast %struct.fd_set* %10 to i32*
%12 = call i32 @select(i32 32, i32* %11, i32* null, i32* null, %struct.timeval* %5)
ret i32 %12
}

LLVM IR (-O2):
%struct.fd_set = type { i32 }
%struct.timeval = type { i64, i64 }
define i32 @empty(%struct.fd_set* %0, i32 %1) {
%3 = alloca %struct.timeval
%4 = bitcast %struct.timeval* %3 to i8*
%5 = sext i32 %1 to i64
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i64 0, i32 0
store i64 %5, i64* %6
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i64 0, i32 1
store i64 0, i64* %7
%8 = getelementptr %struct.fd_set, %struct.fd_set* %0, i64 0, i32 0
%9 = call i32 @select(i32 32, i32* %8, i32* null, i32* null, %struct.timeval* %3)
ret i32 %9
}
char *mstrcpy(char *dest, char *src) {
  while ((*dest++ = *src++) != 0)
    ;
  return dest;
}


x86 assembly (clang, -O0):
<mstrcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %al,(%rcx)
movsbl %al,%eax
cmp    $0x0,%eax
je     113f <mstrcpy+0x3f>
jmp    110c <mstrcpy+0xc>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mstrcpy>:
mov    %rdi,%rax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movzbl (%rsi),%ecx
add    $0x1,%rsi
mov    %cl,(%rax)
add    $0x1,%rax
test   %cl,%cl
jne    1110 <mstrcpy+0x10>
ret

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

LLVM IR (-O2):
define i8* @mstrcpy(i8* writeonly %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %8, %3 ]
%5 = phi i8* [ %1, %2 ], [ %6, %3 ]
%6 = getelementptr inbounds i8, i8* %5, i64 1
%7 = load i8, i8* %5
%8 = getelementptr inbounds i8, i8* %4, i64 1
store i8 %7, i8* %4
%9 = icmp eq i8 %7, 0
br i1 %9, label %10, label %3
10: ; preds = %3
ret i8* %8
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isascii(int);
void t_isascii_0xda() {
  Assert_real((isascii(218) == 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_isascii.c",
              1095, ("isascii should be 0 for 0xda"));
}


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

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

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 0 for 0xda\00"
define void @t_isascii_0xda() {
%1 = tail call i64 @isascii(i32 218)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1095, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
void *mapping(unsigned long);
void *emapping(unsigned long page_addr) {
  void *result;
  result = mapping(page_addr - 1);
  result = ((unsigned char *)result) + 0xf00;
  return result;
}


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

x86 assembly (clang, -O2):
<emapping>:
push   %rax
add    $0xffffffffffffffff,%rdi
call   1030 <mapping@plt>
add    $0xf00,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i8* @emapping(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = sub i64 %4, 1
%6 = call i8* @mapping(i64 %5)
store i8* %6, i8** %3
%7 = load i8*, i8** %3
%8 = getelementptr inbounds i8, i8* %7, i64 3840
store i8* %8, i8** %3
%9 = load i8*, i8** %3
ret i8* %9
}

LLVM IR (-O2):
define i8* @emapping(i64 %0) {
%2 = add i64 %0, -1
%3 = tail call i8* @mapping(i64 %2)
%4 = getelementptr inbounds i8, i8* %3, i64 3840
ret i8* %4
}
__attribute__((always_)) void ftrace_off_permanent(void) {}


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

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

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

LLVM IR (-O2):
define void @ftrace_off_permanent() {
ret void
}
float Com_GetFlamethrowerRange(void) { return 2500; }


x86 assembly (clang, -O0):
<Com_GetFlamethrowerRange>:
push   %rbp
mov    %rsp,%rbp
movss  0xef4(%rip),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<Com_GetFlamethrowerRange>:
movss  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define float @Com_GetFlamethrowerRange() {
ret float 2.500000e+03
}

LLVM IR (-O2):
define float @Com_GetFlamethrowerRange() {
ret float 2.500000e+03
}
int ft_strlen(char *str) {
  int x;
  x = 0;
  while (str[x])
    x++;
  return (x);
}


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

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

LLVM IR (-O0):
define i32 @ft_strlen(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %11, %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 = icmp ne i8 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %4
%12 = load i32, i32* %3
%13 = add nsw i32 %12, 1
store i32 %13, i32* %3
br label %4
14: ; preds = %4
%15 = load i32, i32* %3
ret i32 %15
}

LLVM IR (-O2):
define i32 @ft_strlen(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
}
signed short is_number_char(char c) {
  if ((c >= '0') && (c <= '9'))
    return 1;
  if (c == '.')
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<is_number_char>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x3(%rbp)
movsbl -0x3(%rbp),%eax
cmp    $0x30,%eax
jl     112f <is_number_char+0x2f>
movsbl -0x3(%rbp),%eax
cmp    $0x39,%eax
jg     112f <is_number_char+0x2f>
movw   $0x1,-0x2(%rbp)
jmp    114d <is_number_char+0x4d>
movsbl -0x3(%rbp),%eax
cmp    $0x2e,%eax
jne    1147 <is_number_char+0x47>
movw   $0x1,-0x2(%rbp)
jmp    114d <is_number_char+0x4d>
movw   $0x0,-0x2(%rbp)
movswl -0x2(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_number_char>:
lea    -0x30(%rdi),%eax
cmp    $0xa,%al
setb   %al
cmp    $0x2e,%dil
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define signext i16 @is_number_char(i8 signext %0) {
%2 = alloca i16
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 48
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 57
br i1 %10, label %11, label %12
11: ; preds = %7
store i16 1, i16* %2
br label %18
12: ; preds = %7, %1
%13 = load i8, i8* %3
%14 = sext i8 %13 to i32
%15 = icmp eq i32 %14, 46
br i1 %15, label %16, label %17
16: ; preds = %12
store i16 1, i16* %2
br label %18
17: ; preds = %12
store i16 0, i16* %2
br label %18
18: ; preds = %17, %16, %11
%19 = load i16, i16* %2
ret i16 %19
}

LLVM IR (-O2):
define signext i16 @is_number_char(i8 signext %0) {
%2 = add i8 %0, -48
%3 = icmp ult i8 %2, 10
%4 = icmp eq i8 %0, 46
%5 = or i1 %4, %3
%6 = zext i1 %5 to i16
ret i16 %6
}
/* Variables and functions */
int /*<<< orphan*/ eat(int);
int /*<<< orphan*/ put_forks(int, char *, int);
int /*<<< orphan*/ take_forks(int, char *, int);
int /*<<< orphan*/ think(int);
void philosopher(int argi, char *state, int semid) {
  while (1) {
    think(argi);
    take_forks(argi, state, semid);
    eat(argi);
    put_forks(argi, state, semid);
  }
}


x86 assembly (clang, -O0):
<philosopher>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <think@plt>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1060 <take_forks@plt>
mov    -0x4(%rbp),%edi
call   1030 <eat@plt>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1050 <put_forks@plt>
jmp    1152 <philosopher+0x12>

x86 assembly (clang, -O2):
<philosopher>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %edi,%ebp
nopl   0x0(%rax)
mov    %ebp,%edi
call   1040 <think@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %r14d,%edx
call   1060 <take_forks@plt>
mov    %ebp,%edi
call   1030 <eat@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %r14d,%edx
call   1050 <put_forks@plt>
jmp    1150 <philosopher+0x10>

LLVM IR (-O0):
define void @philosopher(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
br label %7
7: ; preds = %3, %7
%8 = load i32, i32* %4
%9 = call i32 @think(i32 %8)
%10 = load i32, i32* %4
%11 = load i8*, i8** %5
%12 = load i32, i32* %6
%13 = call i32 @take_forks(i32 %10, i8* %11, i32 %12)
%14 = load i32, i32* %4
%15 = call i32 @eat(i32 %14)
%16 = load i32, i32* %4
%17 = load i8*, i8** %5
%18 = load i32, i32* %6
%19 = call i32 @put_forks(i32 %16, i8* %17, i32 %18)
br label %7
}

LLVM IR (-O2):
define void @philosopher(i32 %0, i8* %1, i32 %2) {
br label %4
4: ; preds = %3, %4
%5 = tail call i32 @think(i32 %0)
%6 = tail call i32 @take_forks(i32 %0, i8* %1, i32 %2)
%7 = tail call i32 @eat(i32 %0)
%8 = tail call i32 @put_forks(i32 %0, i8* %1, i32 %2)
br label %4
}
/* Variables and functions */
int /*<<< orphan*/ f();
int /*<<< orphan*/ h();
int main() {
#pragma omp parallel num_threads(2)
  {
#pragma omp sections
    {
#pragma omp section
      { f(); }
#pragma omp section
      { h(); }
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <f@plt>
mov    $0x0,%al
call   1030 <h@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @f()
%3 = call i32 (...) @h()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @f()
%2 = tail call i32 (...) @h()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ cpu_set_t;

/* Variables and functions */
int CPU_COUNT(int /*<<< orphan*/ *);
int /*<<< orphan*/ pthread_getaffinity_np(int /*<<< orphan*/, int,
                                          int /*<<< orphan*/ *);
int /*<<< orphan*/ pthread_self();
int cpu_count(void) {
  cpu_set_t cpuset;
  pthread_getaffinity_np(pthread_self(), sizeof(cpu_set_t), &cpuset);
  return CPU_COUNT(&cpuset);
}


x86 assembly (clang, -O0):
<cpu_count>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <pthread_self@plt>
mov    %eax,%edi
mov    $0x4,%esi
lea    -0x4(%rbp),%rdx
call   1050 <pthread_getaffinity_np@plt>
lea    -0x4(%rbp),%rdi
call   1030 <CPU_COUNT@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpu_count>:
push   %rbx
sub    $0x10,%rsp
xor    %eax,%eax
call   1040 <pthread_self@plt>
lea    0xc(%rsp),%rbx
mov    %eax,%edi
mov    $0x4,%esi
mov    %rbx,%rdx
call   1050 <pthread_getaffinity_np@plt>
mov    %rbx,%rdi
call   1030 <CPU_COUNT@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @cpu_count() {
%1 = alloca i32
%2 = call i32 (...) @pthread_self()
%3 = call i32 @pthread_getaffinity_np(i32 %2, i32 4, i32* %1)
%4 = call i32 @CPU_COUNT(i32* %1)
ret i32 %4
}

LLVM IR (-O2):
define i32 @cpu_count() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (...) @pthread_self()
%4 = call i32 @pthread_getaffinity_np(i32 %3, i32 4, i32* %1)
%5 = call i32 @CPU_COUNT(i32* %1)
ret i32 %5
}
int isspace(int c) {
  return (c == ' ') || (c == '\f') || (c == '\n') || (c == '\r') ||
         (c == '\t') || (c == '\v');
}


x86 assembly (clang, -O0):
<isspace>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x20,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115c <isspace+0x5c>
mov    $0x1,%al
cmpl   $0xc,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115c <isspace+0x5c>
mov    $0x1,%al
cmpl   $0xa,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115c <isspace+0x5c>
mov    $0x1,%al
cmpl   $0xd,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115c <isspace+0x5c>
mov    $0x1,%al
cmpl   $0x9,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115c <isspace+0x5c>
cmpl   $0xb,-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):
<isspace>:
cmp    $0x20,%edi
ja     111d <isspace+0x1d>
mov    $0x1,%eax
mov    %edi,%ecx
movabs $0x100003600,%rdx
bt     %rcx,%rdx
jae    111d <isspace+0x1d>
ret
xor    %eax,%eax
cmp    $0xb,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @isspace(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 %20, label %5
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 12
br i1 %7, label %20, label %8
8: ; preds = %5
%9 = load i32, i32* %2
%10 = icmp eq i32 %9, 10
br i1 %10, label %20, label %11
11: ; preds = %8
%12 = load i32, i32* %2
%13 = icmp eq i32 %12, 13
br i1 %13, label %20, label %14
14: ; preds = %11
%15 = load i32, i32* %2
%16 = icmp eq i32 %15, 9
br i1 %16, label %20, label %17
17: ; preds = %14
%18 = load i32, i32* %2
%19 = icmp eq i32 %18, 11
br label %20
20: ; preds = %17, %14, %11, %8, %5, %1
%21 = phi i1 [ true, %14 ], [ true, %11 ], [ true, %8 ], [ true, %5 ], [ true, %1 ], [ %19, %17 ]
%22 = zext i1 %21 to i32
ret i32 %22
}

LLVM IR (-O2):
define i32 @isspace(i32 %0) {
switch i32 %0, label %2 [
i32 32, label %5
i32 13, label %5
i32 12, label %5
i32 10, label %5
i32 9, label %5
]
2: ; preds = %1
%3 = icmp eq i32 %0, 11
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %1, %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ sscanf(char *, char *, int *, int *);
int main(int argc, char *argv[]) {
  char *anystr = "C08_P00430";
  int i1, i2;
  sscanf(anystr, "C%d_P%d", &i1, &i2);
  printf("i1 is %i and i2 is %i\n", i1, i2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec3(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xebf(%rip),%rsi
lea    -0x1c(%rbp),%rdx
lea    -0x20(%rbp),%rcx
call   1040 <sscanf@plt>
mov    -0x1c(%rbp),%esi
mov    -0x20(%rbp),%edx
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xedc(%rip),%rsi
lea    0x4(%rsp),%rdx
mov    %rsp,%rcx
call   1040 <sscanf@plt>
mov    0x4(%rsp),%esi
mov    (%rsp),%edx
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"C08_P00430\00"
@.str.1 = [8 x i8] c"C%d_P%d\00"
@.str.2 = [23 x i8] c"i1 is %i and i2 is %i\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8** %6
%9 = load i8*, i8** %6
%10 = call i32 @sscanf(i8* %9, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32* %7, i32* %8)
%11 = load i32, i32* %7
%12 = load i32, i32* %8
%13 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i32 %11, i32 %12)
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"C08_P00430\00"
@.str.1 = [8 x i8] c"C%d_P%d\00"
@.str.2 = [23 x i8] c"i1 is %i and i2 is %i\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %3 to i8*
%6 = bitcast i32* %4 to i8*
%7 = call i32 @sscanf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32* %3, i32* %4)
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i32 %8, i32 %9)
ret i32 0
}
/* Type definitions */
struct pdb_node_t {
  int dummy;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int pdb_standard_load_node(int /*<<< orphan*/ *, struct pdb_node_t *, char **,
                           int *);
int pdb_load_tree_node_cb(FILE *fptr, struct pdb_node_t *pptr, char **tok_arr,
                          int *line) {
  return pdb_standard_load_node(fptr, pptr, tok_arr, line);
}


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

x86 assembly (clang, -O2):
<pdb_load_tree_node_cb>:
jmp    1030 <pdb_standard_load_node@plt>

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

LLVM IR (-O2):
%struct.pdb_node_t = type { i32 }
define i32 @pdb_load_tree_node_cb(i32* %0, %struct.pdb_node_t* %1, i8** %2, i32* %3) {
%5 = tail call i32 @pdb_standard_load_node(i32* %0, %struct.pdb_node_t* %1, i8** %2, i32* %3)
ret i32 %5
}
/* Variables and functions */
int anetGenericResolve(char *, char *, char *, size_t, int /*<<< orphan*/);
int anetResolve(char *err, char *host, char *ipbuf, size_t ipbuf_len) {
  return anetGenericResolve(err, host, ipbuf, ipbuf_len, 0);
}


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

x86 assembly (clang, -O2):
<anetResolve>:
xor    %r8d,%r8d
jmp    1030 <anetGenericResolve@plt>

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

LLVM IR (-O2):
define i32 @anetResolve(i8* %0, i8* %1, i8* %2, i64 %3) {
%5 = tail call i32 @anetGenericResolve(i8* %0, i8* %1, i8* %2, i64 %3, i32 0)
ret i32 %5
}
/* Type definitions */
struct clad_sb {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ clad_sb_alloc();
struct clad_sb *clad_sb_init_buf(int /*<<< orphan*/, char *, size_t);
struct clad_sb *clad_sb_make_buf(char *cstr, size_t size) {
  return clad_sb_init_buf(clad_sb_alloc(), cstr, size);
}


x86 assembly (clang, -O0):
<clad_sb_make_buf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <clad_sb_alloc@plt>
mov    %eax,%edi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1040 <clad_sb_init_buf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clad_sb_make_buf>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <clad_sb_alloc@plt>
mov    %eax,%edi
mov    %rbx,%rsi
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <clad_sb_init_buf@plt>

LLVM IR (-O0):
%struct.clad_sb = type { i32 }
define %struct.clad_sb* @clad_sb_make_buf(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = call i32 (...) @clad_sb_alloc()
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = call %struct.clad_sb* @clad_sb_init_buf(i32 %5, i8* %6, i64 %7)
ret %struct.clad_sb* %8
}

LLVM IR (-O2):
%struct.clad_sb = type { i32 }
define %struct.clad_sb* @clad_sb_make_buf(i8* %0, i64 %1) {
%3 = tail call i32 (...) @clad_sb_alloc()
%4 = tail call %struct.clad_sb* @clad_sb_init_buf(i32 %3, i8* %0, i64 %1)
ret %struct.clad_sb* %4
}
/* Variables and functions */
scalar_t__ judge(int);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, const char *argv[]) {
  int i = 100;
  while (i < 1000) {
    if (judge(i))
      printf("%d ", i);
    i++;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x64,-0x14(%rbp)
cmpl   $0x3e8,-0x14(%rbp)
jge    1179 <main+0x59>
mov    -0x14(%rbp),%edi
call   1040 <judge@plt>
cmp    $0x0,%rax
je     116b <main+0x4b>
mov    -0x14(%rbp),%esi
lea    0xe9a(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    113d <main+0x1d>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0x64,%ebx
lea    0xed0(%rip),%r14
jmp    114b <main+0x2b>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%ebx
cmp    $0x3e8,%ebx
je     1163 <main+0x43>
mov    %ebx,%edi
call   1040 <judge@plt>
test   %rax,%rax
je     1140 <main+0x20>
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
jmp    1140 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d \00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 100, i32* %6
br label %7
7: ; preds = %17, %2
%8 = load i32, i32* %6
%9 = icmp slt i32 %8, 1000
br i1 %9, label %10, label %20
10: ; preds = %7
%11 = load i32, i32* %6
%12 = call i64 @judge(i32 %11)
%13 = icmp ne i64 %12, 0
br i1 %13, label %14, label %17
14: ; preds = %10
%15 = load i32, i32* %6
%16 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %15)
br label %17
17: ; preds = %14, %10
%18 = load i32, i32* %6
%19 = add nsw i32 %18, 1
store i32 %19, i32* %6
br label %7
20: ; preds = %7
%21 = load i32, i32* %3
ret i32 %21
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
br label %3
3: ; preds = %2, %9
%4 = phi i32 [ 100, %2 ], [ %10, %9 ]
%5 = tail call i64 @judge(i32 %4)
%6 = icmp eq i64 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %3
%8 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
br label %9
9: ; preds = %7, %3
%10 = add nuw nsw i32 %4, 1
%11 = icmp eq i32 %10, 1000
br i1 %11, label %12, label %3
12: ; preds = %9
ret i32 0
}
int main() {
  int x = 1, y = 2, z[10];
  int *ip;
  ip = &x;
  y = *ip;
  *ip = 0;
  ip = &z[0];
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0x48(%rbp),%rax
movl   $0x0,(%rax)
lea    -0x40(%rbp),%rax
mov    %rax,-0x48(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
float bessj1(float);
float dfunc(float x) { return -bessj1(x); }


x86 assembly (clang, -O0):
<dfunc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <bessj1@plt>
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dfunc>:
push   %rax
call   1030 <bessj1@plt>
xorps  0xee3(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @dfunc(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @bessj1(float %3)
%5 = fneg float %4
ret float %5
}

LLVM IR (-O2):
define float @dfunc(float %0) {
%2 = tail call float @bessj1(float %0)
%3 = fneg float %2
ret float %3
}