xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
int32_t f3m_calc_freq(int32_t freq) {
  freq <<= 1;
  return freq;
}


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

x86 assembly (clang, -O2):
<f3m_calc_freq>:
lea    (%rdi,%rdi,1),%eax
ret

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

LLVM IR (-O2):
define i32 @f3m_calc_freq(i32 %0) {
%2 = shl i32 %0, 1
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;
struct mg_connection {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ mg_send_mqtt_short_command(struct mg_connection *, int,
                                              int /*<<< orphan*/);
void mg_mqtt_pubrel(struct mg_connection *nc, uint16_t message_id) {
  mg_send_mqtt_short_command(nc, 6, message_id);
}


x86 assembly (clang, -O0):
<mg_mqtt_pubrel>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
mov    $0x6,%esi
call   1030 <mg_send_mqtt_short_command@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mg_mqtt_pubrel>:
mov    %esi,%edx
mov    $0x6,%esi
jmp    1030 <mg_send_mqtt_short_command@plt>

LLVM IR (-O0):
%struct.mg_connection = type { i32 }
define void @mg_mqtt_pubrel(%struct.mg_connection* %0, i32 %1) {
%3 = alloca %struct.mg_connection*
%4 = alloca i32
store %struct.mg_connection* %0, %struct.mg_connection** %3
store i32 %1, i32* %4
%5 = load %struct.mg_connection*, %struct.mg_connection** %3
%6 = load i32, i32* %4
%7 = call i32 @mg_send_mqtt_short_command(%struct.mg_connection* %5, i32 6, i32 %6)
ret void
}

LLVM IR (-O2):
%struct.mg_connection = type { i32 }
define void @mg_mqtt_pubrel(%struct.mg_connection* %0, i32 %1) {
%3 = tail call i32 @mg_send_mqtt_short_command(%struct.mg_connection* %0, i32 6, i32 %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ ASN1_VALUE;
typedef int /*<<< orphan*/ ASN1_NULL;

/* Variables and functions */
int /*<<< orphan*/ ASN1_NULL_it;
int /*<<< orphan*/ ASN1_item_free(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
void ASN1_NULL_free(ASN1_NULL *a) {
  ASN1_item_free((ASN1_VALUE *)a, &ASN1_NULL_it);
}


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

x86 assembly (clang, -O2):
<ASN1_NULL_free>:
mov    0x2ed1(%rip),%rsi
jmp    1030 <ASN1_item_free@plt>

LLVM IR (-O0):
@ASN1_NULL_it = global i32 0
define void @ASN1_NULL_free(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @ASN1_item_free(i32* %3, i32* @ASN1_NULL_it)
ret void
}

LLVM IR (-O2):
@ASN1_NULL_it = global i32 0
define void @ASN1_NULL_free(i32* %0) {
%2 = tail call i32 @ASN1_item_free(i32* %0, i32* @ASN1_NULL_it)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_mutexattr_t;

/* Variables and functions */
int pthread_mutexattr_init(pthread_mutexattr_t *mattr) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @pthread_mutexattr_init(i32* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ switch_green(int);
bool set_status_led_sn3(bool running) {
  if (running) {
    switch_green(true);
  } else {
    switch_green(false);
  }
  return true;
}


x86 assembly (clang, -O0):
<set_status_led_sn3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1134 <set_status_led_sn3+0x24>
mov    $0x1,%edi
call   1030 <switch_green@plt>
jmp    113b <set_status_led_sn3+0x2b>
xor    %edi,%edi
call   1030 <switch_green@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_status_led_sn3>:
push   %rax
xor    %eax,%eax
test   %edi,%edi
setne  %al
mov    %eax,%edi
call   1030 <switch_green@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @set_status_led_sn3(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 @switch_green(i32 1)
br label %9
7: ; preds = %1
%8 = call i32 @switch_green(i32 0)
br label %9
9: ; preds = %7, %5
ret i32 1
}

LLVM IR (-O2):
define i32 @set_status_led_sn3(i32 %0) {
%2 = icmp ne i32 %0, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @switch_green(i32 %3)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ STDOUT_FILENO;
int write(int /*<<< orphan*/, char *, int);
int putchar(int c) { return write(STDOUT_FILENO, (char *)&c, 1); }


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

x86 assembly (clang, -O2):
<putchar>:
push   %rax
mov    %edi,0x4(%rsp)
mov    0x2ed4(%rip),%rax
mov    (%rax),%edi
lea    0x4(%rsp),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
pop    %rcx
ret

LLVM IR (-O0):
@STDOUT_FILENO = global i32 0
define i32 @putchar(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @STDOUT_FILENO
%4 = bitcast i32* %2 to i8*
%5 = call i32 @write(i32 %3, i8* %4, i32 1)
ret i32 %5
}

LLVM IR (-O2):
@STDOUT_FILENO = global i32 0
define i32 @putchar(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @STDOUT_FILENO
%4 = bitcast i32* %2 to i8*
%5 = call i32 @write(i32 %3, i8* %4, i32 1)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printw(char *);
int cmd_info(int argc, char *argv[]) {
  printw("Info command\n");
  return 0;
}


x86 assembly (clang, -O0):
<cmd_info>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <printw@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_info>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <printw@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"Info command\0A\00"
define i32 @cmd_info(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 @printw(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"Info command\0A\00"
define i32 @cmd_info(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printw(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ OCSP_CERTID;

/* Variables and functions */
int /*<<< orphan*/ *ASN1_item_dup(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ OCSP_CERTID_it;
OCSP_CERTID *OCSP_CERTID_dup(OCSP_CERTID *x) {
  return ASN1_item_dup(&OCSP_CERTID_it, x);
}


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

x86 assembly (clang, -O2):
<OCSP_CERTID_dup>:
mov    %rdi,%rsi
mov    0x2ede(%rip),%rdi
jmp    1030 <ASN1_item_dup@plt>

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

LLVM IR (-O2):
@OCSP_CERTID_it = global i32 0
define i32* @OCSP_CERTID_dup(i32* %0) {
%2 = tail call i32* @ASN1_item_dup(i32* @OCSP_CERTID_it, i32* %0)
ret i32* %2
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
int fd_copy(int, int);
int fd_move(int to, int from) {
  if (from == to)
    return 0;
  if (fd_copy(to, from) == -1)
    return -1;
  close(from);
  return 0;
}


x86 assembly (clang, -O0):
<fd_move>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    1146 <fd_move+0x26>
movl   $0x0,-0x4(%rbp)
jmp    1175 <fd_move+0x55>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <fd_copy@plt>
cmp    $0xffffffff,%eax
jne    1166 <fd_move+0x46>
movl   $0xffffffff,-0x4(%rbp)
jmp    1175 <fd_move+0x55>
mov    -0xc(%rbp),%edi
call   1030 <close@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fd_move>:
push   %rbp
push   %rbx
push   %rax
xor    %ebx,%ebx
cmp    %edi,%esi
je     1143 <fd_move+0x23>
mov    %esi,%ebp
call   1040 <fd_copy@plt>
cmp    $0xffffffff,%eax
je     113e <fd_move+0x1e>
mov    %ebp,%edi
call   1030 <close@plt>
jmp    1143 <fd_move+0x23>
mov    $0xffffffff,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @fd_move(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, %0
br i1 %3, label %9, label %4
4: ; preds = %2
%5 = tail call i32 @fd_copy(i32 %0, i32 %1)
%6 = icmp eq i32 %5, -1
br i1 %6, label %9, label %7
7: ; preds = %4
%8 = tail call i32 @close(i32 %1)
br label %9
9: ; preds = %4, %2, %7
%10 = phi i32 [ 0, %7 ], [ 0, %2 ], [ -1, %4 ]
ret i32 %10
}
int gdGdcChangeDataType(int *param) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @gdGdcChangeDataType(i32* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int OS_Close(int);
int OS_IpcClose(int ipcFd) { return OS_Close(ipcFd); }


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

x86 assembly (clang, -O2):
<OS_IpcClose>:
jmp    1030 <OS_Close@plt>

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

LLVM IR (-O2):
define i32 @OS_IpcClose(i32 %0) {
%2 = tail call i32 @OS_Close(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ laby_game_menu_init();
int main(int argc, const char *argv[]) {
  laby_game_menu_init();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @laby_game_menu_init()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ cat0();
void rot60_sem() { cat0(); }


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

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

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

LLVM IR (-O2):
define void @rot60_sem() {
%1 = tail call i32 (...) @cat0()
ret void
}
/* Type definitions */
struct curl_slist {
  int dummy;
};
struct SessionHandle {
  int dummy;
};

/* Variables and functions */
struct curl_slist *Curl_ssl_engines_list(struct SessionHandle *data) {
  (void)data;
  return NULL;
}


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

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

LLVM IR (-O0):
%struct.curl_slist = type { i32 }
%struct.SessionHandle = type { i32 }
define %struct.curl_slist* @Curl_ssl_engines_list(%struct.SessionHandle* %0) {
%2 = alloca %struct.SessionHandle*
store %struct.SessionHandle* %0, %struct.SessionHandle** %2
%3 = load %struct.SessionHandle*, %struct.SessionHandle** %2
ret %struct.curl_slist* null
}

LLVM IR (-O2):
%struct.curl_slist = type { i32 }
%struct.SessionHandle = type { i32 }
define noalias %struct.curl_slist* @Curl_ssl_engines_list(%struct.SessionHandle* nocapture readnone %0) {
ret %struct.curl_slist* null
}
/* Variables and functions */
int /*<<< orphan*/ DL_TrimQuotesInPlace(char *);
void XTL_TrimQuotesInPlace(char *line) { DL_TrimQuotesInPlace(line); }


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

x86 assembly (clang, -O2):
<XTL_TrimQuotesInPlace>:
jmp    1030 <DL_TrimQuotesInPlace@plt>

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

LLVM IR (-O2):
define void @XTL_TrimQuotesInPlace(i8* %0) {
%2 = tail call i32 @DL_TrimQuotesInPlace(i8* %0)
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int node_number_to_node_in_block(uint32_t i_node_number) {
  return i_node_number % ((1024 / ((14 + 2) * 4)));
}


x86 assembly (clang, -O0):
<node_number_to_node_in_block>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x10,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<node_number_to_node_in_block>:
mov    %edi,%eax
lea    0xf(%rax),%ecx
test   %edi,%edi
cmovns %edi,%ecx
and    $0xfffffff0,%ecx
sub    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @node_number_to_node_in_block(i32 %0) {
%2 = srem i32 %0, 16
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ kd_cwrite(char const *, int /*<<< orphan*/, int);
void kd_write(const char *c) { kd_cwrite(c, 0, 7); }


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

x86 assembly (clang, -O2):
<kd_write>:
xor    %esi,%esi
mov    $0x7,%edx
jmp    1030 <kd_cwrite@plt>

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

LLVM IR (-O2):
define void @kd_write(i8* %0) {
%2 = tail call i32 @kd_cwrite(i8* %0, i32 0, i32 7)
ret void
}
void set_pcie_dereset(void) {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @genblezl_idle() {
ret void
}
int max_int(int a, int b) { return (a > b) ? a : b; }


x86 assembly (clang, -O0):
<max_int>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1121 <max_int+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <max_int+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<max_int>:
mov    %esi,%eax
cmp    %esi,%edi
cmovg  %edi,%eax
ret

LLVM IR (-O0):
define i32 @max_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* %3
%6 = load i32, i32* %4
%7 = icmp sgt i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* %3
br label %12
10: ; preds = %2
%11 = load i32, i32* %4
br label %12
12: ; preds = %10, %8
%13 = phi i32 [ %9, %8 ], [ %11, %10 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @max_int(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ a;

/* Variables and functions */
int /*<<< orphan*/ permutation(int *, int const);
int main(void) {
  int a[] = {1, 2, 2, 3};
  const int size = sizeof(a) / sizeof(a[0]);
  permutation(a, size);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeda(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xed7(%rip),%rax
mov    %rax,-0x18(%rbp)
movl   $0x4,-0x24(%rbp)
lea    -0x20(%rbp),%rdi
mov    $0x4,%esi
call   1030 <permutation@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movaps 0xee5(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x4,%esi
call   1030 <permutation@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.a = [4 x i32] [i32 1, i32 2, i32 2, i32 3]
define i32 @main() {
%1 = alloca i32
%2 = alloca [4 x i32]
%3 = alloca i32
store i32 0, i32* %1
%4 = bitcast [4 x i32]* %2 to i8*
store i32 4, i32* %3
%5 = getelementptr inbounds [4 x i32], [4 x i32]* %2, i64 0, i64 0
%6 = call i32 @permutation(i32* %5, i32 4)
ret i32 0
}

LLVM IR (-O2):
@__const.main.a = [4 x i32] [i32 1, i32 2, i32 2, i32 3]
define i32 @main() {
%1 = alloca [4 x i32]
%2 = bitcast [4 x i32]* %1 to i8*
%3 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 0
%4 = call i32 @permutation(i32* %3, i32 4)
ret i32 0
}
void handle_interrupt(int the_sig) {}


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

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

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

LLVM IR (-O2):
define void @handle_interrupt(i32 %0) {
ret void
}
int is_whitespace(char c) { return (c > 0 && c < 33) ? 1 : 0; }


x86 assembly (clang, -O0):
<is_whitespace>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x2(%rbp)
jle    1129 <is_whitespace+0x29>
movsbl -0x1(%rbp),%eax
cmp    $0x21,%eax
setl   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%dl
xor    %eax,%eax
mov    $0x1,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_whitespace>:
add    $0xff,%dil
xor    %eax,%eax
cmp    $0x20,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @is_whitespace(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sgt i32 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp slt i32 %8, 33
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ false, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i64
%13 = select i1 %11, i32 1, i32 0
ret i32 %13
}

LLVM IR (-O2):
define i32 @is_whitespace(i8 signext %0) {
%2 = add i8 %0, -1
%3 = icmp ult i8 %2, 32
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
struct jslex {
  int dummy;
};

/* Variables and functions */
scalar_t__ my_comma(struct jslex *);
scalar_t__ my_junk_value(struct jslex *);
int my_junk_values(struct jslex *lexer) {
  return my_junk_value(lexer) && (my_comma(lexer) ? my_junk_values(lexer) : 1);
}


x86 assembly (clang, -O0):
<my_junk_values>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <my_junk_value@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x9(%rbp)
je     1194 <my_junk_values+0x64>
mov    -0x8(%rbp),%rdi
call   1050 <my_comma@plt>
cmp    $0x0,%rax
je     117b <my_junk_values+0x4b>
mov    -0x8(%rbp),%rdi
call   1030 <my_junk_values@plt>
mov    %eax,-0x10(%rbp)
jmp    1188 <my_junk_values+0x58>
mov    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1188 <my_junk_values+0x58>
mov    -0x10(%rbp),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_junk_values>:
push   %rbx
mov    %rdi,%rbx
call   1040 <my_junk_value@plt>
test   %rax,%rax
je     115e <my_junk_values+0x2e>
mov    %rbx,%rdi
call   1050 <my_comma@plt>
test   %rax,%rax
je     1162 <my_junk_values+0x32>
mov    %rbx,%rdi
call   1030 <my_junk_values@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
setne  %al
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.jslex = type { i32 }
define i32 @my_junk_values(%struct.jslex* %0) {
%2 = alloca %struct.jslex*
store %struct.jslex* %0, %struct.jslex** %2
%3 = load %struct.jslex*, %struct.jslex** %2
%4 = call i64 @my_junk_value(%struct.jslex* %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %17
6: ; preds = %1
%7 = load %struct.jslex*, %struct.jslex** %2
%8 = call i64 @my_comma(%struct.jslex* %7)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %6
%11 = load %struct.jslex*, %struct.jslex** %2
%12 = call i32 @my_junk_values(%struct.jslex* %11)
br label %14
13: ; preds = %6
br label %14
14: ; preds = %13, %10
%15 = phi i32 [ %12, %10 ], [ 1, %13 ]
%16 = icmp ne i32 %15, 0
br label %17
17: ; preds = %14, %1
%18 = phi i1 [ false, %1 ], [ %16, %14 ]
%19 = zext i1 %18 to i32
ret i32 %19
}

LLVM IR (-O2):
%struct.jslex = type { i32 }
define i32 @my_junk_values(%struct.jslex* %0) {
%2 = tail call i64 @my_junk_value(%struct.jslex* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = tail call i64 @my_comma(%struct.jslex* %0)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %1, %4, %9
%8 = phi i32 [ %12, %9 ], [ 0, %1 ], [ 1, %4 ]
ret i32 %8
9: ; preds = %4
%10 = tail call i32 @my_junk_values(%struct.jslex* %0)
%11 = icmp ne i32 %10, 0
%12 = zext i1 %11 to i32
br label %7
}
/* Variables and functions */
int /*<<< orphan*/ register_tm_clones();
void frame_dummy() { register_tm_clones(); }


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

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

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

LLVM IR (-O2):
define void @frame_dummy() {
%1 = tail call i32 (...) @register_tm_clones()
ret void
}
double pathcon_nm2_sq(double x) { return x * x; }


x86 assembly (clang, -O0):
<pathcon_nm2_sq>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<pathcon_nm2_sq>:
mulsd  %xmm0,%xmm0
ret

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

LLVM IR (-O2):
define double @pathcon_nm2_sq(double %0) {
%2 = fmul double %0, %0
ret double %2
}
void count_unsafe_node(void) {}


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

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

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

LLVM IR (-O2):
define void @count_unsafe_node() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int scanf(char *, int *);
void check_intInput(int *a) {
  if ((scanf("%d", a)) != 1) {
    printf("Not digit!");
    exit(EXIT_FAILURE);
  }
}


x86 assembly (clang, -O0):
<check_intInput>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xeb9(%rip),%rdi
call   1040 <scanf@plt>
cmp    $0x1,%eax
je     116f <check_intInput+0x3f>
lea    0xea7(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e78(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_intInput>:
push   %rax
mov    %rdi,%rsi
lea    0xec5(%rip),%rdi
call   1040 <scanf@plt>
cmp    $0x1,%eax
jne    1147 <check_intInput+0x17>
pop    %rax
ret
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e86(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [11 x i8] c"Not digit!\00"
@EXIT_FAILURE = global i32 0
define void @check_intInput(i32* %0) {
%2 = tail call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %0)
%3 = icmp eq i32 %2, 1
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%6 = load i32, i32* @EXIT_FAILURE
%7 = tail call i32 @exit(i32 %6)
unreachable
8: ; preds = %1
ret void
}
/* Variables and functions */
void *lmn_string_copy(void *);
void *sp_cb_string_copy(void *s) { return lmn_string_copy(s); }


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

x86 assembly (clang, -O2):
<sp_cb_string_copy>:
jmp    1030 <lmn_string_copy@plt>

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

LLVM IR (-O2):
define i8* @sp_cb_string_copy(i8* %0) {
%2 = tail call i8* @lmn_string_copy(i8* %0)
ret i8* %2
}
/* Type definitions */
typedef unsigned long long uint64_t;

/* Variables and functions */
int largest_power_of_2(uint64_t size, int item_size) {
  uint64_t largest;
  uint64_t nitems;
  nitems = (size * 1024ULL * 1024ULL) / item_size;
  largest = 1ULL;
  while (largest <= nitems) {
    largest <<= 1ULL;
  }
  largest >>= 1ULL;
  return largest;
}


x86 assembly (clang, -O0):
<largest_power_of_2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
shl    $0xa,%rax
shl    $0xa,%rax
movslq -0xc(%rbp),%rcx
xor    %edx,%edx
div    %rcx
mov    %rax,-0x20(%rbp)
movq   $0x1,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x20(%rbp),%rax
ja     114b <largest_power_of_2+0x4b>
mov    -0x18(%rbp),%rax
shl    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    112c <largest_power_of_2+0x2c>
mov    -0x18(%rbp),%rax
shr    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<largest_power_of_2>:
mov    %rdi,%rax
shl    $0x14,%rax
movslq %esi,%rcx
mov    %rax,%rdx
or     %rcx,%rdx
shr    $0x20,%rdx
je     111d <largest_power_of_2+0x1d>
xor    %edx,%edx
div    %rcx
jmp    1121 <largest_power_of_2+0x21>
xor    %edx,%edx
div    %esi
mov    $0x1,%edx
cs nopw 0x0(%rax,%rax,1)
mov    %rdx,%rcx
add    %rdx,%rdx
cmp    %rax,%rcx
jbe    1130 <largest_power_of_2+0x30>
shr    %rcx
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @largest_power_of_2(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
%5 = alloca i64
%6 = alloca i64
store i64 %0, i64* %3
store i32 %1, i32* %4
%7 = load i64, i64* %3
%8 = mul i64 %7, 1024
%9 = mul i64 %8, 1024
%10 = load i32, i32* %4
%11 = sext i32 %10 to i64
%12 = udiv i64 %9, %11
store i64 %12, i64* %6
store i64 1, i64* %5
br label %13
13: ; preds = %17, %2
%14 = load i64, i64* %5
%15 = load i64, i64* %6
%16 = icmp ule i64 %14, %15
br i1 %16, label %17, label %20
17: ; preds = %13
%18 = load i64, i64* %5
%19 = shl i64 %18, 1
store i64 %19, i64* %5
br label %13
20: ; preds = %13
%21 = load i64, i64* %5
%22 = lshr i64 %21, 1
store i64 %22, i64* %5
%23 = load i64, i64* %5
%24 = trunc i64 %23 to i32
ret i32 %24
}

LLVM IR (-O2):
define i32 @largest_power_of_2(i64 %0, i32 %1) {
%3 = shl i64 %0, 20
%4 = sext i32 %1 to i64
%5 = udiv i64 %3, %4
br label %6
6: ; preds = %6, %2
%7 = phi i64 [ 1, %2 ], [ %9, %6 ]
%8 = icmp ugt i64 %7, %5
%9 = shl i64 %7, 1
br i1 %8, label %10, label %6
10: ; preds = %6
%11 = lshr i64 %7, 1
%12 = trunc i64 %11 to i32
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ funct(int **);
int /*<<< orphan*/ insert(int);
int main() {
  int start[4][4] = {{5, 2, 3}, {4, 1, 6}, {7, 8, 9}};
  insert(523416789);
  funct(start);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x50(%rbp),%rdi
lea    0xeb6(%rip),%rsi
mov    $0x40,%edx
call   1030 <memcpy@plt>
mov    $0x1f32b4d5,%edi
call   1050 <insert@plt>
lea    -0x50(%rbp),%rdi
call   1040 <funct@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x48,%rsp
movaps 0xf05(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xee9(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xecd(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xeb1(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    $0x1f32b4d5,%edi
call   1040 <insert@plt>
mov    %rsp,%rdi
call   1030 <funct@plt>
xor    %eax,%eax
add    $0x48,%rsp
ret

LLVM IR (-O0):
@__const.main.start = [4 x [4 x i32]] [[4 x i32] [i32 5, i32 2, i32 3, i32 0], [4 x i32] [i32 4, i32 1, i32 6, i32 0], [4 x i32] [i32 7, i32 8, i32 9, i32 0], [4 x i32] zeroinitializer]
define i32 @main() {
%1 = alloca i32
%2 = alloca [4 x [4 x i32]]
store i32 0, i32* %1
%3 = bitcast [4 x [4 x i32]]* %2 to i8*
%4 = call i32 @insert(i32 523416789)
%5 = getelementptr inbounds [4 x [4 x i32]], [4 x [4 x i32]]* %2, i64 0, i64 0
%6 = bitcast [4 x i32]* %5 to i32**
%7 = call i32 @funct(i32** %6)
ret i32 0
}

LLVM IR (-O2):
@__const.main.start = [4 x [4 x i32]] [[4 x i32] [i32 5, i32 2, i32 3, i32 0], [4 x i32] [i32 4, i32 1, i32 6, i32 0], [4 x i32] [i32 7, i32 8, i32 9, i32 0], [4 x i32] zeroinitializer]
define i32 @main() {
%1 = alloca [4 x [4 x i32]]
%2 = bitcast [4 x [4 x i32]]* %1 to i8*
%3 = tail call i32 @insert(i32 523416789)
%4 = bitcast [4 x [4 x i32]]* %1 to i32**
%5 = call i32 @funct(i32** %4)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ RSA;

/* Variables and functions */
int /*<<< orphan*/ RSA_PKCS1_PADDING;
int RSA_public_decrypt(int, unsigned char *, unsigned char *,
                       int /*<<< orphan*/ *, int /*<<< orphan*/);
int rsa_decrypt(unsigned char *signature, int len, unsigned char *digest,
                RSA *pubkey) {
  int result;
  result =
      RSA_public_decrypt(len, signature, digest, pubkey, RSA_PKCS1_PADDING);
  return result;
}


x86 assembly (clang, -O0):
<rsa_decrypt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    0x2e9b(%rip),%rax
mov    (%rax),%r8d
call   1030 <RSA_public_decrypt@plt>
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rsa_decrypt>:
mov    %rdi,%rax
mov    0x2ebe(%rip),%rdi
mov    (%rdi),%r8d
mov    %esi,%edi
mov    %rax,%rsi
jmp    1030 <RSA_public_decrypt@plt>

LLVM IR (-O0):
@RSA_PKCS1_PADDING = global i32 0
define i32 @rsa_decrypt(i8* %0, i32 %1, i8* %2, i32* %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32*
%9 = alloca i32
store i8* %0, i8** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i32* %3, i32** %8
%10 = load i32, i32* %6
%11 = load i8*, i8** %5
%12 = load i8*, i8** %7
%13 = load i32*, i32** %8
%14 = load i32, i32* @RSA_PKCS1_PADDING
%15 = call i32 @RSA_public_decrypt(i32 %10, i8* %11, i8* %12, i32* %13, i32 %14)
store i32 %15, i32* %9
%16 = load i32, i32* %9
ret i32 %16
}

LLVM IR (-O2):
@RSA_PKCS1_PADDING = global i32 0
define i32 @rsa_decrypt(i8* %0, i32 %1, i8* %2, i32* %3) {
%5 = load i32, i32* @RSA_PKCS1_PADDING
%6 = tail call i32 @RSA_public_decrypt(i32 %1, i8* %0, i8* %2, i32* %3, i32 %5)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isprint(int);
void t_isprint_0xb6() {
  Assert_real((isprint(182) == 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_isprint.c",
              915, ("isprint should be 0 for 0xb6"));
}


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

x86 assembly (clang, -O2):
<t_isprint_0xb6>:
push   %rax
mov    $0xb6,%edi
call   1030 <isprint@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x393,%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_isprint.c\00"
@.str.1 = [29 x i8] c"isprint should be 0 for 0xb6\00"
define void @t_isprint_0xb6() {
%1 = call i64 @isprint(i32 182)
%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 915, 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_isprint.c\00"
@.str.1 = [29 x i8] c"isprint should be 0 for 0xb6\00"
define void @t_isprint_0xb6() {
%1 = tail call i64 @isprint(i32 182)
%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 915, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int unmailboxY(int i) { return (i / 12) % 12 - 2; }


x86 assembly (clang, -O0):
<unmailboxY>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xc,%ecx
cltd
idiv   %ecx
mov    $0xc,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
sub    $0x2,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<unmailboxY>:
movslq %edi,%rax
imul   $0x2aaaaaab,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x21,%rax
add    %ecx,%eax
cltq
imul   $0x2aaaaaab,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x21,%rcx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,2),%ecx
sub    %ecx,%eax
add    $0xfffffffe,%eax
ret

LLVM IR (-O0):
define i32 @unmailboxY(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sdiv i32 %3, 12
%5 = srem i32 %4, 12
%6 = sub nsw i32 %5, 2
ret i32 %6
}

LLVM IR (-O2):
define i32 @unmailboxY(i32 %0) {
%2 = sdiv i32 %0, 12
%3 = srem i32 %2, 12
%4 = add nsw i32 %3, -2
ret i32 %4
}
int __gedf2(double a __attribute__((unused)),
            double b __attribute__((unused))) {
  return 0;
}


x86 assembly (clang, -O0):
<__gedf2>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @__gedf2(double %0, double %1) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ le32toh(int /*<<< orphan*/);
uint32_t unaligned_read_le32(const void *_u) {
  const struct __attribute__((packed, may_alias)) { uint32_t x; } *u = _u;
  return le32toh(u->x);
}


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

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

LLVM IR (-O0):
%struct.anon = type { i32 }
define i32 @unaligned_read_le32(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.anon*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to %struct.anon*
store %struct.anon* %5, %struct.anon** %3
%6 = load %struct.anon*, %struct.anon** %3
%7 = getelementptr inbounds %struct.anon, %struct.anon* %6, i32 0, i32 0
%8 = load i32, i32* %7
%9 = call i32 @le32toh(i32 %8)
ret i32 %9
}

LLVM IR (-O2):
define i32 @unaligned_read_le32(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = tail call i32 @le32toh(i32 %3)
ret i32 %4
}
void G_LoadFiredefsFromDisk(void) {}


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

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

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

LLVM IR (-O2):
define void @G_LoadFiredefsFromDisk() {
ret void
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ err_exit(char *);
scalar_t__ fstat(int, struct stat *);
void _fstat(int fd, struct stat *sb) {
  if (fstat(fd, sb) < 0)
    err_exit("_fstat");
}


x86 assembly (clang, -O0):
<_fstat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <fstat@plt>
cmp    $0x0,%rax
jge    1151 <_fstat+0x31>
lea    0xeb4(%rip),%rdi
call   1030 <err_exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_fstat>:
push   %rax
call   1040 <fstat@plt>
test   %rax,%rax
js     112d <_fstat+0xd>
pop    %rax
ret
lea    0xecc(%rip),%rdi
pop    %rax
jmp    1030 <err_exit@plt>

LLVM IR (-O0):
%struct.stat = type { i32 }
@.str = [7 x i8] c"_fstat\00"
define void @_fstat(i32 %0, %struct.stat* %1) {
%3 = alloca i32
%4 = alloca %struct.stat*
store i32 %0, i32* %3
store %struct.stat* %1, %struct.stat** %4
%5 = load i32, i32* %3
%6 = load %struct.stat*, %struct.stat** %4
%7 = call i64 @fstat(i32 %5, %struct.stat* %6)
%8 = icmp slt i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = call i32 @err_exit(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %11
11: ; preds = %9, %2
ret void
}

LLVM IR (-O2):
%struct.stat = type { i32 }
@.str = [7 x i8] c"_fstat\00"
define void @_fstat(i32 %0, %struct.stat* nocapture %1) {
%3 = tail call i64 @fstat(i32 %0, %struct.stat* %1)
%4 = icmp slt i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @err_exit(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ mmio_writel(int /*<<< orphan*/, void *);
void mmio_le_writel(uint32_t val, void *addr) { mmio_writel((val), addr); }


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

x86 assembly (clang, -O2):
<mmio_le_writel>:
jmp    1030 <mmio_writel@plt>

LLVM IR (-O0):
define void @mmio_le_writel(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 i8*, i8** %4
%7 = call i32 @mmio_writel(i32 %5, i8* %6)
ret void
}

LLVM IR (-O2):
define void @mmio_le_writel(i32 %0, i8* %1) {
%3 = tail call i32 @mmio_writel(i32 %0, i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ft_putchar_fd(char const, int);
void ft_putendl_fd(char const *str, int fd) {
  int i;
  i = 0;
  while (str[i] != '\0') {
    ft_putchar_fd(str[i], fd);
    i++;
  }
  ft_putchar_fd('\n', fd);
}


x86 assembly (clang, -O0):
<ft_putendl_fd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     115f <ft_putendl_fd+0x4f>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    -0xc(%rbp),%esi
movsbl %al,%edi
call   1030 <ft_putchar_fd@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <ft_putendl_fd+0x16>
mov    -0xc(%rbp),%esi
mov    $0xa,%edi
call   1030 <ft_putchar_fd@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_putendl_fd>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    (%rdi),%al
test   %al,%al
je     1145 <ft_putendl_fd+0x35>
mov    %rdi,%rbx
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl %al,%edi
mov    %ebp,%esi
call   1030 <ft_putchar_fd@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <ft_putendl_fd+0x20>
mov    $0xa,%edi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <ft_putchar_fd@plt>

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

LLVM IR (-O2):
define void @ft_putendl_fd(i8* nocapture %0, i32 %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %2, %5
%6 = phi i64 [ %9, %5 ], [ 0, %2 ]
%7 = phi i8 [ %11, %5 ], [ %3, %2 ]
%8 = tail call i32 @ft_putchar_fd(i8 signext %7, i32 %1)
%9 = add nuw i64 %6, 1
%10 = getelementptr inbounds i8, i8* %0, i64 %9
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5, %2
%14 = tail call i32 @ft_putchar_fd(i8 signext 10, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ usleep(int);
void ni2c_wait() { usleep(100000); }


x86 assembly (clang, -O0):
<ni2c_wait>:
push   %rbp
mov    %rsp,%rbp
mov    $0x186a0,%edi
call   1030 <usleep@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ni2c_wait>:
mov    $0x186a0,%edi
jmp    1030 <usleep@plt>

LLVM IR (-O0):
define void @ni2c_wait() {
%1 = call i32 @usleep(i32 100000)
ret void
}

LLVM IR (-O2):
define void @ni2c_wait() {
%1 = tail call i32 @usleep(i32 100000)
ret void
}
/* Variables and functions */
scalar_t__ is_digit(char);
scalar_t__ is_letter(char);
int is_alnum(char c) { return (is_letter(c) || is_digit(c)); }


x86 assembly (clang, -O0):
<is_alnum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <is_letter@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x2(%rbp)
jne    115c <is_alnum+0x3c>
movsbl -0x1(%rbp),%edi
call   1040 <is_digit@plt>
cmp    $0x0,%rax
setne  %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):
<is_alnum>:
push   %rbx
mov    %edi,%ebx
call   1030 <is_letter@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1137 <is_alnum+0x17>
pop    %rbx
ret
movsbl %bl,%edi
call   1040 <is_digit@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @is_alnum(i8 signext %0) {
%2 = tail call i64 @is_letter(i8 signext %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i64 @is_digit(i8 signext %0)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Variables and functions */
int f(int);
int /*<<< orphan*/ print_int(int);
int /*<<< orphan*/ print_string(char *);
void main(void) {
  int x;
  x = f(5);
  print_int(x);
  print_string("\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x5,%edi
call   1030 <f@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <print_int@plt>
lea    0xeac(%rip),%rdi
call   1040 <print_string@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x5,%edi
call   1030 <f@plt>
mov    %eax,%edi
call   1050 <print_int@plt>
lea    0xeb7(%rip),%rdi
pop    %rax
jmp    1040 <print_string@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
define void @main() {
%1 = alloca i32
%2 = call i32 @f(i32 5)
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = call i32 @print_int(i32 %3)
%5 = call i32 @print_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"\0A\00"
define void @main() {
%1 = tail call i32 @f(i32 5)
%2 = tail call i32 @print_int(i32 %1)
%3 = tail call i32 @print_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}