#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ atoi(char *);
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strlen(char *);
void invalidFunctionArgString(char c) {
  (void)atoi(&c);
  char x = 'x';
  (void)strlen(&x);
  char y = '\0';
  (void)strlen(&y);
  char str[80] = "hello worl";
  char d = 'd';
  (void)strcat(str, &d);
}


x86 assembly (clang, -O0):
<invalidFunctionArgString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
lea    -0x1(%rbp),%rdi
call   1050 <atoi@plt>
movb   $0x78,-0x2(%rbp)
lea    -0x2(%rbp),%rdi
call   1030 <strlen@plt>
movb   $0x0,-0x3(%rbp)
lea    -0x3(%rbp),%rdi
call   1030 <strlen@plt>
lea    -0x60(%rbp),%rdi
lea    0xe84(%rip),%rsi
mov    $0x50,%edx
call   1040 <memcpy@plt>
movb   $0x64,-0x61(%rbp)
lea    -0x60(%rbp),%rdi
lea    -0x61(%rbp),%rsi
call   1060 <strcat@plt>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<invalidFunctionArgString>:
sub    $0x68,%rsp
movb   $0x78,0xf(%rsp)
lea    0xf(%rsp),%rdi
call   1030 <strlen@plt>
movb   $0x0,0xe(%rsp)
lea    0xe(%rsp),%rdi
call   1030 <strlen@plt>
movaps 0xef7(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xedb(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xebf(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xea3(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xe87(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movb   $0x64,0xd(%rsp)
lea    0x10(%rsp),%rdi
lea    0xd(%rsp),%rsi
call   1040 <strcat@plt>
add    $0x68,%rsp
ret

LLVM IR (-O0):
@__const.invalidFunctionArgString.str = [80 x i8] c"hello worl\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
define void @invalidFunctionArgString(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
%4 = alloca i8
%5 = alloca [80 x i8]
%6 = alloca i8
store i8 %0, i8* %2
%7 = call i32 @atoi(i8* %2)
store i8 120, i8* %3
%8 = call i32 @strlen(i8* %3)
store i8 0, i8* %4
%9 = call i32 @strlen(i8* %4)
%10 = bitcast [80 x i8]* %5 to i8*
store i8 100, i8* %6
%11 = getelementptr inbounds [80 x i8], [80 x i8]* %5, i64 0, i64 0
%12 = call i32 @strcat(i8* %11, i8* %6)
ret void
}

LLVM IR (-O2):
@__const.invalidFunctionArgString.str = [80 x i8] c"hello worl\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
define void @invalidFunctionArgString(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
%4 = alloca [80 x i8]
%5 = alloca i8
store i8 120, i8* %2
%6 = call i32 @strlen(i8* %2)
store i8 0, i8* %3
%7 = call i32 @strlen(i8* %3)
%8 = getelementptr inbounds [80 x i8], [80 x i8]* %4, i64 0, i64 0
store i8 100, i8* %5
%9 = call i32 @strcat(i8* %8, i8* %5)
ret void
}