xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int /*<<< orphan*/);
char *foo(char *buf, char *p) {
  sprintf(buf, "abcde", p++);
  return p;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    %eax,%edx
lea    0xec4(%rip),%rsi
call   1030 <sprintf@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %rbx
mov    %rsi,%rdx
lea    0x1(%rsi),%rbx
lea    0xee1(%rip),%rsi
call   1030 <sprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"abcde\00"
define i8* @foo(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 = getelementptr inbounds i8, i8* %6, i32 1
store i8* %7, i8** %4
%8 = ptrtoint i8* %6 to i32
%9 = call i32 @sprintf(i8* %5, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = load i8*, i8** %4
ret i8* %10
}

LLVM IR (-O2):
@.str = [6 x i8] c"abcde\00"
define i8* @foo(i8* nocapture writeonly %0, i8* %1) {
%3 = getelementptr inbounds i8, i8* %1, i64 1
%4 = ptrtoint i8* %1 to i64
%5 = trunc i64 %4 to i32
%6 = tail call i32 @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i8* %3
}
int _rend() { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @_rend() {
ret i32 -1
}
int ffs(word)
int word;
{
  int i;
  if (!word)
    return 0;
  i = 0;
  for (;;) {
    if (((1 << i++) & word) != 0)
      return i;
  }
}


x86 assembly (clang, -O0):
<ffs>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    111d <ffs+0x1d>
movl   $0x0,-0x4(%rbp)
jmp    1152 <ffs+0x52>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    %ecx,%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    $0x1,%eax
shl    %cl,%eax
and    -0x8(%rbp),%eax
cmp    $0x0,%eax
je     114d <ffs+0x4d>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1152 <ffs+0x52>
jmp    1124 <ffs+0x24>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ffs>:
test   %edi,%edi
je     111b <ffs+0x1b>
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
lea    0x1(%rcx),%eax
bt     %ecx,%edi
mov    %eax,%ecx
jae    1110 <ffs+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @ffs(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %5, %3 ], [ 0, %1 ]
%5 = add nuw nsw i32 %4, 1
%6 = shl nuw i32 1, %4
%7 = and i32 %6, %0
%8 = icmp eq i32 %7, 0
br i1 %8, label %3, label %9
9: ; preds = %3, %1
%10 = phi i32 [ 0, %1 ], [ %5, %3 ]
ret i32 %10
}
void CLY_Beep(void) {}


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

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

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

LLVM IR (-O2):
define void @CLY_Beep() {
ret void
}
int axp_usb_vollim(int vol) {
  int ret = 0;
  return ret;
}


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

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

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

LLVM IR (-O2):
define i32 @axp_usb_vollim(i32 %0) {
ret i32 0
}
int bitOrInvertwith(int sourceWord, int destinationWord) {
  return sourceWord | (~destinationWord);
}


x86 assembly (clang, -O0):
<bitOrInvertwith>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
xor    $0xffffffff,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitOrInvertwith>:
mov    %esi,%eax
not    %eax
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @bitOrInvertwith(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 = xor i32 %6, -1
%8 = or i32 %5, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @bitOrInvertwith(i32 %0, i32 %1) {
%3 = xor i32 %1, -1
%4 = or i32 %3, %0
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ c(int);
int /*<<< orphan*/ write(int, char *, int);
void b(int x) {
  write(1, "B\n", 2);
  c(x);
}


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

x86 assembly (clang, -O2):
<b>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rsi
mov    $0x1,%edi
mov    $0x2,%edx
call   1030 <write@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <c@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"B\0A\00"
define void @b(i32 %0) {
%2 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 2)
%3 = tail call i32 @c(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sha256(unsigned char const *, int, unsigned char *);
void sha256_sha256(unsigned char const *in, size_t in_size,
                   unsigned char *out) {
  unsigned char h1[32];
  sha256(in, in_size, h1);
  sha256(h1, 32, out);
}


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

x86 assembly (clang, -O2):
<sha256_sha256>:
push   %r14
push   %rbx
sub    $0x28,%rsp
mov    %rdx,%rbx
mov    %rsp,%r14
mov    %r14,%rdx
call   1030 <sha256@plt>
mov    %r14,%rdi
mov    $0x20,%esi
mov    %rbx,%rdx
call   1030 <sha256@plt>
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @sha256_sha256(i8* %0, i64 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i8*
%7 = alloca [32 x i8]
store i8* %0, i8** %4
store i64 %1, i64* %5
store i8* %2, i8** %6
%8 = load i8*, i8** %4
%9 = load i64, i64* %5
%10 = trunc i64 %9 to i32
%11 = getelementptr inbounds [32 x i8], [32 x i8]* %7, i64 0, i64 0
%12 = call i32 @sha256(i8* %8, i32 %10, i8* %11)
%13 = getelementptr inbounds [32 x i8], [32 x i8]* %7, i64 0, i64 0
%14 = load i8*, i8** %6
%15 = call i32 @sha256(i8* %13, i32 32, i8* %14)
ret void
}

LLVM IR (-O2):
define void @sha256_sha256(i8* %0, i64 %1, i8* %2) {
%4 = alloca [32 x i8]
%5 = getelementptr inbounds [32 x i8], [32 x i8]* %4, i64 0, i64 0
%6 = trunc i64 %1 to i32
%7 = call i32 @sha256(i8* %0, i32 %6, i8* %5)
%8 = call i32 @sha256(i8* %5, i32 32, i8* %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ ASN1_OCTET_STRING;

/* Variables and functions */
int ASN1_STRING_cmp(int /*<<< orphan*/ const *, int /*<<< orphan*/ const *);
int ASN1_OCTET_STRING_cmp(const ASN1_OCTET_STRING *a,
                          const ASN1_OCTET_STRING *b) {
  return ASN1_STRING_cmp(a, b);
}


x86 assembly (clang, -O0):
<ASN1_OCTET_STRING_cmp>:
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 <ASN1_STRING_cmp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ASN1_OCTET_STRING_cmp>:
jmp    1030 <ASN1_STRING_cmp@plt>

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

LLVM IR (-O2):
define i32 @ASN1_OCTET_STRING_cmp(i32* %0, i32* %1) {
%3 = tail call i32 @ASN1_STRING_cmp(i32* %0, i32* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void destroy_ini_value(void *v_value) { free(v_value); }


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

x86 assembly (clang, -O2):
<destroy_ini_value>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @destroy_ini_value(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ I2CIntHandler();
void I2C0_Handler(void) { I2CIntHandler(); }


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

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

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

LLVM IR (-O2):
define void @I2C0_Handler() {
%1 = tail call i32 (...) @I2CIntHandler()
ret void
}
char *strsignal(int signum) {
  switch (signum) {
  default:
    return "unknown signum";
  }
}


x86 assembly (clang, -O0):
<strsignal>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
lea    0xef2(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [15 x i8] c"unknown signum\00"
define i8* @strsignal(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %4 [
]
4: ; preds = %1
ret i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [15 x i8] c"unknown signum\00"
define i8* @strsignal(i32 %0) {
ret i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0)
}
int test_imm_C4int16_mem(short *val) {
  return ((*val) & (-0xC4 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_C4int16_mem>:
movzwl (%rdi),%eax
test   $0xff3c,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_C4int16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -196
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int test_imm_AFuint8_reg(unsigned char val) {
  return ((val) & (-0xAF << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_AFuint8_reg(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = and i32 %4, -175
%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_AFuint8_reg(i8 zeroext %0) {
%2 = and i8 %0, 81
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void XtDispatchEventToWidget() {}


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

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

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

LLVM IR (-O2):
define void @XtDispatchEventToWidget() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void usage(const char *prog) {
  fprintf(stderr,
          "usage: %s [OPTS] IFACE\n\n"
          "OPTS:\n"
          "    -S    use skb-mode\n"
          "    -N    enforce native mode\n"
          "    -F    force loading prog\n",
          prog);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [113 x i8] c"usage: %s [OPTS] IFACE\0A\0AOPTS:\0A -S use skb-mode\0A -N enforce native mode\0A -F force loading prog\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([113 x i8], [113 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [113 x i8] c"usage: %s [OPTS] IFACE\0A\0AOPTS:\0A -S use skb-mode\0A -N enforce native mode\0A -F force loading prog\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([113 x i8], [113 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
__attribute__((unused)) char *strcpy(char *dest, const char *src) {
  char *tmp = dest;
  unsigned int i0, i1;
  asm volatile("cld \n\t"
               "1: lodsb \n\t"
               "stosb \n\t"
               "testb %%al, %%al \n\t"
               "jnz 1b"
               : "=&S"(i0), "=&D"(i1)
               : "0"(src), "1"(dest)
               : "%al");
  return tmp;
}


x86 assembly (clang, -O0):
<strcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x8(%rbp),%rdi
cld
lods   %ds:(%rsi),%al
stos   %al,%es:(%rdi)
test   %al,%al
jne    111d <strcpy+0x1d>
mov    %esi,%eax
mov    %eax,-0x1c(%rbp)
mov    %edi,%eax
mov    %eax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcpy>:
mov    %rdi,%rcx
cld
lods   %ds:(%rsi),%al
stos   %al,%es:(%rdi)
test   %al,%al
jne    1104 <strcpy+0x4>
mov    %rcx,%rax
ret

LLVM IR (-O0):
define i8* @strcpy(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%8 = load i8*, i8** %3
store i8* %8, i8** %5
%9 = load i8*, i8** %4
%10 = load i8*, i8** %3
%11 = call { i8*, i8* } asm sideeffect "cld \0A\091: lodsb \0A\09stosb \0A\09testb %al, %al \0A\09jnz 1b", "=&{si},=&{di},0,1,~{al},~{dirflag},~{fpsr},~{flags}"(i8* %9, i8* %10)
%12 = extractvalue { i8*, i8* } %11, 0
%13 = extractvalue { i8*, i8* } %11, 1
%14 = ptrtoint i8* %12 to i64
%15 = trunc i64 %14 to i32
store i32 %15, i32* %6
%16 = ptrtoint i8* %13 to i64
%17 = trunc i64 %16 to i32
store i32 %17, i32* %7
%18 = load i8*, i8** %5
ret i8* %18
}

LLVM IR (-O2):
define i8* @strcpy(i8* returned %0, i8* %1) {
%3 = tail call { i8*, i8* } asm sideeffect "cld \0A\091: lodsb \0A\09stosb \0A\09testb %al, %al \0A\09jnz 1b", "=&{si},=&{di},0,1,~{al},~{dirflag},~{fpsr},~{flags}"(i8* %1, i8* %0)
ret i8* %0
}
/* Variables and functions */
scalar_t__ asin(float);
float asinf(float x) { return (float)asin(x); }


x86 assembly (clang, -O0):
<asinf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <asin@plt>
cvtsi2ss %rax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<asinf>:
push   %rax
call   1030 <asin@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @asinf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call i64 @asin(float %3)
%5 = sitofp i64 %4 to float
ret float %5
}

LLVM IR (-O2):
define float @asinf(float %0) {
%2 = tail call i64 @asin(float %0)
%3 = sitofp i64 %2 to float
ret float %3
}
/* Type definitions */
typedef int /*<<< orphan*/ __m64;

/* Variables and functions */
int /*<<< orphan*/ _mm_cmpgt_pi16(int /*<<< orphan*/, int /*<<< orphan*/);
__m64 __attribute__((no, unused)) test(__m64 s1, __m64 s2) {
  return _mm_cmpgt_pi16(s1, s2);
}


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

x86 assembly (clang, -O2):
<test>:
jmp    1030 <_mm_cmpgt_pi16@plt>

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

LLVM IR (-O2):
define i32 @test(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_cmpgt_pi16(i32 %0, i32 %1)
ret i32 %3
}
int main(void) {
  int x[2];
  int i = 0;
  x[i++] = 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0xc(%rbp)
cltq
movl   $0x0,-0x8(%rbp,%rax,4)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ std_err(char *);
usage() {
  std_err("Usage: cmp [-ls] file1 file2\n");
  exit(2);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <std_err@plt>
mov    $0x2,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <std_err@plt>
mov    $0x2,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
@.str = [30 x i8] c"Usage: cmp [-ls] file1 file2\0A\00"
define i32 @usage() {
%1 = call i32 @std_err(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 2)
unreachable
}

LLVM IR (-O2):
@.str = [30 x i8] c"Usage: cmp [-ls] file1 file2\0A\00"
define i32 @usage() {
%1 = tail call i32 @std_err(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 2)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("hello\n");
  return 10;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <printf@plt>
mov    $0xa,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
mov    $0xa,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"hello\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret i32 10
}

LLVM IR (-O2):
@str = [6 x i8] c"hello\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
ret i32 10
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
int _usage(void) {
  fputs("Usage: sh [i][command_file [argument...]]\n       sh "
        "-c[i]command_string[command_name [argument]]\n       sh "
        "-s[i][argument]\n",
        stderr);
  return 1;
}


x86 assembly (clang, -O0):
<_usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%esi
lea    0xedc(%rip),%rdi
call   1030 <fputs@plt>
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_usage>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%esi
lea    0xedf(%rip),%rdi
call   1030 <fputs@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [124 x i8] c"Usage: sh [i][command_file [argument...]]\0A sh -c[i]command_string[command_name [argument]]\0A sh -s[i][argument]\0A\00"
@stderr = global i32 0
define i32 @_usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fputs(i8* getelementptr inbounds ([124 x i8], [124 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 1
}

LLVM IR (-O2):
@.str = [124 x i8] c"Usage: sh [i][command_file [argument...]]\0A sh -c[i]command_string[command_name [argument]]\0A sh -s[i][argument]\0A\00"
@stderr = global i32 0
define i32 @_usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([124 x i8], [124 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 1
}
int test_imm_FDuint16_reg(unsigned short val) {
  return ((val) & (-0xFD << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_FDuint16_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, -253
%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_FDuint16_reg(i16 zeroext %0) {
%2 = and i16 %0, -253
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void grid_clock_term(__attribute__((unused)) struct grid_clock *self) {}


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

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

LLVM IR (-O0):
%struct.grid_clock = type opaque
define void @grid_clock_term(%struct.grid_clock* %0) {
%2 = alloca %struct.grid_clock*
store %struct.grid_clock* %0, %struct.grid_clock** %2
ret void
}

LLVM IR (-O2):
%struct.grid_clock = type opaque
define void @grid_clock_term(%struct.grid_clock* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ ispunct(int);
void t_ispunct_0x7c() {
  Assert_real((ispunct(124)),
              "/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_ispunct.c",
              625, ("ispunct should be 1 for |"));
}


x86 assembly (clang, -O0):
<t_ispunct_0x7c>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7c,%edi
call   1030 <ispunct@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x271,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_ispunct_0x7c>:
push   %rax
mov    $0x7c,%edi
call   1030 <ispunct@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x271,%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_ispunct.c\00"
@.str.1 = [26 x i8] c"ispunct should be 1 for |\00"
define void @t_ispunct_0x7c() {
%1 = call i32 @ispunct(i32 124)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 625, i8* getelementptr inbounds ([26 x i8], [26 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_ispunct.c\00"
@.str.1 = [26 x i8] c"ispunct should be 1 for |\00"
define void @t_ispunct_0x7c() {
%1 = tail call i32 @ispunct(i32 124)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 625, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void gtk_combo_box_set_active() {}


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

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

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

LLVM IR (-O2):
define void @gtk_combo_box_set_active() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ call_module(char *);
int /*<<< orphan*/ outrigger_set_module(char *, float, float);
int /*<<< orphan*/ sprintf(char *, char *, int /*<<< orphan*/);
void outrigger_set(float maxlength, float minlength) {
  static int modnum = 0;
  char modname[30];
  sprintf(modname, "outrig_set_%d", modnum++);
  outrigger_set_module(modname, maxlength, minlength);
  call_module(modname);
}


x86 assembly (clang, -O0):
<outrigger_set>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
lea    -0x30(%rbp),%rdi
mov    0x2ef0(%rip),%edx
mov    %edx,%eax
add    $0x1,%eax
mov    %eax,0x2ee5(%rip)
lea    0xea2(%rip),%rsi
call   1050 <sprintf@plt>
lea    -0x30(%rbp),%rdi
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
call   1040 <outrigger_set_module@plt>
lea    -0x30(%rbp),%rdi
call   1030 <call_module@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<outrigger_set>:
push   %rbx
sub    $0x30,%rsp
movss  %xmm1,0xc(%rsp)
movss  %xmm0,0x8(%rsp)
mov    0x2ef5(%rip),%edx
lea    0x1(%rdx),%eax
mov    %eax,0x2eec(%rip)
lea    0xea9(%rip),%rsi
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
call   1050 <sprintf@plt>
mov    %rbx,%rdi
movss  0x8(%rsp),%xmm0
movss  0xc(%rsp),%xmm1
call   1040 <outrigger_set_module@plt>
mov    %rbx,%rdi
call   1030 <call_module@plt>
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@outrigger_set.modnum = internal global i32 0
@.str = [14 x i8] c"outrig_set_%d\00"
define void @outrigger_set(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca [30 x i8]
store float %0, float* %3
store float %1, float* %4
%6 = getelementptr inbounds [30 x i8], [30 x i8]* %5, i64 0, i64 0
%7 = load i32, i32* @outrigger_set.modnum
%8 = add nsw i32 %7, 1
store i32 %8, i32* @outrigger_set.modnum
%9 = call i32 @sprintf(i8* %6, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %7)
%10 = getelementptr inbounds [30 x i8], [30 x i8]* %5, i64 0, i64 0
%11 = load float, float* %3
%12 = load float, float* %4
%13 = call i32 @outrigger_set_module(i8* %10, float %11, float %12)
%14 = getelementptr inbounds [30 x i8], [30 x i8]* %5, i64 0, i64 0
%15 = call i32 @call_module(i8* %14)
ret void
}

LLVM IR (-O2):
@outrigger_set.modnum = internal unnamed_addr global i32 0
@.str = [14 x i8] c"outrig_set_%d\00"
define void @outrigger_set(float %0, float %1) {
%3 = alloca [30 x i8]
%4 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 0
%5 = load i32, i32* @outrigger_set.modnum
%6 = add nsw i32 %5, 1
store i32 %6, i32* @outrigger_set.modnum
%7 = call i32 @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %5)
%8 = call i32 @outrigger_set_module(i8* %4, float %0, float %1)
%9 = call i32 @call_module(i8* %4)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *, int /*<<< orphan*/ const *,
                          int);
int /*<<< orphan*/ memset(int /*<<< orphan*/ *, int /*<<< orphan*/, int);
void lm_create_session_key(const uint8_t lanman[16], uint8_t result[16]) {
  memcpy(result, lanman, 8);
  memset(result + 8, 0, 9);
}


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

x86 assembly (clang, -O2):
<lm_create_session_key>:
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%rsi
mov    %rbx,%rdi
mov    $0x8,%edx
call   1040 <memcpy@plt>
add    $0x20,%rbx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x9,%edx
pop    %rbx
jmp    1030 <memset@plt>

LLVM IR (-O0):
define void @lm_create_session_key(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 i32 @memcpy(i32* %5, i32* %6, i32 8)
%8 = load i32*, i32** %4
%9 = getelementptr inbounds i32, i32* %8, i64 8
%10 = call i32 @memset(i32* %9, i32 0, i32 9)
ret void
}

LLVM IR (-O2):
define void @lm_create_session_key(i32* %0, i32* %1) {
%3 = tail call i32 @memcpy(i32* %1, i32* %0, i32 8)
%4 = getelementptr inbounds i32, i32* %1, i64 8
%5 = tail call i32 @memset(i32* %4, i32 0, i32 9)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ data_packing(int, int);
void scanLimit_7219(int totalDigitNumber) {
  data_packing(0x0B, totalDigitNumber);
}


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

x86 assembly (clang, -O2):
<scanLimit_7219>:
mov    %edi,%esi
mov    $0xb,%edi
jmp    1030 <data_packing@plt>

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

LLVM IR (-O2):
define void @scanLimit_7219(i32 %0) {
%2 = tail call i32 @data_packing(i32 11, i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void ft_memdel(void **ap) {
  char **tmp;
  if (!ap)
    return;
  tmp = (char **)ap;
  free(*tmp);
  if (*tmp != NULL)
    *tmp = NULL;
}


x86 assembly (clang, -O0):
<ft_memdel>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    112c <ft_memdel+0x1c>
jmp    1159 <ft_memdel+0x49>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
je     1159 <ft_memdel+0x49>
mov    -0x10(%rbp),%rax
movq   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_memdel>:
push   %rbx
test   %rdi,%rdi
je     112e <ft_memdel+0x1e>
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1030 <free@plt>
cmpq   $0x0,(%rbx)
je     112e <ft_memdel+0x1e>
movq   $0x0,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @ft_memdel(i8** %0) {
%2 = icmp eq i8** %0, null
br i1 %2, label %9, label %3
3: ; preds = %1
%4 = load i8*, i8** %0
%5 = tail call i32 @free(i8* %4)
%6 = load i8*, i8** %0
%7 = icmp eq i8* %6, null
br i1 %7, label %9, label %8
8: ; preds = %3
store i8* null, i8** %0
br label %9
9: ; preds = %3, %8, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ draw_paddle(int, int, int, int, int, int, char);
int /*<<< orphan*/ get_screen_size_(int *, int *);
int /*<<< orphan*/ show_screen();
void draw_paddles() {
  int width;
  int height;
  get_screen_size_(&(width), &(height));
  draw_paddle(width, height, 2, 2, false, 8, '!');
  draw_paddle(width, height, 4, 4, true, 8, '!');
  show_screen();
}


x86 assembly (clang, -O0):
<draw_paddles>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x4(%rbp),%rdi
lea    -0x8(%rbp),%rsi
call   1030 <get_screen_size_@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    $0x2,%ecx
xor    %r8d,%r8d
mov    $0x8,%r9d
mov    %ecx,%edx
movl   $0x21,(%rsp)
call   1050 <draw_paddle@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    $0x4,%ecx
mov    $0x1,%r8d
mov    $0x8,%r9d
mov    %ecx,%edx
movl   $0x21,(%rsp)
call   1050 <draw_paddle@plt>
mov    $0x0,%al
call   1040 <show_screen@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<draw_paddles>:
sub    $0x18,%rsp
lea    0x14(%rsp),%rdi
lea    0x10(%rsp),%rsi
call   1030 <get_screen_size_@plt>
mov    0x14(%rsp),%edi
mov    0x10(%rsp),%esi
movl   $0x21,(%rsp)
mov    $0x2,%edx
mov    $0x2,%ecx
xor    %r8d,%r8d
mov    $0x8,%r9d
call   1050 <draw_paddle@plt>
mov    0x14(%rsp),%edi
mov    0x10(%rsp),%esi
movl   $0x21,(%rsp)
mov    $0x4,%edx
mov    $0x4,%ecx
mov    $0x1,%r8d
mov    $0x8,%r9d
call   1050 <draw_paddle@plt>
xor    %eax,%eax
call   1040 <show_screen@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define void @draw_paddles() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 @get_screen_size_(i32* %1, i32* %2)
%4 = load i32, i32* %1
%5 = load i32, i32* %2
%6 = call i32 @draw_paddle(i32 %4, i32 %5, i32 2, i32 2, i32 0, i32 8, i8 signext 33)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = call i32 @draw_paddle(i32 %7, i32 %8, i32 4, i32 4, i32 1, i32 8, i8 signext 33)
%10 = call i32 (...) @show_screen()
ret void
}

LLVM IR (-O2):
define void @draw_paddles() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @get_screen_size_(i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = call i32 @draw_paddle(i32 %6, i32 %7, i32 2, i32 2, i32 0, i32 8, i8 signext 33)
%9 = load i32, i32* %1
%10 = load i32, i32* %2
%11 = call i32 @draw_paddle(i32 %9, i32 %10, i32 4, i32 4, i32 1, i32 8, i8 signext 33)
%12 = call i32 (...) @show_screen()
ret void
}
void RandomFunc(unsigned short input[1], unsigned short output[1]) {
  unsigned short state[1];
  unsigned short local2;
  unsigned short local1;
  {
    state[0UL] = input[0UL] + (unsigned short)2885;
    local1 = 0UL;
    while (local1 < (unsigned short)0) {
      local2 = 0UL;
      while (local2 < (unsigned short)0) {
        local2 += 2UL;
      }
      local1 += 2UL;
    }
    output[0UL] = (state[0UL] - 146565199UL) + (unsigned short)17348;
  }
}


x86 assembly (clang, -O0):
<RandomFunc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movzwl (%rax),%eax
add    $0xb45,%eax
mov    %ax,-0x12(%rbp)
movw   $0x0,-0x16(%rbp)
movzwl -0x16(%rbp),%eax
cmp    $0x0,%eax
jge    1164 <RandomFunc+0x64>
movw   $0x0,-0x14(%rbp)
movzwl -0x14(%rbp),%eax
cmp    $0x0,%eax
jge    1153 <RandomFunc+0x53>
movzwl -0x14(%rbp),%eax
add    $0x2,%rax
mov    %ax,-0x14(%rbp)
jmp    1135 <RandomFunc+0x35>
movzwl -0x16(%rbp),%eax
add    $0x2,%rax
mov    %ax,-0x16(%rbp)
jmp    1122 <RandomFunc+0x22>
movzwl -0x12(%rbp),%eax
sub    $0x8bc684f,%rax
add    $0x43c4,%rax
mov    %ax,%cx
mov    -0x10(%rbp),%rax
mov    %cx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<RandomFunc>:
movzwl (%rdi),%eax
add    $0xffffe6ba,%eax
mov    %ax,(%rsi)
ret

LLVM IR (-O0):
define void @RandomFunc(i16* %0, i16* %1) {
%3 = alloca i16*
%4 = alloca i16*
%5 = alloca [1 x i16]
%6 = alloca i16
%7 = alloca i16
store i16* %0, i16** %3
store i16* %1, i16** %4
%8 = load i16*, i16** %3
%9 = getelementptr inbounds i16, i16* %8, i64 0
%10 = load i16, i16* %9
%11 = zext i16 %10 to i32
%12 = add nsw i32 %11, 2885
%13 = trunc i32 %12 to i16
%14 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 0
store i16 %13, i16* %14
store i16 0, i16* %7
br label %15
15: ; preds = %29, %2
%16 = load i16, i16* %7
%17 = zext i16 %16 to i32
%18 = icmp slt i32 %17, 0
br i1 %18, label %19, label %34
19: ; preds = %15
store i16 0, i16* %6
br label %20
20: ; preds = %24, %19
%21 = load i16, i16* %6
%22 = zext i16 %21 to i32
%23 = icmp slt i32 %22, 0
br i1 %23, label %24, label %29
24: ; preds = %20
%25 = load i16, i16* %6
%26 = zext i16 %25 to i64
%27 = add i64 %26, 2
%28 = trunc i64 %27 to i16
store i16 %28, i16* %6
br label %20
29: ; preds = %20
%30 = load i16, i16* %7
%31 = zext i16 %30 to i64
%32 = add i64 %31, 2
%33 = trunc i64 %32 to i16
store i16 %33, i16* %7
br label %15
34: ; preds = %15
%35 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 0
%36 = load i16, i16* %35
%37 = zext i16 %36 to i64
%38 = sub i64 %37, 146565199
%39 = add i64 %38, 17348
%40 = trunc i64 %39 to i16
%41 = load i16*, i16** %4
%42 = getelementptr inbounds i16, i16* %41, i64 0
store i16 %40, i16* %42
ret void
}

LLVM IR (-O2):
define void @RandomFunc(i16* nocapture %0, i16* nocapture writeonly %1) {
%3 = load i16, i16* %0
%4 = add i16 %3, -6470
store i16 %4, i16* %1
ret void
}
char safe_to_b64(char c) {
  switch (c) {
  case '-':
    return '+';
    break;
  case '_':
    return '/';
    break;
  default:
    return c;
  }
}


x86 assembly (clang, -O0):
<safe_to_b64>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
mov    %eax,-0x8(%rbp)
sub    $0x2d,%eax
je     1130 <safe_to_b64+0x30>
jmp    111f <safe_to_b64+0x1f>
mov    -0x8(%rbp),%eax
sub    $0x5f,%eax
je     1139 <safe_to_b64+0x39>
jmp    1142 <safe_to_b64+0x42>
movb   $0x2b,-0x1(%rbp)
jmp    1148 <safe_to_b64+0x48>
movb   $0x2f,-0x1(%rbp)
jmp    1148 <safe_to_b64+0x48>
mov    -0x2(%rbp),%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<safe_to_b64>:
cmp    $0x2d,%edi
je     110f <safe_to_b64+0xf>
mov    %edi,%eax
cmp    $0x5f,%edi
jne    110e <safe_to_b64+0xe>
mov    $0x2f,%al
ret
mov    $0x2b,%al
ret

LLVM IR (-O0):
define signext i8 @safe_to_b64(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
switch i32 %5, label %8 [
i32 45, label %6
i32 95, label %7
]
6: ; preds = %1
store i8 43, i8* %2
br label %10
7: ; preds = %1
store i8 47, i8* %2
br label %10
8: ; preds = %1
%9 = load i8, i8* %3
store i8 %9, i8* %2
br label %10
10: ; preds = %8, %7, %6
%11 = load i8, i8* %2
ret i8 %11
}

LLVM IR (-O2):
define signext i8 @safe_to_b64(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %4 [
i32 45, label %5
i32 95, label %3
]
3: ; preds = %1
br label %5
4: ; preds = %1
br label %5
5: ; preds = %1, %4, %3
%6 = phi i8 [ %0, %4 ], [ 47, %3 ], [ 43, %1 ]
ret i8 %6
}
char *doy2fd(year, doy)
int year;
double doy;
{
  double dj;
  dj = doy2jd(year, doy);
  return (jd2fd(dj));
}


x86 assembly (clang, -O0):
<doy2fd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    -0x4(%rbp),%edi
movsd  -0x10(%rbp),%xmm0
mov    $0x1,%al
call   1030 <doy2jd@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
mov    $0x1,%al
call   1040 <jd2fd@plt>
cltq
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<doy2fd>:
push   %rax
mov    $0x1,%al
call   1030 <doy2jd@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mov    $0x1,%al
call   1040 <jd2fd@plt>
cltq
pop    %rcx
ret

LLVM IR (-O0):
define i8* @doy2fd(i32 %0, double %1) {
%3 = alloca i32
%4 = alloca double
%5 = alloca double
store i32 %0, i32* %3
store double %1, double* %4
%6 = load i32, i32* %3
%7 = load double, double* %4
%8 = call i32 (i32, double, ...) bitcast (i32 (...)* @doy2jd to i32 (i32, double, ...)*)(i32 %6, double %7)
%9 = sitofp i32 %8 to double
store double %9, double* %5
%10 = load double, double* %5
%11 = call i32 (double, ...) bitcast (i32 (...)* @jd2fd to i32 (double, ...)*)(double %10)
%12 = sext i32 %11 to i64
%13 = inttoptr i64 %12 to i8*
ret i8* %13
}

LLVM IR (-O2):
define i8* @doy2fd(i32 %0, double %1) {
%3 = tail call i32 (i32, double, ...) bitcast (i32 (...)* @doy2jd to i32 (i32, double, ...)*)(i32 %0, double %1)
%4 = sitofp i32 %3 to double
%5 = tail call i32 (double, ...) bitcast (i32 (...)* @jd2fd to i32 (double, ...)*)(double %4)
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to i8*
ret i8* %7
}
/* Variables and functions */
int /*<<< orphan*/ _Factor();
int /*<<< orphan*/ _Term_prime();
void _Term(void) {
  _Factor();
  _Term_prime();
}


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

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

LLVM IR (-O0):
define void @_Term() {
%1 = call i32 (...) @_Factor()
%2 = call i32 (...) @_Term_prime()
ret void
}

LLVM IR (-O2):
define void @_Term() {
%1 = tail call i32 (...) @_Factor()
%2 = tail call i32 (...) @_Term_prime()
ret void
}
int ft_isspace(char c) {
  if (c == ' ' || c == '\n' || c == '\t')
    return (1);
  return (0);
}


x86 assembly (clang, -O0):
<ft_isspace>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x20,%eax
je     1131 <ft_isspace+0x31>
movsbl -0x5(%rbp),%eax
cmp    $0xa,%eax
je     1131 <ft_isspace+0x31>
movsbl -0x5(%rbp),%eax
cmp    $0x9,%eax
jne    113d <ft_isspace+0x3d>
movl   $0x1,-0x4(%rbp)
jmp    1144 <ft_isspace+0x44>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_isspace>:
cmp    $0x20,%dil
ja     1120 <ft_isspace+0x20>
mov    $0x1,%eax
movzbl %dil,%ecx
movabs $0x100000600,%rdx
bt     %rcx,%rdx
jae    1120 <ft_isspace+0x20>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @ft_isspace(i8 signext %0) {
switch i8 %0, label %2 [
i8 32, label %3
i8 10, label %3
i8 9, label %3
]
2: ; preds = %1
br label %3
3: ; preds = %1, %1, %1, %2
%4 = phi i32 [ 0, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %4
}
/* Type definitions */
struct option {
  int dummy;
};
struct _getopt_data {
  int dummy;
};

/* Variables and functions */
int _getopt_internal_r(int, char **, char const *, struct option const *, int *,
                       int /*<<< orphan*/, struct _getopt_data *,
                       int /*<<< orphan*/);
int _getopt_long_r(int argc, char **argv, const char *options,
                   const struct option *long_options, int *opt_index,
                   struct _getopt_data *d) {
  return _getopt_internal_r(argc, argv, options, long_options, opt_index, 0, d,
                            0);
}


x86 assembly (clang, -O0):
<_getopt_long_r>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x30(%rbp),%rax
xor    %r9d,%r9d
mov    %rax,(%rsp)
movl   $0x0,0x8(%rsp)
call   1030 <_getopt_internal_r@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_getopt_long_r>:
push   %rax
mov    %r9,%rax
xor    %r9d,%r9d
push   $0x0
push   %rax
call   1030 <_getopt_internal_r@plt>
add    $0x10,%rsp
pop    %rcx
ret

LLVM IR (-O0):
%struct.option = type { i32 }
%struct._getopt_data = type { i32 }
define i32 @_getopt_long_r(i32 %0, i8** %1, i8* %2, %struct.option* %3, i32* %4, %struct._getopt_data* %5) {
%7 = alloca i32
%8 = alloca i8**
%9 = alloca i8*
%10 = alloca %struct.option*
%11 = alloca i32*
%12 = alloca %struct._getopt_data*
store i32 %0, i32* %7
store i8** %1, i8*** %8
store i8* %2, i8** %9
store %struct.option* %3, %struct.option** %10
store i32* %4, i32** %11
store %struct._getopt_data* %5, %struct._getopt_data** %12
%13 = load i32, i32* %7
%14 = load i8**, i8*** %8
%15 = load i8*, i8** %9
%16 = load %struct.option*, %struct.option** %10
%17 = load i32*, i32** %11
%18 = load %struct._getopt_data*, %struct._getopt_data** %12
%19 = call i32 @_getopt_internal_r(i32 %13, i8** %14, i8* %15, %struct.option* %16, i32* %17, i32 0, %struct._getopt_data* %18, i32 0)
ret i32 %19
}

LLVM IR (-O2):
%struct.option = type { i32 }
%struct._getopt_data = type { i32 }
define i32 @_getopt_long_r(i32 %0, i8** %1, i8* %2, %struct.option* %3, i32* %4, %struct._getopt_data* %5) {
%7 = tail call i32 @_getopt_internal_r(i32 %0, i8** %1, i8* %2, %struct.option* %3, i32* %4, i32 0, %struct._getopt_data* %5, i32 0)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ funca();
int /*<<< orphan*/ funcb();
int /*<<< orphan*/ helper();
int main(void) {
  helper();
  funca();
  funcb();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @helper()
%2 = tail call i32 (...) @funca()
%3 = tail call i32 (...) @funcb()
ret i32 0
}
int main() {
  int i = 0;
  while (i < 200000000) {
    i++;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xbebc200,-0x8(%rbp)
jge    112d <main+0x2d>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1112 <main+0x12>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

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