xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ pintr1(int);
void pintr(int sig) { pintr1(1); }


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

x86 assembly (clang, -O2):
<pintr>:
mov    $0x1,%edi
jmp    1030 <pintr1@plt>

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

LLVM IR (-O2):
define void @pintr(i32 %0) {
%2 = tail call i32 @pintr1(i32 1)
ret void
}
__attribute__((always_)) unsigned long pmd_index(unsigned long address) {
  return (address >> 22) & (1 - 1);
}


x86 assembly (clang, -O0):
<pmd_index>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x16,%rax
and    $0x0,%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i64 @pmd_index(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = lshr i64 %3, 22
%5 = and i64 %4, 0
ret i64 %5
}

LLVM IR (-O2):
define i64 @pmd_index(i64 %0) {
ret i64 0
}
/* Variables and functions */
int /*<<< orphan*/ _Error(long, char *);
void Error_HandlersBoundToSyntaxMustBePublic(long p_position) {
  _Error(p_position, "Handlers bound to syntax rules must be public");
}


x86 assembly (clang, -O0):
<Error_HandlersBoundToSyntaxMustBePublic>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <_Error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Error_HandlersBoundToSyntaxMustBePublic>:
lea    0xee9(%rip),%rsi
jmp    1030 <_Error@plt>

LLVM IR (-O0):
@.str = [46 x i8] c"Handlers bound to syntax rules must be public\00"
define void @Error_HandlersBoundToSyntaxMustBePublic(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i32 @_Error(i64 %3, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [46 x i8] c"Handlers bound to syntax rules must be public\00"
define void @Error_HandlersBoundToSyntaxMustBePublic(i64 %0) {
%2 = tail call i32 @_Error(i64 %0, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
ret void
}
int quad(int x) { return x * 4; }


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

x86 assembly (clang, -O2):
<quad>:
lea    0x0(,%rdi,4),%eax
ret

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

LLVM IR (-O2):
define i32 @quad(i32 %0) {
%2 = shl nsw i32 %0, 2
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void keyboard(unsigned char key, int x, int y) {
  if (key == 27) {
    exit(1);
  }
}


x86 assembly (clang, -O0):
<keyboard>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movzbl -0x1(%rbp),%eax
cmp    $0x1b,%eax
jne    113b <keyboard+0x2b>
mov    $0x1,%edi
call   1030 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<keyboard>:
cmp    $0x1b,%dil
je     1117 <keyboard+0x7>
ret
push   %rax
mov    $0x1,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @keyboard(i8 zeroext %0, i32 %1, i32 %2) {
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
store i8 %0, i8* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i8, i8* %4
%8 = zext i8 %7 to i32
%9 = icmp eq i32 %8, 27
br i1 %9, label %10, label %12
10: ; preds = %3
%11 = call i32 @exit(i32 1)
unreachable
12: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @keyboard(i8 zeroext %0, i32 %1, i32 %2) {
%4 = icmp eq i8 %0, 27
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = tail call i32 @exit(i32 1)
unreachable
7: ; preds = %3
ret void
}
const char *plugin_api_info_weechat_site_cb(void *data, const char *info_name,
                                            const char *arguments) {
  (void)data;
  (void)info_name;
  (void)arguments;
  return "https://weechat.org/";
}


x86 assembly (clang, -O0):
<plugin_api_info_weechat_site_cb>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    0xee9(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<plugin_api_info_weechat_site_cb>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [21 x i8] c"https://weechat.org/\00"
define i8* @plugin_api_info_weechat_site_cb(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i8*, i8** %6
ret i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [21 x i8] c"https://weechat.org/\00"
define i8* @plugin_api_info_weechat_site_cb(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2) {
ret i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ config_init();
int /*<<< orphan*/ event_init();
int /*<<< orphan*/ ewmh_init();
int /*<<< orphan*/ log_init();
int /*<<< orphan*/ screen_init();
int /*<<< orphan*/ wmfs_xinit();
void wmfs_init(void) {
  log_init();
  wmfs_xinit();
  ewmh_init();
  screen_init();
  event_init();
  config_init();
}


x86 assembly (clang, -O0):
<wmfs_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <log_init@plt>
mov    $0x0,%al
call   1050 <wmfs_xinit@plt>
mov    $0x0,%al
call   1070 <ewmh_init@plt>
mov    $0x0,%al
call   1060 <screen_init@plt>
mov    $0x0,%al
call   1080 <event_init@plt>
mov    $0x0,%al
call   1040 <config_init@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<wmfs_init>:
push   %rax
xor    %eax,%eax
call   1030 <log_init@plt>
xor    %eax,%eax
call   1050 <wmfs_xinit@plt>
xor    %eax,%eax
call   1070 <ewmh_init@plt>
xor    %eax,%eax
call   1060 <screen_init@plt>
xor    %eax,%eax
call   1080 <event_init@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <config_init@plt>

LLVM IR (-O0):
define void @wmfs_init() {
%1 = call i32 (...) @log_init()
%2 = call i32 (...) @wmfs_xinit()
%3 = call i32 (...) @ewmh_init()
%4 = call i32 (...) @screen_init()
%5 = call i32 (...) @event_init()
%6 = call i32 (...) @config_init()
ret void
}

LLVM IR (-O2):
define void @wmfs_init() {
%1 = tail call i32 (...) @log_init()
%2 = tail call i32 (...) @wmfs_xinit()
%3 = tail call i32 (...) @ewmh_init()
%4 = tail call i32 (...) @screen_init()
%5 = tail call i32 (...) @event_init()
%6 = tail call i32 (...) @config_init()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ execlp(char *, char *, char *, int /*<<< orphan*/ *);
int /*<<< orphan*/ free(char *);
scalar_t__ malloc(int);
int /*<<< orphan*/ sprintf(char *, char *, char *);
int ShowImage(char *img_name) {
  char *ptr;
  ptr = (char *)malloc(100 * sizeof(char));
  sprintf(ptr, "../scenes/images/%s", img_name);
  execlp("display", "display", ptr, NULL);
  free(ptr);
  return 0;
}


x86 assembly (clang, -O0):
<ShowImage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x64,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xe97(%rip),%rsi
call   1050 <sprintf@plt>
mov    -0x10(%rbp),%rdx
lea    0xe9b(%rip),%rsi
xor    %eax,%eax
mov    %eax,%ecx
mov    %rsi,%rdi
call   1060 <execlp@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ShowImage>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    $0x64,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
lea    0xea5(%rip),%rsi
mov    %rax,%rdi
mov    %r14,%rdx
call   1050 <sprintf@plt>
lea    0xea7(%rip),%rdi
mov    %rdi,%rsi
mov    %rbx,%rdx
xor    %ecx,%ecx
call   1060 <execlp@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [20 x i8] c"../scenes/images/%s\00"
@.str.1 = [8 x i8] c"display\00"
define i32 @ShowImage(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = call i64 @malloc(i32 100)
%5 = inttoptr i64 %4 to i8*
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = load i8*, i8** %2
%8 = call i32 @sprintf(i8* %6, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %7)
%9 = load i8*, i8** %3
%10 = call i32 @execlp(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* %9, i32* null)
%11 = load i8*, i8** %3
%12 = call i32 @free(i8* %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"../scenes/images/%s\00"
@.str.1 = [8 x i8] c"display\00"
define i32 @ShowImage(i8* %0) {
%2 = tail call i64 @malloc(i32 100)
%3 = inttoptr i64 %2 to i8*
%4 = tail call i32 @sprintf(i8* dereferenceable(1) %3, i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = tail call i32 @execlp(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* %3, i32* null)
%6 = tail call i32 @free(i8* %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void *malloc(int);
int /*<<< orphan*/ printf(char *);
char *allocMemory(int allocAmount) {
  void *allocHelper = NULL;
  if (NULL != (allocHelper = malloc(allocAmount))) {
    return (char *)allocHelper;
  }
  printf("Error: Could not allocate memory for rows\n");
  exit(0);
}


x86 assembly (clang, -O0):
<allocMemory>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <malloc@plt>
mov    %rax,%rcx
mov    %rcx,-0x10(%rbp)
xor    %eax,%eax
cmp    %rcx,%rax
je     1167 <allocMemory+0x37>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret
lea    0xe92(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<allocMemory>:
push   %rax
call   1040 <malloc@plt>
test   %rax,%rax
je     113d <allocMemory+0xd>
pop    %rcx
ret
lea    0xebc(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [43 x i8] c"Error: Could not allocate memory for rows\0A\00"
define i8* @allocMemory(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
store i8* null, i8** %3
%4 = load i32, i32* %2
%5 = call i8* @malloc(i32 %4)
store i8* %5, i8** %3
%6 = icmp ne i8* null, %5
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = load i8*, i8** %3
ret i8* %8
9: ; preds = %1
%10 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [42 x i8] c"Error: Could not allocate memory for rows\00"
define noalias i8* @allocMemory(i32 %0) {
%2 = tail call i8* @malloc(i32 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %5, label %4
4: ; preds = %1
ret i8* %2
5: ; preds = %1
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 0)
unreachable
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int height;
};
typedef TYPE_1__ XConfigureEvent;

/* Variables and functions */
void set_XConfigureEvent_height(void *_p, int _v) {
  ((XConfigureEvent *)_p)->height = (int)_v;
}


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

x86 assembly (clang, -O2):
<set_XConfigureEvent_height>:
mov    %esi,(%rdi)
ret

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

LLVM IR (-O2):
define void @set_XConfigureEvent_height(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
void pj_init_lock() {}


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

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

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

LLVM IR (-O2):
define void @pj_init_lock() {
ret void
}
/* Variables and functions */
void document_close_html_stream(int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void document_close_html(void) { return document_close_html_stream(stdout); }


x86 assembly (clang, -O0):
<document_close_html>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
call   1030 <document_close_html_stream@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<document_close_html>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
jmp    1030 <document_close_html_stream@plt>

LLVM IR (-O0):
@stdout = global i32 0
define void @document_close_html() {
%1 = load i32, i32* @stdout
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
define void @document_close_html() {
%1 = load i32, i32* @stdout
tail call void @document_close_html_stream(i32 %1)
ret void
}
int __attribute__((stdcall)) start() { return 1; }


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

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

LLVM IR (-O0):
define i32 @start() {
ret i32 1
}

LLVM IR (-O2):
define i32 @start() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ Atm128Rfa1SerialP__Counter__overflow();
int /*<<< orphan*/ TransformAlarmC__0__Counter__overflow();
void TransformCounterC__0__Counter__overflow(void) {
  TransformAlarmC__0__Counter__overflow();
  Atm128Rfa1SerialP__Counter__overflow();
}


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

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

LLVM IR (-O0):
define void @TransformCounterC__0__Counter__overflow() {
%1 = call i32 (...) @TransformAlarmC__0__Counter__overflow()
%2 = call i32 (...) @Atm128Rfa1SerialP__Counter__overflow()
ret void
}

LLVM IR (-O2):
define void @TransformCounterC__0__Counter__overflow() {
%1 = tail call i32 (...) @TransformAlarmC__0__Counter__overflow()
%2 = tail call i32 (...) @Atm128Rfa1SerialP__Counter__overflow()
ret void
}
char kgetc() { return '\0'; }


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

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

LLVM IR (-O0):
define signext i8 @kgetc() {
ret i8 0
}

LLVM IR (-O2):
define signext i8 @kgetc() {
ret i8 0
}
int g2(short __attribute((blah)) int x) {}


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

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

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

LLVM IR (-O2):
define i32 @g2(i16 signext %0) {
ret i32 undef
}
long GPIOPinRead(unsigned long ulPort, unsigned char ucPins) {
  ;
  return (
      (*((volatile unsigned long *)(ulPort + (0x00000000 + (ucPins << 2))))));
}


x86 assembly (clang, -O0):
<GPIOPinRead>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rax
movzbl -0x9(%rbp),%ecx
shl    $0x2,%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
add    %rcx,%rax
mov    (%rax),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<GPIOPinRead>:
mov    %esi,%eax
mov    (%rdi,%rax,4),%rax
ret

LLVM IR (-O0):
define i64 @GPIOPinRead(i64 %0, i8 zeroext %1) {
%3 = alloca i64
%4 = alloca i8
store i64 %0, i64* %3
store i8 %1, i8* %4
%5 = load i64, i64* %3
%6 = load i8, i8* %4
%7 = zext i8 %6 to i32
%8 = shl i32 %7, 2
%9 = add nsw i32 0, %8
%10 = sext i32 %9 to i64
%11 = add i64 %5, %10
%12 = inttoptr i64 %11 to i64*
%13 = load volatile i64, i64* %12
ret i64 %13
}

LLVM IR (-O2):
define i64 @GPIOPinRead(i64 %0, i8 zeroext %1) {
%3 = zext i8 %1 to i64
%4 = shl nuw nsw i64 %3, 2
%5 = add i64 %4, %0
%6 = inttoptr i64 %5 to i64*
%7 = load volatile i64, i64* %6
ret i64 %7
}
/* Variables and functions */
int do_calc(int, int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int a = 4, b = 5;
  printf("result: %d\n", do_calc(a, b));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x4,-0x8(%rbp)
movl   $0x5,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <do_calc@plt>
mov    %eax,%esi
lea    0xeaf(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x4,%edi
mov    $0x5,%esi
call   1040 <do_calc@plt>
lea    0xec9(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [12 x i8] c"result: %d\0A\00"
define i32 @main() {
%1 = tail call i32 @do_calc(i32 4, i32 5)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
double cbrt(double);
double c_cbrt(double arg0) { return cbrt(arg0); }


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

x86 assembly (clang, -O2):
<c_cbrt>:
jmp    1030 <cbrt@plt>

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

LLVM IR (-O2):
define double @c_cbrt(double %0) {
%2 = tail call double @cbrt(double %0)
ret double %2
}
void ty340_rfd(void) {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @Fun_s6_Fault() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ rts_error(int, int const);
void op_fgnlookup(void) {
  extern const int ERR_UNIMPLOP;
  rts_error(1, ERR_UNIMPLOP);
}


x86 assembly (clang, -O0):
<op_fgnlookup>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%esi
mov    $0x1,%edi
call   1030 <rts_error@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<op_fgnlookup>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
mov    $0x1,%edi
jmp    1030 <rts_error@plt>

LLVM IR (-O0):
@ERR_UNIMPLOP = external constant i32
define void @op_fgnlookup() {
%1 = load i32, i32* @ERR_UNIMPLOP
%2 = call i32 @rts_error(i32 1, i32 %1)
ret void
}

LLVM IR (-O2):
@ERR_UNIMPLOP = external constant i32
define void @op_fgnlookup() {
%1 = load i32, i32* @ERR_UNIMPLOP
%2 = tail call i32 @rts_error(i32 1, i32 %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
size_t fread(int *, int, int, int /*<<< orphan*/ *);
size_t read_int(FILE *fp, int *i) { return fread(i, sizeof(*i), 1, fp); }


x86 assembly (clang, -O0):
<read_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rcx
mov    $0x4,%esi
mov    $0x1,%edx
call   1030 <fread@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_int>:
mov    %rdi,%rcx
mov    %rsi,%rdi
mov    $0x4,%esi
mov    $0x1,%edx
jmp    1030 <fread@plt>

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

LLVM IR (-O2):
define i64 @read_int(i32* nocapture %0, i32* nocapture %1) {
%3 = tail call i64 @fread(i32* %1, i32 4, i32 1, i32* %0)
ret i64 %3
}
int HelpItem11(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @HelpItem11() {
ret i32 0
}
__attribute__((no, noclone)) int foo(int a) {
  return (~a & 4102790424LL) > 0 | 6;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
xor    $0xffffffff,%eax
cltq
movabs $0xf48b9d18,%rcx
and    %rcx,%rax
cmp    $0x0,%rax
setg   %al
and    $0x1,%al
movzbl %al,%eax
or     $0x6,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
not    %edi
xor    %eax,%eax
test   $0xf48b9d18,%edi
setne  %al
or     $0x6,%eax
ret

LLVM IR (-O0):
define i32 @foo(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = xor i32 %3, -1
%5 = sext i32 %4 to i64
%6 = and i64 %5, 4102790424
%7 = icmp sgt i64 %6, 0
%8 = zext i1 %7 to i32
%9 = or i32 %8, 6
ret i32 %9
}

LLVM IR (-O2):
define i32 @foo(i32 %0) {
%2 = and i32 %0, -192176872
%3 = icmp ne i32 %2, -192176872
%4 = zext i1 %3 to i32
%5 = or i32 %4, 6
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ rmdir(int /*<<< orphan*/);
int /*<<< orphan*/ strcpy(char *, char const *);
int /*<<< orphan*/ strlen(char const *);
int /*<<< orphan*/ unix_path(int /*<<< orphan*/);
int unlink_dir(const char *d) {
  char d_name[strlen(d) + 1];
  return !rmdir(unix_path(strcpy(d_name, d)));
}


x86 assembly (clang, -O0):
<unlink_dir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <strlen@plt>
add    $0x1,%eax
mov    %rsp,%rcx
mov    %rcx,-0x10(%rbp)
mov    %rax,%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,%rsp
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    %eax,%edi
call   1060 <unix_path@plt>
mov    %eax,%edi
call   1040 <rmdir@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    -0x10(%rbp),%rcx
mov    %rcx,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unlink_dir>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1050 <strlen@plt>
add    $0x1,%eax
mov    %rsp,%rdi
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rdi
mov    %rdi,%rsp
mov    %rbx,%rsi
call   1030 <strcpy@plt>
mov    %eax,%edi
call   1060 <unix_path@plt>
mov    %eax,%edi
call   1040 <rmdir@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
lea    -0x8(%rbp),%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @unlink_dir(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @strlen(i8* %5)
%7 = add nsw i32 %6, 1
%8 = zext i32 %7 to i64
%9 = call i8* @llvm.stacksave()
store i8* %9, i8** %3
%10 = alloca i8, i64 %8
store i64 %8, i64* %4
%11 = load i8*, i8** %2
%12 = call i32 @strcpy(i8* %10, i8* %11)
%13 = call i32 @unix_path(i32 %12)
%14 = call i32 @rmdir(i32 %13)
%15 = icmp ne i32 %14, 0
%16 = xor i1 %15, true
%17 = zext i1 %16 to i32
%18 = load i8*, i8** %3
ret i32 %17
}

LLVM IR (-O2):
define i32 @unlink_dir(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add nsw i32 %2, 1
%4 = zext i32 %3 to i64
%5 = alloca i8, i64 %4
%6 = call i32 @strcpy(i8* %5, i8* %0)
%7 = call i32 @unix_path(i32 %6)
%8 = call i32 @rmdir(i32 %7)
%9 = icmp eq i32 %8, 0
%10 = zext i1 %9 to i32
ret i32 %10
}
/* Variables and functions */
int read(int const, char *, int);
bool read_byte(const int fd, char *value, int *bytes_read) {
  *bytes_read = read(fd, value, 1);
  if (*bytes_read != 1) {
    return false;
  }
  return true;
}


x86 assembly (clang, -O0):
<read_byte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    $0x1,%edx
call   1030 <read@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x18(%rbp),%rax
cmpl   $0x1,(%rax)
je     1155 <read_byte+0x45>
movl   $0x0,-0x4(%rbp)
jmp    115c <read_byte+0x4c>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_byte>:
push   %rbx
mov    %rdx,%rbx
mov    $0x1,%edx
call   1030 <read@plt>
mov    %eax,(%rbx)
xor    %ecx,%ecx
cmp    $0x1,%eax
sete   %cl
mov    %ecx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @read_byte(i32 %0, i8* nocapture %1, i32* nocapture writeonly %2) {
%4 = tail call i32 @read(i32 %0, i8* %1, i32 1)
store i32 %4, i32* %2
%5 = icmp eq i32 %4, 1
%6 = zext i1 %5 to i32
ret i32 %6
}
void ff_hevc_put_hevc_bi_w_epel_v24_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_w_epel_v24_12_sse4() {
ret void
}
/* Type definitions */
typedef scalar_t__ wint_t;

/* Variables and functions */
scalar_t__ iswupper(scalar_t__);
wint_t towlower(wint_t c) { return iswupper(c) ? c + 0x20 : c; }


x86 assembly (clang, -O0):
<towlower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <iswupper@plt>
cmp    $0x0,%rax
je     1140 <towlower+0x30>
mov    -0x8(%rbp),%rax
add    $0x20,%rax
mov    %rax,-0x10(%rbp)
jmp    1148 <towlower+0x38>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<towlower>:
push   %rbx
mov    %rdi,%rbx
call   1030 <iswupper@plt>
lea    0x20(%rbx),%rcx
test   %rax,%rax
cmove  %rbx,%rcx
mov    %rcx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @towlower(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i64 @iswupper(i64 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i64, i64* %2
%8 = add nsw i64 %7, 32
br label %11
9: ; preds = %1
%10 = load i64, i64* %2
br label %11
11: ; preds = %9, %6
%12 = phi i64 [ %8, %6 ], [ %10, %9 ]
ret i64 %12
}

LLVM IR (-O2):
define i64 @towlower(i64 %0) {
%2 = tail call i64 @iswupper(i64 %0)
%3 = icmp eq i64 %2, 0
%4 = add nsw i64 %0, 32
%5 = select i1 %3, i64 %0, i64 %4
ret i64 %5
}
/* Variables and functions */
int array_index_utf8(char **, char const *);
int array_contains_utf8(char **strings, const char *str) {
  return array_index_utf8(strings, str) != -1;
}


x86 assembly (clang, -O0):
<array_contains_utf8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <array_index_utf8@plt>
cmp    $0xffffffff,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<array_contains_utf8>:
push   %rax
call   1030 <array_index_utf8@plt>
xor    %ecx,%ecx
cmp    $0xffffffff,%eax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @array_contains_utf8(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** %4
%7 = call i32 @array_index_utf8(i8** %5, i8* %6)
%8 = icmp ne i32 %7, -1
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @array_contains_utf8(i8** %0, i8* %1) {
%3 = tail call i32 @array_index_utf8(i8** %0, i8* %1)
%4 = icmp ne i32 %3, -1
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Type definitions */
typedef scalar_t__ ptrdiff_t;

/* Variables and functions */
const void *ptrdiff_to_objpc(ptrdiff_t ptr_rep) {
  const unsigned char *ptr;
  ptrdiff_t distance;
  distance = (ptrdiff_t)ptr_rep;
  ptr = (const unsigned char *)(((const unsigned char *)NULL) +
                                ((ptrdiff_t)distance));
  return ((const void *)ptr);
}


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

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

LLVM IR (-O0):
define i8* @ptrdiff_to_objpc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
%4 = alloca i64
store i64 %0, i64* %2
%5 = load i64, i64* %2
store i64 %5, i64* %4
%6 = load i64, i64* %4
%7 = inttoptr i64 %6 to i8*
store i8* %7, i8** %3
%8 = load i8*, i8** %3
ret i8* %8
}

LLVM IR (-O2):
define i8* @ptrdiff_to_objpc(i64 %0) {
%2 = inttoptr i64 %0 to i8*
ret i8* %2
}
/* Variables and functions */
int f72(int *);
int f73(int *p) { return f72(p); }


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

x86 assembly (clang, -O2):
<f73>:
jmp    1030 <f72@plt>

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

LLVM IR (-O2):
define i32 @f73(i32* %0) {
%2 = tail call i32 @f72(i32* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ ORA_();
int /*<<< orphan*/ c64_memAbsoluteAddr();
void ORA_abs(void) {
  c64_memAbsoluteAddr();
  ORA_();
}


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

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

LLVM IR (-O0):
define void @ORA_abs() {
%1 = call i32 (...) @c64_memAbsoluteAddr()
%2 = call i32 (...) @ORA_()
ret void
}

LLVM IR (-O2):
define void @ORA_abs() {
%1 = tail call i32 (...) @c64_memAbsoluteAddr()
%2 = tail call i32 (...) @ORA_()
ret void
}
int test_imm_98uint16_reg(unsigned short val) {
  return ((val) & (-0x98 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_98uint16_reg>:
test   $0xff68,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_98uint16_reg(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = and i32 %4, -152
%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_98uint16_reg(i16 zeroext %0) {
%2 = and i16 %0, -152
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
void pver() { printf("%s %s\n", "mfstool", "0.5"); }


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

x86 assembly (clang, -O2):
<pver>:
lea    0xee9(%rip),%rdi
lea    0xee9(%rip),%rsi
lea    0xeea(%rip),%rdx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"%s %s\0A\00"
@.str.1 = [8 x i8] c"mfstool\00"
@.str.2 = [4 x i8] c"0.5\00"
define void @pver() {
%1 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"%s %s\0A\00"
@.str.1 = [8 x i8] c"mfstool\00"
@.str.2 = [4 x i8] c"0.5\00"
define void @pver() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int cut_rod(int *, int);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, const char *argv[]) {
  int p[11] = {0, 1, 5, 8, 9, 10, 17, 17, 20, 24, 30};
  int max;
  max = cut_rod(p, 11);
  printf("%d\n", max);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x40(%rbp),%rdi
lea    0xeaf(%rip),%rsi
mov    $0x2c,%edx
call   1040 <memcpy@plt>
lea    -0x40(%rbp),%rdi
mov    $0xb,%esi
call   1050 <cut_rod@plt>
mov    %eax,-0x44(%rbp)
mov    -0x44(%rbp),%esi
lea    0xeb6(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x38,%rsp
movups 0xef1(%rip),%xmm0
movups %xmm0,0x1c(%rsp)
movaps 0xed9(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xebd(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0xb,%esi
call   1040 <cut_rod@plt>
lea    0xed1(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x38,%rsp
ret

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

LLVM IR (-O2):
@__const.main.p = [11 x i32] [i32 0, i32 1, i32 5, i32 8, i32 9, i32 10, i32 17, i32 17, i32 20, i32 24, i32 30]
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [11 x i32]
%4 = bitcast [11 x i32]* %3 to i8*
%5 = getelementptr inbounds [11 x i32], [11 x i32]* %3, i64 0, i64 0
%6 = call i32 @cut_rod(i32* %5, i32 11)
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ GL_MODELVIEW;
int /*<<< orphan*/ GL_PROJECTION;
int /*<<< orphan*/ glMatrixMode(int /*<<< orphan*/);
int /*<<< orphan*/ gluPerspective(int, int, double, int);
void initGL() {
  glMatrixMode(GL_PROJECTION);
  gluPerspective(60, 4. / 3., .1, 100);
  glMatrixMode(GL_MODELVIEW);
}


x86 assembly (clang, -O0):
<initGL>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
call   1030 <glMatrixMode@plt>
mov    $0x3c,%edi
mov    $0x1,%esi
movsd  0xebc(%rip),%xmm0
mov    $0x64,%edx
call   1040 <gluPerspective@plt>
mov    0x2e93(%rip),%rax
mov    (%rax),%edi
call   1030 <glMatrixMode@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<initGL>:
push   %rax
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
call   1030 <glMatrixMode@plt>
movsd  0xec9(%rip),%xmm0
mov    $0x3c,%edi
mov    $0x1,%esi
mov    $0x64,%edx
call   1040 <gluPerspective@plt>
mov    0x2e96(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1030 <glMatrixMode@plt>

LLVM IR (-O0):
@GL_PROJECTION = global i32 0
@GL_MODELVIEW = global i32 0
define void @initGL() {
%1 = load i32, i32* @GL_PROJECTION
%2 = call i32 @glMatrixMode(i32 %1)
%3 = call i32 @gluPerspective(i32 60, i32 1, double 1.000000e-01, i32 100)
%4 = load i32, i32* @GL_MODELVIEW
%5 = call i32 @glMatrixMode(i32 %4)
ret void
}

LLVM IR (-O2):
@GL_PROJECTION = global i32 0
@GL_MODELVIEW = global i32 0
define void @initGL() {
%1 = load i32, i32* @GL_PROJECTION
%2 = tail call i32 @glMatrixMode(i32 %1)
%3 = tail call i32 @gluPerspective(i32 60, i32 1, double 1.000000e-01, i32 100)
%4 = load i32, i32* @GL_MODELVIEW
%5 = tail call i32 @glMatrixMode(i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ mapif_guild_castle_alldataload(int);
int /*<<< orphan*/ mapif_guild_skillmax_load(int);
int inter_guild_mapif_init(int fd) {
  mapif_guild_castle_alldataload(fd);
  mapif_guild_skillmax_load(fd);
  return 0;
}


x86 assembly (clang, -O0):
<inter_guild_mapif_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <mapif_guild_castle_alldataload@plt>
mov    -0x4(%rbp),%edi
call   1040 <mapif_guild_skillmax_load@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inter_guild_mapif_init>:
push   %rbx
mov    %edi,%ebx
call   1030 <mapif_guild_castle_alldataload@plt>
mov    %ebx,%edi
call   1040 <mapif_guild_skillmax_load@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @inter_guild_mapif_init(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @mapif_guild_castle_alldataload(i32 %3)
%5 = load i32, i32* %2
%6 = call i32 @mapif_guild_skillmax_load(i32 %5)
ret i32 0
}

LLVM IR (-O2):
define i32 @inter_guild_mapif_init(i32 %0) {
%2 = tail call i32 @mapif_guild_castle_alldataload(i32 %0)
%3 = tail call i32 @mapif_guild_skillmax_load(i32 %0)
ret i32 0
}
/* Type definitions */
struct rw_semaphore {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ __up_read(struct rw_semaphore *);
void up_read(struct rw_semaphore *sem) { __up_read(sem); }


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

x86 assembly (clang, -O2):
<up_read>:
jmp    1030 <__up_read@plt>

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

LLVM IR (-O2):
%struct.rw_semaphore = type { i32 }
define void @up_read(%struct.rw_semaphore* %0) {
%2 = tail call i32 @__up_read(%struct.rw_semaphore* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __u8;
typedef int __u32;

/* Variables and functions */
int /*<<< orphan*/ __put_unaligned_le16(int, int /*<<< orphan*/ *);
void __put_unaligned_le32(__u32 val, __u8 *p) {
  __put_unaligned_le16(val >> 16, p + 2);
  __put_unaligned_le16(val, p);
}


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

x86 assembly (clang, -O2):
<__put_unaligned_le32>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
sar    $0x10,%edi
add    $0x8,%rsi
call   1030 <__put_unaligned_le16@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <__put_unaligned_le16@plt>

LLVM IR (-O0):
define void @__put_unaligned_le32(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
store i32 %0, i32* %3
store i32* %1, i32** %4
%5 = load i32, i32* %3
%6 = ashr i32 %5, 16
%7 = load i32*, i32** %4
%8 = getelementptr inbounds i32, i32* %7, i64 2
%9 = call i32 @__put_unaligned_le16(i32 %6, i32* %8)
%10 = load i32, i32* %3
%11 = load i32*, i32** %4
%12 = call i32 @__put_unaligned_le16(i32 %10, i32* %11)
ret void
}

LLVM IR (-O2):
define void @__put_unaligned_le32(i32 %0, i32* %1) {
%3 = ashr i32 %0, 16
%4 = getelementptr inbounds i32, i32* %1, i64 2
%5 = tail call i32 @__put_unaligned_le16(i32 %3, i32* %4)
%6 = tail call i32 @__put_unaligned_le16(i32 %0, i32* %1)
ret void
}
/* Variables and functions */
int BIO_dump_indent_cb(int (*)(void const *, size_t, void *), void *,
                       char const *, int, int /*<<< orphan*/);
int BIO_dump_cb(int (*cb)(const void *data, size_t len, void *u), void *u,
                const char *s, int len) {
  return BIO_dump_indent_cb(cb, u, s, len, 0);
}


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

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

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

LLVM IR (-O2):
define i32 @BIO_dump_cb(i32 (i8*, i64, i8*)* %0, i8* %1, i8* %2, i32 %3) {
%5 = tail call i32 @BIO_dump_indent_cb(i32 (i8*, i64, i8*)* %0, i8* %1, i8* %2, i32 %3, i32 0)
ret i32 %5
}
int char_is_escaped(int nquotes, int nbraces) {
  if (nquotes != 0 || nbraces != 0)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<char_is_escaped>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    111e <char_is_escaped+0x1e>
cmpl   $0x0,-0xc(%rbp)
je     112a <char_is_escaped+0x2a>
movl   $0x1,-0x4(%rbp)
jmp    1131 <char_is_escaped+0x31>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<char_is_escaped>:
xor    %eax,%eax
or     %esi,%edi
setne  %al
ret

LLVM IR (-O0):
define i32 @char_is_escaped(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* %4
%7 = icmp ne i32 %6, 0
br i1 %7, label %11, label %8
8: ; preds = %2
%9 = load i32, i32* %5
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %8, %2
store i32 1, i32* %3
br label %13
12: ; preds = %8
store i32 0, i32* %3
br label %13
13: ; preds = %12, %11
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
define i32 @char_is_escaped(i32 %0, i32 %1) {
%3 = or i32 %1, %0
%4 = icmp ne i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ f();
int main(void) {
  f();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <f@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()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @f()
ret i32 0
}
/* Type definitions */
struct gg_http {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ EINVAL;
int /*<<< orphan*/ errno;
int gg_userlist_put_watch_fd(struct gg_http *h) {
  errno = EINVAL;
  return -1;
}


x86 assembly (clang, -O0):
<gg_userlist_put_watch_fd>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    0x2ec9(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec8(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gg_userlist_put_watch_fd>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%eax
mov    0x2ed0(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
%struct.gg_http = type { i32 }
@EINVAL = global i32 0
@errno = global i32 0
define i32 @gg_userlist_put_watch_fd(%struct.gg_http* %0) {
%2 = alloca %struct.gg_http*
store %struct.gg_http* %0, %struct.gg_http** %2
%3 = load i32, i32* @EINVAL
store i32 %3, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
%struct.gg_http = type { i32 }
@EINVAL = global i32 0
@errno = global i32 0
define i32 @gg_userlist_put_watch_fd(%struct.gg_http* nocapture readnone %0) {
%2 = load i32, i32* @EINVAL
store i32 %2, i32* @errno
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
bool ctrl_char(unsigned char const c) {
  assert('\0' != c);
  return c <= 31 || 127 == c;
}


x86 assembly (clang, -O0):
<ctrl_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    %ecx,%eax
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movzbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x1f,%ecx
mov    %al,-0x2(%rbp)
jle    1156 <ctrl_char+0x46>
movzbl -0x1(%rbp),%ecx
mov    $0x7f,%eax
cmp    %ecx,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ctrl_char>:
push   %rbx
mov    %edi,%ebx
xor    %edi,%edi
test   %ebx,%ebx
setne  %dil
call   1030 <assert@plt>
cmp    $0x20,%bl
setb   %al
cmp    $0x7f,%bl
sete   %cl
or     %al,%cl
movzbl %cl,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @ctrl_char(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = icmp ne i32 0, %4
%6 = zext i1 %5 to i32
%7 = call i32 @assert(i32 %6)
%8 = load i8, i8* %2
%9 = zext i8 %8 to i32
%10 = icmp sle i32 %9, 31
br i1 %10, label %15, label %11
11: ; preds = %1
%12 = load i8, i8* %2
%13 = zext i8 %12 to i32
%14 = icmp eq i32 127, %13
br label %15
15: ; preds = %11, %1
%16 = phi i1 [ true, %1 ], [ %14, %11 ]
%17 = zext i1 %16 to i32
ret i32 %17
}

LLVM IR (-O2):
define i32 @ctrl_char(i8 zeroext %0) {
%2 = icmp ne i8 %0, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = icmp ult i8 %0, 32
%6 = icmp eq i8 %0, 127
%7 = or i1 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}